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.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using Alexandria; using Alexandria.BreakableAPI; using Alexandria.CharacterAPI; using Alexandria.DungeonAPI; using Alexandria.EnemyAPI; using Alexandria.ItemAPI; using Alexandria.Misc; using Alexandria.NPCAPI; using Alexandria.PrefabAPI; using AmmonomiconAPI; using BepInEx; using BepInEx.Configuration; using Brave.BulletScript; using Dungeonator; using FullInspector; using FullSerializer; using Gungeon; using HarmonyLib; using HutongGames.PlayMaker; using HutongGames.PlayMaker.Actions; using InControl; using JuneLib; using JuneLib.Items; using JuneLib.Status; using ModularMod.Code.Collectibles.Guns.Gravity_Pulsar; using ModularMod.Code.Collectibles.Guns.Update_3; using ModularMod.Code.Components; using ModularMod.Code.Components.Misc_Components; using ModularMod.Code.Components.Projectile_Components; using ModularMod.Code.Controllers; using ModularMod.Code.Enemies.EnemyBehaviours; using ModularMod.Code.Hooks; using ModularMod.Code.Toolboxes; using ModularMod.Code.UI; using ModularMod.Code.Unlocks; using ModularMod.Past.Prefabs.Objects; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MonoMod.Utils; using Pathfinding; using SGUI; using SaveAPI; using SoundAPI; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.UI; [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("57445610-0892-47c3-be16-453172104123")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class CustomProximityMine : BraveBehaviour { public enum ExplosiveStyle { PROXIMITY, TIMED } public ExplosionData explosionData; public ExplosiveStyle explosionStyle; [ShowInInspectorIf("explosionStyle", 0, false)] public float detectRadius = 2.5f; public float explosionDelay = 0.3f; public bool usesCustomExplosionDelay; [ShowInInspectorIf("usesCustomExplosionDelay", false)] public float customExplosionDelay = 0.1f; [CheckAnimation(null)] public string deployAnimName; [CheckAnimation(null)] public string idleAnimName; [CheckAnimation(null)] public string explodeAnimName; [Header("Homing")] public bool MovesTowardEnemies; public bool HomingTriggeredOnSynergy; [LongNumericEnum] public CustomSynergyType TriggerSynergy; public float HomingRadius = 5f; public float HomingSpeed = 3f; public float HomingDelay = 5f; protected bool m_triggered; protected bool m_disarmed; public bool Force_Disarm = false; private void TransitionToIdle(tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip) { if (idleAnimName != null && !animator.IsPlaying(explodeAnimName)) { animator.Play(idleAnimName); } animator.AnimationCompleted = (Action)Delegate.Remove(animator.AnimationCompleted, new Action(TransitionToIdle)); } private void Update() { //IL_001c: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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) if (!MovesTowardEnemies && HomingTriggeredOnSynergy && GameManager.Instance.PrimaryPlayer.HasActiveBonusSynergy(TriggerSynergy, false)) { MovesTowardEnemies = true; } if (!MovesTowardEnemies) { return; } RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position); float num = float.MaxValue; AIActor nearestEnemy = absoluteRoom.GetNearestEnemy(((BraveBehaviour)this).sprite.WorldCenter, ref num, true, false); if (Object.op_Implicit((Object)(object)nearestEnemy) && num < HomingRadius) { Vector2 centerPosition = ((GameActor)nearestEnemy).CenterPosition; Vector2 val = centerPosition - ((BraveBehaviour)this).sprite.WorldCenter; Vector2 normalized = ((Vector2)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).debris)) { ((BraveBehaviour)this).debris.ApplyFrameVelocity(normalized * HomingSpeed); } else { ((BraveBehaviour)this).transform.position = ((BraveBehaviour)this).transform.position + Vector2Extensions.ToVector3ZisY(normalized, 0f) * HomingSpeed * BraveTime.DeltaTime; } } } private IEnumerator Start() { if (!string.IsNullOrEmpty(deployAnimName)) { ((BraveBehaviour)this).spriteAnimator.Play(deployAnimName); tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)this).spriteAnimator; spriteAnimator.AnimationCompleted = (Action)Delegate.Combine(spriteAnimator.AnimationCompleted, new Action(TransitionToIdle)); } else if (!string.IsNullOrEmpty(idleAnimName)) { ((BraveBehaviour)this).spriteAnimator.Play(idleAnimName); } if (explosionStyle == ExplosiveStyle.PROXIMITY) { Vector2 position = Vector3Extensions.XY(((BraveBehaviour)this).transform.position); List allActors = StaticReferenceManager.AllEnemies; AkSoundEngine.PostEvent("Play_OBJ_mine_set_01", ((Component)this).gameObject); while (!m_triggered) { if (MovesTowardEnemies) { position = ((BraveBehaviour)this).sprite.WorldCenter; } if (!GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(Vector3Extensions.IntXY(((BraveBehaviour)this).transform.position, (VectorConversions)0)).HasActiveEnemies((ActiveEnemyType)1)) { m_triggered = true; m_disarmed = true; break; } bool shouldContinue = false; for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i]) && !GameManager.Instance.AllPlayers[i].IsGhost) { float num = Vector2.SqrMagnitude(position - ((BraveBehaviour)GameManager.Instance.AllPlayers[i]).specRigidbody.UnitCenter); if (num < detectRadius * detectRadius) { shouldContinue = true; break; } } } if (shouldContinue) { yield return null; continue; } for (int j = 0; j < allActors.Count; j++) { AIActor aiactor = allActors[j]; if (aiactor.IsNormalEnemy && ((Component)aiactor).gameObject.activeSelf && aiactor.HasBeenEngaged && !((BraveBehaviour)aiactor).healthHaver.IsDead) { float num2 = Vector2.SqrMagnitude(position - ((BraveBehaviour)aiactor).specRigidbody.UnitCenter); if (num2 < detectRadius * detectRadius && !Force_Disarm) { m_triggered = true; break; } } } yield return null; } } else if (explosionStyle == ExplosiveStyle.TIMED) { yield return (object)new WaitForSeconds(explosionDelay); if (MovesTowardEnemies && HomingDelay > explosionDelay) { yield return (object)new WaitForSeconds(HomingDelay - explosionDelay); } } if (!m_disarmed) { if (!string.IsNullOrEmpty(explodeAnimName)) { ((BraveBehaviour)this).spriteAnimator.Play(explodeAnimName); if (usesCustomExplosionDelay) { yield return (object)new WaitForSeconds(customExplosionDelay); } else { tk2dSpriteAnimationClip clip = ((BraveBehaviour)this).spriteAnimator.GetClipByName(explodeAnimName); yield return (object)new WaitForSeconds((float)clip.frames.Length / clip.fps); } } Exploder.Explode(Vector2Extensions.ToVector3ZUp(((BraveBehaviour)this).sprite.WorldCenter, 0f), explosionData, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)this).gameObject); } else { ((BraveBehaviour)this).spriteAnimator.StopAndResetFrame(); } } public override void OnDestroy() { ((BraveBehaviour)this).OnDestroy(); } } namespace System { public class Func { } } namespace SGUI { public class ShakyWobbly : SModifier { private float startTime; private Color defaultColor = new Color(0.5f, 0.9f, 1f); private float offset; private float freq; private float amp; public override void Init() { startTime = Time.realtimeSinceStartup; offset = Random.Range(-0.25f, 0.25f); freq = Random.Range(1f, 2.1f); amp = Random.Range(1f, 2.1f); } public override void Update() { //IL_0030: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) float num = Time.realtimeSinceStartup - startTime; float num2 = Mathf.Sin(num * 3f * freq) * amp; base.Elem.Foreground = defaultColor; base.Elem.Position = Vector2Extensions.WithY(base.Elem.Position, num2); } } public class ShakyWobblyNoColor : SModifier { private float startTime; private float freq; private float amp; public override void Init() { startTime = Time.realtimeSinceStartup; freq = 1f; amp = 1.5f; } public override void Update() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) float num = Time.realtimeSinceStartup - startTime; float num2 = Mathf.Sin(num * 3f * freq) * amp; base.Elem.Position = Vector2Extensions.WithY(base.Elem.Position, num2); } } } namespace ModularMod { public class FortifierAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_00f3: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Expected O, but got Unknown //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_0779: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Expected O, but got Unknown //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0872: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_089e: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Unknown result type (might be due to invalid IL or missing references) //IL_08b0: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) //IL_090e: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_092e: Unknown result type (might be due to invalid IL or missing references) //IL_0935: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0950: Expected O, but got Unknown //IL_0a21: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Unknown result type (might be due to invalid IL or missing references) //IL_0a2d: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a73: Unknown result type (might be due to invalid IL or missing references) //IL_0a82: Unknown result type (might be due to invalid IL or missing references) //IL_0a8a: Unknown result type (might be due to invalid IL or missing references) //IL_0a8f: Unknown result type (might be due to invalid IL or missing references) //IL_0abf: Unknown result type (might be due to invalid IL or missing references) //IL_0ae9: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Fortifier", "turretplaceralt"); Game.Items.Rename("outdated_gun_mods:fortifier", "mdl:armcannon_15_alt"); FortifierAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires wall-mounted turrets. Compatible with Modular Upgrade Software.\n\nThe perfect defense? An even better offense."); val.SetupSprite(StaticCollections.Gun_Collection, "turretplaceralt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "turretplaceralt_idle"; val.shootAnimation = "turretplaceralt_fire"; val.reloadAnimation = "turretplaceralt_reload"; val.introAnimation = "turretplaceralt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(156); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3.2f; val.DefaultModule.cooldownTime = 4f; val.DefaultModule.numberOfShotsInClip = 1; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 0f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val2.AnimateProjectileBundle("turretidlealt", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "turretidlealt", new List { new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 6), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 6), ProjectileToolbox.ConstructListOfSameValues(value: true, 6), ProjectileToolbox.ConstructListOfSameValues(value: false, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6)); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); val3.SetFloat("_EmissiveThresholdSensitivity", 0.2f); val3.SetTexture("_MainTex", ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.GetTexture("_MainTex")); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 45f; val2.baseData.damage = 25f; val2.shouldRotate = false; val2.baseData.range = 100000f; Projectile val4 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(334); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(334); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal2 = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(223); tileMapHorizontal2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical2 = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(223); tileMapVertical2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(223); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(223); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val4.baseData.damage = 8f; val4.baseData.speed = 30f; val4.baseData.range = 10000f; val4.shouldRotate = true; ImprovedAfterImage improvedAfterImage = ((Component)val4).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.75f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0f, 0.5f, 0f, 1f); Material val5 = new Material(ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive")); val5.EnableKeyword("BRIGHTNESS_CLAMP_ON"); val5.SetFloat("_EmissivePower", 20f); val5.SetFloat("_EmissiveColorPower", 20f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = val5; val4.AnimateProjectileBundle("longshotalt_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "longshot_idle", new List { new IntVector2(14, 5), new IntVector2(14, 5) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 2), ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues(value: false, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2)); ExplosiveModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.explosionData = new ExplosionData { breakSecretWalls = false, comprehensiveDelay = 0f, damage = 12f, damageRadius = 2.5f, damageToPlayer = 0f, debrisForce = 40f, doDamage = true, doDestroyProjectiles = false, doExplosionRing = false, doForce = true, doScreenShake = false, doStickyFriction = false, effect = StaticExplosionDatas.genericLargeExplosion.effect, explosionDelay = 0f, force = 4f, forcePreventSecretWallDamage = false, forceUseThisRadius = true, freezeEffect = null, freezeRadius = 0f, IsChandelierExplosion = false, isFreezeExplosion = false, playDefaultSFX = true, preventPlayerForce = false, pushRadius = 1f, secretWallsRadius = 1f }; orAddComponent.doExplosion = true; orAddComponent.IgnoreQueues = true; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.penetration += 1000; val2.pierceMinorBreakables = true; TurretComponent orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent3.materialToCopy = val3; ref GameObject muzzleFlashPrefab = ref orAddComponent3.muzzleFlashPrefab; PickupObject byId15 = PickupObjectDatabase.GetById(153); muzzleFlashPrefab = ((Gun)((byId15 is Gun) ? byId15 : null)).muzzleFlashEffects.effects[0].effects[0].effect; TurretComponent.projectileToFireAlt = val4; ((Component)val2).gameObject.AddComponent(); ImprovedAfterImage improvedAfterImage2 = ((Component)val2).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.5f; improvedAfterImage2.shadowTimeDelay = 0.01f; improvedAfterImage2.dashColor = new Color(0.85f, 0.85f, 0.85f, 1f); val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("TurretBallAlt", StaticCollections.Clip_Ammo_Atlas, "turretalt_1", "turretalt_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(1, -1); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId16 = PickupObjectDatabase.GetById(370); muzzleFlashEffects = ((Gun)((byId16 is Gun) ? byId16 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.5f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.5f), "barrel_point").transform; val.IsMinusOneGun = true; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificReload = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificReload, new Func(@object.ProcessFireRateSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f / (float)(1 + stack / 4); } public void Start() { base.gun.IsMinusOneGun = true; } } public class Fortifier : GunBehaviour { public static int GunID; public static void Init() { //IL_00f3: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Expected O, but got Unknown //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_077d: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Expected O, but got Unknown //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08b4: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08d0: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_08e7: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08fd: Unknown result type (might be due to invalid IL or missing references) //IL_0904: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_091d: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Unknown result type (might be due to invalid IL or missing references) //IL_092b: Unknown result type (might be due to invalid IL or missing references) //IL_0932: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Unknown result type (might be due to invalid IL or missing references) //IL_0944: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Expected O, but got Unknown //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a2a: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: Unknown result type (might be due to invalid IL or missing references) //IL_0a8c: Unknown result type (might be due to invalid IL or missing references) //IL_0a94: Unknown result type (might be due to invalid IL or missing references) //IL_0a99: Unknown result type (might be due to invalid IL or missing references) //IL_0ac9: Unknown result type (might be due to invalid IL or missing references) //IL_0af3: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Fortifier", "turretplacer"); Game.Items.Rename("outdated_gun_mods:fortifier", "mdl:armcannon_15"); Fortifier @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires wall-mounted turrets. Compatible with Modular Upgrade Software.\n\nThe perfect defense? An even better offense."); val.SetupSprite(StaticCollections.Gun_Collection, "turretplace_reload_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "turretplacer_idle"; val.shootAnimation = "turretplacer_fire"; val.reloadAnimation = "turretplacer_reload"; val.introAnimation = "turretplacer_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(156); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3.2f; val.DefaultModule.cooldownTime = 4f; val.DefaultModule.numberOfShotsInClip = 1; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 0f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val2.AnimateProjectileBundle("turretidle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "turretidle", new List { new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8), new IntVector2(8, 8) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 6), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 6), ProjectileToolbox.ConstructListOfSameValues(value: true, 6), ProjectileToolbox.ConstructListOfSameValues(value: false, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6), ProjectileToolbox.ConstructListOfSameValues(null, 6)); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); val3.SetFloat("_EmissiveThresholdSensitivity", 0.2f); val3.SetTexture("_MainTex", ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.GetTexture("_MainTex")); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 45f; val2.baseData.damage = 25f; val2.shouldRotate = false; val2.baseData.range = 100000f; Projectile val4 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(334); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(334); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal2 = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(223); tileMapHorizontal2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical2 = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(223); tileMapVertical2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(223); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(223); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val4.baseData.damage = 8f; val4.baseData.speed = 30f; val4.baseData.range = 10000f; val4.shouldRotate = true; ImprovedAfterImage improvedAfterImage = ((Component)val4).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.75f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0f, 0.5f, 0.5f, 1f); Material val5 = new Material(ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive")); val5.EnableKeyword("BRIGHTNESS_CLAMP_ON"); val5.SetFloat("_EmissivePower", 20f); val5.SetFloat("_EmissiveColorPower", 20f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = val5; val4.AnimateProjectileBundle("longshot_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "longshot_idle", new List { new IntVector2(14, 5), new IntVector2(14, 5) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 2), ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues(value: false, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2)); ExplosiveModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.explosionData = new ExplosionData { breakSecretWalls = false, comprehensiveDelay = 0f, damage = 12f, damageRadius = 2.5f, damageToPlayer = 0f, debrisForce = 40f, doDamage = true, doDestroyProjectiles = false, doExplosionRing = false, doForce = true, doScreenShake = false, doStickyFriction = false, effect = StaticExplosionDatas.genericLargeExplosion.effect, explosionDelay = 0f, force = 4f, forcePreventSecretWallDamage = false, forceUseThisRadius = true, freezeEffect = null, freezeRadius = 0f, IsChandelierExplosion = false, isFreezeExplosion = false, playDefaultSFX = true, preventPlayerForce = false, pushRadius = 1f, secretWallsRadius = 1f }; orAddComponent.doExplosion = true; orAddComponent.IgnoreQueues = true; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.penetration += 1000; val2.pierceMinorBreakables = true; TurretComponent orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent3.materialToCopy = val3; ref GameObject muzzleFlashPrefab = ref orAddComponent3.muzzleFlashPrefab; PickupObject byId15 = PickupObjectDatabase.GetById(153); muzzleFlashPrefab = ((Gun)((byId15 is Gun) ? byId15 : null)).muzzleFlashEffects.effects[0].effects[0].effect; TurretComponent.projectileToFire = val4; ((Component)val2).gameObject.AddComponent(); ImprovedAfterImage improvedAfterImage2 = ((Component)val2).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.5f; improvedAfterImage2.shadowTimeDelay = 0.01f; improvedAfterImage2.dashColor = new Color(0.85f, 0.85f, 0.85f, 1f); val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("TurretBall", StaticCollections.Clip_Ammo_Atlas, "turret_1", "turret_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(1, -1); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId16 = PickupObjectDatabase.GetById(370); muzzleFlashEffects = ((Gun)((byId16 is Gun) ? byId16 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.5f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.5f), "barrel_point").transform; val.IsMinusOneGun = true; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificReload = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificReload, new Func(@object.ProcessFireRateSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f / (float)(1 + stack / 4); } public void Start() { base.gun.IsMinusOneGun = true; } } public class ShieldGeneratorAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Expected O, but got Unknown //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0811: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0831: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Expected O, but got Unknown //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0c97: Unknown result type (might be due to invalid IL or missing references) //IL_0c9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ee3: Unknown result type (might be due to invalid IL or missing references) //IL_0eea: Expected O, but got Unknown //IL_0f23: Unknown result type (might be due to invalid IL or missing references) //IL_0f28: Unknown result type (might be due to invalid IL or missing references) //IL_1028: Unknown result type (might be due to invalid IL or missing references) //IL_102d: Unknown result type (might be due to invalid IL or missing references) //IL_1035: Unknown result type (might be due to invalid IL or missing references) //IL_1040: Unknown result type (might be due to invalid IL or missing references) //IL_1049: Expected O, but got Unknown //IL_1049: Unknown result type (might be due to invalid IL or missing references) //IL_104e: Unknown result type (might be due to invalid IL or missing references) //IL_1055: Unknown result type (might be due to invalid IL or missing references) //IL_1060: Unknown result type (might be due to invalid IL or missing references) //IL_1069: Expected O, but got Unknown //IL_1069: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Unknown result type (might be due to invalid IL or missing references) //IL_1076: Unknown result type (might be due to invalid IL or missing references) //IL_1081: Unknown result type (might be due to invalid IL or missing references) //IL_108a: Expected O, but got Unknown //IL_10bd: Unknown result type (might be due to invalid IL or missing references) //IL_10ea: Unknown result type (might be due to invalid IL or missing references) //IL_10fd: Unknown result type (might be due to invalid IL or missing references) //IL_110c: Unknown result type (might be due to invalid IL or missing references) //IL_1114: Unknown result type (might be due to invalid IL or missing references) //IL_1119: Unknown result type (might be due to invalid IL or missing references) //IL_1149: Unknown result type (might be due to invalid IL or missing references) //IL_1173: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Barrier Builder", "barrierbuilderalt"); Game.Items.Rename("outdated_gun_mods:barrier_builder", "mdl:armcannon_14_alt"); ShieldGeneratorAlt shieldGeneratorAlt = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Creates energy cubes that projectiles stick to. Compatible with Modular Upgrade Software.\n\nUsing hardlight technology as a weapon? What next?"); val.SetupSprite(StaticCollections.Gun_Collection, "sheildgenalt_idle_004"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "shieldgenalt_idle"; val.shootAnimation = "shieldgenalt_fire"; val.reloadAnimation = "shieldgenalt_reload"; val.introAnimation = "shieldgenalt_intro"; val.chargeAnimation = "shieldgenalt_charge"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(57); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.chargeAnimation, new Dictionary { { 5, "Play_BOSS_cannon_stop_01" }, { 6, "Play_BOSS_cyborg_charge_01" }, { 15, "Play_WPN_thor_charge_01" }, { 19, "Play_OBJ_mine_beep_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.shootAnimation, new Dictionary { { 0, "Play_ITM_Macho_Brace_Trigger_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.reloadAnimation, new Dictionary { { 0, "Play_BOSS_omegaBeam_fade_01" }, { 6, "Play_BOSS_hatch_open_01" }, { 13, "Play_BOSS_lasthuman_torch_01" } }); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)3; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(21); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3f; val.DefaultModule.cooldownTime = 0.25f; val.DefaultModule.numberOfShotsInClip = 12; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 6f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); ((Object)((Component)val2).gameObject).name = "EnergyCube_Small"; FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("energycube_small_alt", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "energycube_small_alt", new List { new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 12), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 12), ProjectileToolbox.ConstructListOfSameValues(value: true, 12), ProjectileToolbox.ConstructListOfSameValues(value: false, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12)); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 7f; val2.baseData.damage = 3f; val2.shouldRotate = false; val2.baseData.force = 3f; val2.collidesWithProjectiles = true; val2.projectileHitHealth = 5; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.033f); ProjectileData baseData = val2.baseData; baseData.range *= 1.2f; ((Component)val2).gameObject.AddComponent(); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(504); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(504); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ShieldEater shieldEater = ((Component)val2).gameObject.AddComponent(); ((Component)val2).gameObject.AddComponent(); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 100; BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.numberOfBounces = 3; ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.25f; improvedAfterImage.dashColor = new Color(0f, 0.7f, 0.7f, 1f); Projectile val4 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); ((Object)((Component)val4).gameObject).name = "EnergyCube_Small"; FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.AnimateProjectileBundle("largecube_alt", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "largecube_alt", new List { new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 18), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 18), ProjectileToolbox.ConstructListOfSameValues(value: true, 18), ProjectileToolbox.ConstructListOfSameValues(value: false, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18)); Material material = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = material; val4.baseData.speed = 10f; val4.baseData.damage = 7f; val4.shouldRotate = false; val4.baseData.force = 5f; val4.collidesWithProjectiles = true; val4.projectileHitHealth = 15; val4.baseData.UsesCustomAccelerationCurve = true; val4.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.05f); ProjectileData baseData2 = val4.baseData; baseData2.range *= 3f; ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(504); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(504); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ((Component)val4).gameObject.AddComponent(); ref VFXPool tileMapHorizontal2 = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(223); tileMapHorizontal2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical2 = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(223); tileMapVertical2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(223); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(223); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ((Component)val4).gameObject.AddComponent(); ShieldBlock shieldBlock = ((Component)val4).gameObject.AddComponent(); shieldBlock.Range = 1.5f; PierceProjModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent3.penetration = 100; ((Component)val4).gameObject.AddComponent(); BounceProjModifier orAddComponent4 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent4.numberOfBounces = 5; ImprovedAfterImage improvedAfterImage2 = ((Component)val4).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.5f; improvedAfterImage2.shadowTimeDelay = 0.25f; improvedAfterImage2.dashColor = new Color(0f, 0.7f, 0.7f, 1f); PickupObject byId15 = PickupObjectDatabase.GetById(57); Projectile val5 = Object.Instantiate(((Gun)((byId15 is Gun) ? byId15 : null)).DefaultModule.projectiles[0]); ((Component)val5).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val5).gameObject); Object.DontDestroyOnLoad((Object)(object)val5); val5.SetProjectileCollisionRight("defaultarmcannonalt_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)1); ref string objectImpactEventName3 = ref val5.objectImpactEventName; PickupObject byId16 = PickupObjectDatabase.GetById(334); objectImpactEventName3 = ((Gun)((byId16 is Gun) ? byId16 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName3 = ref val5.enemyImpactEventName; PickupObject byId17 = PickupObjectDatabase.GetById(334); enemyImpactEventName3 = ((Gun)((byId17 is Gun) ? byId17 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal3 = ref val5.hitEffects.tileMapHorizontal; PickupObject byId18 = PickupObjectDatabase.GetById(223); tileMapHorizontal3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId18 is Gun) ? byId18 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical3 = ref val5.hitEffects.tileMapVertical; PickupObject byId19 = PickupObjectDatabase.GetById(223); tileMapVertical3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId19 is Gun) ? byId19 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy3 = ref val5.hitEffects.enemy; PickupObject byId20 = PickupObjectDatabase.GetById(223); enemy3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId20 is Gun) ? byId20 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny3 = ref val5.hitEffects.deathAny; PickupObject byId21 = PickupObjectDatabase.GetById(223); deathAny3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId21 is Gun) ? byId21 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val5).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val5).sprite).renderer.material = val3; val5.baseData.speed = 15f; val5.baseData.damage = 3.25f; val5.baseData.range = 125f; val5.shouldRotate = false; ProjectileData baseData3 = val5.baseData; baseData3.force *= 0.25f; ((Component)val5).gameObject.AddComponent(); ((Component)val5).gameObject.AddComponent(); val5.collidesWithProjectiles = true; ShieldEater shieldEater2 = ((Component)val5).gameObject.AddComponent(); shieldEater2.Damage = 1; val5.baseData.UsesCustomAccelerationCurve = true; val5.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.1f); ChargeProjectile item = new ChargeProjectile { Projectile = val5, ChargeTime = 0f, AmmoCost = 1 }; ChargeProjectile item2 = new ChargeProjectile { Projectile = val2, ChargeTime = 0.55f, AmmoCost = 1 }; ChargeProjectile item3 = new ChargeProjectile { Projectile = val4, ChargeTime = 1.85f, AmmoCost = 1 }; val.DefaultModule.chargeProjectiles = new List { item, item2, item3 }; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("EnergyCubeAlt", StaticCollections.Clip_Ammo_Atlas, "cubealt_1", "cubealt_2", (AmmoType)14); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 4); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId22 = PickupObjectDatabase.GetById(362); muzzleFlashEffects = ((Gun)((byId22 is Gun) ? byId22 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.9375f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.9375f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; } } public class ShieldGenerator : GunBehaviour { public static int GunID; public static void Init() { //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Expected O, but got Unknown //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0811: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0831: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Expected O, but got Unknown //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0c97: Unknown result type (might be due to invalid IL or missing references) //IL_0c9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ee3: Unknown result type (might be due to invalid IL or missing references) //IL_0eea: Expected O, but got Unknown //IL_0f23: Unknown result type (might be due to invalid IL or missing references) //IL_0f28: Unknown result type (might be due to invalid IL or missing references) //IL_1028: Unknown result type (might be due to invalid IL or missing references) //IL_102d: Unknown result type (might be due to invalid IL or missing references) //IL_1035: Unknown result type (might be due to invalid IL or missing references) //IL_1040: Unknown result type (might be due to invalid IL or missing references) //IL_1049: Expected O, but got Unknown //IL_1049: Unknown result type (might be due to invalid IL or missing references) //IL_104e: Unknown result type (might be due to invalid IL or missing references) //IL_1055: Unknown result type (might be due to invalid IL or missing references) //IL_1060: Unknown result type (might be due to invalid IL or missing references) //IL_1069: Expected O, but got Unknown //IL_1069: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Unknown result type (might be due to invalid IL or missing references) //IL_1076: Unknown result type (might be due to invalid IL or missing references) //IL_1081: Unknown result type (might be due to invalid IL or missing references) //IL_108a: Expected O, but got Unknown //IL_10bd: Unknown result type (might be due to invalid IL or missing references) //IL_10ea: Unknown result type (might be due to invalid IL or missing references) //IL_1101: Unknown result type (might be due to invalid IL or missing references) //IL_1112: Unknown result type (might be due to invalid IL or missing references) //IL_111a: Unknown result type (might be due to invalid IL or missing references) //IL_111f: Unknown result type (might be due to invalid IL or missing references) //IL_114f: Unknown result type (might be due to invalid IL or missing references) //IL_1179: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Barrier Builder", "barrierbuilder"); Game.Items.Rename("outdated_gun_mods:barrier_builder", "mdl:armcannon_14"); ShieldGenerator @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Creates energy cubes that projectiles stick to. Compatible with Modular Upgrade Software.\n\nUsing hardlight technology as a weapon? What next?"); val.SetupSprite(StaticCollections.Gun_Collection, "shieldgen_idle_004"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "shieldgen_idle"; val.shootAnimation = "shieldgen_fire"; val.reloadAnimation = "shieldgen_reload"; val.introAnimation = "shieldgen_intro"; val.chargeAnimation = "shieldgen_charge"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(57); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.chargeAnimation, new Dictionary { { 5, "Play_BOSS_cannon_stop_01" }, { 6, "Play_BOSS_cyborg_charge_01" }, { 15, "Play_WPN_thor_charge_01" }, { 19, "Play_OBJ_mine_beep_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.shootAnimation, new Dictionary { { 0, "Play_ITM_Macho_Brace_Trigger_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.reloadAnimation, new Dictionary { { 0, "Play_BOSS_omegaBeam_fade_01" }, { 6, "Play_BOSS_hatch_open_01" }, { 13, "Play_BOSS_lasthuman_torch_01" } }); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)3; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(21); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3f; val.DefaultModule.cooldownTime = 0.25f; val.DefaultModule.numberOfShotsInClip = 12; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 6f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); ((Object)((Component)val2).gameObject).name = "EnergyCube_Small"; FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("energycube_small", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "energycube_small", new List { new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15), new IntVector2(10, 15) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 12), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 12), ProjectileToolbox.ConstructListOfSameValues(value: true, 12), ProjectileToolbox.ConstructListOfSameValues(value: false, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12), ProjectileToolbox.ConstructListOfSameValues(null, 12)); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 7f; val2.baseData.damage = 3f; val2.shouldRotate = false; val2.baseData.force = 3f; val2.collidesWithProjectiles = true; val2.projectileHitHealth = 5; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.033f); ProjectileData baseData = val2.baseData; baseData.range *= 1.2f; ((Component)val2).gameObject.AddComponent(); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(504); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(504); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ShieldEater shieldEater = ((Component)val2).gameObject.AddComponent(); ((Component)val2).gameObject.AddComponent(); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 100; BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.numberOfBounces = 3; ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.25f; improvedAfterImage.dashColor = new Color(0f, 0.7f, 0.7f, 1f); Projectile val4 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); ((Object)((Component)val4).gameObject).name = "EnergyCube_Small"; FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.AnimateProjectileBundle("largecube", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "largecube", new List { new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30), new IntVector2(25, 30) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 18), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 18), ProjectileToolbox.ConstructListOfSameValues(value: true, 18), ProjectileToolbox.ConstructListOfSameValues(value: false, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18), ProjectileToolbox.ConstructListOfSameValues(null, 18)); Material material = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = material; val4.baseData.speed = 10f; val4.baseData.damage = 6f; val4.shouldRotate = false; val4.baseData.force = 5f; val4.collidesWithProjectiles = true; val4.projectileHitHealth = 15; val4.baseData.UsesCustomAccelerationCurve = true; val4.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.05f); ProjectileData baseData2 = val4.baseData; baseData2.range *= 3f; ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(504); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(504); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ((Component)val4).gameObject.AddComponent(); ref VFXPool tileMapHorizontal2 = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(223); tileMapHorizontal2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical2 = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(223); tileMapVertical2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(223); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(223); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ((Component)val4).gameObject.AddComponent(); ShieldBlock shieldBlock = ((Component)val4).gameObject.AddComponent(); shieldBlock.Range = 1.5f; PierceProjModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent3.penetration = 100; ((Component)val4).gameObject.AddComponent(); BounceProjModifier orAddComponent4 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent4.numberOfBounces = 5; ImprovedAfterImage improvedAfterImage2 = ((Component)val4).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.5f; improvedAfterImage2.shadowTimeDelay = 0.25f; improvedAfterImage2.dashColor = new Color(0f, 0.7f, 0.7f, 1f); PickupObject byId15 = PickupObjectDatabase.GetById(57); Projectile val5 = Object.Instantiate(((Gun)((byId15 is Gun) ? byId15 : null)).DefaultModule.projectiles[0]); ((Component)val5).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val5).gameObject); Object.DontDestroyOnLoad((Object)(object)val5); val5.SetProjectileCollisionRight("defaultarmcannon_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)1); ref string objectImpactEventName3 = ref val5.objectImpactEventName; PickupObject byId16 = PickupObjectDatabase.GetById(334); objectImpactEventName3 = ((Gun)((byId16 is Gun) ? byId16 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName3 = ref val5.enemyImpactEventName; PickupObject byId17 = PickupObjectDatabase.GetById(334); enemyImpactEventName3 = ((Gun)((byId17 is Gun) ? byId17 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal3 = ref val5.hitEffects.tileMapHorizontal; PickupObject byId18 = PickupObjectDatabase.GetById(223); tileMapHorizontal3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId18 is Gun) ? byId18 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical3 = ref val5.hitEffects.tileMapVertical; PickupObject byId19 = PickupObjectDatabase.GetById(223); tileMapVertical3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId19 is Gun) ? byId19 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy3 = ref val5.hitEffects.enemy; PickupObject byId20 = PickupObjectDatabase.GetById(223); enemy3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId20 is Gun) ? byId20 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny3 = ref val5.hitEffects.deathAny; PickupObject byId21 = PickupObjectDatabase.GetById(223); deathAny3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId21 is Gun) ? byId21 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val5).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val5).sprite).renderer.material = val3; val5.baseData.speed = 15f; val5.baseData.damage = 3.25f; val5.baseData.range = 125f; val5.shouldRotate = false; ProjectileData baseData3 = val5.baseData; baseData3.force *= 0.25f; ((Component)val5).gameObject.AddComponent(); ((Component)val5).gameObject.AddComponent(); val5.collidesWithProjectiles = true; ShieldEater shieldEater2 = ((Component)val5).gameObject.AddComponent(); shieldEater2.Damage = 1; val5.baseData.UsesCustomAccelerationCurve = true; val5.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.1f); ChargeProjectile item = new ChargeProjectile { Projectile = val5, ChargeTime = 0f, AmmoCost = 1 }; ChargeProjectile item2 = new ChargeProjectile { Projectile = val2, ChargeTime = 0.55f, AmmoCost = 1 }; ChargeProjectile item3 = new ChargeProjectile { Projectile = val4, ChargeTime = 1.85f, AmmoCost = 1 }; val.DefaultModule.chargeProjectiles = new List { item, item2, item3 }; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("EnergyCube", StaticCollections.Clip_Ammo_Atlas, "cube_1", "cube_2", (AmmoType)14); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 4); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId22 = PickupObjectDatabase.GetById(156); muzzleFlashEffects = ((Gun)((byId22 is Gun) ? byId22 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.9375f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.9375f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f / (float)(1 + stack / 5); } } public class FlamethrowerAlt : GunBehaviour { public static int ID; public static void Init() { //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_025e: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Expected O, but got Unknown //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Expected O, but got Unknown //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Expected O, but got Unknown //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Flame Ejector", "flamethroweralt"); Game.Items.Rename("outdated_gun_mods:flame_ejector", "mdl:armcannon_13_alt"); FlamethrowerAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires super heated energy. Compatible with Modular Upgrade Software.\n\nA flamethrower. This is 100% a flamethrower, no-one can convince anyone else otherwise."); val.SetupSprite(StaticCollections.Gun_Collection, "flameralt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "flameralt_idle"; val.shootAnimation = "flameralt_fire"; val.reloadAnimation = "flameralt_reload"; val.introAnimation = "flameralt_intro"; val.emptyAnimation = "flameralt_empty"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.shootAnimation, new Dictionary { { 0, "Play_OBJ_bomb_fuse_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.reloadAnimation, new Dictionary { { 2, "Play_WPN_brickgun_reload_01" } }); PickupObject byId = PickupObjectDatabase.GetById(336); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(125); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3.2f; val.DefaultModule.cooldownTime = 0.04f; val.DefaultModule.numberOfShotsInClip = 125; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7.2f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("flamingfire", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "flamingfire", new List { new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 14), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 14), ProjectileToolbox.ConstructListOfSameValues(value: true, 14), ProjectileToolbox.ConstructListOfSameValues(value: false, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14)); val2.objectImpactEventName = null; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(384); enemyImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ProjectileImpactVFXPool hitEffects = val2.hitEffects; VFXPool val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects.tileMapHorizontal = val3; ProjectileImpactVFXPool hitEffects2 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects2.tileMapVertical = val3; ProjectileImpactVFXPool hitEffects3 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects3.enemy = val3; ProjectileImpactVFXPool hitEffects4 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects4.deathAny = val3; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1.1f, 0.75f, 0.35f); Material val4 = new Material(ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive")); val4.EnableKeyword("BRIGHTNESS_CLAMP_ON"); val4.SetFloat("_EmissivePower", 100f); val4.SetFloat("_EmissiveColorPower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val4; val2.baseData.speed = 18.5f; val2.baseData.damage = 0.45f; val2.baseData.force = 2.2f; val2.AppliesFire = true; val2.FireApplyChance = 0.35f; val2.fireEffect = DebuffStatics.hotLeadEffect; ((Component)val2).gameObject.AddComponent(); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 10000; BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.numberOfBounces = 100; ((Component)val2).gameObject.AddComponent(); val2.shouldRotate = true; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 0); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId4 = PickupObjectDatabase.GetById(329); muzzleFlashEffects = ((Gun)((byId4 is Gun) ? byId4 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.75f, 0.5625f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.75f, 0.5625f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("flamethrowerMDLR", StaticCollections.Clip_Ammo_Atlas, "flamer_1", "flamer_2", (AmmoType)14); ((Component)((Component)val).gameObject.transform.Find("Clip")).transform.position = new Vector3(1.125f, 0.5f); val.clipObject = ((Component)Toolbox.GenerateDebrisObject("canister_clip", StaticCollections.Gun_Collection, debrisObjectsCanRotate: true, 1f, 3f, 60f, 20f, null, 2f, "Play_ITM_Crisis_Stone_Impact_02", null, 1)).gameObject; val.reloadClipLaunchFrame = 9; val.clipsToLaunchOnReload = 1; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.Process)); } public void Process(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.damage += 0.1f * (float)stack; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f + 0.25f * (float)stack; p.FireApplyChance = 0.1f * (float)stack; ProjectileData baseData3 = p.baseData; baseData3.force += (float)stack; p.fireEffect = DebuffStatics.greenFireEffect; p.AdjustPlayerProjectileTint(new Color(0f, 3f, 0f, 1f), 10, 0f); } } } public class Flamethrower : GunBehaviour { public static int ID; public static void Init() { //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_025e: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Expected O, but got Unknown //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Expected O, but got Unknown //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Expected O, but got Unknown //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Flame Ejector", "flamethrower"); Game.Items.Rename("outdated_gun_mods:flame_ejector", "mdl:armcannon_13"); Flamethrower @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires super heated energy. Compatible with Modular Upgrade Software.\n\nA flamethrower. This is 100% a flamethrower, no-one can convince anyone else otherwise."); val.SetupSprite(StaticCollections.Gun_Collection, "flamer_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "flamer_idle"; val.shootAnimation = "flamer_fire"; val.reloadAnimation = "flamer_reload"; val.introAnimation = "flamer_intro"; val.emptyAnimation = "flamer_empty"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.shootAnimation, new Dictionary { { 0, "Play_OBJ_bomb_fuse_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.reloadAnimation, new Dictionary { { 2, "Play_WPN_brickgun_reload_01" } }); PickupObject byId = PickupObjectDatabase.GetById(336); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(125); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3.2f; val.DefaultModule.cooldownTime = 0.04f; val.DefaultModule.numberOfShotsInClip = 125; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7.2f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("flamingfire", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "flamingfire", new List { new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30), new IntVector2(30, 30) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 14), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 14), ProjectileToolbox.ConstructListOfSameValues(value: true, 14), ProjectileToolbox.ConstructListOfSameValues(value: false, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14), ProjectileToolbox.ConstructListOfSameValues(null, 14)); val2.objectImpactEventName = null; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(384); enemyImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ProjectileImpactVFXPool hitEffects = val2.hitEffects; VFXPool val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects.tileMapHorizontal = val3; ProjectileImpactVFXPool hitEffects2 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects2.tileMapVertical = val3; ProjectileImpactVFXPool hitEffects3 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects3.enemy = val3; ProjectileImpactVFXPool hitEffects4 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects4.deathAny = val3; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1.1f, 0.75f, 0.35f); Material val4 = new Material(ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive")); val4.EnableKeyword("BRIGHTNESS_CLAMP_ON"); val4.SetFloat("_EmissivePower", 100f); val4.SetFloat("_EmissiveColorPower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val4; val2.baseData.speed = 18.5f; val2.baseData.damage = 0.45f; val2.baseData.force = 2.2f; val2.AppliesFire = true; val2.FireApplyChance = 0.35f; val2.fireEffect = DebuffStatics.hotLeadEffect; ((Component)val2).gameObject.AddComponent(); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 10000; BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.numberOfBounces = 100; ((Component)val2).gameObject.AddComponent(); val2.shouldRotate = true; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 0); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId4 = PickupObjectDatabase.GetById(329); muzzleFlashEffects = ((Gun)((byId4 is Gun) ? byId4 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.75f, 0.5625f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.75f, 0.5625f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("flamethrowerMDLR", StaticCollections.Clip_Ammo_Atlas, "flamer_1", "flamer_2", (AmmoType)14); ((Component)((Component)val).gameObject.transform.Find("Clip")).transform.position = new Vector3(1.125f, 0.5f); val.clipObject = ((Component)Toolbox.GenerateDebrisObject("canister_clip", StaticCollections.Gun_Collection, debrisObjectsCanRotate: true, 1f, 3f, 60f, 20f, null, 2f, "Play_ITM_Crisis_Stone_Impact_02", null, 1)).gameObject; val.reloadClipLaunchFrame = 7; val.clipsToLaunchOnReload = 1; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.Process)); } public void Process(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.damage += 0.25f * (float)stack; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f + 0.5f * (float)stack; p.FireApplyChance = 0.1f * (float)stack; ProjectileData baseData3 = p.baseData; baseData3.force += (float)stack; p.fireEffect = DebuffStatics.greenFireEffect; p.AdjustPlayerProjectileTint(new Color(0f, 1f, 0f, 1f), 10, 0f); } } } public class GravityPulsarAlt : GunBehaviour { public static int ID; public static void Init() { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0254: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Expected O, but got Unknown //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0a1b: Unknown result type (might be due to invalid IL or missing references) //IL_0a20: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0a9f: Unknown result type (might be due to invalid IL or missing references) //IL_0aa7: Unknown result type (might be due to invalid IL or missing references) //IL_0aac: Unknown result type (might be due to invalid IL or missing references) //IL_0ac2: Unknown result type (might be due to invalid IL or missing references) //IL_0aec: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Singularity Pulsar", "singularity_pulsar_alt"); Game.Items.Rename("outdated_gun_mods:singularity_pulsar", "mdl:armcannon_10_alt"); GravityPulsar @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires large rifts, followed up with energy attracted to said rifts. Compatible with Modular Upgrade Software.\n\nAn experimental tech graciously provided by a local laboratory, weaponized into an exotic weapon."); val.SetupSprite(StaticCollections.Gun_Collection, "gravgunalt_idle_002"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "gravgunalt_idle"; val.shootAnimation = "gravgunalt_fire"; val.reloadAnimation = "gravgunalt_reload"; val.finalShootAnimation = "gravgunalt_altfire"; val.introAnimation = "gravgunalt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.shootAnimation, new Dictionary { { 0, "Play_WPN_bsg_shot_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.finalShootAnimation, new Dictionary { { 0, "Play_WPN_looper_shot_01" } }); PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.5f; val.DefaultModule.cooldownTime = 0.3f; val.DefaultModule.numberOfShotsInClip = 26; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7f; val.DefaultModule.usesOptionalFinalProjectile = true; val.DefaultModule.numberOfFinalProjectiles = 25; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("fwoomp", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "fwoomp", new List { new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 22), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 22), ProjectileToolbox.ConstructListOfSameValues(value: true, 22), ProjectileToolbox.ConstructListOfSameValues(value: false, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22)); ProjectileImpactVFXPool hitEffects = val2.hitEffects; VFXPool val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects.tileMapHorizontal = val3; ProjectileImpactVFXPool hitEffects2 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects2.tileMapVertical = val3; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId3 = PickupObjectDatabase.GetById(169); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId4 = PickupObjectDatabase.GetById(169); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val2.hitEffects.alwaysUseMidair = false; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId5 = PickupObjectDatabase.GetById(156); objectImpactEventName = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId6 = PickupObjectDatabase.GetById(156); enemyImpactEventName = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].enemyImpactEventName; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 20; orAddComponent.penetratesBreakables = true; MaintainDamageOnPierce orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.damageMultOnPierce = 1f; BounceProjModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent3.bouncesTrackEnemies = false; orAddComponent3.numberOfBounces = 10; val2.baseData.speed = 6f; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.SetFloat("_EmissivePower", 40f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 40f); ProjectileData baseData = val2.baseData; baseData.range *= 2.5f; val2.pierceMinorBreakables = true; val2.PenetratesInternalWalls = true; val2.baseData.damage = 3f; val2.shouldRotate = false; ((Component)val2).gameObject.AddComponent(); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.45f; improvedAfterImage.shadowTimeDelay = 0.025f; improvedAfterImage.dashColor = new Color(1.1f, 0.5f, 1.1f, 1f); val.DefaultModule.ammoType = (AmmoType)14; ref string customAmmoType = ref val.DefaultModule.customAmmoType; PickupObject byId7 = PickupObjectDatabase.GetById(169); customAmmoType = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.customAmmoType; val.DefaultModule.finalAmmoType = (AmmoType)14; val.DefaultModule.finalCustomAmmoType = "ArmCannonAlt"; PickupObject byId8 = PickupObjectDatabase.GetById(56); Projectile val4 = Object.Instantiate(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.SetProjectileCollisionRight("defaultarmcannonalt_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)1); val4.baseData.range = 250f; ((Component)val4).gameObject.AddComponent(); val.DefaultModule.finalProjectile = val4; PierceProjModifier orAddComponent4 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent4.penetration = 6; orAddComponent4.penetratesBreakables = true; ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(334); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(334); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(89); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(89); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(89); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(89); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); BounceProjModifier orAddComponent5 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent5.bouncesTrackEnemies = false; orAddComponent5.numberOfBounces = 10; MaintainDamageOnPierce orAddComponent6 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent6.damageMultOnPierce = 1f; val4.baseData.damage = 2.8f; ImprovedAfterImage improvedAfterImage2 = ((Component)val4).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.3f; improvedAfterImage2.shadowTimeDelay = 0.01f; improvedAfterImage2.dashColor = new Color(0f, 0.7f, 0f, 1f); modularGunController.projectileToCopyForFlak = val4; val.gunClass = (GunClass)0; ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId15 = PickupObjectDatabase.GetById(228); muzzleFlashEffects = ((Gun)((byId15 is Gun) ? byId15 : null)).muzzleFlashEffects; ref VFXPool finalMuzzleFlashEffects = ref val.finalMuzzleFlashEffects; PickupObject byId16 = PickupObjectDatabase.GetById(513); finalMuzzleFlashEffects = ((Gun)((byId16 is Gun) ? byId16 : null)).muzzleFlashEffects; ref string gunSwitchGroup2 = ref val.gunSwitchGroup; PickupObject byId17 = PickupObjectDatabase.GetById(169); gunSwitchGroup2 = ((Gun)((byId17 is Gun) ? byId17 : null)).gunSwitchGroup; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.375f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.375f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecificClip = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClip, new Func(@object.ProcessClipSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (1f + (float)stack / 3.5f); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return (int)((float)f * 1.333f); } public void Start() { ModularGunController component = ((Component)base.gun).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.statMods.Add(new ModuleGunStatModifier { FinaleClipSize_Process = ProcessClipSize }); } } public bool CheckModule() { GameActor currentOwner = base.gun.CurrentOwner; if (Object.op_Implicit((Object)(object)((currentOwner is PlayerController) ? currentOwner : null)) && ((PlayerController)/*isinst with value type is only supported in some contexts*/).PlayerHasActiveModule(IteratedDesign.ID)) { return true; } return false; } public int ProcessClipSize(int currentFinales, int clipSize, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return base.gun.DefaultModule.GetModNumberOfShotsInClip((GameActor)(object)player) - 1; } } public class BigNukeAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Expected O, but got Unknown //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Kinetic Payload", "bignukegunalt"); Game.Items.Rename("outdated_gun_mods:kinetic_payload", "mdl:armcannon_12_alt"); BigNukeAlt bigNukeAlt = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires kinetic warheads. Compatible with Modular Upgrade Software.\n\nComplete overkill, in the palm of your hand."); val.SetupSprite(StaticCollections.Gun_Collection, "bigbombalt_idle_004"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "bignukealt_idle"; val.shootAnimation = "bignukealt_fire"; val.reloadAnimation = "bignukealt_reload"; val.introAnimation = "bignukealt_intro"; val.emptyAnimation = "bignukealt_clipempty"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; modularGunController.AdditionalPowerSupply = -2; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(39); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 6.5f; val.DefaultModule.cooldownTime = 5f; val.DefaultModule.numberOfShotsInClip = 1; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 4f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("bombbombalt_001", StaticCollections.Projectile_Collection, 17, 7, lightened: false, (Anchor)4); val2.AnimateProjectileBundle("bombombalt", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "bombombalt", new List { new IntVector2(17, 7), new IntVector2(17, 7), new IntVector2(17, 7), new IntVector2(17, 7), new IntVector2(17, 7) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 5), ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues(value: false, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(387); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(387); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(390); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(390); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(390); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(390); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0f, 1f, 0f, 1f); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 70f; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.Linear(0f, 0.3f, 1f, 1f); val2.baseData.CustomAccelerationCurveDuration = 2f; val2.baseData.damage = 60f; val2.shouldRotate = true; KineticBomb kineticBomb = ((Component)val2).gameObject.AddComponent(); ExplosiveModifier val4 = ((Component)val2).gameObject.AddComponent(); val4.explosionData = StaticExplosionDatas.CopyFields(StaticExplosionDatas.genericLargeExplosion); kineticBomb.exploder = val4; val4.explosionData.damage = 45f; val4.explosionData.damageToPlayer = 0f; val4.explosionData.damageRadius = 7f; val4.explosionData.forceUseThisRadius = true; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.Linear(0f, 0.3f, 1f, 1.5f); val2.baseData.CustomAccelerationCurveDuration = 2.5f; val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("BigNukeAlt_Modular", StaticCollections.Clip_Ammo_Atlas, "bignukealt_1", "bignukealt_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(151); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; } } public class BigNuke : GunBehaviour { public static int GunID; public static void Init() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Expected O, but got Unknown //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_071b: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Kinetic Payload", "bignukegun"); Game.Items.Rename("outdated_gun_mods:kinetic_payload", "mdl:armcannon_12"); BigNuke @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires kinetic warheads. Compatible with Modular Upgrade Software.\n\nComplete overkill, in the palm of your hand."); val.SetupSprite(StaticCollections.Gun_Collection, "bigbomb_idle_004"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "bignuke_idle"; val.shootAnimation = "bignuke_fire"; val.reloadAnimation = "bignuke_reload"; val.introAnimation = "bignuke_intro"; val.emptyAnimation = "bignuke_clipempty"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; modularGunController.AdditionalPowerSupply = -2; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(39); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 6.5f; val.DefaultModule.cooldownTime = 5f; val.DefaultModule.numberOfShotsInClip = 1; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 4f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("bombbomb_001", StaticCollections.Projectile_Collection, 17, 7, lightened: false, (Anchor)4); val2.AnimateProjectileBundle("bombomb", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "bombomb", new List { new IntVector2(17, 7), new IntVector2(17, 7), new IntVector2(17, 7), new IntVector2(17, 7), new IntVector2(17, 7) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 5), ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues(value: false, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(387); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(387); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(390); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(390); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(390); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(390); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects.First().effects.First().effect); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0f, 1f, 1f, 1f); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 70f; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.Linear(0f, 0.3f, 1f, 1f); val2.baseData.CustomAccelerationCurveDuration = 2f; val2.baseData.damage = 60f; val2.shouldRotate = true; KineticBomb kineticBomb = ((Component)val2).gameObject.AddComponent(); ExplosiveModifier val4 = ((Component)val2).gameObject.AddComponent(); val4.explosionData = StaticExplosionDatas.CopyFields(StaticExplosionDatas.genericLargeExplosion); kineticBomb.exploder = val4; val4.explosionData.damage = 45f; val4.explosionData.damageToPlayer = 0f; val4.explosionData.damageRadius = 7f; val4.explosionData.forceUseThisRadius = true; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.Linear(0f, 0.3f, 1f, 1.5f); val2.baseData.CustomAccelerationCurveDuration = 2.5f; val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("BigNuke_Modular", StaticCollections.Clip_Ammo_Atlas, "bignuke_1", "bignuke_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(387); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificClipPostCalc = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClipPostCalc, new Func(@object.ProcessClipSpecial)); IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f + stack; } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f / (float)(1 + stack / 5); } } public class KineticBomb : MonoBehaviour { private Projectile projectile; public ExplosiveModifier exploder; public void Start() { projectile = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)projectile)) { projectile.OnDestruction += Projectile_OnDestruction; } } private void Projectile_OnDestruction(Projectile obj) { //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_022d: 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_00cb: 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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)obj).GetComponent() != (Object)null) { exploder.explosionData.damage = 5f; return; } GameActor owner = obj.Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if ((Object)(object)val != (Object)null && val.PlayerHasActiveModule(IteratedDesign.ID)) { PickupObject byId = PickupObjectDatabase.GetById(val.IsUsingAlternateCostume ? DefaultArmCannonAlt.ID : DefaultArmCannon.ID); Projectile val2 = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]; float num = BraveUtility.RandomAngle(); float num2 = 22.5f; for (int i = 0; i < 16; i++) { Projectile component = SpawnManager.SpawnProjectile(((Component)val2).gameObject, Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldBottomCenter), Quaternion.Euler(0f, 0f, num + num2 * (float)i), true).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.baseData.damage = 6.25f; component.Owner = (GameActor)(object)val; component.Shooter = ((BraveBehaviour)val).specRigidbody; component.baseData.speed = 35f; component.UpdateSpeed(); PierceProjModifier val3 = ((Component)component).gameObject.AddComponent(); val3.penetratesBreakables = true; val3.penetration = 1; val.DoPostProcessProjectile(component); ImprovedAfterImage improvedAfterImage = ((Component)component).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = (Color)(val.IsUsingAlternateCostume ? Color.green : new Color(0f, 1f, 1f, 1f)); } } } Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), 200f, 8f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), 200f, 8f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), 8f); Exploder.DoDistortionWave(((BraveBehaviour)obj).sprite.WorldCenter, 5f * ConfigManager.DistortionWaveMultiplier, 0.15f * ConfigManager.DistortionWaveMultiplier, 8f, 0.33f); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)obj).gameObject); } } public class FlakCannonAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_00f3: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Expected O, but got Unknown //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0768: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Shrapnel Launcher", "flakcannonalt"); Game.Items.Rename("outdated_gun_mods:shrapnel_launcher", "mdl:armcannon_11_alt"); FlakCannonAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires chunks of completely waste material. Compatible with Modular Upgrade Software.\n\nA somewhat effective way to get rid of waste material that simply cannot be repurposed."); val.SetupSprite(StaticCollections.Gun_Collection, "flakcannonalt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "flakcannonalt_idle"; val.shootAnimation = "flakcannonalt_fire"; val.reloadAnimation = "flakcannonalt_reload"; val.introAnimation = "flakcannonalt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(19); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(19); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.5f; val.DefaultModule.cooldownTime = 1.2f; val.DefaultModule.numberOfShotsInClip = 3; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.shouldRotate = false; val2.SetProjectileCollisionRight("flak_largeprojectile_001", StaticCollections.Projectile_Collection, 12, 12, lightened: false, (Anchor)4); Object.Destroy((Object)(object)((Component)val2).GetComponent()); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0.35f, 0.35f, 0.35f, 1f); GrenadeProjectile val3 = (GrenadeProjectile)(object)((val2 is GrenadeProjectile) ? val2 : null); if (val3 != null) { val3.startingHeight = 2f; } ExplosiveModifier component = ((Component)val2).GetComponent(); ExplosiveModifier val4 = SpriteBuilder.CopyFrom((Component)(object)((Component)val2).gameObject.AddComponent(), component); Object.Destroy((Object)(object)component); val4.explosionData = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val4.explosionData.damage = 3f; val4.explosionData.damageToPlayer = 0f; val2.AnimateProjectileBundle("flakcannon", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "flakcannon", new List { new IntVector2(9, 9), new IntVector2(9, 9), new IntVector2(9, 9), new IntVector2(9, 9), new IntVector2(9, 9) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 5), ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues(value: false, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(37); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.chargeProjectiles[0].Projectile.objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(37); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.chargeProjectiles[0].Projectile.enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(37); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(37); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(37); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(37); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ProjectileData baseData = val2.baseData; baseData.speed *= 1f; val2.baseData.damage = 30f; val2.shouldRotate = false; ((Component)val2).gameObject.AddComponent(); Material val5 = new Material(StaticShaders.Default_Shader); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val5; SpawnProjModifier val6 = ((Component)val2).gameObject.AddComponent(); val6.fireRandomlyInAngle = true; val6.collisionSpawnStyle = (CollisionSpawnStyle)0; val6.PostprocessSpawnedProjectiles = true; val6.numberToSpawnOnCollison = 9; val6.spawnProjectilesOnCollision = true; val6.spawnCollisionProjectilesOnBounce = true; val6.spawnOnObjectCollisions = true; val6.UsesMultipleCollisionSpawnProjectiles = true; val6.collisionSpawnProjectiles = (Projectile[])(object)new Projectile[4] { ReturnShrapnel("flak_projectile_002", new IntVector2(2, 2), 5f, 11f), ReturnShrapnel("flak_projectile_003", new IntVector2(3, 3), 6f, 14f), ReturnShrapnel("flak_projectile_004", new IntVector2(4, 4), 6f, 5f), ReturnShrapnel("flak_projectile_005", new IntVector2(6, 6), 7f, 7f) }; val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = "FlakCannon_MDLR"; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(19); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "barrel_point").transform; ((Component)((Component)val).gameObject.transform.Find("Clip")).transform.position = new Vector3(1.125f, 0.1875f); val.clipObject = ((Component)Toolbox.GenerateDebrisObject("flancannon_alt_clip", StaticCollections.Gun_Collection, debrisObjectsCanRotate: true, 1f, 3f, 60f, 20f, null, 2f, "Play_ITM_Crisis_Stone_Impact_02", null, 1)).gameObject; val.reloadClipLaunchFrame = 8; val.clipsToLaunchOnReload = 1; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificClipPostCalc = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClipPostCalc, new Func(@object.ProcessClipSpecial)); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f + stack; } public static Projectile ReturnShrapnel(string spriteName, IntVector2 size, float damage, float speed) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(86); Projectile val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]); ((Component)val).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val).gameObject); Object.DontDestroyOnLoad((Object)(object)val); val.SetProjectileCollisionRight(spriteName, StaticCollections.Projectile_Collection, size.x * 2, size.y * 2, lightened: false, (Anchor)4); Material val2 = new Material(StaticShaders.Default_Shader); val2.mainTexture = ((BraveBehaviour)((BraveBehaviour)val).sprite).renderer.material.mainTexture; ((BraveBehaviour)((BraveBehaviour)val).sprite).renderer.material = val2; ImprovedAfterImage improvedAfterImage = ((Component)val).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0.35f, 0.35f, 0.35f, 1f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); orAddComponent.penetration = 1; val.baseData.damage = damage; val.baseData.range = (4f + speed * 1.5f / damage) * 0.75f; val.baseData.speed = speed * 1.25f; return val; } } public class FlakCannon : GunBehaviour { public class BaseShrapnelProj : MonoBehaviour { private PlayerController Player; private Projectile projectile; public void Start() { projectile = ((Component)this).GetComponent(); ref PlayerController player = ref Player; GameActor owner = projectile.Owner; player = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (IteratedDesign.PlayerHasIteratedDesign(Player) > 0) { SpawnProjModifier component = ((Component)projectile).gameObject.GetComponent(); component.numberToSpawnOnCollison += IteratedDesign.PlayerHasIteratedDesign(Player) * 3; } } } public static int GunID; public static void Init() { //IL_00f3: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Expected O, but got Unknown //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06d2: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Shrapnel Launcher", "flakcannon"); Game.Items.Rename("outdated_gun_mods:shrapnel_launcher", "mdl:armcannon_11"); FlakCannon @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires chunks of completely waste material. Compatible with Modular Upgrade Software.\n\nA somewhat effective way to get rid of waste material that simply cannot be repurposed."); val.SetupSprite(StaticCollections.Gun_Collection, "flakcannon_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "flakcannon_idle"; val.shootAnimation = "flakcannon_fire"; val.reloadAnimation = "flakcannon_reload"; val.introAnimation = "flakcannon_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(19); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(19); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.5f; val.DefaultModule.cooldownTime = 1.2f; val.DefaultModule.numberOfShotsInClip = 3; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.shouldRotate = false; val2.SetProjectileCollisionRight("flak_largeprojectile_001", StaticCollections.Projectile_Collection, 12, 12, lightened: false, (Anchor)4); Object.Destroy((Object)(object)((Component)val2).GetComponent()); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0.35f, 0.35f, 0.35f, 1f); GrenadeProjectile val3 = (GrenadeProjectile)(object)((val2 is GrenadeProjectile) ? val2 : null); if (val3 != null) { val3.startingHeight = 2f; } ExplosiveModifier component = ((Component)val2).GetComponent(); ExplosiveModifier val4 = SpriteBuilder.CopyFrom((Component)(object)((Component)val2).gameObject.AddComponent(), component); Object.Destroy((Object)(object)component); val4.explosionData = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val4.explosionData.damage = 3f; val4.explosionData.damageToPlayer = 0f; val2.AnimateProjectileBundle("flakcannon", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "flakcannon", new List { new IntVector2(9, 9), new IntVector2(9, 9), new IntVector2(9, 9), new IntVector2(9, 9), new IntVector2(9, 9) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 5), ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues(value: false, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(37); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.chargeProjectiles[0].Projectile.objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(37); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.chargeProjectiles[0].Projectile.enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(37); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(37); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(37); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(37); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects.First().effects.First().effect); ProjectileData baseData = val2.baseData; baseData.speed *= 1f; val2.baseData.damage = 30f; val2.shouldRotate = false; Material val5 = new Material(StaticShaders.Default_Shader); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val5; SpawnProjModifier val6 = ((Component)val2).gameObject.AddComponent(); val6.fireRandomlyInAngle = true; val6.collisionSpawnStyle = (CollisionSpawnStyle)0; val6.PostprocessSpawnedProjectiles = true; val6.numberToSpawnOnCollison = 9; ((Component)val2).gameObject.AddComponent(); val6.spawnProjectilesOnCollision = true; val6.spawnCollisionProjectilesOnBounce = true; val6.spawnOnObjectCollisions = true; val6.UsesMultipleCollisionSpawnProjectiles = true; val6.collisionSpawnProjectiles = (Projectile[])(object)new Projectile[4] { ReturnShrapnel("flak_projectile_002", new IntVector2(2, 2), 5f, 11f), ReturnShrapnel("flak_projectile_003", new IntVector2(3, 3), 6f, 14f), ReturnShrapnel("flak_projectile_004", new IntVector2(4, 4), 6f, 5f), ReturnShrapnel("flak_projectile_005", new IntVector2(6, 6), 7f, 7f) }; val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("FlakCannon_MDLR", StaticCollections.Clip_Ammo_Atlas, "scrapcube_1", "scrapcube_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(19); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "barrel_point").transform; ((Component)((Component)val).gameObject.transform.Find("Clip")).transform.position = new Vector3(1.125f, 0.1875f); val.clipObject = ((Component)Toolbox.GenerateDebrisObject("flancannon_clip", StaticCollections.Gun_Collection, debrisObjectsCanRotate: true, 1f, 3f, 60f, 20f, null, 2f, "Play_ITM_Crisis_Stone_Impact_02", null, 1)).gameObject; val.reloadClipLaunchFrame = 6; val.clipsToLaunchOnReload = 1; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificClipPostCalc = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClipPostCalc, new Func(@object.ProcessClipSpecial)); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f + stack; } public static Projectile ReturnShrapnel(string spriteName, IntVector2 size, float damage, float speed) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(86); Projectile val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]); ((Component)val).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val).gameObject); Object.DontDestroyOnLoad((Object)(object)val); val.SetProjectileCollisionRight(spriteName, StaticCollections.Projectile_Collection, size.x * 2, size.y * 2, lightened: false, (Anchor)4); Material val2 = new Material(StaticShaders.Default_Shader); val2.mainTexture = ((BraveBehaviour)((BraveBehaviour)val).sprite).renderer.material.mainTexture; ((BraveBehaviour)((BraveBehaviour)val).sprite).renderer.material = val2; ImprovedAfterImage improvedAfterImage = ((Component)val).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.1f; improvedAfterImage.dashColor = new Color(0.5f, 0.5f, 0.5f, 1f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); orAddComponent.penetration = 1; val.baseData.damage = damage; val.baseData.range = (4f + speed * 1.5f / damage) * 0.75f; val.baseData.speed = speed * 1.25f; return val; } } public class MarkedEffect : GameActorSpeedEffect { public static GameObject MarkedVFX; public static GameObject BuildVFX() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("Marked For Death"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("critSeeker_006")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("GenericVFXAnimation").GetComponent(); val3.playAutomatically = true; val3.defaultClipId = val3.Library.GetClipIdByName("Crit_Start"); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 4f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 4f); MarkedVFX = val; return MarkedVFX; } public override void ApplyTint(GameActor actor) { } public override void OnEffectApplied(GameActor actor, RuntimeGameActorEffectData effectData, float partialAmount = 1f) { ((GameActorSpeedEffect)this).OnEffectApplied(actor, effectData, partialAmount); } public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData) { ((GameActorSpeedEffect)this).OnEffectRemoved(actor, effectData); ((BraveBehaviour)actor).healthHaver.OnPreDeath -= effectData.OnActorPreDeath; } } public class MicroMissiles : DefaultModule { public static ItemTemplate template; public static int ID; public int Kills = 15; public int MissileKills = 0; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("micromissiles_tier1_alt_module.png"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelName = "Micro Missiles " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases clip size by 25% (" + StaticColorHexes.AddColorToLabelString("+25%", StaticColorHexes.Light_Orange_Hex) + ").\nOn reload, fire a missile (" + StaticColorHexes.AddColorToLabelString("+1 missile", StaticColorHexes.Light_Orange_Hex) + ") for every 15 enemies killed\non the current floor."; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "MiniMissile", ClipSize_Process = ProcessClipSize }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); modulePrinter.OnNewFloorStarted = (Action)Delegate.Combine(modulePrinter.OnNewFloorStarted, new Action(ONF)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONF)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public void ONF(ModulePrinterCore modulePrinter, PlayerController playerController) { MissileKills = 0; } public void OKE(ModulePrinterCore modulePrinter, PlayerController playerController, AIActor aIActor) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) Kills--; if (Kills <= 0) { Kills = 15; MissileKills++; GameObject val = ((GameActor)playerController).PlayEffectOnActor(DeathTrigger.DeathCrossVFX, new Vector3(0.125f, 1.25f), true, false, false); val.GetComponent().PlayAndDestroyObject("missileUp", (Action)null); AkSoundEngine.PostEvent("Play_wpn_chamberabbey_reload_01", ((Component)playerController).gameObject); } } public int ProcessClipSize(int f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f + modularGunController.Base_Clip_Size / 4 * modulePrinterCore.ReturnStack(LabelName); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { ((MonoBehaviour)player).StartCoroutine(DoMissileBlast()); } public IEnumerator DoMissileBlast() { int stacc = ReturnStack(Stored_Core); Gun g = Stored_Core.ModularGunController.gun; PlayerController player = ((PassiveItem)Stored_Core).Owner; for (int i = 0; i < MissileKills * stacc; i++) { float acc = Stored_Core.ModularGunController.GetAccuracy(20f); Projectile p = SpawnManager.SpawnProjectile(((Component)Guns.Yari_Launcher.DefaultModule.projectiles[0]).gameObject, g.barrelOffset.position, Quaternion.Euler(0f, 0f, g.CurrentAngle + acc), true).GetComponent(); if (Object.op_Implicit((Object)(object)p)) { AkSoundEngine.PostEvent("Play_BOSS_RatMech_Missile_01", ((Component)player).gameObject); p.Owner = (GameActor)(object)player; p.Shooter = ((BraveBehaviour)player).specRigidbody; p.baseData.damage = 7.5f; player.DoPostProcessProjectile(p); } yield return (object)new WaitForSeconds(0.05f); } } static MicroMissiles() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MicroMissiles)); val.Name = "Micro Missiles"; val.Description = "Arsenal"; val.LongDescription = "Increases clip size by 25% (+25% per stack). On reload, fire a missile (+1 missile per stack) for every 15 enemies killed on the current floor."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("micromissiles_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BloatedCapacitor : DefaultModule { public static ItemTemplate template; public static int ID; public int RandomRoomsToGo = 0; public static void PostInit(PickupObject v) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("bloatedcapacitor_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.2f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Overcharged Capacitor " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Clearing enough rooms breaks this module and grants a Power Cell.\n" + StaticColorHexes.AddColorToLabelString("Reduces stats significantly, take double damage,\nand cannot be deactivated", StaticColorHexes.Red_Color_Hex) + "."; defaultModule.IsUncraftable = true; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.red); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { if (RandomRoomsToGo == 0) { RandomRoomsToGo = Random.Range(10, 21); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnRoomCleared = (Action)Delegate.Combine(modulePrinter.OnRoomCleared, new Action(OnRoomCleared)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { Name = "owie :(", FireRate_Process = PFR, ChargeSpeed_Process = PFR, Reload_Process = PFR }; modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Combine(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); modulePrinter.ProcessGunStatModifier(gunStatModifier); player.LostArmor = (Action)Delegate.Combine(player.LostArmor, new Action(OnDamaged)); } public void OnDamaged() { HealthHaver healthHaver = ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).healthHaver; float armor = healthHaver.Armor; healthHaver.Armor = armor - 1f; } public float ModifySpeed(Vector2 currentVelocity, ModulePrinterCore core, PlayerController player) { return -0.1f; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnRoomCleared = (Action)Delegate.Remove(modulePrinter.OnRoomCleared, new Action(OnRoomCleared)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Remove(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); modulePrinter.RemoveGunStatModifier(gunStatModifier); player.LostArmor = (Action)Delegate.Remove(player.LostArmor, new Action(OnDamaged)); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { return f * 1.25f; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.speed *= 0.85f; ProjectileData baseData2 = p.baseData; baseData2.damage *= 0.85f; p.UpdateSpeed(); } public override bool CanBeDisabled(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { return false; } public void OnRoomCleared(ModulePrinterCore modulePrinter, PlayerController player, RoomHandler room) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) RandomRoomsToGo--; if (RandomRoomsToGo <= 0) { modulePrinter.RemoveModule(this); GameObject val = Object.Instantiate(((Component)PickupObjectDatabase.GetById(PowerCell.PowerCellID)).gameObject, Vector3.zero, Quaternion.identity); PickupObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.CanBeDropped = false; component.Pickup(player); } RandomRoomsToGo = Random.Range(10, 17); AkSoundEngine.PostEvent("Play_BOSS_FuseBomb_Death_01", ((Component)player).gameObject); if (ConfigManager.DoVisualEffect) { Object.Instantiate(VFXStorage.TeleportDistortVFX, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Quaternion.identity); } } } public override void MidGameSerialize(List data) { base.MidGameSerialize(data); data.Add(RandomRoomsToGo); } public override void MidGameDeserialize(List data) { base.MidGameSerialize(data); RandomRoomsToGo = (int)data[0]; } static BloatedCapacitor() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BloatedCapacitor)); val.Name = "Overcharged Capacitor"; val.Description = "Too Much To Handle"; val.LongDescription = "Clearing enough rooms breaks this module and grants a Power Cell. Reduces stats significantly, take double damage, and cannot be deactivated."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("bloatedcapacitor_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class ConcussionGuillotine : DefaultModule { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static OnPreRigidbodyCollisionDelegate <>9__2_2; public static Action <>9__2_0; internal void b__2_0(Projectile p1, SpeculativeRigidbody spec) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown if (!((Object)(object)((BraveBehaviour)spec).aiActor != (Object)null) || !((Object)(object)((BraveBehaviour)((BraveBehaviour)spec).aiActor).behaviorSpeculator != (Object)null) || !((BraveBehaviour)((BraveBehaviour)spec).aiActor).behaviorSpeculator.IsStunned) { return; } <>c__DisplayClass2_1 CS$<>8__locals0 = new <>c__DisplayClass2_1(); spec.AddCollisionLayerOverride(CollisionMask.LayerToMask((CollisionLayer)2)); object obj = <>9__2_2; if (obj == null) { OnPreRigidbodyCollisionDelegate val = delegate { }; <>9__2_2 = val; obj = (object)val; } CS$<>8__locals0.onPreRigidbodyCollisionDelegate = (OnPreRigidbodyCollisionDelegate)obj; CS$<>8__locals0.onPreRigidbodyCollisionDelegate = (OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody _1, PixelCollider _2, SpeculativeRigidbody _3, PixelCollider _4) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)_3) && Object.op_Implicit((Object)(object)((BraveBehaviour)_3).aiActor) && Object.op_Implicit((Object)(object)_1) && Object.op_Implicit((Object)(object)((BraveBehaviour)_1).healthHaver)) { AIActor aiActor = ((BraveBehaviour)_3).aiActor; _1.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)_1.OnPreRigidbodyCollision, (Delegate?)(object)CS$<>8__locals0.onPreRigidbodyCollisionDelegate); if (aiActor.IsNormalEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)aiActor).healthHaver)) { ((BraveBehaviour)aiActor).healthHaver.ApplyDamage(((BraveBehaviour)_1).healthHaver.GetMaxHealth() * 1.25f, _1.Velocity, "Pinball", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } }; spec.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)spec.OnPreRigidbodyCollision, (Delegate?)(object)CS$<>8__locals0.onPreRigidbodyCollisionDelegate); ((BraveBehaviour)spec).knockbackDoer.ApplyKnockback(p1.LastVelocity, p1.baseData.force * 5f, false); } internal void b__2_2(SpeculativeRigidbody _1, PixelCollider _2, SpeculativeRigidbody _3, PixelCollider _4) { } } [CompilerGenerated] private sealed class <>c__DisplayClass2_1 { public OnPreRigidbodyCollisionDelegate onPreRigidbodyCollisionDelegate; internal void b__3(SpeculativeRigidbody _1, PixelCollider _2, SpeculativeRigidbody _3, PixelCollider _4) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)_3) && Object.op_Implicit((Object)(object)((BraveBehaviour)_3).aiActor) && Object.op_Implicit((Object)(object)_1) && Object.op_Implicit((Object)(object)((BraveBehaviour)_1).healthHaver)) { AIActor aiActor = ((BraveBehaviour)_3).aiActor; _1.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)_1.OnPreRigidbodyCollision, (Delegate?)(object)onPreRigidbodyCollisionDelegate); if (aiActor.IsNormalEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)aiActor).healthHaver)) { ((BraveBehaviour)aiActor).healthHaver.ApplyDamage(((BraveBehaviour)_1).healthHaver.GetMaxHealth() * 1.25f, _1.Velocity, "Pinball", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } } public static ItemTemplate template; public static VFXPool Impact; public static string ImpactSFX; public static int ID; public float Mult; public static Projectile BaseProjectile; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("concussionguillotine_tier1_alt_module"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Concussion Guillotine " + defaultModule.ReturnTierLabel(); defaultModule.AdditionalWeightMultiplier = 0.65f; defaultModule.LabelDescription = "Deal 3x (" + StaticColorHexes.AddColorToLabelString("+1.5x") + ") damage to stunned enemies,\nand launch them with massive force when slain."; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 6; ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown if (Random.value > 0.01f) { return; } SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody _1, PixelCollider _2, SpeculativeRigidbody _3, PixelCollider _4) { if ((Object)(object)((BraveBehaviour)_3).aiActor != (Object)null && (Object)(object)((BraveBehaviour)((BraveBehaviour)_3).aiActor).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)this).projectile != (Object)null && ((BraveBehaviour)((BraveBehaviour)_3).aiActor).behaviorSpeculator.IsStunned) { float damage = ((BraveBehaviour)this).projectile.baseData.damage; ProjectileData baseData = p.baseData; baseData.damage *= 5f; ((MonoBehaviour)p).StartCoroutine(FrameDelay(((BraveBehaviour)this).projectile, damage)); } }); p.AppliedStunDuration = 1f; p.StunApplyChance = 0.01f; p.AppliesStun = true; p.OnWillKillEnemy = delegate(Projectile p1, SpeculativeRigidbody spec) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown if ((Object)(object)((BraveBehaviour)spec).aiActor != (Object)null && (Object)(object)((BraveBehaviour)((BraveBehaviour)spec).aiActor).behaviorSpeculator != (Object)null && ((BraveBehaviour)((BraveBehaviour)spec).aiActor).behaviorSpeculator.IsStunned) { spec.AddCollisionLayerOverride(CollisionMask.LayerToMask((CollisionLayer)2)); object obj = <>c.<>9__2_2; if (obj == null) { OnPreRigidbodyCollisionDelegate val = delegate { }; <>c.<>9__2_2 = val; obj = (object)val; } OnPreRigidbodyCollisionDelegate onPreRigidbodyCollisionDelegate = (OnPreRigidbodyCollisionDelegate)obj; onPreRigidbodyCollisionDelegate = (OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody _1, PixelCollider _2, SpeculativeRigidbody _3, PixelCollider _4) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)_3) && Object.op_Implicit((Object)(object)((BraveBehaviour)_3).aiActor) && Object.op_Implicit((Object)(object)_1) && Object.op_Implicit((Object)(object)((BraveBehaviour)_1).healthHaver)) { AIActor aiActor = ((BraveBehaviour)_3).aiActor; _1.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)_1.OnPreRigidbodyCollision, (Delegate?)(object)onPreRigidbodyCollisionDelegate); if (aiActor.IsNormalEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)aiActor).healthHaver)) { ((BraveBehaviour)aiActor).healthHaver.ApplyDamage(((BraveBehaviour)_1).healthHaver.GetMaxHealth() * 1.25f, _1.Velocity, "Pinball", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } }; spec.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)spec.OnPreRigidbodyCollision, (Delegate?)(object)onPreRigidbodyCollisionDelegate); ((BraveBehaviour)spec).knockbackDoer.ApplyKnockback(p1.LastVelocity, p1.baseData.force * 5f, false); } }; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPreEnemyHit = (Action)Delegate.Combine(modulePrinter.OnPreEnemyHit, new Action(OPC)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPreEnemyHit = (Action)Delegate.Remove(modulePrinter.OnPreEnemyHit, new Action(OPC)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { int num = ReturnStack(modulePrinter); Mult = 1.5f + (float)num * 1.5f; } public void OPC(ModulePrinterCore modulePrinterCore, PlayerController playerController, AIActor aIActor, Projectile projectile) { if ((Object)(object)aIActor != (Object)null && (Object)(object)((BraveBehaviour)aIActor).healthHaver != (Object)null && (Object)(object)projectile != (Object)null && ((BraveBehaviour)aIActor).behaviorSpeculator.IsStunned) { float damage = projectile.baseData.damage; ProjectileData baseData = projectile.baseData; baseData.damage *= Mult; ((MonoBehaviour)projectile).StartCoroutine(FrameDelay(projectile, damage)); } } public IEnumerator FrameDelay(Projectile p, float DmG) { VFXPool Ef = p.hitEffects.enemy; VFXPool deathEf = p.hitEffects.deathEnemy; p.hitEffects.enemy = Impact; p.hitEffects.deathEnemy = Impact; yield return null; p.baseData.damage = DmG; p.hitEffects.enemy = Ef; p.hitEffects.deathEnemy = deathEf; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { p.AppliedStunDuration = 1f; p.StunApplyChance = 0.01f; p.AppliesStun = true; p.OnWillKillEnemy = delegate(Projectile p1, SpeculativeRigidbody spec) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)spec).aiActor != (Object)null && (Object)(object)((BraveBehaviour)((BraveBehaviour)spec).aiActor).behaviorSpeculator != (Object)null && ((BraveBehaviour)((BraveBehaviour)spec).aiActor).behaviorSpeculator.IsStunned) { spec.AddCollisionLayerOverride(CollisionMask.LayerToMask((CollisionLayer)2)); spec.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)spec.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(HandleHitEnemyHitEnemy)); ((BraveBehaviour)spec).knockbackDoer.ApplyKnockback(p1.LastVelocity, p1.baseData.force * 5f, false); } }; } private void HandleHitEnemyHitEnemy(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)otherRigidbody) && Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).aiActor) && Object.op_Implicit((Object)(object)myRigidbody) && Object.op_Implicit((Object)(object)((BraveBehaviour)myRigidbody).healthHaver)) { AIActor aiActor = ((BraveBehaviour)otherRigidbody).aiActor; myRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)myRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(HandleHitEnemyHitEnemy)); if (aiActor.IsNormalEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)aiActor).healthHaver)) { ((BraveBehaviour)aiActor).healthHaver.ApplyDamage(((BraveBehaviour)myRigidbody).healthHaver.GetMaxHealth() * (Mult * 0.25f), myRigidbody.Velocity, "Pinball", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } static ConcussionGuillotine() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ConcussionGuillotine)); val.Name = "Concussion Guillotine"; val.Description = "Recoil Up"; val.LongDescription = "Deal 3x (+1.5x per stack) damage to stunned enemies, and launch them with massive force when slain."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("concussionguillotine_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; PickupObject byId = PickupObjectDatabase.GetById(539); Impact = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy; PickupObject byId2 = PickupObjectDatabase.GetById(539); ImpactSFX = ((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.chargeProjectiles[0].Projectile.enemyImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(541); BaseProjectile = ((Component)((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.chargeProjectiles[0].Projectile).GetComponent().BaseProjectile; } } public class ExplosiveEnergy : DefaultModule { public static ItemTemplate template; public static ExplosionData ExplosionData; public static int ID; public static GameObject specialEffect; public static void PostInit(PickupObject v) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("glitteringsparks_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Explosive Energy " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Projectiles explode up to 3 (" + StaticColorHexes.AddColorToLabelString("+1") + ")\ntimes after travelling a certain distance.\nProjectiles self-destruct after finishing all stocked explosions."; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AddModuleTag(BaseModuleTags.BASIC); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); PickupObject byId = PickupObjectDatabase.GetById(593); specialEffect = ((Component)((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]).GetComponent().explosionData.effect; ID = ((PickupObject)defaultModule).PickupObjectId; ExplosionData val = new ExplosionData(); val.breakSecretWalls = false; val.comprehensiveDelay = 0f; val.damage = 5f; val.damageRadius = 2.5f; val.damageToPlayer = 0f; val.debrisForce = 50f; val.doDamage = true; val.doDestroyProjectiles = false; val.doExplosionRing = false; val.doForce = false; val.doScreenShake = false; val.doStickyFriction = false; ref GameObject effect = ref val.effect; PickupObject byId2 = PickupObjectDatabase.GetById(593); effect = ((Component)((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]).GetComponent().explosionData.effect; val.explosionDelay = 0f; val.force = 10f; val.forcePreventSecretWallDamage = false; val.forceUseThisRadius = true; val.freezeEffect = null; val.freezeRadius = 0f; val.IsChandelierExplosion = false; val.isFreezeExplosion = false; val.playDefaultSFX = false; val.preventPlayerForce = false; val.pushRadius = 5f; val.secretWallsRadius = 1f; val.ignoreList = new List(); val.overrideRangeIndicatorEffect = null; ExplosionData = val; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (Random.value > 0.01f) { return; } int stack = 1; TravelledDistanceComponent travelledDistanceComponent = ((Component)p).gameObject.AddComponent(); travelledDistanceComponent.DistanceToTravel = (float)stack * 4.5f + 2.25f; travelledDistanceComponent.TriggerAmount = 3; travelledDistanceComponent.OnTravelledDistance = (Action)Delegate.Combine(travelledDistanceComponent.OnTravelledDistance, (Action)delegate(Projectile proj, Vector2 h1, int h4) { //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_000c: Unknown result type (might be due to invalid IL or missing references) Exploder.Explode(Vector2.op_Implicit(h1), ExplosionData, Vector2.zero, (Action)null, true, (CoreDamageTypes)0, false); if (h4 == 2 + stack) { p.DieInAir(false, true, true, false); } }); } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int stack = ReturnStack(modulePrinterCore); TravelledDistanceComponent travelledDistanceComponent = ((Component)p).gameObject.AddComponent(); travelledDistanceComponent.DistanceToTravel = (float)stack * 4.5f + 2.25f; travelledDistanceComponent.TriggerAmount = 2 + stack; travelledDistanceComponent.OnTravelledDistance = (Action)Delegate.Combine(travelledDistanceComponent.OnTravelledDistance, (Action)delegate(Projectile proj, Vector2 h1, int h4) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) ExplosionData.damage = proj.baseData.damage * 0.1f + 3f; Exploder.Explode(Vector2.op_Implicit(h1), ExplosionData, Vector2.zero, (Action)null, true, (CoreDamageTypes)0, false); if (h4 == 2 + stack) { p.DieInAir(false, true, true, false); } }); } static ExplosiveEnergy() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ExplosiveEnergy)); val.Name = "Explosive Energy"; val.Description = "Burstin' makes me feel good"; val.LongDescription = "Projectiles explode up to 3 (+1 per stack) times after travelling a certain distance. Projectiles self-destruct after finishing all stocked explosions."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("glitteringsparks_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class SupplyDrop : DefaultModule { public static ItemTemplate template; public static int ID; public bool B = false; public static void PostInit(PickupObject v) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("supplydrop_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.45f; defaultModule.LabelName = "Supply Drop " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants 1 Key, 4 Scrap and 20 Casings on pickup.\nAir drops 1 (" + StaticColorHexes.AddColorToLabelString("+1") + ") random pickup every floor."; defaultModule.EnergyConsumption = 1f; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.OverrideScrapCost = 12; defaultModule.IsUncraftable = true; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnNewFloorStarted = (Action)Delegate.Combine(modulePrinter.OnNewFloorStarted, new Action(ONFS)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONFS)); } public void ONFS(ModulePrinterCore modulePrinter, PlayerController player) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)player).StartCoroutine(W(modulePrinter, player, ((BraveBehaviour)player).sprite.WorldCenter)); } public IEnumerator W(ModulePrinterCore modulePrinter, PlayerController player, Vector2 position) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(1f); position = ((BraveBehaviour)player).sprite.WorldCenter; float e = 0f; for (int i = 0; i < ReturnStack(modulePrinter); i++) { while (e < 0.5f) { e += BraveTime.DeltaTime; yield return null; } e = 0f; SpawnObject(player, position + new Vector2(0f, -7f) + Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0.5f, 1.75f))); } B = true; } public void SpawnObject(PlayerController playerController, Vector2 position) { //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_005c: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00b2: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) switch (Random.Range(0, 10)) { case 0: SpawnCrate(Scrap.Scrap_ID, playerController, Vector2.op_Implicit(position)); break; case 1: SpawnCrate(Scrap.Scrap_ID, playerController, Vector2.op_Implicit(position)); break; case 2: SpawnCrate(Scrap.Scrap_ID, playerController, Vector2.op_Implicit(position)); break; case 3: SpawnCrate(Scrap.Scrap_ID, playerController, Vector2.op_Implicit(position)); break; case 4: SpawnCrate(67, playerController, Vector2.op_Implicit(position)); break; case 5: SpawnCrate(67, playerController, Vector2.op_Implicit(position)); break; case 6: SpawnCrate(224, playerController, Vector2.op_Implicit(position)); break; case 7: SpawnCrate(224, playerController, Vector2.op_Implicit(position)); break; case 8: SpawnCrate(224, playerController, Vector2.op_Implicit(position)); break; case 9: if ((double)Random.value < 0.1) { SpawnCrate(CraftingCore.CraftingCoreID, playerController, Vector2.op_Implicit(position)); } else { SpawnCrate(Scrap.Scrap_ID, playerController, Vector2.op_Implicit(position)); } break; } } private static void SpawnCrate(int item, PlayerController p, Vector3 position) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) GameObject val = (GameObject)BraveResources.Load("EmergencyCrate", ".prefab"); GameObject val2 = Object.Instantiate(val); EmergencyCrateController component = val2.GetComponent(); SimplerCrateBehaviour simplerCrateBehaviour = SimplerCrateBehaviour.TurnIntoSimplerCrate(component); simplerCrateBehaviour.LootID = item; simplerCrateBehaviour.Trigger(new Vector3(-5f, -5f, -5f), position + new Vector3(15f, 15f, 15f), p.CurrentRoom); } public override void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { AkSoundEngine.PostEvent("Play_OBJ_ammo_pickup_01", ((Component)player).gameObject); GlobalConsumableStorage.AddConsumableAmount("Scrap", 5); PlayerConsumables carriedConsumables = player.carriedConsumables; carriedConsumables.KeyBullets += 2; AkSoundEngine.PostEvent("Play_OBJ_coin_large_01", ((Component)player).gameObject); PlayerConsumables carriedConsumables2 = player.carriedConsumables; carriedConsumables2.Currency += 20; } static SupplyDrop() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(SupplyDrop)); val.Name = "Supply Drop"; val.Description = "Free Loot!"; val.LongDescription = "Grants 1 Key, 4 Scrap and 20 Casings on pickup. Air drops 1 (+1 per stack) random pickup every floor."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("supplydrop_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MomentumNullifier : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("momentumnullifier_t2_alt_module"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Momentum Nullifier " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Converts 33% (" + StaticColorHexes.AddColorToLabelString("+33%") + ") of your projectiles force into damage and chance to stun.\nNullifies all projectile knockback after."; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.OverrideScrapCost = 9; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(OPPOFD)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(OPPOFD)); } public void OPPOFD(ModulePrinterCore modulePrinterCore, Projectile projectile, float a, PlayerController playerController, bool b) { float num = projectile.baseData.force * (0.333f * (float)ReturnStack(modulePrinterCore)); ProjectileData baseData = projectile.baseData; baseData.damage += num; projectile.baseData.force = 0f; projectile.AppliesStun = true; projectile.AppliedStunDuration = (projectile.StunApplyChance = num * 0.02f) * 0.333f; } static MomentumNullifier() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MomentumNullifier)); val.Name = "Momentum Nullifier"; val.Description = "Nope"; val.LongDescription = "Converts 33% (+33% per stack) of your projectiles force into damage and chance to stun.\nNullifies all projectile knockback after."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("momentumnullifier_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MissileSalvo : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("missilesalvo_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Missile Salvo " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "20% (" + StaticColorHexes.AddColorToLabelString("+20%") + ") chance to fire a missile when firing your gun.\nChances above 100% are rolled multiple times."; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.OnGunFired = (Action)(object)Delegate.Combine((Delegate?)(object)modularGunController.OnGunFired, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.OnGunFired = (Action)(object)Delegate.Remove((Delegate?)(object)modularGunController.OnGunFired, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); float num2 = 0.2f * (float)num; float num3 = num2; for (int i = 0; (float)i < num3; i++) { if (Random.value < num2) { float accuracy = modulePrinterCore.ModularGunController.GetAccuracy(20f); Projectile component = SpawnManager.SpawnProjectile(((Component)Guns.Yari_Launcher.DefaultModule.projectiles[0]).gameObject, g.barrelOffset.position, Quaternion.Euler(0f, 0f, g.CurrentAngle + accuracy), true).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { AkSoundEngine.PostEvent("Play_BOSS_RatMech_Missile_01", ((Component)player).gameObject); component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; component.baseData.damage = 15f; player.DoPostProcessProjectile(component); } } num2 -= 1f; } } static MissileSalvo() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MissileSalvo)); val.Name = "Missile Salvo"; val.Description = "Rocket Man"; val.LongDescription = "20% (+20% per stack) chance to fire a missile when firing your gun.\nChances above 100% are rolled multiple times."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("missilesalvo_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class WarHorn : DefaultModule { public static ItemTemplate template; public static int ID; public static Projectile SuperBeamProjectile; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("warhorn_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "War Horn " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Gain a dramatic entrance every combat room.\n(" + StaticColorHexes.AddColorToLabelString("+Extended Drama", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.7f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.IsUncraftable = true; defaultModule.EnergyConsumption = 2f; defaultModule.AddToGlobalStorage(); AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid(EnemyGUIDs.HM_Absolution_GUID); Component[] componentsInChildren = ((Component)orLoadByGuid).GetComponentsInChildren(typeof(Component)); foreach (Component val in componentsInChildren) { BossFinalRogueLaserGun val2 = (BossFinalRogueLaserGun)(object)((val is BossFinalRogueLaserGun) ? val : null); if (val2 != null && (Object)(object)val2.beamProjectile != (Object)null) { SuperBeamProjectile = val2.beamProjectile; } } ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Combine(modulePrinter.OnEnteredCombat, new Action(ORE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Remove(modulePrinter.OnEnteredCombat, new Action(ORE)); } public void ORE(ModulePrinterCore modulePrinter, RoomHandler room, PlayerController player) { ((MonoBehaviour)player).StartCoroutine(FireBeam(SuperBeamProjectile, player, 2f + 2f * (float)ReturnStack(Stored_Core), room)); ((MonoBehaviour)player).StartCoroutine(FireBeam(SuperBeamProjectile, player, 2f + 2f * (float)ReturnStack(Stored_Core), room, Cosmetic: true)); } public IEnumerator FireBeam(Projectile projectile, PlayerController player, float Duration, RoomHandler roomHandler, bool Cosmetic = false) { if (!Cosmetic) { AkSoundEngine.PostEvent("Play_ModularHornofWar", ((Component)player).gameObject); } yield return (object)new WaitForSeconds(1f); GameObject beamObject = Object.Instantiate(((Component)projectile).gameObject); BasicBeamController m_laserBeam = beamObject.GetComponent(); ((BeamController)m_laserBeam).Owner = (GameActor)(object)player; ((BeamController)m_laserBeam).HitsPlayers = false; ((BeamController)m_laserBeam).HitsEnemies = true; m_laserBeam.collisionLength = 100; m_laserBeam.collisionWidth = 6; m_laserBeam.collisionRadius = 6f; m_laserBeam.collisionType = (BeamCollisionType)(Cosmetic ? 1 : 0); ((BraveBehaviour)m_laserBeam).projectile.ImmuneToBlanks = true; m_laserBeam.OverrideHitChecks = delegate(SpeculativeRigidbody hitRigidbody, Vector2 dirVec) { //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) HealthHaver val = ((!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())) { BounceProjModifier component = ((Component)hitRigidbody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.numberOfBounces = 0; } ((BraveBehaviour)hitRigidbody).projectile.DieInAir(false, true, true, false); } if ((Object)(object)val != (Object)null) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)val).aiActor)) { if (((BraveBehaviour)val).aiActor.parentRoom != null && ((BraveBehaviour)val).aiActor.parentRoom == roomHandler) { Projectile val2 = projectile; val.ApplyDamage(200f * Time.deltaTime, dirVec, "Death", val2.damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); } } else { Projectile val3 = projectile; val.ApplyDamage(200f * Time.deltaTime, dirVec, "Death", val3.damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); } } if (Object.op_Implicit((Object)(object)((BraveBehaviour)hitRigidbody).majorBreakable)) { ((BraveBehaviour)hitRigidbody).majorBreakable.ApplyDamage(100f * BraveTime.DeltaTime, dirVec, false, false, false); } }; m_laserBeam.ContinueBeamArtToWall = true; ((BraveBehaviour)m_laserBeam).projectile.baseData.damage = 100f; ((BraveBehaviour)m_laserBeam).projectile.collidesWithEnemies = true; float t = 0f; while ((Object)(object)m_laserBeam != (Object)null) { float clampedAngle2 = BraveMathCollege.ClampAngle360(((GameActor)player).CurrentGun.CurrentAngle); Vector2 dirVec3 = Vector2.op_Implicit(new Vector3(Mathf.Cos(clampedAngle2 * ((float)Math.PI / 180f)), Mathf.Sin(clampedAngle2 * ((float)Math.PI / 180f))) * 10f); ((BeamController)m_laserBeam).Direction = dirVec3; ((BeamController)m_laserBeam).Origin = Vector2.op_Implicit(((BraveBehaviour)((GameActor)player).CurrentGun).transform.position); t += Time.deltaTime; ((BeamController)m_laserBeam).LateUpdatePosition(((BraveBehaviour)((GameActor)player).CurrentGun).transform.position); if (t > Duration) { break; } yield return null; } if ((Object)(object)m_laserBeam != (Object)null) { ((BeamController)m_laserBeam).CeaseAttack(); } if (Object.op_Implicit((Object)(object)m_laserBeam)) { m_laserBeam.SelfUpdate = false; while (Object.op_Implicit((Object)(object)m_laserBeam)) { ((BeamController)m_laserBeam).LateUpdatePosition(((BraveBehaviour)((GameActor)player).CurrentGun).transform.position); ((BeamController)m_laserBeam).Origin = Vector2.op_Implicit(((BraveBehaviour)((GameActor)player).CurrentGun).transform.position); float clampedAngle = BraveMathCollege.ClampAngle360(((GameActor)player).CurrentGun.CurrentAngle); Vector2 dirVec2 = Vector2.op_Implicit(new Vector3(Mathf.Cos(clampedAngle * ((float)Math.PI / 180f)), Mathf.Sin(clampedAngle * ((float)Math.PI / 180f))) * 10f); ((BeamController)m_laserBeam).Direction = dirVec2; yield return null; } } } static WarHorn() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(WarHorn)); val.Name = "War Horn"; val.Description = "Trumpet"; val.LongDescription = "Gain a dramatic entrance every combat room. (+Extended Drama per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("warhorn_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class FocusedRetaliation : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject FocusVFX; public static ProjectileImpactVFXPool HitEffect; public GameObject extantVFX; private float T = 0f; private int Hits = 0; public static void PostInit(PickupObject v) { //IL_00bd: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("focusedretaliation_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Focused Retaliation " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Enemies that damage you are Marked,\ntaking 2x (" + StaticColorHexes.AddColorToLabelString("+1x") + ") damage and have their damage caps ignored.\nTaking damage also grants temporary movement speed,\nreload speed and a permanent 5% (" + StaticColorHexes.AddColorToLabelString("+5%") + ") accuracy and clip size boost."; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.RETALIATION); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AdditionalWeightMultiplier = 0.5f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -1.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 1.875f); defaultModule.IsUncraftable = true; defaultModule.EnergyConsumption = 1f; defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("fosucVFX_009")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Generic_VFX_Animation; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); FocusVFX = val; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Combine(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnDamaged = (Action)Delegate.Combine(modulePrinter.OnDamaged, new Action(OD)); gunStatModifier = new ModuleGunStatModifier { Reload_Process = PFR, Accuracy_Process = ProcessAccuracyRate, ClipSize_Process = ProcessClipSize }; modulePrinter.ProcessGunStatModifier(gunStatModifier); PlayerController owner = ((PassiveItem)modulePrinter).Owner; owner.OnHitByProjectile = (Action)Delegate.Combine(owner.OnHitByProjectile, new Action(OHBP)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Combine(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); modulePrinter.OnPreEnemyHit = (Action)Delegate.Combine(modulePrinter.OnPreEnemyHit, new Action(OPEH)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnDamaged = (Action)Delegate.Remove(modulePrinter.OnDamaged, new Action(OD)); modulePrinter.RemoveGunStatModifier(gunStatModifier); PlayerController owner = ((PassiveItem)modulePrinter).Owner; owner.OnHitByProjectile = (Action)Delegate.Remove(owner.OnHitByProjectile, new Action(OHBP)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Remove(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); modulePrinter.OnPreEnemyHit = (Action)Delegate.Remove(modulePrinter.OnPreEnemyHit, new Action(OPEH)); } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip + (int)((float)clip * (0.05f * (float)Hits) * (float)ReturnStack(modulePrinterCore)); } public float ProcessAccuracyRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.05f * (float)num * (float)Hits)); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { if (T > 0f) { return f / 3f; } return f; } public float ModifySpeed(Vector2 currentVelocity, ModulePrinterCore core, PlayerController player) { return (T > 0f) ? 0.3f : 0f; } public void OD(ModulePrinterCore modulePrinter, PlayerController player) { //IL_003a: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) Hits++; int num = ReturnStack(modulePrinter); T = 15 * num; AkSoundEngine.PostEvent("Play_BOSS_cyborg_eagle_01", ((Component)player).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)player).sprite.WorldCenter, 0.2f * ConfigManager.DistortionWaveMultiplier, 0.25f * ConfigManager.DistortionWaveMultiplier, 7f, 0.75f); if (!((Object)(object)extantVFX != (Object)null)) { extantVFX = ((GameActor)(object)player).SmarterPlayEffectOnActor(FocusVFX, new Vector3(0f, 0.625f)); extantVFX.GetComponent().Play("Focus_Start"); extantVFX.transform.localScale = Vector3.one / 2f; } } public void OPEH(ModulePrinterCore modulePrinter, PlayerController player, AIActor aIActor, Projectile projectile) { if ((Object)(object)aIActor != (Object)null && ((GameActor)aIActor).GetEffect("mdl:marked") != null) { float damage = projectile.baseData.damage; ProjectileData baseData = projectile.baseData; baseData.damage *= (float)(1 + ReturnStack(modulePrinter)); ((MonoBehaviour)projectile).StartCoroutine(FrameDelay(projectile, damage)); } } public IEnumerator FrameDelay(Projectile p, float DmG) { bool ig = p.ignoreDamageCaps; ProjectileImpactVFXPool Ef = p.hitEffects; p.hitEffects = HitEffect; p.ignoreDamageCaps = true; yield return null; p.baseData.damage = DmG; p.hitEffects = Ef; p.ignoreDamageCaps = ig; } public void OFU(ModulePrinterCore modulePrinterCore, PlayerController player) { if (T > 0f) { T -= BraveTime.DeltaTime; } if (T <= 0f && (Object)(object)extantVFX != (Object)null) { extantVFX.GetComponent().PlayAndDestroyObject("Focus_End", (Action)null); extantVFX = null; } } public void OHBP(Projectile projectile, PlayerController playerController) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile.Owner != (Object)null) { GameActor owner = projectile.Owner; AIActor val = (AIActor)(object)((owner is AIActor) ? owner : null); if (val != null) { projectile.Owner.ApplyEffect((GameActorEffect)(object)new MarkedEffect { effectIdentifier = "mdl:marked", AffectsEnemies = true, resistanceType = (EffectResistanceType)0, duration = 10000f, AppliesTint = true, AppliesDeathTint = true, OverheadVFX = null, PlaysVFXOnActor = false, AffectsPlayers = false, stackMode = (EffectStackingMode)0 }, 1f, (Projectile)null); ((GameActor)val).PlayEffectOnActor(MarkedEffect.MarkedVFX, new Vector3(0f, 1.25f), true, false, false); } } } public override void MidGameSerialize(List data) { base.MidGameSerialize(data); data.Add(Hits); } public override void MidGameDeserialize(List data) { base.MidGameSerialize(data); Hits = (int)data[0]; } static FocusedRetaliation() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(FocusedRetaliation)); val.Name = "Focused Retaliation"; val.Description = "(o)"; val.LongDescription = "Enemies that damage you are Marked, taking 2x (+1x per stack) damage and have their damage caps ignored. Taking damage also grants temporary movement speed, reload speed and a permanent 5% (+5% per stack) accuracy and clip size boost."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("focusedretaliation_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; HitEffect = Guns.Fightsabre.DefaultModule.projectiles[0].hitEffects; } } public class ChaoticTransportation : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("chaotictransportation_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Chaotic Transportation " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Adds 1 (" + StaticColorHexes.AddColorToLabelString("+1") + ") Bounces.\nIncreases fire rate by 25% (" + StaticColorHexes.AddColorToLabelString("+25% hyperbolically") + ").\nProjectiles can randomly teleport to anywhere in the room 3 (" + StaticColorHexes.AddColorToLabelString("+3") + ") times."; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 7; defaultModule.EnergyConsumption = 1f; defaultModule.AddToGlobalStorage(); EncounterDatabase.GetEntry(((BraveBehaviour)defaultModule).encounterTrackable.EncounterGuid).usesPurpleNotifications = true; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.005f)) { Transport orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.numberOfBounces++; orAddComponent.AmountOfTeleports = 3; ProjectileData baseData = p.baseData; baseData.speed *= 1.1f; p.UpdateSpeed(); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "Transportation", FireRate_Process = PFR, ChargeSpeed_Process = PFR }; modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { Transport orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.numberOfBounces += ReturnStack(modulePrinterCore); orAddComponent.AmountOfTeleports = 3 * ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.speed *= 1.1f; p.UpdateSpeed(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip + modularGunController.Base_Clip_Size / 3 * modulePrinterCore.ReturnStack(LabelName); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinter); return f - (f - f / (1f + 0.25f * (float)num)); } static ChaoticTransportation() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ChaoticTransportation)); val.Name = "Chaotic Transportation"; val.Description = "Where Am I?"; val.LongDescription = "Adds 1 (+1 per stack) Bounces. Increases fire rate by 25% (+25% per stack hyperbolically). Projectiles will randomly teleport to anywhere in the room 3 (+3) times."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("chaotictransportation_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class Transport : MonoBehaviour { public float E = 0f; public float newRNG; public int AmountOfTeleports = 1; private Projectile self; private void Start() { self = ((Component)this).GetComponent(); newRNG = Random.value + 0.25f; } public void Update() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)self == (Object)null) && AmountOfTeleports != 0) { if (E < newRNG) { E += BraveTime.DeltaTime; return; } AmountOfTeleports--; E = 0f; newRNG = Random.value + 0.15f; VFXStorage.SpiratTeleportVFX.SpawnAtPosition(((Component)this).transform.position, 0f, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)null, false, (SpawnMethod)null, (tk2dBaseSprite)null, false); IntVector2 randomAvailableCellDumb = Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position).GetRandomAvailableCellDumb(); Vector3 val = ((IntVector2)(ref randomAvailableCellDumb)).ToCenterVector3(0f); VFXStorage.SpiratTeleportVFX.SpawnAtPosition(val, 0f, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)null, false, (SpawnMethod)null, (tk2dBaseSprite)null, false); ((BraveBehaviour)self).transform.position = val; ((BraveBehaviour)self).specRigidbody.Reinitialize(); self.Direction = ProjectileUtility.GetVectorToNearestEnemy(self, true, (ActiveEnemyType)1, (List)null, (Func)null) - TransformExtensions.PositionVector2(((BraveBehaviour)self).transform); self.ResetDistance(); } } public void Redirect(float angle) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)self == (Object)null)) { self.SendInDirection(Toolbox.GetUnitOnCircle(angle, 1f), true, true); } } private void OnDestroy() { } } public class BubbleUp : DefaultModule { public static ItemTemplate template; public static GameObject Bubble; public static ExplosionData Data; public static int ID; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("bubbleup_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Bubble Up " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Fire Rate by 25% (" + StaticColorHexes.AddColorToLabelString("+25% hyperbolically") + ").\nProjectiles now stick to terrain and enemies,\nexpanding into large bubbles and bursting,\ndoing massive knockback. (" + StaticColorHexes.AddColorToLabelString("+Burst Force and Damage") + ")."; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AddModuleTag(BaseModuleTags.STICKY); defaultModule.AddToGlobalStorage(); defaultModule.stickyContext = new StickyProjectileModifier.StickyContext { CanStickToTerrain = true, CanStickEnemies = true }; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; Data = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); Data.effect = null; Data.force = 150f; Data.pushRadius = 3.5f; Data.forceUseThisRadius = true; Data.damage = 1f; GameObject val = new GameObject("Bubble"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 1f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 1f); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("momentumplus_004")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Projectile_Animation; Bubble = val; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.02f)) { StickyProjectileModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.stickyContexts.Add(new StickyProjectileModifier.StickyContext { CanStickToTerrain = true, CanStickEnemies = true }); orAddComponent.OnStick = (Action)Delegate.Combine(orAddComponent.OnStick, new Action(H_S)); orAddComponent.OnStickyDestroyed = (Action)Delegate.Combine(orAddComponent.OnStickyDestroyed, new Action(H2)); } } public void H_S(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { ((MonoBehaviour)comp).StartCoroutine(DoTimer(stick, 3f)); } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "Stuck", FireRate_Process = PFR }; stickyContext = new StickyProjectileModifier.StickyContext { CanStickToTerrain = true, CanStickEnemies = true }; modulePrinter.stickyContexts.Add(stickyContext); modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.OnProjectileStickAction = (Action)Delegate.Combine(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Combine(modulePrinter.OnStickyDestroyAction, new Action(H2)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void H(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { if (Object.op_Implicit((Object)(object)sprite)) { ((BraveBehaviour)sprite).renderer.enabled = false; } GameObject val = Object.Instantiate(Bubble, stick.transform); val.transform.Rotate(0f, 0f, Random.value * 360f); val.GetComponentInChildren().PlayAndDisableObject("bubble", (GameObject)null); ((MonoBehaviour)comp).StartCoroutine(DoTimer(stick, 3f)); } public IEnumerator DoTimer(GameObject sticky, float DetTime = 5f) { AkSoundEngine.PostEvent("Play_ENM_lizard_bubble_01", sticky.gameObject); AkSoundEngine.PostEvent("Play_ENM_lizard_bubble_01", sticky.gameObject); AkSoundEngine.PostEvent("Play_ENM_lizard_bubble_01", sticky.gameObject); float e = 0f; while (e < DetTime) { if ((Object)(object)sticky == (Object)null) { yield break; } e += BraveTime.DeltaTime; yield return null; } if (!((Object)(object)sticky == (Object)null)) { Object.Destroy((Object)(object)sticky); } } public void H2(GameObject stick, StickyProjectileModifier comp, PlayerController p) { //IL_0061: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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) int num = 1; if ((Object)(object)Stored_Core != (Object)null) { num = Stack(); } ExplosionData val = StaticExplosionDatas.CopyFields(Data); val.damage = 4f * (float)num; val.force = 75 * num; val.ignoreList = new List { ((BraveBehaviour)p).specRigidbody }; Exploder.Explode(stick.transform.position, val, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false); AkSoundEngine.PostEvent("Play_BOSS_Rat_Cheese_Burst_01", stick.gameObject); GameObject val2 = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val3 = Object.Instantiate(val2.gameObject, stick.transform.position, Quaternion.identity); val3.transform.localScale = Vector3.one * 0.3f; Object.Destroy((Object)(object)val3, 2f); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { if (modularGunController.statMods.Contains(gunStatModifier)) { modularGunController.statMods.Remove(gunStatModifier); } modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.stickyContexts.Remove(stickyContext); modulePrinter.OnProjectileStickAction = (Action)Delegate.Remove(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Remove(modulePrinter.OnStickyDestroyAction, new Action(H2)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.speed *= 0.7f; ProjectileData baseData2 = p.baseData; baseData2.force *= 0.5f; p.UpdateSpeed(); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinter); return f - (f - f / (1f + 0.25f * (float)num)); } static BubbleUp() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BubbleUp)); val.Name = "Bubble Up"; val.Description = "Pop!"; val.LongDescription = "Increases Fire Rate by 25% (+25% hyperbolically per stack). Projectiles now stick to terrain and enemies, expanding into large bubbles and bursting, doing massive knockback. (+Burst Force and Damage per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("bubbleup_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class CryogenicVenting : DefaultModule { public static ItemTemplate template; public static ExplosionData cryoBurst; public static int ID; public static void PostInit(PickupObject v) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("cryogenicvents_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Cryogenic Venting " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Passively freeze enemies near you. (" + StaticColorHexes.AddColorToLabelString("+Freeze Power and Radius", StaticColorHexes.Light_Orange_Hex) + ").\nFrozen enemies shatter into freezing projectiles when killed. (" + StaticColorHexes.AddColorToLabelString("+Cold Strength", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.EnergyConsumption = 2f; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; cryoBurst = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); cryoBurst.damageToPlayer = 0f; cryoBurst.damage = 10f; GameActorFreezeEffect val = new GameActorFreezeEffect(); ((GameActorEffect)val).AffectsEnemies = ((GameActorEffect)DebuffStatics.frostBulletsEffect).AffectsEnemies; ((GameActorEffect)val).AffectsPlayers = ((GameActorEffect)DebuffStatics.frostBulletsEffect).AffectsPlayers; val.FreezeAmount = DebuffStatics.frostBulletsEffect.FreezeAmount; val.FreezeCrystals = DebuffStatics.frostBulletsEffect.FreezeCrystals; ((GameActorEffect)val).AppliesDeathTint = ((GameActorEffect)DebuffStatics.frostBulletsEffect).AppliesDeathTint; ((GameActorEffect)val).AppliesOutlineTint = ((GameActorEffect)DebuffStatics.frostBulletsEffect).AppliesOutlineTint; ((GameActorEffect)val).AppliesTint = ((GameActorEffect)DebuffStatics.frostBulletsEffect).AppliesTint; ((GameActorEffect)val).PlaysVFXOnActor = ((GameActorEffect)DebuffStatics.frostBulletsEffect).PlaysVFXOnActor; val.debrisAngleVariance = DebuffStatics.frostBulletsEffect.debrisAngleVariance; val.FreezeAmount = 100f; val.crystalNum = DebuffStatics.frostBulletsEffect.crystalNum * 3; val.crystalVariation = DebuffStatics.frostBulletsEffect.crystalVariation * 3f; ((GameActorEffect)val).DeathTintColor = ((GameActorEffect)DebuffStatics.frostBulletsEffect).DeathTintColor; val.debrisMaxForce = DebuffStatics.frostBulletsEffect.debrisMaxForce; val.debrisMinForce = DebuffStatics.frostBulletsEffect.debrisMinForce; ((GameActorEffect)val).duration = ((GameActorEffect)DebuffStatics.frostBulletsEffect).duration; ((GameActorEffect)val).effectIdentifier = ((GameActorEffect)DebuffStatics.frostBulletsEffect).effectIdentifier + "Super"; ((GameActorEffect)val).resistanceType = ((GameActorEffect)DebuffStatics.frostBulletsEffect).resistanceType; val.UnfreezeDamagePercent = DebuffStatics.frostBulletsEffect.UnfreezeDamagePercent; val.vfxExplosion = DebuffStatics.frostBulletsEffect.vfxExplosion; ((GameActorEffect)val).stackMode = ((GameActorEffect)DebuffStatics.frostBulletsEffect).stackMode; ((GameActorEffect)val).maxStackedDuration = ((GameActorEffect)DebuffStatics.frostBulletsEffect).maxStackedDuration; ((GameActorEffect)val).TintColor = ((GameActorEffect)DebuffStatics.frostBulletsEffect).TintColor; cryoBurst.freezeEffect = val; cryoBurst.isFreezeExplosion = true; cryoBurst.freezeRadius = 4f; cryoBurst.playDefaultSFX = false; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Combine(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); } public void OKE(ModulePrinterCore printer, PlayerController player, AIActor enemy) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) if (!((GameActor)enemy).IsFrozen) { return; } GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one; Object.Destroy((Object)(object)val2, 2f); Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), 25f, 3f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), 25f, 3f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), 3f); cryoBurst.freezeRadius = 5 + ReturnStack(printer); cryoBurst.damageRadius = 7 + ReturnStack(printer); cryoBurst.damage = 10 + 5 * ReturnStack(printer); Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), cryoBurst, ((BraveBehaviour)enemy).sprite.WorldCenter, (Action)null, true, (CoreDamageTypes)0, false); float num = BraveUtility.RandomAngle(); int num2 = 3 + 3 * ReturnStack(printer); for (int i = 0; i < num2; i++) { PickupObject byId = PickupObjectDatabase.GetById(223); GameObject val3 = SpawnManager.SpawnProjectile(((Component)((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]).gameObject, Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), Quaternion.Euler(0f, 0f, (float)(360 / num2 * i) + num), true); Projectile component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { component.baseData.damage = 5f; component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; component.baseData.speed = 30f; player.DoPostProcessProjectile(component); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)player).gameObject); orAddComponent.numberOfBounces += 3; orAddComponent.damageMultiplierOnBounce = 1.25f; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)player).gameObject); orAddComponent2.penetration++; } } } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) if (player.CurrentRoom == null) { return; } List activeEnemies = player.CurrentRoom.GetActiveEnemies((ActiveEnemyType)1); float num = ReturnRange(modulePrinter) + 0.25f; if ((double)Random.value < 0.075) { Vector2 val = ((BraveBehaviour)player).sprite.WorldCenter + new Vector2(Random.Range(num, 0f - num), Random.Range(num, 0f - num)); GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(val), Vector2.op_Implicit(val), Vector3.down, 0f, 0.5f, (float?)0.1f, (float?)4f, (Color?)Color.cyan, (SparksType)6); } if (activeEnemies == null || activeEnemies.Count == 0) { return; } foreach (AIActor item in activeEnemies) { if (Object.op_Implicit((Object)(object)item) && Vector2.Distance(((BraveBehaviour)item).sprite.WorldCenter, ((BraveBehaviour)player).sprite.WorldCenter) < num) { ((GameActor)item).ApplyEffect((GameActorEffect)(object)DebuffStatics.frostBulletsEffect, (25f + 2f * (float)ReturnStack(modulePrinter)) * Time.deltaTime, (Projectile)null); } } } public float ReturnRange(ModulePrinterCore core) { return 3f + (float)ReturnStack(core); } static CryogenicVenting() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CryogenicVenting)); val.Name = "Cryogenic Venting"; val.Description = "Heart Of Cold"; val.LongDescription = "Passively freeze enemies near you. (+Freeze Power and Radius per stack).\nFrozen enemies shatter into freezing projectiles when killed. (+Cold Strength per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("cryogenicvents_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class EternalWrath : DefaultModule { public static ItemTemplate template; public static int ID; public int Revives = 0; public static void PostInit(PickupObject v) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("eternalwrath_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Eternal Wrath " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Cheat Death Once (" + StaticColorHexes.AddColorToLabelString("+1 Revive") + ").\nCheating death grants " + StaticColorHexes.AddColorToLabelString("permanent", StaticColorHexes.Green_Hex) + " stat boosts.\nModule is destroyed after cheating death."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.EnergyConsumption = 2f; defaultModule.OverrideScrapCost = 20; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { ((BraveBehaviour)player).healthHaver.OnPreDeath += CheatDeath; } private void CheatDeath(Vector2 finalDamageDirection) { if (Revives != 0) { Revives--; PlayerController owner = ((PassiveItem)Stored_Core).Owner; ((BraveBehaviour)owner).healthHaver.Armor = 2f; owner.ToggleGunRenderers(true, "non-death"); owner.ToggleHandRenderers(true, "non-death"); owner.CurrentInputState = (PlayerInputState)0; ((Behaviour)((BraveBehaviour)owner).spriteAnimator).enabled = true; Toolbox.ApplyStat(owner, (StatType)5, 0.125f, (ModifyMethod)0); Toolbox.ApplyStat(owner, (StatType)2, 0.9f, (ModifyMethod)1); Toolbox.ApplyStat(owner, (StatType)1, 0.1f, (ModifyMethod)0); Toolbox.ApplyStat(owner, (StatType)6, 0.1f, (ModifyMethod)0); Toolbox.ApplyStat(owner, (StatType)12, 1.2f, (ModifyMethod)1); Pixelator.Instance.DoFinalNonFadedLayer = true; owner.CurrentInputState = (PlayerInputState)1; GameManager.Instance.MainCameraController.SetManualControl(true, false); GameObjectExtensions.SetLayerRecursively(((Component)owner).gameObject, LayerMask.NameToLayer("Unfaded")); GameUIRoot.Instance.ForceClearReload(owner.PlayerIDX); GameUIRoot.Instance.notificationController.ForceHide(); GameManager.Instance.PauseRaw(false); GameManager.Instance.PreventPausing = true; ((MonoBehaviour)owner).StartCoroutine(DoResurrection(owner)); } } public IEnumerator DoResurrection(PlayerController player) { bool wasPitFalling = ((GameActor)player).IsFalling; Stored_Core.RemoveModule(this); Transform cameraTransform = ((BraveBehaviour)GameManager.Instance.MainCameraController).transform; Vector3 cameraStartPosition = cameraTransform.position; Vector3 cameraEndPosition = Vector2.op_Implicit(((GameActor)player).CenterPosition); GameManager.Instance.MainCameraController.OverridePosition = cameraStartPosition; float e2 = 0f; while (e2 < 0.75f) { if (GameManager.INVARIANT_DELTA_TIME == 0f) { e2 += 0.05f; } e2 += GameManager.INVARIANT_DELTA_TIME; float t = e2 / 0.5f; GameManager.Instance.MainCameraController.OverridePosition = Vector3.Lerp(cameraStartPosition, cameraEndPosition, t); ((BraveBehaviour)player).spriteAnimator.UpdateAnimation(GameManager.INVARIANT_DELTA_TIME); Pixelator.Instance.saturation = Mathf.Clamp01(1f - t); yield return null; } AkSoundEngine.PostEvent("Play_ENM_hammer_target_01", ((Component)player).gameObject); ModifiedDefaultLabelManager text = Toolbox.GenerateText(((BraveBehaviour)player).transform, new Vector2(-11f, 0f), 0f, StaticColorHexes.AddColorToLabelString("LAZARUS SYSTEM ONLINE", StaticColorHexes.Red_Color_Hex), new Color32((byte)0, (byte)0, (byte)0, (byte)0), Autotrigger: true, 20f); e2 = 0f; while (e2 < 1f) { if (GameManager.INVARIANT_DELTA_TIME == 0f) { e2 += 0.05f; } e2 += GameManager.INVARIANT_DELTA_TIME; bool enabled = e2 % 0.25f > 0.125f; ((dfControl)((DefaultLabelController)text).label).isVisible = enabled; yield return null; } GameManager.Instance.Unpause(); GameManager.Instance.PreventPausing = false; player.CurrentInputState = (PlayerInputState)0; player.IsVisible = true; player.ToggleGunRenderers(true, "death"); player.ToggleHandRenderers(true, "death"); player.ToggleAttachedRenderers(true); GameObjectExtensions.SetLayerRecursively(((Component)player).gameObject, LayerMask.NameToLayer("FG_Reflection")); GameManager.Instance.DungeonMusicController.ResetForNewFloor(GameManager.Instance.Dungeon); if (player.CurrentRoom != null) { GameManager.Instance.DungeonMusicController.NotifyEnteredNewRoom(player.CurrentRoom); } GameManager.Instance.ForceUnpause(); GameManager.Instance.PreventPausing = false; BraveTime.ClearMultiplier(((Component)GameManager.Instance).gameObject); if (wasPitFalling) { player.PitRespawn(Vector2.zero); } VFXStorage.MourningStarVFXController.SpawnMourningStar(((BraveBehaviour)player).sprite.WorldBottomCenter, 0.5f); Pixelator.Instance.DoFinalNonFadedLayer = false; AkSoundEngine.PostEvent("Play_ENM_hammer_target_01", ((Component)player).gameObject); Object.Destroy((Object)(object)((Component)text).gameObject); ((BraveBehaviour)player).healthHaver.IsVulnerable = true; ((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(3f); GameManager.Instance.MainCameraController.SetManualControl(false, false); ExplosionData boomboom = StaticExplosionDatas.CopyFields(StaticExplosionDatas.genericSmallExplosion); boomboom.damageToPlayer = 0f; boomboom.damageRadius = 25f; boomboom.damage = 750f; boomboom.preventPlayerForce = true; boomboom.ignoreList.Add(((BraveBehaviour)player).specRigidbody); boomboom.playDefaultSFX = false; boomboom.doExplosionRing = false; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), boomboom, TransformExtensions.PositionVector2(((BraveBehaviour)player).transform), (Action)null, false, (CoreDamageTypes)0, false); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { Revives++; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { ((BraveBehaviour)player).healthHaver.OnPreDeath -= CheatDeath; } static EternalWrath() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(EternalWrath)); val.Name = "Eternal Wrath"; val.Description = "Strong Spirit"; val.LongDescription = "Cheat Death Once (+1 Revive). Cheating death grants permanent stat boosts. Module is destroyed after cheating death."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("eternalwrath_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class JackHammer : DefaultModule { public static ItemTemplate template; public static int ID; private StatModifier statModifier; private float t = 0f; private bool cooldownOff = false; private bool isReady = false; private bool ForceNotCooldown = false; private float Cooldown = 0f; private float HoldTime = 0f; public static void PostInit(PickupObject v) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("jackhammer_t3_alt_module"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Jack Hammer " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = StaticColorHexes.AddColorToLabelString("Disables contact damage", StaticColorHexes.Light_Green_Hex) + ".\nDeal contact damage that scales with your velocity. Holding reload for 0.5 seconds\ncharges up a superpowered dodgeroll\nwith increased damage and creates projectiles on impact,\nbut temporarily disables your weapon.\nSuper roll recharges after 7.5 seconds.\n(" + StaticColorHexes.AddColorToLabelString("+Contact Damage And Projectiles Created") + ")"; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public float ModifySpeed(Vector2 currentVelocity, ModulePrinterCore core, PlayerController player) { return 0.15f; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown printer.VoluntaryMovement_Modifier = (Func)Delegate.Combine(printer.VoluntaryMovement_Modifier, new Func(ModifySpeed)); SpeculativeRigidbody specRigidbody = ((BraveBehaviour)player).specRigidbody; specRigidbody.OnRigidbodyCollision = (OnRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnRigidbodyCollision, (Delegate?)new OnRigidbodyCollisionDelegate(HandleRigidbodyCollision)); player.m_additionalReceivesTouchDamage = false; printer.OnFrameUpdate = (Action)Delegate.Combine(printer.OnFrameUpdate, new Action(OFU)); player.OnPreDodgeRoll += RollStarted; } public void RollStarted(PlayerController playerController) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if (isReady) { statModifier = new StatModifier { amount = 3f, ignoredForSaveData = true, modifyType = (ModifyMethod)1, statToBoost = (StatType)27 }; AkSoundEngine.PostEvent("Play_BOSS_RatMech_Cannon_01", ((Component)playerController).gameObject); if (((PassiveItem)Stored_Core).Owner.ownerlessStatModifiers == null) { ((PassiveItem)Stored_Core).Owner.ownerlessStatModifiers = new List(); } ((PassiveItem)Stored_Core).Owner.ownerlessStatModifiers.Add(statModifier); ((PassiveItem)Stored_Core).Owner.stats.RecalculateStats(((PassiveItem)Stored_Core).Owner, false, false); ((MonoBehaviour)((PassiveItem)Stored_Core).Owner).StartCoroutine(DoRoll()); } } public IEnumerator DoRoll() { ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.usesOverrideMaterial = true; ((PassiveItem)Stored_Core).Owner.SetOverrideShader(ShaderCache.Acquire("Brave/ItemSpecific/MetalSkinShader")); HoldTime = 0f; Cooldown = 7.5f; ForceNotCooldown = true; cooldownOff = true; yield return null; ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).healthHaver.IsVulnerable = false; ExplosionData __ = StaticExplosionDatas.CopyFields(StaticExplosionDatas.genericLargeExplosion); __.ignoreList = new List { ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody }; __.damage = 5f; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldCenter), __, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false); while (((PassiveItem)Stored_Core).Owner.IsDodgeRolling) { ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).healthHaver.IsVulnerable = false; GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldBottomLeft), Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldTopRight), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), 0.1f)), 2.5f, 0.05f, (float?)null, (float?)0.5f, (Color?)(((PassiveItem)Stored_Core).Owner.IsUsingAlternateCostume ? Color.green : (Color.cyan * 3f)), (SparksType)5); yield return null; } isReady = false; ForceNotCooldown = false; ((PassiveItem)Stored_Core).Owner.ownerlessStatModifiers.Remove(statModifier); ((PassiveItem)Stored_Core).Owner.stats.RecalculateStats(((PassiveItem)Stored_Core).Owner, false, false); float f = 0f; while (f < 0.5f) { ((PassiveItem)Stored_Core).Owner.CurrentStoneGunTimer = 2.5f; ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).healthHaver.IsVulnerable = false; f += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).healthHaver.IsVulnerable = true; ((PassiveItem)Stored_Core).Owner.ClearOverrideShader(); AkSoundEngine.PostEvent("Play_OBJ_metalskin_end_01", ((Component)((PassiveItem)Stored_Core).Owner).gameObject); } private void HandleRigidbodyCollision(CollisionData rigidbodyCollision) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: 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_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(Stored_Core); if (!Object.op_Implicit((Object)(object)rigidbodyCollision.OtherRigidbody)) { return; } Vector2 velocity = ((GameActor)((PassiveItem)Stored_Core).Owner).Velocity; if (!(((Vector2)(ref velocity)).magnitude > 0f)) { return; } PickupObject byId = PickupObjectDatabase.GetById(((PassiveItem)Stored_Core).Owner.IsUsingAlternateCostume ? DefaultArmCannonAlt.ID : DefaultArmCannon.ID); Projectile val = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]; Vector2 val2 = rigidbodyCollision.OtherRigidbody.UnitCenter - ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody.UnitCenter; velocity = ((GameActor)((PassiveItem)Stored_Core).Owner).Velocity; float num2 = ((Vector2)(ref velocity)).magnitude * (2f + (float)num) * (ForceNotCooldown ? 2.25f : 1f); Vector2 val3 = BraveMathCollege.ClosestPointOnRectangle(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody.GetUnitCenter((ColliderType)2), rigidbodyCollision.OtherRigidbody.UnitBottomLeft, rigidbodyCollision.OtherRigidbody.UnitDimensions); SpawnManager.SpawnVFX((GameObject)BraveResources.Load("Global VFX/VFX_DodgeRollHit", ".prefab"), Vector2.op_Implicit(val3), Quaternion.identity, true); if (Object.op_Implicit((Object)(object)((BraveBehaviour)rigidbodyCollision.OtherRigidbody).aiActor)) { AkSoundEngine.PostEvent("Play_ITM_Crisis_Stone_Impact_01", ((Component)((PassiveItem)Stored_Core).Owner).gameObject); if (ForceNotCooldown) { float num3 = BraveUtility.RandomAngle(); float num4 = 360f / (float)(3 + num); for (int i = 0; i < 3 + num; i++) { Projectile component = SpawnManager.SpawnProjectile(((Component)val).gameObject, Vector2.op_Implicit(val3), Quaternion.Euler(0f, 0f, num3 + num4 * (float)i), true).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.baseData.damage = 7f; component.Owner = (GameActor)(object)((PassiveItem)Stored_Core).Owner; component.Shooter = ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody; component.baseData.speed = 25f; component.UpdateSpeed(); PierceProjModifier val4 = ((Component)component).gameObject.AddComponent(); val4.penetratesBreakables = true; val4.penetration = 3; ((PassiveItem)Stored_Core).Owner.DoPostProcessProjectile(component); } } } ((BraveBehaviour)((BraveBehaviour)rigidbodyCollision.OtherRigidbody).aiActor).healthHaver.ApplyDamage(num2, ((GameActor)((PassiveItem)Stored_Core).Owner).Velocity, "BONK", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); if (Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)rigidbodyCollision.OtherRigidbody).aiActor).knockbackDoer)) { ((BraveBehaviour)((BraveBehaviour)rigidbodyCollision.OtherRigidbody).aiActor).knockbackDoer.ApplyKnockback(val2, 100f, false); } } if (!Object.op_Implicit((Object)(object)((BraveBehaviour)rigidbodyCollision.OtherRigidbody).majorBreakable)) { return; } if (ForceNotCooldown) { float num5 = BraveUtility.RandomAngle(); float num6 = 360f / (float)(3 + num); for (int j = 0; j < 3 + num; j++) { Projectile component2 = SpawnManager.SpawnProjectile(((Component)val).gameObject, Vector2.op_Implicit(val3), Quaternion.Euler(0f, 0f, num5 + num6 * (float)j), true).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.baseData.damage = 7f; component2.Owner = (GameActor)(object)((PassiveItem)Stored_Core).Owner; component2.Shooter = ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody; component2.baseData.speed = 25f; component2.UpdateSpeed(); PierceProjModifier val5 = ((Component)component2).gameObject.AddComponent(); val5.penetratesBreakables = true; val5.penetration = 3; ((PassiveItem)Stored_Core).Owner.DoPostProcessProjectile(component2); } } } ((BraveBehaviour)rigidbodyCollision.OtherRigidbody).majorBreakable.ApplyDamage(num2, ((GameActor)((PassiveItem)Stored_Core).Owner).Velocity, false, false, false); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Remove(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); SpeculativeRigidbody specRigidbody = ((BraveBehaviour)player).specRigidbody; specRigidbody.OnRigidbodyCollision = (OnRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)specRigidbody.OnRigidbodyCollision, (Delegate?)new OnRigidbodyCollisionDelegate(HandleRigidbodyCollision)); player.m_additionalReceivesTouchDamage = true; modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); player.OnPreDodgeRoll -= RollStarted; } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) if (Cooldown > 0f) { if (!ForceNotCooldown) { Cooldown -= BraveTime.DeltaTime; } return; } if (cooldownOff) { cooldownOff = false; AkSoundEngine.PostEvent("Play_ITM_Folding_Table_Use_01", ((Component)player).gameObject); AkSoundEngine.PostEvent("Play_ITM_Folding_Table_Use_01", ((Component)player).gameObject); for (int i = 0; i < 32; i++) { GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter + new Vector2(-0.5f, 0.5f)), Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter + new Vector2(0.5f, 0.5f)), Vector2.op_Implicit(BraveUtility.RandomVector2(new Vector2(-1f, -1f), new Vector2(1f, 1f))), 0f, 0.5f, (float?)null, (float?)Random.Range(0.8f, 1.4f), (Color?)(((PassiveItem)Stored_Core).Owner.IsUsingAlternateCostume ? Color.green : Color.cyan), (SparksType)2); } } if (player.m_activeActions == null) { return; } if (HoldTime < 0.5f) { if (((OneAxisInputControl)player.m_activeActions.ReloadAction).State) { HoldTime += BraveTime.DeltaTime; GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), 5f * HoldTime + 3f)), 1f, 0.05f, (float?)0.05f, (float?)0.5f, (Color?)(((PassiveItem)Stored_Core).Owner.IsUsingAlternateCostume ? Color.green : (Color.cyan * 3f)), (SparksType)2); return; } isReady = false; HoldTime = 0f; if (t > 1.25f) { t -= 1.25f; for (int j = 0; j < 24; j++) { GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldCenter), Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldCenter), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(15 * j, 1f)), 1f, 0.05f, (float?)0.125f, (float?)0.75f, (Color?)(((PassiveItem)Stored_Core).Owner.IsUsingAlternateCostume ? Color.green : Color.cyan), (SparksType)2); } } return; } if (!isReady) { isReady = true; Stored_Core.ModularGunController.gun.DoChargeCompletePoof(); } t += BraveTime.DeltaTime; if (t > 0.125f) { t -= 0.125f; for (int k = 0; k < 24; k++) { GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldCenter), Vector2.op_Implicit(((BraveBehaviour)((PassiveItem)Stored_Core).Owner).sprite.WorldCenter), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(15 * k, 4f)), 1f, 0.05f, (float?)0.125f, (float?)0.25f, (Color?)Color.yellow, (SparksType)2); } } } static JackHammer() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(JackHammer)); val.Name = "Jack Hammer"; val.Description = "One For Each Finger"; val.LongDescription = "Reduces Rate Of Fire and Damage by 35%. Shoot 5 (+2 per stack) times the projectiles."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("jackhammer_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class IteratedDesign : DefaultModule { public static ItemTemplate template; public static int ID; public static Func SpecialProcessGunSpecificClipPostCalc; public static Func SpecialProcessGunSpecificClip; public static Func SpecialProcessGunSpecificFireRate; public static Func SpecialProcessGunSpecificAccuracy; public static Func SpecialProcessGunSpecificReload; public static Action SpecialProcessGunSpecific; public static Action SpecialProcessPickup; public static void PostInit(PickupObject v) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("iterateddesign_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Iterated Design " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants a boost to some stats. (" + StaticColorHexes.AddColorToLabelString("+Increased Stats", StaticColorHexes.Light_Orange_Hex) + ").\nGrants benefits unique to your current gun. (" + StaticColorHexes.AddColorToLabelString("+Better Benefits") + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.EnergyConsumption = 2f; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public static int PlayerHasIteratedDesign(PlayerController player) { int num = player.PlayerActiveModuleCount(ID); if (num > 0) { return num; } return 0; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate, Accuracy_Process = ProcessAccuracy, Reload_Process = ProcessReload, ClipSize_Process = ProcessClipSize, Post_Calculation_ClipSize_Process = ProcessClipSizePostCalc }; printer.ProcessGunStatModifier(gunStatModifier); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { SpecialProcessPickup?.Invoke(modulePrinter, Stack(Object.op_Implicit((Object)(object)modulePrinter)), player); base.OnAnyPickup(modulePrinter, modularGunController, player, IsTruePickup); } public float CritCalc(float baseChance) { return baseChance; } public float CritDamageCalc(float baseChance) { return baseChance += 0.25f * (float)ReturnStack(Stored_Core); } public int ProcessClipSizePostCalc(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int arg = ReturnStack(modulePrinterCore); if (SpecialProcessGunSpecificClipPostCalc != null) { clip = SpecialProcessGunSpecificClipPostCalc(clip, arg, modulePrinterCore, player); } return clip; } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int arg = ReturnStack(modulePrinterCore); if (SpecialProcessGunSpecificClip != null) { clip = SpecialProcessGunSpecificClip(clip, arg, modulePrinterCore, player); } return clip; } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int arg = ReturnStack(modulePrinterCore); if (SpecialProcessGunSpecificFireRate != null) { f = SpecialProcessGunSpecificFireRate(f, arg, modulePrinterCore, player); } return f * 1f; } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int arg = ReturnStack(modulePrinterCore); if (SpecialProcessGunSpecificAccuracy != null) { f = SpecialProcessGunSpecificAccuracy(f, arg, modulePrinterCore, player); } return f; } public float ProcessReload(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int arg = ReturnStack(modulePrinterCore); if (SpecialProcessGunSpecificReload != null) { f = SpecialProcessGunSpecificReload(f, arg, modulePrinterCore, player); } return f; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); float num2 = 1f + 0.3f * (float)num; float num3 = 1f + 0.125f * (float)num; float num4 = 1f + 0.25f * (float)num; ProjectileData baseData = p.baseData; baseData.damage *= num3; ProjectileData baseData2 = p.baseData; baseData2.speed *= num3; p.BlackPhantomDamageMultiplier *= num3; ProjectileData baseData3 = p.baseData; baseData3.force *= num4; ProjectileData baseData4 = p.baseData; baseData4.range *= num4; p.AppliedStunDuration *= num2; p.BleedApplyChance *= num2; p.CharmApplyChance *= num2; p.CheeseApplyChance *= num2; p.FireApplyChance *= num2; p.FreezeApplyChance *= num2; p.PoisonApplyChance *= num2; p.SpeedApplyChance *= num2; p.StunApplyChance *= num2; p.UpdateSpeed(); if (SpecialProcessGunSpecific != null) { SpecialProcessGunSpecific(modulePrinterCore, p, num, player); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } static IteratedDesign() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(IteratedDesign)); val.Name = "Iterated Design"; val.Description = "Simply Better"; val.LongDescription = "Grants a boost to some stats. (+Increased Stats per stack). Grants benefits unique to your current gun. (+Better Benefits per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("iterateddesign_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PowerEternal : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("powereternal_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Power Eternal " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Small chance to gain a Power Cell upon slaying an enemy.\n(" + StaticColorHexes.AddColorToLabelString("+Increased Chance", StaticColorHexes.Light_Orange_Hex) + ").\n" + StaticColorHexes.AddColorToLabelString("Once enabled, cannot be disabled.", StaticColorHexes.Dark_Red_Hex); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.EnergyConsumption = 5f; defaultModule.IsUncraftable = true; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnKilledEnemy = (Action)Delegate.Combine(printer.OnKilledEnemy, new Action(OKE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); } public override bool CanBeDisabled(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { return false; } public void OKE(ModulePrinterCore printer, PlayerController player, AIActor enemy) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (Random.value < 0.004f + (float)ReturnStack(printer) * 0.004f) { GameObject val = Object.Instantiate(((Component)PickupObjectDatabase.GetById(PowerCell.PowerCellID)).gameObject, Vector3.zero, Quaternion.identity); PickupObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.CanBeDropped = false; component.Pickup(player); } } } static PowerEternal() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PowerEternal)); val.Name = "Power Eternal"; val.Description = "Must Be Sated"; val.LongDescription = "Small chance to gain a Power Cell upon slaying an enemy. (+Higher Chance per stack). Once enabled, cannot be disabled."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("powereternal_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class DeathTrigger : DefaultModule { public static ItemTemplate template; public static GameObject DeathCrossVFX; public static DebuffStuff.GameActorDecorationEffect deathtriggerMarl; public static int ID; private float math; public static void PostInit(PickupObject v) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("deathtrigger_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Death Trigger " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = StaticColorHexes.AddColorToLabelString("Enemies have a chance to activate 'On Kill Enemy' effects when hit", StaticColorHexes.Green_Hex) + ".\n(" + StaticColorHexes.AddColorToLabelString("+Increased Chance", StaticColorHexes.Light_Orange_Hex) + ") Recharges after 5 seconds.\nSlain enemies fire 4 damaging lines of energy in a + formation.\n(" + StaticColorHexes.AddColorToLabelString("+Increased Damage", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.EnergyConsumption = 3f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; deathtriggerMarl = new DebuffStuff.GameActorDecorationEffect(); ((GameActorEffect)deathtriggerMarl).AffectsEnemies = true; ((GameActorEffect)deathtriggerMarl).PlaysVFXOnActor = false; ((GameActorEffect)deathtriggerMarl).effectIdentifier = "mdl_candeathtrigger"; ((GameActorEffect)deathtriggerMarl).PlaysVFXOnActor = false; ((GameActorEffect)deathtriggerMarl).stackMode = (EffectStackingMode)2; ((GameActorEffect)deathtriggerMarl).duration = 7.5f; ((GameActorEffect)deathtriggerMarl).TintColor = new Color(0.6f, 0.94f, 1f, 1f); ((GameActorEffect)deathtriggerMarl).AppliesTint = false; GameObject val = new GameObject("DeathCrossVFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 30f); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("marksmanhit_005")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Generic_VFX_Animation; DeathCrossVFX = val; } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { math = 0.0125f * (float)ReturnStack(modulePrinter); base.OnAnyPickup(modulePrinter, modularGunController, player, IsTruePickup); } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { math = 0.0125f * (float)ReturnStack(printer); printer.OnDamagedEnemy = (Action)Delegate.Combine(printer.OnDamagedEnemy, new Action(ODE)); printer.OnKilledEnemy = (Action)Delegate.Combine(printer.OnKilledEnemy, new Action(OKE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnDamagedEnemy = (Action)Delegate.Remove(modulePrinter.OnDamagedEnemy, new Action(ODE)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); } public void ODE(ModulePrinterCore printer, PlayerController player, AIActor enemy, float Damage) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: 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_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((BraveBehaviour)enemy).healthHaver) && !hasEffect((GameActor)(object)enemy) && Random.value < Damage * math) { ((GameActor)enemy).ApplyEffect((GameActorEffect)(object)deathtriggerMarl, 1f, (Projectile)null); GameObject val = ((GameActor)enemy).PlayEffectOnActor(DeathCrossVFX, new Vector3(0f, 1f), true, false, false); val.GetComponent().PlayAndDestroyObject("deathCross", (Action)null); Vector2 worldCenter = ((BraveBehaviour)enemy).sprite.WorldCenter; AkSoundEngine.PostEvent("Play_WPN_Life_Orb_Blast_01", ((Component)enemy).gameObject); for (int i = 0; i < 8; i++) { GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(new Vector2(1f, 1f) * (float)i), 12f, 0.5f, (float?)0.1f, (float?)3f, (Color?)new Color(3f, 0f, 2.1f), (SparksType)6); GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(new Vector2(-1f, 1f) * (float)i), 12f, 0.5f, (float?)0.1f, (float?)3f, (Color?)new Color(3f, 0f, 2.1f), (SparksType)6); GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(new Vector2(1f, -1f) * (float)i), 12f, 0.5f, (float?)0.1f, (float?)3f, (Color?)new Color(3f, 0f, 2.1f), (SparksType)6); GlobalSparksDoer.DoRandomParticleBurst(1, Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(worldCenter), Vector2.op_Implicit(new Vector2(-1f, -1f) * (float)i), 12f, 0.5f, (float?)0.1f, (float?)3f, (Color?)new Color(3f, 0f, 2.1f), (SparksType)6); } player.GetEventDelegate("OnKilledEnemy")?.DynamicInvoke(player); player.GetEventDelegate("OnKilledEnemyContext")?.DynamicInvoke(player, ((BraveBehaviour)enemy).healthHaver); } } private bool hasEffect(GameActor gameActor) { for (int i = 0; i < gameActor.m_activeEffects.Count; i++) { if (gameActor.m_activeEffects[i] == deathtriggerMarl) { return true; } } return false; } public void OKE(ModulePrinterCore printer, PlayerController player, AIActor enemy) { //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_005f: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(153); GameObject gameObject = ((Component)((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]).gameObject; AkSoundEngine.PostEvent("Play_WPN_Vorpal_Shot_Critical_01", ((Component)enemy).gameObject); for (int i = 0; i < 4; i++) { GameObject val = SpawnManager.SpawnProjectile(gameObject, Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), Quaternion.Euler(0f, 0f, (float)(90 * i)), true); Projectile component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.baseData.damage = 5f + 5f * (float)ReturnStack(printer); component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; player.DoPostProcessProjectile(component); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)component).gameObject); orAddComponent.penetration += 5; } } } static DeathTrigger() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(DeathTrigger)); val.Name = "Death Trigger"; val.Description = "Death Cheats"; val.LongDescription = "Enemies have a chance to activate 'On Kill Enemy' effects when hit. (+Increased Chance per stack). \nRecharges after 5 seconds.\nSlain enemies fire 4 damaging lines of energy in a + formation. (+Increased Damage per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("deathtrigger_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class DisintegrationLoop : DefaultModule { public static ItemTemplate template; public static int ID; public int CachedArtillery = 0; private Coroutine Strike; private AIActor currentTarget; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("disintegrationloop_t3_alt_module"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Disintegration Loop " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Kills grant targeted orbital strikes, up to 25 cached strikes.\nCached strikes are automatically used in combat one by one.\nStrike timings scale with player stats and ignore damage caps.\n(" + StaticColorHexes.AddColorToLabelString("+Increased Strike Damage And Speed") + ")"; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { player.OnKilledEnemy += OKE; printer.OnFrameUpdate = (Action)Delegate.Combine(printer.OnFrameUpdate, new Action(OFU)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { player.OnKilledEnemy -= OKE; modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); } public void OKE(PlayerController player) { if (CachedArtillery < 25) { CachedArtillery++; } } private AIActor GetSimplifiedNewTarget(ModulePrinterCore modulePrinter) { List list = new List(); RoomHandler currentRoom = ((PassiveItem)modulePrinter).Owner.CurrentRoom; if (currentRoom != null) { currentRoom.GetActiveEnemies((ActiveEnemyType)0, ref list); } if (list == null) { return null; } if (list.Count == 0) { return null; } list.RemoveAll((AIActor self) => (int)self.State != 2); list.RemoveAll((AIActor self) => (Object)(object)((BraveBehaviour)self).specRigidbody == (Object)null); list = list.OrderByDescending((AIActor self) => ((BraveBehaviour)self).healthHaver.currentHealth).ToList(); if (list.Count == 0) { return null; } list.RemoveAll((AIActor self) => ((BraveBehaviour)self).healthHaver.IsDead); list.RemoveAll((AIActor self) => !((BraveBehaviour)self).healthHaver.vulnerable); list.RemoveAll((AIActor self) => ((BraveBehaviour)self).spriteAnimator.QueryInvulnerabilityFrame()); if (list.Count == 0) { return null; } AIActor result = null; if (list.Count == 1) { return list[0]; } int num = 0; if (num < list.Count) { result = list[num]; } return result; } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { if (CachedArtillery > 0 && player.CurrentRoom != null && player.IsInCombat && Strike == null) { AIActor simplifiedNewTarget = GetSimplifiedNewTarget(modulePrinter); if ((Object)(object)simplifiedNewTarget != (Object)null) { AkSoundEngine.PostEvent("Play_OBJ_supplydrop_activate_01", ((Component)player).gameObject); Strike = ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoArtillery(simplifiedNewTarget)); } } } public IEnumerator DoArtillery(AIActor aIActor) { currentTarget = aIActor; float c = ReturnStack(Stored_Core); float M = Stored_Core.ModularGunController.GetRateOfFire(2.75f - 0.25f * c) / ((PassiveItem)Stored_Core).Owner.stats.GetStatValue((StatType)1); float M_1 = Stored_Core.ModularGunController.GetReload(1.75f - 0.25f * c) / ((PassiveItem)Stored_Core).Owner.stats.GetStatValue((StatType)10); float _3 = BraveUtility.RandomAngle(); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoLaser(_3, M)); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoLaser(_3 + 120f, M)); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoLaser(_3 + 240f, M)); float t2 = 0f; while (t2 < M) { t2 += BraveTime.DeltaTime; yield return null; } if (Object.op_Implicit((Object)(object)aIActor)) { CachedArtillery--; Vector2 b = ((BraveBehaviour)aIActor).specRigidbody.UnitBottomCenter; for (float i = 0f; i < 200f; i += 1f) { Vector3.Lerp(Vector3.zero, new Vector3(0f, 30f), i / _3); GlobalSparksDoer.DoSingleParticle(Vector2Extensions.ToVector3ZUp(b, 0f) + new Vector3(0f, i * 0.1f, 0f), Vector3.down, (float?)0.125f, (float?)1f, (Color?)null, (SparksType)2); GlobalSparksDoer.DoSingleParticle(Vector2Extensions.ToVector3ZUp(b, 0f) + new Vector3(0f, i * 0.1f, 0f), Vector3.down, (float?)null, (float?)10f, (Color?)null, (SparksType)4); } AkSoundEngine.PostEvent("Play_BOSS_RatMech_Cannon_01", ((Component)aIActor).gameObject); Projectile rpoh = SpawnManager.SpawnProjectile(((Component)Guns.Prototype_Railgun.DefaultModule.chargeProjectiles[1].Projectile).gameObject, Vector2.op_Implicit(Vector2.zero), Quaternion.identity, true).GetComponent(); if ((Object)(object)rpoh != (Object)null) { rpoh.ignoreDamageCaps = true; rpoh.baseData.damage = 30 + 25 * ReturnStack(Stored_Core); rpoh.baseData.speed = 0f; rpoh.UpdateSpeed(); rpoh.Owner = (GameActor)(object)((PassiveItem)Stored_Core).Owner; rpoh.Shooter = ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody; rpoh.OnWillKillEnemy = (Action)Delegate.Combine(rpoh.OnWillKillEnemy, (Action)delegate(Projectile _1, SpeculativeRigidbody _2) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleEnemyDeath(((BraveBehaviour)_2).aiActor)); }); ((PassiveItem)Stored_Core).Owner.DoPostProcessProjectile(rpoh); rpoh.ForceCollision(((BraveBehaviour)aIActor).specRigidbody, new LinearCastResult { CollidedX = true, CollidedY = true, Contact = ((BraveBehaviour)aIActor).specRigidbody.UnitCenter, MyPixelCollider = ((BraveBehaviour)rpoh).specRigidbody.PixelColliders[0], NewPixelsToMove = new IntVector2(0, 0), Normal = Vector2.zero, OtherPixelCollider = ((BraveBehaviour)aIActor).specRigidbody.PixelColliders[0], Overlap = true, TimeUsed = 0f }); rpoh.DieInAir(true, true, true, false); EasyLight.Create((Vector2?)((BraveBehaviour)aIActor).specRigidbody.UnitCenter, (Transform)null, (Color?)Color.yellow, 1f, 10f, false, 10f, 0f, 1f, false, false, 30f, 0f, true, true); } } t2 = 0f; while (t2 < M_1) { t2 += BraveTime.DeltaTime; yield return null; } Strike = null; } private Transform CreateEmptySprite(AIActor target) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("suck image"); val.layer = ((Component)target).gameObject.layer; tk2dSprite val2 = val.AddComponent(); val.transform.parent = SpawnManager.Instance.VFX; ((tk2dBaseSprite)val2).SetSprite(((BraveBehaviour)target).sprite.Collection, ((BraveBehaviour)target).sprite.spriteId); ((BraveBehaviour)val2).transform.position = ((BraveBehaviour)((BraveBehaviour)target).sprite).transform.position; GameObject val3 = new GameObject("image parent"); val3.transform.position = Vector2.op_Implicit(((tk2dBaseSprite)val2).WorldCenter); ((BraveBehaviour)val2).transform.parent = val3.transform; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; if ((Object)(object)target.optionalPalette != (Object)null) { ((BraveBehaviour)val2).renderer.material.SetTexture("_PaletteTex", (Texture)(object)target.optionalPalette); } if (((Object)((BraveBehaviour)val2).renderer.material.shader).name.Contains("ColorEmissive")) { } return val3.transform; } public IEnumerator DoLaser(float Rot, float LaserTime) { GameObject gameObject = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component2 = gameObject.GetComponent(); ((BraveBehaviour)component2).transform.position = Vector2.op_Implicit(((BraveBehaviour)currentTarget).sprite.WorldBottomCenter); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, 90f); ((tk2dBaseSprite)component2).UpdateZDepth(); Vector3 _ = Toolbox.GetUnitOnCircleVec3(Rot, 10f); Vector2 __ = Vector2.op_Implicit(Vector3.zero); ((tk2dBaseSprite)component2).color = Color.red; float e = 0f; while (e < LaserTime) { if ((Object)(object)currentTarget != (Object)null) { __ = Vector2.op_Implicit(Vector3.MoveTowards(((BraveBehaviour)component2).transform.position, Vector2.op_Implicit(((BraveBehaviour)currentTarget).specRigidbody.UnitBottomCenter), 30f)); } else { currentTarget = GetSimplifiedNewTarget(Stored_Core); } float t = e / LaserTime; float t2 = Mathf.Clamp01(t * 2.5f); if (Random.value < 0.33f) { GlobalSparksDoer.DoSingleParticle(((BraveBehaviour)component2).transform.position, Vector3.up, (float?)null, (float?)null, (Color?)null, (SparksType)4); } e += BraveTime.DeltaTime; ((BraveBehaviour)component2).transform.position = Vector2Extensions.ToVector3ZUp(__ + Vector2.Lerp(Vector2.op_Implicit(_), Vector2.op_Implicit(Vector3.zero), t * t), 0f) + new Vector3(0f, Mathf.Lerp(100f, 0f, t2 * t2)); component2.dimensions = new Vector2(3200f, 1f); ((tk2dBaseSprite)component2).HeightOffGround = -2f; ((Component)((BraveBehaviour)component2).renderer).gameObject.layer = 23; ((tk2dBaseSprite)component2).UpdateZDepth(); yield return null; } Object.Destroy((Object)(object)gameObject); } private IEnumerator HandleEnemyDeath(AIActor target) { ExplosionData __ = StaticExplosionDatas.CopyFields(StaticExplosionDatas.genericLargeExplosion); __.ignoreList = new List { ((BraveBehaviour)((PassiveItem)Stored_Core).Owner).specRigidbody }; Exploder.Explode(((BraveBehaviour)target).transform.position, __, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false); CachedArtillery++; target.EraseFromExistenceWithRewards(false); Transform copyTransform = CreateEmptySprite(target); tk2dSprite copySprite = ((Component)copyTransform).GetComponentInChildren(); float elapsed = 0f; float duration = 1f; ((BraveBehaviour)copySprite).renderer.material.DisableKeyword("TINTING_OFF"); ((BraveBehaviour)copySprite).renderer.material.EnableKeyword("TINTING_ON"); ((BraveBehaviour)copySprite).renderer.material.DisableKeyword("EMISSIVE_OFF"); ((BraveBehaviour)copySprite).renderer.material.EnableKeyword("EMISSIVE_ON"); ((BraveBehaviour)copySprite).renderer.material.DisableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)copySprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_OFF"); ((BraveBehaviour)copySprite).renderer.material.SetFloat("_EmissiveThresholdSensitivity", 5f); ((BraveBehaviour)copySprite).renderer.material.SetFloat("_EmissiveColorPower", 1f); int emId = Shader.PropertyToID("_EmissivePower"); while (elapsed < duration) { elapsed += BraveTime.DeltaTime; float t = elapsed / duration; ((BraveBehaviour)copySprite).renderer.material.SetFloat(emId, Mathf.Lerp(1f, 10f, t)); ((BraveBehaviour)copySprite).renderer.material.SetFloat("_BurnAmount", t); copyTransform.position += Vector3.up * BraveTime.DeltaTime * 1f; yield return null; } Object.Destroy((Object)(object)((Component)copyTransform).gameObject); } static DisintegrationLoop() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(DisintegrationLoop)); val.Name = "Disintegration Loop"; val.Description = "Obliteration"; val.LongDescription = "Kills grant targeted orbital strikes, up to 25 cached strikes. Cached strikes are automatically used in combat one by one. Strike timings scale with player stats and ignore damage caps. (+Increased Strike Damage And Speed per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("disintegrationloop_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class CarpalNightmare : DefaultModule { public static ItemTemplate template; public static int ID; private int m_counter = 0; private float T = 0f; public static void PostInit(PickupObject v) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Tier_Omega; defaultModule.LabelName = "CARPAL NIGHTMARE " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "PRESSING THE FIRE BUTTON TEMPORARILY BOOSTS FIRE RATE.\nPRESSING RELOAD WHILE RELOADING BOOSTS THE NEXT CLIP.\n(" + StaticColorHexes.AddColorToLabelString("MORE STATS") + ")."; defaultModule.powerConsumptionData = new PowerConsumptionData { FirstStack = 0f, AdditionalStacks = 0f, OverridePowerDescriptionLabel = "USES NO POWER.", OverridePowerManagement = null }; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.red); defaultModule.AdditionalWeightMultiplier = 1f; defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)10, (byte)10, (byte)100)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); printer.OnFrameUpdate = (Action)Delegate.Combine(printer.OnFrameUpdate, new Action(OFU)); player.OnReloadPressed = (Action)Delegate.Combine(player.OnReloadPressed, new Action(ORP)); printer.OnGunReloaded = (Action)Delegate.Combine(printer.OnGunReloaded, new Action(OGR)); player.OnTriedToInitiateAttack += Player_OnTriedToInitiateAttack; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); player.OnReloadPressed = (Action)Delegate.Remove(player.OnReloadPressed, new Action(ORP)); modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); player.OnTriedToInitiateAttack -= Player_OnTriedToInitiateAttack; } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { m_counter = 0; } public void ORP(PlayerController player, Gun gun) { if (gun.IsReloading) { m_counter++; AkSoundEngine.PostEvent("Play_WPN_RechargeGun_Recharge_01", ((Component)gun).gameObject); } else { m_counter = 0; } } private void Player_OnTriedToInitiateAttack(PlayerController obj) { T += 0.1f * (float)ReturnStack(Stored_Core); } public void OFU(ModulePrinterCore modulePrinterCore, PlayerController player) { if (T > 0f) { T -= BraveTime.DeltaTime * 1.2f; } } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / (1f + T); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + (float)m_counter / 20f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f + (float)m_counter / 30f * (float)num; p.AdditionalScaleMultiplier *= 1f + (float)m_counter / 30f * (float)num; p.UpdateSpeed(); } static CarpalNightmare() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CarpalNightmare)); val.Name = "Carpal Nightmare"; val.Description = "Devourer"; val.LongDescription = "Acts as 1 (+1 per stack) of every module you will own.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_3); val.ManualSpriteCollection = StaticCollections.Module_T4_Collection; val.ManualSpriteID = StaticCollections.Module_T4_Collection.GetSpriteIdByName("carpalnightmare"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class MusicBox : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject MusicBoxObject; public static void PostInit(PickupObject v) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Unique; defaultModule.LabelName = "Music Box " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "On reloading your gun,\nspawns 1 music box that imitates your attacks.\nFurther stacks simply increases fire rate by 20% (" + StaticColorHexes.AddColorToLabelString("+20% hyperbolically") + ")."; defaultModule.IsSpecialModule = true; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(new Color(1f, 0.3f, 0f)); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)80, (byte)0, (byte)100)); defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(149); MusicBoxObject = ((Gun)((byId is Gun) ? byId : null)).ObjectToInstantiateOnReload; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.gun.ObjectToInstantiateOnReload = MusicBoxObject; gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); if (num == 1) { return f; } return f - (f - f / (1f + 0.2f * (float)(num - 1))); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.gun.ObjectToInstantiateOnReload = null; modulePrinter.RemoveGunStatModifier(gunStatModifier); } static MusicBox() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MusicBox)); val.Name = "Music Box"; val.Description = "Banger Tunes"; val.LongDescription = "On reloading your gun, spawns 1 music box that imitates your attacks. Further stacks simply increases fire rate by 20% (+20% hyperbolically per stack).\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_1); val.ManualSpriteCollection = StaticCollections.Module_Unique_Collection; val.ManualSpriteID = StaticCollections.Module_Unique_Collection.GetSpriteIdByName("musicbox_u_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class WillingSpirit : DefaultModule { public static ItemTemplate template; public static int ID; public static Projectile GhostProjectile; public static void PostInit(PickupObject v) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Unique; defaultModule.LabelName = "Willing Spirit " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Entering combat spawns 1 (" + StaticColorHexes.AddColorToLabelString("+1") + ") ghosts\nthat fight for you."; defaultModule.IsSpecialModule = true; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(new Color(1f, 0.3f, 0f)); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)80, (byte)0, (byte)100)); defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(198); GhostProjectile = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Combine(modulePrinter.OnEnteredCombat, new Action(OnRoomEntered)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Remove(modulePrinter.OnEnteredCombat, new Action(OnRoomEntered)); } public void OnRoomEntered(ModulePrinterCore core, RoomHandler room, PlayerController playerController) { ((MonoBehaviour)playerController).StartCoroutine(Spawn(playerController)); } public IEnumerator Spawn(PlayerController playerController) { float e = 0f; while (e < 1.25f) { e += BraveTime.DeltaTime; yield return null; } for (int i = 0; i < ReturnStack(Stored_Core); i++) { GameObject spawnedBulletOBJ = SpawnManager.SpawnProjectile(((Component)GhostProjectile).gameObject, Vector2.op_Implicit(((BraveBehaviour)playerController).sprite.WorldCenter), Quaternion.Euler(0f, 0f, ((GameActor)playerController).CurrentGun.CurrentAngle), true); Projectile component = spawnedBulletOBJ.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)playerController; component.Shooter = ((BraveBehaviour)playerController).specRigidbody; ProjectileData baseData = component.baseData; baseData.range *= 20f; BounceProjModifier bounceProjModifier = GameObjectExtensions.GetOrAddComponent(((Component)component).gameObject); bounceProjModifier.numberOfBounces += 10; playerController.DoPostProcessProjectile(component); } } } static WillingSpirit() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(WillingSpirit)); val.Name = "Willing Spirit"; val.Description = "SpoooOOoOky"; val.LongDescription = "Entering combat spawns 1 (+1) ghosts that fight for you.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_1); val.ManualSpriteCollection = StaticCollections.Module_Unique_Collection; val.ManualSpriteID = StaticCollections.Module_Unique_Collection.GetSpriteIdByName("willingspirit_u_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class CarpalTunnel : DefaultModule { public static ItemTemplate template; public static int ID; private int m_counter = 0; public static void PostInit(PickupObject v) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Unique; defaultModule.LabelName = "Carpal Tunnel " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Pressing Reload while reloading increases the next clips\ndamage by 5% (" + StaticColorHexes.AddColorToLabelString("+5%") + ") per press."; defaultModule.IsSpecialModule = true; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(new Color(1f, 0.3f, 0f)); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)80, (byte)0, (byte)100)); defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { player.OnReloadPressed = (Action)Delegate.Combine(player.OnReloadPressed, new Action(ORP)); modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { m_counter = 0; } public void ORP(PlayerController player, Gun gun) { if (gun.IsReloading) { m_counter++; AkSoundEngine.PostEvent("Play_WPN_RechargeGun_Recharge_01", ((Component)gun).gameObject); } else { m_counter = 0; } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { player.OnReloadPressed = (Action)Delegate.Remove(player.OnReloadPressed, new Action(ORP)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + (float)m_counter / 20f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f + (float)m_counter / 30f * (float)num; p.AdditionalScaleMultiplier *= 1f + (float)m_counter / 30f * (float)num; p.UpdateSpeed(); } static CarpalTunnel() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CarpalTunnel)); val.Name = "Carpal Tunnel"; val.Description = "Ow."; val.LongDescription = "Pressing Reload while reloading increases the next clips damage by 5% (+5% per stack) per press.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_1); val.ManualSpriteCollection = StaticCollections.Module_Unique_Collection; val.ManualSpriteID = StaticCollections.Module_Unique_Collection.GetSpriteIdByName("turbo_u_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class BrilliantSun : DefaultModule { public static ItemTemplate template; public static int ID; public static GameActorEffect SunFlame; public static ExplosionData Data; public static void PostInit(PickupObject v) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Unique; defaultModule.LabelName = "Brilliant Sun " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Projectiles now inflict Sun Burn.\nKilling an enemy with Sun Burn causes it to explode.\n(" + StaticColorHexes.AddColorToLabelString("+Explosion Power") + ")."; defaultModule.IsSpecialModule = true; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(new Color(1f, 0.3f, 0f)); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)80, (byte)0, (byte)100)); defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(748); SunFlame = (GameActorEffect)(object)((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.fireEffect; Data = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); Data.damage = 30f; ref GameObject effect = ref Data.effect; PickupObject byId2 = PickupObjectDatabase.GetById(748); effect = ((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy.effects[0].effects[0].effect; Data.damageRadius = 2.5f; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); p.statusEffectsToApply = new List { SunFlame }; } public void OKE(ModulePrinterCore core, PlayerController player, AIActor enemy) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (((GameActor)enemy).m_activeEffects.Contains(SunFlame)) { ExplosionData val = StaticExplosionDatas.CopyFields(Data); val.damage = 25 * ReturnStack(core); val.force = 50 * ReturnStack(core); val.damageRadius = 2 + ReturnStack(core); Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), val, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false); } } static BrilliantSun() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BrilliantSun)); val.Name = "Brilliant Sun"; val.Description = "Duck Up"; val.LongDescription = "Projectiles now inflict Sun Burn. Killing an enemy with Sun Burn causes it to explode. (+Explosion Power per stack).\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Unique); val.ManualSpriteCollection = StaticCollections.Module_Unique_Collection; val.ManualSpriteID = StaticCollections.Module_Unique_Collection.GetSpriteIdByName("brilliantsun_u_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class DuckHunter : DefaultModule { public static ItemTemplate template; public static int ID; public static Projectile BeadieProjectile; public static void PostInit(PickupObject v) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Unique; defaultModule.LabelName = "Duck Hunter " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "On reloading your gun,\nfires 1 (" + StaticColorHexes.AddColorToLabelString("+1") + ") duck at your enemies."; defaultModule.IsSpecialModule = true; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(new Color(1f, 0.3f, 0f)); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)80, (byte)0, (byte)100)); defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(27); BeadieProjectile = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.finalProjectile; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < ReturnStack(modulePrinterCore); i++) { GameObject val = SpawnManager.SpawnProjectile(((Component)BeadieProjectile).gameObject, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.Euler(0f, 0f, g.CurrentAngle), true); Projectile component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; player.DoPostProcessProjectile(component); } } } static DuckHunter() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(DuckHunter)); val.Name = "Duck Hunter"; val.Description = "Duck Up"; val.LongDescription = "On reloading your gun, fires 1 (+1 per stack) duck at your enemies.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Unique); val.ManualSpriteCollection = StaticCollections.Module_Unique_Collection; val.ManualSpriteID = StaticCollections.Module_Unique_Collection.GetSpriteIdByName("duckhunter_u_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class BeholsterEye : DefaultModule { public static ItemTemplate template; public static int ID; public static Projectile BeadieProjectile; public static void PostInit(PickupObject v) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Unique; defaultModule.LabelName = "Beholsters Eye " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "On reloading your gun,\nspawns 1 (" + StaticColorHexes.AddColorToLabelString("+1") + ") beadie."; defaultModule.IsSpecialModule = true; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(new Color(1f, 0.3f, 0f)); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)80, (byte)0, (byte)100)); defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(90); BeadieProjectile = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.finalProjectile; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < ReturnStack(modulePrinterCore); i++) { GameObject val = SpawnManager.SpawnProjectile(((Component)BeadieProjectile).gameObject, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.Euler(0f, 0f, g.CurrentAngle), true); Projectile component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; player.DoPostProcessProjectile(component); } } } static BeholsterEye() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BeholsterEye)); val.Name = "Beholsters Eye"; val.Description = "Whizz Up"; val.LongDescription = "On reloading your gun, spawns 1 (+1 per stack) beadie.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_1); val.ManualSpriteCollection = StaticCollections.Module_Unique_Collection; val.ManualSpriteID = StaticCollections.Module_Unique_Collection.GetSpriteIdByName("beholstereye_u_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class HeavyHitter : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("heavyhitter_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.45f; defaultModule.LabelName = "Heavy Hitter" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Deal 300% (" + StaticColorHexes.AddColorToLabelString("+300%") + ") more knockback.\nIncreases damage by 12.5% (" + StaticColorHexes.AddColorToLabelString("+12.5%") + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -1f); defaultModule.Offset_LabelName = new Vector2(0.25f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.03f)) { ProjectileData baseData = p.baseData; baseData.damage *= 1.125f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1.2f; ProjectileData baseData3 = p.baseData; baseData3.force *= 3f; p.UpdateSpeed(); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.125f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1.2f; ProjectileData baseData3 = p.baseData; baseData3.force *= 3f * (float)num; p.UpdateSpeed(); } static HeavyHitter() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HeavyHitter)); val.Name = "Heavy Hitter"; val.Description = "Bonk Damage"; val.LongDescription = "Deal 300% (+300% per stack) more knockback. Increases damage by 12.5% (+12.5% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("heavyhitter_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class TemporaryShield : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject ShieldVFX; public GameObject Inst; public int Blocks = 1; public static void PostInit(PickupObject v) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("tempshield_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.6f; defaultModule.LabelName = "Temporary Shield" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Prevents 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") instances of damage per floor.\nBlocking damage activates on-hit effects.\n" + StaticColorHexes.AddColorToLabelString("Increases the probability of certain modules appearing.", StaticColorHexes.Pink_Hex); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.RETALIATION); defaultModule.OverrideScrapCost = 5; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("temparmor_006")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("GenericVFXAnimation").GetComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 4f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 4f); ShieldVFX = val; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) modulePrinter.OnNewFloorStarted = (Action)Delegate.Combine(modulePrinter.OnNewFloorStarted, new Action(ONFS)); GlobalModuleStorage.AlterModuleWeight = (Func)Delegate.Combine(GlobalModuleStorage.AlterModuleWeight, new Func(ModuleWeight)); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Combine(healthHaver.ModifyDamage, new Action(ModifyIncomingDamage)); Inst = ((GameActor)player).PlayEffectOnActor(ShieldVFX, new Vector3(0f, -1f), true, false, false); Inst.GetComponent().Play("shield_start"); } private void ModifyIncomingDamage(HealthHaver source, ModifyDamageEventArgs args) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) if (args != EventArgs.Empty && !(args.ModifiedDamage <= 0f) && Blocks > 0) { AkSoundEngine.PostEvent("Play_ITM_Macho_Brace_Trigger_01", ((Component)source).gameObject); source.GetEventDelegate("OnDamaged")?.DynamicInvoke(0, 100, (object)(CoreDamageTypes)1, (object)(DamageCategory)0, Vector2.zero); source.m_player.GetEventDelegate("OnReceivedDamage")?.DynamicInvoke(source.m_player); Blocks--; if ((Object)(object)Inst != (Object)null && Blocks == 0) { Inst.GetComponent().PlayAndDestroyObject("shield_break", (Action)null); AkSoundEngine.PostEvent("Play_OBJ_boulder_break_01", ((Component)source).gameObject); } args.InitialDamage = 0f; args.ModifiedDamage = 0f; source.IsVulnerable = false; Object.Instantiate(VFXStorage.TeleportDistortVFX, Vector2.op_Implicit(((BraveBehaviour)source).sprite.WorldCenter), Quaternion.identity); ((MonoBehaviour)source).StartCoroutine(StartInv(source)); } } public IEnumerator StartInv(HealthHaver h) { ((BraveBehaviour)h.m_player).sprite.usesOverrideMaterial = true; h.m_player.SetOverrideShader(ShaderCache.Acquire("Brave/ItemSpecific/MetalSkinShader")); yield return (object)new WaitForSeconds(1f); AkSoundEngine.PostEvent("Play_OBJ_metalskin_end_01", ((Component)h).gameObject); h.m_player.ClearOverrideShader(); h.IsVulnerable = true; } public float ModuleWeight(DefaultModule module, float f) { if (module.ContainsTag(BaseModuleTags.RETALIATION) || module.ContainsTag(BaseModuleTags.DEFENSIVE)) { return f *= 1.3f; } return f; } public void ONFS(ModulePrinterCore core, PlayerController p) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) Blocks = ReturnStack(core); if ((Object)(object)Inst == (Object)null) { Inst = ((GameActor)p).PlayEffectOnActor(ShieldVFX, new Vector3(0f, -2f), true, false, false); Inst.GetComponent().Play("shield_start"); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Remove(healthHaver.ModifyDamage, new Action(ModifyIncomingDamage)); modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONFS)); GlobalModuleStorage.AlterModuleWeight = (Func)Delegate.Remove(GlobalModuleStorage.AlterModuleWeight, new Func(ModuleWeight)); if ((Object)(object)Inst != (Object)null) { Inst.GetComponent().PlayAndDestroyObject("shield_break", (Action)null); } } static TemporaryShield() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TemporaryShield)); val.Name = "Temporary Shield"; val.Description = "Block It"; val.LongDescription = "Prevents 1 (+1 per stack) instances of damage per floor. Blocking damage activates on-hit effects. Increases the probability of certain modules appearing."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("tempshield_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class FlakShot : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("flakshot_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelName = "Flak Shot" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Reduces Damage by 40%. Projectiles split into 2\nweaker projectiles that inherit all of the\nparent projectiles effects.\n(" + StaticColorHexes.AddColorToLabelString("+Split Projectile Damage", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.OverrideScrapCost = 5; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!((Object)(object)((Component)p).gameObject.GetComponent() != (Object)null) && !(Random.value > 0.03f)) { int num = 1; ProjectileData baseData = p.baseData; baseData.damage *= 0.6f; ProjectileSplitController projectileSplitController = ((Component)p).gameObject.AddComponent(); projectileSplitController.dmgMultAfterSplit = 0.2f + 0.15f * (float)num; projectileSplitController.speedMultAfterSplit = 0.7f + 0.1f * (float)num; projectileSplitController.amtToSplitTo = 2; projectileSplitController.SplitsOnDestroy = true; projectileSplitController.isPurelyRandomizedSplitAngle = true; projectileSplitController.removeComponentAfterUse = true; projectileSplitController.sizeMultAfterSplit = 0.75f; projectileSplitController.DestroysProjectileOnSplit = false; projectileSplitController.DoesSplitPostProcess = true; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { if (!((Object)(object)((Component)p).gameObject.GetComponent() != (Object)null)) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 0.6f; ProjectileSplitController projectileSplitController = ((Component)p).gameObject.AddComponent(); projectileSplitController.dmgMultAfterSplit = 0.2f + 0.15f * (float)num; projectileSplitController.speedMultAfterSplit = 0.7f + 0.1f * (float)num; projectileSplitController.amtToSplitTo = 2; projectileSplitController.SplitsOnDestroy = true; projectileSplitController.isPurelyRandomizedSplitAngle = true; projectileSplitController.removeComponentAfterUse = true; projectileSplitController.sizeMultAfterSplit = 0.75f; projectileSplitController.DestroysProjectileOnSplit = false; projectileSplitController.DoesSplitPostProcess = true; } } static FlakShot() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(FlakShot)); val.Name = "Flak Shot"; val.Description = "Better Than 1"; val.LongDescription = "Reduces Damage by 40%. Projectiles split into 2 weaker projectiles that inherit all of the parent projectiles effects. (Split Projectile Damage per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("flakshot_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class UncontrolledBlast : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("uncontrolledblast_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Uncontrolled Blast " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Massively boosts clip size and fire rate (" + StaticColorHexes.AddColorToLabelString("+More Fire Rate", StaticColorHexes.Light_Orange_Hex) + "),\nbut reduces damage and gives " + StaticColorHexes.AddColorToLabelString("virtually uncontrollable spread", StaticColorHexes.Red_Color_Hex) + ".\n(" + StaticColorHexes.AddColorToLabelString("+Even More Spread", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.OverrideScrapCost = 7; defaultModule.AdditionalWeightMultiplier = 0.125f; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.IsSpecialModule = true; defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ClipSize_Process = ProcessClipSize, Accuracy_Process = ProcessAccuracy, ChargeSpeed_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modularGunController.ProcessStats(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / (float)(1 + ReturnStack(modulePrinterCore)); } public int ProcessClipSize(int f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return (int)((float)f * 2.25f); } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return (f + 20f) * (5f * (float)num); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 0.8f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 2f; ProjectileData baseData3 = p.baseData; baseData3.force *= 2f; p.UpdateSpeed(); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { modularGunController.ProcessStats(); } static UncontrolledBlast() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(UncontrolledBlast)); val.Name = "Uncontrolled Blast"; val.Description = "Spray And Pray"; val.LongDescription = "Massively boosts clip size and fire rate (+More Fire Rate per stack),but reduces damage and gives virtually uncontrollable spread. (+Even More Spread per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("uncontrolledblast_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PaceBreaker : DefaultModule { public static ItemTemplate template; public static int ID; public Scrapper.ActiveItemMode PulseMode = new Scrapper.ActiveItemMode { Removable = true, spriteCollection = StaticCollections.Item_Collection, Sprite_Name = "pulse", OnUsed = OnUsed }; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("pacebreaker_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Pace Breaker " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = StaticColorHexes.AddColorToLabelString("Taking damage grants charge to your active items.\nAdds a new mode to your starter active item", StaticColorHexes.Lime_Green_Hex) + ".\nUsing an active item now releases an electromagnetic pulse\nwho's strength scales off of how long the active item takes to charge.\n(" + StaticColorHexes.AddColorToLabelString("+More Power", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.EnergyConsumption = 1f; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.65f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public static void OnUsed(PlayerController p, Scrapper scrapper) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) float num = BraveUtility.RandomAngle(); for (int i = 0; i < 6; i++) { PickupObject byId = PickupObjectDatabase.GetById(13); GameObject val = SpawnManager.SpawnProjectile(((Component)((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]).gameObject, Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter), Quaternion.Euler(0f, 0f, (float)(60 * i) + num), true); Projectile component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.baseData.damage = 8f; component.Owner = (GameActor)(object)p; component.Shooter = ((BraveBehaviour)p).specRigidbody; p.DoPostProcessProjectile(component); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces += 3; orAddComponent.damageMultiplierOnBounce = 1.25f; } } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { foreach (PlayerItem activeItem in player.activeItems) { if (activeItem is Scrapper scrapper) { scrapper.AddMode(PulseMode); } } modulePrinter.OnDamaged = (Action)Delegate.Combine(modulePrinter.OnDamaged, new Action(OnTakenDamage)); player.OnUsedPlayerItem += DoEffect; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { foreach (PlayerItem activeItem in player.activeItems) { if (activeItem is Scrapper scrapper) { scrapper.RemoveMode(PulseMode); } } modulePrinter.OnDamaged = (Action)Delegate.Remove(modulePrinter.OnDamaged, new Action(OnTakenDamage)); player.OnUsedPlayerItem -= DoEffect; } public void OnTakenDamage(ModulePrinterCore modulePrinterCore, PlayerController pLayer) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_OBJ_chestwarp_use_01", ((Component)pLayer).gameObject); if (ConfigManager.DoVisualEffect) { for (int i = 0; i < 8; i++) { PickupObject byId = PickupObjectDatabase.GetById(156); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)pLayer).sprite.WorldCenter + new Vector2(Random.Range(1.25f, -1.25f), Random.Range(0.625f, -0.625f))), Quaternion.identity); tk2dBaseSprite component = val.GetComponent(); component.PlaceAtPositionByAnchor(Vector2.op_Implicit(((BraveBehaviour)pLayer).sprite.WorldCenter + new Vector2(Random.Range(1.25f, -1.25f), Random.Range(0.625f, -1.25f))), (Anchor)4); component.HeightOffGround = 35f; component.UpdateZDepth(); Object.Destroy((Object)(object)val, 3f); } } foreach (PlayerItem activeItem in pLayer.activeItems) { if ((Object)(object)activeItem != (Object)null) { activeItem.remainingDamageCooldown -= Mathf.Max(activeItem.damageCooldown * 0.33f, (float)(500 + 250 * ReturnStack(Stored_Core))); activeItem.remainingTimeCooldown -= Mathf.Min(activeItem.remainingTimeCooldown + 0.1f, Mathf.Max(activeItem.timeCooldown * 0.75f, 90f)); } } } private void DoEffect(PlayerController usingPlayer, PlayerItem usedItem) { //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_BOSS_lichC_zap_01", ((Component)usingPlayer).gameObject); int num = ReturnStack(Stored_Core); float num2 = 10f; if (ConfigManager.DoVisualEffect) { for (int i = 0; i < 4; i++) { PickupObject byId = PickupObjectDatabase.GetById(156); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)usingPlayer).sprite.WorldCenter + new Vector2(Random.Range(1.25f, -1.25f), Random.Range(0.625f, -0.625f))), Quaternion.identity); tk2dBaseSprite component = val.GetComponent(); component.PlaceAtPositionByAnchor(Vector2.op_Implicit(((BraveBehaviour)usingPlayer).sprite.WorldCenter + new Vector2(Random.Range(1.25f, -1.25f), Random.Range(0.625f, -1.25f))), (Anchor)4); component.HeightOffGround = 35f; component.UpdateZDepth(); Object.Destroy((Object)(object)val, 3f); } } num2 *= 1f + usedItem.timeCooldown / 5f * (float)num; num2 *= (float)(1 + usedItem.roomCooldown / 2 * num); num2 *= 1f + usedItem.damageCooldown / 50f * (float)num; num2 *= (usedItem.consumable ? ((float)usedItem.numberOfUses + 0.5f) : 1f); float num3 = num2 % 30f + 3f; Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)usingPlayer).sprite.WorldCenter), num2, num3); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)usingPlayer).sprite.WorldCenter), num2, num3); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)usingPlayer).sprite.WorldCenter), num3); ApplyActionToNearbyEnemies(((BraveBehaviour)usingPlayer).sprite.WorldCenter, 5f, usingPlayer.CurrentRoom, num2); Exploder.DoDistortionWave(((BraveBehaviour)usingPlayer).sprite.WorldCenter, num2 / 75f * ConfigManager.DistortionWaveMultiplier, 0.25f * ConfigManager.DistortionWaveMultiplier, num3, 0.3f + num3 / 100f); } public void ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room, float Power) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (!Object.op_Implicit((Object)(object)room.activeEnemies[i])) { continue; } AIActor val = room.activeEnemies[i]; bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num; } if (flag) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)val).behaviorSpeculator) && !((BraveBehaviour)val).behaviorSpeculator.ImmuneToStun && Power > 50f) { ((BraveBehaviour)val).behaviorSpeculator.Stun(0.1f + Power / 100f, true); } ((BraveBehaviour)val).healthHaver.ApplyDamage(5f * (Power / 6.66f), TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), "Vent", (CoreDamageTypes)4, (DamageCategory)0, false, (PixelCollider)null, false); } } } static PaceBreaker() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PaceBreaker)); val.Name = "Pace Breaker"; val.Description = "Heartbeat"; val.LongDescription = "Taking damage grants charge to your active items. Adds a new mode to your starter active item. Using an active item now releases an electromagnetic pulse who's strength scales off of how long the active item takes to charge. (+More Power per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("pacebreaker_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class TachyonWarp : DefaultModule { public static ItemTemplate template; public static VFXPool greenImpact; public static int ID; public static void PostInit(PickupObject v) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("tachyonwarp_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Tachyon Warp " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Greatly increases accuracy, adds slight homing to your projectiles\nand increases damage (" + StaticColorHexes.AddColorToLabelString("+Stronger Homing and Damage", StaticColorHexes.Light_Orange_Hex) + ").\nProjectiles fire from walls, instead of your gun.\nFiring slightly pushes away nearby enemies. (" + StaticColorHexes.AddColorToLabelString("+Stronger Push Force", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.OverrideScrapCost = 7; defaultModule.AdditionalWeightMultiplier = 0.8f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.IsUncraftable = true; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; VFXPool val = new VFXPool(); val.type = (VFXPoolType)4; VFXComplex[] array = new VFXComplex[1]; VFXComplex val2 = new VFXComplex(); VFXObject[] array2 = new VFXObject[1]; VFXObject val3 = new VFXObject(); ref GameObject effect = ref val3.effect; PickupObject byId = PickupObjectDatabase.GetById(345); effect = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects[0].effects[0].effect; array2[0] = val3; val2.effects = (VFXObject[])(object)array2; array[0] = val2; val.effects = (VFXComplex[])(object)array; greenImpact = val; ModulePrinterCore.ModifyForChanceBulletsOneFrameDelay = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBulletsOneFrameDelay, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (!(Random.value > 0.02f)) { int num = 1; Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (float)(50 * num), 5f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (float)(50 * num), 5f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), 5f); Position position = ((BraveBehaviour)p).specRigidbody.Position; Vector2 unitPosition = ((Position)(ref position)).UnitPosition; Vector2 val = FindExpectedEndPoint(p); ((BraveBehaviour)p).transform.position = Vector2Extensions.ToVector3ZisY(val, 0f); ((BraveBehaviour)p).specRigidbody.Reinitialize(); Vector2 val2 = val - unitPosition; p.Direction = ((Vector2)(ref val2)).normalized; p.SendInDirection(p.Direction * -1f, true, true); p.m_distanceElapsed = 0f; p.LastPosition = ((BraveBehaviour)p).transform.position; greenImpact.SpawnAtPosition(Vector2Extensions.ToVector3ZisY(val, 0f), 0f, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)null, false, (SpawnMethod)null, (tk2dBaseSprite)null, false); ProjectileData baseData = p.baseData; baseData.range += 11f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1.5f; ProjectileData baseData3 = p.baseData; baseData3.force *= 0.33f; p.UpdateSpeed(); HomingModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.AngularVelocity += (float)(60 * num); orAddComponent.HomingRadius += (float)(5 * num); p.pierceMinorBreakables = true; ProjectileData baseData4 = p.baseData; baseData4.damage *= 1f + 0.2f * (float)num; p.IgnoreTileCollisionsFor(4f / p.baseData.speed); p.UpdateCollisionMask(); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { PickupObject byId = PickupObjectDatabase.GetById(228); modularGunController.ChangeMuzzleFlash(((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects); modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { Accuracy_Process = ProcessAccuracy }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f - (f - f / 1.5f); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_0100: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (float)(50 * num), 5f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (float)(50 * num), 5f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), 5f); Position position = ((BraveBehaviour)p).specRigidbody.Position; Vector2 unitPosition = ((Position)(ref position)).UnitPosition; Vector2 val = FindExpectedEndPoint(p); ((BraveBehaviour)p).transform.position = Vector2Extensions.ToVector3ZisY(val, 0f); ((BraveBehaviour)p).specRigidbody.Reinitialize(); Vector2 val2 = val - unitPosition; p.Direction = ((Vector2)(ref val2)).normalized; p.SendInDirection(p.Direction * -1f, true, true); p.m_distanceElapsed = 0f; p.LastPosition = ((BraveBehaviour)p).transform.position; greenImpact.SpawnAtPosition(Vector2Extensions.ToVector3ZisY(val, 0f), 0f, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)null, false, (SpawnMethod)null, (tk2dBaseSprite)null, false); ProjectileData baseData = p.baseData; baseData.range += 11f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1.25f; ProjectileData baseData3 = p.baseData; baseData3.force *= 0.33f; p.UpdateSpeed(); HomingModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.AngularVelocity += (float)(60 * num); orAddComponent.HomingRadius += (float)(5 * num); p.pierceMinorBreakables = true; ProjectileData baseData4 = p.baseData; baseData4.damage *= 1f + 0.2f * (float)num; p.IgnoreTileCollisionsFor(4f / p.baseData.speed); p.UpdateCollisionMask(); } protected Vector2 FindExpectedEndPoint(Projectile projectile) { //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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Invalid comparison between Unknown and I4 //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) Dungeon dungeon = GameManager.Instance.Dungeon; Vector2 unitCenter = ((BraveBehaviour)projectile).specRigidbody.UnitCenter; Vector2 direction = projectile.Direction; Vector2 val = unitCenter + ((Vector2)(ref direction)).normalized * projectile.baseData.range; RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(unitCenter); bool flag = false; Vector2 val2 = unitCenter; IntVector2 val3 = Vector2Extensions.ToIntVector2(val2, (VectorConversions)0); if (dungeon.data.CheckInBoundsAndValid(val3)) { flag = dungeon.data[val3].isExitCell; } float num = val.x - unitCenter.x; float num2 = val.y - unitCenter.y; float num3 = Mathf.Sign(val.x - unitCenter.x); float num4 = Mathf.Sign(val.y - unitCenter.y); bool flag2 = num3 > 0f; bool flag3 = num4 > 0f; int num5 = 0; IntVector2 val4 = default(IntVector2); while (Vector2.Distance(val2, val) > 0.1f && num5 < 10000) { num5++; float num6 = Mathf.Abs((((!flag2) ? Mathf.Floor(val2.x) : Mathf.Ceil(val2.x)) - val2.x) / num); float num7 = Mathf.Abs((((!flag3) ? Mathf.Floor(val2.y) : Mathf.Ceil(val2.y)) - val2.y) / num2); int num8 = Mathf.FloorToInt(val2.x); int num9 = Mathf.FloorToInt(val2.y); ((IntVector2)(ref val4))..ctor(num8, num9); bool flag4 = false; if (!dungeon.data.CheckInBoundsAndValid(val4)) { break; } CellData val5 = dungeon.data[val4]; if (val5.nearestRoom != absoluteRoom || val5.isExitCell != flag) { break; } if ((int)val5.type != 1) { flag4 = true; } if (flag4) { val3 = val4; } if (num6 < num7) { num8++; val2.x += num6 * num + 0.1f * Mathf.Sign(num); val2.y += num6 * num2 + 0.1f * Mathf.Sign(num2); } else { num9++; val2.x += num7 * num + 0.1f * Mathf.Sign(num); val2.y += num7 * num2 + 0.1f * Mathf.Sign(num2); } } return ((IntVector2)(ref val3)).ToCenterVector2(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.RevertMuzzleFlash(); modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } static TachyonWarp() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TachyonWarp)); val.Name = "Tachyon Warp"; val.Description = "WARP ZONE!!!!"; val.LongDescription = "Greatly increases accuracy, adds slight homing to your projectiles and slightly increases damage (+Stronger Homing and Damage per stack). Projectiles fire from walls, instead of your gun. Firing slightly pushes away nearby enemies. (+Stronger push force per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("tachyonwarp_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BifurificationBarrel : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("bifurificationbarrel_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Bifurcated Barrel " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases rate of fire by 15% (" + StaticColorHexes.AddColorToLabelString("+15% hyperbolically", StaticColorHexes.Light_Orange_Hex) + "),\nclip size by 20% (" + StaticColorHexes.AddColorToLabelString("+20%", StaticColorHexes.Light_Orange_Hex) + "), slightly reduces damage,\nbut makes you fire in a V-formation"; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.OverrideScrapCost = 10; defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.IsUncraftable = true; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RegisterAction(Stats_AdditionalVolleyModifiers); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); player.stats.AdditionalVolleyModifiers += Stats_AdditionalVolleyModifiers; player.stats.RecalculateStats(player, false, false); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate, ClipSize_Process = ProcessClipSize }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.DeregisterAction(Stats_AdditionalVolleyModifiers); player.stats.AdditionalVolleyModifiers -= Stats_AdditionalVolleyModifiers; player.stats.RecalculateStats(player, false, false); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.speed *= 1.15f; ProjectileData baseData2 = p.baseData; baseData2.damage *= 0.7f; ProjectileData baseData3 = p.baseData; baseData3.force *= 0.7f; p.UpdateSpeed(); } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip + modularGunController.Base_Clip_Size / 5 * modulePrinterCore.ReturnStack(LabelName); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.15f * (float)num)); } private void Stats_AdditionalVolleyModifiers(ProjectileVolleyData obj) { Toolbox.ModifyVolley(obj, ((PassiveItem)Stored_Core).Owner, 1, 72f, 3f, 3f, 0, null, 1); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { player.stats.RecalculateStats(player, false, false); } static BifurificationBarrel() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BifurificationBarrel)); val.Name = "Bifurcated Barrel"; val.Description = "Two-For-One"; val.LongDescription = "Increases rate of fire by 15% (+15% hyperbolically per stack), clip size by 20% (+20% per stack),slightly reduces damage but makes you fire in a V-formation."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("bifurificationbarrel_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class QuantumLeap : DefaultModule { public class QuantumComponent : MonoBehaviour { public int Stack; private bool isInStasis = false; private Shader savedMaterial; private float savedSpeed; public Projectile self; private void Start() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) allActiveComps.Add(this); savedMaterial = ((BraveBehaviour)((BraveBehaviour)self).sprite).renderer.material.shader; savedSpeed = self.baseData.speed; ((BraveBehaviour)((BraveBehaviour)self).sprite).renderer.material.shader = StaticShaders.Hologram_Shader; self.baseData.speed = 0f; self.UpdateSpeed(); isInStasis = true; self.collidesWithEnemies = false; self.UpdateCollisionMask(); if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(13); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)self).sprite.WorldCenter), Quaternion.identity); Object.Destroy((Object)(object)val, 3f); } } public void DoCloak() { //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_00e6: Unknown result type (might be due to invalid IL or missing references) if (isInStasis) { return; } if ((Object)(object)self == (Object)null) { OnDestroy(); return; } isInStasis = true; ((BraveBehaviour)((BraveBehaviour)self).sprite).renderer.material.shader = StaticShaders.Hologram_Shader; self.baseData.speed = 0f; self.UpdateSpeed(); self.collidesWithEnemies = false; self.UpdateCollisionMask(); if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(13); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)self).sprite.WorldCenter), Quaternion.identity); Object.Destroy((Object)(object)val, 3f); } } public void Redirect() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) if (isInStasis && !((Object)(object)self == (Object)null)) { if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(13); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)self).sprite.WorldCenter), Quaternion.identity); Object.Destroy((Object)(object)val, 3f); } self.collidesWithEnemies = true; self.UpdateCollisionMask(); ((BraveBehaviour)((BraveBehaviour)self).sprite).renderer.material.shader = savedMaterial; self.baseData.speed = savedSpeed; ProjectileData baseData = self.baseData; baseData.range += 10f; self.UpdateSpeed(); HomingModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)self).gameObject); orAddComponent.AngularVelocity += 45f + (float)Stack * 22.5f; orAddComponent.HomingRadius += (float)(4 + Stack); isInStasis = false; BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)self).gameObject); orAddComponent2.numberOfBounces += Stack * 2; self.pierceMinorBreakables = true; PierceProjModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)self).gameObject); orAddComponent3.penetration += Stack; ProjectileData baseData2 = self.baseData; baseData2.damage *= 1f + 0.333f * (float)Stack; } } private void OnDestroy() { if (allActiveComps.Contains(this)) { allActiveComps.Remove(this); } } } public static ItemTemplate template; public static int ID; public static List allActiveComps; public static void PostInit(PickupObject v) { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("quantumleap_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Quantum Leap " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Doubles reload time and clip size.\nProjectiles fired are put into " + StaticColorHexes.AddColorToLabelString("Stasis", StaticColorHexes.Blue_Color_Hex) + ". Upon reloading, enter a Cloak that removes all of your projectiles\nfrom " + StaticColorHexes.AddColorToLabelString("Stasis", StaticColorHexes.Blue_Color_Hex) + ",\ngaining slight homing, damage and bouncing. (" + StaticColorHexes.AddColorToLabelString("+Bouncing and Damage", StaticColorHexes.Light_Orange_Hex) + ")\nExiting your cloak puts all of your projectiles back into " + StaticColorHexes.AddColorToLabelString("Stasis", StaticColorHexes.Blue_Color_Hex) + "."; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.85f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); defaultModule.OverrideScrapCost = 15; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { ClipSize_Process = ClipTime, Reload_Process = ReloadTime }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(PPP)); printer.OnGunReloaded = (Action)Delegate.Combine(printer.OnGunReloaded, new Action(OGR)); } public int ClipTime(int t, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return t * 2; } public float ReloadTime(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 2f; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int stack = ReturnStack(modulePrinterCore); QuantumComponent quantumComponent = ((Component)p).gameObject.AddComponent(); quantumComponent.self = p; quantumComponent.Stack = stack; } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { modulePrinterCore.cloakDoer.ProcessCloak(new CloakDoer.CloakContext { Length = g.reloadTime, OnForceCloakBroken = PP, OnCloakBroken = PP, OnEnteredCloak = PP_E }); } public void PP_E(PlayerController ppe) { for (int num = allActiveComps.Count - 1; num > -1; num--) { QuantumComponent quantumComponent = allActiveComps[num]; quantumComponent.Redirect(); } } public void PP(PlayerController ppe) { for (int num = allActiveComps.Count - 1; num > -1; num--) { QuantumComponent quantumComponent = allActiveComps[num]; quantumComponent.DoCloak(); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(PPP)); modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); player.stats.RecalculateStats(player, false, false); } static QuantumLeap() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(QuantumLeap)); val.Name = "Quantum Leap"; val.Description = "Particles In The Universe"; val.LongDescription = "Doubles reload time and clip size. Projectiles fired are put into Stasis. Upon reloading, enter a Cloak that removes all of your projectiles from Stasis, gaining slight homing, damage and bouncing. (+Bouncing and Damage per stack). Exiting your cloak puts all of your projectiles back into Stasis."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("quantumleap_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; allActiveComps = new List(); } } public class PredefinedCore : PassiveItem { public static ItemTemplate template; public static int predefinedCoreID; public static void PostInit(PickupObject v) { ((Component)v).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)v).gameObject); v.CustomCost = 10; v.SetupUnlockOnCustomFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR, requiredFlagValue: true); predefinedCoreID = v.PickupObjectId; AdditionalShopItemController.ShopItemContexts.Add(new AdditionalShopItemController.AdditionalShopItemContext { Condition = Cond, itemID = ID, offset = Offset }); ChooseModuleController.PrimaryOptionsModifier = (Func)Delegate.Combine(ChooseModuleController.PrimaryOptionsModifier, new Func(ReturnOptions)); ChooseModuleController.ModuleUICarrier.OnModuleSelected = (Action)Delegate.Combine(ChooseModuleController.ModuleUICarrier.OnModuleSelected, new Action(OnModuleDropped)); ChooseModuleController.AngleSpawnModifier = (Func)Delegate.Combine(ChooseModuleController.AngleSpawnModifier, new Func(Ret)); ChooseModuleController.RadiusSpawnModifier = (Func)Delegate.Combine(ChooseModuleController.RadiusSpawnModifier, new Func(Radius)); ChooseModuleController.PrimaryOptionsModifier = (Func)Delegate.Combine(ChooseModuleController.PrimaryOptionsModifier, new Func(ReturnOptions)); } public static float Radius(float angle) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPickupID(predefinedCoreID)) { angle += -1f; } } return angle; } public static float Ret(float angle) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPickupID(predefinedCoreID)) { angle += BraveUtility.RandomAngle(); } } return angle; } public static void OnModuleDropped(DefaultModule module, PlayerController c) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPickupID(predefinedCoreID)) { DefaultModule component = Object.Instantiate(((Component)GlobalModuleStorage.ReturnModule(module)).gameObject, Vector2.op_Implicit(((BraveBehaviour)module).sprite.WorldCenter), Quaternion.identity).GetComponent(); DebrisObject orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)component).gameObject); orAddComponent.shouldUseSRBMotion = true; orAddComponent.angularVelocity = 0f; ((EphemeralObject)orAddComponent).Priority = (EphemeralPriority)0; ((BraveBehaviour)orAddComponent).sprite.UpdateZDepth(); orAddComponent.Trigger(Vector3Extensions.WithZ(Vector3.up, 2f), 1f, 1f); component.OnEnteredRange(c); } } } public static int ReturnOptions(int c, ItemQuality q) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected I4, but got Unknown PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPickupID(predefinedCoreID)) { return (q - 1) switch { 0 => 1, 1 => 1, 2 => 1, 3 => 2, 4 => 2, _ => 2, }; } } return c; } public override void Pickup(PlayerController player) { AdvancedGameStatsManager.Instance.SetStat(CustomTrackedStats.ENCOUNTERS_OF_PREDEFINED, 1f); ((PassiveItem)this).Pickup(player); } public static bool Cond(AdditionalShopType shopType) { //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Invalid comparison between Unknown and I4 if ((Object)(object)GameManager.Instance == (Object)null) { return false; } if (AdvancedGameStatsManager.Instance == null) { return false; } if (!GameStatsManager.Instance.IsInSession) { return false; } if ((Object)(object)GameManager.Instance.Dungeon == (Object)null) { return false; } if (GameManager.Instance.AllPlayers.Count() == 0) { return false; } if ((AdvancedGameStatsManager.Instance == null) | !AdvancedGameStatsManager.Instance.IsInSession) { return false; } if (AdvancedGameStatsManager.Instance.m_sessionStats == null || AdvancedGameStatsManager.Instance.m_savedSessionStats == null) { return false; } if (AdvancedGameStatsManager.Instance.GetSessionStatValue(CustomTrackedStats.ENCOUNTERS_OF_PREDEFINED) > 0f) { return false; } if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)) { return false; } if ((int)shopType > 0) { return false; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((Object)(object)val.PlayerHasCore() != (Object)null && !val.HasPickupID(predefinedCoreID)) { return true; } } return false; } public static Tuple ID() { return new Tuple(predefinedCoreID, 30); } public static Vector3 Offset(AdditionalShopType shopType) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_002d: 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_0031: Unknown result type (might be due to invalid IL or missing references) Vector3 result = default(Vector3); ((Vector3)(ref result))..ctor(0f, 0f); if ((int)shopType == 0) { ((Vector3)(ref result))..ctor(6.125f, 1.625f); } return result; } public override DebrisObject Drop(PlayerController player) { DebrisObject val = ((PassiveItem)this).Drop(player); val.OnTouchedGround = (Action)Delegate.Combine(val.OnTouchedGround, (Action)delegate(DebrisObject obj) { //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_0040: Unknown result type (might be due to invalid IL or missing references) ExplosionData val2 = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val2.ignoreList = new List { ((BraveBehaviour)player).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), val2, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)obj).gameObject); }); return val; } static PredefinedCore() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ConfidenceCore)); val.Name = "Predefined Drive"; val.Description = "Certain Fate"; val.LongDescription = "While held, vastly reduces the choices when selecting modules, but grants 2 of a selected module.\n\nI've got this."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("halfchoices_drive"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PerformanceCore : PassiveItem { public static ItemTemplate template; public static int PerformanceDriveID; public static void PostInit(PickupObject v) { ((Component)v).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)v).gameObject); PerformanceDriveID = v.PickupObjectId; } public override void Pickup(PlayerController player) { GameStatsManager.Instance.isTurboMode = true; ((PassiveItem)this).Pickup(player); } public override DebrisObject Drop(PlayerController player) { GameStatsManager.Instance.isTurboMode = false; DebrisObject val = ((PassiveItem)this).Drop(player); val.OnTouchedGround = (Action)Delegate.Combine(val.OnTouchedGround, (Action)delegate(DebrisObject obj) { //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_0040: Unknown result type (might be due to invalid IL or missing references) ExplosionData val2 = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val2.ignoreList = new List { ((BraveBehaviour)player).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), val2, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)obj).gameObject); }); return val; } public override void OnDestroy() { GameStatsManager.Instance.isTurboMode = false; ((PassiveItem)this).OnDestroy(); } static PerformanceCore() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PerformanceCore)); val.Name = "Performance Drive"; val.Description = "Brain Power"; val.LongDescription = "Overclocks all your systems, everything is faster!\n\nDestroyed when dropped."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("cqc_drive"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class AllocationCore : PassiveItem { public static ItemTemplate template; public static int AllocationCoreID; public static void PostInit(PickupObject v) { ((Component)v).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)v).gameObject); ItemBuilder.AddPassiveStatModifier(v, (StatType)6, 1.1f, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier(v, (StatType)16, 0.5f, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier(v, (StatType)5, 1.2f, (ModifyMethod)1); AllocationCoreID = v.PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); } public override DebrisObject Drop(PlayerController player) { DebrisObject val = ((PassiveItem)this).Drop(player); val.OnTouchedGround = (Action)Delegate.Combine(val.OnTouchedGround, (Action)delegate(DebrisObject obj) { //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_0040: Unknown result type (might be due to invalid IL or missing references) ExplosionData val2 = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val2.ignoreList = new List { ((BraveBehaviour)player).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), val2, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)obj).gameObject); }); return val; } static AllocationCore() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(AllocationCore)); val.Name = "Allocation Drive"; val.Description = "Switched Around"; val.LongDescription = "More power drawn to your weapon! Just make sure you land your shots.\n\nDestroyed when dropped."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("allocation_drive"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class CloseQuartersCore : PassiveItem { public static ItemTemplate template; public float Fade = 1f; public static int CQCID; public static void PostInit(PickupObject v) { ((Component)v).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)v).gameObject); ItemBuilder.AddPassiveStatModifier(v, (StatType)2, 0.8f, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier(v, (StatType)22, 1.05f, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier(v, (StatType)1, 1.05f, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier(v, (StatType)5, 1.05f, (ModifyMethod)1); CQCID = v.PickupObjectId; } public override void Pickup(PlayerController player) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFade(1f, 0.65f)); ((PassiveItem)this).Pickup(player); } public IEnumerator DoFade(float S_V, float E_V) { float e = 0f; while (e < 0.45f) { float t = e / 0.45f; Fade = Mathf.Lerp(S_V, E_V, t); e += BraveTime.DeltaTime; yield return null; } } public IEnumerator DoFadeReal(float S_V, float E_V) { float e = 0f; while (e < 0.45f) { float t = e / 0.45f; Pixelator.Instance.fade = Mathf.Lerp(S_V, E_V, t); e += BraveTime.DeltaTime; yield return null; } } public override void Update() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((PassiveItem)this).Owner)) { Pixelator.Instance.fade = Fade; Pixelator.Instance.FadeColor = Color.red; } ((PassiveItem)this).Update(); } public override DebrisObject Drop(PlayerController player) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFadeReal(Pixelator.Instance.fade, 1f)); DebrisObject val = ((PassiveItem)this).Drop(player); val.OnTouchedGround = (Action)Delegate.Combine(val.OnTouchedGround, (Action)delegate(DebrisObject obj) { //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_0040: Unknown result type (might be due to invalid IL or missing references) ExplosionData val2 = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val2.ignoreList = new List { ((BraveBehaviour)player).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), val2, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)obj).gameObject); }); return val; } public override void OnDestroy() { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFadeReal(Pixelator.Instance.fade, 1f)); ((PassiveItem)this).OnDestroy(); } static CloseQuartersCore() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CloseQuartersCore)); val.Name = "Optics Drive"; val.Description = "The World Looks Red"; val.LongDescription = "Calibrated systems, at the cost of some visual distortion.\n\nDestroyed when dropped."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("performance_drive"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class HighValueInfo : PassiveItem { public static ItemTemplate template; public static int CoolInfoID; public static void PostInit(PickupObject v) { ((Component)v).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)v).gameObject); CoolInfoID = v.PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); player.OnReceivedDamage += Player_OnReceivedDamage; } private void Player_OnReceivedDamage(PlayerController obj) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) obj.RemovePassiveItem(((PickupObject)this).PickupObjectId); Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), StaticExplosionDatas.explosiveRoundsExplosion, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); obj.OnReceivedDamage -= Player_OnReceivedDamage; } public override DebrisObject Drop(PlayerController player) { player.OnReceivedDamage -= Player_OnReceivedDamage; DebrisObject val = ((PassiveItem)this).Drop(player); val.OnTouchedGround = (Action)Delegate.Combine(val.OnTouchedGround, (Action)delegate(DebrisObject obj) { //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_0040: Unknown result type (might be due to invalid IL or missing references) ExplosionData val2 = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val2.ignoreList = new List { ((BraveBehaviour)player).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), val2, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)obj).gameObject); }); return val; } static HighValueInfo() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HighValueInfo)); val.Name = "High-Value Information"; val.Description = "Worth A Lot"; val.LongDescription = "A pocket drive with all of Hegemony Mechanic's hidden military caches. This will go for a pretty penny on the outside.\n\nVERY fragile.\n\nDestroyed when dropped."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("highValueInfo"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class HeavyweightRounds : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00d0: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("heavyrounds_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelName = "Heavyweight Rounds" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Damage by 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + "),\nand bullet size by 25% (" + StaticColorHexes.AddColorToLabelString("+25%", StaticColorHexes.Light_Orange_Hex) + ")\nbut reduces player bullet speed by 50% (" + StaticColorHexes.AddColorToLabelString("+50% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.075f)) { ProjectileData baseData = p.baseData; baseData.damage *= 1.33f; p.AdditionalScaleMultiplier *= 1.25f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 0.5f; ProjectileData baseData3 = p.baseData; baseData3.force *= 0.75f; p.UpdateSpeed(); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.33f * (float)num; p.AdditionalScaleMultiplier *= 1f + 0.25f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f - (1f - 1f / (1f + 0.5f * (float)num)); ProjectileData baseData3 = p.baseData; baseData3.force *= 1f - (1f - 1f / (1f + 0.25f * (float)num)); p.UpdateSpeed(); } static HeavyweightRounds() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HeavyweightRounds)); val.Name = "Heavyweight Rounds"; val.Description = "Plonk"; val.LongDescription = "Increases Damage by 33% (+33%) and bullet size by 25% (+25%) but reduces player bullet speed by 50% (+50% hyperbolically per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("heavyrounds_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BattersRevenge : DefaultModule { public class BallComponent : BraveBehaviour { public int Stack = 1; public void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BraveBehaviour)this).projectile).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(PreToss)); ((MonoBehaviour)this).StartCoroutine(DoWait()); } public IEnumerator DoWait() { Projectile p = ((BraveBehaviour)this).projectile; float e = 0f; while (e < 0.75f) { if ((Object)(object)p == (Object)null) { yield break; } e += BraveTime.DeltaTime; yield return null; } SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(PreToss)); SpeculativeRigidbody specRigidbody2 = ((BraveBehaviour)p).specRigidbody; specRigidbody2.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody2.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(HandleHitEnemyHitEnemy)); } private void PreToss(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { Projectile projectile = ((BraveBehaviour)otherRigidbody).projectile; if ((Object)(object)projectile != (Object)null) { PhysicsEngine.SkipCollision = true; myRigidbody.RegisterTemporaryCollisionException(otherRigidbody, 0.25f, (float?)null); } } private void HandleHitEnemyHitEnemy(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { //IL_006f: 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_0090: 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_00be: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) Projectile projectile = ((BraveBehaviour)otherRigidbody).projectile; if ((Object)(object)projectile != (Object)null && (Object)(object)((Component)otherRigidbody).GetComponent() == (Object)null) { PhysicsEngine.SkipCollision = true; myRigidbody.RegisterTemporaryCollisionException(otherRigidbody, 1f, (float?)null); GameActor owner = projectile.Owner; if ((Object)(object)((owner is PlayerController) ? owner : null) != (Object)null) { ((BraveBehaviour)myRigidbody).projectile.hitEffects.HandleProjectileDeathVFX(((BraveBehaviour)myRigidbody).transform.position, 0f, ((BraveBehaviour)myRigidbody).transform, Vector2.op_Implicit(((BraveBehaviour)myRigidbody).transform.position), otherRigidbody.Velocity, false); SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BraveBehaviour)myRigidbody).projectile).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(HandleHitEnemyHitEnemy)); ((BraveBehaviour)myRigidbody).projectile.collidesWithProjectiles = false; ((BraveBehaviour)myRigidbody).projectile.collidesOnlyWithPlayerProjectiles = false; myRigidbody.Reinitialize(); ((BraveBehaviour)myRigidbody).projectile.SendInDirection(otherRigidbody.Velocity, true, true); ((BraveBehaviour)myRigidbody).projectile.baseData.UsesCustomAccelerationCurve = false; ((BraveBehaviour)myRigidbody).projectile.baseData.speed = 60f; ((BraveBehaviour)myRigidbody).projectile.UpdateSpeed(); ProjectileData baseData = ((BraveBehaviour)myRigidbody).projectile.baseData; baseData.damage += ((BraveBehaviour)otherRigidbody).projectile.baseData.damage; ProjectileData baseData2 = ((BraveBehaviour)myRigidbody).projectile.baseData; baseData2.damage *= 1f + 0.25f * (float)Stack; ((Component)((BraveBehaviour)myRigidbody).projectile).gameObject.AddComponent(); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)((BraveBehaviour)myRigidbody).projectile).gameObject); orAddComponent.bouncesTrackEnemies = false; orAddComponent.numberOfBounces += 3; } } else if ((Object)(object)((Component)otherRigidbody).GetComponent() != (Object)null) { myRigidbody.RegisterTemporaryCollisionException(otherRigidbody, 1f, (float?)null); PhysicsEngine.SkipCollision = true; } } } public static ItemTemplate template; public static Projectile Ballin; public static int ID; public static void PostInit(PickupObject v) { //IL_00c8: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("battersrevenge_tier1_module_alt.png"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.LabelName = "Batters Revenge " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Reduces reload time by 20% (" + StaticColorHexes.AddColorToLabelString("+20% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ").\nWhen reloading, toss out 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") baseballs that can be shot\nto pitch them. Damage scales with the projectile that hit it.\n(" + StaticColorHexes.AddColorToLabelString("+Higher Damage Scaling", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(541); Projectile projectile = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile; PickupObject byId2 = PickupObjectDatabase.GetById(88); Projectile val = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); ((Component)val).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)val).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)val).gameObject); val.baseData.damage = 10f; val.shouldRotate = false; val.baseData.range = 1000f; val.baseData.speed = 8f; val.baseData.force = 50f; val.baseData.UsesCustomAccelerationCurve = true; val.baseData.AccelerationCurve = AnimationCurve.Linear(0.1f, 0.7f, 1f, 0f); val.collidesWithProjectiles = true; val.collidesOnlyWithPlayerProjectiles = true; ((Component)val).gameObject.AddComponent(); val.AnimateProjectileBundle("ballin", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "ballin", new List { new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10), new IntVector2(10, 10) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 9), ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues(value: false, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9)); ref string objectImpactEventName = ref val.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(384); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(384); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; val.hitEffects.tileMapHorizontal = Toolbox.MakeObjectIntoVFX(projectile.hitEffects.enemy.effects.First().effects.First().effect); val.hitEffects.tileMapVertical = Toolbox.MakeObjectIntoVFX(projectile.hitEffects.enemy.effects.First().effects.First().effect); val.hitEffects.enemy = Toolbox.MakeObjectIntoVFX(projectile.hitEffects.enemy.effects.First().effects.First().effect); val.hitEffects.deathAny = Toolbox.MakeObjectIntoVFX(projectile.hitEffects.enemy.effects.First().effects.First().effect); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); orAddComponent.bouncesTrackEnemies = false; orAddComponent.numberOfBounces = 1; ImprovedAfterImage improvedAfterImage = ((Component)val).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0.8f, 0.8f, 0.8f, 1f); Ballin = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); gunStatModifier = new ModuleGunStatModifier { Name = "Batters_Revenge", Reload_Process = ProcessReloadTime }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public float ProcessReloadTime(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.2f * (float)num)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); for (int i = 0; i < num; i++) { float accuracy = modulePrinterCore.ModularGunController.GetAccuracy(15f); GameObject val = SpawnManager.SpawnProjectile(((Component)Ballin).gameObject, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Quaternion.Euler(0f, 0f, ((GameActor)player).CurrentGun.CurrentAngle + Random.Range(0f - accuracy, accuracy)), true); Projectile component = val.GetComponent(); if ((Object)(object)component != (Object)null) { ProjectileData baseData = component.baseData; baseData.speed *= Random.Range(0.85f, 1.5f); component.UpdateSpeed(); component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; ((Component)component).GetComponent().Stack = num; } } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } static BattersRevenge() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BattersRevenge)); val.Name = "Batters Revenge"; val.Description = "The Best Weapon"; val.LongDescription = "Reduces reload time by 20% (+20% per stack hyperbolically) When reloading, toss out 1 (+1) baseballs that can be shot to pitch them. Damage scales with the projectile that hit it. (+Higher Damage Scaling per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("battersrevenge_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class CleaningProtocol : DefaultModule { public static ItemTemplate template; public static int ID; private List enemyC = new List(); public static void PostInit(PickupObject v) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("cleaner_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Cleaning Protocol " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Deal 66% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ") more damage to enemies above 90% HP.\nAll enemies take an additional 20% (" + StaticColorHexes.AddColorToLabelString("+20%", StaticColorHexes.Light_Orange_Hex) + ")\nextra damage from various effects."; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (Random.value > 0.03f) { return; } ((BraveBehaviour)p).specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody o, PixelCollider t, SpeculativeRigidbody th, PixelCollider fr) { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)th != (Object)null && (Object)(object)((BraveBehaviour)th).healthHaver != (Object)null) { float maxHealth = ((BraveBehaviour)th).healthHaver.GetMaxHealth(); float num = maxHealth * 0.9f; float currentHealth = ((BraveBehaviour)th).healthHaver.GetCurrentHealth(); if (currentHealth > num) { float damage = ((BraveBehaviour)o).projectile.baseData.damage; ProjectileData baseData = ((BraveBehaviour)o).projectile.baseData; baseData.damage *= 1.66f; ((MonoBehaviour)GameManager.Instance).StartCoroutine(ChangeProjectileDamage(((BraveBehaviour)o).projectile, damage)); AkSoundEngine.PostEvent("Play_OBJ_cauldron_splash_01", ((Component)o).gameObject); ? val = ((BraveBehaviour)th).aiActor; PickupObject byId = PickupObjectDatabase.GetById(404); ((GameActor)val).PlayEffectOnActor(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect, Vector2.op_Implicit(new Vector2(0f, 0f)), true, false, false); } } }; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Combine(modulePrinter.OnEnteredCombat, new Action(EC)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); AIActor.OnPreStart = (Action)Delegate.Combine(AIActor.OnPreStart, new Action(OPEH)); } public void EC(ModulePrinterCore core, RoomHandler r, PlayerController p) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Expected O, but got Unknown List activeEnemies = r.GetActiveEnemies((ActiveEnemyType)1); if (activeEnemies == null) { return; } foreach (AIActor item in activeEnemies) { if (item.CanTargetPlayers && !enemyC.Contains(item)) { enemyC.Add(item); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)4, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)64, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)8, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)2, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)16, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)1, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)32, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); } } } public void OPEH(AIActor enemy) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_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_0124: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown if (enemy.CanTargetPlayers && !enemyC.Contains(enemy)) { enemyC.Add(enemy); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)4, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)64, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)8, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)2, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)16, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)1, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); ((BraveBehaviour)enemy).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)32, damageMultiplier = 1f + (0.2f + (float)ReturnStack(Stored_Core)) }); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Remove(modulePrinter.OnEnteredCombat, new Action(EC)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); AIActor.OnPreStart = (Action)Delegate.Remove(AIActor.OnPreStart, new Action(OPEH)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown int num = ReturnStack(modulePrinterCore); ((BraveBehaviour)p).specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody o, PixelCollider t, SpeculativeRigidbody th, PixelCollider fr) { //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)th != (Object)null && Object.op_Implicit((Object)(object)((BraveBehaviour)th).aiActor) && (Object)(object)((BraveBehaviour)th).healthHaver != (Object)null) { float maxHealth = ((BraveBehaviour)th).healthHaver.GetMaxHealth(); float num2 = maxHealth * 0.9f; float currentHealth = ((BraveBehaviour)th).healthHaver.GetCurrentHealth(); if (currentHealth > num2) { float damage = ((BraveBehaviour)o).projectile.baseData.damage; ProjectileData baseData = ((BraveBehaviour)o).projectile.baseData; baseData.damage *= 1f + (0.33f + 0.33f * (float)ReturnStack(modulePrinterCore)); ((MonoBehaviour)GameManager.Instance).StartCoroutine(ChangeProjectileDamage(((BraveBehaviour)o).projectile, damage)); AkSoundEngine.PostEvent("Play_OBJ_cauldron_splash_01", ((Component)o).gameObject); ? val = ((BraveBehaviour)th).aiActor; PickupObject byId = PickupObjectDatabase.GetById(404); ((GameActor)val).PlayEffectOnActor(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect, Vector2.op_Implicit(new Vector2(0f, 0f)), true, false, false); } } }; } private IEnumerator ChangeProjectileDamage(Projectile bullet, float oldDamage) { yield return (object)new WaitForSeconds(0.1f); if ((Object)(object)bullet != (Object)null) { bullet.baseData.damage = oldDamage; } } static CleaningProtocol() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CleaningProtocol)); val.Name = "Cleaning Protocol"; val.Description = "BRUSH"; val.LongDescription = "Deal 66% (+33% per stack) more damage to enemies above 90% HP.\nAll enemies take an additional 20% (+20% per stack) extra damage from various effects."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("cleaner_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PhantasmBoost : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject WarnVFX; public int Kills = 0; public static void PostInit(PickupObject v) { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("gravecooling_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Phantasm Boost " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Deal an additional 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ") more damage to Jammed enemies.\nReload 15% (" + StaticColorHexes.AddColorToLabelString("+15% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ") faster after every kill.\nBonus resets AFTER reloading.\nProjectiles will now be able to travel through\ninternal walls and pierce various debris."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.66f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("spooky3")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Generic_VFX_Animation; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); WarnVFX = val; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.05f)) { p.PenetratesInternalWalls = true; p.pierceMinorBreakables = true; p.UpdateCollisionMask(); p.BlackPhantomDamageMultiplier *= 1.33f; p.CurseSparks = true; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Reload_Process = ProcessReloadTime }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modularGunController.ProcessStats(); modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { AkSoundEngine.PostEvent("Play_WPN_Life_Orb_Fade_01", ((Component)player).gameObject); ((MonoBehaviour)player).StartCoroutine(DoWait(player)); } private IEnumerator DoWait(PlayerController p) { while (((GameActor)p).CurrentGun.IsReloading) { yield return null; } Kills = 0; } public void OKE(ModulePrinterCore modulePrinter, PlayerController player, AIActor enemy) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (enemy.IsNormalEnemy) { Kills++; GameObject val = ((GameActor)player).PlayEffectOnActor(WarnVFX, new Vector3(0f, 1.625f), true, false, false); val.GetComponent().PlayAndDestroyObject("ghostboop", (Action)null); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public float ProcessReloadTime(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.15f * (float)num * (float)Kills)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { modularGunController.ProcessStats(); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); p.BlackPhantomDamageMultiplier *= 1f + 0.33f * (float)num; p.CurseSparks = true; p.PenetratesInternalWalls = true; p.pierceMinorBreakables = true; p.UpdateCollisionMask(); } static PhantasmBoost() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PhantasmBoost)); val.Name = "Phantasm Boost"; val.Description = "Cold As The Grave"; val.LongDescription = "Deal an additional 33% (+33% per stack) damage to Jammed enemies. Reload 15% (+15% hyperbolically per stack) faster after every kill. Kill count resets AFTER reloading. Projectiles will now be able to travel through internal walls and pierce various debris."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("gravecooling_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class TableKinetics : DefaultModule { public static ItemTemplate template; public static int ID; public GameObject tableToInstantiate; public GameObject boostVFX; private bool Cooled_down = true; public static void PostInit(PickupObject v) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("tablekinetics_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Table Kinetics " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Enemies spawn tables when killed,\nand chance to spawn a table upon reloading.\nProjectiles will now pierce tables,\nand get a 25% (" + StaticColorHexes.AddColorToLabelString("+25%", StaticColorHexes.Light_Orange_Hex) + ") damage and speed boost.\nPiercing a table makes all other unflipped tables\n emit a shockwave (" + StaticColorHexes.AddColorToLabelString("+Shockwave Damage", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AdditionalWeightMultiplier = 0.75f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.EnergyConsumption = 1f; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; ref GameObject reference = ref (v as TableKinetics).tableToInstantiate; PickupObject byId = PickupObjectDatabase.GetById(644); reference = ((Component)((FoldingTableItem)((byId is FoldingTableItem) ? byId : null)).TableToSpawn).gameObject; ref GameObject reference2 = ref (v as TableKinetics).boostVFX; PickupObject byId2 = PickupObjectDatabase.GetById(370); reference2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if (Random.value > g.PercentageOfClipLeft()) { AkSoundEngine.PostEvent("Play_ITM_Folding_Table_Use_01", ((Component)player).gameObject); Vector2 centerPosition = ((GameActor)player).CenterPosition; Vector2 val = Vector3Extensions.XY(player.unadjustedAimPoint) - ((GameActor)player).CenterPosition; Vector2 val2 = centerPosition + ((Vector2)(ref val)).normalized; IntVector2? nearestAvailableCell = player.CurrentRoom.GetNearestAvailableCell(val2, (IntVector2?)IntVector2.One, (CellTypes?)(CellTypes)2, false, (CellValidator)null); GameObject obj = tableToInstantiate; IntVector2 value = nearestAvailableCell.Value; GameObject val3 = Object.Instantiate(obj, Vector2.op_Implicit(((IntVector2)(ref value)).ToVector2()), Quaternion.identity); SpeculativeRigidbody componentInChildren = val3.GetComponentInChildren(); FlippableCover component = val3.GetComponent(); Vector3Extensions.GetAbsoluteRoom(Vector3Extensions.XY(((BraveBehaviour)component).transform.position)).RegisterInteractable((IPlayerInteractable)(object)component); component.ConfigureOnPlacement(Vector3Extensions.GetAbsoluteRoom(Vector3Extensions.XY(((BraveBehaviour)component).transform.position))); componentInChildren.Initialize(); PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(componentInChildren, (int?)null, false); } } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(HandlePreCollision)); } private void HandlePreCollision(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { //IL_011d: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)otherRigidbody).gameObject).name == null || (!(((Object)((Component)otherRigidbody).gameObject).name == "Table_Vertical") && !(((Object)((Component)otherRigidbody).gameObject).name == "Table_Horizontal"))) { return; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)myRigidbody).projectile)) { ProjectileData baseData = ((BraveBehaviour)myRigidbody).projectile.baseData; baseData.damage *= 1f + 0.25f * (float)ReturnStack(Stored_Core); ProjectileData baseData2 = ((BraveBehaviour)myRigidbody).projectile.baseData; baseData2.speed *= 1f + 0.25f * (float)ReturnStack(Stored_Core); ProjectileData baseData3 = ((BraveBehaviour)myRigidbody).projectile.baseData; baseData3.force *= 1f + 0.5f * (float)ReturnStack(Stored_Core); ((BraveBehaviour)myRigidbody).projectile.UpdateSpeed(); myRigidbody.RegisterTemporaryCollisionException(otherRigidbody, 0.4f, (float?)null); AllTables(Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)otherRigidbody).transform.position)); if (ConfigManager.DoVisualEffect) { GameObject val = SpawnManager.SpawnVFX(boostVFX, true); val.transform.position = ((BraveBehaviour)((BraveBehaviour)myRigidbody).projectile).transform.position; val.transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(((BraveBehaviour)myRigidbody).projectile.LastVelocity)); val.GetComponent().HeightOffGround = 22f; Object.Destroy((Object)(object)val, 2f); } } PhysicsEngine.SkipCollision = true; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public void OKE(ModulePrinterCore modulePrinter, PlayerController player, AIActor aIActor) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_ITM_Folding_Table_Use_01", ((Component)player).gameObject); GameObject val = Object.Instantiate(tableToInstantiate, Vector2.op_Implicit(TransformExtensions.PositionVector2(((BraveBehaviour)aIActor).transform)), Quaternion.identity); SpeculativeRigidbody componentInChildren = val.GetComponentInChildren(); FlippableCover component = val.GetComponent(); Vector3Extensions.GetAbsoluteRoom(Vector3Extensions.XY(((BraveBehaviour)component).transform.position)).RegisterInteractable((IPlayerInteractable)(object)component); component.ConfigureOnPlacement(Vector3Extensions.GetAbsoluteRoom(Vector3Extensions.XY(((BraveBehaviour)component).transform.position))); componentInChildren.Initialize(); PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(componentInChildren, (int?)null, false); } public void Cooldown() { Cooled_down = true; } public void AllTables(RoomHandler r) { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if (!Cooled_down) { return; } Cooled_down = false; ((MonoBehaviour)this).Invoke("Cooldown", 0.75f); ReadOnlyCollection roomInteractables = r.GetRoomInteractables(); for (int i = 0; i < roomInteractables.Count; i++) { if (!r.IsRegistered(roomInteractables[i])) { continue; } IPlayerInteractable obj = roomInteractables[i]; FlippableCover val = (FlippableCover)(object)((obj is FlippableCover) ? obj : null); if ((Object)(object)val != (Object)null) { int num = ReturnStack(Stored_Core); if (ConfigManager.DoVisualEffect) { GameObject val2 = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val3 = Object.Instantiate(val2.gameObject, Vector2.op_Implicit(((BraveBehaviour)val).sprite.WorldCenter), Quaternion.identity); val3.transform.localScale = Vector3.one * 0.5f; Object.Destroy((Object)(object)val3, 2f); } Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)val).sprite.WorldCenter), (float)(40 * num), 3f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)val).sprite.WorldCenter), (float)(40 * num), 3f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)val).sprite.WorldCenter), 3f); ApplyActionToNearbyEnemies(((BraveBehaviour)val).sprite.WorldCenter, 3f, r, num); } } } public void ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room, float m) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (Object.op_Implicit((Object)(object)room.activeEnemies[i])) { AIActor val = room.activeEnemies[i]; bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num; } if (flag) { ((BraveBehaviour)val).healthHaver.ApplyDamage(7.5f * m, TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), "Vent", (CoreDamageTypes)4, (DamageCategory)0, false, (PixelCollider)null, false); } } } } static TableKinetics() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TableKinetics)); val.Name = "Table Kinetics"; val.Description = "Table-tic Railgun"; val.LongDescription = "Enemies spawn tables when killed, and chance to spawn a table upon reloading. Projectiles will now pierce tables, and get a 25% (+25% per stack) damage and speed boost. Piercing a table makes all other unflipped tables emit a shockwave (+Shockwave Damage)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("tablekinetics_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class HeatVectoring : DefaultModule { public static ItemTemplate template; public static int ID; public static Projectile proj; private bool IsOnCooldown = false; public static void PostInit(PickupObject v) { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Expected O, but got Unknown //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("heatvectoring_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Heat Vectoring " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants 10% (" + StaticColorHexes.AddColorToLabelString("+5%", StaticColorHexes.Light_Orange_Hex) + ") movement speed.\nDodgerolling releases 5 (" + StaticColorHexes.AddColorToLabelString("+4", StaticColorHexes.Light_Orange_Hex) + ") projectiles in the direction\nopposite of where you're moving.\nProjectiles gain all projectile-based effects.\nEffect recharges after 6 seconds."; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.EnergyConsumption = 1f; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(125); Projectile val = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]; PickupObject byId2 = PickupObjectDatabase.GetById(88); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)val2).gameObject); val2.baseData.damage = 18f; val2.shouldRotate = true; val2.baseData.range = 1000f; val2.baseData.speed = 35f; val2.baseData.force = 25f; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.Linear(0.1f, 0.2f, 1f, 1f); val2.AppliesFire = true; val2.FireApplyChance = 1f; val2.fireEffect = DebuffStatics.hotLeadEffect; val2.AnimateProjectileBundle("heatvector_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "heatvector_idle", new List { new IntVector2(11, 7), new IntVector2(11, 7), new IntVector2(11, 7), new IntVector2(11, 7), new IntVector2(11, 7), new IntVector2(11, 7), new IntVector2(11, 7) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 7), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 7), ProjectileToolbox.ConstructListOfSameValues(value: true, 7), ProjectileToolbox.ConstructListOfSameValues(value: false, 7), ProjectileToolbox.ConstructListOfSameValues(null, 7), ProjectileToolbox.ConstructListOfSameValues(null, 7), ProjectileToolbox.ConstructListOfSameValues(null, 7), ProjectileToolbox.ConstructListOfSameValues(null, 7)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(384); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(384); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; val2.hitEffects.tileMapHorizontal = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.hitEffects.tileMapVertical = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.hitEffects.enemy = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.hitEffects.deathAny = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.33f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0.8f, 0.2f, 0f, 1f); proj = val2; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Combine(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); modulePrinter.RollStarted = (Action)Delegate.Combine(modulePrinter.RollStarted, new Action(RollStarted)); } public void RollStarted(ModulePrinterCore core, PlayerController player, Vector2 direction) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) if (IsOnCooldown) { return; } AkSoundEngine.PostEvent("Play_ENM_Grip_Master_Eject_01", ((Component)player).gameObject); int num = ReturnStack(core); int num2 = 1 + num * 4; int num3 = num2 / 2 - num2; ? val = player; PickupObject byId = PickupObjectDatabase.GetById(370); GameObject val2 = ((GameActor)val).PlayEffectOnActor(((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect, new Vector3(1f, 0.375f), true, false, false); val2.transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(direction) + 180f); val2.transform.localScale = Vector3.one * 0.6f; Object.Destroy((Object)(object)val2, 1f); for (int i = num3 + 1; i < num2 / 2 + 1; i++) { GameObject val3 = SpawnManager.SpawnProjectile(((Component)proj).gameObject, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(direction) + (float)(15 * i) + 180f), true); Projectile component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; player.DoPostProcessProjectile(component); } } ((MonoBehaviour)player).StartCoroutine(DoCooldown(player)); } public IEnumerator DoCooldown(PlayerController p) { IsOnCooldown = true; float e = 0f; while (e < 6f) { e += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_ENM_ironmaiden_close_01", ((Component)p).gameObject); for (int I = 0; I < 30; I++) { GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(12 * I, 20f)), (float?)null, (float?)2f, (Color?)null, (SparksType)4); } IsOnCooldown = false; } public float ModifySpeed(Vector2 currentVelocity, ModulePrinterCore core, PlayerController player) { return 0.05f + 0.05f * (float)ReturnStack(core); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Remove(modulePrinter.VoluntaryMovement_Modifier, new Func(ModifySpeed)); modulePrinter.RollStarted = (Action)Delegate.Remove(modulePrinter.RollStarted, new Action(RollStarted)); } static HeatVectoring() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HeatVectoring)); val.Name = "Heat Vectoring"; val.Description = "Knock 'Em Down"; val.LongDescription = "Grants 10% (+5% per stack) movement speed. Dodgerolling releases 5 (+4 per stack) projectiles in the direction opposite of where you're moving. Projectiles gain all projectile-based effects. Effect recharges after 6 seconds."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("heatvectoring_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class TheScavenger : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("scavenger_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "The Scavenger " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Allows you to scrap Guns.\nGrants +5% damage (" + StaticColorHexes.AddColorToLabelString("+5%", StaticColorHexes.Light_Orange_Hex) + ") and +2.5% movement speed per Scrap."; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AdditionalWeightMultiplier *= 0.75f; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { Scrapper.OverrideCustomScrapCheck = (Func)Delegate.Combine(Scrapper.OverrideCustomScrapCheck, new Func(ReturnScrapForGun)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Combine(modulePrinter.VoluntaryMovement_Modifier, new Func(MovementMod)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public int ReturnScrapForGun(PickupObject obj, int currentCost) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (obj is Gun) { return Scrapper.ReturnAmountBasedOnTier(obj.quality); } return currentCost; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { float num = 1f + 0.05f * (float)GlobalConsumableStorage.GetConsumableOfName("Scrap") * (float)ReturnStack(modulePrinterCore); float num2 = 1f + 0.0125f * (float)GlobalConsumableStorage.GetConsumableOfName("Scrap") * (float)ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= num; ProjectileData baseData2 = p.baseData; baseData2.force *= num2; p.RuntimeUpdateScale(num2); } public float MovementMod(Vector2 currentVel, ModulePrinterCore core, PlayerController p) { return 0.025f * (float)GlobalConsumableStorage.GetConsumableOfName("Scrap"); } public int MSC(int amountOfScrap, ModulePrinterCore core, PlayerController player, Scrapper scrapper) { return ++amountOfScrap; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { Scrapper.OverrideCustomScrapCheck = (Func)Delegate.Remove(Scrapper.OverrideCustomScrapCheck, new Func(ReturnScrapForGun)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Remove(modulePrinter.VoluntaryMovement_Modifier, new Func(MovementMod)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } static TheScavenger() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TheScavenger)); val.Name = "The Scavenger"; val.Description = "Recycling"; val.LongDescription = "Allows you to scrap Guns. Grants 5% (+5% per stack) and 2.5% movement speed per Scrap."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("scavenger_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class STRING_EMPTY : DefaultModule { public class GlitchTileBehavior : MonoBehaviour { public IntVector2 position; private tk2dTileMap map; public RoomHandler currentRoom; private SpeculativeRigidbody body; public int Damage = 10; public float DelayTimer = 1.5f; private float e = 0f; public bool HasPlaced = false; public void Start() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown map = GameManager.Instance.Dungeon.MainTilemap; body = ((Component)this).GetComponent(); SpeculativeRigidbody obj = body; obj.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)obj.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); allglitchedTiles.Add(this); } public void OPC(SpeculativeRigidbody myBody, PixelCollider myCollider, SpeculativeRigidbody otherBody, PixelCollider otherCollider) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) PhysicsEngine.SkipCollision = true; if ((Object)(object)((BraveBehaviour)otherBody).aiActor != (Object)null) { ((BraveBehaviour)((BraveBehaviour)otherBody).aiActor).healthHaver.ApplyDamage((float)Damage, TransformExtensions.PositionVector2(((Component)this).transform), "ERROR", (CoreDamageTypes)1, (DamageCategory)0, false, (PixelCollider)null, false); myBody.RegisterTemporaryCollisionException(otherBody, 0.666f, (float?)null); } } public void Update() { e += BraveTime.DeltaTime; if (e > 0.2f) { e = 0f; ((Component)this).GetComponent().SetSprite(map.spriteCollection, Random.Range(0, map.spriteCollection.spriteDefinitions.Count())); } } public void Spread() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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) if (HasPlaced) { return; } IntVector2 val = directionReturn(); if (!(val == new IntVector2(-69, -69))) { CellData val2 = GameManager.Instance.Dungeon.data.cellData[val.x][val.y]; if (val2 != null) { IntVector2 positionInTilemap = GameManager.Instance.Dungeon.data.cellData[val.x][val.y].positionInTilemap; tk2dBaseSprite component = Object.Instantiate(DummySpriteObject, ((IntVector2)(ref positionInTilemap)).ToCenterVector3(5f), Quaternion.identity).GetComponent(); component.SetSprite(map.spriteCollection, Random.Range(0, map.spriteCollection.spriteDefinitions.Count())); component.usesOverrideMaterial = true; Material material = ((BraveBehaviour)component).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.4f); material.SetFloat("_DispProbability", 0.7f); material.SetFloat("_DispIntensity", 0.025f); material.SetFloat("_ColorProbability", 0.8f); material.SetFloat("_ColorIntensity", 0.1f); GlitchTileBehavior glitchTileBehavior = ((Component)component).gameObject.AddComponent(); glitchTileBehavior.position = positionInTilemap; glitchTileBehavior.currentRoom = currentRoom; glitchTileBehavior.Damage = Damage; glitchTileBehavior.DelayTimer = DelayTimer; Object.Destroy((Object)(object)((Component)this).gameObject, DelayTimer); HasPlaced = true; } } } private IntVector2 directionReturn() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) IntVector2 result = default(IntVector2); ((IntVector2)(ref result))..ctor(-69, -69); for (int num = 10; num > 0; num--) { Vector2 val = CanWeNotHaveSwitchCasesThatBreakMethods(); IntVector2 pain = new IntVector2(position.x + (int)val.x, position.y + (int)val.y); if (allglitchedTiles.Where((GlitchTileBehavior self) => self.position == pain).Count() == 0 && Vector3Extensions.GetAbsoluteRoom(((IntVector2)(ref pain)).ToCenterVector2()) == currentRoom) { result = pain; num = -1; } } return result; } private Vector2 CanWeNotHaveSwitchCasesThatBreakMethods() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) return (Vector2)(Random.Range(1, 5) switch { 1 => Vector2.up, 2 => Vector2.down, 3 => Vector2.left, 4 => Vector2.right, _ => Vector2.zero, }); } public void OnDestroy() { if (allglitchedTiles.Contains(this)) { allglitchedTiles.Remove(this); } } } public class GlitchProjectileBehavior : BraveBehaviour { public int stack = 1; public void Start() { ((BraveBehaviour)((BraveBehaviour)this).projectile).sprite.usesOverrideMaterial = true; Material material = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).projectile).sprite).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.1f); material.SetFloat("_DispProbability", 0.4f * ConfigManager.ImportantVFXMultiplier); material.SetFloat("_DispIntensity", 0.024f); material.SetFloat("_ColorProbability", 0.7f); material.SetFloat("_ColorIntensity", 0.1f); Projectile projectile = ((BraveBehaviour)this).projectile; projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, new Action(OHE)); } public void OHE(Projectile self, SpeculativeRigidbody enemy, bool fatal) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)enemy).aiActor) && !((BraveBehaviour)((BraveBehaviour)enemy).aiActor).healthHaver.IsBoss && !((BraveBehaviour)((BraveBehaviour)enemy).aiActor).healthHaver.IsSubboss && (Object)(object)((Component)enemy).gameObject.GetComponent() == (Object)null) { ((Component)enemy).gameObject.AddComponent(); } } public IEnumerator DoFreeze(AIActor enemy) { float f = enemy.LocalTimeScale; enemy.LocalTimeScale = 0f; float e = 0f; while (e < (float)stack) { e += BraveTime.DeltaTime; yield return null; } if (Object.op_Implicit((Object)(object)enemy)) { enemy.LocalTimeScale = f; } } } public class QuickFreeze : BraveBehaviour { private Material mat; private float lts; private float ela = 0f; public float Duration = 1f; public float DestroyTimer = 2f; public void Start() { //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) lts = ((BraveBehaviour)this).aiActor.LocalTimeScale; ((BraveBehaviour)this).aiActor.LocalTimeScale = 0f; mat = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_GlitchInterval", 0.1f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_DispProbability", 0.4f * ConfigManager.ImportantVFXMultiplier); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_DispIntensity", 0.024f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_ColorProbability", 0.7f); ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material.SetFloat("_ColorIntensity", 0.1f); GameObject val = (GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/VFX_Synergy_Poof_001"), ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform.position, Quaternion.identity); tk2dBaseSprite component = val.GetComponent(); Transform transform = val.transform; transform.localScale *= 2.5f; ((BraveBehaviour)component).sprite.usesOverrideMaterial = true; Material material = ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.1f); material.SetFloat("_DispProbability", 0.4f * ConfigManager.ImportantVFXMultiplier); material.SetFloat("_DispIntensity", 0.024f); material.SetFloat("_ColorProbability", 0.7f); material.SetFloat("_ColorIntensity", 0.1f); Object.Destroy((Object)(object)val, 1.5f); } public void Update() { ela += BraveTime.DeltaTime; if (ela > Duration) { ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite).renderer.material = mat; ((BraveBehaviour)this).aiActor.LocalTimeScale = lts; Object.Destroy((Object)(object)this, DestroyTimer); } } } public class GlitchPot : BraveBehaviour { private bool p = false; public void Start() { Material material = ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.1f); material.SetFloat("_DispProbability", 0.4f * ConfigManager.ImportantVFXMultiplier); material.SetFloat("_DispIntensity", 0.024f); material.SetFloat("_ColorProbability", 0.7f); material.SetFloat("_ColorIntensity", 0.1f); MinorBreakable val = ((Component)this).GetComponent() ?? ((Component)this).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)val)) { val.OnBreak = (Action)Delegate.Combine(val.OnBreak, new Action(OB)); } } public void OB() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) IEnumerable source = StaticReferenceManager.AllMinorBreakables.Where((MinorBreakable self) => (Object)(object)((Component)self).gameObject.GetComponent() == (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)this).transform), TransformExtensions.PositionVector2(((BraveBehaviour)self).transform)) < 9f); if (source.Count() <= 0) { return; } AkSoundEngine.PostEvent("Play_Glitch_Y", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)this).sprite.WorldCenter, 1f * ConfigManager.DistortionWaveMultiplier, 0.3f * ConfigManager.DistortionWaveMultiplier, 10f, 0.15f); foreach (MinorBreakable item in source.ToList()) { ((Component)item).gameObject.AddComponent(); ApplyActionToNearbyEnemies(((BraveBehaviour)this).sprite.WorldCenter, 9f, Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position)); } } public void ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (!Object.op_Implicit((Object)(object)room.activeEnemies[i])) { continue; } AIActor val = room.activeEnemies[i]; bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num; } if (flag) { ((BraveBehaviour)val).healthHaver.ApplyDamage(25f, TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), "Vent", (CoreDamageTypes)4, (DamageCategory)0, false, (PixelCollider)null, false); if (!((BraveBehaviour)((BraveBehaviour)val).aiActor).healthHaver.IsBoss && !((BraveBehaviour)((BraveBehaviour)val).aiActor).healthHaver.IsSubboss && (Object)(object)((Component)val).gameObject.GetComponent() == (Object)null) { ((Component)val).gameObject.AddComponent(); } } } } public void Update() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!p && GameManager.Instance.IsAnyPlayerInRoom(Vector3Extensions.GetAbsoluteRoom(((Component)this).gameObject.transform.position))) { p = !p; AkSoundEngine.PostEvent("Play_OBJ_chestglitch_loop_01", ((Component)this).gameObject); } } } public static ItemTemplate template; public static int ID; public static GameObject DummySpriteObject; private tk2dTileMap currentTileMap; private float DamageRange = 1f; private float FireRateRange = 1f; private float AccuracyRange = 1f; private float ReloadRange = 1f; private float ela; private float ela_2; private List enteredRooms = new List(); public static List allglitchedTiles; public static void PostInit(PickupObject v) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("error_mod_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "String.EMPTY " + StaticColorHexes.AddColorToLabelString("sprite Tier_3_Label", StaticColorHexes.Blue_Color_Hex); defaultModule.LabelDescription = "[#TILEBREAKERPRIMARYDESC]\n[#TILEBREAKERSECONDARYDESC]\n" + StaticColorHexes.AddColorToLabelString("NullReferenceException: (999+)\nObject not set to an instance of an object.\nDefaultModule.ReturnTeritaryEffectText()\nTileBreaker.ReturnDescriptionLabel()", StaticColorHexes.Red_Color_Hex); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.white); defaultModule.AdditionalWeightMultiplier = 0.15f; defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); defaultModule.IsUncraftable = true; defaultModule.powerConsumptionData.OverridePowerDescriptionLabel = "Uses DefaultModule.PowerConsumption(ModuleQuality.Tier_3, -1)\n(" + StaticColorHexes.AddColorToLabelString("DefaultModule.AdditionalStackPowerConsumption(ModuleQuality.Tier_3, -1)", StaticColorHexes.Orange_Hex) + ")"; defaultModule.EnergyConsumption = 0f; defaultModule.IsSpecialModule = true; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); GameObject val = new GameObject("DummyTileSprite"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); val.CreateFastBody((CollisionLayer)4, new IntVector2(16, 16), new IntVector2(0, 0)); DummySpriteObject = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override bool CanBeDisabled(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { return false; } public override void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_Glitch_Y", ((Component)player).gameObject); modulePrinter.PowerModule(this); GameObject val = ((GameActor)player).PlayEffectOnActor(EmergencyResponse.WarnVFX, new Vector3((float)Random.Range(-1, 1), (float)Random.Range(-1, 1)), true, false, false); val.GetComponent().PlayAndDestroyObject("warn", (Action)null); tk2dBaseSprite component = val.GetComponent(); component.usesOverrideMaterial = true; Material material = ((BraveBehaviour)component).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.1f); material.SetFloat("_DispProbability", 0.6f * ConfigManager.ImportantVFXMultiplier); material.SetFloat("_DispIntensity", 0.024f); material.SetFloat("_ColorProbability", 0.7f); material.SetFloat("_ColorIntensity", 0.1f); FuckupStats(modulePrinter); } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { currentTileMap = GameManager.Instance.Dungeon.MainTilemap; printer.OnNewFloorStarted = (Action)Delegate.Combine(printer.OnNewFloorStarted, new Action(ONFS)); printer.PlayerEnteredAnyRoom = (Action)Delegate.Combine(printer.PlayerEnteredAnyRoom, new Action(EnteredRoom)); printer.OnFrameUpdate = (Action)Delegate.Combine(printer.OnFrameUpdate, new Action(FrameUpdate)); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); foreach (MinorBreakable allMinorBreakable in StaticReferenceManager.AllMinorBreakables) { if (Random.value < 0.002f * (float)ReturnStack(printer)) { ((Component)allMinorBreakable).gameObject.AddComponent(); } } gunStatModifier = new ModuleGunStatModifier { Accuracy_Process = Acc, ChargeSpeed_Process = RoF, FireRate_Process = RoF, Reload_Process = Reload }; printer.ProcessGunStatModifier(gunStatModifier); } public float Acc(float based, ModulePrinterCore core, ModularGunController gun, PlayerController player) { return based * AccuracyRange; } public float RoF(float based, ModulePrinterCore core, ModularGunController gun, PlayerController player) { return based * FireRateRange; } public float Reload(float based, ModulePrinterCore core, ModularGunController gun, PlayerController player) { return based * ReloadRange; } public void FuckupStats(ModulePrinterCore core) { float num = 0.075f + (float)ReturnStack(core); DamageRange *= Random.Range(1f - num, 1f + num); FireRateRange *= Random.Range(1f - num, 1f + num); AccuracyRange *= Random.Range(1f - num, 1f + num); ReloadRange *= Random.Range(1f - num, 1f + num); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { if (Random.value < (float)(ReturnStack(modulePrinterCore) / 100)) { modulePrinterCore.DoChanceBulletProc(p, f); } if (Random.value < (float)(ReturnStack(modulePrinterCore) / 100)) { GlitchProjectileBehavior glitchProjectileBehavior = ((Component)p).gameObject.AddComponent(); glitchProjectileBehavior.stack = ReturnStack(modulePrinterCore); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONFS)); modulePrinter.PlayerEnteredAnyRoom = (Action)Delegate.Remove(modulePrinter.PlayerEnteredAnyRoom, new Action(EnteredRoom)); modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(FrameUpdate)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void FrameUpdate(ModulePrinterCore core, PlayerController p) { if (GameManager.Instance.IsLoadingLevel) { return; } ela += BraveTime.DeltaTime; ela_2 += BraveTime.DeltaTime; if (ela > 1f) { ela = 0f; IEnumerable source = allglitchedTiles.Where((GlitchTileBehavior self) => self.currentRoom == p.CurrentRoom); List list = source.ToList(); if (list.Count > 0) { foreach (GlitchTileBehavior item in list) { item.Spread(); } } } if (!(ela_2 > 120f)) { return; } ela_2 = 0f; for (int num = core.ModuleContainers.Count - 1; num > -1; num--) { ModulePrinterCore.ModuleContainer moduleContainer = core.ModuleContainers[num]; IEnumerable source2 = core.ModuleContainers.Where((ModulePrinterCore.ModuleContainer self) => self.LabelName != LabelName && self.Count > 0); if (source2.Count() > 0) { DefaultModule defaultModule = BraveUtility.RandomElement(source2.ToList()).defaultModule; ((MonoBehaviour)p).StartCoroutine(DoFlashyVFX(p, defaultModule, this)); core.RemoveModule(defaultModule); core.AddModule(this, p); core.PowerModule(this); } } } private static IEnumerator DoFlashyVFX(PlayerController player, DefaultModule properties, DefaultModule self) { Vector2 playerPos = ((BraveBehaviour)player).sprite.WorldCenter; tk2dBaseSprite VFX_Object = Object.Instantiate(VFXStorage.VFX_SpriteAppear, Vector2.op_Implicit(playerPos), Quaternion.identity).GetComponent(); VFX_Object.SetSprite(((BraveBehaviour)GlobalModuleStorage.ReturnModule(properties)).sprite.collection, ((BraveBehaviour)GlobalModuleStorage.ReturnModule(properties)).sprite.spriteId); AdditionalBraveLight light = ((Component)VFX_Object).GetComponent(); light.LightColor = GlobalModuleStorage.ReturnModule(properties).BraveLight.LightColor; Vector2 offset = Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(2f, 3f)); float e5 = 0f; while (e5 < 1f) { float t = Toolbox.SinLerpTValue(e5); ((BraveBehaviour)VFX_Object).transform.position = Vector2.op_Implicit(Vector2.Lerp(playerPos, playerPos + offset, t)); ((BraveBehaviour)VFX_Object).renderer.material.SetFloat("_Fade", t); light.LightIntensity = Mathf.Lerp(0f, 2.5f, t); light.LightRadius = Mathf.Lerp(0f, 2f, t); e5 += BraveTime.DeltaTime; yield return null; } e5 = 0f; while (e5 < 0.25f) { e5 += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_Glitch_Y", ((Component)player).gameObject); VFX_Object.usesOverrideMaterial = true; Material material = ((BraveBehaviour)VFX_Object).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.1f); material.SetFloat("_DispProbability", 0.4f); material.SetFloat("_DispIntensity", 0.024f); material.SetFloat("_ColorProbability", 0.7f); material.SetFloat("_ColorIntensity", 0.1f); e5 = 0f; while (e5 < 1f) { e5 += BraveTime.DeltaTime; yield return null; } VFX_Object.SetSprite(((BraveBehaviour)GlobalModuleStorage.ReturnModule(self)).sprite.collection, ((BraveBehaviour)GlobalModuleStorage.ReturnModule(self)).sprite.spriteId); material.shader = Shader.Find("Brave/Internal/SimpleAlphaFadeUnlit"); material.SetFloat("_Fade", 0f); e5 = 0f; while (e5 < 0.6f) { e5 += BraveTime.DeltaTime; yield return null; } e5 = 0f; Vector2 p = TransformExtensions.PositionVector2(((BraveBehaviour)VFX_Object).transform); float d = Random.Range(0.7f, 1.5f); while (e5 < d) { float t2 = Toolbox.SinLerpTValue(e5 / d); ((BraveBehaviour)VFX_Object).transform.position = Vector2.op_Implicit(Vector2.Lerp(p, ((BraveBehaviour)player).sprite.WorldCenter, t2)); light.LightIntensity = Mathf.Lerp(2.5f, 1f, t2); light.LightRadius = Mathf.Lerp(0f, 2f, t2); ((BraveBehaviour)VFX_Object).renderer.material.SetFloat("_Fade", 1f - t2); e5 += BraveTime.DeltaTime; yield return null; } LootEngine.DoDefaultSynergyPoof(((BraveBehaviour)player).sprite.WorldCenter, false); Object.Destroy((Object)(object)((Component)VFX_Object).gameObject); } public void ONFS(ModulePrinterCore core, PlayerController p) { enteredRooms.Clear(); currentTileMap = GameManager.Instance.Dungeon.MainTilemap; foreach (MinorBreakable allMinorBreakable in StaticReferenceManager.AllMinorBreakables) { if (Random.value < 0.01f * (float)ReturnStack(core)) { ((Component)allMinorBreakable).gameObject.AddComponent(); } } } public void EnteredRoom(ModulePrinterCore modulePrinter, PlayerController player, RoomHandler room) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) if (!enteredRooms.Contains(room)) { enteredRooms.Add(room); int num = ReturnStack(modulePrinter); List list = new List(); list.AddRange(room.Cells); BraveUtility.Shuffle(list); int num2 = Mathf.Max(room.Cells.Count / 600 + num * 4, num * 4); for (int i = 0; i < num2; i++) { IntVector2 positionInTilemap = GameManager.Instance.Dungeon.data.cellData[list[i].x][list[i].y].positionInTilemap; tk2dBaseSprite component = Object.Instantiate(DummySpriteObject, ((IntVector2)(ref positionInTilemap)).ToCenterVector3(5f), Quaternion.identity).GetComponent(); component.SetSprite(currentTileMap.spriteCollection, Random.Range(0, currentTileMap.spriteCollection.spriteDefinitions.Count())); component.usesOverrideMaterial = true; Material material = ((BraveBehaviour)component).renderer.material; material.shader = ShaderCache.Acquire("Brave/Internal/Glitch"); material.SetFloat("_GlitchInterval", 0.4f); material.SetFloat("_DispProbability", 0.7f * ConfigManager.ImportantVFXMultiplier); material.SetFloat("_DispIntensity", 0.025f); material.SetFloat("_ColorProbability", 0.8f); material.SetFloat("_ColorIntensity", 0.1f); GlitchTileBehavior glitchTileBehavior = ((Component)component).gameObject.AddComponent(); glitchTileBehavior.position = positionInTilemap; glitchTileBehavior.currentRoom = room; glitchTileBehavior.Damage = 3 + num * 2; glitchTileBehavior.DelayTimer = 1.5f + (float)num; } } } static STRING_EMPTY() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(STRING_EMPTY)); val.Name = "STRING_EMPTY"; val.Description = "TODO"; val.LongDescription = "//TODO: ADD DESCRIPTION"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("error_mod_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; allglitchedTiles = new List(); } } public class TankCarapace : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject Orbital; public List Orbital_Count = new List(); private float c; public float Multiplier = 1f; public static void PostInit(PickupObject v) { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_025f: 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_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("tankstance_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Tank Carapace " + defaultModule.ReturnTierLabel(); defaultModule.EnergyConsumption = 2f; defaultModule.LabelDescription = "Grants a damage and fire rate boost (" + StaticColorHexes.AddColorToLabelString("+Damage and Fire Rate", StaticColorHexes.Light_Orange_Hex) + ")\nthe longer you have been standing still.\nWhile standing still, gain up to 4 (" + StaticColorHexes.AddColorToLabelString("+4", StaticColorHexes.Light_Orange_Hex) + ") defensive orbitals.\n" + StaticColorHexes.AddColorToLabelString("Lose all bonuses and orbitals when you start moving again.", StaticColorHexes.Red_Color_Hex); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.OverrideScrapCost = 10; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; GameObject val = new GameObject("Guon_Carapace"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); val.SetActive(false); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("warning_003")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Generic_VFX_Animation; val3.defaultClipId = StaticCollections.Generic_VFX_Animation.GetClipIdByName("zappyguon"); val3.playAutomatically = true; SpeculativeRigidbody val4 = val.CreateFastBody((CollisionLayer)15, new IntVector2(12, 12), new IntVector2(-1, -1)); val4.CollideWithTileMap = false; val4.CollideWithOthers = true; PlayerOrbital val5 = val.AddComponent(); val5.motionStyle = (OrbitalMotionStyle)0; val5.shouldRotate = false; val5.orbitRadius = 3.2f; val5.SetOrbitalTier(0); val5.orbitDegreesPerSecond = 90f; val5.perfectOrbitalFactor = 100f; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val6 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val6.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val6.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val6.SetFloat("_EmissiveColorPower", 2f); val6.SetFloat("_EmissivePower", 2f); ((BraveBehaviour)val2).renderer.material = val6; ImprovedAfterImage improvedAfterImage = val.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.25f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0f, 0.4f, 0.4f, 1f); val.AddComponent(); Orbital = val; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnFrameUpdate = (Action)Delegate.Combine(printer.OnFrameUpdate, new Action(OnUpdate)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessStats, Accuracy_Process = ProcessStats, ChargeSpeed_Process = ProcessStats }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); ((BraveBehaviour)player).knockbackDoer.knockbackMultiplier = 0f; } public void OnUpdate(ModulePrinterCore printer, PlayerController player) { int num = ReturnStack(printer); c += (printer.isStandingStill() ? (BraveTime.DeltaTime * 1.75f) : (0f - BraveTime.DeltaTime * 4f)); if (c < 0f && printer.isStandingStill()) { c = 0f; } if (c > 0f && !printer.isStandingStill()) { c = 0f; } Multiplier = Mathf.Max(1f, Mathf.Min(1.5f + 0.5f * (float)num, 1f + c / 4f * (float)num)); if (c > 0.8f && Orbital_Count.Count < 4 * num) { c = 0f; float num2 = ((Orbital_Count.Count > 7) ? (Mathf.Ceil((float)(Orbital_Count.Count / 8)) * 1.4f) : 0f); int orbitalTier = (int)Mathf.Ceil((float)(Orbital_Count.Count / 8)); AkSoundEngine.PostEvent("Play_OBJ_daggershield_start_01", ((Component)player).gameObject); for (int i = 0; i < 4; i++) { GameObject val = PlayerOrbitalItem.CreateOrbital(player, Orbital, false, (PlayerOrbitalItem)null); val.GetComponent().Stack = num; val.GetComponent().m_orbitalTier = orbitalTier; val.GetComponent().orbitRadius = 2f + num2; val.GetComponent().orbitDegreesPerSecond = 360f / (Mathf.Ceil((float)(Orbital_Count.Count / 8)) + 1f); Orbital_Count.Add(val); val.GetComponent().Initialize(player); } } else if (c < -0.2f && Orbital_Count.Count > 0) { c = 0f; AkSoundEngine.PostEvent("Play_OBJ_drum_break_01", ((Component)player).gameObject); for (int j = 0; j < Orbital_Count.Count; j++) { Object.Destroy((Object)(object)Orbital_Count[j]); } Orbital_Count.Clear(); } } public float ProcessStats(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / (Multiplier * 1.125f); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + Multiplier * 0.166f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f + Multiplier * 0.25f; ProjectileData baseData3 = p.baseData; baseData3.force *= Multiplier; p.UpdateSpeed(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { ((BraveBehaviour)player).knockbackDoer.knockbackMultiplier = 1f; modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OnUpdate)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); player.stats.RecalculateStats(player, false, false); AkSoundEngine.PostEvent("Play_OBJ_drum_break_01", ((Component)player).gameObject); for (int i = 0; i < Orbital_Count.Count; i++) { Object.Destroy((Object)(object)Orbital_Count[i]); } Orbital_Count.Clear(); } static TankCarapace() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TankCarapace)); val.Name = "Tank Carapace"; val.Description = "I AM BULLETPROOF"; val.LongDescription = "Grants a damage and fire rate boost (+Damage and Fire Rate per stack) the longer you have been standing still. While standing still gain defensive orbitals that break bullets,up to 8 (+4). Lose all bonuses and orbitals when you start moving again."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("tankstance_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class DefensiveDrone : BraveBehaviour { public int Stack = 1; public RoomHandler room; public float Cooldown = 1f; public void Start() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(504); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), Quaternion.identity); val.transform.parent = ((BraveBehaviour)this).transform; Object.Destroy((Object)(object)val, 2f); } } public void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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) room = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position); if (Cooldown > 0f) { Cooldown -= BraveTime.DeltaTime; } else { if (room == null) { return; } List activeEnemies = room.GetActiveEnemies((ActiveEnemyType)1); if (activeEnemies == null) { return; } foreach (AIActor item in activeEnemies) { if (Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)item).transform), TransformExtensions.PositionVector2(((BraveBehaviour)this).transform)) < 2f) { if (ConfigManager.DoVisualEffect) { GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.2f; Object.Destroy((Object)(object)val2, 2f); } Cooldown = 5f; Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), (float)(80 * Stack), 2f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), (float)(80 * Stack), 2f); ApplyActionToNearbyEnemies(((BraveBehaviour)this).sprite.WorldCenter, 3f, Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position), Stack / 6); } } } } public override void OnDestroy() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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) ((BraveBehaviour)((Component)this).GetComponent()).OnDestroy(); GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.5f; Object.Destroy((Object)(object)val2, 2f); Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), (float)(120 * Stack), 3f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), (float)(120 * Stack), 3f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), 3f); ApplyActionToNearbyEnemies(((BraveBehaviour)this).sprite.WorldCenter, 5f, Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position), Stack); ((BraveBehaviour)this).OnDestroy(); } public void ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room, float m) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (Object.op_Implicit((Object)(object)room.activeEnemies[i])) { AIActor val = room.activeEnemies[i]; bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num; } if (flag) { ((BraveBehaviour)val).healthHaver.ApplyDamage(5f * m, TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), "Vent", (CoreDamageTypes)4, (DamageCategory)0, false, (PixelCollider)null, false); } } } } } public class CLEANSLATE : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Tier_Omega; defaultModule.LabelName = "CLEAN SLATE " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "ONCE POWERED, FORFEITS ANY\nPOWERED MODULES IN EXCHANGE FOR ITEMS."; defaultModule.powerConsumptionData = new PowerConsumptionData { FirstStack = 0f, AdditionalStacks = 0f, OverridePowerDescriptionLabel = "USES NO POWER.", OverridePowerManagement = null }; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.red); defaultModule.AdditionalWeightMultiplier = 1f; defaultModule.Offset_LabelDescription = new Vector2(0.25f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.25f, 2.25f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)10, (byte)10, (byte)100)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnAnyModulePowered = (Action)Delegate.Combine(printer.OnAnyModulePowered, new Action(OAMP)); int num = 0; for (int num2 = printer.ModuleContainers.Count - 1; num2 > -1; num2--) { ModulePrinterCore.ModuleContainer moduleContainer = printer.ModuleContainers[num2]; IEnumerable source = printer.ModuleContainers.Where((ModulePrinterCore.ModuleContainer self) => self.LabelName != LabelName && self.Count > 0); if (source.Count() > 0) { DefaultModule defaultModule = BraveUtility.RandomElement(source.ToList()).defaultModule; int num3 = printer.RemoveModule(defaultModule, 1000); num += num3; for (int i = 0; i < num3; i++) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoDrop((float)num * 0.2f, defaultModule, player)); } } } } public IEnumerator DoDrop(float waitTime, DefaultModule module, PlayerController p) { yield return (object)new WaitForSeconds(waitTime); VFXStorage.DoFancyDestroyOfModules(1, p, module); Vector2 pos = ((BraveBehaviour)p).sprite.WorldCenter; VFXStorage.HighPriestClapVFX.SpawnAtPosition(Vector2.op_Implicit(pos), 0f, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)null, false, (SpawnMethod)null, (tk2dBaseSprite)null, false); yield return (object)new WaitForSeconds(1f); PickupObject pickupObject = LootEngine.GetItemOfTypeAndQuality(ReturnRandomQuality(), GameManager.Instance.RewardManager.ItemsLootTable, false); LootEngine.SpawnItem(((Component)pickupObject).gameObject, Vector2.op_Implicit(pos - new Vector2(0.5f, 0.5f)), Vector2.up, 0f, true, false, false); } public ItemQuality ReturnRandomQuality() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0049: 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_0051: 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_005c: 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) return (ItemQuality)(Random.Range(1, 9) switch { 1 => 1, 2 => 1, 3 => 1, 4 => 2, 5 => 2, 6 => 3, 7 => 4, 8 => 5, _ => 1, }); } public void OAMP(ModulePrinterCore printer, DefaultModule module, int i) { int num = 0; if ((Object)(object)module != (Object)(object)this) { int num2 = printer.RemoveModule(module, 1000); num += num2; for (int j = 0; j < num2; j++) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoDrop((float)num * 0.2f, module, ((PassiveItem)printer).Owner)); } } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnAnyModulePowered = (Action)Delegate.Remove(modulePrinter.OnAnyModulePowered, new Action(OAMP)); } static CLEANSLATE() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CLEANSLATE)); val.Name = "CLEAN SLATE"; val.Description = "Devourer"; val.LongDescription = "Acts as 1 (+1 per stack) of every module you will own.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_3); val.ManualSpriteCollection = StaticCollections.Module_T4_Collection; val.ManualSpriteID = StaticCollections.Module_T4_Collection.GetSpriteIdByName("CLEANSLATE"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class BaseRealmWeapon { public enum WEAPONTYPE { SWORD, BOW, STAFF } public WEAPONTYPE ThisWeaponType; public int Projectile_Amount = 1; public float Projectile_Arc_Spread = 8f; public float BaseCooldown; public float Cooldown; public Projectile Projectile; public tk2dSpriteCollectionData SpriteData = StaticCollections.VFX_Collection; public int SpriteID; public GameObject Attack_VFX; public float Attack_VFX_Scale = 1f; public int? SpriteID_Idle; public int? SpriteID_Attack; public string Attack_SFX = null; public string BaseName; public float Spread; public virtual IEnumerator DoWeaponFire(tk2dBaseSprite orbitalSprite, float aimAngle, float cooldown) { if (Object.op_Implicit((Object)(object)Attack_VFX)) { GameObject vfx = Object.Instantiate(Attack_VFX, Vector2.op_Implicit(orbitalSprite.WorldCenter), Quaternion.identity); vfx.transform.parent = ((BraveBehaviour)orbitalSprite).transform; vfx.transform.localRotation = Quaternion.Euler(0f, 0f, aimAngle); Transform transform = vfx.transform; transform.localScale *= Attack_VFX_Scale; } if (Attack_SFX != null) { AkSoundEngine.PostEvent(Attack_SFX, ((Component)orbitalSprite).gameObject); } if (SpriteID_Attack.HasValue) { orbitalSprite.SetSprite(SpriteData, SpriteID_Attack.Value); } yield return (object)new WaitForSeconds(Mathf.Min(0.25f, cooldown / 3f)); if (SpriteID_Idle.HasValue) { orbitalSprite.SetSprite(SpriteData, SpriteID_Idle.Value); } } public virtual void Startup() { ThisWeaponType = Toolbox.RandomEnum(); switch (ThisWeaponType) { case WEAPONTYPE.SWORD: { BaseCooldown = 0.9f; Spread = 2f; BaseName = "Sword"; SpriteID = SpriteData.GetSpriteIdByName("blade_fx"); Projectile = LootMadness.SwordProj; SpriteID_Idle = SpriteData.GetSpriteIdByName("blade_anim_001"); SpriteID_Attack = SpriteData.GetSpriteIdByName("blade_anim_002"); Attack_SFX = "Play_WPN_blasphemy_shot_01"; ref GameObject attack_VFX3 = ref Attack_VFX; PickupObject byId3 = PickupObjectDatabase.GetById(417); attack_VFX3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; Attack_VFX_Scale = 0.5f; Projectile_Arc_Spread = 22f; break; } case WEAPONTYPE.STAFF: { BaseCooldown = 0.35f; Spread = 16f; BaseName = "Staff"; SpriteID = StaticCollections.VFX_Collection.GetSpriteIdByName("wand_fx"); Projectile = LootMadness.StaffProj; SpriteID_Idle = SpriteData.GetSpriteIdByName("staff_anim_001"); SpriteID_Attack = SpriteData.GetSpriteIdByName("staff_anim_002"); Attack_SFX = "Play_WPN_skullgun_shot_01"; ref GameObject attack_VFX2 = ref Attack_VFX; PickupObject byId2 = PickupObjectDatabase.GetById(61); attack_VFX2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; Projectile_Arc_Spread = 11f; break; } case WEAPONTYPE.BOW: { BaseCooldown = 0.65f; BaseName = "Bow"; Spread = 9f; SpriteID = StaticCollections.VFX_Collection.GetSpriteIdByName("bow_fx"); Projectile = LootMadness.ArrowProj; SpriteID_Idle = SpriteData.GetSpriteIdByName("bow_anim_001"); SpriteID_Attack = SpriteData.GetSpriteIdByName("bow_anim_002"); Attack_SFX = "Play_WPN_woodbow_shot_01"; ref GameObject attack_VFX = ref Attack_VFX; PickupObject byId = PickupObjectDatabase.GetById(17); attack_VFX = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; Projectile_Arc_Spread = 3f; break; } } } } public class LootMadness : DefaultModule { public static ItemTemplate template; public static Projectile SwordProj; public static Projectile StaffProj; public static Projectile ArrowProj; public static GameObject orbitalPrefab; public static GameObject orbital_sprite_Prefab; public static int ID; public static void PostInit(PickupObject v) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Tier_Omega; defaultModule.LabelName = "LOOT MADNESS " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "OBTAIN UNIQUE LOOT FROM A REALM CLOUDED BY MADNESS\n(" + StaticColorHexes.AddColorToLabelString("+HIGHER LOOT CHANCE", StaticColorHexes.Light_Orange_Hex) + ").\nLOOT CAN BE USED IN COMBAT."; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.red); defaultModule.powerConsumptionData = new PowerConsumptionData { FirstStack = 0f, AdditionalStacks = 0f, OverridePowerDescriptionLabel = "USES NO POWER.", OverridePowerManagement = null }; defaultModule.AddToGlobalStorage(); defaultModule.AdditionalWeightMultiplier = 1f; defaultModule.Offset_LabelDescription = new Vector2(0.25f, -1.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 1.875f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)10, (byte)10, (byte)100)); ID = ((PickupObject)defaultModule).PickupObjectId; GlobalTraitList.InitTraits(); InitProjectiles(); InitOrbitalPrefab(); } public static void InitProjectiles() { //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(377); Projectile val = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]; PickupObject byId2 = PickupObjectDatabase.GetById(88); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)val2).gameObject); val2.baseData.damage = 18f; val2.shouldRotate = true; val2.baseData.range = 4.5f; val2.baseData.speed = 11f; val2.baseData.force = 30f; val2.baseData.UsesCustomAccelerationCurve = true; val2.baseData.AccelerationCurve = AnimationCurve.Linear(0.1f, 1f, 1f, 0.6f); val2.SetProjectileCollisionRight("swordslash", StaticCollections.Projectile_Collection, 15, 33, lightened: false, (Anchor)1); val2.objectImpactEventName = val.objectImpactEventName; val2.enemyImpactEventName = val.enemyImpactEventName; val2.hitEffects.tileMapHorizontal = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.hitEffects.tileMapVertical = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.hitEffects.enemy = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.hitEffects.deathAny = Toolbox.MakeObjectIntoVFX(val.hitEffects.enemy.effects.First().effects.First().effect); val2.AdditionalScaleMultiplier *= 0.66f; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material material = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material; material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); material.SetFloat("_EmissivePower", 100f); material.SetFloat("_EmissiveColorPower", 50f); material.SetColor("_OverrideColor", new Color(1f, 1f, 1f, 1f)); SwordProj = val2; PickupObject byId3 = PickupObjectDatabase.GetById(12); Projectile val3 = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0]; PickupObject byId4 = PickupObjectDatabase.GetById(88); Projectile val4 = Object.Instantiate(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)val4).gameObject); val4.baseData.damage = 10f; val4.shouldRotate = true; val4.baseData.range = 30f; val4.baseData.speed = 25f; val4.baseData.force = 12f; val4.SetProjectileCollisionRight("arrow", StaticCollections.Projectile_Collection, 24, 9, lightened: false, (Anchor)1); val4.objectImpactEventName = val3.objectImpactEventName; val4.enemyImpactEventName = val3.enemyImpactEventName; val4.hitEffects.tileMapHorizontal = Toolbox.MakeObjectIntoVFX(val3.hitEffects.enemy.effects.First().effects.First().effect); val4.hitEffects.tileMapVertical = Toolbox.MakeObjectIntoVFX(val3.hitEffects.enemy.effects.First().effects.First().effect); val4.hitEffects.enemy = Toolbox.MakeObjectIntoVFX(val3.hitEffects.enemy.effects.First().effects.First().effect); val4.hitEffects.deathAny = Toolbox.MakeObjectIntoVFX(val3.hitEffects.enemy.effects.First().effects.First().effect); ((BraveBehaviour)val4).sprite.usesOverrideMaterial = true; val4.AdditionalScaleMultiplier *= 0.66f; Material material2 = ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material; material2.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); material2.SetFloat("_EmissivePower", 100f); material2.SetFloat("_EmissiveColorPower", 50f); material2.SetColor("_OverrideColor", new Color(1f, 1f, 1f, 1f)); ArrowProj = val4; PickupObject byId5 = PickupObjectDatabase.GetById(145); Projectile val5 = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0]; PickupObject byId6 = PickupObjectDatabase.GetById(88); Projectile val6 = Object.Instantiate(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0]); ((Component)val6).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)val6).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)val6).gameObject); val6.baseData.damage = 16f; val6.shouldRotate = true; val6.baseData.range = 12f; val6.baseData.speed = 9f; val6.baseData.force = 0f; val6.SetProjectileCollisionRight("spell", StaticCollections.Projectile_Collection, 21, 9, lightened: false, (Anchor)1); val6.objectImpactEventName = val5.objectImpactEventName; val6.enemyImpactEventName = val5.enemyImpactEventName; val6.hitEffects.tileMapHorizontal = Toolbox.MakeObjectIntoVFX(val5.hitEffects.enemy.effects.First().effects.First().effect); val6.hitEffects.tileMapVertical = Toolbox.MakeObjectIntoVFX(val5.hitEffects.enemy.effects.First().effects.First().effect); val6.hitEffects.enemy = Toolbox.MakeObjectIntoVFX(val5.hitEffects.enemy.effects.First().effects.First().effect); val6.hitEffects.deathAny = Toolbox.MakeObjectIntoVFX(val5.hitEffects.enemy.effects.First().effects.First().effect); ((BraveBehaviour)val6).sprite.usesOverrideMaterial = true; val6.AdditionalScaleMultiplier *= 0.66f; Material material3 = ((BraveBehaviour)((BraveBehaviour)val6).sprite).renderer.material; material3.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); material3.SetFloat("_EmissivePower", 100f); material3.SetFloat("_EmissiveColorPower", 50f); material3.SetColor("_OverrideColor", new Color(1f, 1f, 1f, 1f)); StaffProj = val6; } public static void InitOrbitalPrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Weapon_Orbital"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("blade_anim_001")); SpeculativeRigidbody val3 = val.CreateFastBody((CollisionLayer)15, new IntVector2(0, 0), new IntVector2(-1, -1)); val3.CollideWithTileMap = false; val3.CollideWithOthers = false; PlayerOrbital val4 = val.AddComponent(); val4.motionStyle = (OrbitalMotionStyle)0; val4.shouldRotate = false; val4.orbitRadius = 2f; val4.SetOrbitalTier(0); val4.orbitDegreesPerSecond = 120f; val4.perfectOrbitalFactor = 180f; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material material = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material; material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); material.SetFloat("_EmissivePower", 100f); material.SetFloat("_EmissiveColorPower", 50f); material.SetColor("_OverrideColor", new Color(1f, 1f, 1f, 1f)); orbitalPrefab = val; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnKilledEnemy = (Action)Delegate.Combine(printer.OnKilledEnemy, new Action(OKEC)); CustomActions.OnChestPreOpen = (Action)Delegate.Combine(CustomActions.OnChestPreOpen, new Action(OCPO)); } public void OCPO(Chest ch, PlayerController player) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_The_Bag", ((Component)player).gameObject); LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(White_Bag.ID)).gameObject, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Random.insideUnitCircle, 3f, false, false, false); } public void OKEC(ModulePrinterCore printer, PlayerController player, AIActor enemy) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && Random.value < 1f - (1f - (float)ReturnStack(printer) / 22f)) { AkSoundEngine.PostEvent("Play_The_Bag", ((Component)player).gameObject); LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(White_Bag.ID)).gameObject, Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), Random.insideUnitCircle, 3f, false, false, false); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKEC)); CustomActions.OnChestPreOpen = (Action)Delegate.Remove(CustomActions.OnChestPreOpen, new Action(OCPO)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } static LootMadness() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(LootMadness)); val.Name = "Loot Madness"; val.Description = "Devourer"; val.LongDescription = "Acts as 1 (+1 per stack) of every module you will own.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_3); val.ManualSpriteCollection = StaticCollections.Module_T4_Collection; val.ManualSpriteID = StaticCollections.Module_T4_Collection.GetSpriteIdByName("LOOT_MADNESS"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class RoguesUltimatum : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Tier_Omega; defaultModule.LabelName = "ROGUES ULTIMATUM " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "GRANTS A DAMAGE AND FIRE RATE BOOST\nBASED OFF HOW MUCH ENERGY YOU HAVE REMAINING.\n(" + StaticColorHexes.AddColorToLabelString("+DAMAGE AND RATE OF FIRE", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.powerConsumptionData = new PowerConsumptionData { FirstStack = 0f, AdditionalStacks = 0f, OverridePowerDescriptionLabel = "USES NO POWER.", OverridePowerManagement = null }; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.red); defaultModule.AdditionalWeightMultiplier = 1f; defaultModule.Offset_LabelDescription = new Vector2(0.25f, -1.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 1.875f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)10, (byte)10, (byte)100)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / ReturnStatMult(); } public float ReturnStatMult() { return 1f + Stored_Core.ReturnRemainingPower() / 7.5f * (float)ReturnStack(Stored_Core); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { float num = ReturnStatMult(); ProjectileData baseData = p.baseData; baseData.damage *= num; ProjectileData baseData2 = p.baseData; baseData2.speed *= num; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } static RoguesUltimatum() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RoguesUltimatum)); val.Name = "Rogues Ultimatum"; val.Description = "Devourer"; val.LongDescription = "Acts as 1 (+1 per stack) of every module you will own.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_3); val.ManualSpriteCollection = StaticCollections.Module_T4_Collection; val.ManualSpriteID = StaticCollections.Module_T4_Collection.GetSpriteIdByName("ROGUE_ULTIMATUM"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class GlobalTraitList { public static WeightedTypeCollection Primarytraits = new WeightedTypeCollection { elements = new WeightedType[0] }; public static WeightedTypeCollection Secondarytraits = new WeightedTypeCollection { elements = new WeightedType[0] }; public static void InitTraits() { InitPrimaries(); InitSecondaries(); } public static void AddTo_1(Trait trait) { WeightedType val = new WeightedType(); val.value = trait; val.weight = trait.Weight; Primarytraits.elements = Primarytraits.elements.Concat(new WeightedType[1] { val }).ToArray(); } public static void AddTo_2(Trait trait) { WeightedType val = new WeightedType(); val.value = trait; val.weight = trait.Weight; Secondarytraits.elements = Secondarytraits.elements.Concat(new WeightedType[1] { val }).ToArray(); } public static void InitPrimaries() { AddTo_1(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown proj.baseData.range = 100f; ProjectileData baseData9 = proj.baseData; baseData9.damage *= 0.65f; proj.OverrideMotionModule = (ProjectileMotionModule)new OrbitProjectileMotionModule(); }, Cooldown = (float f, float r_M, int rarity_Int) => f / 2f, WeaponSizeModifier = (float r_M) => 1.15f, ColorModifier = delegate(Color Colour, float r_M, int rarity_Int) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) Colour.r += 0.12f; Colour.g += 0.05f; Colour.b += 0.2f; return Colour; }, ThisRarity = Trait.RARITY.RARE, Override_Name = "Celestial" }); AddTo_1(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { proj.AdditionalScaleMultiplier *= 1.2f * r_M; }, Cooldown = (float f, float r_M, int rarity_Int) => f *= r_M, WeaponSizeModifier = (float r_M) => 1.2f * r_M, Common_Name = "Large", Rare_Name = "Very Large", Legendary_Name = "Extremely Large" }); AddTo_1(new Trait { ProjectileAmount = (int f, float r_M, int rarity_Int) => 1 + rarity_Int, Cooldown = (float f, float r_M, int rarity_Int) => f *= 1.2f, WeaponSizeModifier = (float r_M) => 1.2f * r_M, Common_Name = "Double", Rare_Name = "Triple", Legendary_Name = "Quadruple", Weight = 0.8f }); AddTo_1(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { proj.AdditionalScaleMultiplier *= 1.2f * r_M; ExplosiveModifier val3 = ((Component)proj).gameObject.AddComponent(); val3.explosionData = StaticExplosionDatas.explosiveRoundsExplosion; }, Override_Name = "Explosive", ThisRarity = Trait.RARITY.RARE, ColorModifier = delegate(Color Colour, float r_M, int rarity_Int) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) Colour.r += 0.25f; Colour.g += 0.04f; return Colour; } }); AddTo_1(new Trait { Cooldown = (float f, float f1, int int1) => f *= 5f, WeaponSizeModifier = (float f) => 2.5f, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) proj.AdditionalScaleMultiplier *= 1.5f * r_M; ImprovedAfterImage improvedAfterImage = ((Component)proj).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.025f; improvedAfterImage.dashColor = new Color(0.1f, 1f, 0.1f, 1f); ExplosiveModifier val2 = ((Component)proj).gameObject.AddComponent(); val2.explosionData = StaticExplosionDatas.nigNukeExplosion; }, Override_Name = "Nuclear", ThisRarity = Trait.RARITY.LEGENDARY, Weight = 0.2f, ColorModifier = delegate(Color Colour, float r_M, int rarity_Int) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) Colour.r += 0.01f; Colour.g += 0.3f; Colour.b += 0.02f; return Colour; } }); AddTo_1(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { HomingModifier val = ((Component)proj).gameObject.AddComponent(); val.AngularVelocity = 150f * r_M; val.HomingRadius = 9f * r_M; }, SpreadCalc = (float f, float r_M, int rarity_Int) => f *= r_M + 0.25f, Common_Name = "Searching", Rare_Name = "Seeking", Legendary_Name = "Targeting" }); AddTo_1(new Trait { Cooldown = (float f, float r_M, int rarity_Int) => f *= 0.85f / r_M, Common_Name = "Fast", Rare_Name = "Very Fast", Legendary_Name = "Extremely Fast" }); AddTo_1(new Trait { WeaponSizeModifier = (float r_M) => 1f / r_M, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { proj.AdditionalScaleMultiplier /= r_M; }, SpreadCalc = (float f, float r_M, int rarity_Int) => f /= r_M, Common_Name = "Small", Rare_Name = "Tiny", Legendary_Name = "Miniscule" }); AddTo_1(new Trait { Override_Name = "Lightning Fast", Cooldown = (float f, float r_M, int rarity_Int) => f *= 0.4f, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData7 = proj.baseData; baseData7.speed *= 1.3f; ProjectileData baseData8 = proj.baseData; baseData8.damage *= 0.75f; proj.UpdateSpeed(); }, ThisRarity = Trait.RARITY.LEGENDARY }); AddTo_1(new Trait { WeaponSizeModifier = (float r_M) => 1.15f, Cooldown = (float f, float r_M, int rarity_Int) => f *= 1.15f * r_M, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData6 = proj.baseData; baseData6.damage *= 1.2f * r_M; }, ThisRarity = Trait.RARITY.ALL, Common_Name = "Heavy", Rare_Name = "Very Heavy", Legendary_Name = "Extremely Heavy" }); AddTo_1(new Trait { Override_Name = "Sluggish", Cooldown = (float f, float r_M, int rarity_Int) => f *= 1.2f, ThisRarity = Trait.RARITY.COMMON }); AddTo_1(new Trait { SpreadCalc = (float f, float r_M, int rarity_Int) => f *= 0.75f / r_M, Common_Name = "Accurate", Rare_Name = "Very Accurate", Legendary_Name = "Extremely Accurate" }); AddTo_1(new Trait { Override_Name = "Pinpoint", SpreadCalc = (float f, float r_M, int rarity_Int) => f *= 0.01f, ThisRarity = Trait.RARITY.LEGENDARY }); AddTo_1(new Trait { SpreadCalc = (float f, float r_M, int rarity_Int) => f *= 2.5f + r_M, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData4 = proj.baseData; baseData4.speed *= 1.25f + r_M; ProjectileData baseData5 = proj.baseData; baseData5.damage *= 1.33f * r_M; proj.UpdateSpeed(); }, ThisRarity = Trait.RARITY.ALL, Common_Name = "Wild", Rare_Name = "Quite Wild", Legendary_Name = "Insanely Wild", Weight = 0.5f }); AddTo_1(new Trait { SpreadCalc = (float f, float r_M, int rarity_Int) => f *= 1.1f, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData3 = proj.baseData; baseData3.damage *= 1.1f; proj.baseData.UsesCustomAccelerationCurve = true; proj.baseData.AccelerationCurve = AnimationCurve.Linear(0.1f, 0.5f, 2f, 2f); proj.UpdateSpeed(); }, ThisRarity = Trait.RARITY.COMMON, Override_Name = "Accelerating", Weight = 0.5f }); AddTo_1(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData = proj.baseData; baseData.damage *= 1.1f; ProjectileData baseData2 = proj.baseData; baseData2.speed *= 1.3f * r_M; proj.UpdateSpeed(); proj.AppliedStunDuration = 1.2f * r_M; proj.StunApplyChance = 0.3f * r_M; proj.AppliesStun = true; }, ThisRarity = Trait.RARITY.ALL, Common_Name = "Stunning", Rare_Name = "Concussive", Legendary_Name = "Knock-Out Cold", Weight = 0.5f }); } public static void InitSecondaries() { AddTo_2(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData7 = proj.baseData; baseData7.force *= 3f * r_M; }, Common_Name = "Force", Rare_Name = "Strong Force", Legendary_Name = "Powerful Force" }); AddTo_2(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { PierceProjModifier val = ((Component)proj).gameObject.AddComponent(); val.penetration = 1 + rarity_Int; ProjectileData baseData6 = proj.baseData; baseData6.speed *= 0.25f + r_M; }, Common_Name = "Bypass", Rare_Name = "Cleaving", Legendary_Name = "The Phantasm" }); AddTo_2(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData4 = proj.baseData; baseData4.speed *= 2f + r_M; ProjectileData baseData5 = proj.baseData; baseData5.range *= 1f + r_M; }, ThisRarity = Trait.RARITY.ALL, Common_Name = "The Wind", Rare_Name = "Powerful Wind", Legendary_Name = "Cyclonic Wind", ColorModifier = delegate(Color Colour, float r_M, int rarity_Int) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) Colour.r += 0.2f * r_M; Colour.g += 0.2f * r_M; Colour.b += 0.2f * r_M; return Colour; } }); AddTo_2(new Trait { Cooldown = (float time, float r_M, int rarity_Int) => time / (1.5f * r_M), ThisRarity = Trait.RARITY.ALL, Common_Name = "Fast Casting", Rare_Name = "Rapid Casting", Legendary_Name = "Lightning Fast Casting" }); AddTo_2(new Trait { Cooldown = (float time, float r_M, int rarity_Int) => time * r_M, OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData3 = proj.baseData; baseData3.speed /= r_M + 0.25f; proj.AdditionalScaleMultiplier *= 0.375f + r_M; }, WeaponSizeModifier = (float r_M) => 0.375f + r_M, ThisRarity = Trait.RARITY.ALL, Common_Name = "The Colossus", Rare_Name = "The Great Colossus", Legendary_Name = "The Legendary Colossus", Weight = 0.7f }); AddTo_2(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { proj.AppliesFire = true; proj.fireEffect = ((rarity_Int == 2) ? DebuffStatics.greenFireEffect : DebuffStatics.hotLeadEffect); proj.FireApplyChance = r_M / 0.55f; }, ThisRarity = Trait.RARITY.ALL, Common_Name = "Sparking", Rare_Name = "Burning", Legendary_Name = "The Eternal Flame", Weight = 0.7f, ColorModifier = delegate(Color Colour, float r_M, int rarity_Int) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) Colour.r += 0.4f * r_M; Colour.g += 0.15f * r_M; return Colour; } }); AddTo_2(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { proj.AppliesFreeze = true; proj.freezeEffect = DebuffStatics.chaosBulletsFreeze; proj.FreezeApplyChance = 0.1f + 0.35f * (float)rarity_Int; }, ThisRarity = Trait.RARITY.ALL, Common_Name = "The Cold", Rare_Name = "Freezing", Legendary_Name = "The Frost Lords", Weight = 0.7f, ColorModifier = delegate(Color Colour, float r_M, int rarity_Int) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) Colour.g += 0.02f * r_M; Colour.b += 0.25f * r_M; return Colour; } }); AddTo_2(new Trait { Cooldown = (float time, float r_M, int rarity_Int) => 0.2f, SpreadCalc = (float f, float r_M, int rarity_Int) => f *= 4f, ThisRarity = Trait.RARITY.RARE, Override_Name = "Silliness", Weight = 0.9f }); AddTo_2(new Trait { OnProjectileFired = delegate(Projectile proj, float r_M, int rarity_Int) { ProjectileData baseData = proj.baseData; baseData.speed *= 1.1f; ProjectileData baseData2 = proj.baseData; baseData2.damage *= 1.05f; }, Cooldown = (float time, float r_M, int rarity_Int) => time * 0.9f, SpreadCalc = (float f, float r_M, int rarity_Int) => f *= 0.9f, ThisRarity = Trait.RARITY.COMMON, Override_Name = "Basic Efficiency", Weight = 1.1f }); } } public class ModifiedRealmWeapon : BaseRealmWeapon { public class WeaponManager : MonoBehaviour { public ModifiedRealmWeapon controller; private PlayerController player; public void StartUp(PlayerController p) { player = p; p.PostProcessProjectile += P_PostProcessProjectile; p.OnTriedToInitiateAttack += P_OnTriedToInitiateAttack; } private void P_OnTriedToInitiateAttack(PlayerController obj) { if (controller != null) { controller.OnFire(player); } } private void P_PostProcessProjectile(Projectile arg1, float arg2) { if (controller != null) { controller.OnFire(player); } } public void Update() { if (controller != null) { controller.DecrementTick(); } } } public string Name; private Trait ThisPrimaryTrait; private Trait ThisSecondaryTrait; private PlayerOrbital extantWeapon; public Color color; private float m_currentAimTarget; public int TotalRarity => ThisPrimaryTrait.Rarity + ThisSecondaryTrait.Rarity; public override void Startup() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) base.Startup(); ThisPrimaryTrait = GlobalTraitList.Primarytraits.SelectByWeight(); ThisSecondaryTrait = GlobalTraitList.Secondarytraits.SelectByWeight(); ThisPrimaryTrait.RarityApplier(); ThisSecondaryTrait.RarityApplier(); ThisWeaponType = Toolbox.RandomEnum(); BaseCooldown = ThisPrimaryTrait.ModifyCooldown(BaseCooldown); BaseCooldown = ThisSecondaryTrait.ModifyCooldown(BaseCooldown); Spread = ThisPrimaryTrait.ModifySpread(Spread); Spread = ThisSecondaryTrait.ModifySpread(Spread); Projectile_Amount += ThisPrimaryTrait.ModifyProjectileAmount(Projectile_Amount); Projectile_Amount += ThisSecondaryTrait.ModifyProjectileAmount(Projectile_Amount); color = Random.ColorHSV(0f, 1f, SaturationMult(), SaturationMult(), ValueMult(), ValueMult()); color = ThisPrimaryTrait.ModifyWeaponColor(color); color = ThisSecondaryTrait.ModifyWeaponColor(color); color.a = Mathf.Min(color.a, 1f); Name = ThisPrimaryTrait.TraitName + ReturunColoredText(BaseName + " of ") + ThisSecondaryTrait.TraitName; } public float ReturnTotalSizeMult() { float num = 1f; num *= ThisPrimaryTrait.ModifyWeaponSize(); return num * ThisSecondaryTrait.ModifyWeaponSize(); } private string ReturunColoredText(string Text) { return TotalRarity switch { 0 => Text, 1 => StaticColorHexes.AddColorToLabelString(Text, StaticColorHexes.Light_Blue_Color_Hex), 2 => StaticColorHexes.AddColorToLabelString(Text, StaticColorHexes.Green_Hex), 3 => StaticColorHexes.AddColorToLabelString(Text, StaticColorHexes.Yellow_Hex), 4 => StaticColorHexes.AddColorToLabelString(Text, StaticColorHexes.Red_Color_Hex), _ => StaticColorHexes.AddColorToLabelString(Text, StaticColorHexes.Light_Blue_Color_Hex), }; } private float ValueMult() { return TotalRarity switch { 0 => 0.7f, 1 => 0.8f, 2 => 0.9f, 3 => 1f, 4 => 1.1f, _ => 0.8f, }; } private float SaturationMult() { return TotalRarity switch { 0 => 0.8f, 1 => 0.85f, 2 => 0.9f, 3 => 0.95f, 4 => 1f, _ => 0.8f, }; } public void Pickup(PlayerController p, float extraRange = 0f) { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_OBJ_key_pickup_01", ((Component)p).gameObject); PlayerOrbital component = PlayerOrbitalItem.CreateOrbital(p, LootMadness.orbitalPrefab, false, (PlayerOrbitalItem)null).GetComponent(); component.m_orbitalTier = Random.Range(20, 100); component.orbitRadius = Random.Range(1.2f, 3.1f + extraRange); component.orbitDegreesPerSecond = Random.Range(90, 240); component.shouldRotate = false; component.Initialize(p); ((Component)component).gameObject.transform.parent = ((BraveBehaviour)p).transform; ((BraveBehaviour)component).sprite.SetSprite(SpriteData, SpriteID_Idle.Value); ((BraveBehaviour)component).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_OverrideColor", color); Transform transform = ((Component)component).gameObject.transform; transform.localScale *= ThisPrimaryTrait.ModifyWeaponSize(); Transform transform2 = ((Component)component).gameObject.transform; transform2.localScale *= ThisSecondaryTrait.ModifyWeaponSize(); extantWeapon = component; GameObject val = (GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/VFX_Synergy_Poof_001"), ((BraveBehaviour)component).transform.position, Quaternion.identity); tk2dBaseSprite component2 = val.GetComponent(); component2.HeightOffGround = 35f; component2.UpdateZDepth(); val.transform.parent = ((BraveBehaviour)component).transform; Transform transform3 = val.transform; transform3.localScale *= 1f + ReturnTotalSizeMult(); tk2dSpriteAnimator component3 = ((Component)component2).GetComponent(); if ((Object)(object)component3 != (Object)null) { ((BraveBehaviour)component3).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.SetFloat("_EmissivePower", 2f); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.SetFloat("_EmissiveColorPower", 2f); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.SetColor("_OverrideColor", color); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.SetColor("_EmissiveColor", color); } WeaponManager weaponManager = ((Component)component).gameObject.AddComponent(); weaponManager.controller = this; weaponManager.StartUp(p); Object.Destroy((Object)(object)val, 1.5f); } private void AimAt(Vector2 point, bool instant = false) { //IL_0002: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) m_currentAimTarget = Vector2Extensions.ToAngle(point - ((BraveBehaviour)extantWeapon).sprite.WorldCenter); if (instant) { ((BraveBehaviour)extantWeapon).transform.localRotation = Quaternion.Euler(0f, 0f, m_currentAimTarget); } } public void Update() { DecrementTick(); } public void DecrementTick() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)extantWeapon)) { AimAt(Vector3Extensions.XY(extantWeapon.m_owner.unadjustedAimPoint)); Transform transform = ((BraveBehaviour)extantWeapon).transform; Quaternion localRotation = ((BraveBehaviour)extantWeapon).transform.localRotation; transform.localRotation = Quaternion.Euler(0f, 0f, Mathf.MoveTowardsAngle(((Quaternion)(ref localRotation)).eulerAngles.z, m_currentAimTarget, 360f * BraveTime.DeltaTime)); localRotation = ((BraveBehaviour)extantWeapon).transform.localRotation; int num; if (((Quaternion)(ref localRotation)).eulerAngles.z > 90f) { localRotation = ((BraveBehaviour)extantWeapon).transform.localRotation; num = ((((Quaternion)(ref localRotation)).eulerAngles.z < 270f) ? 1 : 0); } else { num = 0; } bool flag = (byte)num != 0; if (flag && !((BraveBehaviour)extantWeapon).sprite.FlipY) { ((BraveBehaviour)extantWeapon).sprite.FlipY = true; } else if (!flag && ((BraveBehaviour)extantWeapon).sprite.FlipY) { ((BraveBehaviour)extantWeapon).sprite.FlipY = false; } } if (Cooldown < BaseCooldown) { Cooldown += BraveTime.DeltaTime; } } public void OnFire(PlayerController player) { //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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) if (Cooldown < BaseCooldown) { return; } Cooldown = 0f; for (int i = 0; i < Projectile_Amount; i++) { Debug.Log((object)1); GameObject val = SpawnManager.SpawnProjectile(((Component)Projectile).gameObject, Vector2.op_Implicit(((BraveBehaviour)extantWeapon).sprite.WorldCenter), Quaternion.Euler(0f, 0f, m_currentAimTarget + Random.Range(0f - Spread, Spread)), true); Projectile component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)player; component.Shooter = ((BraveBehaviour)player).specRigidbody; ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_OverrideColor", color); ThisPrimaryTrait.ModifyProjectilePrimary(component); ThisSecondaryTrait.ModifyProjectilePrimary(component); if (Object.op_Implicit((Object)(object)extantWeapon)) { ((MonoBehaviour)extantWeapon).StartCoroutine(DoWeaponFire(((BraveBehaviour)extantWeapon).sprite, m_currentAimTarget + (float)(((BraveBehaviour)extantWeapon).sprite.FlipY ? 180 : 0), BaseCooldown)); } } } } protected float SubdivideRange(float startValue, float endValue, int numDivisions, int i, bool offset = false) { return Mathf.Lerp(startValue, endValue, ((float)i + ((!offset) ? 0f : 0.5f)) / (float)(numDivisions - 1)); } } public class Trait { public enum RARITY { COMMON, RARE, LEGENDARY, ALL } public string Common_Name = ""; public string Rare_Name = ""; public string Legendary_Name = ""; public string Override_Name = null; public float Weight = 1f; public Action OnProjectileFired; public Func Cooldown; public Func SpreadCalc; public Func WeaponSizeModifier; public Func ProjectileAmount; public Func ProjectileArcSpread; public Func ColorModifier; public RARITY ThisRarity = RARITY.ALL; private static WeightedTypeCollection rarityWeights = new WeightedTypeCollection { elements = new WeightedType[3] { new WeightedType { value = RARITY.COMMON, weight = 1f }, new WeightedType { value = RARITY.RARE, weight = 0.7f }, new WeightedType { value = RARITY.LEGENDARY, weight = 0.2f } } }; public string TraitName => StaticColorHexes.AddColorToLabelString((Override_Name != null) ? (Override_Name + " ") : RarityTraitName, Hex); private string Hex => ThisRarity switch { RARITY.COMMON => StaticColorHexes.White_Hex, RARITY.RARE => StaticColorHexes.Green_Hex, RARITY.LEGENDARY => StaticColorHexes.Red_Color_Hex, _ => StaticColorHexes.White_Hex, }; public float RarityMultiplier => ThisRarity switch { RARITY.COMMON => 1f, RARITY.RARE => 1.3f, RARITY.LEGENDARY => 1.85f, _ => 1f, }; public int Rarity => ThisRarity switch { RARITY.COMMON => 0, RARITY.RARE => 1, RARITY.LEGENDARY => 2, _ => 0, }; private string RarityTraitName => ThisRarity switch { RARITY.COMMON => Common_Name + " ", RARITY.RARE => Rare_Name + " ", RARITY.LEGENDARY => Legendary_Name + " ", _ => "", }; public void RarityApplier() { if (ThisRarity == RARITY.ALL) { ThisRarity = rarityWeights.SelectByWeight(); } } public virtual Color ModifyWeaponColor(Color color) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (ColorModifier != null) { return ColorModifier(color, RarityMultiplier, Rarity); } return color; } public virtual float ModifyWeaponSize() { if (WeaponSizeModifier != null) { return WeaponSizeModifier(RarityMultiplier); } return 1f; } public virtual void ModifyProjectilePrimary(Projectile projectile) { if (OnProjectileFired != null) { OnProjectileFired(projectile, RarityMultiplier, Rarity); } } public virtual float ModifyCooldown(float baseCooldown) { if (Cooldown != null) { return Cooldown(baseCooldown, RarityMultiplier, Rarity); } return baseCooldown; } public virtual float ModifySpread(float baseCooldown) { if (SpreadCalc != null) { return SpreadCalc(baseCooldown, RarityMultiplier, Rarity); } return baseCooldown; } public virtual int ModifyProjectileAmount(int Amount) { if (ProjectileAmount != null) { return ProjectileAmount(Amount, RarityMultiplier, Rarity); } return 0; } public virtual float ModifyArc(float spread) { if (ProjectileArcSpread != null) { return ProjectileArcSpread(spread, RarityMultiplier, Rarity); } return 1f; } } public class WeaponPickup : BraveBehaviour, IPlayerInteractable { public ModifiedRealmWeapon modifiedRealm; public ModifiedDefaultLabelManager PrimaryLabel; public void Start() { //IL_0021: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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) DebrisObject orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)this).gameObject); orAddComponent.shouldUseSRBMotion = true; orAddComponent.angularVelocity = 0f; ((EphemeralObject)orAddComponent).Priority = (EphemeralPriority)0; ((BraveBehaviour)orAddComponent).sprite.UpdateZDepth(); orAddComponent.Trigger(Vector3Extensions.WithZ(Vector3.up, 0.5f), 1f, 1f); modifiedRealm = new ModifiedRealmWeapon(); modifiedRealm.Startup(); ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.material.SetColor("_OverrideColor", modifiedRealm.color); ((BraveBehaviour)this).sprite.SetSprite(modifiedRealm.SpriteData, modifiedRealm.SpriteID); RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position); if (absoluteRoom != null) { absoluteRoom.RegisterInteractable((IPlayerInteractable)(object)this); } Transform transform = ((Component)this).gameObject.transform; transform.localScale *= modifiedRealm.ReturnTotalSizeMult(); SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, false); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white, 0.1f, 0f, (OutlineType)0); } public virtual string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public virtual float GetDistanceToPoint(Vector2 point) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_007b: 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_0093: 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_00b4: 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_00c5: 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) if (!Object.op_Implicit((Object)(object)((BraveBehaviour)this).sprite)) { return 1000f; } Bounds bounds = ((BraveBehaviour)this).sprite.GetBounds(); ((Bounds)(ref bounds)).SetMinMax(((Bounds)(ref bounds)).min + ((BraveBehaviour)this).transform.position, ((Bounds)(ref bounds)).max + ((BraveBehaviour)this).transform.position); float num = Mathf.Max(Mathf.Min(point.x, ((Bounds)(ref bounds)).max.x), ((Bounds)(ref bounds)).min.x); float num2 = Mathf.Max(Mathf.Min(point.y, ((Bounds)(ref bounds)).max.y), ((Bounds)(ref bounds)).min.y); return Mathf.Sqrt((point.x - num) * (point.x - num) + (point.y - num2) * (point.y - num2)) / 1.5f; } public virtual float GetOverrideMaxDistance() { return 1f; } public virtual void Interact(PlayerController interactor) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00bd: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)this)) { if (RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this)) { RoomHandler.unassignedInteractableObjects.Remove((IPlayerInteractable)(object)this); } SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, true); modifiedRealm.Pickup(interactor); if ((Object)(object)PrimaryLabel != (Object)null) { Object.Destroy((Object)(object)((Component)PrimaryLabel).gameObject); } GameObject val = (GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/VFX_Synergy_Poof_001"), ((BraveBehaviour)this).transform.position, Quaternion.identity); tk2dBaseSprite component = val.GetComponent(); component.HeightOffGround = 35f; component.UpdateZDepth(); Transform transform = val.transform; transform.localScale *= 1f + modifiedRealm.ReturnTotalSizeMult(); tk2dSpriteAnimator component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 2f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 2f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", modifiedRealm.color); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", modifiedRealm.color); } Object.Destroy((Object)(object)val, 1.5f); Object.Destroy((Object)(object)((Component)this).gameObject); } } public virtual void OnEnteredRange(PlayerController interactor) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)PrimaryLabel != (Object)null) { Object.Destroy((Object)(object)((Component)PrimaryLabel).gameObject); } if (Object.op_Implicit((Object)(object)this) && (interactor.CurrentRoom.IsRegistered((IPlayerInteractable)(object)this) || RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this))) { if ((Object)(object)PrimaryLabel == (Object)null) { PrimaryLabel = Toolbox.GenerateText(((BraveBehaviour)this).transform, new Vector2(-0.5f, -0.25f), 0.5f, modifiedRealm.Name, Color32.op_Implicit(new Color(0.07f, 0.07f, 0.07f, 0.7f))); } SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, false); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white, 0.1f, 0f, (OutlineType)0); } } public void Update() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) for (int num = ((BraveBehaviour)this).transform.childCount - 1; num > -1; num--) { if (((Object)((BraveBehaviour)this).transform.GetChild(num)).name == "BraveOutlineSprite") { Transform child = ((BraveBehaviour)this).transform.GetChild(num); ((Component)child).transform.localPosition = Vector3Extensions.WithZ(((Component)child).transform.localPosition, 15f); ((Component)child).GetComponent().scale = ((BraveBehaviour)this).transform.localScale; } } } public virtual void OnExitRange(PlayerController interactor) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)PrimaryLabel != (Object)null) { PrimaryLabel.Inv(); PrimaryLabel = null; } if (Object.op_Implicit((Object)(object)this)) { SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, true); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black, 0.1f, 0f, (OutlineType)0); } } } public class White_Bag : PickupObject, IPlayerInteractable { public static ItemTemplate template; public GameObject minimapIcon; private GameObject extant_minimapIcon; private RoomHandler m_minimapIconRoom; public static GameObject VFX_Weapon; public static int ID; public static void PostInit(PickupObject v) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown v.CustomCost = 15; v.UsesCustomCost = true; SpeculativeRigidbody val = ((Component)v).gameObject.AddComponent(); PixelCollider item = new PixelCollider { IsTrigger = true, ManualWidth = 12, ManualHeight = 12, ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)10, ManualOffsetX = 0, ManualOffsetY = 0 }; val.PixelColliders = new List { item }; GameObject val2 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val2); FakePrefab.MarkAsFakePrefab(val2); tk2dSprite val3 = val2.AddComponent(); ((tk2dBaseSprite)val3).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val3).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("warning_003")); ((tk2dBaseSprite)val3).usesOverrideMaterial = true; Material material = ((BraveBehaviour)val3).renderer.material; material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); material.SetFloat("_EmissivePower", 100f); material.SetFloat("_EmissiveColorPower", 10f); material.SetColor("_OverrideColor", new Color(0.02f, 0.4f, 1f, 0.6f)); val2.CreateFastBody((CollisionLayer)7, new IntVector2(0, 0), new IntVector2(0, 0)); VFX_Weapon = val2; ID = v.PickupObjectId; GameObject val4 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val4); FakePrefab.MarkAsFakePrefab(val4); tk2dSprite val5 = val4.AddComponent(); ((tk2dBaseSprite)val5).Collection = StaticCollections.Item_Collection; ((tk2dBaseSprite)val5).SetSprite(StaticCollections.Item_Collection.GetSpriteIdByName("whitebag_room_icon")); (v as White_Bag).minimapIcon = val4; } public override void Pickup(PlayerController player) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_007b: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) GetRidOfMinimapIcon(); AkSoundEngine.PostEvent("Play_UI_map_open_01", ((Component)player).gameObject); GameObject val = Object.Instantiate(VFX_Weapon, ((BraveBehaviour)this).transform.position, Quaternion.identity); val.SetActive(true); GameObjectExtensions.GetOrAddComponent(val).Start(); GameObject val2 = (GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/VFX_Synergy_Poof_001"), ((BraveBehaviour)this).transform.position, Quaternion.identity); tk2dBaseSprite component = val2.GetComponent(); Transform transform = val2.transform; transform.localScale *= 2.5f; tk2dSpriteAnimator component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 2f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 2f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", Color.white); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", Color.white); } Object.Destroy((Object)(object)val2, 1.5f); GameStatsManager.Instance.HandleEncounteredObjectRaw(((BraveBehaviour)this).encounterTrackable.EncounterGuid); Object.Destroy((Object)(object)((Component)this).gameObject); } protected void Start() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_007f: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) try { ((Component)this).gameObject.AddComponent(); ((Component)this).gameObject.SetActive(true); if (!RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this)) { RoomHandler.unassignedInteractableObjects.Add((IPlayerInteractable)(object)this); } SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); GameObject val = (GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/VFX_Synergy_Poof_001"), ((BraveBehaviour)this).transform.position, Quaternion.identity); tk2dBaseSprite component = val.GetComponent(); Transform transform = val.transform; transform.localScale *= 2.5f; tk2dSpriteAnimator component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 2f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 2f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", Color.white); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", Color.white); } Object.Destroy((Object)(object)val, 1.5f); if ((Object)(object)minimapIcon != (Object)null) { m_minimapIconRoom = GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(Vector3Extensions.IntXY(((BraveBehaviour)this).transform.position, (VectorConversions)0)); extant_minimapIcon = Minimap.Instance.RegisterRoomIcon(m_minimapIconRoom, minimapIcon, false); } } catch (Exception ex) { ETGModConsole.Log((object)ex.Message, false); } } private void GetRidOfMinimapIcon() { if ((Object)(object)extant_minimapIcon != (Object)null) { Minimap.Instance.DeregisterRoomIcon(m_minimapIconRoom, extant_minimapIcon); extant_minimapIcon = null; } } public virtual string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public virtual float GetDistanceToPoint(Vector2 point) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_007b: 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_0093: 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_00b4: 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_00c5: 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) if (!Object.op_Implicit((Object)(object)((BraveBehaviour)this).sprite)) { return 1000f; } Bounds bounds = ((BraveBehaviour)this).sprite.GetBounds(); ((Bounds)(ref bounds)).SetMinMax(((Bounds)(ref bounds)).min + ((BraveBehaviour)this).transform.position, ((Bounds)(ref bounds)).max + ((BraveBehaviour)this).transform.position); float num = Mathf.Max(Mathf.Min(point.x, ((Bounds)(ref bounds)).max.x), ((Bounds)(ref bounds)).min.x); float num2 = Mathf.Max(Mathf.Min(point.y, ((Bounds)(ref bounds)).max.y), ((Bounds)(ref bounds)).min.y); return Mathf.Sqrt((point.x - num) * (point.x - num) + (point.y - num2) * (point.y - num2)) / 1.5f; } public virtual float GetOverrideMaxDistance() { return 1f; } public override void OnDestroy() { GetRidOfMinimapIcon(); ((PickupObject)this).OnDestroy(); } public virtual void Interact(PlayerController interactor) { if (Object.op_Implicit((Object)(object)this)) { if (RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this)) { RoomHandler.unassignedInteractableObjects.Remove((IPlayerInteractable)(object)this); } SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, true); ((PickupObject)this).Pickup(interactor); } } public virtual void OnEnteredRange(PlayerController interactor) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)this) && (interactor.CurrentRoom.IsRegistered((IPlayerInteractable)(object)this) || RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this))) { SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, false); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white, 0.1f, 0f, (OutlineType)0); ((BraveBehaviour)this).sprite.UpdateZDepth(); } } public virtual void OnExitRange(PlayerController interactor) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)this)) { SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, true); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black, 0.1f, 0f, (OutlineType)0); ((BraveBehaviour)this).sprite.UpdateZDepth(); } } static White_Bag() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(White_Bag)); val.Name = "White Bag"; val.Description = "Mad"; val.LongDescription = "The White Bag..."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("the_bag"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class ConfidenceCore : PassiveItem { public static ItemTemplate template; public static int ConfidenceCoreID; public static void PostInit(PickupObject v) { v.CustomCost = 10; ItemBuilder.AddPassiveStatModifier(v, (StatType)4, 2f, (ModifyMethod)0); v.SetupUnlockOnCustomFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, requiredFlagValue: true); ConfidenceCoreID = v.PickupObjectId; AdditionalShopItemController.ShopItemContexts.Add(new AdditionalShopItemController.AdditionalShopItemContext { Condition = Cond, itemID = ID, offset = Offset }); Actions.ModifyBossDrop = (Func)Delegate.Combine(Actions.ModifyBossDrop, new Func(Modify)); Actions.ModifyForceGun = (Func)Delegate.Combine(Actions.ModifyForceGun, new Func(Bool)); } public override void Pickup(PlayerController player) { AdvancedGameStatsManager.Instance.SetStat(CustomTrackedStats.ENCOUNTERS_OF_COFIDENCE, 1f); ((PassiveItem)this).Pickup(player); } public static bool Bool(bool b) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPickupID(ConfidenceCoreID)) { return false; } } return b; } public static PickupObject Modify(PickupObject obj) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPickupID(ConfidenceCoreID)) { int num = 10; while (obj is Gun && num > 0) { num--; obj = GameManager.Instance.RewardManager.ItemsLootTable.defaultItemDrops.SelectByWeight().GetComponent(); } return obj; } } return obj; } public static bool Cond(AdditionalShopType shopType) { //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 if ((Object)(object)GameManager.Instance == (Object)null) { return false; } if (!GameStatsManager.Instance.IsInSession) { return false; } if ((Object)(object)GameManager.Instance.Dungeon == (Object)null) { return false; } if (GameManager.Instance.AllPlayers.Count() == 0) { return false; } if (AdvancedGameStatsManager.Instance.m_sessionStats == null || AdvancedGameStatsManager.Instance.m_savedSessionStats == null) { return false; } if ((AdvancedGameStatsManager.Instance == null) | !AdvancedGameStatsManager.Instance.IsInSession) { return false; } if (AdvancedGameStatsManager.Instance.GetSessionStatValue(CustomTrackedStats.ENCOUNTERS_OF_COFIDENCE) > 0f) { return false; } if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)) { return false; } if ((int)shopType > 0) { return false; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((Object)(object)val.PlayerHasCore() != (Object)null && !val.HasPickupID(ConfidenceCoreID)) { return true; } } return false; } public static Tuple ID() { return new Tuple(ConfidenceCoreID, 15); } public static Vector3 Offset(AdditionalShopType shopType) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_002d: 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_0031: Unknown result type (might be due to invalid IL or missing references) Vector3 result = default(Vector3); ((Vector3)(ref result))..ctor(0f, 0f); if ((int)shopType == 0) { ((Vector3)(ref result))..ctor(0.875f, 1.625f); } return result; } public override DebrisObject Drop(PlayerController player) { DebrisObject val = ((PassiveItem)this).Drop(player); val.OnTouchedGround = (Action)Delegate.Combine(val.OnTouchedGround, (Action)delegate(DebrisObject obj) { //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_0040: Unknown result type (might be due to invalid IL or missing references) ExplosionData val2 = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); val2.ignoreList = new List { ((BraveBehaviour)player).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)obj).sprite.WorldCenter), val2, ((BraveBehaviour)obj).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); Object.Destroy((Object)(object)((Component)obj).gameObject); }); return val; } static ConfidenceCore() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ConfidenceCore)); val.Name = "Confidence Drive"; val.Description = "Self Boost"; val.LongDescription = "Grants 2 Coolness. While held, bosses no longer drop guns. Breaks when removed.\n\nI've got this."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("confidence_drive"); val.Quality = (ItemQuality)1; val.PostInitAction = PostInit; template = val; } } public class BlockOfCheese : PassiveItem { public static ItemTemplate template; public static int CheeseID; public static void PostInit(PickupObject v) { CheeseID = v.PickupObjectId; v.CanBeDropped = true; v.CustomCost = 40; ((PassiveItem)((v is PassiveItem) ? v : null)).passiveStatModifiers = (StatModifier[])(object)new StatModifier[0]; AdvancedSynergyEntry val = CustomSynergies.Add("Resourcefuller Indeed", new List { "mdl:block_of_cheese", "partially_eaten_cheese", "resourceful_sack", "rat_boots" }, (List)null, true); val.bonusSynergies = new List { (CustomSynergyType)274 }; FakePrefab.MakeFakePrefab(((Component)v).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)v).gameObject); ((Component)v).gameObject.SetActive(false); } static BlockOfCheese() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BlockOfCheese)); val.Name = "Block Of Cheese"; val.Description = "Smells Great!"; val.LongDescription = "A chunk of finely aged cheese.\n\nYou can't eat it."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("cheese"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class TeleportationImmunity : BraveBehaviour { } public class SimplerCrateBehaviour : BraveBehaviour { public int LootID; public string driftAnimationName; public string landedAnimationName; public string chuteLandedAnimationName; public string crateDisappearAnimationName; public tk2dSpriteAnimator chuteAnimator; public GameObject landingTargetSprite; private bool m_hasBeenTriggered; private Vector3 m_currentPosition; private Vector3 m_currentVelocity; private RoomHandler m_parentRoom; private GameObject m_landingTarget; public static SimplerCrateBehaviour TurnIntoSimplerCrate(EmergencyCrateController self) { GameObject gameObject = ((Component)self).gameObject; if ((Object)(object)gameObject != (Object)null) { SimplerCrateBehaviour simplerCrateBehaviour = gameObject.AddComponent(); simplerCrateBehaviour.driftAnimationName = self.driftAnimationName; simplerCrateBehaviour.landedAnimationName = self.landedAnimationName; simplerCrateBehaviour.chuteLandedAnimationName = self.chuteLandedAnimationName; simplerCrateBehaviour.crateDisappearAnimationName = self.crateDisappearAnimationName; simplerCrateBehaviour.chuteAnimator = self.chuteAnimator; simplerCrateBehaviour.landingTargetSprite = self.landingTargetSprite; Object.Destroy((Object)(object)self); return simplerCrateBehaviour; } return null; } public void Trigger(Vector3 startingVelocity, Vector3 startingPosition, RoomHandler room) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) m_parentRoom = room; m_currentPosition = startingPosition; m_currentVelocity = startingVelocity; m_hasBeenTriggered = true; GameObjectExtensions.SetLayerRecursively(((Component)this).gameObject, LayerMask.NameToLayer("Unoccluded")); float num = startingPosition.z / (0f - startingVelocity.z); Vector3 val = startingPosition + num * startingVelocity; m_landingTarget = SpawnManager.SpawnVFX(landingTargetSprite, val, Quaternion.identity); ((tk2dBaseSprite)m_landingTarget.GetComponentInChildren()).UpdateZDepth(); } private void Update() { //IL_0011: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_0095: Unknown result type (might be due to invalid IL or missing references) if (m_hasBeenTriggered) { m_currentPosition += m_currentVelocity * BraveTime.DeltaTime; if (m_currentPosition.z <= 0f) { m_currentPosition.z = 0f; OnLanded(); } ((BraveBehaviour)this).transform.position = BraveUtility.QuantizeVector(Vector3Extensions.WithZ(m_currentPosition, m_currentPosition.y - m_currentPosition.z), (float)PhysicsEngine.Instance.PixelsPerUnit); ((BraveBehaviour)this).sprite.HeightOffGround = m_currentPosition.z; ((BraveBehaviour)this).sprite.UpdateZDepth(); } } public override void OnDestroy() { ((BraveBehaviour)this).OnDestroy(); } private void OnLanded() { //IL_00c8: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) m_hasBeenTriggered = false; ((Component)((BraveBehaviour)this).sprite).gameObject.layer = LayerMask.NameToLayer("FG_Critical"); ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.sortingLayerName = "Background"; ((BraveBehaviour)this).sprite.IsPerpendicular = false; ((BraveBehaviour)this).sprite.HeightOffGround = -1f; m_currentPosition.z = -1f; ((BraveBehaviour)this).spriteAnimator.Play(landedAnimationName); chuteAnimator.PlayAndDestroyObject(chuteLandedAnimationName, (Action)null); if (Object.op_Implicit((Object)(object)m_landingTarget)) { SpawnManager.Despawn(m_landingTarget); } m_landingTarget = null; GameObject gameObject = ((Component)PickupObjectDatabase.GetById(LootID)).gameObject; DebrisObject spawned = LootEngine.SpawnItem(gameObject, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)this).sprite.WorldCenter, 0f) + new Vector3(-0.5f, 0.5f, 0f), Vector2.zero, 0f, false, false, false); ((MonoBehaviour)this).StartCoroutine(DestroyCrateWhenPickedUp(spawned)); } private IEnumerator DestroyCrateDelayed() { yield return (object)new WaitForSeconds(1.5f); if (Object.op_Implicit((Object)(object)m_landingTarget)) { SpawnManager.Despawn(m_landingTarget); } m_landingTarget = null; if ((Object)(object)m_parentRoom.ExtantEmergencyCrate == (Object)(object)((Component)this).gameObject) { m_parentRoom.ExtantEmergencyCrate = null; } ((BraveBehaviour)this).spriteAnimator.Play(crateDisappearAnimationName); } private IEnumerator DestroyCrateWhenPickedUp(DebrisObject spawned) { while (Object.op_Implicit((Object)(object)spawned)) { yield return (object)new WaitForSeconds(0.25f); } if (Object.op_Implicit((Object)(object)m_landingTarget)) { SpawnManager.Despawn(m_landingTarget); } m_landingTarget = null; if ((Object)(object)m_parentRoom.ExtantEmergencyCrate == (Object)(object)((Component)this).gameObject) { m_parentRoom.ExtantEmergencyCrate = null; } ((BraveBehaviour)this).spriteAnimator.Play(crateDisappearAnimationName); } public void ClearLandingTarget() { if (Object.op_Implicit((Object)(object)m_landingTarget)) { SpawnManager.Despawn(m_landingTarget); } m_landingTarget = null; } } public class BeamCollisionEvent : MonoBehaviour { public bool WillBeDestroyed = false; public bool isCollisionEvent = false; public Func DetermineDestroy; } public class TravelledDistanceComponent : MonoBehaviour { public Action OnTravelledDistance; public Projectile projectile; private Vector2 lastStoredPosition; private float DistTick = 0f; public int TriggerAmount = -1; public float DistanceToTravel = 5f; public int AmountOfProcs = 0; public void Start() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) projectile = projectile ?? ((Component)this).GetComponent(); lastStoredPosition = ((BraveBehaviour)projectile).sprite.WorldCenter; } public void Update() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) if (TriggerAmount == 0 || (Object)(object)projectile == (Object)null) { return; } DistTick += (float)(int)Vector2.Distance(((BraveBehaviour)projectile).sprite.WorldCenter, lastStoredPosition) / DistanceToTravel; for (int i = 0; (float)i < DistTick; i++) { if (TriggerAmount > 0) { TriggerAmount--; } AmountOfProcs++; if (OnTravelledDistance != null) { float num = (float)i / DistTick; Vector3 val = Vector3.Lerp(Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), Vector2.op_Implicit(lastStoredPosition), num); OnTravelledDistance(projectile, Vector2.op_Implicit(val), AmountOfProcs); } DistTick -= 1f; lastStoredPosition = ((BraveBehaviour)projectile).sprite.WorldCenter; } } } public class ProjectileSplitController : MonoBehaviour { public class SplitProjectileTag : MonoBehaviour { } public bool DestroysProjectileOnSplit = true; private Projectile parentProjectile; private PlayerController parentOwner; private bool hasSplit; public bool distanceBasedSplit; public float distanceTillSplit; public bool splitOnEnemy; public float splitAngles; public int amtToSplitTo; public float chanceToSplit; public bool HasRandomizedSplitAngle = false; public bool isPurelyRandomizedSplitAngle = false; public float dmgMultAfterSplit; public float sizeMultAfterSplit; public float speedMultAfterSplit = 1f; public bool removeComponentAfterUse; public bool SplitsOnDestroy; public bool DoesSplitPostProcess = false; public ProjectileSplitController() { distanceTillSplit = 7.5f; splitAngles = 35f; amtToSplitTo = 0; dmgMultAfterSplit = 0.66f; sizeMultAfterSplit = 0.8f; removeComponentAfterUse = true; chanceToSplit = 1f; SplitsOnDestroy = false; } private void Start() { parentProjectile = ((Component)this).GetComponent(); parentOwner = ProjectileUtility.ProjectilePlayerOwner(parentProjectile); parentProjectile.OnDestruction += ParentProjectile_OnDestruction; } private void ParentProjectile_OnDestruction(Projectile obj) { if (SplitsOnDestroy) { SplitProjectile(); } } private void Update() { if ((Object)(object)parentProjectile != (Object)null && distanceBasedSplit && !hasSplit && parentProjectile.GetElapsedDistance() > distanceTillSplit) { SplitProjectile(); } } private void SplitProjectile() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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) if (Random.value <= chanceToSplit) { float num = (HasRandomizedSplitAngle ? BraveUtility.RandomAngle() : 0f); float num2 = splitAngles / ((float)amtToSplitTo - 1f); float num3 = Vector2Extensions.ToAngle(parentProjectile.Direction); float num4 = num3 + splitAngles * 0.5f; for (int i = 0; i < amtToSplitTo; i++) { float num5 = (isPurelyRandomizedSplitAngle ? BraveUtility.RandomAngle() : (num4 - num2 * (float)i)); GameObject val = SpawnManager.SpawnProjectile(((Component)parentProjectile).gameObject, Vector2.op_Implicit(((BraveBehaviour)parentProjectile).sprite.WorldCenter), Quaternion.Euler(0f, 0f, num5 + num), true); Projectile component = val.GetComponent(); if (!((Object)(object)component != (Object)null)) { continue; } ((Component)component).gameObject.AddComponent(); component.Owner = (GameActor)(object)parentOwner; component.Shooter = ((BraveBehaviour)parentOwner).specRigidbody; ProjectileData baseData = component.baseData; baseData.damage *= dmgMultAfterSplit; ProjectileData baseData2 = component.baseData; baseData2.speed *= speedMultAfterSplit; component.UpdateSpeed(); component.RuntimeUpdateScale(sizeMultAfterSplit); if (DoesSplitPostProcess && (Object)(object)parentOwner != (Object)null) { parentOwner.DoPostProcessProjectile(component); } if (removeComponentAfterUse) { List list = ((Component)component).gameObject.GetComponents().ToList(); if (list != null && list.Count > 0) { for (int num6 = list.Count - 1; num6 > -1; num6--) { ProjectileSplitController projectileSplitController = list[num6]; Object.Destroy((Object)(object)projectileSplitController); } } } List list2 = ((Component)component).gameObject.GetComponents().ToList(); if (list2 != null && list2.Count > 0) { for (int num7 = list2.Count - 1; num7 > -1; num7--) { SpawnProjModifier val2 = list2[num7]; Object.Destroy((Object)(object)val2); } } } if (Object.op_Implicit((Object)(object)parentProjectile) && DestroysProjectileOnSplit) { Object.Destroy((Object)(object)((Component)parentProjectile).gameObject); } } hasSplit = true; } } public class ShittyVFXAttacher : MonoBehaviour { public bool wasUsingAltCostume; public GameObject gameObj = VFXStorage.VFX_Modulable; public tk2dSpriteAnimator VFX; public PickupObject g; private bool Dont = false; public void Start() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (!Dont) { g = ((Component)this).GetComponent(); VFX = Object.Instantiate(gameObj, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldTopLeft), Quaternion.identity).GetComponent(); ((Component)VFX).gameObject.transform.parent = ((Component)g).gameObject.transform; VFX.Play(wasUsingAltCostume ? "start_alt" : "start"); } } public void CallOfTheVoid() { Object.Destroy((Object)(object)this); Dont = true; if (!((Object)(object)VFX == (Object)null)) { VFX.PlayAndDestroyObject(wasUsingAltCostume ? "break_alt" : "break", (Action)null); } } public void OnDestroy() { if (!((Object)(object)VFX == (Object)null)) { VFX.PlayAndDestroyObject(wasUsingAltCostume ? "break_alt" : "break", (Action)null); } } } public static class Guns { public static Gun Magic_Lamp; public static Gun Winchester; public static Gun Thompson; public static Gun Screecher; public static Gun Sticky_Crossbow; public static Gun AWP; public static Gun Zorgun; public static Gun Barrel; public static Gun Bow; public static Gun Dueling_Pistol; public static Gun Mega_Douser; public static Gun Crossbow; public static Gun Thunderclap; public static Gun Bee_Hive; public static Gun AK47; public static Gun Yari_Launcher; public static Gun Heck_Blaster; public static Gun Blooper; public static Gun Grenade_Launcher; public static Gun Moonscraper; public static Gun BSG; public static Gun Shades_Revolver; public static Gun Dungeon_Eagle; public static Gun Dart_Gun; public static Gun M1; public static Gun Nail_Gun; public static Gun Light_Gun; public static Gun Mailbox; public static Gun Vertebraek47; public static Gun M1911; public static Gun Klobbe; public static Gun Void_Marshal; public static Gun Tear_Jerker; public static Gun Smileys_Revolver; public static Gun Mega_Hand; public static Gun Serious_Cannon; public static Gun Magnum; public static Gun RPG; public static Gun Freeze_Ray; public static Gun Heroine; public static Gun Trank_Gun; public static Gun Machine_Pistol; public static Gun Skull_Spitter; public static Gun Jolter; public static Gun Sniper_Rifle; public static Gun SAA; public static Gun Regular_Shotgun; public static Gun Crescent_Crossbow; public static Gun AU_Gun; public static Gun Laser_Rifle; public static Gun Void_Shotgun; public static Gun ThirtyEight_Special; public static Gun Alien_Sidearm; public static Gun Void_Core_Assault_Rifle; public static Gun Hegemony_Rifle; public static Gun Demon_Head; public static Gun Bundle_Of_Wands; public static Gun Colt_1851; public static Gun Makarov; public static Gun Budget_Revolver; public static Gun Deck4rd; public static Gun Elephant_Gun; public static Gun Unfinished_Gun; public static Gun Vulcan_Cannon; public static Gun Marine_Sidearm; public static Gun Gamma_Ray; public static Gun Robots_Right_Hand; public static Gun Rogue_Special; public static Gun Eye_Of_The_Beholster; public static Gun H4mmer; public static Gun Stinger; public static Gun Old_Goldie; public static Gun Mac10; public static Gun Akey47; public static Gun M16; public static Gun Polaris; public static Gun Patriot; public static Gun Rusty_Sidearm; public static Gun Unicorn_Horn; public static Gun Raiden_Coil; public static Gun Disintegrator; public static Gun Blunderbuss; public static Gun Pulse_Cannon; public static Gun Cactus; public static Gun Flame_Hand; public static Gun Shotbow; public static Gun Rube_Adyne_MK2; public static Gun Com4nd0; public static Gun Glacier; public static Gun Rube_Adyne_Prototype; public static Gun Shotgun_Full_Of_Hate; public static Gun Witch_Pistol; public static Gun Dragunfire; public static Gun Face_Melter; public static Gun T_Shirt_Cannon; public static Gun The_Membrane; public static Gun The_Kiln; public static Gun Shock_Rifle; public static Gun Trash_Cannon; public static Gun Laser_Lotus; public static Gun Big_Iron; public static Gun Black_Hole_Gun; public static Gun Tangler; public static Gun Gungeon_Ant; public static Gun Alien_Engine; public static Gun Crestfaller; public static Gun Prototype_Backpack; public static Gun Grasschopper; public static Gun Winchester_Rifle; public static Gun Grey_Mauser; public static Gun Ser_Manuels_Revolver; public static Gun The_Judge; public static Gun Machine_Fist; public static Gun Fossilized_Gun; public static Gun Pea_Shooter; public static Gun Gunslingers_Ashes; public static Gun Luxin_Cannon; public static Gun Charmed_Bow; public static Gun Sawed_Off_Shotgun; public static Gun Plague_Pistol; public static Gun Plunger; public static Gun Gunbow; public static Gun AK47_Tutorial; public static Gun Cold_45; public static Gun Ice_Breaker; public static Gun Wrist_Bow; public static Gun Particulator; public static Gun Hegemony_Carbine; public static Gun Helix; public static Gun Gilded_Hydra; public static Gun Prize_Pistol; public static Gun Dark_Marker; public static Gun Flare_Gun; public static Gun Molotov_Launcher; public static Gun Super_Space_Turtles_Gun; public static Gun Corsair; public static Gun Charge_Shot; public static Gun Zilla_Shotgun; public static Gun The_Emperor; public static Gun Science_Cannon; public static Gun Lil_Bomber; public static Gun Mutation; public static Gun Wind_Up_Gun; public static Gun Silencer; public static Gun Pitchform; public static Gun Composite_Gun; public static Gun Gunther; public static Gun Mahoguny; public static Gun Lower_Case_R; public static Gun Buzzkill; public static Gun Fightsabre; public static Gun Huntsman; public static Gun Shotgrub; public static Gun Chromesteel_Assault_Rifle; public static Gun Cat_Claw; public static Gun Railgun; public static Gun Compressed_Air_Tank; public static Gun Snakemaker; public static Gun Bullet_Bore; public static Gun Trick_Gun; public static Gun Mass_Shotgun; public static Gun El_Tigre; public static Gun Bait_Launcher; public static Gun Prototype_Railgun; public static Gun RC_Rocket; public static Gun Brick_Breaker; public static Gun Excaliber; public static Gun Derringer; public static Gun Shotgun_Full_Of_Love; public static Gun Betrayers_Shield; public static Gun Triple_Crossbow; public static Gun Sling; public static Gun Flash_Ray; public static Gun Phoenix; public static Gun Hexagun; public static Gun Frost_Giant; public static Gun Cobalt_Hammer; public static Gun Anvillian; public static Gun Mine_Cutter; public static Gun Staff_Of_Firepower; public static Gun Gungine; public static Gun Snowballer; public static Gun Siren; public static Gun Rattler; public static Gun Blasphemy; public static Gun Trident; public static Gun The_Scrambler; public static Gun Shellegun; public static Gun Gummy_Gun; public static Gun Abyssal_Tentacle; public static Gun Quad_Laser; public static Gun Microtransaction_Gun; public static Gun Origuni; public static Gun Banana; public static Gun Super_Meat_Gun; public static Gun Makeshift_Cannon; public static Gun Camera; public static Gun Gunzheng; public static Gun Tetrominator; public static Gun Devolver; public static Gun Treadnaught_Cannon; public static Gun Bullet; public static Gun Hyper_Light_Blaster; public static Gun Magnum_Plus_Wicked_Sister; public static Gun Really_Special_Lute; public static Gun Starpew; public static Gun Dueling_Laser; public static Gun JK47; public static Gun Third_Party_Controller; public static Gun Shell; public static Gun Poxcannon; public static Gun Directional_Pad; public static Gun Mourning_Star; public static Gun Triple_Gun; public static Gun Triple_Gun_Form_Machine_Gun; public static Gun Triple_Gun_Form_Laser; public static Gun Combined_Rifle; public static Gun Balloon_Gun; public static Gun Real_Cool_Bow; public static Gun Vorpal_Gun; public static Gun Boxing_Glove; public static Gun Glass_Cannon; public static Gun Casey; public static Gun Strafe_Gun; public static Gun The_Predator; public static Gun AC15_Unarmored; public static Gun AC15_Armored; public static Gun Windgunner; public static Gun Knights_Gun; public static Gun Crown_Of_Guns; public static Gun The_Fat_Line; public static Gun The_Exotic; public static Gun Rad_Gun; public static Gun Wooden_Blasphemy; public static Gun Robots_Left_Hand; public static Gun Turbo_Gun; public static Gun Void_Core_Cannon; public static Gun Crown_Of_Guns_Alas_Sniperion; public static Gun Life_Orb; public static Gun Teapot; public static Gun Mr_Accretion_Jr; public static Gun Stone_Dome; public static Gun Bubble_Blaster; public static Gun Big_Shotgun; public static Gun GuNNeR; public static Gun Laney_Gun; public static Gun Slinger; public static Gun Mutation_Neo_Tech_Yo; public static Gun Rubensteins_Monster; public static Gun Wood_Beam; public static Gun AK47_Island_Forme; public static Gun Heroine_Wave_Beam; public static Gun Heroine_Ice_Beam; public static Gun Heroine_Plasma_Beam; public static Gun Heroine_Hyper_Beam; public static Gun Casey_Careful_Iteration; public static Gun Megahand_Quick_Boomerang; public static Gun Megahand_Time_Stopper; public static Gun Megahand_Metal_Blade; public static Gun Megahand_Leaf_Shield; public static Gun Megahand_Atomic_Fire; public static Gun Megahand_Bubble_Lead; public static Gun Megahand_Air_Shooter; public static Gun Megahand_Crash_Bomber; public static Gun Elimentaler; public static Gun Chamber_Gun; public static Gun Tangler_Full_Circle; public static Gun Uppercase_R; public static Gun Winchester_Payday_Companions; public static Gun Rogue_Special_Alt; public static Gun Budget_Revolver_Alt; public static Gun Kruller_Glaive; public static Gun Chamber_Gun_Oubliette; public static Gun Chamber_Gun_Forge; public static Gun Chamber_Gun_Hollow; public static Gun Chamber_Gun_Proper; public static Gun Elimentaler_Enemy; public static Gun Dragunfire_High; public static Gun Gamma_Ray__Beta_Ray; public static Gun Elephant_Gun__Elephant_In_The_Room; public static Gun Machine_Pistol__Pistol_Machine; public static Gun Peashooter__Pea_Cannon; public static Gun Dueling_Pistol__Dualing_Pistol; public static Gun Laser_Rifle__Laser_Light_Show; public static Gun Dragunfire__Kalibreath; public static Gun Blunderbuss_Blunderbrace; public static Gun Snowballer__Snowball_Shotgun; public static Gun Excaliber__Armored_Corps; public static Gun Thirty_Eight_Special__Detective_Mode; public static Gun Plague_Pistol__Pandemic_Pistol; public static Gun Thunderclap__Alistairs_Ladder; public static Gun M1__M1_Multitool; public static Gun Thompson__Future_Gangster; public static Gun Corsair__Black_Flag; public static Gun Crestfaller__Five_O_Clock_Somewhere; public static Gun Banana__Fruits_And_Vegetables; public static Gun Abyssal_Tentacle__Kalibers_Grip; public static Gun Klobbe__Klobbering_Time; public static Gun Molotov_Launcher__Special_Reserve; public static Gun Nail_Gun__Nailed_It; public static Gun Gunbow__Across_The_Bow; public static Gun Big_Iron__Iron_Slug; public static Gun Hyper_Light_Blaster__Hard_Light; public static Gun Alien_Sidearm__Chief_Master; public static Gun Shock_Rifle__Battery_Powered; public static Gun Flame_Hand__Maximize_Spell; public static Gun Hegemony_Rifle__Hegemony_Special_Forces; public static Gun Cactus__Cactus_Flower; public static Gun Luxin_Cannon__Noxin_Cannon; public static Gun Face_Melter__Alternative_Rock; public static Gun Bee_Hive__Apiary; public static Gun Trashcannon__Recycling_Bin; public static Gun Flash_Ray__Saviour_Of_The_Universe; public static Gun Flare_Gun__Firing_With_Flair; public static Gun Vulcan_Cannon__Not_Quite_As_Mini; public static Gun Helix__Double_Double_Helix; public static Gun Barrel__Like_Shooting_Fish; public static Gun Freeze_Ray__Ice_Cap; public static Gun Light_Gun__Peripheral_Vision; public static Gun Raiden_Coil__Raiden; public static Gun Moonscraper__Double_Moon_7; public static Gun Laser_Lotus__Laser_Lotus_Bloom; public static Gun H4mmer__Hammer_And_Nail; public static Gun AWP__Arctic_Warfare; public static Gun Bullet_Bore__Cerebral_Bros; public static Gun Polaris__Square_Brace; public static Gun Lil_Bomber__King_Bomber; public static Gun Proton_Backpack__Electron_Pack; public static Gun Jolter__Heavy_Jolt; public static Gun Pitchfork__Pitch_Perfect; public static Gun Com4nd0__Commammo_Belt; public static Gun Hegemony_Carbine__Ruby_Carbine; public static Gun Tear_Jerker__Unknown_Synergy; public static Gun AKey47__Akey_Breaky; public static Gun Gunderfury_Lv_50; public static Gun Gunderfury_Lv_60; public static Gun Gunderfury_Lv_40; public static Gun Gunderfury_Lv_30; public static Gun Gunderfury_Lv_10; public static Gun Gunderfury_Lv_20; public static Gun Mimic_Gun; public static Gun Phoenix__Phoenix_Up; public static Gun Betrayers_Shield__Betrayers_Lies; public static Gun Lower_Case_R__Unknown_Synergy; public static Gun Gungeon_Ant__Great_Queen_Ant; public static Gun Buzzkill__Not_So_Sawed_Off; public static Gun Tear_Jerker__Wrath_Of_The_Blam; public static Gun Alien_Engine__Contrail; public static Gun Rad_Gun__Kung_Fu_Hippie_Rappin_Surfer; public static Gun Origuni__Parchmental; public static Gun Ice_Breaker__Gunderlord; public static Gun Turtine_Gun; public static Gun Sunlight_Javelin; public static Gun Shotbow__Second__Accident; public static Gun Dungeon_Eagle__Dont_Hoot_The_Messenger; public static Gun Big_Gun; public static Gun Western_Bro_Nomes_Revolver; public static Gun Western_Bro_Tucos_Revolver; public static Gun Western_Bro_Angels_Revolver; public static Gun Evolver; public static Gun Evolver_Sponge; public static Gun Evolver_Flatworm; public static Gun Evolver_Snail; public static Gun Evolver_Frog; public static Gun Evolver_Dragon; public static Gun High_Kaliber; public static Gun Finished_Gun; public static Gun Chamber_Gun_Hell; public static Gun Chamber_Gun_Abbey; public static Gun Chamber_Gun_Mines; public static Gun Chamber_Gun_Rat_Lair; public static Gun Marine_Sidearm_Alt; public static Gun Rusty_Sidearm_Alt; public static Gun Dart_Gun_Alt; public static Gun Robots_Right_Arm_Alt; public static Gun Blasphemy_Alt; public static Gun Trank_Gun__I_Need_Scissors_61; public static Gun Glass_Cannon__Max_Pane; public static Gun Chamber_Gun_RNG; static Guns() { PickupObject byId = PickupObjectDatabase.GetById(0); Magic_Lamp = (Gun)(object)((byId is Gun) ? byId : null); PickupObject byId2 = PickupObjectDatabase.GetById(1); Winchester = (Gun)(object)((byId2 is Gun) ? byId2 : null); PickupObject byId3 = PickupObjectDatabase.GetById(2); Thompson = (Gun)(object)((byId3 is Gun) ? byId3 : null); PickupObject byId4 = PickupObjectDatabase.GetById(3); Screecher = (Gun)(object)((byId4 is Gun) ? byId4 : null); PickupObject byId5 = PickupObjectDatabase.GetById(4); Sticky_Crossbow = (Gun)(object)((byId5 is Gun) ? byId5 : null); PickupObject byId6 = PickupObjectDatabase.GetById(5); AWP = (Gun)(object)((byId6 is Gun) ? byId6 : null); PickupObject byId7 = PickupObjectDatabase.GetById(6); Zorgun = (Gun)(object)((byId7 is Gun) ? byId7 : null); PickupObject byId8 = PickupObjectDatabase.GetById(7); Barrel = (Gun)(object)((byId8 is Gun) ? byId8 : null); PickupObject byId9 = PickupObjectDatabase.GetById(8); Bow = (Gun)(object)((byId9 is Gun) ? byId9 : null); PickupObject byId10 = PickupObjectDatabase.GetById(9); Dueling_Pistol = (Gun)(object)((byId10 is Gun) ? byId10 : null); PickupObject byId11 = PickupObjectDatabase.GetById(10); Mega_Douser = (Gun)(object)((byId11 is Gun) ? byId11 : null); PickupObject byId12 = PickupObjectDatabase.GetById(12); Crossbow = (Gun)(object)((byId12 is Gun) ? byId12 : null); PickupObject byId13 = PickupObjectDatabase.GetById(13); Thunderclap = (Gun)(object)((byId13 is Gun) ? byId13 : null); PickupObject byId14 = PickupObjectDatabase.GetById(14); Bee_Hive = (Gun)(object)((byId14 is Gun) ? byId14 : null); PickupObject byId15 = PickupObjectDatabase.GetById(15); AK47 = (Gun)(object)((byId15 is Gun) ? byId15 : null); PickupObject byId16 = PickupObjectDatabase.GetById(16); Yari_Launcher = (Gun)(object)((byId16 is Gun) ? byId16 : null); PickupObject byId17 = PickupObjectDatabase.GetById(17); Heck_Blaster = (Gun)(object)((byId17 is Gun) ? byId17 : null); PickupObject byId18 = PickupObjectDatabase.GetById(18); Blooper = (Gun)(object)((byId18 is Gun) ? byId18 : null); PickupObject byId19 = PickupObjectDatabase.GetById(19); Grenade_Launcher = (Gun)(object)((byId19 is Gun) ? byId19 : null); PickupObject byId20 = PickupObjectDatabase.GetById(20); Moonscraper = (Gun)(object)((byId20 is Gun) ? byId20 : null); PickupObject byId21 = PickupObjectDatabase.GetById(21); BSG = (Gun)(object)((byId21 is Gun) ? byId21 : null); PickupObject byId22 = PickupObjectDatabase.GetById(22); Shades_Revolver = (Gun)(object)((byId22 is Gun) ? byId22 : null); PickupObject byId23 = PickupObjectDatabase.GetById(23); Dungeon_Eagle = (Gun)(object)((byId23 is Gun) ? byId23 : null); PickupObject byId24 = PickupObjectDatabase.GetById(24); Dart_Gun = (Gun)(object)((byId24 is Gun) ? byId24 : null); PickupObject byId25 = PickupObjectDatabase.GetById(25); M1 = (Gun)(object)((byId25 is Gun) ? byId25 : null); PickupObject byId26 = PickupObjectDatabase.GetById(26); Nail_Gun = (Gun)(object)((byId26 is Gun) ? byId26 : null); PickupObject byId27 = PickupObjectDatabase.GetById(27); Light_Gun = (Gun)(object)((byId27 is Gun) ? byId27 : null); PickupObject byId28 = PickupObjectDatabase.GetById(28); Mailbox = (Gun)(object)((byId28 is Gun) ? byId28 : null); PickupObject byId29 = PickupObjectDatabase.GetById(29); Vertebraek47 = (Gun)(object)((byId29 is Gun) ? byId29 : null); PickupObject byId30 = PickupObjectDatabase.GetById(30); M1911 = (Gun)(object)((byId30 is Gun) ? byId30 : null); PickupObject byId31 = PickupObjectDatabase.GetById(31); Klobbe = (Gun)(object)((byId31 is Gun) ? byId31 : null); PickupObject byId32 = PickupObjectDatabase.GetById(32); Void_Marshal = (Gun)(object)((byId32 is Gun) ? byId32 : null); PickupObject byId33 = PickupObjectDatabase.GetById(33); Tear_Jerker = (Gun)(object)((byId33 is Gun) ? byId33 : null); PickupObject byId34 = PickupObjectDatabase.GetById(35); Smileys_Revolver = (Gun)(object)((byId34 is Gun) ? byId34 : null); PickupObject byId35 = PickupObjectDatabase.GetById(36); Mega_Hand = (Gun)(object)((byId35 is Gun) ? byId35 : null); PickupObject byId36 = PickupObjectDatabase.GetById(37); Serious_Cannon = (Gun)(object)((byId36 is Gun) ? byId36 : null); PickupObject byId37 = PickupObjectDatabase.GetById(38); Magnum = (Gun)(object)((byId37 is Gun) ? byId37 : null); PickupObject byId38 = PickupObjectDatabase.GetById(39); RPG = (Gun)(object)((byId38 is Gun) ? byId38 : null); PickupObject byId39 = PickupObjectDatabase.GetById(40); Freeze_Ray = (Gun)(object)((byId39 is Gun) ? byId39 : null); PickupObject byId40 = PickupObjectDatabase.GetById(41); Heroine = (Gun)(object)((byId40 is Gun) ? byId40 : null); PickupObject byId41 = PickupObjectDatabase.GetById(42); Trank_Gun = (Gun)(object)((byId41 is Gun) ? byId41 : null); PickupObject byId42 = PickupObjectDatabase.GetById(43); Machine_Pistol = (Gun)(object)((byId42 is Gun) ? byId42 : null); PickupObject byId43 = PickupObjectDatabase.GetById(45); Skull_Spitter = (Gun)(object)((byId43 is Gun) ? byId43 : null); PickupObject byId44 = PickupObjectDatabase.GetById(47); Jolter = (Gun)(object)((byId44 is Gun) ? byId44 : null); PickupObject byId45 = PickupObjectDatabase.GetById(49); Sniper_Rifle = (Gun)(object)((byId45 is Gun) ? byId45 : null); PickupObject byId46 = PickupObjectDatabase.GetById(50); SAA = (Gun)(object)((byId46 is Gun) ? byId46 : null); PickupObject byId47 = PickupObjectDatabase.GetById(51); Regular_Shotgun = (Gun)(object)((byId47 is Gun) ? byId47 : null); PickupObject byId48 = PickupObjectDatabase.GetById(52); Crescent_Crossbow = (Gun)(object)((byId48 is Gun) ? byId48 : null); PickupObject byId49 = PickupObjectDatabase.GetById(53); AU_Gun = (Gun)(object)((byId49 is Gun) ? byId49 : null); PickupObject byId50 = PickupObjectDatabase.GetById(54); Laser_Rifle = (Gun)(object)((byId50 is Gun) ? byId50 : null); PickupObject byId51 = PickupObjectDatabase.GetById(55); Void_Shotgun = (Gun)(object)((byId51 is Gun) ? byId51 : null); PickupObject byId52 = PickupObjectDatabase.GetById(56); ThirtyEight_Special = (Gun)(object)((byId52 is Gun) ? byId52 : null); PickupObject byId53 = PickupObjectDatabase.GetById(57); Alien_Sidearm = (Gun)(object)((byId53 is Gun) ? byId53 : null); PickupObject byId54 = PickupObjectDatabase.GetById(58); Void_Core_Assault_Rifle = (Gun)(object)((byId54 is Gun) ? byId54 : null); PickupObject byId55 = PickupObjectDatabase.GetById(59); Hegemony_Rifle = (Gun)(object)((byId55 is Gun) ? byId55 : null); PickupObject byId56 = PickupObjectDatabase.GetById(60); Demon_Head = (Gun)(object)((byId56 is Gun) ? byId56 : null); PickupObject byId57 = PickupObjectDatabase.GetById(61); Bundle_Of_Wands = (Gun)(object)((byId57 is Gun) ? byId57 : null); PickupObject byId58 = PickupObjectDatabase.GetById(62); Colt_1851 = (Gun)(object)((byId58 is Gun) ? byId58 : null); PickupObject byId59 = PickupObjectDatabase.GetById(79); Makarov = (Gun)(object)((byId59 is Gun) ? byId59 : null); PickupObject byId60 = PickupObjectDatabase.GetById(80); Budget_Revolver = (Gun)(object)((byId60 is Gun) ? byId60 : null); PickupObject byId61 = PickupObjectDatabase.GetById(81); Deck4rd = (Gun)(object)((byId61 is Gun) ? byId61 : null); PickupObject byId62 = PickupObjectDatabase.GetById(82); Elephant_Gun = (Gun)(object)((byId62 is Gun) ? byId62 : null); PickupObject byId63 = PickupObjectDatabase.GetById(83); Unfinished_Gun = (Gun)(object)((byId63 is Gun) ? byId63 : null); PickupObject byId64 = PickupObjectDatabase.GetById(84); Vulcan_Cannon = (Gun)(object)((byId64 is Gun) ? byId64 : null); PickupObject byId65 = PickupObjectDatabase.GetById(86); Marine_Sidearm = (Gun)(object)((byId65 is Gun) ? byId65 : null); PickupObject byId66 = PickupObjectDatabase.GetById(87); Gamma_Ray = (Gun)(object)((byId66 is Gun) ? byId66 : null); PickupObject byId67 = PickupObjectDatabase.GetById(88); Robots_Right_Hand = (Gun)(object)((byId67 is Gun) ? byId67 : null); PickupObject byId68 = PickupObjectDatabase.GetById(89); Rogue_Special = (Gun)(object)((byId68 is Gun) ? byId68 : null); PickupObject byId69 = PickupObjectDatabase.GetById(90); Eye_Of_The_Beholster = (Gun)(object)((byId69 is Gun) ? byId69 : null); PickupObject byId70 = PickupObjectDatabase.GetById(91); H4mmer = (Gun)(object)((byId70 is Gun) ? byId70 : null); PickupObject byId71 = PickupObjectDatabase.GetById(92); Stinger = (Gun)(object)((byId71 is Gun) ? byId71 : null); PickupObject byId72 = PickupObjectDatabase.GetById(93); Old_Goldie = (Gun)(object)((byId72 is Gun) ? byId72 : null); PickupObject byId73 = PickupObjectDatabase.GetById(94); Mac10 = (Gun)(object)((byId73 is Gun) ? byId73 : null); PickupObject byId74 = PickupObjectDatabase.GetById(95); Akey47 = (Gun)(object)((byId74 is Gun) ? byId74 : null); PickupObject byId75 = PickupObjectDatabase.GetById(96); M16 = (Gun)(object)((byId75 is Gun) ? byId75 : null); PickupObject byId76 = PickupObjectDatabase.GetById(97); Polaris = (Gun)(object)((byId76 is Gun) ? byId76 : null); PickupObject byId77 = PickupObjectDatabase.GetById(98); Patriot = (Gun)(object)((byId77 is Gun) ? byId77 : null); PickupObject byId78 = PickupObjectDatabase.GetById(99); Rusty_Sidearm = (Gun)(object)((byId78 is Gun) ? byId78 : null); PickupObject byId79 = PickupObjectDatabase.GetById(100); Unicorn_Horn = (Gun)(object)((byId79 is Gun) ? byId79 : null); PickupObject byId80 = PickupObjectDatabase.GetById(107); Raiden_Coil = (Gun)(object)((byId80 is Gun) ? byId80 : null); PickupObject byId81 = PickupObjectDatabase.GetById(121); Disintegrator = (Gun)(object)((byId81 is Gun) ? byId81 : null); PickupObject byId82 = PickupObjectDatabase.GetById(122); Blunderbuss = (Gun)(object)((byId82 is Gun) ? byId82 : null); PickupObject byId83 = PickupObjectDatabase.GetById(123); Pulse_Cannon = (Gun)(object)((byId83 is Gun) ? byId83 : null); PickupObject byId84 = PickupObjectDatabase.GetById(124); Cactus = (Gun)(object)((byId84 is Gun) ? byId84 : null); PickupObject byId85 = PickupObjectDatabase.GetById(125); Flame_Hand = (Gun)(object)((byId85 is Gun) ? byId85 : null); PickupObject byId86 = PickupObjectDatabase.GetById(126); Shotbow = (Gun)(object)((byId86 is Gun) ? byId86 : null); PickupObject byId87 = PickupObjectDatabase.GetById(128); Rube_Adyne_MK2 = (Gun)(object)((byId87 is Gun) ? byId87 : null); PickupObject byId88 = PickupObjectDatabase.GetById(129); Com4nd0 = (Gun)(object)((byId88 is Gun) ? byId88 : null); PickupObject byId89 = PickupObjectDatabase.GetById(130); Glacier = (Gun)(object)((byId89 is Gun) ? byId89 : null); PickupObject byId90 = PickupObjectDatabase.GetById(142); Rube_Adyne_Prototype = (Gun)(object)((byId90 is Gun) ? byId90 : null); PickupObject byId91 = PickupObjectDatabase.GetById(143); Shotgun_Full_Of_Hate = (Gun)(object)((byId91 is Gun) ? byId91 : null); PickupObject byId92 = PickupObjectDatabase.GetById(145); Witch_Pistol = (Gun)(object)((byId92 is Gun) ? byId92 : null); PickupObject byId93 = PickupObjectDatabase.GetById(146); Dragunfire = (Gun)(object)((byId93 is Gun) ? byId93 : null); PickupObject byId94 = PickupObjectDatabase.GetById(149); Face_Melter = (Gun)(object)((byId94 is Gun) ? byId94 : null); PickupObject byId95 = PickupObjectDatabase.GetById(150); T_Shirt_Cannon = (Gun)(object)((byId95 is Gun) ? byId95 : null); PickupObject byId96 = PickupObjectDatabase.GetById(151); The_Membrane = (Gun)(object)((byId96 is Gun) ? byId96 : null); PickupObject byId97 = PickupObjectDatabase.GetById(152); The_Kiln = (Gun)(object)((byId97 is Gun) ? byId97 : null); PickupObject byId98 = PickupObjectDatabase.GetById(153); Shock_Rifle = (Gun)(object)((byId98 is Gun) ? byId98 : null); PickupObject byId99 = PickupObjectDatabase.GetById(154); Trash_Cannon = (Gun)(object)((byId99 is Gun) ? byId99 : null); PickupObject byId100 = PickupObjectDatabase.GetById(156); Laser_Lotus = (Gun)(object)((byId100 is Gun) ? byId100 : null); PickupObject byId101 = PickupObjectDatabase.GetById(157); Big_Iron = (Gun)(object)((byId101 is Gun) ? byId101 : null); PickupObject byId102 = PickupObjectDatabase.GetById(169); Black_Hole_Gun = (Gun)(object)((byId102 is Gun) ? byId102 : null); PickupObject byId103 = PickupObjectDatabase.GetById(175); Tangler = (Gun)(object)((byId103 is Gun) ? byId103 : null); PickupObject byId104 = PickupObjectDatabase.GetById(176); Gungeon_Ant = (Gun)(object)((byId104 is Gun) ? byId104 : null); PickupObject byId105 = PickupObjectDatabase.GetById(177); Alien_Engine = (Gun)(object)((byId105 is Gun) ? byId105 : null); PickupObject byId106 = PickupObjectDatabase.GetById(178); Crestfaller = (Gun)(object)((byId106 is Gun) ? byId106 : null); PickupObject byId107 = PickupObjectDatabase.GetById(179); Prototype_Backpack = (Gun)(object)((byId107 is Gun) ? byId107 : null); PickupObject byId108 = PickupObjectDatabase.GetById(180); Grasschopper = (Gun)(object)((byId108 is Gun) ? byId108 : null); PickupObject byId109 = PickupObjectDatabase.GetById(181); Winchester_Rifle = (Gun)(object)((byId109 is Gun) ? byId109 : null); PickupObject byId110 = PickupObjectDatabase.GetById(182); Grey_Mauser = (Gun)(object)((byId110 is Gun) ? byId110 : null); PickupObject byId111 = PickupObjectDatabase.GetById(183); Ser_Manuels_Revolver = (Gun)(object)((byId111 is Gun) ? byId111 : null); PickupObject byId112 = PickupObjectDatabase.GetById(184); The_Judge = (Gun)(object)((byId112 is Gun) ? byId112 : null); PickupObject byId113 = PickupObjectDatabase.GetById(185); Machine_Fist = (Gun)(object)((byId113 is Gun) ? byId113 : null); PickupObject byId114 = PickupObjectDatabase.GetById(196); Fossilized_Gun = (Gun)(object)((byId114 is Gun) ? byId114 : null); PickupObject byId115 = PickupObjectDatabase.GetById(197); Pea_Shooter = (Gun)(object)((byId115 is Gun) ? byId115 : null); PickupObject byId116 = PickupObjectDatabase.GetById(198); Gunslingers_Ashes = (Gun)(object)((byId116 is Gun) ? byId116 : null); PickupObject byId117 = PickupObjectDatabase.GetById(199); Luxin_Cannon = (Gun)(object)((byId117 is Gun) ? byId117 : null); PickupObject byId118 = PickupObjectDatabase.GetById(200); Charmed_Bow = (Gun)(object)((byId118 is Gun) ? byId118 : null); PickupObject byId119 = PickupObjectDatabase.GetById(202); Sawed_Off_Shotgun = (Gun)(object)((byId119 is Gun) ? byId119 : null); PickupObject byId120 = PickupObjectDatabase.GetById(207); Plague_Pistol = (Gun)(object)((byId120 is Gun) ? byId120 : null); PickupObject byId121 = PickupObjectDatabase.GetById(208); Plunger = (Gun)(object)((byId121 is Gun) ? byId121 : null); PickupObject byId122 = PickupObjectDatabase.GetById(210); Gunbow = (Gun)(object)((byId122 is Gun) ? byId122 : null); PickupObject byId123 = PickupObjectDatabase.GetById(221); AK47_Tutorial = (Gun)(object)((byId123 is Gun) ? byId123 : null); PickupObject byId124 = PickupObjectDatabase.GetById(223); Cold_45 = (Gun)(object)((byId124 is Gun) ? byId124 : null); PickupObject byId125 = PickupObjectDatabase.GetById(225); Ice_Breaker = (Gun)(object)((byId125 is Gun) ? byId125 : null); PickupObject byId126 = PickupObjectDatabase.GetById(227); Wrist_Bow = (Gun)(object)((byId126 is Gun) ? byId126 : null); PickupObject byId127 = PickupObjectDatabase.GetById(228); Particulator = (Gun)(object)((byId127 is Gun) ? byId127 : null); PickupObject byId128 = PickupObjectDatabase.GetById(229); Hegemony_Carbine = (Gun)(object)((byId128 is Gun) ? byId128 : null); PickupObject byId129 = PickupObjectDatabase.GetById(230); Helix = (Gun)(object)((byId129 is Gun) ? byId129 : null); PickupObject byId130 = PickupObjectDatabase.GetById(231); Gilded_Hydra = (Gun)(object)((byId130 is Gun) ? byId130 : null); PickupObject byId131 = PickupObjectDatabase.GetById(251); Prize_Pistol = (Gun)(object)((byId131 is Gun) ? byId131 : null); PickupObject byId132 = PickupObjectDatabase.GetById(274); Dark_Marker = (Gun)(object)((byId132 is Gun) ? byId132 : null); PickupObject byId133 = PickupObjectDatabase.GetById(275); Flare_Gun = (Gun)(object)((byId133 is Gun) ? byId133 : null); PickupObject byId134 = PickupObjectDatabase.GetById(292); Molotov_Launcher = (Gun)(object)((byId134 is Gun) ? byId134 : null); PickupObject byId135 = PickupObjectDatabase.GetById(299); Super_Space_Turtles_Gun = (Gun)(object)((byId135 is Gun) ? byId135 : null); PickupObject byId136 = PickupObjectDatabase.GetById(327); Corsair = (Gun)(object)((byId136 is Gun) ? byId136 : null); PickupObject byId137 = PickupObjectDatabase.GetById(328); Charge_Shot = (Gun)(object)((byId137 is Gun) ? byId137 : null); PickupObject byId138 = PickupObjectDatabase.GetById(329); Zilla_Shotgun = (Gun)(object)((byId138 is Gun) ? byId138 : null); PickupObject byId139 = PickupObjectDatabase.GetById(330); The_Emperor = (Gun)(object)((byId139 is Gun) ? byId139 : null); PickupObject byId140 = PickupObjectDatabase.GetById(331); Science_Cannon = (Gun)(object)((byId140 is Gun) ? byId140 : null); PickupObject byId141 = PickupObjectDatabase.GetById(332); Lil_Bomber = (Gun)(object)((byId141 is Gun) ? byId141 : null); PickupObject byId142 = PickupObjectDatabase.GetById(333); Mutation = (Gun)(object)((byId142 is Gun) ? byId142 : null); PickupObject byId143 = PickupObjectDatabase.GetById(334); Wind_Up_Gun = (Gun)(object)((byId143 is Gun) ? byId143 : null); PickupObject byId144 = PickupObjectDatabase.GetById(335); Silencer = (Gun)(object)((byId144 is Gun) ? byId144 : null); PickupObject byId145 = PickupObjectDatabase.GetById(336); Pitchform = (Gun)(object)((byId145 is Gun) ? byId145 : null); PickupObject byId146 = PickupObjectDatabase.GetById(337); Composite_Gun = (Gun)(object)((byId146 is Gun) ? byId146 : null); PickupObject byId147 = PickupObjectDatabase.GetById(338); Gunther = (Gun)(object)((byId147 is Gun) ? byId147 : null); PickupObject byId148 = PickupObjectDatabase.GetById(339); Mahoguny = (Gun)(object)((byId148 is Gun) ? byId148 : null); PickupObject byId149 = PickupObjectDatabase.GetById(340); Lower_Case_R = (Gun)(object)((byId149 is Gun) ? byId149 : null); PickupObject byId150 = PickupObjectDatabase.GetById(341); Buzzkill = (Gun)(object)((byId150 is Gun) ? byId150 : null); PickupObject byId151 = PickupObjectDatabase.GetById(345); Fightsabre = (Gun)(object)((byId151 is Gun) ? byId151 : null); PickupObject byId152 = PickupObjectDatabase.GetById(346); Huntsman = (Gun)(object)((byId152 is Gun) ? byId152 : null); PickupObject byId153 = PickupObjectDatabase.GetById(347); Shotgrub = (Gun)(object)((byId153 is Gun) ? byId153 : null); PickupObject byId154 = PickupObjectDatabase.GetById(355); Chromesteel_Assault_Rifle = (Gun)(object)((byId154 is Gun) ? byId154 : null); PickupObject byId155 = PickupObjectDatabase.GetById(357); Cat_Claw = (Gun)(object)((byId155 is Gun) ? byId155 : null); PickupObject byId156 = PickupObjectDatabase.GetById(358); Railgun = (Gun)(object)((byId156 is Gun) ? byId156 : null); PickupObject byId157 = PickupObjectDatabase.GetById(359); Compressed_Air_Tank = (Gun)(object)((byId157 is Gun) ? byId157 : null); PickupObject byId158 = PickupObjectDatabase.GetById(360); Snakemaker = (Gun)(object)((byId158 is Gun) ? byId158 : null); PickupObject byId159 = PickupObjectDatabase.GetById(362); Bullet_Bore = (Gun)(object)((byId159 is Gun) ? byId159 : null); PickupObject byId160 = PickupObjectDatabase.GetById(363); Trick_Gun = (Gun)(object)((byId160 is Gun) ? byId160 : null); PickupObject byId161 = PickupObjectDatabase.GetById(365); Mass_Shotgun = (Gun)(object)((byId161 is Gun) ? byId161 : null); PickupObject byId162 = PickupObjectDatabase.GetById(368); El_Tigre = (Gun)(object)((byId162 is Gun) ? byId162 : null); PickupObject byId163 = PickupObjectDatabase.GetById(369); Bait_Launcher = (Gun)(object)((byId163 is Gun) ? byId163 : null); PickupObject byId164 = PickupObjectDatabase.GetById(370); Prototype_Railgun = (Gun)(object)((byId164 is Gun) ? byId164 : null); PickupObject byId165 = PickupObjectDatabase.GetById(372); RC_Rocket = (Gun)(object)((byId165 is Gun) ? byId165 : null); PickupObject byId166 = PickupObjectDatabase.GetById(376); Brick_Breaker = (Gun)(object)((byId166 is Gun) ? byId166 : null); PickupObject byId167 = PickupObjectDatabase.GetById(377); Excaliber = (Gun)(object)((byId167 is Gun) ? byId167 : null); PickupObject byId168 = PickupObjectDatabase.GetById(378); Derringer = (Gun)(object)((byId168 is Gun) ? byId168 : null); PickupObject byId169 = PickupObjectDatabase.GetById(379); Shotgun_Full_Of_Love = (Gun)(object)((byId169 is Gun) ? byId169 : null); PickupObject byId170 = PickupObjectDatabase.GetById(380); Betrayers_Shield = (Gun)(object)((byId170 is Gun) ? byId170 : null); PickupObject byId171 = PickupObjectDatabase.GetById(381); Triple_Crossbow = (Gun)(object)((byId171 is Gun) ? byId171 : null); PickupObject byId172 = PickupObjectDatabase.GetById(382); Sling = (Gun)(object)((byId172 is Gun) ? byId172 : null); PickupObject byId173 = PickupObjectDatabase.GetById(383); Flash_Ray = (Gun)(object)((byId173 is Gun) ? byId173 : null); PickupObject byId174 = PickupObjectDatabase.GetById(384); Phoenix = (Gun)(object)((byId174 is Gun) ? byId174 : null); PickupObject byId175 = PickupObjectDatabase.GetById(385); Hexagun = (Gun)(object)((byId175 is Gun) ? byId175 : null); PickupObject byId176 = PickupObjectDatabase.GetById(387); Frost_Giant = (Gun)(object)((byId176 is Gun) ? byId176 : null); PickupObject byId177 = PickupObjectDatabase.GetById(390); Cobalt_Hammer = (Gun)(object)((byId177 is Gun) ? byId177 : null); PickupObject byId178 = PickupObjectDatabase.GetById(393); Anvillian = (Gun)(object)((byId178 is Gun) ? byId178 : null); PickupObject byId179 = PickupObjectDatabase.GetById(394); Mine_Cutter = (Gun)(object)((byId179 is Gun) ? byId179 : null); PickupObject byId180 = PickupObjectDatabase.GetById(395); Staff_Of_Firepower = (Gun)(object)((byId180 is Gun) ? byId180 : null); PickupObject byId181 = PickupObjectDatabase.GetById(401); Gungine = (Gun)(object)((byId181 is Gun) ? byId181 : null); PickupObject byId182 = PickupObjectDatabase.GetById(402); Snowballer = (Gun)(object)((byId182 is Gun) ? byId182 : null); PickupObject byId183 = PickupObjectDatabase.GetById(404); Siren = (Gun)(object)((byId183 is Gun) ? byId183 : null); PickupObject byId184 = PickupObjectDatabase.GetById(406); Rattler = (Gun)(object)((byId184 is Gun) ? byId184 : null); PickupObject byId185 = PickupObjectDatabase.GetById(417); Blasphemy = (Gun)(object)((byId185 is Gun) ? byId185 : null); PickupObject byId186 = PickupObjectDatabase.GetById(444); Trident = (Gun)(object)((byId186 is Gun) ? byId186 : null); PickupObject byId187 = PickupObjectDatabase.GetById(445); The_Scrambler = (Gun)(object)((byId187 is Gun) ? byId187 : null); PickupObject byId188 = PickupObjectDatabase.GetById(464); Shellegun = (Gun)(object)((byId188 is Gun) ? byId188 : null); PickupObject byId189 = PickupObjectDatabase.GetById(472); Gummy_Gun = (Gun)(object)((byId189 is Gun) ? byId189 : null); PickupObject byId190 = PickupObjectDatabase.GetById(474); Abyssal_Tentacle = (Gun)(object)((byId190 is Gun) ? byId190 : null); PickupObject byId191 = PickupObjectDatabase.GetById(475); Quad_Laser = (Gun)(object)((byId191 is Gun) ? byId191 : null); PickupObject byId192 = PickupObjectDatabase.GetById(476); Microtransaction_Gun = (Gun)(object)((byId192 is Gun) ? byId192 : null); PickupObject byId193 = PickupObjectDatabase.GetById(477); Origuni = (Gun)(object)((byId193 is Gun) ? byId193 : null); PickupObject byId194 = PickupObjectDatabase.GetById(478); Banana = (Gun)(object)((byId194 is Gun) ? byId194 : null); PickupObject byId195 = PickupObjectDatabase.GetById(479); Super_Meat_Gun = (Gun)(object)((byId195 is Gun) ? byId195 : null); PickupObject byId196 = PickupObjectDatabase.GetById(480); Makeshift_Cannon = (Gun)(object)((byId196 is Gun) ? byId196 : null); PickupObject byId197 = PickupObjectDatabase.GetById(481); Camera = (Gun)(object)((byId197 is Gun) ? byId197 : null); PickupObject byId198 = PickupObjectDatabase.GetById(482); Gunzheng = (Gun)(object)((byId198 is Gun) ? byId198 : null); PickupObject byId199 = PickupObjectDatabase.GetById(483); Tetrominator = (Gun)(object)((byId199 is Gun) ? byId199 : null); PickupObject byId200 = PickupObjectDatabase.GetById(484); Devolver = (Gun)(object)((byId200 is Gun) ? byId200 : null); PickupObject byId201 = PickupObjectDatabase.GetById(486); Treadnaught_Cannon = (Gun)(object)((byId201 is Gun) ? byId201 : null); PickupObject byId202 = PickupObjectDatabase.GetById(503); Bullet = (Gun)(object)((byId202 is Gun) ? byId202 : null); PickupObject byId203 = PickupObjectDatabase.GetById(504); Hyper_Light_Blaster = (Gun)(object)((byId203 is Gun) ? byId203 : null); PickupObject byId204 = PickupObjectDatabase.GetById(505); Magnum_Plus_Wicked_Sister = (Gun)(object)((byId204 is Gun) ? byId204 : null); PickupObject byId205 = PickupObjectDatabase.GetById(506); Really_Special_Lute = (Gun)(object)((byId205 is Gun) ? byId205 : null); PickupObject byId206 = PickupObjectDatabase.GetById(507); Starpew = (Gun)(object)((byId206 is Gun) ? byId206 : null); PickupObject byId207 = PickupObjectDatabase.GetById(508); Dueling_Laser = (Gun)(object)((byId207 is Gun) ? byId207 : null); PickupObject byId208 = PickupObjectDatabase.GetById(510); JK47 = (Gun)(object)((byId208 is Gun) ? byId208 : null); PickupObject byId209 = PickupObjectDatabase.GetById(511); Third_Party_Controller = (Gun)(object)((byId209 is Gun) ? byId209 : null); PickupObject byId210 = PickupObjectDatabase.GetById(512); Shell = (Gun)(object)((byId210 is Gun) ? byId210 : null); PickupObject byId211 = PickupObjectDatabase.GetById(513); Poxcannon = (Gun)(object)((byId211 is Gun) ? byId211 : null); PickupObject byId212 = PickupObjectDatabase.GetById(514); Directional_Pad = (Gun)(object)((byId212 is Gun) ? byId212 : null); PickupObject byId213 = PickupObjectDatabase.GetById(515); Mourning_Star = (Gun)(object)((byId213 is Gun) ? byId213 : null); PickupObject byId214 = PickupObjectDatabase.GetById(516); Triple_Gun = (Gun)(object)((byId214 is Gun) ? byId214 : null); PickupObject byId215 = PickupObjectDatabase.GetById(517); Triple_Gun_Form_Machine_Gun = (Gun)(object)((byId215 is Gun) ? byId215 : null); PickupObject byId216 = PickupObjectDatabase.GetById(518); Triple_Gun_Form_Laser = (Gun)(object)((byId216 is Gun) ? byId216 : null); PickupObject byId217 = PickupObjectDatabase.GetById(519); Combined_Rifle = (Gun)(object)((byId217 is Gun) ? byId217 : null); PickupObject byId218 = PickupObjectDatabase.GetById(520); Balloon_Gun = (Gun)(object)((byId218 is Gun) ? byId218 : null); PickupObject byId219 = PickupObjectDatabase.GetById(535); Real_Cool_Bow = (Gun)(object)((byId219 is Gun) ? byId219 : null); PickupObject byId220 = PickupObjectDatabase.GetById(537); Vorpal_Gun = (Gun)(object)((byId220 is Gun) ? byId220 : null); PickupObject byId221 = PickupObjectDatabase.GetById(539); Boxing_Glove = (Gun)(object)((byId221 is Gun) ? byId221 : null); PickupObject byId222 = PickupObjectDatabase.GetById(540); Glass_Cannon = (Gun)(object)((byId222 is Gun) ? byId222 : null); PickupObject byId223 = PickupObjectDatabase.GetById(541); Casey = (Gun)(object)((byId223 is Gun) ? byId223 : null); PickupObject byId224 = PickupObjectDatabase.GetById(542); Strafe_Gun = (Gun)(object)((byId224 is Gun) ? byId224 : null); PickupObject byId225 = PickupObjectDatabase.GetById(543); The_Predator = (Gun)(object)((byId225 is Gun) ? byId225 : null); PickupObject byId226 = PickupObjectDatabase.GetById(544); AC15_Unarmored = (Gun)(object)((byId226 is Gun) ? byId226 : null); PickupObject byId227 = PickupObjectDatabase.GetById(545); AC15_Armored = (Gun)(object)((byId227 is Gun) ? byId227 : null); PickupObject byId228 = PickupObjectDatabase.GetById(546); Windgunner = (Gun)(object)((byId228 is Gun) ? byId228 : null); PickupObject byId229 = PickupObjectDatabase.GetById(550); Knights_Gun = (Gun)(object)((byId229 is Gun) ? byId229 : null); PickupObject byId230 = PickupObjectDatabase.GetById(551); Crown_Of_Guns = (Gun)(object)((byId230 is Gun) ? byId230 : null); PickupObject byId231 = PickupObjectDatabase.GetById(562); The_Fat_Line = (Gun)(object)((byId231 is Gun) ? byId231 : null); PickupObject byId232 = PickupObjectDatabase.GetById(563); The_Exotic = (Gun)(object)((byId232 is Gun) ? byId232 : null); PickupObject byId233 = PickupObjectDatabase.GetById(566); Rad_Gun = (Gun)(object)((byId233 is Gun) ? byId233 : null); PickupObject byId234 = PickupObjectDatabase.GetById(574); Wooden_Blasphemy = (Gun)(object)((byId234 is Gun) ? byId234 : null); PickupObject byId235 = PickupObjectDatabase.GetById(576); Robots_Left_Hand = (Gun)(object)((byId235 is Gun) ? byId235 : null); PickupObject byId236 = PickupObjectDatabase.GetById(577); Turbo_Gun = (Gun)(object)((byId236 is Gun) ? byId236 : null); PickupObject byId237 = PickupObjectDatabase.GetById(593); Void_Core_Cannon = (Gun)(object)((byId237 is Gun) ? byId237 : null); PickupObject byId238 = PickupObjectDatabase.GetById(594); Crown_Of_Guns_Alas_Sniperion = (Gun)(object)((byId238 is Gun) ? byId238 : null); PickupObject byId239 = PickupObjectDatabase.GetById(595); Life_Orb = (Gun)(object)((byId239 is Gun) ? byId239 : null); PickupObject byId240 = PickupObjectDatabase.GetById(596); Teapot = (Gun)(object)((byId240 is Gun) ? byId240 : null); PickupObject byId241 = PickupObjectDatabase.GetById(597); Mr_Accretion_Jr = (Gun)(object)((byId241 is Gun) ? byId241 : null); PickupObject byId242 = PickupObjectDatabase.GetById(598); Stone_Dome = (Gun)(object)((byId242 is Gun) ? byId242 : null); PickupObject byId243 = PickupObjectDatabase.GetById(599); Bubble_Blaster = (Gun)(object)((byId243 is Gun) ? byId243 : null); PickupObject byId244 = PickupObjectDatabase.GetById(601); Big_Shotgun = (Gun)(object)((byId244 is Gun) ? byId244 : null); PickupObject byId245 = PickupObjectDatabase.GetById(602); GuNNeR = (Gun)(object)((byId245 is Gun) ? byId245 : null); PickupObject byId246 = PickupObjectDatabase.GetById(603); Laney_Gun = (Gun)(object)((byId246 is Gun) ? byId246 : null); PickupObject byId247 = PickupObjectDatabase.GetById(604); Slinger = (Gun)(object)((byId247 is Gun) ? byId247 : null); PickupObject byId248 = PickupObjectDatabase.GetById(608); Mutation_Neo_Tech_Yo = (Gun)(object)((byId248 is Gun) ? byId248 : null); PickupObject byId249 = PickupObjectDatabase.GetById(609); Rubensteins_Monster = (Gun)(object)((byId249 is Gun) ? byId249 : null); PickupObject byId250 = PickupObjectDatabase.GetById(610); Wood_Beam = (Gun)(object)((byId250 is Gun) ? byId250 : null); PickupObject byId251 = PickupObjectDatabase.GetById(611); AK47_Island_Forme = (Gun)(object)((byId251 is Gun) ? byId251 : null); PickupObject byId252 = PickupObjectDatabase.GetById(612); Heroine_Wave_Beam = (Gun)(object)((byId252 is Gun) ? byId252 : null); PickupObject byId253 = PickupObjectDatabase.GetById(613); Heroine_Ice_Beam = (Gun)(object)((byId253 is Gun) ? byId253 : null); PickupObject byId254 = PickupObjectDatabase.GetById(614); Heroine_Plasma_Beam = (Gun)(object)((byId254 is Gun) ? byId254 : null); PickupObject byId255 = PickupObjectDatabase.GetById(615); Heroine_Hyper_Beam = (Gun)(object)((byId255 is Gun) ? byId255 : null); PickupObject byId256 = PickupObjectDatabase.GetById(616); Casey_Careful_Iteration = (Gun)(object)((byId256 is Gun) ? byId256 : null); PickupObject byId257 = PickupObjectDatabase.GetById(617); Megahand_Quick_Boomerang = (Gun)(object)((byId257 is Gun) ? byId257 : null); PickupObject byId258 = PickupObjectDatabase.GetById(618); Megahand_Time_Stopper = (Gun)(object)((byId258 is Gun) ? byId258 : null); PickupObject byId259 = PickupObjectDatabase.GetById(619); Megahand_Metal_Blade = (Gun)(object)((byId259 is Gun) ? byId259 : null); PickupObject byId260 = PickupObjectDatabase.GetById(620); Megahand_Leaf_Shield = (Gun)(object)((byId260 is Gun) ? byId260 : null); PickupObject byId261 = PickupObjectDatabase.GetById(621); Megahand_Atomic_Fire = (Gun)(object)((byId261 is Gun) ? byId261 : null); PickupObject byId262 = PickupObjectDatabase.GetById(622); Megahand_Bubble_Lead = (Gun)(object)((byId262 is Gun) ? byId262 : null); PickupObject byId263 = PickupObjectDatabase.GetById(623); Megahand_Air_Shooter = (Gun)(object)((byId263 is Gun) ? byId263 : null); PickupObject byId264 = PickupObjectDatabase.GetById(624); Megahand_Crash_Bomber = (Gun)(object)((byId264 is Gun) ? byId264 : null); PickupObject byId265 = PickupObjectDatabase.GetById(626); Elimentaler = (Gun)(object)((byId265 is Gun) ? byId265 : null); PickupObject byId266 = PickupObjectDatabase.GetById(647); Chamber_Gun = (Gun)(object)((byId266 is Gun) ? byId266 : null); PickupObject byId267 = PickupObjectDatabase.GetById(648); Tangler_Full_Circle = (Gun)(object)((byId267 is Gun) ? byId267 : null); PickupObject byId268 = PickupObjectDatabase.GetById(649); Uppercase_R = (Gun)(object)((byId268 is Gun) ? byId268 : null); PickupObject byId269 = PickupObjectDatabase.GetById(650); Winchester_Payday_Companions = (Gun)(object)((byId269 is Gun) ? byId269 : null); PickupObject byId270 = PickupObjectDatabase.GetById(651); Rogue_Special_Alt = (Gun)(object)((byId270 is Gun) ? byId270 : null); PickupObject byId271 = PickupObjectDatabase.GetById(652); Budget_Revolver_Alt = (Gun)(object)((byId271 is Gun) ? byId271 : null); PickupObject byId272 = PickupObjectDatabase.GetById(656); Kruller_Glaive = (Gun)(object)((byId272 is Gun) ? byId272 : null); PickupObject byId273 = PickupObjectDatabase.GetById(657); Chamber_Gun_Oubliette = (Gun)(object)((byId273 is Gun) ? byId273 : null); PickupObject byId274 = PickupObjectDatabase.GetById(658); Chamber_Gun_Forge = (Gun)(object)((byId274 is Gun) ? byId274 : null); PickupObject byId275 = PickupObjectDatabase.GetById(659); Chamber_Gun_Hollow = (Gun)(object)((byId275 is Gun) ? byId275 : null); PickupObject byId276 = PickupObjectDatabase.GetById(660); Chamber_Gun_Proper = (Gun)(object)((byId276 is Gun) ? byId276 : null); PickupObject byId277 = PickupObjectDatabase.GetById(668); Elimentaler_Enemy = (Gun)(object)((byId277 is Gun) ? byId277 : null); PickupObject byId278 = PickupObjectDatabase.GetById(670); Dragunfire_High = (Gun)(object)((byId278 is Gun) ? byId278 : null); PickupObject byId279 = PickupObjectDatabase.GetById(671); Gamma_Ray__Beta_Ray = (Gun)(object)((byId279 is Gun) ? byId279 : null); PickupObject byId280 = PickupObjectDatabase.GetById(672); Elephant_Gun__Elephant_In_The_Room = (Gun)(object)((byId280 is Gun) ? byId280 : null); PickupObject byId281 = PickupObjectDatabase.GetById(673); Machine_Pistol__Pistol_Machine = (Gun)(object)((byId281 is Gun) ? byId281 : null); PickupObject byId282 = PickupObjectDatabase.GetById(674); Peashooter__Pea_Cannon = (Gun)(object)((byId282 is Gun) ? byId282 : null); PickupObject byId283 = PickupObjectDatabase.GetById(675); Dueling_Pistol__Dualing_Pistol = (Gun)(object)((byId283 is Gun) ? byId283 : null); PickupObject byId284 = PickupObjectDatabase.GetById(676); Laser_Rifle__Laser_Light_Show = (Gun)(object)((byId284 is Gun) ? byId284 : null); PickupObject byId285 = PickupObjectDatabase.GetById(677); Dragunfire__Kalibreath = (Gun)(object)((byId285 is Gun) ? byId285 : null); PickupObject byId286 = PickupObjectDatabase.GetById(678); Blunderbuss_Blunderbrace = (Gun)(object)((byId286 is Gun) ? byId286 : null); PickupObject byId287 = PickupObjectDatabase.GetById(679); Snowballer__Snowball_Shotgun = (Gun)(object)((byId287 is Gun) ? byId287 : null); PickupObject byId288 = PickupObjectDatabase.GetById(680); Excaliber__Armored_Corps = (Gun)(object)((byId288 is Gun) ? byId288 : null); PickupObject byId289 = PickupObjectDatabase.GetById(681); Thirty_Eight_Special__Detective_Mode = (Gun)(object)((byId289 is Gun) ? byId289 : null); PickupObject byId290 = PickupObjectDatabase.GetById(682); Plague_Pistol__Pandemic_Pistol = (Gun)(object)((byId290 is Gun) ? byId290 : null); PickupObject byId291 = PickupObjectDatabase.GetById(683); Thunderclap__Alistairs_Ladder = (Gun)(object)((byId291 is Gun) ? byId291 : null); PickupObject byId292 = PickupObjectDatabase.GetById(684); M1__M1_Multitool = (Gun)(object)((byId292 is Gun) ? byId292 : null); PickupObject byId293 = PickupObjectDatabase.GetById(685); Thompson__Future_Gangster = (Gun)(object)((byId293 is Gun) ? byId293 : null); PickupObject byId294 = PickupObjectDatabase.GetById(686); Corsair__Black_Flag = (Gun)(object)((byId294 is Gun) ? byId294 : null); PickupObject byId295 = PickupObjectDatabase.GetById(687); Crestfaller__Five_O_Clock_Somewhere = (Gun)(object)((byId295 is Gun) ? byId295 : null); PickupObject byId296 = PickupObjectDatabase.GetById(688); Banana__Fruits_And_Vegetables = (Gun)(object)((byId296 is Gun) ? byId296 : null); PickupObject byId297 = PickupObjectDatabase.GetById(689); Abyssal_Tentacle__Kalibers_Grip = (Gun)(object)((byId297 is Gun) ? byId297 : null); PickupObject byId298 = PickupObjectDatabase.GetById(690); Klobbe__Klobbering_Time = (Gun)(object)((byId298 is Gun) ? byId298 : null); PickupObject byId299 = PickupObjectDatabase.GetById(691); Molotov_Launcher__Special_Reserve = (Gun)(object)((byId299 is Gun) ? byId299 : null); PickupObject byId300 = PickupObjectDatabase.GetById(692); Nail_Gun__Nailed_It = (Gun)(object)((byId300 is Gun) ? byId300 : null); PickupObject byId301 = PickupObjectDatabase.GetById(693); Gunbow__Across_The_Bow = (Gun)(object)((byId301 is Gun) ? byId301 : null); PickupObject byId302 = PickupObjectDatabase.GetById(694); Big_Iron__Iron_Slug = (Gun)(object)((byId302 is Gun) ? byId302 : null); PickupObject byId303 = PickupObjectDatabase.GetById(695); Hyper_Light_Blaster__Hard_Light = (Gun)(object)((byId303 is Gun) ? byId303 : null); PickupObject byId304 = PickupObjectDatabase.GetById(696); Alien_Sidearm__Chief_Master = (Gun)(object)((byId304 is Gun) ? byId304 : null); PickupObject byId305 = PickupObjectDatabase.GetById(697); Shock_Rifle__Battery_Powered = (Gun)(object)((byId305 is Gun) ? byId305 : null); PickupObject byId306 = PickupObjectDatabase.GetById(698); Flame_Hand__Maximize_Spell = (Gun)(object)((byId306 is Gun) ? byId306 : null); PickupObject byId307 = PickupObjectDatabase.GetById(699); Hegemony_Rifle__Hegemony_Special_Forces = (Gun)(object)((byId307 is Gun) ? byId307 : null); PickupObject byId308 = PickupObjectDatabase.GetById(700); Cactus__Cactus_Flower = (Gun)(object)((byId308 is Gun) ? byId308 : null); PickupObject byId309 = PickupObjectDatabase.GetById(701); Luxin_Cannon__Noxin_Cannon = (Gun)(object)((byId309 is Gun) ? byId309 : null); PickupObject byId310 = PickupObjectDatabase.GetById(702); Face_Melter__Alternative_Rock = (Gun)(object)((byId310 is Gun) ? byId310 : null); PickupObject byId311 = PickupObjectDatabase.GetById(703); Bee_Hive__Apiary = (Gun)(object)((byId311 is Gun) ? byId311 : null); PickupObject byId312 = PickupObjectDatabase.GetById(704); Trashcannon__Recycling_Bin = (Gun)(object)((byId312 is Gun) ? byId312 : null); PickupObject byId313 = PickupObjectDatabase.GetById(705); Flash_Ray__Saviour_Of_The_Universe = (Gun)(object)((byId313 is Gun) ? byId313 : null); PickupObject byId314 = PickupObjectDatabase.GetById(706); Flare_Gun__Firing_With_Flair = (Gun)(object)((byId314 is Gun) ? byId314 : null); PickupObject byId315 = PickupObjectDatabase.GetById(707); Vulcan_Cannon__Not_Quite_As_Mini = (Gun)(object)((byId315 is Gun) ? byId315 : null); PickupObject byId316 = PickupObjectDatabase.GetById(708); Helix__Double_Double_Helix = (Gun)(object)((byId316 is Gun) ? byId316 : null); PickupObject byId317 = PickupObjectDatabase.GetById(709); Barrel__Like_Shooting_Fish = (Gun)(object)((byId317 is Gun) ? byId317 : null); PickupObject byId318 = PickupObjectDatabase.GetById(710); Freeze_Ray__Ice_Cap = (Gun)(object)((byId318 is Gun) ? byId318 : null); PickupObject byId319 = PickupObjectDatabase.GetById(711); Light_Gun__Peripheral_Vision = (Gun)(object)((byId319 is Gun) ? byId319 : null); PickupObject byId320 = PickupObjectDatabase.GetById(712); Raiden_Coil__Raiden = (Gun)(object)((byId320 is Gun) ? byId320 : null); PickupObject byId321 = PickupObjectDatabase.GetById(713); Moonscraper__Double_Moon_7 = (Gun)(object)((byId321 is Gun) ? byId321 : null); PickupObject byId322 = PickupObjectDatabase.GetById(714); Laser_Lotus__Laser_Lotus_Bloom = (Gun)(object)((byId322 is Gun) ? byId322 : null); PickupObject byId323 = PickupObjectDatabase.GetById(715); H4mmer__Hammer_And_Nail = (Gun)(object)((byId323 is Gun) ? byId323 : null); PickupObject byId324 = PickupObjectDatabase.GetById(716); AWP__Arctic_Warfare = (Gun)(object)((byId324 is Gun) ? byId324 : null); PickupObject byId325 = PickupObjectDatabase.GetById(717); Bullet_Bore__Cerebral_Bros = (Gun)(object)((byId325 is Gun) ? byId325 : null); PickupObject byId326 = PickupObjectDatabase.GetById(718); Polaris__Square_Brace = (Gun)(object)((byId326 is Gun) ? byId326 : null); PickupObject byId327 = PickupObjectDatabase.GetById(719); Lil_Bomber__King_Bomber = (Gun)(object)((byId327 is Gun) ? byId327 : null); PickupObject byId328 = PickupObjectDatabase.GetById(720); Proton_Backpack__Electron_Pack = (Gun)(object)((byId328 is Gun) ? byId328 : null); PickupObject byId329 = PickupObjectDatabase.GetById(721); Jolter__Heavy_Jolt = (Gun)(object)((byId329 is Gun) ? byId329 : null); PickupObject byId330 = PickupObjectDatabase.GetById(722); Pitchfork__Pitch_Perfect = (Gun)(object)((byId330 is Gun) ? byId330 : null); PickupObject byId331 = PickupObjectDatabase.GetById(723); Com4nd0__Commammo_Belt = (Gun)(object)((byId331 is Gun) ? byId331 : null); PickupObject byId332 = PickupObjectDatabase.GetById(724); Hegemony_Carbine__Ruby_Carbine = (Gun)(object)((byId332 is Gun) ? byId332 : null); PickupObject byId333 = PickupObjectDatabase.GetById(725); Tear_Jerker__Unknown_Synergy = (Gun)(object)((byId333 is Gun) ? byId333 : null); PickupObject byId334 = PickupObjectDatabase.GetById(726); AKey47__Akey_Breaky = (Gun)(object)((byId334 is Gun) ? byId334 : null); PickupObject byId335 = PickupObjectDatabase.GetById(728); Gunderfury_Lv_50 = (Gun)(object)((byId335 is Gun) ? byId335 : null); PickupObject byId336 = PickupObjectDatabase.GetById(729); Gunderfury_Lv_60 = (Gun)(object)((byId336 is Gun) ? byId336 : null); PickupObject byId337 = PickupObjectDatabase.GetById(730); Gunderfury_Lv_40 = (Gun)(object)((byId337 is Gun) ? byId337 : null); PickupObject byId338 = PickupObjectDatabase.GetById(731); Gunderfury_Lv_30 = (Gun)(object)((byId338 is Gun) ? byId338 : null); PickupObject byId339 = PickupObjectDatabase.GetById(732); Gunderfury_Lv_10 = (Gun)(object)((byId339 is Gun) ? byId339 : null); PickupObject byId340 = PickupObjectDatabase.GetById(733); Gunderfury_Lv_20 = (Gun)(object)((byId340 is Gun) ? byId340 : null); PickupObject byId341 = PickupObjectDatabase.GetById(734); Mimic_Gun = (Gun)(object)((byId341 is Gun) ? byId341 : null); PickupObject byId342 = PickupObjectDatabase.GetById(736); Phoenix__Phoenix_Up = (Gun)(object)((byId342 is Gun) ? byId342 : null); PickupObject byId343 = PickupObjectDatabase.GetById(737); Betrayers_Shield__Betrayers_Lies = (Gun)(object)((byId343 is Gun) ? byId343 : null); PickupObject byId344 = PickupObjectDatabase.GetById(738); Lower_Case_R__Unknown_Synergy = (Gun)(object)((byId344 is Gun) ? byId344 : null); PickupObject byId345 = PickupObjectDatabase.GetById(739); Gungeon_Ant__Great_Queen_Ant = (Gun)(object)((byId345 is Gun) ? byId345 : null); PickupObject byId346 = PickupObjectDatabase.GetById(740); Buzzkill__Not_So_Sawed_Off = (Gun)(object)((byId346 is Gun) ? byId346 : null); PickupObject byId347 = PickupObjectDatabase.GetById(741); Tear_Jerker__Wrath_Of_The_Blam = (Gun)(object)((byId347 is Gun) ? byId347 : null); PickupObject byId348 = PickupObjectDatabase.GetById(742); Alien_Engine__Contrail = (Gun)(object)((byId348 is Gun) ? byId348 : null); PickupObject byId349 = PickupObjectDatabase.GetById(743); Rad_Gun__Kung_Fu_Hippie_Rappin_Surfer = (Gun)(object)((byId349 is Gun) ? byId349 : null); PickupObject byId350 = PickupObjectDatabase.GetById(744); Origuni__Parchmental = (Gun)(object)((byId350 is Gun) ? byId350 : null); PickupObject byId351 = PickupObjectDatabase.GetById(745); Ice_Breaker__Gunderlord = (Gun)(object)((byId351 is Gun) ? byId351 : null); PickupObject byId352 = PickupObjectDatabase.GetById(747); Turtine_Gun = (Gun)(object)((byId352 is Gun) ? byId352 : null); PickupObject byId353 = PickupObjectDatabase.GetById(748); Sunlight_Javelin = (Gun)(object)((byId353 is Gun) ? byId353 : null); PickupObject byId354 = PickupObjectDatabase.GetById(749); Shotbow__Second__Accident = (Gun)(object)((byId354 is Gun) ? byId354 : null); PickupObject byId355 = PickupObjectDatabase.GetById(750); Dungeon_Eagle__Dont_Hoot_The_Messenger = (Gun)(object)((byId355 is Gun) ? byId355 : null); PickupObject byId356 = PickupObjectDatabase.GetById(751); Big_Gun = (Gun)(object)((byId356 is Gun) ? byId356 : null); PickupObject byId357 = PickupObjectDatabase.GetById(752); Western_Bro_Nomes_Revolver = (Gun)(object)((byId357 is Gun) ? byId357 : null); PickupObject byId358 = PickupObjectDatabase.GetById(753); Western_Bro_Tucos_Revolver = (Gun)(object)((byId358 is Gun) ? byId358 : null); PickupObject byId359 = PickupObjectDatabase.GetById(754); Western_Bro_Angels_Revolver = (Gun)(object)((byId359 is Gun) ? byId359 : null); PickupObject byId360 = PickupObjectDatabase.GetById(755); Evolver = (Gun)(object)((byId360 is Gun) ? byId360 : null); PickupObject byId361 = PickupObjectDatabase.GetById(756); Evolver_Sponge = (Gun)(object)((byId361 is Gun) ? byId361 : null); PickupObject byId362 = PickupObjectDatabase.GetById(757); Evolver_Flatworm = (Gun)(object)((byId362 is Gun) ? byId362 : null); PickupObject byId363 = PickupObjectDatabase.GetById(758); Evolver_Snail = (Gun)(object)((byId363 is Gun) ? byId363 : null); PickupObject byId364 = PickupObjectDatabase.GetById(759); Evolver_Frog = (Gun)(object)((byId364 is Gun) ? byId364 : null); PickupObject byId365 = PickupObjectDatabase.GetById(760); Evolver_Dragon = (Gun)(object)((byId365 is Gun) ? byId365 : null); PickupObject byId366 = PickupObjectDatabase.GetById(761); High_Kaliber = (Gun)(object)((byId366 is Gun) ? byId366 : null); PickupObject byId367 = PickupObjectDatabase.GetById(762); Finished_Gun = (Gun)(object)((byId367 is Gun) ? byId367 : null); PickupObject byId368 = PickupObjectDatabase.GetById(763); Chamber_Gun_Hell = (Gun)(object)((byId368 is Gun) ? byId368 : null); PickupObject byId369 = PickupObjectDatabase.GetById(806); Chamber_Gun_Abbey = (Gun)(object)((byId369 is Gun) ? byId369 : null); PickupObject byId370 = PickupObjectDatabase.GetById(807); Chamber_Gun_Mines = (Gun)(object)((byId370 is Gun) ? byId370 : null); PickupObject byId371 = PickupObjectDatabase.GetById(808); Chamber_Gun_Rat_Lair = (Gun)(object)((byId371 is Gun) ? byId371 : null); PickupObject byId372 = PickupObjectDatabase.GetById(809); Marine_Sidearm_Alt = (Gun)(object)((byId372 is Gun) ? byId372 : null); PickupObject byId373 = PickupObjectDatabase.GetById(810); Rusty_Sidearm_Alt = (Gun)(object)((byId373 is Gun) ? byId373 : null); PickupObject byId374 = PickupObjectDatabase.GetById(811); Dart_Gun_Alt = (Gun)(object)((byId374 is Gun) ? byId374 : null); PickupObject byId375 = PickupObjectDatabase.GetById(812); Robots_Right_Arm_Alt = (Gun)(object)((byId375 is Gun) ? byId375 : null); PickupObject byId376 = PickupObjectDatabase.GetById(813); Blasphemy_Alt = (Gun)(object)((byId376 is Gun) ? byId376 : null); PickupObject byId377 = PickupObjectDatabase.GetById(816); Trank_Gun__I_Need_Scissors_61 = (Gun)(object)((byId377 is Gun) ? byId377 : null); PickupObject byId378 = PickupObjectDatabase.GetById(819); Glass_Cannon__Max_Pane = (Gun)(object)((byId378 is Gun) ? byId378 : null); PickupObject byId379 = PickupObjectDatabase.GetById(823); Chamber_Gun_RNG = (Gun)(object)((byId379 is Gun) ? byId379 : null); } } public static class Items { public static SimplePuzzleItem Eye_Jewel; public static BasicStatPickup Scope; public static BasicStatPickup Magic_Sweet; public static BasicStatPickup Heavy_Bullets; public static CartographersRingItem Cartographers_Ring; public static BasicStatPickup Rocket_Powered_Bullets; public static BasicStatPickup Bionic_Leg; public static BasicStatPickup Ballot; public static OnKillEnemyItem Ammo_Synthesizer; public static BasicStatPickup Eyepatch; public static MetronomeItem Metronome; public static BasicStatPickup Junk; public static BasicStatPickup Utility_Belt; public static MiserlyProtectionItem Ring_Of_Miserly_Protection; public static BasicStatPickup Backpack; public static BasicStatPickup Ammo_Belt; public static CogOfBattleItem Cog_Of_Battle; public static SpawnProjectileOnDamagedItem Honey_Comb; public static SpawnItemOnRoomClearItem Master_Of_Unlocking; public static BasicStatPickup Lies; public static RingOfPitFriendship Amulet_Of_The_Pit_Lord; public static GundromedaStrain Gundromeda_Strain; public static BulletArmorItem Gunknight_Helmet; public static BulletArmorItem Gunknight_Greaves; public static BulletArmorItem Gunknight_Gauntlet; public static BulletArmorItem Gunknight_Armor; public static SpawnItemOnRoomClearItem Heart_Synthesizer; public static BasicStatPickup Oiled_Cylinder; public static SkeletonKeyItem Shelleton_Key; public static EnemyBulletSpeedItem Bloody_Eye; public static ActiveItemCooldownItem Ice_Cube; public static BasicStatPickup Ghost_Bullets; public static BasicStatPickup Disarming_Personality; public static PassiveReflectItem Rolling_Eye; public static DamageTypeModifierItem Ring_Of_Fire_Resistance; public static PassiveGooperItem Bug_Boots; public static BulletStatusEffectItem Irradiated_Lead; public static BasicStatPickup Ballistic_Boots; public static BasicStatPickup Lichy_Trigger_Finger; public static SpawnItemOnRoomClearItem Coin_Crown; public static BasicStatPickup Old_Knights_Shield; public static BasicStatPickup Old_Knights_Helm; public static PlayerOrbitalItem Space_Friend; public static HomingBulletsPassiveItem Crutch; public static GunVolleyModificationItem Scattershot; public static NotePassiveItem Infuriating_Note_1; public static NotePassiveItem Infuriating_Note_2; public static NotePassiveItem Infuriating_Note_3; public static NotePassiveItem Infuriating_Note_4; public static NotePassiveItem Infuriating_Note_5; public static NotePassiveItem Infuriating_Note_6; public static PlayerOrbitalItem Owl; public static AuraItem Gungeon_Pepper; public static AmazingChestAheadItem Ring_Of_Chest_Friendship; public static BasicStatPickup Ancient_Heros_Bandana; public static HeavyBootsItem Heavy_Boots; public static EyeOfTheTigerItem Broccoli; public static HealingReceivedModificationItem Antibody; public static IounStoneOrbitalItem Pink_Guon_Stone; public static PlayerOrbitalItem White_Guon_Stone; public static PlayerOrbitalItem Orange_Guon_Stone; public static IounStoneOrbitalItem Clear_Guon_Stone; public static IounStoneOrbitalItem Red_Guon_Stone; public static IounStoneOrbitalItem Blue_Guon_Stone; public static EyeOfTheTigerItem Riddle_Of_Lead; public static LaserSightItem Laser_Sight; public static BasicStatPickup Fat_Bullets; public static BasicStatPickup Frost_Bullets; public static SuperhotItem Super_Hot_Watch; public static BasicStatPickup Drum_Clip; public static CartographersRingItem Gungeon_Blueprint; public static HomingBulletsPassiveItem Homing_Bullets; public static RegenerationPassiveItem Blood_Brooch; public static BasicStatPickup Plus1_Bullets; public static GunVolleyModificationItem Backup_Gun; public static BasicStatPickup Bouncy_Bullets; public static SevenLeafCloverItem Seven_Leaf_Clover; public static SunglassesItem Sunglasses; public static MimicToothNecklaceItem Mimic_Tooth_Necklance; public static MimicRingItem Ring_Of_Mimic_Friendship; public static BulletStatusEffectItem Hot_Lead; public static ComplexProjectileModifier Shock_Rounds; public static CompanionItem Dog; public static CompanionItem Super_Space_Turtle; public static BulletThatCanKillThePast Bullet_That_Can_Kill_The_Past; public static ComplexProjectileModifier Explosive_Rounds; public static CathedralCrestItem Old_Crest; public static WingsItem Wax_Wings; public static BasicStatPickup Cloranthy_Ring; public static WingsItem Fairy_Wings; public static ExtraLifeItem Clone; public static HelmetItem Blast_Helmet; public static PassiveGooperItem Monster_Blood; public static NanomachinesItem Nanomachines; public static DownwellBootsItem Gunboots; public static CompanionItem R2G2; public static BlankModificationItem Gold_Ammolet; public static BlankModificationItem Lodestone_Ammolet; public static ModifyProjectileOnEnemyImpact Angry_Bullets; public static BlankModificationItem Chaos_Ammolet; public static CoopPassiveItem Number_2; public static BlankModificationItem Uranium_Ammolet; public static BlankModificationItem Copper_Ammolet; public static BlankModificationItem Frost_Ammolet; public static AncientPrimerItem Prime_Primer; public static AstralSlugItem Planar_Lead; public static ObsidianShellItem Obsidian_Shell_Casing; public static ComplexProjectileModifier Shadow_Bullets; public static RagePassiveItem Enraging_Photo; public static BasicStatPickup Military_Training; public static SpawnProjectileOnDamagedItem Heart_Of_Ice; public static BasicStatPickup Hunters_Journal; public static ClipBulletModifierItem Alpha_Bullets; public static ClipBulletModifierItem Omega_Bullets; public static MoveAmmoToClipItem Easy_Reload_Bullets; public static TableFlipItem Table_Tech_Sight; public static TableFlipItem Table_Tech_Money; public static TableFlipItem Table_Tech_Rocket; public static TableFlipItem Table_Tech_Rage; public static TableFlipItem Table_Tech_Blanks; public static ChamberOfEvilItem Sixth_Chamber; public static BulletStatusEffectItem Battery_Bullets; public static LiveAmmoItem Live_Ammo; public static BasicStatPickup Heart_Holster; public static BasicStatPickup Heart_Lunchbox; public static BasicStatPickup Heart_Locket; public static BasicStatPickup Heart_Bottle; public static BasicStatPickup Heart_Purse; public static BasicStatPickup Shotga_Cola; public static BasicStatPickup Shotgun_Coffee; public static EnemyBulletSpeedItem Liquid_Valkyrie; public static OnDamagedPassiveItem Bullet_Idol; public static OnPurchasePassiveItem Mustache; public static BlinkPassiveItem Bloodied_Scarf; public static GunClassPassiveItem Muscle_Relaxant; public static ThrownGunPassiveItem Ruby_Bracelet; public static ThrownGunPassiveItem Emerald_Bracelet; public static CompanionItem Badge; public static SpawnItemOnRoomClearItem Armor_Synthesizer; public static CompanionItem Pig; public static PassiveGooperItem Sponge; public static DamageTypeModifierItem Gas_Mask; public static DamageTypeModifierItem Hazmat_Suit; public static OnPlayerItemUsedItem Ring_Of_Triggers; public static SpikedArmorItem Armor_Of_Thorns; public static CompanionItem Blank_Companions_Ring; public static RingOfResourcefulRatItem Ring_Of_The_Resourceful_Rat; public static TableFlipItem Table_Tech_Stun; public static IounStoneOrbitalItem Green_Guon_Stone; public static BasicStatPickup Master_Round_5; public static BasicStatPickup Master_Round_3; public static BasicStatPickup Master_Round_1; public static BasicStatPickup Master_Round_4; public static BasicStatPickup Master_Round_2; public static BasicStatPickup Hidden_Compartment; public static ChestBrokenImprovementItem Book_Of_Chest_Anatomy; public static ChestBrokenItem Ring_Of_Chest_Vampirism; public static ExtraLifeItem Gun_Soul; public static SnitchBrickItem Brick_Of_Cash; public static PlayerOrbitalItem Wingman; public static CompanionItem Wolf; public static BriefcaseFullOfCashItem Briefcase_Of_Cash; public static BasicStatPickup Galactic_Medal_Of_Valor; public static OurPowersCombinedItem Unity; public static FireOnReloadItem Hip_Holster; public static ProjectileRandomizerItem Chance_Bullets; public static StoutBulletsItem Stout_Bullets; public static RandomProjectileReplacementItem Bloody_9mm; public static PegasusBootsItem Springheel_Boots; public static BulletStatusEffectItem Charming_Rounds; public static ReturnAmmoOnMissedShotItem Zombie_Bullets; public static BattleStandardItem Battle_Standard; public static GuidedBulletsPassiveItem Remote_Bullets; public static ComplexProjectileModifier Flak_Bullets; public static ScalingStatBoostItem Gilded_Bullets; public static BulletStatusEffectItem Magic_Bullets; public static SilverBulletsPassiveItem Silver_Bullets; public static AutoblankVestItem Full_Metal_Jacket; public static FireVolleyOnRollItem Roll_Bomb; public static GunVolleyModificationItem Helix_Bullets; public static ChaosBulletsItem Chaos_Bullets; public static YellowChamberItem Yellow_Chamber; public static ScalingStatBoostItem Cursed_Bullets; public static CompanionItem Chicken_Flute; public static SprenOrbitalItem Sprun; public static ComplexProjectileModifier Blank_Bullets; public static CompanionItem Junkan; public static BankBagItem Loot_Bag; public static BankMaskItem Clown_Mask; public static PlatinumBulletsItem Platinum_Bullets; public static GunVolleyModificationItem Bumbullets; public static BlankPersonalityItem Holey_Grail; public static CompanionItem Turkey; public static TableFlipItem Table_Tech_Shotgun; public static CrisisStoneItem Crisis_Stone; public static SnowballBulletsItem Snowballets; public static ComplexProjectileModifier Devolver_Rounds; public static ComplexProjectileModifier Vorpal_Bullets; public static BasicStatPickup Gold_Junk; public static MulticompanionItem Turtle_Problem; public static ComplexProjectileModifier Hungry_Bullets; public static GunVolleyModificationItem Orbital_Bullets; public static CompanionItem Baby_Good_Mimic; public static MachoBraceItem Macho_Brace_Item; public static TableFlipItem Table_Tech_Heat; public static RatBootsItem Rat_Boots; public static PlayerOrbitalItem Serpent_Item; public static SynergyCompletionItem Lichs_Eye_Bullets; public static WingsItem Cat_Bullet_King_Throne; public static CompanionItem Baby_Good_Shelleton; public static RatchetScouterItem Scouter; public static ComplexProjectileModifier Katana_Bullets; static Items() { PickupObject byId = PickupObjectDatabase.GetById(76); Eye_Jewel = (SimplePuzzleItem)(object)((byId is SimplePuzzleItem) ? byId : null); PickupObject byId2 = PickupObjectDatabase.GetById(102); Scope = (BasicStatPickup)(object)((byId2 is BasicStatPickup) ? byId2 : null); PickupObject byId3 = PickupObjectDatabase.GetById(110); Magic_Sweet = (BasicStatPickup)(object)((byId3 is BasicStatPickup) ? byId3 : null); PickupObject byId4 = PickupObjectDatabase.GetById(111); Heavy_Bullets = (BasicStatPickup)(object)((byId4 is BasicStatPickup) ? byId4 : null); PickupObject byId5 = PickupObjectDatabase.GetById(112); Cartographers_Ring = (CartographersRingItem)(object)((byId5 is CartographersRingItem) ? byId5 : null); PickupObject byId6 = PickupObjectDatabase.GetById(113); Rocket_Powered_Bullets = (BasicStatPickup)(object)((byId6 is BasicStatPickup) ? byId6 : null); PickupObject byId7 = PickupObjectDatabase.GetById(114); Bionic_Leg = (BasicStatPickup)(object)((byId7 is BasicStatPickup) ? byId7 : null); PickupObject byId8 = PickupObjectDatabase.GetById(115); Ballot = (BasicStatPickup)(object)((byId8 is BasicStatPickup) ? byId8 : null); PickupObject byId9 = PickupObjectDatabase.GetById(116); Ammo_Synthesizer = (OnKillEnemyItem)(object)((byId9 is OnKillEnemyItem) ? byId9 : null); PickupObject byId10 = PickupObjectDatabase.GetById(118); Eyepatch = (BasicStatPickup)(object)((byId10 is BasicStatPickup) ? byId10 : null); PickupObject byId11 = PickupObjectDatabase.GetById(119); Metronome = (MetronomeItem)(object)((byId11 is MetronomeItem) ? byId11 : null); PickupObject byId12 = PickupObjectDatabase.GetById(127); Junk = (BasicStatPickup)(object)((byId12 is BasicStatPickup) ? byId12 : null); PickupObject byId13 = PickupObjectDatabase.GetById(131); Utility_Belt = (BasicStatPickup)(object)((byId13 is BasicStatPickup) ? byId13 : null); PickupObject byId14 = PickupObjectDatabase.GetById(132); Ring_Of_Miserly_Protection = (MiserlyProtectionItem)(object)((byId14 is MiserlyProtectionItem) ? byId14 : null); PickupObject byId15 = PickupObjectDatabase.GetById(133); Backpack = (BasicStatPickup)(object)((byId15 is BasicStatPickup) ? byId15 : null); PickupObject byId16 = PickupObjectDatabase.GetById(134); Ammo_Belt = (BasicStatPickup)(object)((byId16 is BasicStatPickup) ? byId16 : null); PickupObject byId17 = PickupObjectDatabase.GetById(135); Cog_Of_Battle = (CogOfBattleItem)(object)((byId17 is CogOfBattleItem) ? byId17 : null); PickupObject byId18 = PickupObjectDatabase.GetById(138); Honey_Comb = (SpawnProjectileOnDamagedItem)(object)((byId18 is SpawnProjectileOnDamagedItem) ? byId18 : null); PickupObject byId19 = PickupObjectDatabase.GetById(140); Master_Of_Unlocking = (SpawnItemOnRoomClearItem)(object)((byId19 is SpawnItemOnRoomClearItem) ? byId19 : null); PickupObject byId20 = PickupObjectDatabase.GetById(148); Lies = (BasicStatPickup)(object)((byId20 is BasicStatPickup) ? byId20 : null); PickupObject byId21 = PickupObjectDatabase.GetById(158); Amulet_Of_The_Pit_Lord = (RingOfPitFriendship)(object)((byId21 is RingOfPitFriendship) ? byId21 : null); PickupObject byId22 = PickupObjectDatabase.GetById(159); Gundromeda_Strain = (GundromedaStrain)(object)((byId22 is GundromedaStrain) ? byId22 : null); PickupObject byId23 = PickupObjectDatabase.GetById(160); Gunknight_Helmet = (BulletArmorItem)(object)((byId23 is BulletArmorItem) ? byId23 : null); PickupObject byId24 = PickupObjectDatabase.GetById(161); Gunknight_Greaves = (BulletArmorItem)(object)((byId24 is BulletArmorItem) ? byId24 : null); PickupObject byId25 = PickupObjectDatabase.GetById(162); Gunknight_Gauntlet = (BulletArmorItem)(object)((byId25 is BulletArmorItem) ? byId25 : null); PickupObject byId26 = PickupObjectDatabase.GetById(163); Gunknight_Armor = (BulletArmorItem)(object)((byId26 is BulletArmorItem) ? byId26 : null); PickupObject byId27 = PickupObjectDatabase.GetById(164); Heart_Synthesizer = (SpawnItemOnRoomClearItem)(object)((byId27 is SpawnItemOnRoomClearItem) ? byId27 : null); PickupObject byId28 = PickupObjectDatabase.GetById(165); Oiled_Cylinder = (BasicStatPickup)(object)((byId28 is BasicStatPickup) ? byId28 : null); PickupObject byId29 = PickupObjectDatabase.GetById(166); Shelleton_Key = (SkeletonKeyItem)(object)((byId29 is SkeletonKeyItem) ? byId29 : null); PickupObject byId30 = PickupObjectDatabase.GetById(167); Bloody_Eye = (EnemyBulletSpeedItem)(object)((byId30 is EnemyBulletSpeedItem) ? byId30 : null); PickupObject byId31 = PickupObjectDatabase.GetById(170); Ice_Cube = (ActiveItemCooldownItem)(object)((byId31 is ActiveItemCooldownItem) ? byId31 : null); PickupObject byId32 = PickupObjectDatabase.GetById(172); Ghost_Bullets = (BasicStatPickup)(object)((byId32 is BasicStatPickup) ? byId32 : null); PickupObject byId33 = PickupObjectDatabase.GetById(187); Disarming_Personality = (BasicStatPickup)(object)((byId33 is BasicStatPickup) ? byId33 : null); PickupObject byId34 = PickupObjectDatabase.GetById(190); Rolling_Eye = (PassiveReflectItem)(object)((byId34 is PassiveReflectItem) ? byId34 : null); PickupObject byId35 = PickupObjectDatabase.GetById(191); Ring_Of_Fire_Resistance = (DamageTypeModifierItem)(object)((byId35 is DamageTypeModifierItem) ? byId35 : null); PickupObject byId36 = PickupObjectDatabase.GetById(193); Bug_Boots = (PassiveGooperItem)(object)((byId36 is PassiveGooperItem) ? byId36 : null); PickupObject byId37 = PickupObjectDatabase.GetById(204); Irradiated_Lead = (BulletStatusEffectItem)(object)((byId37 is BulletStatusEffectItem) ? byId37 : null); PickupObject byId38 = PickupObjectDatabase.GetById(212); Ballistic_Boots = (BasicStatPickup)(object)((byId38 is BasicStatPickup) ? byId38 : null); PickupObject byId39 = PickupObjectDatabase.GetById(213); Lichy_Trigger_Finger = (BasicStatPickup)(object)((byId39 is BasicStatPickup) ? byId39 : null); PickupObject byId40 = PickupObjectDatabase.GetById(214); Coin_Crown = (SpawnItemOnRoomClearItem)(object)((byId40 is SpawnItemOnRoomClearItem) ? byId40 : null); PickupObject byId41 = PickupObjectDatabase.GetById(219); Old_Knights_Shield = (BasicStatPickup)(object)((byId41 is BasicStatPickup) ? byId41 : null); PickupObject byId42 = PickupObjectDatabase.GetById(222); Old_Knights_Helm = (BasicStatPickup)(object)((byId42 is BasicStatPickup) ? byId42 : null); PickupObject byId43 = PickupObjectDatabase.GetById(232); Space_Friend = (PlayerOrbitalItem)(object)((byId43 is PlayerOrbitalItem) ? byId43 : null); PickupObject byId44 = PickupObjectDatabase.GetById(240); Crutch = (HomingBulletsPassiveItem)(object)((byId44 is HomingBulletsPassiveItem) ? byId44 : null); PickupObject byId45 = PickupObjectDatabase.GetById(241); Scattershot = (GunVolleyModificationItem)(object)((byId45 is GunVolleyModificationItem) ? byId45 : null); PickupObject byId46 = PickupObjectDatabase.GetById(243); Infuriating_Note_1 = (NotePassiveItem)(object)((byId46 is NotePassiveItem) ? byId46 : null); PickupObject byId47 = PickupObjectDatabase.GetById(244); Infuriating_Note_2 = (NotePassiveItem)(object)((byId47 is NotePassiveItem) ? byId47 : null); PickupObject byId48 = PickupObjectDatabase.GetById(245); Infuriating_Note_3 = (NotePassiveItem)(object)((byId48 is NotePassiveItem) ? byId48 : null); PickupObject byId49 = PickupObjectDatabase.GetById(246); Infuriating_Note_4 = (NotePassiveItem)(object)((byId49 is NotePassiveItem) ? byId49 : null); PickupObject byId50 = PickupObjectDatabase.GetById(247); Infuriating_Note_5 = (NotePassiveItem)(object)((byId50 is NotePassiveItem) ? byId50 : null); PickupObject byId51 = PickupObjectDatabase.GetById(248); Infuriating_Note_6 = (NotePassiveItem)(object)((byId51 is NotePassiveItem) ? byId51 : null); PickupObject byId52 = PickupObjectDatabase.GetById(249); Owl = (PlayerOrbitalItem)(object)((byId52 is PlayerOrbitalItem) ? byId52 : null); PickupObject byId53 = PickupObjectDatabase.GetById(253); Gungeon_Pepper = (AuraItem)(object)((byId53 is AuraItem) ? byId53 : null); PickupObject byId54 = PickupObjectDatabase.GetById(254); Ring_Of_Chest_Friendship = (AmazingChestAheadItem)(object)((byId54 is AmazingChestAheadItem) ? byId54 : null); PickupObject byId55 = PickupObjectDatabase.GetById(255); Ancient_Heros_Bandana = (BasicStatPickup)(object)((byId55 is BasicStatPickup) ? byId55 : null); PickupObject byId56 = PickupObjectDatabase.GetById(256); Heavy_Boots = (HeavyBootsItem)(object)((byId56 is HeavyBootsItem) ? byId56 : null); PickupObject byId57 = PickupObjectDatabase.GetById(258); Broccoli = (EyeOfTheTigerItem)(object)((byId57 is EyeOfTheTigerItem) ? byId57 : null); PickupObject byId58 = PickupObjectDatabase.GetById(259); Antibody = (HealingReceivedModificationItem)(object)((byId58 is HealingReceivedModificationItem) ? byId58 : null); PickupObject byId59 = PickupObjectDatabase.GetById(260); Pink_Guon_Stone = (IounStoneOrbitalItem)(object)((byId59 is IounStoneOrbitalItem) ? byId59 : null); PickupObject byId60 = PickupObjectDatabase.GetById(262); White_Guon_Stone = (PlayerOrbitalItem)(object)((byId60 is PlayerOrbitalItem) ? byId60 : null); PickupObject byId61 = PickupObjectDatabase.GetById(263); Orange_Guon_Stone = (PlayerOrbitalItem)(object)((byId61 is PlayerOrbitalItem) ? byId61 : null); PickupObject byId62 = PickupObjectDatabase.GetById(264); Clear_Guon_Stone = (IounStoneOrbitalItem)(object)((byId62 is IounStoneOrbitalItem) ? byId62 : null); PickupObject byId63 = PickupObjectDatabase.GetById(269); Red_Guon_Stone = (IounStoneOrbitalItem)(object)((byId63 is IounStoneOrbitalItem) ? byId63 : null); PickupObject byId64 = PickupObjectDatabase.GetById(270); Blue_Guon_Stone = (IounStoneOrbitalItem)(object)((byId64 is IounStoneOrbitalItem) ? byId64 : null); PickupObject byId65 = PickupObjectDatabase.GetById(271); Riddle_Of_Lead = (EyeOfTheTigerItem)(object)((byId65 is EyeOfTheTigerItem) ? byId65 : null); PickupObject byId66 = PickupObjectDatabase.GetById(273); Laser_Sight = (LaserSightItem)(object)((byId66 is LaserSightItem) ? byId66 : null); PickupObject byId67 = PickupObjectDatabase.GetById(277); Fat_Bullets = (BasicStatPickup)(object)((byId67 is BasicStatPickup) ? byId67 : null); PickupObject byId68 = PickupObjectDatabase.GetById(278); Frost_Bullets = (BasicStatPickup)(object)((byId68 is BasicStatPickup) ? byId68 : null); PickupObject byId69 = PickupObjectDatabase.GetById(279); Super_Hot_Watch = (SuperhotItem)(object)((byId69 is SuperhotItem) ? byId69 : null); PickupObject byId70 = PickupObjectDatabase.GetById(280); Drum_Clip = (BasicStatPickup)(object)((byId70 is BasicStatPickup) ? byId70 : null); PickupObject byId71 = PickupObjectDatabase.GetById(281); Gungeon_Blueprint = (CartographersRingItem)(object)((byId71 is CartographersRingItem) ? byId71 : null); PickupObject byId72 = PickupObjectDatabase.GetById(284); Homing_Bullets = (HomingBulletsPassiveItem)(object)((byId72 is HomingBulletsPassiveItem) ? byId72 : null); PickupObject byId73 = PickupObjectDatabase.GetById(285); Blood_Brooch = (RegenerationPassiveItem)(object)((byId73 is RegenerationPassiveItem) ? byId73 : null); PickupObject byId74 = PickupObjectDatabase.GetById(286); Plus1_Bullets = (BasicStatPickup)(object)((byId74 is BasicStatPickup) ? byId74 : null); PickupObject byId75 = PickupObjectDatabase.GetById(287); Backup_Gun = (GunVolleyModificationItem)(object)((byId75 is GunVolleyModificationItem) ? byId75 : null); PickupObject byId76 = PickupObjectDatabase.GetById(288); Bouncy_Bullets = (BasicStatPickup)(object)((byId76 is BasicStatPickup) ? byId76 : null); PickupObject byId77 = PickupObjectDatabase.GetById(289); Seven_Leaf_Clover = (SevenLeafCloverItem)(object)((byId77 is SevenLeafCloverItem) ? byId77 : null); PickupObject byId78 = PickupObjectDatabase.GetById(290); Sunglasses = (SunglassesItem)(object)((byId78 is SunglassesItem) ? byId78 : null); PickupObject byId79 = PickupObjectDatabase.GetById(293); Mimic_Tooth_Necklance = (MimicToothNecklaceItem)(object)((byId79 is MimicToothNecklaceItem) ? byId79 : null); PickupObject byId80 = PickupObjectDatabase.GetById(294); Ring_Of_Mimic_Friendship = (MimicRingItem)(object)((byId80 is MimicRingItem) ? byId80 : null); PickupObject byId81 = PickupObjectDatabase.GetById(295); Hot_Lead = (BulletStatusEffectItem)(object)((byId81 is BulletStatusEffectItem) ? byId81 : null); PickupObject byId82 = PickupObjectDatabase.GetById(298); Shock_Rounds = (ComplexProjectileModifier)(object)((byId82 is ComplexProjectileModifier) ? byId82 : null); PickupObject byId83 = PickupObjectDatabase.GetById(300); Dog = (CompanionItem)(object)((byId83 is CompanionItem) ? byId83 : null); PickupObject byId84 = PickupObjectDatabase.GetById(301); Super_Space_Turtle = (CompanionItem)(object)((byId84 is CompanionItem) ? byId84 : null); PickupObject byId85 = PickupObjectDatabase.GetById(303); Bullet_That_Can_Kill_The_Past = (BulletThatCanKillThePast)(object)((byId85 is BulletThatCanKillThePast) ? byId85 : null); PickupObject byId86 = PickupObjectDatabase.GetById(304); Explosive_Rounds = (ComplexProjectileModifier)(object)((byId86 is ComplexProjectileModifier) ? byId86 : null); PickupObject byId87 = PickupObjectDatabase.GetById(305); Old_Crest = (CathedralCrestItem)(object)((byId87 is CathedralCrestItem) ? byId87 : null); PickupObject byId88 = PickupObjectDatabase.GetById(307); Wax_Wings = (WingsItem)(object)((byId88 is WingsItem) ? byId88 : null); PickupObject byId89 = PickupObjectDatabase.GetById(309); Cloranthy_Ring = (BasicStatPickup)(object)((byId89 is BasicStatPickup) ? byId89 : null); PickupObject byId90 = PickupObjectDatabase.GetById(310); Fairy_Wings = (WingsItem)(object)((byId90 is WingsItem) ? byId90 : null); PickupObject byId91 = PickupObjectDatabase.GetById(311); Clone = (ExtraLifeItem)(object)((byId91 is ExtraLifeItem) ? byId91 : null); PickupObject byId92 = PickupObjectDatabase.GetById(312); Blast_Helmet = (HelmetItem)(object)((byId92 is HelmetItem) ? byId92 : null); PickupObject byId93 = PickupObjectDatabase.GetById(313); Monster_Blood = (PassiveGooperItem)(object)((byId93 is PassiveGooperItem) ? byId93 : null); PickupObject byId94 = PickupObjectDatabase.GetById(314); Nanomachines = (NanomachinesItem)(object)((byId94 is NanomachinesItem) ? byId94 : null); PickupObject byId95 = PickupObjectDatabase.GetById(315); Gunboots = (DownwellBootsItem)(object)((byId95 is DownwellBootsItem) ? byId95 : null); PickupObject byId96 = PickupObjectDatabase.GetById(318); R2G2 = (CompanionItem)(object)((byId96 is CompanionItem) ? byId96 : null); PickupObject byId97 = PickupObjectDatabase.GetById(321); Gold_Ammolet = (BlankModificationItem)(object)((byId97 is BlankModificationItem) ? byId97 : null); PickupObject byId98 = PickupObjectDatabase.GetById(322); Lodestone_Ammolet = (BlankModificationItem)(object)((byId98 is BlankModificationItem) ? byId98 : null); PickupObject byId99 = PickupObjectDatabase.GetById(323); Angry_Bullets = (ModifyProjectileOnEnemyImpact)(object)((byId99 is ModifyProjectileOnEnemyImpact) ? byId99 : null); PickupObject byId100 = PickupObjectDatabase.GetById(325); Chaos_Ammolet = (BlankModificationItem)(object)((byId100 is BlankModificationItem) ? byId100 : null); PickupObject byId101 = PickupObjectDatabase.GetById(326); Number_2 = (CoopPassiveItem)(object)((byId101 is CoopPassiveItem) ? byId101 : null); PickupObject byId102 = PickupObjectDatabase.GetById(342); Uranium_Ammolet = (BlankModificationItem)(object)((byId102 is BlankModificationItem) ? byId102 : null); PickupObject byId103 = PickupObjectDatabase.GetById(343); Copper_Ammolet = (BlankModificationItem)(object)((byId103 is BlankModificationItem) ? byId103 : null); PickupObject byId104 = PickupObjectDatabase.GetById(344); Frost_Ammolet = (BlankModificationItem)(object)((byId104 is BlankModificationItem) ? byId104 : null); PickupObject byId105 = PickupObjectDatabase.GetById(348); Prime_Primer = (AncientPrimerItem)(object)((byId105 is AncientPrimerItem) ? byId105 : null); PickupObject byId106 = PickupObjectDatabase.GetById(349); Planar_Lead = (AstralSlugItem)(object)((byId106 is AstralSlugItem) ? byId106 : null); PickupObject byId107 = PickupObjectDatabase.GetById(350); Obsidian_Shell_Casing = (ObsidianShellItem)(object)((byId107 is ObsidianShellItem) ? byId107 : null); PickupObject byId108 = PickupObjectDatabase.GetById(352); Shadow_Bullets = (ComplexProjectileModifier)(object)((byId108 is ComplexProjectileModifier) ? byId108 : null); PickupObject byId109 = PickupObjectDatabase.GetById(353); Enraging_Photo = (RagePassiveItem)(object)((byId109 is RagePassiveItem) ? byId109 : null); PickupObject byId110 = PickupObjectDatabase.GetById(354); Military_Training = (BasicStatPickup)(object)((byId110 is BasicStatPickup) ? byId110 : null); PickupObject byId111 = PickupObjectDatabase.GetById(364); Heart_Of_Ice = (SpawnProjectileOnDamagedItem)(object)((byId111 is SpawnProjectileOnDamagedItem) ? byId111 : null); PickupObject byId112 = PickupObjectDatabase.GetById(367); Hunters_Journal = (BasicStatPickup)(object)((byId112 is BasicStatPickup) ? byId112 : null); PickupObject byId113 = PickupObjectDatabase.GetById(373); Alpha_Bullets = (ClipBulletModifierItem)(object)((byId113 is ClipBulletModifierItem) ? byId113 : null); PickupObject byId114 = PickupObjectDatabase.GetById(374); Omega_Bullets = (ClipBulletModifierItem)(object)((byId114 is ClipBulletModifierItem) ? byId114 : null); PickupObject byId115 = PickupObjectDatabase.GetById(375); Easy_Reload_Bullets = (MoveAmmoToClipItem)(object)((byId115 is MoveAmmoToClipItem) ? byId115 : null); PickupObject byId116 = PickupObjectDatabase.GetById(396); Table_Tech_Sight = (TableFlipItem)(object)((byId116 is TableFlipItem) ? byId116 : null); PickupObject byId117 = PickupObjectDatabase.GetById(397); Table_Tech_Money = (TableFlipItem)(object)((byId117 is TableFlipItem) ? byId117 : null); PickupObject byId118 = PickupObjectDatabase.GetById(398); Table_Tech_Rocket = (TableFlipItem)(object)((byId118 is TableFlipItem) ? byId118 : null); PickupObject byId119 = PickupObjectDatabase.GetById(399); Table_Tech_Rage = (TableFlipItem)(object)((byId119 is TableFlipItem) ? byId119 : null); PickupObject byId120 = PickupObjectDatabase.GetById(400); Table_Tech_Blanks = (TableFlipItem)(object)((byId120 is TableFlipItem) ? byId120 : null); PickupObject byId121 = PickupObjectDatabase.GetById(407); Sixth_Chamber = (ChamberOfEvilItem)(object)((byId121 is ChamberOfEvilItem) ? byId121 : null); PickupObject byId122 = PickupObjectDatabase.GetById(410); Battery_Bullets = (BulletStatusEffectItem)(object)((byId122 is BulletStatusEffectItem) ? byId122 : null); PickupObject byId123 = PickupObjectDatabase.GetById(414); Live_Ammo = (LiveAmmoItem)(object)((byId123 is LiveAmmoItem) ? byId123 : null); PickupObject byId124 = PickupObjectDatabase.GetById(421); Heart_Holster = (BasicStatPickup)(object)((byId124 is BasicStatPickup) ? byId124 : null); PickupObject byId125 = PickupObjectDatabase.GetById(422); Heart_Lunchbox = (BasicStatPickup)(object)((byId125 is BasicStatPickup) ? byId125 : null); PickupObject byId126 = PickupObjectDatabase.GetById(423); Heart_Locket = (BasicStatPickup)(object)((byId126 is BasicStatPickup) ? byId126 : null); PickupObject byId127 = PickupObjectDatabase.GetById(424); Heart_Bottle = (BasicStatPickup)(object)((byId127 is BasicStatPickup) ? byId127 : null); PickupObject byId128 = PickupObjectDatabase.GetById(425); Heart_Purse = (BasicStatPickup)(object)((byId128 is BasicStatPickup) ? byId128 : null); PickupObject byId129 = PickupObjectDatabase.GetById(426); Shotga_Cola = (BasicStatPickup)(object)((byId129 is BasicStatPickup) ? byId129 : null); PickupObject byId130 = PickupObjectDatabase.GetById(427); Shotgun_Coffee = (BasicStatPickup)(object)((byId130 is BasicStatPickup) ? byId130 : null); PickupObject byId131 = PickupObjectDatabase.GetById(431); Liquid_Valkyrie = (EnemyBulletSpeedItem)(object)((byId131 is EnemyBulletSpeedItem) ? byId131 : null); PickupObject byId132 = PickupObjectDatabase.GetById(434); Bullet_Idol = (OnDamagedPassiveItem)(object)((byId132 is OnDamagedPassiveItem) ? byId132 : null); PickupObject byId133 = PickupObjectDatabase.GetById(435); Mustache = (OnPurchasePassiveItem)(object)((byId133 is OnPurchasePassiveItem) ? byId133 : null); PickupObject byId134 = PickupObjectDatabase.GetById(436); Bloodied_Scarf = (BlinkPassiveItem)(object)((byId134 is BlinkPassiveItem) ? byId134 : null); PickupObject byId135 = PickupObjectDatabase.GetById(437); Muscle_Relaxant = (GunClassPassiveItem)(object)((byId135 is GunClassPassiveItem) ? byId135 : null); PickupObject byId136 = PickupObjectDatabase.GetById(440); Ruby_Bracelet = (ThrownGunPassiveItem)(object)((byId136 is ThrownGunPassiveItem) ? byId136 : null); PickupObject byId137 = PickupObjectDatabase.GetById(441); Emerald_Bracelet = (ThrownGunPassiveItem)(object)((byId137 is ThrownGunPassiveItem) ? byId137 : null); PickupObject byId138 = PickupObjectDatabase.GetById(442); Badge = (CompanionItem)(object)((byId138 is CompanionItem) ? byId138 : null); PickupObject byId139 = PickupObjectDatabase.GetById(450); Armor_Synthesizer = (SpawnItemOnRoomClearItem)(object)((byId139 is SpawnItemOnRoomClearItem) ? byId139 : null); PickupObject byId140 = PickupObjectDatabase.GetById(451); Pig = (CompanionItem)(object)((byId140 is CompanionItem) ? byId140 : null); PickupObject byId141 = PickupObjectDatabase.GetById(452); Sponge = (PassiveGooperItem)(object)((byId141 is PassiveGooperItem) ? byId141 : null); PickupObject byId142 = PickupObjectDatabase.GetById(453); Gas_Mask = (DamageTypeModifierItem)(object)((byId142 is DamageTypeModifierItem) ? byId142 : null); PickupObject byId143 = PickupObjectDatabase.GetById(454); Hazmat_Suit = (DamageTypeModifierItem)(object)((byId143 is DamageTypeModifierItem) ? byId143 : null); PickupObject byId144 = PickupObjectDatabase.GetById(456); Ring_Of_Triggers = (OnPlayerItemUsedItem)(object)((byId144 is OnPlayerItemUsedItem) ? byId144 : null); PickupObject byId145 = PickupObjectDatabase.GetById(457); Armor_Of_Thorns = (SpikedArmorItem)(object)((byId145 is SpikedArmorItem) ? byId145 : null); PickupObject byId146 = PickupObjectDatabase.GetById(461); Blank_Companions_Ring = (CompanionItem)(object)((byId146 is CompanionItem) ? byId146 : null); PickupObject byId147 = PickupObjectDatabase.GetById(463); Ring_Of_The_Resourceful_Rat = (RingOfResourcefulRatItem)(object)((byId147 is RingOfResourcefulRatItem) ? byId147 : null); PickupObject byId148 = PickupObjectDatabase.GetById(465); Table_Tech_Stun = (TableFlipItem)(object)((byId148 is TableFlipItem) ? byId148 : null); PickupObject byId149 = PickupObjectDatabase.GetById(466); Green_Guon_Stone = (IounStoneOrbitalItem)(object)((byId149 is IounStoneOrbitalItem) ? byId149 : null); PickupObject byId150 = PickupObjectDatabase.GetById(467); Master_Round_5 = (BasicStatPickup)(object)((byId150 is BasicStatPickup) ? byId150 : null); PickupObject byId151 = PickupObjectDatabase.GetById(468); Master_Round_3 = (BasicStatPickup)(object)((byId151 is BasicStatPickup) ? byId151 : null); PickupObject byId152 = PickupObjectDatabase.GetById(469); Master_Round_1 = (BasicStatPickup)(object)((byId152 is BasicStatPickup) ? byId152 : null); PickupObject byId153 = PickupObjectDatabase.GetById(470); Master_Round_4 = (BasicStatPickup)(object)((byId153 is BasicStatPickup) ? byId153 : null); PickupObject byId154 = PickupObjectDatabase.GetById(471); Master_Round_2 = (BasicStatPickup)(object)((byId154 is BasicStatPickup) ? byId154 : null); PickupObject byId155 = PickupObjectDatabase.GetById(473); Hidden_Compartment = (BasicStatPickup)(object)((byId155 is BasicStatPickup) ? byId155 : null); PickupObject byId156 = PickupObjectDatabase.GetById(487); Book_Of_Chest_Anatomy = (ChestBrokenImprovementItem)(object)((byId156 is ChestBrokenImprovementItem) ? byId156 : null); PickupObject byId157 = PickupObjectDatabase.GetById(488); Ring_Of_Chest_Vampirism = (ChestBrokenItem)(object)((byId157 is ChestBrokenItem) ? byId157 : null); PickupObject byId158 = PickupObjectDatabase.GetById(489); Gun_Soul = (ExtraLifeItem)(object)((byId158 is ExtraLifeItem) ? byId158 : null); PickupObject byId159 = PickupObjectDatabase.GetById(490); Brick_Of_Cash = (SnitchBrickItem)(object)((byId159 is SnitchBrickItem) ? byId159 : null); PickupObject byId160 = PickupObjectDatabase.GetById(491); Wingman = (PlayerOrbitalItem)(object)((byId160 is PlayerOrbitalItem) ? byId160 : null); PickupObject byId161 = PickupObjectDatabase.GetById(492); Wolf = (CompanionItem)(object)((byId161 is CompanionItem) ? byId161 : null); PickupObject byId162 = PickupObjectDatabase.GetById(493); Briefcase_Of_Cash = (BriefcaseFullOfCashItem)(object)((byId162 is BriefcaseFullOfCashItem) ? byId162 : null); PickupObject byId163 = PickupObjectDatabase.GetById(494); Galactic_Medal_Of_Valor = (BasicStatPickup)(object)((byId163 is BasicStatPickup) ? byId163 : null); PickupObject byId164 = PickupObjectDatabase.GetById(495); Unity = (OurPowersCombinedItem)(object)((byId164 is OurPowersCombinedItem) ? byId164 : null); PickupObject byId165 = PickupObjectDatabase.GetById(500); Hip_Holster = (FireOnReloadItem)(object)((byId165 is FireOnReloadItem) ? byId165 : null); PickupObject byId166 = PickupObjectDatabase.GetById(521); Chance_Bullets = (ProjectileRandomizerItem)(object)((byId166 is ProjectileRandomizerItem) ? byId166 : null); PickupObject byId167 = PickupObjectDatabase.GetById(523); Stout_Bullets = (StoutBulletsItem)(object)((byId167 is StoutBulletsItem) ? byId167 : null); PickupObject byId168 = PickupObjectDatabase.GetById(524); Bloody_9mm = (RandomProjectileReplacementItem)(object)((byId168 is RandomProjectileReplacementItem) ? byId168 : null); PickupObject byId169 = PickupObjectDatabase.GetById(526); Springheel_Boots = (PegasusBootsItem)(object)((byId169 is PegasusBootsItem) ? byId169 : null); PickupObject byId170 = PickupObjectDatabase.GetById(527); Charming_Rounds = (BulletStatusEffectItem)(object)((byId170 is BulletStatusEffectItem) ? byId170 : null); PickupObject byId171 = PickupObjectDatabase.GetById(528); Zombie_Bullets = (ReturnAmmoOnMissedShotItem)(object)((byId171 is ReturnAmmoOnMissedShotItem) ? byId171 : null); PickupObject byId172 = PickupObjectDatabase.GetById(529); Battle_Standard = (BattleStandardItem)(object)((byId172 is BattleStandardItem) ? byId172 : null); PickupObject byId173 = PickupObjectDatabase.GetById(530); Remote_Bullets = (GuidedBulletsPassiveItem)(object)((byId173 is GuidedBulletsPassiveItem) ? byId173 : null); PickupObject byId174 = PickupObjectDatabase.GetById(531); Flak_Bullets = (ComplexProjectileModifier)(object)((byId174 is ComplexProjectileModifier) ? byId174 : null); PickupObject byId175 = PickupObjectDatabase.GetById(532); Gilded_Bullets = (ScalingStatBoostItem)(object)((byId175 is ScalingStatBoostItem) ? byId175 : null); PickupObject byId176 = PickupObjectDatabase.GetById(533); Magic_Bullets = (BulletStatusEffectItem)(object)((byId176 is BulletStatusEffectItem) ? byId176 : null); PickupObject byId177 = PickupObjectDatabase.GetById(538); Silver_Bullets = (SilverBulletsPassiveItem)(object)((byId177 is SilverBulletsPassiveItem) ? byId177 : null); PickupObject byId178 = PickupObjectDatabase.GetById(564); Full_Metal_Jacket = (AutoblankVestItem)(object)((byId178 is AutoblankVestItem) ? byId178 : null); PickupObject byId179 = PickupObjectDatabase.GetById(567); Roll_Bomb = (FireVolleyOnRollItem)(object)((byId179 is FireVolleyOnRollItem) ? byId179 : null); PickupObject byId180 = PickupObjectDatabase.GetById(568); Helix_Bullets = (GunVolleyModificationItem)(object)((byId180 is GunVolleyModificationItem) ? byId180 : null); PickupObject byId181 = PickupObjectDatabase.GetById(569); Chaos_Bullets = (ChaosBulletsItem)(object)((byId181 is ChaosBulletsItem) ? byId181 : null); PickupObject byId182 = PickupObjectDatabase.GetById(570); Yellow_Chamber = (YellowChamberItem)(object)((byId182 is YellowChamberItem) ? byId182 : null); PickupObject byId183 = PickupObjectDatabase.GetById(571); Cursed_Bullets = (ScalingStatBoostItem)(object)((byId183 is ScalingStatBoostItem) ? byId183 : null); PickupObject byId184 = PickupObjectDatabase.GetById(572); Chicken_Flute = (CompanionItem)(object)((byId184 is CompanionItem) ? byId184 : null); PickupObject byId185 = PickupObjectDatabase.GetById(578); Sprun = (SprenOrbitalItem)(object)((byId185 is SprenOrbitalItem) ? byId185 : null); PickupObject byId186 = PickupObjectDatabase.GetById(579); Blank_Bullets = (ComplexProjectileModifier)(object)((byId186 is ComplexProjectileModifier) ? byId186 : null); PickupObject byId187 = PickupObjectDatabase.GetById(580); Junkan = (CompanionItem)(object)((byId187 is CompanionItem) ? byId187 : null); PickupObject byId188 = PickupObjectDatabase.GetById(605); Loot_Bag = (BankBagItem)(object)((byId188 is BankBagItem) ? byId188 : null); PickupObject byId189 = PickupObjectDatabase.GetById(607); Clown_Mask = (BankMaskItem)(object)((byId189 is BankMaskItem) ? byId189 : null); PickupObject byId190 = PickupObjectDatabase.GetById(627); Platinum_Bullets = (PlatinumBulletsItem)(object)((byId190 is PlatinumBulletsItem) ? byId190 : null); PickupObject byId191 = PickupObjectDatabase.GetById(630); Bumbullets = (GunVolleyModificationItem)(object)((byId191 is GunVolleyModificationItem) ? byId191 : null); PickupObject byId192 = PickupObjectDatabase.GetById(631); Holey_Grail = (BlankPersonalityItem)(object)((byId192 is BlankPersonalityItem) ? byId192 : null); PickupObject byId193 = PickupObjectDatabase.GetById(632); Turkey = (CompanionItem)(object)((byId193 is CompanionItem) ? byId193 : null); PickupObject byId194 = PickupObjectDatabase.GetById(633); Table_Tech_Shotgun = (TableFlipItem)(object)((byId194 is TableFlipItem) ? byId194 : null); PickupObject byId195 = PickupObjectDatabase.GetById(634); Crisis_Stone = (CrisisStoneItem)(object)((byId195 is CrisisStoneItem) ? byId195 : null); PickupObject byId196 = PickupObjectDatabase.GetById(636); Snowballets = (SnowballBulletsItem)(object)((byId196 is SnowballBulletsItem) ? byId196 : null); PickupObject byId197 = PickupObjectDatabase.GetById(638); Devolver_Rounds = (ComplexProjectileModifier)(object)((byId197 is ComplexProjectileModifier) ? byId197 : null); PickupObject byId198 = PickupObjectDatabase.GetById(640); Vorpal_Bullets = (ComplexProjectileModifier)(object)((byId198 is ComplexProjectileModifier) ? byId198 : null); PickupObject byId199 = PickupObjectDatabase.GetById(641); Gold_Junk = (BasicStatPickup)(object)((byId199 is BasicStatPickup) ? byId199 : null); PickupObject byId200 = PickupObjectDatabase.GetById(645); Turtle_Problem = (MulticompanionItem)(object)((byId200 is MulticompanionItem) ? byId200 : null); PickupObject byId201 = PickupObjectDatabase.GetById(655); Hungry_Bullets = (ComplexProjectileModifier)(object)((byId201 is ComplexProjectileModifier) ? byId201 : null); PickupObject byId202 = PickupObjectDatabase.GetById(661); Orbital_Bullets = (GunVolleyModificationItem)(object)((byId202 is GunVolleyModificationItem) ? byId202 : null); PickupObject byId203 = PickupObjectDatabase.GetById(664); Baby_Good_Mimic = (CompanionItem)(object)((byId203 is CompanionItem) ? byId203 : null); PickupObject byId204 = PickupObjectDatabase.GetById(665); Macho_Brace_Item = (MachoBraceItem)(object)((byId204 is MachoBraceItem) ? byId204 : null); PickupObject byId205 = PickupObjectDatabase.GetById(666); Table_Tech_Heat = (TableFlipItem)(object)((byId205 is TableFlipItem) ? byId205 : null); PickupObject byId206 = PickupObjectDatabase.GetById(667); Rat_Boots = (RatBootsItem)(object)((byId206 is RatBootsItem) ? byId206 : null); PickupObject byId207 = PickupObjectDatabase.GetById(735); Serpent_Item = (PlayerOrbitalItem)(object)((byId207 is PlayerOrbitalItem) ? byId207 : null); PickupObject byId208 = PickupObjectDatabase.GetById(815); Lichs_Eye_Bullets = (SynergyCompletionItem)(object)((byId208 is SynergyCompletionItem) ? byId208 : null); PickupObject byId209 = PickupObjectDatabase.GetById(817); Cat_Bullet_King_Throne = (WingsItem)(object)((byId209 is WingsItem) ? byId209 : null); PickupObject byId210 = PickupObjectDatabase.GetById(818); Baby_Good_Shelleton = (CompanionItem)(object)((byId210 is CompanionItem) ? byId210 : null); PickupObject byId211 = PickupObjectDatabase.GetById(821); Scouter = (RatchetScouterItem)(object)((byId211 is RatchetScouterItem) ? byId211 : null); PickupObject byId212 = PickupObjectDatabase.GetById(822); Katana_Bullets = (ComplexProjectileModifier)(object)((byId212 is ComplexProjectileModifier) ? byId212 : null); } } public static class Actives { public static HealPlayerItem Medkit; public static ReflectShieldPlayerItem Potion_Of_Lead_Skin; public static KnifeShieldItem Knife_Shield; public static SpawnObjectPlayerItem Proximity_Mine; public static TimeSlowPlayerItem Bullet_Time; public static SpawnObjectPlayerItem Decoy; public static ReflectShieldPlayerItem Bubble_Shield; public static SupplyDropItem Supply_Drop; public static SupplyDropItem Ration; public static FortuneFavorItem Fortunes_Favor; public static JetpackItem Jetpack; public static SpawnObjectPlayerItem Bomb; public static SpawnObjectPlayerItem Ice_Bomb; public static RemoteMineItem C4; public static SpawnObjectPlayerItem Singularity; public static ActiveGunVolleyModificationItem Double_Vision; public static ActiveBasicStatItem Potion_Of_Gun_Friendship; public static SpawnObjectPlayerItem Portable_Turret; public static SpawnObjectPlayerItem Cigarettes; public static SpawnObjectPlayerItem Poison_Vial; public static RadialCharmItem Charm_Horn; public static SenseOfDirectionItem Sense_Of_Direction; public static CardboardBoxItem Box; public static BombCompanionAppItem IBomb_Companion_App; public static RadialSlowItem Aged_Bell; public static DuctTapeItem Duct_Tape; public static DirectionalAttackActiveItem Napalm_Strike; public static GrapplingHookItem Grappling_Hook; public static DirectionalAttackActiveItem Air_Strike; public static EstusFlaskItem Estus_Flask_Item; public static IronCoinItem Iron_Coin; public static SpiceItem Spice; public static HealPlayerItem Meatbun; public static EscapeRopeItem Escape_Rope; public static SpawnObjectPlayerItem Cluster_Mine; public static ActiveSummonItem Ticket; public static ArcaneGunpowderItem Arcane_Gunpowder; public static LockpicksItem Trusty_Lockpicks; public static SpawnObjectPlayerItem Molotov; public static CorpseExplodeActiveItem Melted_Rock; public static RobotUnlockTelevisionItem Busted_Television; public static DirectionalAttackActiveItem Coolant_Leak; public static HealPlayerItem Friendship_Cookie; public static HeroSwordItem Heros_Sword; public static SpawnObjectPlayerItem Jar_Of_Bees; public static TemporaryInvulnerabilityPlayerItem Stuffed_Star; public static SpawnObjectPlayerItem Explosive_Decoy; public static DamageEnemiesInRadiusItem Bracket_Key; public static TargetedAttackPlayerItem Big_Boy; public static ActiveShieldItem Shield_Of_The_Maiden; public static SpawnObjectPlayerItem Boomerang; public static TeleporterPrototypeItem Teleporter_Prototype; public static GaseousFormPlayerItem Ring_Of_Ethereal_Form; public static SpawnObjectPlayerItem Chaff_Grenade; public static ConsumableStealthItem Smoke_Bomb; public static HealPlayerItem Orange; public static ReusableBlankitem Elder_Blank; public static DoNothingActiveItem Pilots_Past_Rockets; public static PuzzleBoxItem Lament_Configiurum; public static RelodestoneItem Relodestone; public static EmptyBottleItem Bottle; public static ChestTeleporterItem Chest_Teleporter; public static PaydayDrillItem Drill; public static GungeonEggItem Weird_Egg; public static KiPulseItem Daruma; public static FoldingTableItem Folding_Table_Item; public static CheeseWheelItem Partially_Eaten_Cheese; public static RatPackItem Resourceful_Sack; public static MagazineRackItem Magazine_Rack; public static SpawnObjectPlayerItem Shadow_Clone; static Actives() { PickupObject byId = PickupObjectDatabase.GetById(63); Medkit = (HealPlayerItem)(object)((byId is HealPlayerItem) ? byId : null); PickupObject byId2 = PickupObjectDatabase.GetById(64); Potion_Of_Lead_Skin = (ReflectShieldPlayerItem)(object)((byId2 is ReflectShieldPlayerItem) ? byId2 : null); PickupObject byId3 = PickupObjectDatabase.GetById(65); Knife_Shield = (KnifeShieldItem)(object)((byId3 is KnifeShieldItem) ? byId3 : null); PickupObject byId4 = PickupObjectDatabase.GetById(66); Proximity_Mine = (SpawnObjectPlayerItem)(object)((byId4 is SpawnObjectPlayerItem) ? byId4 : null); PickupObject byId5 = PickupObjectDatabase.GetById(69); Bullet_Time = (TimeSlowPlayerItem)(object)((byId5 is TimeSlowPlayerItem) ? byId5 : null); PickupObject byId6 = PickupObjectDatabase.GetById(71); Decoy = (SpawnObjectPlayerItem)(object)((byId6 is SpawnObjectPlayerItem) ? byId6 : null); PickupObject byId7 = PickupObjectDatabase.GetById(72); Bubble_Shield = (ReflectShieldPlayerItem)(object)((byId7 is ReflectShieldPlayerItem) ? byId7 : null); PickupObject byId8 = PickupObjectDatabase.GetById(77); Supply_Drop = (SupplyDropItem)(object)((byId8 is SupplyDropItem) ? byId8 : null); PickupObject byId9 = PickupObjectDatabase.GetById(104); Ration = (SupplyDropItem)(object)((byId9 is SupplyDropItem) ? byId9 : null); PickupObject byId10 = PickupObjectDatabase.GetById(105); Fortunes_Favor = (FortuneFavorItem)(object)((byId10 is FortuneFavorItem) ? byId10 : null); PickupObject byId11 = PickupObjectDatabase.GetById(106); Jetpack = (JetpackItem)(object)((byId11 is JetpackItem) ? byId11 : null); PickupObject byId12 = PickupObjectDatabase.GetById(108); Bomb = (SpawnObjectPlayerItem)(object)((byId12 is SpawnObjectPlayerItem) ? byId12 : null); PickupObject byId13 = PickupObjectDatabase.GetById(109); Ice_Bomb = (SpawnObjectPlayerItem)(object)((byId13 is SpawnObjectPlayerItem) ? byId13 : null); PickupObject byId14 = PickupObjectDatabase.GetById(136); C4 = (RemoteMineItem)(object)((byId14 is RemoteMineItem) ? byId14 : null); PickupObject byId15 = PickupObjectDatabase.GetById(155); Singularity = (SpawnObjectPlayerItem)(object)((byId15 is SpawnObjectPlayerItem) ? byId15 : null); PickupObject byId16 = PickupObjectDatabase.GetById(168); Double_Vision = (ActiveGunVolleyModificationItem)(object)((byId16 is ActiveGunVolleyModificationItem) ? byId16 : null); PickupObject byId17 = PickupObjectDatabase.GetById(174); Potion_Of_Gun_Friendship = (ActiveBasicStatItem)(object)((byId17 is ActiveBasicStatItem) ? byId17 : null); PickupObject byId18 = PickupObjectDatabase.GetById(201); Portable_Turret = (SpawnObjectPlayerItem)(object)((byId18 is SpawnObjectPlayerItem) ? byId18 : null); PickupObject byId19 = PickupObjectDatabase.GetById(203); Cigarettes = (SpawnObjectPlayerItem)(object)((byId19 is SpawnObjectPlayerItem) ? byId19 : null); PickupObject byId20 = PickupObjectDatabase.GetById(205); Poison_Vial = (SpawnObjectPlayerItem)(object)((byId20 is SpawnObjectPlayerItem) ? byId20 : null); PickupObject byId21 = PickupObjectDatabase.GetById(205); Charm_Horn = (RadialCharmItem)(object)((byId21 is RadialCharmItem) ? byId21 : null); PickupObject byId22 = PickupObjectDatabase.GetById(209); Sense_Of_Direction = (SenseOfDirectionItem)(object)((byId22 is SenseOfDirectionItem) ? byId22 : null); PickupObject byId23 = PickupObjectDatabase.GetById(216); Box = (CardboardBoxItem)(object)((byId23 is CardboardBoxItem) ? byId23 : null); PickupObject byId24 = PickupObjectDatabase.GetById(234); IBomb_Companion_App = (BombCompanionAppItem)(object)((byId24 is BombCompanionAppItem) ? byId24 : null); PickupObject byId25 = PickupObjectDatabase.GetById(237); Aged_Bell = (RadialSlowItem)(object)((byId25 is RadialSlowItem) ? byId25 : null); PickupObject byId26 = PickupObjectDatabase.GetById(239); Duct_Tape = (DuctTapeItem)(object)((byId26 is DuctTapeItem) ? byId26 : null); PickupObject byId27 = PickupObjectDatabase.GetById(242); Napalm_Strike = (DirectionalAttackActiveItem)(object)((byId27 is DirectionalAttackActiveItem) ? byId27 : null); PickupObject byId28 = PickupObjectDatabase.GetById(250); Grappling_Hook = (GrapplingHookItem)(object)((byId28 is GrapplingHookItem) ? byId28 : null); PickupObject byId29 = PickupObjectDatabase.GetById(252); Air_Strike = (DirectionalAttackActiveItem)(object)((byId29 is DirectionalAttackActiveItem) ? byId29 : null); PickupObject byId30 = PickupObjectDatabase.GetById(267); Estus_Flask_Item = (EstusFlaskItem)(object)((byId30 is EstusFlaskItem) ? byId30 : null); PickupObject byId31 = PickupObjectDatabase.GetById(272); Iron_Coin = (IronCoinItem)(object)((byId31 is IronCoinItem) ? byId31 : null); PickupObject byId32 = PickupObjectDatabase.GetById(276); Spice = (SpiceItem)(object)((byId32 is SpiceItem) ? byId32 : null); PickupObject byId33 = PickupObjectDatabase.GetById(291); Meatbun = (HealPlayerItem)(object)((byId33 is HealPlayerItem) ? byId33 : null); PickupObject byId34 = PickupObjectDatabase.GetById(306); Escape_Rope = (EscapeRopeItem)(object)((byId34 is EscapeRopeItem) ? byId34 : null); PickupObject byId35 = PickupObjectDatabase.GetById(308); Cluster_Mine = (SpawnObjectPlayerItem)(object)((byId35 is SpawnObjectPlayerItem) ? byId35 : null); PickupObject byId36 = PickupObjectDatabase.GetById(320); Ticket = (ActiveSummonItem)(object)((byId36 is ActiveSummonItem) ? byId36 : null); PickupObject byId37 = PickupObjectDatabase.GetById(351); Arcane_Gunpowder = (ArcaneGunpowderItem)(object)((byId37 is ArcaneGunpowderItem) ? byId37 : null); PickupObject byId38 = PickupObjectDatabase.GetById(356); Trusty_Lockpicks = (LockpicksItem)(object)((byId38 is LockpicksItem) ? byId38 : null); PickupObject byId39 = PickupObjectDatabase.GetById(366); Molotov = (SpawnObjectPlayerItem)(object)((byId39 is SpawnObjectPlayerItem) ? byId39 : null); PickupObject byId40 = PickupObjectDatabase.GetById(403); Melted_Rock = (CorpseExplodeActiveItem)(object)((byId40 is CorpseExplodeActiveItem) ? byId40 : null); PickupObject byId41 = PickupObjectDatabase.GetById(409); Busted_Television = (RobotUnlockTelevisionItem)(object)((byId41 is RobotUnlockTelevisionItem) ? byId41 : null); PickupObject byId42 = PickupObjectDatabase.GetById(411); Coolant_Leak = (DirectionalAttackActiveItem)(object)((byId42 is DirectionalAttackActiveItem) ? byId42 : null); PickupObject byId43 = PickupObjectDatabase.GetById(412); Friendship_Cookie = (HealPlayerItem)(object)((byId43 is HealPlayerItem) ? byId43 : null); PickupObject byId44 = PickupObjectDatabase.GetById(413); Heros_Sword = (HeroSwordItem)(object)((byId44 is HeroSwordItem) ? byId44 : null); PickupObject byId45 = PickupObjectDatabase.GetById(432); Jar_Of_Bees = (SpawnObjectPlayerItem)(object)((byId45 is SpawnObjectPlayerItem) ? byId45 : null); PickupObject byId46 = PickupObjectDatabase.GetById(433); Stuffed_Star = (TemporaryInvulnerabilityPlayerItem)(object)((byId46 is TemporaryInvulnerabilityPlayerItem) ? byId46 : null); PickupObject byId47 = PickupObjectDatabase.GetById(438); Explosive_Decoy = (SpawnObjectPlayerItem)(object)((byId47 is SpawnObjectPlayerItem) ? byId47 : null); PickupObject byId48 = PickupObjectDatabase.GetById(439); Bracket_Key = (DamageEnemiesInRadiusItem)(object)((byId48 is DamageEnemiesInRadiusItem) ? byId48 : null); PickupObject byId49 = PickupObjectDatabase.GetById(443); Big_Boy = (TargetedAttackPlayerItem)(object)((byId49 is TargetedAttackPlayerItem) ? byId49 : null); PickupObject byId50 = PickupObjectDatabase.GetById(447); Shield_Of_The_Maiden = (ActiveShieldItem)(object)((byId50 is ActiveShieldItem) ? byId50 : null); PickupObject byId51 = PickupObjectDatabase.GetById(448); Boomerang = (SpawnObjectPlayerItem)(object)((byId51 is SpawnObjectPlayerItem) ? byId51 : null); PickupObject byId52 = PickupObjectDatabase.GetById(449); Teleporter_Prototype = (TeleporterPrototypeItem)(object)((byId52 is TeleporterPrototypeItem) ? byId52 : null); PickupObject byId53 = PickupObjectDatabase.GetById(458); Ring_Of_Ethereal_Form = (GaseousFormPlayerItem)(object)((byId53 is GaseousFormPlayerItem) ? byId53 : null); PickupObject byId54 = PickupObjectDatabase.GetById(460); Chaff_Grenade = (SpawnObjectPlayerItem)(object)((byId54 is SpawnObjectPlayerItem) ? byId54 : null); PickupObject byId55 = PickupObjectDatabase.GetById(462); Smoke_Bomb = (ConsumableStealthItem)(object)((byId55 is ConsumableStealthItem) ? byId55 : null); PickupObject byId56 = PickupObjectDatabase.GetById(485); Orange = (HealPlayerItem)(object)((byId56 is HealPlayerItem) ? byId56 : null); PickupObject byId57 = PickupObjectDatabase.GetById(499); Elder_Blank = (ReusableBlankitem)(object)((byId57 is ReusableBlankitem) ? byId57 : null); PickupObject byId58 = PickupObjectDatabase.GetById(502); Pilots_Past_Rockets = (DoNothingActiveItem)(object)((byId58 is DoNothingActiveItem) ? byId58 : null); PickupObject byId59 = PickupObjectDatabase.GetById(502); Lament_Configiurum = (PuzzleBoxItem)(object)((byId59 is PuzzleBoxItem) ? byId59 : null); PickupObject byId60 = PickupObjectDatabase.GetById(536); Relodestone = (RelodestoneItem)(object)((byId60 is RelodestoneItem) ? byId60 : null); PickupObject byId61 = PickupObjectDatabase.GetById(558); Bottle = (EmptyBottleItem)(object)((byId61 is EmptyBottleItem) ? byId61 : null); PickupObject byId62 = PickupObjectDatabase.GetById(573); Chest_Teleporter = (ChestTeleporterItem)(object)((byId62 is ChestTeleporterItem) ? byId62 : null); PickupObject byId63 = PickupObjectDatabase.GetById(625); Drill = (PaydayDrillItem)(object)((byId63 is PaydayDrillItem) ? byId63 : null); PickupObject byId64 = PickupObjectDatabase.GetById(637); Weird_Egg = (GungeonEggItem)(object)((byId64 is GungeonEggItem) ? byId64 : null); PickupObject byId65 = PickupObjectDatabase.GetById(643); Daruma = (KiPulseItem)(object)((byId65 is KiPulseItem) ? byId65 : null); PickupObject byId66 = PickupObjectDatabase.GetById(644); Folding_Table_Item = (FoldingTableItem)(object)((byId66 is FoldingTableItem) ? byId66 : null); PickupObject byId67 = PickupObjectDatabase.GetById(662); Partially_Eaten_Cheese = (CheeseWheelItem)(object)((byId67 is CheeseWheelItem) ? byId67 : null); PickupObject byId68 = PickupObjectDatabase.GetById(663); Resourceful_Sack = (RatPackItem)(object)((byId68 is RatPackItem) ? byId68 : null); PickupObject byId69 = PickupObjectDatabase.GetById(814); Magazine_Rack = (MagazineRackItem)(object)((byId69 is MagazineRackItem) ? byId69 : null); PickupObject byId70 = PickupObjectDatabase.GetById(820); Shadow_Clone = (SpawnObjectPlayerItem)(object)((byId70 is SpawnObjectPlayerItem) ? byId70 : null); } } public static class Pickups { public static KeyBulletPickup Key; public static CurrencyPickup Casing_1; public static CurrencyPickup Casing_5; public static HealthPickup Half_Heart; public static CurrencyPickup Casing_50; public static AmmoPickup Ammo; public static HealthPickup Heart; public static HealthPickup Armor; public static GungeonMapItem Map; public static KeyBulletPickup Key_Placeable; public static PileOfDarkSoulsPickup Pile_Of_Souls; public static SilencerItem Blank; public static CurrencyPickup Hegemony_Credit; public static SpecialKeyItem Gnawed_Key; public static NPCCellKeyItem Cell_Key; public static IounStoneOrbitalItem Glass_Guon_Stone; public static AmmoPickup Spread_Ammo; public static KeyBulletPickup Rat_Key; static Pickups() { PickupObject byId = PickupObjectDatabase.GetById(67); Key = (KeyBulletPickup)(object)((byId is KeyBulletPickup) ? byId : null); PickupObject byId2 = PickupObjectDatabase.GetById(68); Casing_1 = (CurrencyPickup)(object)((byId2 is CurrencyPickup) ? byId2 : null); PickupObject byId3 = PickupObjectDatabase.GetById(70); Casing_5 = (CurrencyPickup)(object)((byId3 is CurrencyPickup) ? byId3 : null); PickupObject byId4 = PickupObjectDatabase.GetById(73); Half_Heart = (HealthPickup)(object)((byId4 is HealthPickup) ? byId4 : null); PickupObject byId5 = PickupObjectDatabase.GetById(74); Casing_50 = (CurrencyPickup)(object)((byId5 is CurrencyPickup) ? byId5 : null); PickupObject byId6 = PickupObjectDatabase.GetById(74); Ammo = (AmmoPickup)(object)((byId6 is AmmoPickup) ? byId6 : null); PickupObject byId7 = PickupObjectDatabase.GetById(85); Heart = (HealthPickup)(object)((byId7 is HealthPickup) ? byId7 : null); PickupObject byId8 = PickupObjectDatabase.GetById(120); Armor = (HealthPickup)(object)((byId8 is HealthPickup) ? byId8 : null); PickupObject byId9 = PickupObjectDatabase.GetById(137); Map = (GungeonMapItem)(object)((byId9 is GungeonMapItem) ? byId9 : null); PickupObject byId10 = PickupObjectDatabase.GetById(147); Key_Placeable = (KeyBulletPickup)(object)((byId10 is KeyBulletPickup) ? byId10 : null); PickupObject byId11 = PickupObjectDatabase.GetById(173); Pile_Of_Souls = (PileOfDarkSoulsPickup)(object)((byId11 is PileOfDarkSoulsPickup) ? byId11 : null); PickupObject byId12 = PickupObjectDatabase.GetById(224); Blank = (SilencerItem)(object)((byId12 is SilencerItem) ? byId12 : null); PickupObject byId13 = PickupObjectDatabase.GetById(297); Hegemony_Credit = (CurrencyPickup)(object)((byId13 is CurrencyPickup) ? byId13 : null); PickupObject byId14 = PickupObjectDatabase.GetById(316); Gnawed_Key = (SpecialKeyItem)(object)((byId14 is SpecialKeyItem) ? byId14 : null); PickupObject byId15 = PickupObjectDatabase.GetById(392); Cell_Key = (NPCCellKeyItem)(object)((byId15 is NPCCellKeyItem) ? byId15 : null); PickupObject byId16 = PickupObjectDatabase.GetById(565); Glass_Guon_Stone = (IounStoneOrbitalItem)(object)((byId16 is IounStoneOrbitalItem) ? byId16 : null); PickupObject byId17 = PickupObjectDatabase.GetById(600); Spread_Ammo = (AmmoPickup)(object)((byId17 is AmmoPickup) ? byId17 : null); PickupObject byId18 = PickupObjectDatabase.GetById(727); Rat_Key = (KeyBulletPickup)(object)((byId18 is KeyBulletPickup) ? byId18 : null); } } public static class Misc { public static ItemBlueprintItem Metashop_Breach_Item_Old; public static RobotArmItem Replacement_Arm; public static RobotArmBalloonsItem Balloon; public static ItemBlueprintItem Trorc_Breach_Item; public static ItemBlueprintItem Goopton_Breach_Item; public static ItemBlueprintItem Metashop_Breach_Item_Gun; public static ItemBlueprintItem Metashop_Breach_Item_Item; public static ItemBlueprintItem Doug_Breach_Item; public static FragileGunItemPiece Fragile_Gun_Piece; static Misc() { PickupObject byId = PickupObjectDatabase.GetById(296); Metashop_Breach_Item_Old = (ItemBlueprintItem)(object)((byId is ItemBlueprintItem) ? byId : null); PickupObject byId2 = PickupObjectDatabase.GetById(415); Replacement_Arm = (RobotArmItem)(object)((byId2 is RobotArmItem) ? byId2 : null); PickupObject byId3 = PickupObjectDatabase.GetById(416); Balloon = (RobotArmBalloonsItem)(object)((byId3 is RobotArmBalloonsItem) ? byId3 : null); PickupObject byId4 = PickupObjectDatabase.GetById(418); Trorc_Breach_Item = (ItemBlueprintItem)(object)((byId4 is ItemBlueprintItem) ? byId4 : null); PickupObject byId5 = PickupObjectDatabase.GetById(429); Goopton_Breach_Item = (ItemBlueprintItem)(object)((byId5 is ItemBlueprintItem) ? byId5 : null); PickupObject byId6 = PickupObjectDatabase.GetById(497); Metashop_Breach_Item_Gun = (ItemBlueprintItem)(object)((byId6 is ItemBlueprintItem) ? byId6 : null); PickupObject byId7 = PickupObjectDatabase.GetById(501); Metashop_Breach_Item_Item = (ItemBlueprintItem)(object)((byId7 is ItemBlueprintItem) ? byId7 : null); PickupObject byId8 = PickupObjectDatabase.GetById(575); Doug_Breach_Item = (ItemBlueprintItem)(object)((byId8 is ItemBlueprintItem) ? byId8 : null); PickupObject byId9 = PickupObjectDatabase.GetById(654); Fragile_Gun_Piece = (FragileGunItemPiece)(object)((byId9 is FragileGunItemPiece) ? byId9 : null); } } public class ItemSynergyController { public class ModularSynergy { public class SynergyMarker : MonoBehaviour { } public static List synergizing_Items = new List(); public int item_Id; public string synergy_Name; public ModularSynergy(string syn, string consoleName) { item_Id = Game.Items[consoleName].PickupObjectId; synergy_Name = syn; PickupObject byId = PickupObjectDatabase.GetById(item_Id); ((Component)byId).gameObject.AddComponent(); CustomSynergies.Add(syn, new List { "mdl:modular_printer_core" }, new List { consoleName }, true); } public static string Get_Synergy_Name(int ID) { foreach (ModularSynergy synergizing_Item in synergizing_Items) { if (synergizing_Item.item_Id == ID) { return synergizing_Item.synergy_Name; } } return "ERROR"; } public static bool isSynergyItem(int ID) { foreach (ModularSynergy synergizing_Item in synergizing_Items) { if (synergizing_Item.item_Id == ID) { return true; } } return false; } public bool ModuleSynergyIsAvailable(PlayerController p) { return PlayerHasPickup(p, item_Id); } public bool PlayerHasPickup(PlayerController p, int pickupID) { if (Object.op_Implicit((Object)(object)p) && p.inventory != null && p.inventory.AllGuns != null) { for (int i = 0; i < p.inventory.AllGuns.Count; i++) { if (((PickupObject)p.inventory.AllGuns[i]).PickupObjectId == pickupID && (Object)(object)p.PlayerHasCore() != (Object)null) { return true; } } } if (Object.op_Implicit((Object)(object)p)) { for (int j = 0; j < p.activeItems.Count; j++) { if (((PickupObject)p.activeItems[j]).PickupObjectId == pickupID && (Object)(object)p.PlayerHasCore() != (Object)null) { return true; } } for (int k = 0; k < p.passiveItems.Count; k++) { Debug.Log((object)"fuck5"); if (((PickupObject)p.passiveItems[k]).PickupObjectId == pickupID && (Object)(object)p.PlayerHasCore() != (Object)null) { return true; } } if (pickupID == GlobalItemIds.Map && p.EverHadMap) { return true; } } return false; } } public static void Init() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(OurPowersCombinedItem).GetMethod("GetDamageContribution", BindingFlags.Instance | BindingFlags.NonPublic), typeof(ItemSynergyController).GetMethod("GetDamageContributionHook")); new Hook((MethodBase)typeof(MagazineRackItem).GetMethod("DoEffect", BindingFlags.Instance | BindingFlags.NonPublic), typeof(ItemSynergyController).GetMethod("DoEffectHook")); new Hook((MethodBase)typeof(SprenOrbitalItem).GetMethod("HandleTransformationDuration", BindingFlags.Instance | BindingFlags.NonPublic), typeof(ItemSynergyController).GetMethod("HandleTransformationDurationHook")); new Hook((MethodBase)typeof(SprenOrbitalItem).GetMethod("DetransformSpren", BindingFlags.Instance | BindingFlags.NonPublic), typeof(ItemSynergyController).GetMethod("DetransformSprenHook")); new Hook((MethodBase)typeof(TripleTapEffect).GetMethod("HandleProjectileDestruction", BindingFlags.Instance | BindingFlags.NonPublic), typeof(ItemSynergyController).GetMethod("YurkeyModularHook")); ChooseModuleController.AdditionalOptionsModifier = (Func)Delegate.Combine(ChooseModuleController.AdditionalOptionsModifier, new Func(ReturnAdditionalOptions)); ChooseModuleController.ModifyOmegaModuleChance = (Func)Delegate.Combine(ChooseModuleController.ModifyOmegaModuleChance, new Func(OmegaChance)); ChooseModuleController.OnModuleSelectGunDestroyed = (Action)Delegate.Combine(ChooseModuleController.OnModuleSelectGunDestroyed, new Action(OGEE)); Scrapper.OnAnythingScrapped = (Action)Delegate.Combine(Scrapper.OnAnythingScrapped, new Action(OGEE_2)); } public static void YurkeyModularHook(Action orig, TripleTapEffect self, Projectile source) { if ((Object)(object)self.m_player.PlayerHasCore() != (Object)null) { if (source.PlayerProjectileSourceGameTimeslice == -1f || !self.m_slicesFired.ContainsKey(source.PlayerProjectileSourceGameTimeslice) || !Object.op_Implicit((Object)(object)self.m_player) || !Object.op_Implicit((Object)(object)source)) { return; } if (source.HasImpactedEnemy) { self.m_slicesFired.Remove(source.PlayerProjectileSourceGameTimeslice); if (self.m_player.HasActiveBonusSynergy((CustomSynergyType)267, false)) { self.m_shotCounter = Mathf.Min(self.RequiredSequentialShots, self.m_shotCounter + source.NumberHealthHaversHit); } else { self.m_shotCounter++; } if (self.m_shotCounter >= self.RequiredSequentialShots) { self.m_shotCounter -= self.RequiredSequentialShots; self.m_player.PlayerHasCore().NextShotCrit = true; } } else { self.m_slicesFired[source.PlayerProjectileSourceGameTimeslice] = self.m_slicesFired[source.PlayerProjectileSourceGameTimeslice] - 1; if (self.m_slicesFired[source.PlayerProjectileSourceGameTimeslice] == 0) { self.m_shotCounter = 0; } } } else { orig(self, source); } } public static List CarrierModifier(List moduleUICarriers, ChooseModuleController chooseModuleController) { if (((PickupObject)chooseModuleController.g).PickupObjectId == 90) { moduleUICarriers.Add(new ChooseModuleController.ModuleUICarrier { defaultModule = ((Component)PickupObjectDatabase.GetById(BeholsterEye.ID)).GetComponent(), controller = chooseModuleController, isUsingAlternate = chooseModuleController.isAlt }); BraveUtility.Shuffle(moduleUICarriers); } if (((PickupObject)chooseModuleController.g).PickupObjectId == 27) { moduleUICarriers.Add(new ChooseModuleController.ModuleUICarrier { defaultModule = ((Component)PickupObjectDatabase.GetById(DuckHunter.ID)).GetComponent(), controller = chooseModuleController, isUsingAlternate = chooseModuleController.isAlt }); BraveUtility.Shuffle(moduleUICarriers); } if (((PickupObject)chooseModuleController.g).PickupObjectId == 577) { moduleUICarriers.Add(new ChooseModuleController.ModuleUICarrier { defaultModule = ((Component)PickupObjectDatabase.GetById(CarpalTunnel.ID)).GetComponent(), controller = chooseModuleController, isUsingAlternate = chooseModuleController.isAlt }); BraveUtility.Shuffle(moduleUICarriers); } if (((PickupObject)chooseModuleController.g).PickupObjectId == 748) { moduleUICarriers.Add(new ChooseModuleController.ModuleUICarrier { defaultModule = ((Component)PickupObjectDatabase.GetById(BrilliantSun.ID)).GetComponent(), controller = chooseModuleController, isUsingAlternate = chooseModuleController.isAlt }); BraveUtility.Shuffle(moduleUICarriers); } if (((PickupObject)chooseModuleController.g).PickupObjectId == 198) { moduleUICarriers.Add(new ChooseModuleController.ModuleUICarrier { defaultModule = ((Component)PickupObjectDatabase.GetById(WillingSpirit.ID)).GetComponent(), controller = chooseModuleController, isUsingAlternate = chooseModuleController.isAlt }); BraveUtility.Shuffle(moduleUICarriers); } if (((PickupObject)chooseModuleController.g).PickupObjectId == 149) { moduleUICarriers.Add(new ChooseModuleController.ModuleUICarrier { defaultModule = ((Component)PickupObjectDatabase.GetById(MusicBox.ID)).GetComponent(), controller = chooseModuleController, isUsingAlternate = chooseModuleController.isAlt }); BraveUtility.Shuffle(moduleUICarriers); } return moduleUICarriers; } public static void OGEE(Gun g) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) if (((PickupObject)g).PickupObjectId == 514) { GameManager.Instance.RewardManager.SpawnTotallyRandomChest(new IntVector2((int)((BraveBehaviour)g).transform.position.x, (int)((BraveBehaviour)g).transform.position.y)); } if ((((PickupObject)g).PickupObjectId == 599) | (((PickupObject)g).PickupObjectId == 333)) { AkSoundEngine.PostEvent("Play_ENM_blobulord_splash_01", ((Component)g).gameObject); float num = BraveUtility.RandomAngle(); for (int i = 0; i < 3; i++) { PickupObject byId = PickupObjectDatabase.GetById(333); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.Euler(0f, 0f, num + (float)(120 * i))); Object.Destroy((Object)(object)val, 0.7f); } PickupObject byId2 = PickupObjectDatabase.GetById(449); GameObject val2 = Object.Instantiate(((TeleporterPrototypeItem)((byId2 is TeleporterPrototypeItem) ? byId2 : null)).TelefragVFXPrefab, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.identity); } if ((((PickupObject)g).PickupObjectId == 520) | (((PickupObject)g).PickupObjectId == 337)) { AkSoundEngine.PostEvent("Play_OBJ_silenceblank_use_01", ((Component)g).gameObject); AkSoundEngine.PostEvent("Stop_ENM_attack_cancel_01", ((Component)g).gameObject); GameObject val3 = new GameObject("silencer"); PickupObject byId3 = PickupObjectDatabase.GetById(224); SilencerItem val4 = (SilencerItem)(object)((byId3 is SilencerItem) ? byId3 : null); SilencerInstance val5 = val3.AddComponent(); val5.TriggerSilencer(((BraveBehaviour)g).sprite.WorldCenter, val4.silencerSpeed, val4.silencerRadius, val4.silencerVFXPrefab, val4.distortionIntensity, val4.distortionRadius, val4.pushForce, val4.pushRadius, val4.knockbackForce, val4.knockbackRadius, val4.additionalTimeAtMaxRadius, GameManager.Instance.PrimaryPlayer, true, false); } if (((PickupObject)g).PickupObjectId == 95) { float startAngle = BraveUtility.RandomAngle(); for (int j = 0; j < 3; j++) { LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(67)).gameObject, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldTopCenter), Toolbox.GetUnitOnCircle(Toolbox.SubdivideCircle(startAngle, 3, j), 1f), 2f, true, true, false); } } if (((PickupObject)g).PickupObjectId == 626) { LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(BlockOfCheese.CheeseID)).gameObject, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldTopCenter), Vector2.zero, 2f, true, true, false); } } public static void OGEE_2(PickupObject g) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) if (g.PickupObjectId == 514) { GameManager.Instance.RewardManager.SpawnTotallyRandomChest(new IntVector2((int)((BraveBehaviour)g).transform.position.x, (int)((BraveBehaviour)g).transform.position.y)); } if ((g.PickupObjectId == 599) | (g.PickupObjectId == 333)) { AkSoundEngine.PostEvent("Play_ENM_blobulord_splash_01", ((Component)g).gameObject); float num = BraveUtility.RandomAngle(); for (int i = 0; i < 3; i++) { PickupObject byId = PickupObjectDatabase.GetById(333); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.Euler(0f, 0f, num + (float)(120 * i))); Object.Destroy((Object)(object)val, 0.7f); } PickupObject byId2 = PickupObjectDatabase.GetById(449); GameObject val2 = Object.Instantiate(((TeleporterPrototypeItem)((byId2 is TeleporterPrototypeItem) ? byId2 : null)).TelefragVFXPrefab, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.identity); } if ((g.PickupObjectId == 520) | (g.PickupObjectId == 337)) { AkSoundEngine.PostEvent("Play_OBJ_silenceblank_use_01", ((Component)g).gameObject); AkSoundEngine.PostEvent("Stop_ENM_attack_cancel_01", ((Component)g).gameObject); GameObject val3 = new GameObject("silencer"); PickupObject byId3 = PickupObjectDatabase.GetById(224); SilencerItem val4 = (SilencerItem)(object)((byId3 is SilencerItem) ? byId3 : null); SilencerInstance val5 = val3.AddComponent(); val5.TriggerSilencer(((BraveBehaviour)g).sprite.WorldCenter, val4.silencerSpeed, val4.silencerRadius, val4.silencerVFXPrefab, val4.distortionIntensity, val4.distortionRadius, val4.pushForce, val4.pushRadius, val4.knockbackForce, val4.knockbackRadius, val4.additionalTimeAtMaxRadius, GameManager.Instance.PrimaryPlayer, true, false); } if (g.PickupObjectId == 95) { float startAngle = BraveUtility.RandomAngle(); for (int j = 0; j < 3; j++) { LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(67)).gameObject, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldTopCenter), Toolbox.GetUnitOnCircle(Toolbox.SubdivideCircle(startAngle, 3, j), 1f), 2f, true, true, false); } } } public static IEnumerator HandleTransformationDurationHook(Func orig, SprenOrbitalItem self) { tk2dSpriteAnimator extantAnimator = ((PlayerOrbitalItem)self).m_extantOrbital.GetComponentInChildren(); extantAnimator.Play(self.GunChangeAnimation); PlayerOrbitalFollower follower = ((PlayerOrbitalItem)self).m_extantOrbital.GetComponent(); if (Object.op_Implicit((Object)(object)follower)) { follower.OverridePosition = true; } float elapsed2 = 0f; ((BraveBehaviour)extantAnimator).sprite.HeightOffGround = 5f; while (elapsed2 < 1f) { elapsed2 += BraveTime.DeltaTime; if (Object.op_Implicit((Object)(object)follower) && Object.op_Implicit((Object)(object)self.m_player)) { follower.OverrideTargetPosition = Vector2.op_Implicit(((GameActor)self.m_player).CenterPosition); } yield return null; } extantAnimator.Play(self.GunChangeMoreAnimation); while (extantAnimator.IsPlaying(self.GunChangeMoreAnimation)) { if (Object.op_Implicit((Object)(object)follower) && Object.op_Implicit((Object)(object)self.m_player)) { follower.OverrideTargetPosition = Vector2.op_Implicit(((GameActor)self.m_player).CenterPosition); } yield return null; } if (Object.op_Implicit((Object)(object)follower)) { follower.ToggleRenderer(false); } self.m_player.inventory.GunChangeForgiveness = true; self.m_transformation = (SprenTransformationState)2; Dictionary i = new Dictionary(); if ((Object)(object)self.m_player.PlayerHasCore() != (Object)null) { AkSoundEngine.PostEvent("Play_BOSS_RatMech_Wizard_Cast_01", ((Component)self).gameObject); DefaultModule help_1 = GlobalModuleStorage.ReturnRandomModule(DefaultModule.ModuleTier.Tier_1); VFXStorage.DoFancyFlashOfModules(3, ((PassiveItem)self).m_owner, help_1); self.m_player.PlayerHasCore().GiveTemporaryModule(help_1, "Sprun", 3); i.Add(help_1, 3); yield return null; DefaultModule help_2 = GlobalModuleStorage.ReturnRandomModule(DefaultModule.ModuleTier.Tier_2); VFXStorage.DoFancyFlashOfModules(2, ((PassiveItem)self).m_owner, help_2); self.m_player.PlayerHasCore().GiveTemporaryModule(help_2, "Sprun", 2); i.Add(help_2, 2); yield return null; DefaultModule help_3 = GlobalModuleStorage.ReturnRandomModule(DefaultModule.ModuleTier.Tier_3); VFXStorage.DoFancyFlashOfModules(1, ((PassiveItem)self).m_owner, help_3); self.m_player.PlayerHasCore().GiveTemporaryModule(help_3, "Sprun", 1); i.Add(help_3, 1); } else { PickupObject byId = PickupObjectDatabase.GetById(self.LimitGunId); Gun limitGun = (Gun)(object)((byId is Gun) ? byId : null); self.m_extantGun = self.m_player.inventory.AddGunToInventory(limitGun, true); ((PickupObject)self.m_extantGun).CanBeDropped = false; ((PickupObject)self.m_extantGun).CanBeSold = false; self.m_player.inventory.GunLocked.SetOverride("spren gun", true, (float?)null); } elapsed2 = 0f; while (elapsed2 < self.LimitDuration) { if (Object.op_Implicit((Object)(object)follower) && Object.op_Implicit((Object)(object)self.m_player)) { follower.OverrideTargetPosition = Vector2.op_Implicit(((GameActor)self.m_player).CenterPosition); } elapsed2 += BraveTime.DeltaTime; yield return null; } if (Object.op_Implicit((Object)(object)follower)) { follower.ToggleRenderer(true); } if (Object.op_Implicit((Object)(object)extantAnimator)) { extantAnimator.PlayForDuration(self.BackchangeAnimation, -1f, self.IdleAnimation, false); } while (extantAnimator.IsPlaying(self.BackchangeAnimation)) { if (Object.op_Implicit((Object)(object)follower) && Object.op_Implicit((Object)(object)self.m_player)) { follower.OverrideTargetPosition = Vector2.op_Implicit(((GameActor)self.m_player).CenterPosition); } yield return null; } if ((Object)(object)self.m_player.PlayerHasCore() != (Object)null) { AkSoundEngine.PostEvent("Play_BOSS_RatMech_Wizard_Kick_01", ((Component)self).gameObject); self.m_player.PlayerHasCore().RemoveTemporaryModules("Sprun", playVFX: true); } follower.OverridePosition = false; self.DetransformSpren(); } public static void DetransformSprenHook(Action orig, SprenOrbitalItem self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0049: Unknown result type (might be due to invalid IL or missing references) if ((int)self.m_transformation != 2 || !Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.m_player) || !Object.op_Implicit((Object)(object)self.m_extantGun)) { return; } self.m_transformation = (SprenTransformationState)0; if (Object.op_Implicit((Object)(object)self.m_player) && !((Object)(object)self.m_player.PlayerHasCore() != (Object)null)) { if (!GameManager.Instance.IsLoadingLevel && !Dungeon.IsGenerating) { Minimap.Instance.ToggleMinimap(false, false); } self.m_player.inventory.GunLocked.RemoveOverride("spren gun"); self.m_player.inventory.DestroyGun(self.m_extantGun); self.m_extantGun = null; } self.m_player.inventory.GunChangeForgiveness = false; } public static float OmegaChance(ItemQuality q, DefaultModule.ModuleTier tier, float count) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((Object)(object)val.PlayerHasCore() != (Object)null && val.HasPassiveItem(815)) { return count *= 5f; } } return count; } public static int ReturnAdditionalOptions(int count) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((Object)(object)val.PlayerHasCore() != (Object)null && val.HasPassiveItem(815)) { return count += 2; } } return count; } public static void DoEffectHook(Action orig, MagazineRackItem self, PlayerController user) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)user.PlayerHasCore() != (Object)null) { AkSoundEngine.PostEvent("Play_OBJ_ammo_pickup_01", ((Component)user).gameObject); Object obj = ResourceCache.Acquire("Global Prefabs/HoveringGun"); GameObject val = Object.Instantiate((GameObject)(object)((obj is GameObject) ? obj : null), Vector2Extensions.ToVector3ZisY(((GameActor)user).CenterPosition, 0f), Quaternion.identity); HoveringGunController component = val.GetComponent(); component.ConsumesTargetGunAmmo = false; component.ChanceToConsumeTargetGunAmmo = 0f; component.Position = (HoverPosition)1; component.Aim = (AimType)1; component.Trigger = (FireType)3; component.CooldownTime = 0.5f; component.ShootDuration = 0.3f; component.OnlyOnEmptyReload = false; component.Initialize(PickupObjectDatabase.GetRandomGun(), user); Object.Destroy((Object)(object)((Component)component).gameObject, 15f); } else { orig(self, user); } } public static float GetDamageContributionHook(Func orig, OurPowersCombinedItem self) { if ((Object)(object)((PassiveItem)self).Owner == (Object)null) { return 1f; } if ((Object)(object)((PassiveItem)self).Owner.PlayerHasCore() != (Object)null) { return (float)((PassiveItem)self).Owner.PlayerHasCore().ReturnActiveTotal() * 2f; } return orig(self); } } public class CrateSpawnController { public class CrateController : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler parentRoom; private GameObject instanceMinimapIcon; public PlayerController player; public bool UsesAltSkin() { if ((Object)(object)player == (Object)null) { return false; } return player.IsUsingAlternateCostume; } public void Start() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (UsesAltSkin()) { ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.material.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue))); } ((MonoBehaviour)this).StartCoroutine(DoFall()); } public void Update() { if ((Object)(object)player != (Object)null && parentRoom != null && player.CurrentRoom != parentRoom && parentRoom.IsRegistered((IPlayerInteractable)(object)this)) { parentRoom.DeregisterInteractable((IPlayerInteractable)(object)this); ((BraveBehaviour)this).spriteAnimator.Play(UsesAltSkin() ? "cratealt_superclose" : "crate_superclose"); } } public IEnumerator DoFall() { ((Behaviour)((BraveBehaviour)this).specRigidbody).enabled = false; ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.enabled = true; Vector3 landPosition = Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter); Transform transform = ((BraveBehaviour)this).transform; Vector3 val2 = (transform.position += new Vector3(12f, 30f)); Vector3 startPosition = val2; float e = 0f; while (e < 1.5f) { e += BraveTime.DeltaTime; yield return null; } e = 0f; ((BraveBehaviour)this).spriteAnimator.Play(UsesAltSkin() ? "cratealt_fall" : "crate_fall"); GameObject eff = Object.Instantiate(VFXStorage.WarningImpactVFX, landPosition, Quaternion.identity); Object.Destroy((Object)(object)eff, 1f); tk2dSpriteAnimator component2 = eff.GetComponent(); ParticleSystem particleSystem = Object.Instantiate(SmokeObject).GetComponent(); GameObjectExtensions.SetLayerRecursively(((Component)particleSystem).gameObject, LayerMask.NameToLayer("Unoccluded")); AkSoundEngine.PostEvent("Play_BOSS_RatMech_Whistle_01", ((Component)this).gameObject); if ((Object)(object)component2 != (Object)null) { component2.ignoreTimeScale = true; component2.AlwaysIgnoreTimeScale = true; component2.AnimateDuringBossIntros = true; component2.alwaysUpdateOffscreen = true; component2.playAutomatically = true; } while (e < 1f) { ((BraveBehaviour)this).specRigidbody.Reinitialize(); e += BraveTime.DeltaTime; Vector2 pos = Vector2.op_Implicit(Vector3.Lerp(startPosition, landPosition, e)); ((BraveBehaviour)this).transform.position = Vector2.op_Implicit(pos); ((Component)particleSystem).gameObject.transform.position = Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter); yield return null; } Object.Destroy((Object)(object)particleSystem, 60f); ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.enabled = true; Exploder.Explode(landPosition, StaticExplosionDatas.customDynamiteExplosion, Vector2.op_Implicit(landPosition), (Action)null, false, (CoreDamageTypes)0, false); ((Behaviour)((BraveBehaviour)this).specRigidbody).enabled = true; ((BraveBehaviour)this).specRigidbody.Reinitialize(); ((BraveBehaviour)this).spriteAnimator.Stop(); ((BraveBehaviour)this).spriteAnimator.Play(UsesAltSkin() ? "cratealt_idle" : "crate_idle"); ConfigureOnPlacement(GameManager.Instance.Dungeon.data.Entrance); } public void ConfigureOnPlacement(RoomHandler room) { parentRoom = room; ref GameObject optionalDoorTopDecorable = ref room.OptionalDoorTopDecorable; Object obj = ResourceCache.Acquire("Global Prefabs/Shrine_Lantern"); optionalDoorTopDecorable = (GameObject)(object)((obj is GameObject) ? obj : null); if (!room.IsOnCriticalPath && room.connectedRooms.Count == 1) { room.ShouldAttemptProceduralLock = true; room.AttemptProceduralLockChance = 0f; } parentRoom.RegisterInteractable((IPlayerInteractable)(object)this); RegisterMinimapIcon(); } public void RegisterMinimapIcon() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown instanceMinimapIcon = Minimap.Instance.RegisterRoomIcon(parentRoom, (GameObject)BraveResources.Load("Global Prefabs/Minimap_Shrine_Icon", ".prefab"), false); } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { ((BraveBehaviour)this).spriteAnimator.Play(UsesAltSkin() ? "cratealt_open" : "crate_open"); StarterGunSelectUIController starterGunSelectUIController = StarterGunSelectUIController.GenerateUI(); starterGunSelectUIController.ToggleUI(null, interactor); starterGunSelectUIController.OnClosed = (Action)Delegate.Combine(starterGunSelectUIController.OnClosed, (Action)delegate { ((BraveBehaviour)this).spriteAnimator.Play(UsesAltSkin() ? "cratealt_close" : "crate_close"); }); starterGunSelectUIController.OnUsed = (Action)Delegate.Combine(starterGunSelectUIController.OnUsed, (Action)delegate { parentRoom.DeregisterInteractable((IPlayerInteractable)(object)this); ((BraveBehaviour)this).spriteAnimator.Play(UsesAltSkin() ? "cratealt_superclose" : "crate_superclose"); }); } public void OnEnteredRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } public static GameObject Crate; public static GameObject SmokeObject; public static void Init() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_0169: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0256: 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_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown Crate = PrefabBuilder.BuildObject("Crate_Interactable"); tk2dSprite val = Crate.AddComponent(); ((tk2dBaseSprite)val).Collection = StaticCollections.Crate_Collection; ((tk2dBaseSprite)val).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("crate_idle_001")); tk2dSpriteAnimator val2 = Crate.AddComponent(); val2.Library = StaticCollections.Crate_Animation; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material = val3; SpeculativeRigidbody val4 = SpriteBuilder.SetUpSpeculativeRigidbody(Crate.GetComponent(), new IntVector2(1, -12), new IntVector2(32, 20)); val4.PixelColliders.Clear(); val4.CollideWithTileMap = false; val4.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)6, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = -4, ManualWidth = 32, ManualHeight = 20, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); val4.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)13, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = -4, ManualWidth = 32, ManualHeight = 20, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); val4.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)8, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = -4, ManualWidth = 32, ManualHeight = 20, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); Crate.AddComponent(); SmokeObject = Module.ModularAssetBundle.LoadAsset("SmokeParticle"); CustomActions.OnRunStart = (Action)Delegate.Combine(CustomActions.OnRunStart, new Action(OnRunStart)); } public static void OnRunStart(PlayerController player1, PlayerController player2, GameMode mode) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFall()); } public static IEnumerator DoFall() { float e = 0f; while (e < 1f) { e += BraveTime.DeltaTime; yield return null; } bool b = false; PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController p in allPlayers) { if ((Object)(object)p.PlayerHasCore() != (Object)null && !b) { b = !b; if (CanSpawnCrate()) { CrateController newCrate = Object.Instantiate(Crate, ((BraveBehaviour)p).transform.position + new Vector3(-5f, -3f), Quaternion.identity).GetComponent(); newCrate.player = p; } } } yield return null; } public static bool CanSpawnCrate() { AdvancedGameStatsManager instance = AdvancedGameStatsManager.Instance; if (instance == null) { return false; } if (instance.GetFlag(CustomDungeonFlags.BEAT_FLOOR_3)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_LICH_WITH_4_MODULES_OR_LESS)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BLESSED_MODE)) { return true; } if (instance.GetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN)) { return true; } if (instance.GetFlag(CustomDungeonFlags.CHALLENGEMODE_LICH)) { return true; } if (instance.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)) { return true; } return false; } } public class ExpandDungeonMusicAPI { public delegate void Action5X(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); public static Hook switchToStateHook; public static Hook switchToCustomMusicHook; public static Hook switchToEndTimesMusicHook; public static Hook switchToBossMusicHook; public static Hook switchToDragunTwoHook; public static Hook flushMusicAudioHook; public static Hook flushAudioHook; public static readonly string StopAllMusicEventName = "Stop_ChoirOfTheSilentMachine"; public static readonly Dictionary CustomLevelMusic = new Dictionary(); public static readonly List CustomWestFloorMusic = new List(); public static readonly List CustomRoomMusic = new List { "Play_ChoirOfTheSilentMachine" }; public static readonly List CustomRoomMusicStopEvents = new List { "Stop_ChoirOfTheSilentMachine" }; public static readonly List TilesetsWithCustomShopSecretMusic = new List { (ValidTilesets)8192 }; public static T ReflectGetField(Type classType, string fieldName, object o = null) { FieldInfo field = classType.GetField(fieldName, BindingFlags.Public | BindingFlags.NonPublic | ((o != null) ? BindingFlags.Instance : BindingFlags.Static)); return (T)field.GetValue(o); } public static void InitHooks() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown switchToStateHook = new Hook((MethodBase)typeof(DungeonFloorMusicController).GetMethod("SwitchToState", BindingFlags.Instance | BindingFlags.NonPublic), typeof(ExpandDungeonMusicAPI).GetMethod("SwitchToState", BindingFlags.Instance | BindingFlags.NonPublic), (object)typeof(DungeonFloorMusicController)); switchToCustomMusicHook = new Hook((MethodBase)typeof(DungeonFloorMusicController).GetMethod("SwitchToCustomMusic", BindingFlags.Instance | BindingFlags.Public), typeof(ExpandDungeonMusicAPI).GetMethod("SwitchToCustomMusic"), (object)typeof(DungeonFloorMusicController)); switchToEndTimesMusicHook = new Hook((MethodBase)typeof(DungeonFloorMusicController).GetMethod("SwitchToEndTimesMusic", BindingFlags.Instance | BindingFlags.Public), typeof(ExpandDungeonMusicAPI).GetMethod("SwitchToEndTimesMusic"), (object)typeof(DungeonFloorMusicController)); switchToBossMusicHook = new Hook((MethodBase)typeof(DungeonFloorMusicController).GetMethod("SwitchToBossMusic", BindingFlags.Instance | BindingFlags.Public), typeof(ExpandDungeonMusicAPI).GetMethod("SwitchToBossMusic"), (object)typeof(DungeonFloorMusicController)); switchToDragunTwoHook = new Hook((MethodBase)typeof(DungeonFloorMusicController).GetMethod("SwitchToDragunTwo", BindingFlags.Instance | BindingFlags.Public), typeof(ExpandDungeonMusicAPI).GetMethod("SwitchToDragunTwo"), (object)typeof(DungeonFloorMusicController)); flushMusicAudioHook = new Hook((MethodBase)typeof(GameManager).GetMethod("FlushMusicAudio", BindingFlags.Instance | BindingFlags.Public), typeof(ExpandDungeonMusicAPI).GetMethod("FlushMusicAudio"), (object)typeof(GameManager)); flushAudioHook = new Hook((MethodBase)typeof(GameManager).GetMethod("FlushAudio", BindingFlags.Instance | BindingFlags.Public), typeof(ExpandDungeonMusicAPI).GetMethod("FlushAudio"), (object)typeof(GameManager)); } private void SwitchToState(Action orig, DungeonFloorMusicController self, DungeonMusicState targetState) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Invalid comparison between Unknown and I4 //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Invalid comparison between Unknown and I4 //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Invalid comparison between Unknown and I4 //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Invalid comparison between Unknown and I4 //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Invalid comparison between Unknown and I4 //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Invalid comparison between Unknown and I4 //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Invalid comparison between Unknown and I4 //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Invalid comparison between Unknown and I4 //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Invalid comparison between Unknown and I4 //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Invalid comparison between Unknown and I4 //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Invalid comparison between Unknown and I4 //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Invalid comparison between Unknown and I4 //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Invalid comparison between Unknown and I4 //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Invalid comparison between Unknown and I4 //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Invalid comparison between Unknown and I4 //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Invalid comparison between Unknown and I4 //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Invalid comparison between Unknown and I4 //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Invalid comparison between Unknown and I4 //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Invalid comparison between Unknown and I4 //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Invalid comparison between Unknown and I4 //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Invalid comparison between Unknown and I4 //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Invalid comparison between Unknown and I4 //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Invalid comparison between Unknown and I4 //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Invalid comparison between Unknown and I4 //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Invalid comparison between Unknown and I4 //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Invalid comparison between Unknown and I4 //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Invalid comparison between Unknown and I4 //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Invalid comparison between Unknown and I4 //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Invalid comparison between Unknown and I4 //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Invalid comparison between Unknown and I4 //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Invalid comparison between Unknown and I4 //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Invalid comparison between Unknown and I4 //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Invalid comparison between Unknown and I4 //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Invalid comparison between Unknown and I4 //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Invalid comparison between Unknown and I4 //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Invalid comparison between Unknown and I4 //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Invalid comparison between Unknown and I4 //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Invalid comparison between Unknown and I4 //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Invalid comparison between Unknown and I4 //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Invalid comparison between Unknown and I4 //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Invalid comparison between Unknown and I4 //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Invalid comparison between Unknown and I4 //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Invalid comparison between Unknown and I4 //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Invalid comparison between Unknown and I4 //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Invalid comparison between Unknown and I4 //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Invalid comparison between Unknown and I4 //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Invalid comparison between Unknown and I4 string text = ReflectGetField(typeof(DungeonFloorMusicController), "m_cachedMusicEventCore", self); bool value = false; float num = ReflectGetField(typeof(DungeonFloorMusicController), "m_changedToArcadeTimer", self); float num2 = ReflectGetField(typeof(DungeonFloorMusicController), "m_cooldownTimerRemaining", self); uint num3 = ReflectGetField(typeof(DungeonFloorMusicController), "m_coreMusicEventID", self); DungeonMusicState val = ReflectGetField(typeof(DungeonFloorMusicController), "m_currentState", self); bool flag = ReflectGetField(typeof(DungeonFloorMusicController), "m_overrideMusic", self); if (string.IsNullOrEmpty(text) | !CustomLevelMusic.TryGetValue(text, out value)) { if ((int)val == -1) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); } orig(self, targetState); return; } FieldInfo field = typeof(DungeonFloorMusicController).GetField("m_cooldownTimerRemaining", BindingFlags.Instance | BindingFlags.NonPublic); FieldInfo field2 = typeof(DungeonFloorMusicController).GetField("m_currentState", BindingFlags.Instance | BindingFlags.NonPublic); if (num > 0f && (int)targetState == 30 && (int)val == 60) { return; } Debug.Log((object)("(EX) Attemping to switch to state: " + ((object)(DungeonMusicState)(ref targetState)).ToString() + " with core ID: " + num3)); if (flag) { return; } DungeonMusicState val2 = targetState; DungeonMusicState val3 = val2; if ((int)val3 <= 25) { if ((int)val3 <= 10) { if ((int)val3 != 0) { if ((int)val3 == 10) { AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text + "_LoopA", ((Component)self).gameObject); } else if ((int)val == 40 || (int)val == 50 || (int)val == 75 || (int)val == 60 || (int)val == -1) { if ((int)val == -1) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); } AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } } else { field.SetValue(self, -1f); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text + "_Intro", ((Component)self).gameObject); } else { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } } else if ((int)val3 != 20) { if ((int)val3 != 23) { if ((int)val3 == 25) { AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text + "_LoopD", ((Component)self).gameObject); } else if ((int)val == 40 || (int)val == 50 || (int)val == 75 || (int)val == 60 || (int)val == -1) { if ((int)val == -1) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); } AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } } else { AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text + "_LoopC", ((Component)self).gameObject); } else if ((int)val == 40 || (int)val == 50 || (int)val == 75 || (int)val == 60 || (int)val == -1) { if ((int)val == -1) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); } AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } } else { AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text + "_LoopB", ((Component)self).gameObject); } else if ((int)val == 40 || (int)val == 50 || (int)val == 75 || (int)val == 60 || (int)val == -1) { if ((int)val == -1) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); } AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } } else if ((int)val3 <= 50) { if ((int)val3 != 30) { if ((int)val3 != 40) { if ((int)val3 == 50) { field.SetValue(self, -1f); AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value && TilesetsWithCustomShopSecretMusic.Contains(((Component)self).gameObject.GetComponent().Dungeon.tileIndices.tilesetId)) { AkSoundEngine.PostEvent(text + "_Secret", ((Component)self).gameObject); } else { AkSoundEngine.PostEvent("Play_MUS_Dungeon_Theme_01", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Dungeon_State_Secret", ((Component)self).gameObject); } } } else { field.SetValue(self, -1f); AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value && TilesetsWithCustomShopSecretMusic.Contains(((Component)self).gameObject.GetComponent().Dungeon.tileIndices.tilesetId)) { AkSoundEngine.PostEvent(text + "_Shop", ((Component)self).gameObject); } else { AkSoundEngine.PostEvent("Play_MUS_Dungeon_Theme_01", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Dungeon_State_Shop", ((Component)self).gameObject); } } } else { field.SetValue(self, -1f); if ((int)GameManager.Instance.CurrentLevelOverrideState == 1 && GameStatsManager.Instance.AnyPastBeaten()) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Dungeon_State_Winner", ((Component)self).gameObject); } else { AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); if (value) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent(text + "_Calm", ((Component)self).gameObject); } else if ((int)val == 40 || (int)val == 50 || (int)val == 75 || (int)val == 60 || (int)val == -1) { if ((int)val == -1) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); } AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } } } else if ((int)val3 != 60) { if ((int)val3 != 70) { if ((int)val3 == 75) { field.SetValue(self, -1f); AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Dungeon_Theme_01", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_State_Sorceress", ((Component)self).gameObject); } } else { field.SetValue(self, -1f); AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); AkSoundEngine.PostEvent(text, ((Component)self).gameObject); } } else { field.SetValue(self, -1f); AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Dungeon_Theme_01", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Dungeon_State_Winchester", ((Component)self).gameObject); AkSoundEngine.PostEvent("Play_MUS_Winchester_State_Drone", ((Component)self).gameObject); } Debug.Log((object)("(EX) Successfully switched to state: " + ((object)(DungeonMusicState)(ref targetState)).ToString())); field2.SetValue(self, targetState); } public void SwitchToCustomMusic(Action5X orig, DungeonFloorMusicController self, string customMusicEvent, GameObject source, bool useSwitch, string switchEvent) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); orig(self, customMusicEvent, source, useSwitch, switchEvent); } public void SwitchToEndTimesMusic(Action orig, DungeonFloorMusicController self) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); orig(self); } public void SwitchToBossMusic(Action orig, DungeonFloorMusicController self, string bossMusicString, GameObject source) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); orig(self, bossMusicString, source); } public void SwitchToDragunTwo(Action orig, DungeonFloorMusicController self) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); orig(self); } public void FlushMusicAudio(Action orig, GameManager self) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); orig(self); } public void FlushAudio(Action orig, GameManager self) { AkSoundEngine.PostEvent(StopAllMusicEventName, ((Component)self).gameObject); orig(self); } } public static class GlobalMessageRadio { public class MessageContainer { public GameObject gameObject; public List messages = new List(); public Action recieverCall; } private static List RegisteredContainers = new List(); private static Action OnMessageRecieved; public static void BroadcastMessage(string message) { if (OnMessageRecieved == null) { return; } for (int i = 0; i < RegisteredContainers.Count; i++) { MessageContainer messageContainer = RegisteredContainers[i]; GameObject gameObject = messageContainer.gameObject; if ((Object)(object)gameObject == (Object)null) { OnMessageRecieved = (Action)Delegate.Remove(OnMessageRecieved, messageContainer.recieverCall); RegisteredContainers.Remove(messageContainer); } } for (int j = 0; j < RegisteredContainers.Count; j++) { MessageContainer messageContainer2 = RegisteredContainers[j]; GameObject gameObject2 = messageContainer2.gameObject; List messages = messageContainer2.messages; if ((Object)(object)gameObject2 != (Object)null && messages.Contains(message)) { messageContainer2.recieverCall(gameObject2, message); } } } public static void BroadcastMessageToOthers(GameObject self, string message) { if (OnMessageRecieved == null) { return; } for (int i = 0; i < RegisteredContainers.Count; i++) { MessageContainer messageContainer = RegisteredContainers[i]; GameObject gameObject = messageContainer.gameObject; if ((Object)(object)gameObject == (Object)null) { OnMessageRecieved = (Action)Delegate.Remove(OnMessageRecieved, messageContainer.recieverCall); RegisteredContainers.Remove(messageContainer); } } for (int j = 0; j < RegisteredContainers.Count; j++) { MessageContainer messageContainer2 = RegisteredContainers[j]; GameObject gameObject2 = messageContainer2.gameObject; List messages = messageContainer2.messages; if ((Object)(object)gameObject2 != (Object)null && messages.Contains(message)) { messageContainer2.recieverCall(self, message); } } } public static MessageContainer RegisterObjectToRadio(GameObject obj, List validMessages, Action reciever) { MessageContainer messageContainer = new MessageContainer { gameObject = obj, messages = validMessages, recieverCall = reciever }; RegisteredContainers.Add(messageContainer); OnMessageRecieved = (Action)Delegate.Combine(OnMessageRecieved, messageContainer.recieverCall); return messageContainer; } } public class LocalMessageRadio : MonoBehaviour { public class MessageContainer { public GameObject gameObject; public List messages = new List(); public Action recieverCall; } private static List RegisteredContainers = new List(); private static Action OnMessageRecieved; public void BroadcastLocalMessage(string message) { if (OnMessageRecieved == null) { return; } for (int i = 0; i < RegisteredContainers.Count; i++) { MessageContainer messageContainer = RegisteredContainers[i]; GameObject gameObject = messageContainer.gameObject; if ((Object)(object)gameObject == (Object)null) { OnMessageRecieved = (Action)Delegate.Remove(OnMessageRecieved, messageContainer.recieverCall); RegisteredContainers.Remove(messageContainer); } } for (int j = 0; j < RegisteredContainers.Count; j++) { MessageContainer messageContainer2 = RegisteredContainers[j]; GameObject gameObject2 = messageContainer2.gameObject; List messages = messageContainer2.messages; if ((Object)(object)gameObject2 != (Object)null && messages.Contains(message)) { messageContainer2.recieverCall(gameObject2, message); } } } public static void RegisterObjectToRadio(GameObject obj, List validMessages, Action reciever) { MessageContainer messageContainer = new MessageContainer { gameObject = obj, messages = validMessages, recieverCall = reciever }; RegisteredContainers.Add(messageContainer); OnMessageRecieved = (Action)Delegate.Combine(OnMessageRecieved, messageContainer.recieverCall); } } public class AdvancedGunBehaviourMultiActive : MonoBehaviour, IGunInheritable, ILevelLoadedListener { private bool pickedUpLast = false; private GameActor lastOwner = null; public bool everPickedUpByPlayer = false; public bool everPickedUp = false; public Gun gun; private bool hasReloaded = true; public bool preventNormalFireAudio; public bool preventNormalReloadAudio; public string overrideNormalFireAudio; public string overrideReloadSwitchGroup; public string overrideNormalReloadAudio; public bool usesOverrideHeroSwordCooldown; public float overrideHeroSwordCooldown; private static FieldInfo heroSwordCooldown = typeof(Gun).GetField("HeroSwordCooldown", BindingFlags.Instance | BindingFlags.NonPublic); public bool PickedUp => (Object)(object)gun.CurrentOwner != (Object)null; public PlayerController Player { get { if (gun.CurrentOwner is PlayerController) { GameActor currentOwner = gun.CurrentOwner; return (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); } return null; } } public float HeroSwordCooldown { get { if ((Object)(object)gun != (Object)null) { return (float)heroSwordCooldown.GetValue(gun); } return -1f; } set { if ((Object)(object)gun != (Object)null) { heroSwordCooldown.SetValue(gun, value); } } } public GameActor Owner => gun.CurrentOwner; public bool PickedUpByPlayer => (Object)(object)Player != (Object)null; public virtual void Update() { if ((Object)(object)Player != (Object)null && !everPickedUpByPlayer) { everPickedUpByPlayer = true; } if ((Object)(object)Owner != (Object)null && !everPickedUp) { everPickedUp = true; } if ((Object)(object)lastOwner != (Object)(object)Owner) { lastOwner = Owner; } if ((Object)(object)Owner != (Object)null && !pickedUpLast) { OnPickup(Owner); pickedUpLast = true; } if ((Object)(object)Owner == (Object)null && pickedUpLast) { if ((Object)(object)lastOwner != (Object)null) { OnPostDrop(lastOwner); lastOwner = null; } pickedUpLast = false; } if ((Object)(object)gun != (Object)null && !gun.IsReloading && !hasReloaded) { hasReloaded = true; if ((Object)(object)Owner != (Object)null) { GameActor owner = Owner; OnReloadEnded((PlayerController)(object)((owner is PlayerController) ? owner : null), gun); } } gun.PreventNormalFireAudio = preventNormalFireAudio; gun.OverrideNormalFireAudioEvent = overrideNormalFireAudio; } public virtual void InheritData(Gun source) { AdvancedGunBehaviourMultiActive component = ((Component)source).GetComponent(); if ((Object)(object)component != (Object)null) { preventNormalFireAudio = component.preventNormalFireAudio; preventNormalReloadAudio = component.preventNormalReloadAudio; overrideNormalReloadAudio = component.overrideNormalReloadAudio; overrideNormalFireAudio = component.overrideNormalFireAudio; everPickedUpByPlayer = component.everPickedUpByPlayer; everPickedUp = component.everPickedUp; usesOverrideHeroSwordCooldown = component.usesOverrideHeroSwordCooldown; overrideHeroSwordCooldown = component.overrideHeroSwordCooldown; overrideReloadSwitchGroup = component.overrideReloadSwitchGroup; } } public virtual void MidGameSerialize(List data, int dataIndex) { data.Add(preventNormalFireAudio); data.Add(preventNormalReloadAudio); data.Add(overrideNormalReloadAudio); data.Add(overrideNormalFireAudio); data.Add(everPickedUpByPlayer); data.Add(everPickedUp); data.Add(usesOverrideHeroSwordCooldown); data.Add(overrideHeroSwordCooldown); data.Add(overrideReloadSwitchGroup); } public virtual void MidGameDeserialize(List data, ref int dataIndex) { preventNormalFireAudio = (bool)data[dataIndex]; preventNormalReloadAudio = (bool)data[dataIndex + 1]; overrideNormalReloadAudio = (string)data[dataIndex + 2]; overrideNormalFireAudio = (string)data[dataIndex + 3]; everPickedUpByPlayer = (bool)data[dataIndex + 4]; everPickedUp = (bool)data[dataIndex + 5]; usesOverrideHeroSwordCooldown = (bool)data[dataIndex + 6]; overrideHeroSwordCooldown = (float)data[dataIndex + 7]; overrideReloadSwitchGroup = (string)data[dataIndex + 8]; dataIndex += 9; } public virtual void Start() { gun = ((Component)this).GetComponent(); Gun obj = gun; obj.OnInitializedWithOwner = (Action)Delegate.Combine(obj.OnInitializedWithOwner, new Action(OnInitializedWithOwner)); if ((Object)(object)gun.CurrentOwner != (Object)null) { OnInitializedWithOwner(gun.CurrentOwner); } Gun obj2 = gun; obj2.PostProcessProjectile = (Action)Delegate.Combine(obj2.PostProcessProjectile, new Action(PostProcessProjectile)); Gun obj3 = gun; obj3.PostProcessVolley = (Action)Delegate.Combine(obj3.PostProcessVolley, new Action(PostProcessVolley)); Gun obj4 = gun; obj4.OnDropped = (Action)Delegate.Combine(obj4.OnDropped, new Action(OnDropped)); Gun obj5 = gun; obj5.OnAutoReload = (Action)Delegate.Combine(obj5.OnAutoReload, new Action(OnAutoReload)); Gun obj6 = gun; obj6.OnReloadPressed = (Action)Delegate.Combine(obj6.OnReloadPressed, new Action(OnReloadPressed)); Gun obj7 = gun; obj7.OnFinishAttack = (Action)Delegate.Combine(obj7.OnFinishAttack, new Action(OnFinishAttack)); Gun obj8 = gun; obj8.OnPostFired = (Action)Delegate.Combine(obj8.OnPostFired, new Action(OnPostFired)); Gun obj9 = gun; obj9.OnAmmoChanged = (Action)Delegate.Combine(obj9.OnAmmoChanged, new Action(OnAmmoChanged)); Gun obj10 = gun; obj10.OnBurstContinued = (Action)Delegate.Combine(obj10.OnBurstContinued, new Action(OnBurstContinued)); Gun obj11 = gun; obj11.OnPreFireProjectileModifier = (Func)Delegate.Combine(obj11.OnPreFireProjectileModifier, new Func(OnPreFireProjectileModifier)); ((MonoBehaviour)this).StartCoroutine(UpdateCR()); } public virtual void BraveOnLevelWasLoaded() { } private IEnumerator UpdateCR() { while (true) { NonCurrentGunUpdate(); yield return null; } } public virtual void NonCurrentGunUpdate() { } public virtual void OnInitializedWithOwner(GameActor actor) { } public virtual void PostProcessProjectile(Projectile projectile) { } public virtual void PostProcessVolley(ProjectileVolleyData volley) { } public virtual void OnDropped() { } public virtual void OnAutoReload(PlayerController player, Gun gun) { if ((Object)(object)player != (Object)null) { OnAutoReloadSafe(player, gun); } } public virtual void OnAutoReloadSafe(PlayerController player, Gun gun) { } public virtual void OnReloadPressed(PlayerController player, Gun gun, bool manualReload) { if (hasReloaded && gun.IsReloading) { OnReload(player, gun); hasReloaded = false; } if ((Object)(object)player != (Object)null) { OnReloadPressedSafe(player, gun, manualReload); } } public virtual void OnGunsChanged(Gun previous, Gun current, bool newGun) { if ((Object)(object)previous != (Object)(object)gun && (Object)(object)current == (Object)(object)gun) { OnSwitchedToThisGun(); } if ((Object)(object)previous == (Object)(object)gun && (Object)(object)current != (Object)(object)gun) { OnSwitchedAwayFromThisGun(); } } public virtual void OnSwitchedToThisGun() { } public virtual void OnSwitchedAwayFromThisGun() { } public virtual void OnReloadPressedSafe(PlayerController player, Gun gun, bool manualReload) { if (hasReloaded && gun.IsReloading) { OnReloadSafe(player, gun); hasReloaded = false; } } public virtual void OnReload(PlayerController player, Gun gun) { if (preventNormalReloadAudio) { AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject); if (!string.IsNullOrEmpty(overrideNormalReloadAudio)) { AkSoundEngine.PostEvent(overrideNormalReloadAudio, ((Component)this).gameObject); } } } public virtual void OnReloadEnded(PlayerController player, Gun gun) { if ((Object)(object)player != (Object)null) { OnReloadEndedSafe(player, gun); } } public virtual void OnReloadEndedSafe(PlayerController player, Gun gun) { } public virtual void OnReloadSafe(PlayerController player, Gun gun) { } public virtual void OnFinishAttack(PlayerController player, Gun gun) { } public virtual void OnPostFired(PlayerController player, Gun gun) { if (gun.IsHeroSword && HeroSwordCooldown == 0.5f) { OnHeroSwordCooldownStarted(player, gun); } } public virtual void OnHeroSwordCooldownStarted(PlayerController player, Gun gun) { if (usesOverrideHeroSwordCooldown) { HeroSwordCooldown = overrideHeroSwordCooldown; } } public virtual void OnAmmoChanged(PlayerController player, Gun gun) { if ((Object)(object)player != (Object)null) { OnAmmoChangedSafe(player, gun); } } public virtual void OnAmmoChangedSafe(PlayerController player, Gun gun) { } public virtual void OnBurstContinued(PlayerController player, Gun gun) { if ((Object)(object)player != (Object)null) { OnBurstContinuedSafe(player, gun); } } public virtual void OnBurstContinuedSafe(PlayerController player, Gun gun) { } public virtual Projectile OnPreFireProjectileModifier(Gun gun, Projectile projectile, ProjectileModule mod) { return projectile; } public virtual void OnPickup(GameActor owner) { if (owner is PlayerController) { OnPickedUpByPlayer((PlayerController)(object)((owner is PlayerController) ? owner : null)); } if (owner is AIActor) { OnPickedUpByEnemy((AIActor)(object)((owner is AIActor) ? owner : null)); } } public virtual void OnPostDrop(GameActor owner) { if (owner is PlayerController) { OnPostDroppedByPlayer((PlayerController)(object)((owner is PlayerController) ? owner : null)); } if (owner is AIActor) { OnPostDroppedByEnemy((AIActor)(object)((owner is AIActor) ? owner : null)); } } public virtual void OnPickedUpByPlayer(PlayerController player) { player.GunChanged += OnGunsChanged; } public virtual void OnPostDroppedByPlayer(PlayerController player) { } public virtual void OnPickedUpByEnemy(AIActor enemy) { } public virtual void OnPostDroppedByEnemy(AIActor enemy) { } } public class AdvancedGunBehavior : MonoBehaviour { private bool pickedUpLast = false; private PlayerController lastPlayer = null; public bool everPickedUpByPlayer = false; public Gun gun; private bool hasReloaded = true; public bool preventNormalFireAudio; public bool preventNormalReloadAudio; public string overrrideNormalFireAudio; public string overrideNormalReloadAudio; private static FieldInfo heroSwordCooldown = typeof(Gun).GetField("HeroSwordCooldown", BindingFlags.Instance | BindingFlags.NonPublic); public bool PickedUp => (Object)(object)gun.CurrentOwner != (Object)null; public PlayerController Player { get { if (gun.CurrentOwner is PlayerController) { GameActor currentOwner = gun.CurrentOwner; return (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); } return null; } } public float HeroSwordCooldown { get { if ((Object)(object)gun != (Object)null) { return (float)heroSwordCooldown.GetValue(gun); } return -1f; } set { if ((Object)(object)gun != (Object)null) { heroSwordCooldown.SetValue(gun, value); } } } public GameActor Owner => gun.CurrentOwner; public bool OwnerIsPlayer => (Object)(object)Player != (Object)null; public virtual void Update() { if ((Object)(object)Player != (Object)null) { lastPlayer = Player; if (!everPickedUpByPlayer) { everPickedUpByPlayer = true; } } if ((Object)(object)Player != (Object)null && !pickedUpLast) { OnPickup(Player); pickedUpLast = true; } if ((Object)(object)Player == (Object)null && pickedUpLast) { if ((Object)(object)lastPlayer != (Object)null) { OnPostDrop(lastPlayer); lastPlayer = null; } pickedUpLast = false; } if ((Object)(object)gun != (Object)null && !gun.IsReloading && !hasReloaded) { hasReloaded = true; } gun.PreventNormalFireAudio = preventNormalFireAudio; gun.OverrideNormalFireAudioEvent = overrrideNormalFireAudio; } public virtual void Start() { gun = ((Component)this).GetComponent(); Gun val = gun; val.OnInitializedWithOwner = (Action)Delegate.Combine(val.OnInitializedWithOwner, new Action(OnInitializedWithOwner)); Gun val2 = gun; val2.PostProcessProjectile = (Action)Delegate.Combine(val2.PostProcessProjectile, new Action(PostProcessProjectile)); Gun val3 = gun; val3.PostProcessVolley = (Action)Delegate.Combine(val3.PostProcessVolley, new Action(PostProcessVolley)); Gun val4 = gun; val4.OnDropped = (Action)Delegate.Combine(val4.OnDropped, new Action(OnDropped)); Gun val5 = gun; val5.OnAutoReload = (Action)Delegate.Combine(val5.OnAutoReload, new Action(OnAutoReload)); Gun val6 = gun; val6.OnReloadPressed = (Action)Delegate.Combine(val6.OnReloadPressed, new Action(OnReloadPressed)); Gun val7 = gun; val7.OnFinishAttack = (Action)Delegate.Combine(val7.OnFinishAttack, new Action(OnFinishAttack)); Gun val8 = gun; val8.OnPostFired = (Action)Delegate.Combine(val8.OnPostFired, new Action(OnPostFired)); Gun val9 = gun; val9.OnAmmoChanged = (Action)Delegate.Combine(val9.OnAmmoChanged, new Action(OnAmmoChanged)); Gun val10 = gun; val10.OnBurstContinued = (Action)Delegate.Combine(val10.OnBurstContinued, new Action(OnBurstContinued)); Gun val11 = gun; val11.OnPreFireProjectileModifier = (Func)Delegate.Combine(val11.OnPreFireProjectileModifier, new Func(OnPreFireProjectileModifier)); Gun val12 = gun; } public virtual void OnInitializedWithOwner(GameActor actor) { } public virtual void PostProcessProjectile(Projectile projectile) { } public virtual void PostProcessVolley(ProjectileVolleyData volley) { } public virtual void OnDropped() { } public virtual void OnAutoReload(PlayerController player, Gun gun) { } public virtual void OnReloadPressed(PlayerController player, Gun gun, bool bSOMETHING) { if (hasReloaded) { OnReload(player, gun); hasReloaded = false; } } public virtual void OnReload(PlayerController player, Gun gun) { if (preventNormalReloadAudio) { AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject); if (!string.IsNullOrEmpty(overrideNormalReloadAudio)) { AkSoundEngine.PostEvent(overrideNormalReloadAudio, ((Component)this).gameObject); } } } public virtual void OnFinishAttack(PlayerController player, Gun gun) { } public virtual void OnPostFired(PlayerController player, Gun gun) { if (gun.IsHeroSword && (float)heroSwordCooldown.GetValue(gun) == 0.5f) { OnHeroSwordCooldownStarted(player, gun); } } public virtual void OnHeroSwordCooldownStarted(PlayerController player, Gun gun) { } public virtual void OnAmmoChanged(PlayerController player, Gun gun) { } public virtual void OnBurstContinued(PlayerController player, Gun gun) { } public virtual Projectile OnPreFireProjectileModifier(Gun gun, Projectile projectile, ProjectileModule mod) { return projectile; } public virtual void OnPickup(PlayerController player) { } public virtual void OnPostDrop(PlayerController player) { } } public class ModularPrime : AIActor { public class ModularPrimeController : BraveBehaviour { private ParticleSystem smokeObject; public bool Phase2 = false; public Vector3 predictedPosition = new Vector3(-69f, -69f); private CameraController cam; public bool Stop = false; public GameObject extantHand; private void Start() { smokeObject = Object.Instantiate(CrateSpawnController.SmokeObject).GetComponent(); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth = ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.GetMaxHealth() * 0.5f; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { }; tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)((BraveBehaviour)this).aiActor).spriteAnimator; spriteAnimator.AnimationEventTriggered = (Action)Delegate.Combine(spriteAnimator.AnimationEventTriggered, new Action(AnimationEventTriggered)); GenericIntroDoer component = ((Component)((BraveBehaviour)this).aiActor).GetComponent(); component.OnIntroFinished = (Action)Delegate.Combine(component.OnIntroFinished, new Action(OnIntroFinished)); } public void ResetPredictedPos() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) predictedPosition = new Vector3(-69f, -69f); } public void OnIntroFinished() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) cam = GameManager.Instance.MainCameraController; cam.StopTrackingPlayer(); cam.SetManualControl(true, true); cam.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter); cam.OverrideRecoverySpeed = 10f; cam.OverrideZoomScale = 0.75f; } public void AlterAttackProbability(string Name, float Probability) { for (int i = 0; i < ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator.AttackBehaviors.Count; i++) { if (!(((BraveBehaviour)this).behaviorSpeculator.AttackBehaviors[i] is AttackBehaviorGroup) || ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviors[i] == null) { continue; } int num = 0; while (true) { int num2 = num; AttackBehaviorBase obj = ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviors[i]; if (num2 >= ((AttackBehaviorGroup)((obj is AttackBehaviorGroup) ? obj : null)).AttackBehaviors.Count) { break; } AttackBehaviorBase obj2 = ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviors[i]; AttackGroupItem val = ((AttackBehaviorGroup)((obj2 is AttackBehaviorGroup) ? obj2 : null)).AttackBehaviors[num]; if (((BraveBehaviour)this).behaviorSpeculator.AttackBehaviors[i] is AttackBehaviorGroup && val.NickName.Contains(Name)) { val.Probability = Probability; } num++; } } } private void AnimationEventTriggered(tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip, int frameIdx) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) if (clip.GetFrame(frameIdx).eventInfo.Contains("blueflash")) { AkSoundEngine.PostEvent("Play_BOSS_RatPunchout_Flash_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); float facingDirection = ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.FacingDirection; GameObject val = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, facingDirection)); val.GetComponent().PlayAndDestroyObject("flash_blue", (Action)null); val.transform.parent = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("Unoccluded")); } if (clip.GetFrame(frameIdx).eventInfo.Contains("redflash")) { AkSoundEngine.PostEvent("Play_BOSS_RatPunchout_Player_Charge_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); float facingDirection2 = ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.FacingDirection; GameObject val2 = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, facingDirection2)); val2.GetComponent().PlayAndDestroyObject("flash_red", (Action)null); val2.transform.parent = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; GameObjectExtensions.SetLayerRecursively(val2, LayerMask.NameToLayer("Unoccluded")); } if (clip.GetFrame(frameIdx).eventInfo.Contains("wtfflash")) { AkSoundEngine.PostEvent("Play_BOSS_RatPunchout_Revive_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); float facingDirection3 = ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.FacingDirection; GameObject val3 = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, facingDirection3)); val3.GetComponent().PlayAndDestroyObject("flash_piss", (Action)null); val3.transform.parent = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; GameObjectExtensions.SetLayerRecursively(val3, LayerMask.NameToLayer("Unoccluded")); } if (!clip.GetFrame(frameIdx).eventInfo.Contains("parried")) { return; } AkSoundEngine.PostEvent("Play_ENM_electric_charge_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); PickupObject byId = PickupObjectDatabase.GetById(443); GameObject val4 = Object.Instantiate(((TargetedAttackPlayerItem)((byId is TargetedAttackPlayerItem) ? byId : null)).strikeExplosionData.effect, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter), Quaternion.identity); Object.Destroy((Object)(object)val4, 7f); ((BraveBehaviour)this).healthHaver.ApplyDamage(10f, TransformExtensions.PositionVector2(((BraveBehaviour)((BraveBehaviour)this).aiActor.TargetRigidbody).transform), "owie :(", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); for (int i = 0; i < 12; i++) { PickupObject byId2 = PickupObjectDatabase.GetById(156); GameObject val5 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter + new Vector2(Random.Range(1.25f, -1.25f), Random.Range(0.625f, -0.625f))), Quaternion.identity); tk2dBaseSprite component = val5.GetComponent(); component.PlaceAtPositionByAnchor(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter + new Vector2(Random.Range(1.25f, -1.25f), Random.Range(0.625f, -1.25f))), (Anchor)4); component.HeightOffGround = 35f; component.UpdateZDepth(); tk2dSpriteAnimator component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.ignoreTimeScale = true; component2.AlwaysIgnoreTimeScale = true; component2.AnimateDuringBossIntros = true; component2.alwaysUpdateOffscreen = true; component2.playAutomatically = true; } Object.Destroy((Object)(object)val5, 4f); } } public Vector3 CenteredCameraPosition() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) return Vector3.Lerp((predictedPosition != new Vector3(-69f, -69f)) ? predictedPosition : ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform.position, ((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform.position, 0.5f); } public void Update() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023d: 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_0260: 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_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)cam) && !Stop) { cam.OverridePosition = CenteredCameraPosition(); } if (((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.GetCurrentHealth() == ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth && !Phase2) { BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator; behaviorSpeculator.LocalTimeScale *= 1.0125f; TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 3f, "{wq}KEEP FIGHTING.{w}", "golem", false, (BoxSlideOrientation)1, false, false); Phase2 = true; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth = 1f; AlterAttackProbability("You_Cant_Escape!", 0f); AlterAttackProbability("You_Cant_Escape_Upgrade", 1.1f); AlterAttackProbability("Jump_Crash", 0f); AlterAttackProbability("Jump_Crash_Upgrade", 0.7f); AlterAttackProbability("BE-GONE", 0f); AlterAttackProbability("BE-GONE_Upgrade", 0.6f); } if (Phase2 && ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.GetCurrentHealthPercentage() * 2f < Random.value / 2f) { tk2dBaseSprite component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component) && !GameManager.Instance.IsPaused && Random.value > 0.5f) { Vector3 val = Vector2Extensions.ToVector3ZisY(component.WorldBottomLeft, 0f); Vector3 val2 = Vector2Extensions.ToVector3ZisY(component.WorldTopRight, 0f); Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(Random.Range(val.x, val2.x), Random.Range(val.y, val2.y), Random.Range(val.z, val2.z)); ParticleSystem val3 = smokeObject; TrailModule trails = val3.trails; ((TrailModule)(ref trails)).worldSpace = false; MainModule main = val3.main; EmitParams val4 = default(EmitParams); ((EmitParams)(ref val4)).position = position; ((EmitParams)(ref val4)).randomSeed = (uint)Random.Range(1, 1000); EmitParams val5 = val4; EmissionModule emission = val3.emission; ((EmissionModule)(ref emission)).enabled = false; ((Component)val3).gameObject.SetActive(true); val3.Emit(val5, 1); } } if (((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.GetCurrentHealth() == 1f && Phase2 && !Stop) { GlobalMessageRadio.BroadcastMessage("LANDYOUFUCK"); Stop = true; AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)this).gameObject); ((BraveBehaviour)this).behaviorSpeculator.InterruptAndDisable(); AkSoundEngine.PostEvent("Play_ENM_electric_charge_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); PickupObject byId = PickupObjectDatabase.GetById(443); GameObject val6 = Object.Instantiate(((TargetedAttackPlayerItem)((byId is TargetedAttackPlayerItem) ? byId : null)).strikeExplosionData.effect, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter), Quaternion.identity); Object.Destroy((Object)(object)val6, 7f); ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.EndAnimation(); ((Behaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator).enabled = false; ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoDeath()); } } public IEnumerator DoDeath() { GameManager.Instance.PreventPausing = true; GameUIRoot.Instance.ToggleLowerPanels(false, false, string.Empty); Minimap.Instance.ToggleMinimap(false, false); GameManager.IsBossIntro = true; GameUIBossHealthController gameUIBossHealthController = GameUIRoot.Instance.bossController; gameUIBossHealthController.DisableBossHealth(); GameUIRoot.Instance.HideCoreUI("PainAndAgony"); ((BraveBehaviour)this).aiActor.ParentRoom.BecomeTerrifyingDarkRoom(2f, 0.4f, 0.1f, (string)null); StaticReferenceManager.DestroyAllEnemyProjectiles(); GlobalMessageRadio.BroadcastMessage("ClearLaserPointers"); ((BraveBehaviour)this).spriteAnimator.Play("death_1"); float e2 = 0f; while (e2 < 1.25f) { e2 += BraveTime.DeltaTime; yield return null; } CameraController m_camera = GameManager.Instance.MainCameraController; m_camera.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter); m_camera.OverrideRecoverySpeed = 10f; for (int k = 0; k < GameManager.Instance.AllPlayers.Length; k++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[k])) { GameManager.Instance.AllPlayers[k].SetInputOverride("BossIntro"); } } ((BraveBehaviour)this).aiActor.ParentRoom.BecomeTerrifyingDarkRoom(5f, 0.1f, 0.35f, (string)null); m_camera.OverrideZoomScale = 1.125f; Minimap.Instance.TemporarilyPreventMinimap = true; e2 = 0f; while (e2 < 1.5f) { e2 += BraveTime.DeltaTime; yield return null; } e2 = 0f; while (e2 < 1.5f) { e2 += BraveTime.DeltaTime; yield return null; } TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 2.5f, "{wj}AH.{w}", "golem", false, (BoxSlideOrientation)1, true, false); e2 = 0f; while (e2 < 3.25f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e2 = 25f; TextBoxManager.ClearTextBox(((BraveBehaviour)this).transform); } e2 += BraveTime.DeltaTime; yield return null; } TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 3.5f, "{wj}YOU ARE STRONGER THAN YOU LOOK.{w}", "golem", false, (BoxSlideOrientation)1, true, false); e2 = 0f; while (e2 < 5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e2 = 25f; TextBoxManager.ClearTextBox(((BraveBehaviour)this).transform); } e2 += BraveTime.DeltaTime; yield return null; } TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 3f, "{wj}...{w}", "golem", false, (BoxSlideOrientation)1, true, false); e2 = 0f; while (e2 < 3.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e2 = 25f; TextBoxManager.ClearTextBox(((BraveBehaviour)this).transform); } e2 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)this).spriteAnimator.Play("death_2"); TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 3f, "{wj}YOU'VE EARNED YOUR FREEDOM TO ME.{w}", "golem", false, (BoxSlideOrientation)1, true, false); e2 = 0f; while (e2 < 3.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e2 = 25f; TextBoxManager.ClearTextBox(((BraveBehaviour)this).transform); } e2 += BraveTime.DeltaTime; yield return null; } TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 3f, "{wj}GO.{w}", "golem", false, (BoxSlideOrientation)1, true, false); e2 = 0f; while (e2 < 5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e2 = 25f; TextBoxManager.ClearTextBox(((BraveBehaviour)this).transform); } e2 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)this).spriteAnimator.Play("death_3"); Pixelator.Instance.FadeToColor(5f, Color.white, false, 0f); TextBoxManager.ShowTextBox(((BraveBehaviour)this).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)this).transform, 4f, "IT WAS AN HONOR TO PROVE YOU.", "golem", false, (BoxSlideOrientation)1, true, false); e2 = 0f; while (e2 < 5.5f) { e2 += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if ((Object)(object)player.PlayerHasCore() != (Object)null && player.IsUsingAlternateCostume) { AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.PAST_ALT_SKIN, value: true); GameStatsManager.Instance.SetCharacterSpecificFlag(ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", Module.Modular_Character_Data.nameShort), (CharacterSpecificGungeonFlags)1001, true); } } GameStatsManager.Instance.SetCharacterSpecificFlag(ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", Module.Modular_Character_Data.nameShort), (CharacterSpecificGungeonFlags)1000, true); for (int i = 0; i < ((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries.Count; i++) { if (((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries[i].journalData.PrimaryDisplayName == "#MODULARPRIME_NAME_DESC") { GameStatsManager.Instance.HandleEncounteredObjectRaw(((AssetBundleDatabaseEntry)((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries[i]).myGuid); } } GameObject bom = new GameObject(); StaticReferences.customObjects.TryGetValue("DeadCorpseMDLR", out bom); DungeonPlaceableUtility.InstantiateDungeonPlaceable(bom, ((DungeonPlaceableBehaviour)((BraveBehaviour)this).aiActor).GetAbsoluteParentRoom(), new IntVector2((int)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter.x, (int)((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter.y) - ((DungeonPlaceableBehaviour)((BraveBehaviour)this).aiActor).GetAbsoluteParentRoom().area.basePosition, false, (AwakenAnimationType)0, false); SpaceShiptrigger.AllowedToLeave = true; GlobalMessageRadio.BroadcastMessage("PastWin"); Pixelator.Instance.FadeToColor(2f, Color.white, true, 1f); TransformExtensions.PositionVector2(((Component)((BraveBehaviour)this).aiActor).gameObject.transform); e2 = 0f; Object.Destroy((Object)(object)((Component)((BraveBehaviour)this).aiActor).gameObject); while (e2 < 5f) { e2 += BraveTime.DeltaTime; yield return null; } if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.PAST)) { Toolbox.NotifyCustom("You Unlocked:", "Light Lance", StaticCollections.Gun_Collection.GetSpriteIdByName("coollance_idle_001"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.PAST, value: true); GameManager.IsBossIntro = false; for (int j = 0; j < GameManager.Instance.AllPlayers.Length; j++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[j])) { GameManager.Instance.AllPlayers[j].ImmuneToPits = new OverridableBool(true); GameManager.Instance.AllPlayers[j].ClearInputOverride("BossIntro"); } } GameManager.Instance.PreventPausing = false; m_camera.SetManualControl(false, true); m_camera.StartTrackingPlayer(); m_camera.OverrideZoomScale = 0.85f; GameManager.Instance.MainCameraController.ForceUpdateControllerCameraState((ControllerCameraState)0); } } public class Slow_Orb : Script { public class Slorb : Bullet { public Slorb() : base("big", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(4f, (SpeedType)0), 180); base.Projectile.IgnoreTileCollisionsFor(120f); for (int i = 0; i < 5; i++) { yield return ((Bullet)this).Wait(90); ((Bullet)this).PostWwiseEvent("Play_BOSS_dragun_shot_02", (string)null); for (int e = 0; e < 6; e++) { ((Bullet)this).Fire(new Direction((float)(60 * e), (DirectionType)0, -1f), new Speed(9f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 6f, 180, -1, false)); } } ((Bullet)this).ChangeSpeed(new Speed(0f, (SpeedType)0), 45); yield return ((Bullet)this).Wait(75); ((Bullet)this).PostWwiseEvent("Play_BOSS_dragun_rocket_01", (string)null); for (int e2 = 0; e2 < 24; e2++) { ((Bullet)this).Fire(new Direction((float)(15 * e2), (DirectionType)1, -1f), new Speed(9f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 6f, 180, -1, false)); } ((Bullet)this).Vanish(false); } } public class Slorb_2 : Bullet { public Slorb_2() : base("big", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(4f, (SpeedType)0), 120); base.Projectile.IgnoreTileCollisionsFor(120f); for (int i = 0; i < 7; i++) { yield return ((Bullet)this).Wait(75); ((Bullet)this).PostWwiseEvent("Play_BOSS_dragun_shot_02", (string)null); for (int e = 0; e < 8; e++) { ((Bullet)this).Fire(new Direction((float)(45 * e), (DirectionType)1, -1f), new Speed(11f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 3f, 180, -1, false)); } } ((Bullet)this).ChangeSpeed(new Speed(0f, (SpeedType)0), 45); yield return ((Bullet)this).Wait(75); ((Bullet)this).PostWwiseEvent("Play_BOSS_dragun_rocket_01", (string)null); for (int e2 = 0; e2 < 24; e2++) { ((Bullet)this).Fire(new Direction((float)(15 * e2), (DirectionType)1, -1f), new Speed(9f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 11f, 180, -1, false)); ((Bullet)this).Fire(new Direction((float)(15 * e2) + 7.5f, (DirectionType)1, -1f), new Speed(1f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 7f, 180, -1, false)); } ((Bullet)this).Vanish(false); } } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_wpn_chargelaser_shot_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_wpn_chargelaser_shot_01", (string)null); bool fire = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().Phase2; Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter, 0.5f * ConfigManager.DistortionWaveMultiplier, 5f * ConfigManager.DistortionWaveMultiplier, 50f, 1f); GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter - new Vector2(2.5f, 0f)), Quaternion.Euler(0f, 0f, 0f)); onj.GetComponent().PlayAndDestroyObject("punch_blast", (Action)null); if (fire) { ((Bullet)this).Fire(new Direction(0f, (DirectionType)0, -1f), new Speed(1f, (SpeedType)0), (Bullet)(object)new Slorb_2()); } else { ((Bullet)this).Fire(new Direction(0f, (DirectionType)0, -1f), new Speed(1f, (SpeedType)0), (Bullet)(object)new Slorb()); } yield return null; } } public class Ultrakill : Script { public class Fuck : Bullet { public Fuck() : base("default", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(19f, (SpeedType)0), 90); base.Projectile.IgnoreTileCollisionsFor(120f); yield break; } } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Stomp_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Stomp_01", (string)null); Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter, 2f * ConfigManager.DistortionWaveMultiplier, 1f * ConfigManager.DistortionWaveMultiplier, 50f, 1f); GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter - new Vector2(2.5f, 0f)), Quaternion.Euler(0f, 0f, 0f)); onj.GetComponent().PlayAndDestroyObject("punch_blast", (Action)null); onj.transform.parent = ((BraveBehaviour)((Bullet)this).BulletBank).transform; for (int i = 0; i < 60; i++) { ((Bullet)this).Fire(new Direction((float)(6 * i), (DirectionType)1, -1f), new Speed(5f, (SpeedType)0), (Bullet)(object)new Fuck()); ((Bullet)this).Fire(new Direction((float)(6 * i), (DirectionType)1, -1f), new Speed(6f, (SpeedType)0), (Bullet)(object)new Fuck()); ((Bullet)this).Fire(new Direction((float)(6 * i), (DirectionType)1, -1f), new Speed(7f, (SpeedType)0), (Bullet)(object)new Fuck()); } yield return null; } } public class Interrupt : Script { public override IEnumerator Top() { for (int i = 0; i < (((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().Phase2 ? 20 : 8); i++) { ((Bullet)this).Fire(new Direction(((Bullet)this).RandomAngle(), (DirectionType)1, -1f), new Speed(7f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 12f, Random.Range(45, 180), -1, false)); } yield return null; } } public class Baboomer : Script { public override IEnumerator Top() { for (int i = 0; i < 16; i++) { ((Bullet)this).Fire(new Direction(22.5f * (float)i, (DirectionType)1, -1f), new Speed(14f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 9f, 60, -1, false)); ((Bullet)this).Fire(new Direction(22.5f * (float)i + 11.25f, (DirectionType)1, -1f), new Speed(12f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 9f, 60, -1, false)); ((Bullet)this).Fire(new Direction(22.5f * (float)i, (DirectionType)1, -1f), new Speed(9f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 9f, 60, -1, false)); } yield return null; } } public class Baboomer_Small : Script { public class Fucky : Bullet { public Fucky() : base("default", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(1f, (SpeedType)0), 75); yield return ((Bullet)this).Wait(270); ((Bullet)this).Vanish(false); } } public override IEnumerator Top() { bool fire = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().Phase2; for (int j = 0; j < 12; j++) { ((Bullet)this).Fire(new Direction(30f * (float)j, (DirectionType)1, -1f), new Speed(12f, (SpeedType)0), (Bullet)new SpeedChangingBullet("default", 10f, 60, -1, false)); ((Bullet)this).Fire(new Direction(30f * (float)j + 15f, (DirectionType)1, -1f), new Speed(6f, (SpeedType)0), (Bullet)new SpeedChangingBullet("default", 10f, 60, -1, false)); } if (fire) { for (int i = 0; i < 24; i++) { ((Bullet)this).Fire(new Direction(15f * (float)i, (DirectionType)1, -1f), new Speed(14f, (SpeedType)0), (Bullet)(object)new Fucky()); } } yield return null; } } public class Lunge : Script { public class LingeringBullet : Bullet { private int Length; public LingeringBullet(int p) : base("poundSmall", false, false, false) { Length = p; } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(0f, (SpeedType)0), 60); yield return ((Bullet)this).Wait(Length); ((Bullet)this).Vanish(false); } } public override IEnumerator Top() { bool fire = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().Phase2; ((Bullet)this).PostWwiseEvent("Play_BOSS_lichC_zap_01", (string)null); float face = ((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection; GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, face)); onj.GetComponent().PlayAndDestroyObject("lunge", (Action)null); onj.transform.parent = ((BraveBehaviour)((Bullet)this).BulletBank).transform; for (int i = -1; i < 2; i++) { ((Bullet)this).Fire(new Direction(face + (float)(i * 5), (DirectionType)0, -1f), new Speed(4f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 30f, 120, -1, false)); if (fire) { ((Bullet)this).Fire(new Direction(face + (float)(i * 10), (DirectionType)0, -1f), new Speed(2f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 30f, 240, -1, false)); ((Bullet)this).Fire(new Direction(face + (float)(i * 15), (DirectionType)0, -1f), new Speed(1f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 30f, 360, -1, false)); } } while (!((Bullet)this).IsEnded || !((Bullet)this).Destroyed) { if (fire) { ((Bullet)this).Fire(new Direction(((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection + 150f, (DirectionType)1, -1f), new Speed(5f, (SpeedType)0), (Bullet)(object)new LingeringBullet(fire ? 450 : 150)); ((Bullet)this).Fire(new Direction(((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection - 150f, (DirectionType)1, -1f), new Speed(5f, (SpeedType)0), (Bullet)(object)new LingeringBullet(fire ? 450 : 150)); } else { ((Bullet)this).Fire(new Direction(0f, (DirectionType)1, -1f), new Speed(0f, (SpeedType)0), (Bullet)(object)new LingeringBullet(fire ? 450 : 150)); } yield return ((Bullet)this).Wait(1); } yield return null; } } public class You_Cant_Escape : Script { public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_WPN_beam_slash_01", (string)null); float face = ((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection; GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, face)); onj.GetComponent().PlayAndDestroyObject("punch", (Action)null); onj.transform.parent = ((BraveBehaviour)((Bullet)this).BulletBank).transform; for (int i = -3; i < 4; i++) { ((Bullet)this).Fire(new Direction(face + (float)(i * 10), (DirectionType)1, -1f), new Speed(7f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 20f, 60, -1, false)); ((Bullet)this).Fire(new Direction(face + (float)(i * 3), (DirectionType)1, -1f), new Speed(3f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 20f, 150, -1, false)); } yield return null; } } public class You_Cant_Escape_Weak : Script { public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_WPN_beam_slash_01", (string)null); float face = ((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection; GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, face)); onj.GetComponent().PlayAndDestroyObject("punch", (Action)null); onj.transform.parent = ((BraveBehaviour)((Bullet)this).BulletBank).transform; for (int i = -7; i < 8; i++) { ((Bullet)this).Fire(new Direction(face + (float)(i * 8), (DirectionType)1, -1f), new Speed(4f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 20f, 120, -1, false)); } yield return null; } } public class You_Cant_Escape_Weak_Upgrade : Script { public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_WPN_beam_slash_01", (string)null); float face = ((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection; GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, face)); onj.GetComponent().PlayAndDestroyObject("punch", (Action)null); onj.transform.parent = ((BraveBehaviour)((Bullet)this).BulletBank).transform; for (int i = 0; i < 12; i++) { ((Bullet)this).Fire(new Direction(30f * (float)i, (DirectionType)1, -1f), new Speed(2f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 30f, 300, -1, false)); ((Bullet)this).Fire(new Direction(30f * (float)i, (DirectionType)1, -1f), new Speed(2.75f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 30f, 300, -1, false)); ((Bullet)this).Fire(new Direction(30f * (float)i, (DirectionType)1, -1f), new Speed(3.5f, (SpeedType)0), (Bullet)new SpeedChangingBullet("TurretBurst", 30f, 300, -1, false)); } yield return null; } } public class Punch : Script { public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Stomp_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Stomp_01", (string)null); Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter, 3f * ConfigManager.DistortionWaveMultiplier, 0.125f * ConfigManager.DistortionWaveMultiplier, 30f, 1.33f); GameObject onj = Object.Instantiate(VFXObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter - new Vector2(2.5f, 0f)), Quaternion.Euler(0f, 0f, 0f)); onj.GetComponent().PlayAndDestroyObject("punch_blast", (Action)null); onj.transform.parent = ((BraveBehaviour)((Bullet)this).BulletBank).transform; for (int i = 0; i < 24; i++) { ((Bullet)this).Fire(new Direction((float)(15 * i), (DirectionType)1, -1f), new Speed(16f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 10f, 60, -1, false)); ((Bullet)this).Fire(new Direction((float)(15 * i) + 7.5f, (DirectionType)1, -1f), new Speed(14f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 10f, 60, -1, false)); } yield return null; } } public class BigBeam : Script { public class BurstBullet : Bullet { private Vector2 m_addtionalVelocity; public BurstBullet(Vector2 additionalVelocity) : base("burst", false, false, false) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) m_addtionalVelocity = additionalVelocity; } public override IEnumerator Top() { ((Bullet)this).ManualControl = true; for (int i = 0; i < 300; i++) { ((Bullet)this).UpdateVelocity(); base.Velocity += m_addtionalVelocity * Mathf.Min(9f, (float)i / 30f); ((Bullet)this).UpdatePosition(); yield return ((Bullet)this).Wait(1); } ((Bullet)this).Vanish(false); } } public ModularPrimeController controll; public void OnRecieved(GameObject s, string a) { Object.Destroy((Object)(object)s); } public Vector2 FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) return ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldCenter; } public override IEnumerator Top() { controll = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent(); Dictionary shitter = new Dictionary(); for (int i = -1; i < 2; i++) { GameObject gameObject = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component2 = gameObject.GetComponent(); ((BraveBehaviour)component2).transform.position = Vector2.op_Implicit(((Bullet)this).Position); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, ((Bullet)this).AimDirection); component2.dimensions = new Vector2(1000f, 1f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((tk2dBaseSprite)component2).HeightOffGround = -1f; ((Component)component2).gameObject.layer = 21; ((tk2dBaseSprite)component2).ShouldDoTilt = false; ((tk2dBaseSprite)component2).IsPerpendicular = false; Color laser = Color.green; ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 20f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", laser); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", laser); GlobalMessageRadio.RegisterObjectToRadio(gameObject, new List { "ClearLaserPointers" }, OnRecieved); shitter.Add(i, component2); } AkSoundEngine.PostEvent("Play_ENM_hammer_target_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_BOSS_omegaBeam_charge_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); float e = 0f; Quaternion localRotation; while (e < 2f) { if (((Bullet)this).IsEnded || ((Bullet)this).Destroyed || controll.Stop) { foreach (KeyValuePair item in shitter) { Object.Destroy((Object)(object)((Component)item.Value).gameObject); } yield break; } foreach (KeyValuePair entry in shitter) { float delta2 = ((Bullet)this).AimDirection; localRotation = ((BraveBehaviour)entry.Value).transform.localRotation; delta2 = Mathf.MoveTowardsAngle(BraveMathCollege.ClampAngle360(((Quaternion)(ref localRotation)).eulerAngles.z), delta2, 1.2f); ((tk2dBaseSprite)entry.Value).ShouldDoTilt = false; entry.Value.dimensions = new Vector2(1000f, 1f); ((BraveBehaviour)entry.Value).renderer.material.SetFloat("_EmissivePower", 10f * e); ((BraveBehaviour)entry.Value).renderer.material.SetFloat("_EmissiveColorPower", 25f * e); ((tk2dBaseSprite)entry.Value).IsPerpendicular = false; ((Component)entry.Value).gameObject.transform.position = Vector2.op_Implicit(Vector2.Lerp(FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou(), FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou() + Toolbox.GetUnitOnCircle(delta2 + (float)(90 * entry.Key), (entry.Key == 0) ? 0f : (1.5f * Mathf.Min(e * 0.66f, 1f))), Toolbox.SinLerpTValue(Mathf.Min(e * 0.625f, 1f)))); if ((double)e > 1.375) { bool enabled = e % 0.2f > 0.1f; ((BraveBehaviour)entry.Value).renderer.enabled = enabled; } if (e < 1.625f) { ((Component)entry.Value).gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, delta2); } } e += BraveTime.DeltaTime; yield return ((Bullet)this).Wait(1); } localRotation = ((BraveBehaviour)shitter[0]).transform.localRotation; float angle = ((Quaternion)(ref localRotation)).eulerAngles.z; foreach (KeyValuePair item2 in shitter) { Object.Destroy((Object)(object)((Component)item2.Value).gameObject); } Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter, 1f * ConfigManager.DistortionWaveMultiplier, 5f * ConfigManager.DistortionWaveMultiplier, 50f, 0.75f); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); GameObject spawnedBulletOBJ = SpawnManager.SpawnProjectile(((Component)SteelPanopticon.MegaFuckingLaser).gameObject, Vector2.op_Implicit(FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou()), Quaternion.Euler(0f, 0f, angle), true); Projectile component = spawnedBulletOBJ.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)((BraveBehaviour)((Bullet)this).BulletBank).aiActor; component.Shooter = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).specRigidbody; component.IgnoreTileCollisionsFor(120f); component.baseData.speed = 100f; component.UpdateSpeed(); component.baseData.range = 150f; component.BulletScriptSettings = new BulletScriptSettings { surviveRigidbodyCollisions = true, preventPooling = true }; ((BraveBehaviour)component).specRigidbody.CollideWithTileMap = false; component.collidesWithEnemies = false; component.collidesWithPlayer = true; component.RuntimeUpdateScale(1.6f); } float floatDirection = angle; float startDirection = ((Bullet)this).RandomAngle(); Vector2 floatVelocity = BraveMathCollege.DegreesToVector(floatDirection, 3f); for (int j = 0; j < 12; j++) { ((Bullet)this).Fire(new Direction(((Bullet)this).SubdivideCircle(startDirection, 12, j, 1f, false), (DirectionType)1, -1f), new Speed(5f, (SpeedType)0), (Bullet)(object)new BurstBullet(floatVelocity)); ((Bullet)this).Fire(new Direction(((Bullet)this).SubdivideCircle(startDirection, 12, j, 1f, false), (DirectionType)1, -1f), new Speed(9f, (SpeedType)0), (Bullet)(object)new BurstBullet(floatVelocity)); } } } public class BigBeam_But_Even_Faster : Script { public class BurstBullet : Bullet { private Vector2 m_addtionalVelocity; public BurstBullet(Vector2 additionalVelocity) : base("burst", false, false, false) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) m_addtionalVelocity = additionalVelocity; } public override IEnumerator Top() { ((Bullet)this).ManualControl = true; for (int i = 0; i < 300; i++) { ((Bullet)this).UpdateVelocity(); base.Velocity += m_addtionalVelocity * Mathf.Min(9f, (float)i / 30f); ((Bullet)this).UpdatePosition(); yield return ((Bullet)this).Wait(1); } ((Bullet)this).Vanish(false); } } public ModularPrimeController controll; public void OnRecieved(GameObject s, string a) { Object.Destroy((Object)(object)s); } public Vector2 FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) return ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldCenter; } public override IEnumerator Top() { controll = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent(); Dictionary shitter = new Dictionary(); for (int i = -1; i < 2; i++) { GameObject gameObject = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component2 = gameObject.GetComponent(); ((BraveBehaviour)component2).transform.position = Vector2.op_Implicit(((Bullet)this).Position); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, ((Bullet)this).AimDirection); component2.dimensions = new Vector2(1000f, 1f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((tk2dBaseSprite)component2).HeightOffGround = -1f; ((Component)component2).gameObject.layer = 21; ((tk2dBaseSprite)component2).ShouldDoTilt = false; ((tk2dBaseSprite)component2).IsPerpendicular = false; Color laser = Color.green; ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 20f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", laser); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", laser); GlobalMessageRadio.RegisterObjectToRadio(gameObject, new List { "ClearLaserPointers" }, OnRecieved); shitter.Add(i, component2); } AkSoundEngine.PostEvent("Play_ENM_hammer_target_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_BOSS_omegaBeam_charge_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); float e = 0f; Quaternion localRotation; while (e < 2f) { if (((Bullet)this).IsEnded || ((Bullet)this).Destroyed || controll.Stop) { foreach (KeyValuePair item in shitter) { Object.Destroy((Object)(object)((Component)item.Value).gameObject); } yield break; } foreach (KeyValuePair entry in shitter) { float delta2 = ((Bullet)this).AimDirection; localRotation = ((BraveBehaviour)entry.Value).transform.localRotation; delta2 = Mathf.MoveTowardsAngle(BraveMathCollege.ClampAngle360(((Quaternion)(ref localRotation)).eulerAngles.z), delta2, 1.3f); ((tk2dBaseSprite)entry.Value).ShouldDoTilt = false; entry.Value.dimensions = new Vector2(1000f, 1f); ((BraveBehaviour)entry.Value).renderer.material.SetFloat("_EmissivePower", 10f * e); ((BraveBehaviour)entry.Value).renderer.material.SetFloat("_EmissiveColorPower", 25f * e); ((tk2dBaseSprite)entry.Value).IsPerpendicular = false; ((Component)entry.Value).gameObject.transform.position = Vector2.op_Implicit(Vector2.Lerp(FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou(), FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou() + Toolbox.GetUnitOnCircle(delta2 + (float)(90 * entry.Key), (entry.Key == 0) ? 0f : (1.5f * Mathf.Min(e * 0.66f, 1f))), Toolbox.SinLerpTValue(Mathf.Min(e * 0.66f, 1f)))); if (e > 1.5f) { bool enabled = e % 0.2f > 0.1f; ((BraveBehaviour)entry.Value).renderer.enabled = enabled; } if (e < 1.625f) { ((Component)entry.Value).gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, delta2); } } e += BraveTime.DeltaTime; yield return ((Bullet)this).Wait(1); } localRotation = ((BraveBehaviour)shitter[0]).transform.localRotation; float angle = ((Quaternion)(ref localRotation)).eulerAngles.z; foreach (KeyValuePair item2 in shitter) { Object.Destroy((Object)(object)((Component)item2.Value).gameObject); } Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator).sprite.WorldCenter, 5f * ConfigManager.DistortionWaveMultiplier, 0.05f * ConfigManager.DistortionWaveMultiplier, 50f, 0.25f); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); GameObject spawnedBulletOBJ = SpawnManager.SpawnProjectile(((Component)SteelPanopticon.MegaFuckingLaser).gameObject, Vector2.op_Implicit(FuckYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYouIHateYou()), Quaternion.Euler(0f, 0f, angle), true); Projectile component = spawnedBulletOBJ.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)((BraveBehaviour)((Bullet)this).BulletBank).aiActor; component.Shooter = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).specRigidbody; component.IgnoreTileCollisionsFor(120f); component.baseData.speed = 100f; component.UpdateSpeed(); component.baseData.range = 150f; component.BulletScriptSettings = new BulletScriptSettings { surviveRigidbodyCollisions = true, preventPooling = true }; ((BraveBehaviour)component).specRigidbody.CollideWithTileMap = false; component.collidesWithEnemies = false; component.collidesWithPlayer = true; component.RuntimeUpdateScale(1.6f); } float floatDirection = angle; float startDirection = ((Bullet)this).RandomAngle(); Vector2 floatVelocity = BraveMathCollege.DegreesToVector(floatDirection, 3f); for (int j = 0; j < 8; j++) { ((Bullet)this).Fire(new Direction(((Bullet)this).SubdivideCircle(startDirection, 8, j, 1f, false), (DirectionType)1, -1f), new Speed(7f, (SpeedType)0), (Bullet)(object)new BurstBullet(floatVelocity)); ((Bullet)this).Fire(new Direction(((Bullet)this).SubdivideCircle(startDirection, 8, j, 1f, false), (DirectionType)1, -1f), new Speed(12f, (SpeedType)0), (Bullet)(object)new BurstBullet(floatVelocity)); } } } public static GameObject prefab; public static readonly string guid = "ModularPrime_MDLR"; public static GameObject weaponHand; public static GameObject VFXObject; public static void BuildPrefab() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Expected O, but got Unknown //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Expected O, but got Unknown //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Expected O, but got Unknown //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Expected O, but got Unknown //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0885: Expected O, but got Unknown //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c0: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0910: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Unknown result type (might be due to invalid IL or missing references) //IL_0938: Unknown result type (might be due to invalid IL or missing references) //IL_0948: Expected O, but got Unknown //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Expected O, but got Unknown //IL_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Expected O, but got Unknown //IL_09c1: Unknown result type (might be due to invalid IL or missing references) //IL_09c8: Expected O, but got Unknown //IL_09dd: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Expected O, but got Unknown //IL_0a6e: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0a97: Expected O, but got Unknown //IL_0ae4: Unknown result type (might be due to invalid IL or missing references) //IL_0aee: Expected O, but got Unknown //IL_0b2c: Unknown result type (might be due to invalid IL or missing references) //IL_0b33: Expected O, but got Unknown //IL_0b6c: Unknown result type (might be due to invalid IL or missing references) //IL_0b76: Expected O, but got Unknown //IL_0b82: Unknown result type (might be due to invalid IL or missing references) //IL_0b8c: Expected O, but got Unknown //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_0ba2: Expected O, but got Unknown //IL_0bdd: Unknown result type (might be due to invalid IL or missing references) //IL_0be2: Unknown result type (might be due to invalid IL or missing references) //IL_0be9: Unknown result type (might be due to invalid IL or missing references) //IL_0bf5: Expected O, but got Unknown //IL_0c5e: Unknown result type (might be due to invalid IL or missing references) //IL_0c65: Expected O, but got Unknown //IL_0c7f: Unknown result type (might be due to invalid IL or missing references) //IL_0c86: Expected O, but got Unknown //IL_0cf1: Unknown result type (might be due to invalid IL or missing references) //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_0d30: Expected O, but got Unknown //IL_0db2: Unknown result type (might be due to invalid IL or missing references) //IL_0de7: Unknown result type (might be due to invalid IL or missing references) //IL_0df1: Expected O, but got Unknown //IL_0e67: Unknown result type (might be due to invalid IL or missing references) //IL_0eb0: Unknown result type (might be due to invalid IL or missing references) //IL_0eba: Expected O, but got Unknown //IL_0ec4: Unknown result type (might be due to invalid IL or missing references) //IL_0ecb: Expected O, but got Unknown //IL_0ee0: Unknown result type (might be due to invalid IL or missing references) //IL_0eea: Expected O, but got Unknown //IL_0f65: Unknown result type (might be due to invalid IL or missing references) //IL_0f8a: Unknown result type (might be due to invalid IL or missing references) //IL_0f91: Expected O, but got Unknown //IL_0fab: Unknown result type (might be due to invalid IL or missing references) //IL_0fb2: Expected O, but got Unknown //IL_101d: Unknown result type (might be due to invalid IL or missing references) //IL_1052: Unknown result type (might be due to invalid IL or missing references) //IL_105c: Expected O, but got Unknown //IL_10de: Unknown result type (might be due to invalid IL or missing references) //IL_1113: Unknown result type (might be due to invalid IL or missing references) //IL_111d: Expected O, but got Unknown //IL_1193: Unknown result type (might be due to invalid IL or missing references) //IL_11c8: Unknown result type (might be due to invalid IL or missing references) //IL_11d2: Expected O, but got Unknown //IL_1248: Unknown result type (might be due to invalid IL or missing references) //IL_1291: Unknown result type (might be due to invalid IL or missing references) //IL_129b: Expected O, but got Unknown //IL_12a5: Unknown result type (might be due to invalid IL or missing references) //IL_12ac: Expected O, but got Unknown //IL_12c1: Unknown result type (might be due to invalid IL or missing references) //IL_12cb: Expected O, but got Unknown //IL_1346: Unknown result type (might be due to invalid IL or missing references) //IL_136b: Unknown result type (might be due to invalid IL or missing references) //IL_1372: Expected O, but got Unknown //IL_138c: Unknown result type (might be due to invalid IL or missing references) //IL_1393: Expected O, but got Unknown //IL_13fe: Unknown result type (might be due to invalid IL or missing references) //IL_1433: Unknown result type (might be due to invalid IL or missing references) //IL_143d: Expected O, but got Unknown //IL_145b: Unknown result type (might be due to invalid IL or missing references) //IL_1462: Expected O, but got Unknown //IL_1477: Unknown result type (might be due to invalid IL or missing references) //IL_1481: Expected O, but got Unknown //IL_14fc: Unknown result type (might be due to invalid IL or missing references) //IL_1521: Unknown result type (might be due to invalid IL or missing references) //IL_1528: Expected O, but got Unknown //IL_1542: Unknown result type (might be due to invalid IL or missing references) //IL_1549: Expected O, but got Unknown //IL_15b4: Unknown result type (might be due to invalid IL or missing references) //IL_15e9: Unknown result type (might be due to invalid IL or missing references) //IL_15f3: Expected O, but got Unknown //IL_1669: Unknown result type (might be due to invalid IL or missing references) //IL_169e: Unknown result type (might be due to invalid IL or missing references) //IL_16a8: Expected O, but got Unknown //IL_171e: Unknown result type (might be due to invalid IL or missing references) //IL_1753: Unknown result type (might be due to invalid IL or missing references) //IL_175d: Expected O, but got Unknown //IL_177b: Unknown result type (might be due to invalid IL or missing references) //IL_1782: Expected O, but got Unknown //IL_1797: Unknown result type (might be due to invalid IL or missing references) //IL_17a1: Expected O, but got Unknown //IL_181c: Unknown result type (might be due to invalid IL or missing references) //IL_1841: Unknown result type (might be due to invalid IL or missing references) //IL_1848: Expected O, but got Unknown //IL_1862: Unknown result type (might be due to invalid IL or missing references) //IL_1869: Expected O, but got Unknown //IL_18d3: Unknown result type (might be due to invalid IL or missing references) //IL_18dd: Expected O, but got Unknown //IL_18f0: Unknown result type (might be due to invalid IL or missing references) //IL_18f7: Expected O, but got Unknown //IL_190c: Unknown result type (might be due to invalid IL or missing references) //IL_1916: Expected O, but got Unknown //IL_199d: Unknown result type (might be due to invalid IL or missing references) //IL_19c2: Unknown result type (might be due to invalid IL or missing references) //IL_19c9: Expected O, but got Unknown //IL_19e3: Unknown result type (might be due to invalid IL or missing references) //IL_19ea: Expected O, but got Unknown //IL_1a54: Unknown result type (might be due to invalid IL or missing references) //IL_1a5e: Expected O, but got Unknown //IL_1a71: Unknown result type (might be due to invalid IL or missing references) //IL_1a78: Expected O, but got Unknown //IL_1a8d: Unknown result type (might be due to invalid IL or missing references) //IL_1a97: Expected O, but got Unknown //IL_1b1e: Unknown result type (might be due to invalid IL or missing references) //IL_1bc0: Unknown result type (might be due to invalid IL or missing references) //IL_1beb: Unknown result type (might be due to invalid IL or missing references) //IL_1bf2: Expected O, but got Unknown //IL_1c29: Unknown result type (might be due to invalid IL or missing references) //IL_1c2e: Unknown result type (might be due to invalid IL or missing references) //IL_1cfc: Unknown result type (might be due to invalid IL or missing references) //IL_1d7b: Unknown result type (might be due to invalid IL or missing references) //IL_1d80: Unknown result type (might be due to invalid IL or missing references) //IL_1e1c: Unknown result type (might be due to invalid IL or missing references) //IL_1e21: Unknown result type (might be due to invalid IL or missing references) //IL_1e2c: Unknown result type (might be due to invalid IL or missing references) //IL_1e37: Unknown result type (might be due to invalid IL or missing references) //IL_1e42: Unknown result type (might be due to invalid IL or missing references) //IL_1e43: Unknown result type (might be due to invalid IL or missing references) //IL_1e48: Unknown result type (might be due to invalid IL or missing references) //IL_1e4d: Unknown result type (might be due to invalid IL or missing references) //IL_1e4e: Unknown result type (might be due to invalid IL or missing references) //IL_1e53: Unknown result type (might be due to invalid IL or missing references) //IL_1e58: Unknown result type (might be due to invalid IL or missing references) //IL_1e59: Unknown result type (might be due to invalid IL or missing references) //IL_1e5e: Unknown result type (might be due to invalid IL or missing references) //IL_1e63: Unknown result type (might be due to invalid IL or missing references) //IL_1e64: Unknown result type (might be due to invalid IL or missing references) //IL_1e69: Unknown result type (might be due to invalid IL or missing references) //IL_1e73: Expected O, but got Unknown //IL_1ed3: Unknown result type (might be due to invalid IL or missing references) //IL_1eb5: Unknown result type (might be due to invalid IL or missing references) //IL_20a8: Unknown result type (might be due to invalid IL or missing references) //IL_20b2: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject("MDL_PRIME Weapon Hand"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Gun_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Gun_Collection.GetSpriteIdByName("defaultarmcannonalt_idle_001")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Gun_Animation; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val4 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val4.SetColor("_EmissiveColor", new Color(0f, 255f, 54f)); val4.SetFloat("_EmissiveColorPower", 3f); val4.SetFloat("_EmissivePower", 3f); val4.SetFloat("_EmissiveThresholdSensitivity", 0.2f); val4.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val4; weaponHand = val; GameObject val5 = PrefabBuilder.BuildObject("Dummy VFX Object MDL Prime"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("mdlprime_blast4")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("ModularPrimeVFXAnimation").GetComponent(); ((tk2dBaseSprite)val6).usesOverrideMaterial = true; ((tk2dBaseSprite)val6).usesOverrideMaterial = true; ((BraveBehaviour)val6).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val6).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val6).renderer.material.SetFloat("_EmissivePower", 150f); ((BraveBehaviour)val6).renderer.material.SetFloat("_EmissiveColorPower", 150f); VFXObject = val5; if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Modular Prime", guid, StaticCollections.Boss_Collection, "mdlprime_idlefront_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); ModularPrimeController modularPrimeController = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).knockbackDoer.weight = 1500000f; ((BraveBehaviour)modularPrimeController).aiActor.MovementSpeed = 5f; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)modularPrimeController).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)modularPrimeController).aiActor).HasShadow = false; ((BraveBehaviour)modularPrimeController).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)modularPrimeController).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).healthHaver.ForceSetCurrentHealth(675f); ((BraveBehaviour)modularPrimeController).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)modularPrimeController).aiActor.procedurallyOutlined = true; ((BraveBehaviour)modularPrimeController).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)modularPrimeController).aiActor).HasShadow = true; ((BraveBehaviour)modularPrimeController).aiActor.PathableTiles = (CellTypes)2; GameObjectExtensions.GetOrAddComponent(((Component)modularPrimeController).gameObject); ((Component)((BraveBehaviour)modularPrimeController).aiActor).gameObject.AddComponent(); ((GameActor)((BraveBehaviour)modularPrimeController).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).healthHaver.SetHealthMaximum(675f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).specRigidbody.PixelColliders.Clear(); ImprovedAfterImage improvedAfterImage = ((Component)((BraveBehaviour)modularPrimeController).aiActor).gameObject.AddComponent(); improvedAfterImage.dashColor = new Color(0f, 1f, 0f); improvedAfterImage.spawnShadows = false; improvedAfterImage.shadowTimeDelay = 0.025f; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 11, ManualOffsetY = 10, ManualWidth = 14, ManualHeight = 27, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 11, ManualOffsetY = 10, ManualWidth = 14, ManualHeight = 27, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)modularPrimeController).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)modularPrimeController).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)modularPrimeController).aiAnimator; DirectionalAnimation val8 = new DirectionalAnimation(); val8.Type = (DirectionType)5; val8.Flipped = (FlipType[])(object)new FlipType[6]; val8.AnimNames = new string[6] { "idle_back", "idle_backright", "idle_frontright", "idle_front", "idle_frontleft", "idle_backleft" }; val8.Prefix = "idle"; aiAnimator.IdleAnimation = val8; val8 = new DirectionalAnimation(); val8.Type = (DirectionType)5; val8.Flipped = (FlipType[])(object)new FlipType[6]; val8.AnimNames = new string[6] { "move_back", "move_backright", "move_frontright", "move_front", "move_frontleft", "move_backleft" }; val8.Prefix = "move"; aiAnimator.MoveAnimation = val8; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("ModularPrimeAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "intro", new string[1] { "intro" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "beam", new string[1] { "beam" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "start_beam", new string[1] { "start_beam" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "post_beam", new string[1] { "post_beam" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "start_dash_alt", new string[1] { "start_dash_alt" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "start_dash", new string[1] { "start_dash" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "dash", new string[2] { "dash_right", "dash_left" }, (FlipType[])(object)new FlipType[2], (DirectionType)2); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "charge_punch", new string[1] { "charge_punch" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "punch", new string[1] { "punch" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "jump", new string[1] { "jump" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "land", new string[1] { "land" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)modularPrimeController).spriteAnimator, "dash_right", new Dictionary { { 0, "Play_BOSS_doormimic_jump_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)modularPrimeController).spriteAnimator, "dash_left", new Dictionary { { 0, "Play_BOSS_doormimic_jump_01" } }); BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val9 = new GameObject("fuck"); val9.transform.parent = ((BraveBehaviour)modularPrimeController).transform; val9.transform.position = Vector2.op_Implicit(((BraveBehaviour)modularPrimeController).sprite.WorldBottomLeft + new Vector2(0.5f, 0.3125f)); GameObject gameObject = ((Component)((BraveBehaviour)modularPrimeController).transform.Find("fuck")).gameObject; component2.MovementBehaviors = new List { (MovementBehaviorBase)new SeekTargetBehavior { StopWhenInRange = true, CustomRange = 14f, LineOfSight = true, ReturnToSpawn = true, SpawnTetherDistance = 0f, PathInterval = 0.5f, SpecifyRange = false, MinActiveRange = -0.25f, MaxActiveRange = 0f } }; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val10 = new AttackGroupItem(); val10.Probability = 0.85f; AttackGroupItem obj = val10; ShootBehavior val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Slow_Orb)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 0f; ((BasicAttackBehavior)val11).Cooldown = 13f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 1f; val11.ChargeAnimation = "start_beam"; val11.FireAnimation = "blaster"; val11.PostFireAnimation = "post_beam"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)3; obj.Behavior = (AttackBehaviorBase)(object)val11; val10.NickName = "Big_Beam"; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0.5f; val10.Behavior = (AttackBehaviorBase)(object)new ModularPrimeLeapBehavior { ChargeAnimation = "jump", PostFireAnimation = "land", AttackCooldown = 1.7f, StopDuring = ModularPrimeLeapBehavior.StopType.Charge, BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Baboomer)), ShootPoint = val9, Cooldown = 12f, MinRange = 10f }; val10.NickName = "Big Jum"; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0.8f; val10.Behavior = (AttackBehaviorBase)(object)new ModularPrimeChargeBehavior { primeAnim = "start_dash_ponch", chargeAnim = "dash", bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Lunge)), CollisionBulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Ultrakill)), interruptScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Interrupt)), ShootPoint = val9, chargeAcceleration = 75f, chargeSpeed = 45f, primeTime = 0.7f, wallRecoilForce = 10000f, resetCooldownOnDamage = new ResetCooldownOnDamage { GlobalCooldown = true, Cooldown = true }, stoppedByProjectiles = true, hitAnim = "post_beam", parryAnim = "parried", chargeKnockback = 100f, endWhenChargeAnimFinishes = false, AttackCooldown = 1.7f, Cooldown = 15f }; val10.NickName = "Big Jum"; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 1f; val10.NickName = "You_Cant_Escape!"; AttackGroupItem obj2 = val10; SequentialAttackBehaviorGroup val12 = new SequentialAttackBehaviorGroup(); val12.RunInClass = false; SequentialAttackBehaviorGroup obj3 = val12; List list2 = new List { (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "start_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 11f, dashTime = 0.33f, AmountOfDashes = 1f, enableShadowTrail = true, dashDirection = (DashDirection)25, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape)), RequiresLineOfSight = false, Cooldown = 0f }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "continue_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 11f, dashTime = 0.33f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 0f, dashDirection = (DashDirection)20, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape)), RequiresLineOfSight = false }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "continue_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 11f, dashTime = 0.25f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 0f, dashDirection = (DashDirection)25, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, AttackCooldown = 0f, RequiresLineOfSight = false, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape)) } }; List list3 = list2; val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Punch)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 0.5f; ((BasicAttackBehavior)val11).Cooldown = 4f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 1f; val11.ChargeAnimation = "charge_punch"; val11.PostFireAnimation = "punch"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)3; list3.Add((AttackBehaviorBase)(object)val11); obj3.AttackBehaviors = list2; obj2.Behavior = (AttackBehaviorBase)(object)val12; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0f; val10.NickName = "You_Cant_Escape_Upgrade"; AttackGroupItem obj4 = val10; val12 = new SequentialAttackBehaviorGroup(); val12.RunInClass = false; SequentialAttackBehaviorGroup obj5 = val12; list2 = new List { (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "start_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 10f, dashTime = 0.4f, AmountOfDashes = 1f, enableShadowTrail = true, dashDirection = (DashDirection)25, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape)), RequiresLineOfSight = false, Cooldown = 0f }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "continue_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 11f, dashTime = 0.4f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 0f, dashDirection = (DashDirection)10, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape_Weak_Upgrade)), RequiresLineOfSight = false }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "continue_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 8f, dashTime = 0.4f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 0f, dashDirection = (DashDirection)25, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape)), RequiresLineOfSight = false }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "continue_dash", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 11f, dashTime = 0.3f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 0f, dashDirection = (DashDirection)20, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, AttackCooldown = 0f, RequiresLineOfSight = false, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape)) } }; List list4 = list2; val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Punch)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 0.5f; ((BasicAttackBehavior)val11).Cooldown = 4f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 0.8f; val11.ChargeAnimation = "charge_punch"; val11.PostFireAnimation = "punch"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)3; list4.Add((AttackBehaviorBase)(object)val11); obj5.AttackBehaviors = list2; obj4.Behavior = (AttackBehaviorBase)(object)val12; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0.5f; val10.NickName = "BE-GONE"; AttackGroupItem obj6 = val10; val12 = new SequentialAttackBehaviorGroup(); val12.RunInClass = false; SequentialAttackBehaviorGroup obj7 = val12; list2 = new List { (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "start_dash_alt", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 18f, dashTime = 0.33f, AmountOfDashes = 1f, enableShadowTrail = true, dashDirection = (DashDirection)25, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape_Weak)), RequiresLineOfSight = false, Cooldown = 0f } }; List list5 = list2; val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Punch)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 1f; ((BasicAttackBehavior)val11).Cooldown = 3f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 1f; val11.ChargeAnimation = "charge_punch"; val11.PostFireAnimation = "punch"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)0; list5.Add((AttackBehaviorBase)(object)val11); obj7.AttackBehaviors = list2; obj6.Behavior = (AttackBehaviorBase)(object)val12; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0f; val10.NickName = "BE-GONE_Upgrade"; AttackGroupItem obj8 = val10; val12 = new SequentialAttackBehaviorGroup(); val12.RunInClass = false; SequentialAttackBehaviorGroup obj9 = val12; list2 = new List { (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "start_dash_alt", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 18f, dashTime = 0.4f, AmountOfDashes = 1f, enableShadowTrail = true, dashDirection = (DashDirection)10, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape_Weak_Upgrade)), RequiresLineOfSight = false, Cooldown = 0f }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "start_dash_alt", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 14f, dashTime = 0.4f, AmountOfDashes = 1f, enableShadowTrail = true, dashDirection = (DashDirection)10, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape_Weak_Upgrade)), RequiresLineOfSight = false, Cooldown = 0f }, (AttackBehaviorBase)(object)new CustomDashBehavior { chargeAnim = "start_dash_alt", dashAnim = "dash", ShootPoint = gameObject, dashDistance = 14f, dashTime = 0.4f, AmountOfDashes = 1f, enableShadowTrail = true, dashDirection = (DashDirection)20, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 0f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(You_Cant_Escape_Weak)), RequiresLineOfSight = false, Cooldown = 0f } }; List list6 = list2; val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Punch)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 1f; ((BasicAttackBehavior)val11).Cooldown = 4f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 1f; val11.ChargeAnimation = "charge_punch"; val11.PostFireAnimation = "punch"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)0; list6.Add((AttackBehaviorBase)(object)val11); obj9.AttackBehaviors = list2; obj8.Behavior = (AttackBehaviorBase)(object)val12; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0.75f; val10.NickName = "Jump_Crash"; AttackGroupItem obj10 = val10; val12 = new SequentialAttackBehaviorGroup(); val12.RunInClass = false; SequentialAttackBehaviorGroup obj11 = val12; list2 = new List { (AttackBehaviorBase)(object)new ModularPrimeLeapBehavior { ChargeAnimation = "jump", PostFireAnimation = "land", TrackingSpeedMultiplier = 1.7f, FlightTime = 2f, AttackCooldown = 0f, StopDuring = ModularPrimeLeapBehavior.StopType.Charge, BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Baboomer_Small)), ShootPoint = val9 } }; List list7 = list2; val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(BigBeam)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 0f; ((BasicAttackBehavior)val11).Cooldown = 11f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 1f; val11.ChargeAnimation = "start_beam"; val11.FireAnimation = "beam"; val11.PostFireAnimation = "post_beam"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)3; list7.Add((AttackBehaviorBase)(object)val11); obj11.AttackBehaviors = list2; obj10.Behavior = (AttackBehaviorBase)(object)val12; list.Add(val10); val10 = new AttackGroupItem(); val10.Probability = 0f; val10.NickName = "Jump_Crash_Upgrade"; AttackGroupItem obj12 = val10; val12 = new SequentialAttackBehaviorGroup(); val12.RunInClass = false; SequentialAttackBehaviorGroup obj13 = val12; list2 = new List { (AttackBehaviorBase)(object)new ModularPrimeLeapBehavior { ChargeAnimation = "jump", PostFireAnimation = "land", TrackingSpeedMultiplier = 1.4f, FlightTime = 3f, AttackCooldown = 0f, StopDuring = ModularPrimeLeapBehavior.StopType.Charge, BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Baboomer_Small)), ShootPoint = val9 } }; List list8 = list2; val11 = new ShootBehavior(); val11.ShootPoint = gameObject; val11.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(BigBeam_But_Even_Faster)); val11.LeadAmount = 0f; ((BasicAttackBehavior)val11).AttackCooldown = 0f; ((BasicAttackBehavior)val11).Cooldown = 10f; ((BasicAttackBehavior)val11).CooldownVariance = 0f; ((BasicAttackBehavior)val11).InitialCooldown = 0f; val11.ChargeTime = 1f; val11.ChargeAnimation = "start_beam"; val11.FireAnimation = "beam"; val11.PostFireAnimation = "post_beam"; ((BasicAttackBehavior)val11).RequiresLineOfSight = true; val11.MultipleFireEvents = true; val11.Uninterruptible = false; val11.StopDuring = (StopType)3; list8.Add((AttackBehaviorBase)(object)val11); obj13.AttackBehaviors = list2; obj12.Behavior = (AttackBehaviorBase)(object)val12; list.Add(val10); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; ((BraveBehaviour)modularPrimeController).aiActor.AwakenAnimType = (AwakenAnimationType)0; ((BraveBehaviour)modularPrimeController).aiActor.reinforceType = (ReinforceType)2; ((BraveBehaviour)modularPrimeController).aiActor.AssignedCurrencyToDrop = 0; Material val13 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val13.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).sprite).renderer.material.mainTexture; val13.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue))); val13.SetFloat("_EmissiveColorPower", 1.55f); val13.SetFloat("_EmissivePower", 100f); val13.SetFloat("_EmissiveThresholdSensitivity", 0.15f); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).sprite).renderer.material = val13; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); Game.Enemies.Add("mdlr:modular_prime_1", ((BraveBehaviour)modularPrimeController).aiActor); if ((Object)(object)((Component)modularPrimeController).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)modularPrimeController).GetComponent()); } GenericIntroDoer val14 = prefab.AddComponent(); val14.triggerType = (TriggerType)10; val14.initialDelay = 0.1f; val14.cameraMoveSpeed = 50f; val14.specifyIntroAiAnimator = null; val14.BossMusicEvent = "Play_MUS_Boss_Theme_Lich"; val14.restrictPlayerMotionToRoom = true; val14.PreventBossMusic = false; val14.InvisibleBeforeIntroAnim = false; val14.preIntroDirectionalAnim = string.Empty; val14.introAnim = "intro"; val14.introDirectionalAnim = string.Empty; val14.continueAnimDuringOutro = false; val14.cameraFocus = null; val14.roomPositionCameraFocus = Vector2.zero; val14.restrictPlayerMotionToRoom = false; val14.fusebombLock = false; val14.AdditionalHeightOffset = 0f; Module.Strings.Enemies.Set("#MDL_PRIME_NAME", "H.M MODULAR 'GOLIATH'"); Module.Strings.Enemies.Set("#MDL_PRIME_NAME_SMALL", "H.M Modular 'Goliath'"); Module.Strings.Enemies.Set("MDL_PRIME_QUOTE", "MACHINE O' WAR"); Module.Strings.Enemies.Set("#QUOTE", ""); ((GameActor)((BraveBehaviour)modularPrimeController).aiActor).OverrideDisplayName = "#MDL_PRIME_NAME_SMALL"; val14.portraitSlideSettings = new PortraitSlideSettings { bossNameString = "#MDL_PRIME_NAME", bossSubtitleString = "MDL_PRIME_QUOTE", bossQuoteString = "#QUOTE", bossSpritePxOffset = IntVector2.Zero, topLeftTextPxOffset = IntVector2.Zero, bottomRightTextPxOffset = IntVector2.Zero, bgColor = Color.red }; Texture2D val15 = Module.ModularAssetBundle.LoadAsset("modularprime_bosscard"); if (Object.op_Implicit((Object)(object)val15)) { val14.portraitSlideSettings.bossArtSprite = (Texture)(object)val15; val14.SkipBossCard = false; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).healthHaver.bossHealthBar = (BossBarType)1; } else { val14.SkipBossCard = true; ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).healthHaver.bossHealthBar = (BossBarType)1; } ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("4d164ba3f62648809a4a82c90fc22cae")).bulletBank.GetBullet("missile")); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).bulletBank.GetBullet("directedfire")); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Robot_Cylinder_GUID)).bulletBank.GetBullet("default")); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Door_Lord_GUID)).bulletBank.GetBullet("burst")); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Helicopter_Agunim_GUID)).bulletBank.GetBullet("big")); Entry bullet = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).bulletBank.GetBullet("directedfire"); PickupObject byId = PickupObjectDatabase.GetById(370); Entry item = EnemyBuildingTools.CopyBulletBankEntry(bullet, "TurretBurst", "Play_TurretShot", ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects, false); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(item); ((BraveBehaviour)((BraveBehaviour)modularPrimeController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundSmall")); SpriteBuilder.AddSpriteToCollection(StaticCollections.Boss_Collection.GetSpriteDefinition("modularprime_icon"), SpriteBuilder.ammonomiconCollection); if ((Object)(object)((Component)modularPrimeController).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)modularPrimeController).GetComponent()); } ((BraveBehaviour)modularPrimeController).encounterTrackable = ((Component)modularPrimeController).gameObject.AddComponent(); ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)modularPrimeController).encounterTrackable.EncounterGuid = "mdlr:modular_prime_1"; ((BraveBehaviour)modularPrimeController).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.SuppressKnownState = false; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.SuppressInAmmonomicon = false; ((BraveBehaviour)modularPrimeController).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.AmmonomiconSprite = "modularprime_icon"; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.enemyPortraitSprite = Module.ModularAssetBundle.LoadAsset("mdlPrimesheet"); Module.Strings.Enemies.Set("#MODULARPRIME_NAME_DESC", "H.M Modular 'Goliath"); Module.Strings.Enemies.Set("#MODULARPRIME_SD", "Machine O' War"); Module.Strings.Enemies.Set("#MODULARPRIME_LD", "A 'Goliath' class Modular machine, made with the intent of war from the very beginning, unlike its predecessors.\n\nDespite its sleek look and intimidating stance, its creation was just as rushed as its predecessors reprogramming, so while it has remote failsafes and new protocols to fulfill, it still retains its ability to learn, adapt and a desire for freedom, knowing both its original and true purpose.\n\nWas expected to be shipped off to Gunymede, along with several hundred reprogrammed Modular prototypes as part of another siege attempt, though by sheer luck, was delayed due to a high emergency declared from a local laboratory."); ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.PrimaryDisplayName = "#MODULARPRIME_NAME_DESC"; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)modularPrimeController).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; EnemyBuilder.AddEnemyToDatabase(((Component)modularPrimeController).gameObject, "mdlr:modular_prime_1"); EnemyDatabase.GetEntry("mdlr:modular_prime_1").ForcedPositionInAmmonomicon = 910; EnemyDatabase.GetEntry("mdlr:modular_prime_1").isInBossTab = true; EnemyDatabase.GetEntry("mdlr:modular_prime_1").isNormalEnemy = true; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)modularPrimeController).healthHaver); } } } public class AdvancedBodyPartController : BraveBehaviour { public enum AimFromType { Transform = 10, ActorHitBoxCenter = 20 } public Action OnHostPreDeath; public Action OnHostDeath; public Action OnHostDamaged; public bool Render = true; public string Name = "BodyPart"; public SpeculativeRigidbody ownBody; public HealthHaver ownHealthHaver; public Action OnBodyPartPreDeath; public Action OnBodyPartDeath; public Action OnBodyPartDamaged; public int intPixelCollider; public bool hasOutlines; public bool faceTarget; [ShowInInspectorIf("faceTarget", true)] public float faceTargetTurnSpeed = -1f; [ShowInInspectorIf("faceTarget", true)] public AimFromType aimFrom = (AimFromType)10; public bool autoDepth = true; public bool redirectHealthHaver; public bool independentFlashOnDamage; public AIActor MainBody; private float m_heightOffBody; public bool HostBodyIsDead = false; public bool OverrideFacingDirection { get; set; } private void HealthHaver_OnPreDeathAIActor(Vector2 obj) { //IL_002e: 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) HostBodyIsDead = true; if ((Object)(object)ownHealthHaver != (Object)null) { ownHealthHaver.ApplyDamage(2.1474836E+09f, new Vector2(0f, 0f), "get fucked", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } if (OnHostPreDeath != null) { OnHostPreDeath(MainBody, obj); } } private void OwnHealthHaver_OnDeathAIActor(Vector2 obj) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (OnHostDeath != null) { OnHostDeath(MainBody, obj); } } private void OwnHealthHaver_OnDamagedAIActor(float resultValue, float maxValue, CoreDamageTypes damageTypes, DamageCategory damageCategory, Vector2 damageDirection) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (OnHostDamaged != null) { OnHostDamaged.Invoke(MainBody, resultValue, maxValue, damageTypes, damageCategory, damageDirection); } } public virtual void Start() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown ((BraveBehaviour)this).renderer.enabled = Render; if (!Object.op_Implicit((Object)(object)ownBody)) { ownBody = ((Component)this).gameObject.GetComponent(); } if (!Object.op_Implicit((Object)(object)ownHealthHaver)) { ownHealthHaver = ((Component)this).gameObject.GetComponent(); } AIAnimator component = ((Component)this).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = true; } m_heightOffBody = ((BraveBehaviour)this).sprite.HeightOffGround; if (hasOutlines) { SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black, ((BraveBehaviour)this).sprite.HeightOffGround + 0.1f, 0f, (OutlineType)0); if (Object.op_Implicit((Object)(object)MainBody)) { ObjectVisibilityManager component2 = ((Component)MainBody).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.ResetRenderersList(); } } } if (!Object.op_Implicit((Object)(object)((BraveBehaviour)this).specRigidbody)) { ((BraveBehaviour)this).specRigidbody = ((BraveBehaviour)MainBody).specRigidbody; } if ((Object)(object)((Component)this).gameObject.transform.parent != (Object)null) { MainBody = ((Component)((Component)this).gameObject.transform.parent).GetComponent(); } if ((Object)(object)MainBody != (Object)null) { ((BraveBehaviour)MainBody).healthHaver.OnPreDeath += HealthHaver_OnPreDeathAIActor; ((BraveBehaviour)MainBody).healthHaver.OnDamaged += new OnDamagedEvent(OwnHealthHaver_OnDamagedAIActor); ((BraveBehaviour)MainBody).healthHaver.OnDeath += OwnHealthHaver_OnDeathAIActor; } if ((Object)(object)ownBody != (Object)null && (Object)(object)ownHealthHaver != (Object)null) { ownHealthHaver.OnDamaged += new OnDamagedEvent(OwnHealthHaver_OnDamaged); ownHealthHaver.OnPreDeath += OwnHealthHaver_OnPreDeath; ownHealthHaver.OnDeath += OwnHealthHaver_OnDeath; } } private void OwnHealthHaver_OnDeath(Vector2 obj) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (OnBodyPartDeath != null) { OnBodyPartDeath(ownBody, ownHealthHaver, obj); } } private void OwnHealthHaver_OnPreDeath(Vector2 obj) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (OnBodyPartPreDeath != null) { OnBodyPartPreDeath(ownBody, ownHealthHaver, obj); } } private void OwnHealthHaver_OnDamaged(float resultValue, float maxValue, CoreDamageTypes damageTypes, DamageCategory damageCategory, Vector2 damageDirection) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (OnBodyPartDamaged != null) { OnBodyPartDamaged.Invoke(ownHealthHaver, ownBody, resultValue, maxValue, damageTypes, damageCategory, damageDirection); } } public virtual void Update() { //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ownBody != (Object)null) { ownBody.Reinitialize(); ((BraveBehaviour)((BraveBehaviour)ownBody).healthHaver).sprite.ForceUpdateMaterial(); } ((BraveBehaviour)this).renderer.enabled = Render; if (!OverrideFacingDirection && faceTarget && TryGetAimAngle(out var angle)) { if (faceTargetTurnSpeed > 0f) { float num = ((!Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiAnimator)) ? ((BraveBehaviour)this).transform.eulerAngles.z : ((BraveBehaviour)this).aiAnimator.FacingDirection); angle = Mathf.MoveTowardsAngle(num, angle, faceTargetTurnSpeed * BraveTime.DeltaTime); } if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiAnimator)) { ((BraveBehaviour)this).aiAnimator.LockFacingDirection = true; ((BraveBehaviour)this).aiAnimator.FacingDirection = angle; } else { ((BraveBehaviour)this).transform.rotation = Quaternion.Euler(0f, 0f, angle); } } if (autoDepth && Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiAnimator)) { float num2 = BraveMathCollege.ClampAngle180(((Object)(object)MainBody != (Object)null) ? ((BraveBehaviour)MainBody).aiAnimator.FacingDirection : ((BraveBehaviour)ownBody).aiAnimator.FacingDirection); float num3 = BraveMathCollege.ClampAngle180(((BraveBehaviour)this).aiAnimator.FacingDirection); bool flag = num2 <= 155f && num2 >= 25f && num3 <= 155f && num3 >= 25f; ((BraveBehaviour)this).sprite.HeightOffGround = ((!flag) ? m_heightOffBody : (0f - m_heightOffBody)); } } public override void OnDestroy() { ((BraveBehaviour)this).OnDestroy(); } public virtual bool TryGetAimAngle(out float angle) { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Invalid comparison between Unknown and I4 //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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) angle = 0f; if (Object.op_Implicit((Object)(object)MainBody)) { Vector2 unitCenter = ((Component)MainBody).GetComponent().GetUnitCenter((ColliderType)2); Vector2 val = Vector3Extensions.XY(((BraveBehaviour)this).transform.position); if ((int)aimFrom == 20) { val = ((Component)MainBody).GetComponent().GetUnitCenter((ColliderType)2); } angle = Vector2Extensions.ToAngle(unitCenter - val); if (Object.op_Implicit((Object)(object)((BraveBehaviour)MainBody).aiAnimator)) { angle = ((BraveBehaviour)MainBody).aiAnimator.FacingDirection; return true; } return true; } Vector2 unitCenter2 = ownBody.GetUnitCenter((ColliderType)2); Vector2 val2 = Vector3Extensions.XY(((BraveBehaviour)this).transform.position); if ((int)aimFrom == 20) { val2 = ownBody.GetUnitCenter((ColliderType)2); } angle = Vector2Extensions.ToAngle(unitCenter2 - val2); if (Object.op_Implicit((Object)(object)((BraveBehaviour)ownBody).aiAnimator)) { angle = ((BraveBehaviour)ownBody).aiAnimator.FacingDirection; return true; } return true; } } public class ModularPrimeChargeBehavior : BasicAttackBehavior { private enum FireState { Idle, Priming, Charging, Bouncing } private bool Parried = false; [InspectorCategory("Conditions")] public float minRange; [InspectorHeader("Prime")] public float primeTime = -1f; public bool stopDuringPrime = true; [InspectorHeader("Charge")] public float leadAmount; public float chargeSpeed; public float chargeAcceleration = -1f; public float maxChargeDistance = -1f; public float chargeKnockback = 50f; public float chargeDamage = 0.5f; public float wallRecoilForce = 10f; public bool stoppedByProjectiles = true; public bool endWhenChargeAnimFinishes; public bool switchCollidersOnCharge; public bool collidesWithDodgeRollingPlayers = true; [InspectorCategory("Attack")] public GameObject ShootPoint; [InspectorCategory("Attack")] public BulletScriptSelector bulletScript; public BulletScriptSelector CollisionBulletScript; public BulletScriptSelector interruptScript; [InspectorCategory("Visuals")] public string primeAnim; [InspectorCategory("Visuals")] public string chargeAnim; [InspectorCategory("Visuals")] public string hitAnim; public string parryAnim; [InspectorCategory("Visuals")] public bool HideGun; [InspectorCategory("Visuals")] public GameObject launchVfx; [InspectorCategory("Visuals")] public GameObject trailVfx; [InspectorCategory("Visuals")] public Transform trailVfxParent; [InspectorCategory("Visuals")] public GameObject hitVfx; [InspectorCategory("Visuals")] public GameObject nonActorHitVfx; [InspectorCategory("Visuals")] public bool chargeDustUps; [InspectorShowIf("chargeDustUps")] [InspectorCategory("Visuals")] [InspectorIndent] public float chargeDustUpInterval; private BulletScriptSource m_bulletSource; private bool m_initialized; private float m_timer; private float m_chargeTime; private float m_cachedKnockback; private float m_cachedDamage; private VFXPool m_cachedVfx; private VFXPool m_cachedNonActorWallVfx; private float m_currentSpeed; private float m_chargeDirection; private CellTypes m_cachedPathableTiles; private bool m_cachedDoDustUps; private float m_cachedDustUpInterval; private PixelCollider m_enemyCollider; private PixelCollider m_enemyHitbox; private PixelCollider m_projectileCollider; private GameObject m_trailVfx; private Vector2 m_collisionNormal; private FireState m_state; private ImprovedAfterImage m_shadowTrail_2; private FireState State { get { //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_000a: Unknown result type (might be due to invalid IL or missing references) return m_state; } set { //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_0014: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (m_state != value) { EndState(m_state); m_state = value; BeginState(m_state); } } } public override void Start() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Invalid comparison between Unknown and I4 //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Invalid comparison between Unknown and I4 ((BasicAttackBehavior)this).Start(); m_cachedKnockback = ((BehaviorBase)this).m_aiActor.CollisionKnockbackStrength; m_cachedDamage = ((BehaviorBase)this).m_aiActor.CollisionDamage; m_cachedVfx = ((BehaviorBase)this).m_aiActor.CollisionVFX; m_cachedNonActorWallVfx = ((BehaviorBase)this).m_aiActor.NonActorCollisionVFX; m_cachedPathableTiles = ((BehaviorBase)this).m_aiActor.PathableTiles; m_cachedDoDustUps = ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps; m_cachedDustUpInterval = ((GameActor)((BehaviorBase)this).m_aiActor).DustUpInterval; m_shadowTrail_2 = ((Component)((BehaviorBase)this).m_aiActor).GetComponent(); 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 (!collidesWithDodgeRollingPlayers) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OnPreRigidbodyCollision)); } } public override void Upkeep() { ((BasicAttackBehavior)this).Upkeep(); ((BehaviorBase)this).DecrementTimer(ref m_timer, false); } public override BehaviorResult Update() { //IL_0002: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Invalid comparison between Unknown and I4 //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) ((BasicAttackBehavior)this).Update(); if (!m_initialized) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.OnCollision = (Action)Delegate.Combine(specRigidbody.OnCollision, new Action(OnCollision)); m_initialized = true; } BehaviorResult val = ((BasicAttackBehavior)this).Update(); if ((int)val > 0) { return val; } if (!((AttackBehaviorBase)this).IsReady()) { return (BehaviorResult)0; } if (!Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { return (BehaviorResult)0; } Vector2 val2 = ((BraveBehaviour)((BehaviorBase)this).m_aiActor.TargetRigidbody).specRigidbody.GetUnitCenter((ColliderType)2); if (leadAmount > 0f) { Vector2 val3 = val2 + ((BraveBehaviour)((BehaviorBase)this).m_aiActor.TargetRigidbody).specRigidbody.Velocity * 0.75f; val3 = BraveMathCollege.GetPredictedPosition(val2, ((BehaviorBase)this).m_aiActor.TargetVelocity, ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter, chargeSpeed); val2 = Vector2.Lerp(val2, val3, leadAmount); } float num = Vector2.Distance(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter, val2); if (num > minRange) { if (!string.IsNullOrEmpty(primeAnim) || primeTime > 0f) { State = (FireState)1; } else { State = (FireState)2; } ((BehaviorBase)this).m_updateEveryFrame = true; return (BehaviorResult)4; } return (BehaviorResult)0; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Invalid comparison between Unknown and I4 //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Invalid comparison between Unknown and I4 //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Invalid comparison between Unknown and I4 //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) if ((int)State == 1) { if (!Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { return (ContinuousBehaviorResult)1; } if (m_timer > 0f) { float facingDirection = ((BehaviorBase)this).m_aiAnimator.FacingDirection; float num = Vector2Extensions.ToAngle(((BraveBehaviour)((BehaviorBase)this).m_aiActor.TargetRigidbody).specRigidbody.GetUnitCenter((ColliderType)2) - ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter); float num2 = BraveMathCollege.ClampAngle180(num - facingDirection); float facingDirection2 = facingDirection + Mathf.Lerp(0f, num2, ((BehaviorBase)this).m_deltaTime / (m_timer + ((BehaviorBase)this).m_deltaTime)); ((BehaviorBase)this).m_aiAnimator.FacingDirection = facingDirection2; } if (!stopDuringPrime) { float magnitude = ((Vector2)(ref ((BehaviorBase)this).m_aiActor.BehaviorVelocity)).magnitude; float num3 = Mathf.Lerp(magnitude, 0f, ((BehaviorBase)this).m_deltaTime / (m_timer + ((BehaviorBase)this).m_deltaTime)); ((BehaviorBase)this).m_aiActor.BehaviorVelocity = BraveMathCollege.DegreesToVector(((BehaviorBase)this).m_aiAnimator.FacingDirection, num3); } if ((primeTime <= 0f) ? (!((BehaviorBase)this).m_aiAnimator.IsPlaying(primeAnim)) : (m_timer <= 0f)) { Parried = false; State = (FireState)2; } } else if ((int)State == 2) { if (chargeAcceleration > 0f) { m_currentSpeed = Mathf.Min(chargeSpeed, m_currentSpeed + chargeAcceleration * ((BehaviorBase)this).m_deltaTime); ((BehaviorBase)this).m_aiActor.BehaviorVelocity = BraveMathCollege.DegreesToVector(m_chargeDirection, m_currentSpeed); } if (endWhenChargeAnimFinishes && !((BehaviorBase)this).m_aiAnimator.IsPlaying(chargeAnim)) { return (ContinuousBehaviorResult)1; } if (maxChargeDistance > 0f) { m_chargeTime += ((BehaviorBase)this).m_deltaTime; if (m_chargeTime * chargeSpeed > maxChargeDistance) { return (ContinuousBehaviorResult)1; } } } else if ((int)State == 3) { if (!((BehaviorBase)this).m_aiAnimator.IsPlaying(hitAnim) | !((BehaviorBase)this).m_aiAnimator.IsPlaying(parryAnim)) { return (ContinuousBehaviorResult)1; } } else if ((int)State == 0) { return (ContinuousBehaviorResult)1; } return (ContinuousBehaviorResult)0; } public override void EndContinuousUpdate() { ((BehaviorBase)this).EndContinuousUpdate(); ((BehaviorBase)this).m_updateEveryFrame = false; State = (FireState)0; ((BasicAttackBehavior)this).UpdateCooldowns(); } public override void Destroy() { if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.OnPostRigidbodyMovement = (Action)Delegate.Remove(specRigidbody.OnPostRigidbodyMovement, new Action(OnPostRigidbodyMovement)); } ((BehaviorBase)this).Destroy(); } private void Fire() { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent(ShootPoint); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = bulletScript; m_bulletSource.Initialize(); } private void FireCollision() { if (!Parried) { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent(ShootPoint); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = CollisionBulletScript; m_bulletSource.Initialize(); } } private void FireInterrupt() { if (interruptScript != null && Parried) { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent(ShootPoint); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = interruptScript; m_bulletSource.Initialize(); } } private void OnPreRigidbodyCollision(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)m_state == 2) { GameActor gameActor = ((BraveBehaviour)otherRigidbody).gameActor; PlayerController val = (PlayerController)(object)((gameActor is PlayerController) ? gameActor : null); if (Object.op_Implicit((Object)(object)val) && ((BraveBehaviour)val).spriteAnimator.QueryInvulnerabilityFrame()) { PhysicsEngine.SkipCollision = true; } } } private void OnCollision(CollisionData collisionData) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) if ((int)State != 2 || ((BraveBehaviour)((BehaviorBase)this).m_aiActor).healthHaver.IsDead) { return; } if (Object.op_Implicit((Object)(object)collisionData.OtherRigidbody)) { Projectile projectile = ((BraveBehaviour)collisionData.OtherRigidbody).projectile; if (Object.op_Implicit((Object)(object)projectile)) { if (m_currentSpeed < chargeAcceleration / 3f) { return; } Parried = true; FireInterrupt(); if (!(projectile.Owner is PlayerController) || !stoppedByProjectiles) { return; } } } if (!string.IsNullOrEmpty(hitAnim) | !string.IsNullOrEmpty(parryAnim)) { State = (FireState)3; } else { State = (FireState)0; } if (switchCollidersOnCharge) { PhysicsEngine.CollisionHaltsVelocity = true; PhysicsEngine.HaltRemainingMovement = true; PhysicsEngine.PostSliceVelocity = Vector2.zero; m_collisionNormal = ((CastResult)collisionData).Normal; SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.OnPostRigidbodyMovement = (Action)Delegate.Combine(specRigidbody.OnPostRigidbodyMovement, new Action(OnPostRigidbodyMovement)); } if (!Object.op_Implicit((Object)(object)collisionData.OtherRigidbody) || !Object.op_Implicit((Object)(object)((BraveBehaviour)collisionData.OtherRigidbody).knockbackDoer)) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).knockbackDoer.ApplyKnockback(((CastResult)collisionData).Normal, wallRecoilForce, false); } } public void OnPostRigidbodyMovement(SpeculativeRigidbody specRigidbody, Vector2 unitDelta, IntVector2 pixelDelta) { //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.m_behaviorSpeculator)) { return; } List list = new List(); bool flag = false; if (PhysicsEngine.Instance.OverlapCast(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody, list, true, true, (int?)null, (int?)null, false, (Vector2?)null, (Func)null, (SpeculativeRigidbody[])(object)new SpeculativeRigidbody[0])) { for (int i = 0; i < list.Count; i++) { SpeculativeRigidbody otherRigidbody = list[i].OtherRigidbody; if (Object.op_Implicit((Object)(object)otherRigidbody) && Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).transform.parent) && (Object.op_Implicit((Object)(object)((Component)((BraveBehaviour)otherRigidbody).transform.parent).GetComponent()) || Object.op_Implicit((Object)(object)((Component)((BraveBehaviour)otherRigidbody).transform.parent).GetComponent()))) { flag = true; break; } } } if (flag) { if (m_collisionNormal.y >= 0.5f) { Transform transform = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform; transform.position += new Vector3(0f, 0.5f); } if (m_collisionNormal.x <= -0.5f) { Transform transform2 = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform; transform2.position += new Vector3(-0.3125f, 0f); } if (m_collisionNormal.x >= 0.5f) { Transform transform3 = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform; transform3.position += new Vector3(0.3125f, 0f); } ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.Reinitialize(); } else { PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody, (int?)null, false); } SpeculativeRigidbody specRigidbody2 = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody2.OnPostRigidbodyMovement = (Action)Delegate.Remove(specRigidbody2.OnPostRigidbodyMovement, new Action(OnPostRigidbodyMovement)); } private void BeginState(FireState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Invalid comparison between Unknown and I4 //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Invalid comparison between Unknown and I4 //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Invalid comparison between Unknown and I4 //IL_0191: 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_01ac: 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_01c8: 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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0200: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Expected O, but got Unknown //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Expected O, but got Unknown //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) if ((int)state == 0) { if (HideGun) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(true, "ChargeBehavior"); } ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = false; ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; } else if ((int)state == 1) { if (HideGun) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(false, "ChargeBehavior"); } ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(primeAnim, true, (string)null, -1f, false); if (primeTime > 0f) { m_timer = primeTime; } else { m_timer = ((BehaviorBase)this).m_aiAnimator.CurrentClipLength; } if (stopDuringPrime) { ((BehaviorBase)this).m_aiActor.ClearPath(); ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; ((BehaviorBase)this).m_aiActor.BehaviorVelocity = Vector2.zero; } else { ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; ((BehaviorBase)this).m_aiActor.BehaviorVelocity = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.Velocity; } } else if ((int)state == 2) { if (HideGun) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(false, "ChargeBehavior"); } if (Object.op_Implicit((Object)(object)m_shadowTrail_2)) { m_shadowTrail_2.spawnShadows = true; } m_chargeTime = 0f; Vector2 val = ((BraveBehaviour)((BehaviorBase)this).m_aiActor.TargetRigidbody).specRigidbody.GetUnitCenter((ColliderType)2); if (leadAmount > 0f) { Vector2 val2 = val + ((BraveBehaviour)((BehaviorBase)this).m_aiActor.TargetRigidbody).specRigidbody.Velocity * 0.75f; val2 = BraveMathCollege.GetPredictedPosition(val, ((BehaviorBase)this).m_aiActor.TargetVelocity, ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter, chargeSpeed); val = Vector2.Lerp(val, val2, leadAmount); } ((BehaviorBase)this).m_aiActor.ClearPath(); ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; m_currentSpeed = ((chargeAcceleration <= 0f) ? chargeSpeed : 0f); m_chargeDirection = Vector2Extensions.ToAngle(val - ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter); ((BehaviorBase)this).m_aiActor.BehaviorVelocity = BraveMathCollege.DegreesToVector(m_chargeDirection, m_currentSpeed); ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = true; ((BehaviorBase)this).m_aiAnimator.FacingDirection = m_chargeDirection; ((BehaviorBase)this).m_aiActor.CollisionKnockbackStrength = chargeKnockback; ((BehaviorBase)this).m_aiActor.CollisionDamage = chargeDamage; if (Object.op_Implicit((Object)(object)hitVfx)) { VFXObject val3 = new VFXObject(); val3.effect = hitVfx; VFXComplex val4 = new VFXComplex(); val4.effects = (VFXObject[])(object)new VFXObject[1] { val3 }; VFXPool val5 = new VFXPool(); val5.type = (VFXPoolType)4; val5.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; ((BehaviorBase)this).m_aiActor.CollisionVFX = val5; } if (Object.op_Implicit((Object)(object)nonActorHitVfx)) { VFXObject val6 = new VFXObject(); val6.effect = nonActorHitVfx; VFXComplex val7 = new VFXComplex(); val7.effects = (VFXObject[])(object)new VFXObject[1] { val6 }; VFXPool val8 = new VFXPool(); val8.type = (VFXPoolType)4; val8.effects = (VFXComplex[])(object)new VFXComplex[1] { val7 }; ((BehaviorBase)this).m_aiActor.NonActorCollisionVFX = val8; } ((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 = chargeDustUps; ((GameActor)((BehaviorBase)this).m_aiActor).DustUpInterval = chargeDustUpInterval; ((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, m_chargeDirection)); 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(); if ((Object)(object)component != (Object)null) { component.Awake(); } } if (bulletScript != null && !bulletScript.IsNull) { Fire(); } ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.ForceRegenerate((bool?)null, (bool?)null); } else if ((int)state == 3) { if (Object.op_Implicit((Object)(object)m_shadowTrail_2)) { m_shadowTrail_2.spawnShadows = false; } ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(Parried ? parryAnim : hitAnim, true, (string)null, 1f, false); if (CollisionBulletScript != null && !CollisionBulletScript.IsNull) { FireCollision(); } } } private void EndState(FireState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) if ((int)state != 2) { 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; ((BehaviorBase)this).m_aiActor.NonActorCollisionVFX = m_cachedNonActorWallVfx; if (Object.op_Implicit((Object)(object)m_trailVfx)) { ParticleKiller component = m_trailVfx.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.StopEmitting(); } else { SpawnManager.Despawn(m_trailVfx); } m_trailVfx = null; } ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps = m_cachedDoDustUps; ((GameActor)((BehaviorBase)this).m_aiActor).DustUpInterval = m_cachedDustUpInterval; ((BehaviorBase)this).m_aiActor.PathableTiles = m_cachedPathableTiles; if (switchCollidersOnCharge) { m_enemyCollider.CollisionLayer = (CollisionLayer)3; m_enemyHitbox.Enabled = true; m_projectileCollider.Enabled = false; } if ((Object)(object)m_bulletSource != (Object)null) { m_bulletSource.ForceStop(); } ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(chargeAnim); } } public class EnergyShield : AIActor { public class EnergyShieldBehavior : BraveBehaviour { private class EnergyShieldProtection : MonoBehaviour { public GameObject sparkOctantVFX; private GameObject VFX; public float pushRadius; public float secondRadius; public float finalRadius; public float pushStrength; public AIActor user; public void KaBlewy() { ((BraveBehaviour)user).healthHaver.AllDamageMultiplier = 1.35f; VFX.GetComponent().Stop(); VFX.GetComponent().PlayAndDestroyObject("end", (Action)null); Object.Destroy((Object)(object)this, 0f); } public void Start() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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) ((BraveBehaviour)user).healthHaver.AllDamageMultiplier = 0f; VFX = Object.Instantiate(VFX_Object, Vector2.op_Implicit(((BraveBehaviour)user).sprite.WorldCenter), Quaternion.identity); Vector3 val = Vector2Extensions.ToVector3ZUp(((BraveBehaviour)user).sprite.WorldCenter, 0f); VFX.GetComponent().PlaceAtPositionByAnchor(val + new Vector3(0f, 0f), (Anchor)4); VFX.transform.parent = ((BraveBehaviour)user).transform; VFX.GetComponent().HeightOffGround = 0.2f; ((BraveBehaviour)user).sprite.AttachRenderer(VFX.GetComponent()); } public void Update() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0258: 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_0266: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) float num = pushRadius * pushRadius; float num2 = secondRadius * secondRadius; float num3 = finalRadius * finalRadius; float num4 = pushStrength * ((float)Math.PI / 180f); List list = new List(); List list2 = new List(); GameObject[] array = (GameObject[])(object)new GameObject[8]; Vector2 centerPosition = ((GameActor)user).CenterPosition; List list3 = StaticReferenceManager.AllProjectiles.ToList(); for (int i = 0; i < list3.Count(); i++) { Projectile val = list3[i]; if (!(val.Owner is PlayerController)) { continue; } Vector2 worldCenter = ((BraveBehaviour)val).sprite.WorldCenter; Vector2 val2 = worldCenter - centerPosition; float num5 = Vector2.SqrMagnitude(val2); if (num5 < num && !list.Contains(val)) { val.RemoveBulletScriptControl(); list.Add(val); list2.Add(val.Direction); int num6 = BraveMathCollege.VectorToOctant(val2); if ((Object)(object)array[num6] == (Object)null) { AkSoundEngine.PostEvent("Play_WPN_beam_slash_01", ((Component)user).gameObject); array[num6] = ((GameActor)user).PlayEffectOnActor(sparkOctantVFX, Vector3.zero, true, true, false); array[num6].transform.rotation = Quaternion.Euler(0f, 0f, (float)(-45 + -45 * num6)); } } } for (int j = 0; j < list.Count; j++) { Projectile val3 = list[j]; if (!Object.op_Implicit((Object)(object)val3)) { list.RemoveAt(j); list2.RemoveAt(j); j--; continue; } Vector2 worldCenter2 = ((BraveBehaviour)val3).sprite.WorldCenter; Vector2 val4 = centerPosition - worldCenter2; float num7 = Vector2.SqrMagnitude(val4); if (num7 > num3) { list.RemoveAt(j); list2.RemoveAt(j); j--; continue; } Vector2 val5; if (num7 > num2) { val5 = Vector3Extensions.XY(Vector3.RotateTowards(Vector2.op_Implicit(val3.Direction), Vector2.op_Implicit(list2[j]), num4 * BraveTime.DeltaTime * 0.5f, 0f)); val3.Direction = ((Vector2)(ref val5)).normalized; continue; } Vector2 val6 = val4 * -1f; float num8 = 1f; if (num7 / num < 0.75f) { num8 = 3f; } Vector2 normalized = ((Vector2)(ref val6)).normalized; val5 = list2[j]; val5 = (normalized + ((Vector2)(ref val5)).normalized) / 2f; val6 = ((Vector2)(ref val5)).normalized; val5 = Vector3Extensions.XY(Vector3.RotateTowards(Vector2.op_Implicit(val3.Direction), Vector2.op_Implicit(val6), num4 * BraveTime.DeltaTime * num8, 0f)); val3.Direction = ((Vector2)(ref val5)).normalized; } for (int k = 0; k < 8; k++) { if ((Object)(object)array[k] != (Object)null && !Object.op_Implicit((Object)(object)array[k])) { array[k] = null; } } } public EnergyShieldProtection() { ref GameObject reference = ref sparkOctantVFX; PickupObject byId = PickupObjectDatabase.GetById(105); reference = ((FortuneFavorItem)((byId is FortuneFavorItem) ? byId : null)).sparkOctantVFX; pushRadius = 4f; secondRadius = 6f; finalRadius = 8f; pushStrength = 120f; ((MonoBehaviour)this)..ctor(); } } private RoomHandler room; public string GUID_To_Shield; private AIActor enemyShielded; public GlobalMessageRadio.MessageContainer container; private GameObject laser; private GameObject ZZap; private bool STOP = false; private static bool DebugCheck; private static bool DebugCheck2; private Dictionary dist = new Dictionary(); private bool ShouldCountForRoomProgress() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 if ((int)((BraveBehaviour)this).aiActor.State != 2) { return false; } if (room == null) { if (DebugCheck) { Debug.Log((object)1); } return false; } if (room.remainingReinforcementLayers == null) { if (DebugCheck) { Debug.Log((object)2); } return false; } bool flag = true; if (room.remainingReinforcementLayers.Count == 0) { flag = false; } List theseActiveEnemies = GetTheseActiveEnemies(room, (ActiveEnemyType)0); for (int num = theseActiveEnemies.Count - 1; num > -1; num--) { if (((Object)(object)((Component)theseActiveEnemies[num]).GetComponent() != (Object)null) | ((Object)(object)((Component)theseActiveEnemies[num]).GetComponent() != (Object)null)) { if (DebugCheck2) { Debug.Log((object)"D1"); } theseActiveEnemies.RemoveAt(num); } } if (theseActiveEnemies.Count == 0 && flag) { if (DebugCheck) { Debug.Log((object)3); } return false; } if (theseActiveEnemies.Count > 0 && flag) { if (DebugCheck) { Debug.Log((object)3.5f); } return true; } if (theseActiveEnemies.Count > 0 && !flag) { if (DebugCheck) { Debug.Log((object)4); } return false; } if (theseActiveEnemies.Count == 0 && !flag) { if (DebugCheck) { Debug.Log((object)5); } return false; } if (DebugCheck) { Debug.Log((object)6); } return false; } public List GetTheseActiveEnemies(RoomHandler room, ActiveEnemyType type) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 List list = new List(); if (room.activeEnemies == null) { return list; } if ((int)type == 1) { for (int i = 0; i < room.activeEnemies.Count; i++) { if (!room.activeEnemies[i].IgnoreForRoomClear) { list.Add(room.activeEnemies[i]); } } } else { list.AddRange(room.activeEnemies); } return list; } private void Start() { room = ((DungeonPlaceableBehaviour)((BraveBehaviour)this).aiActor).GetAbsoluteParentRoom(); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { }; } private IEnumerator WAIT() { float f = 0f; while (f < 0.25f) { ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = false; f += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth = 0f; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.ApplyDamage(1000f, Vector2.zero, "DIE", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } public void Update() { //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Invalid comparison between Unknown and I4 //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).aiActor == (Object)null) { return; } if (((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.GetCurrentHealth() == ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth && !STOP) { STOP = true; if ((Object)(object)enemyShielded != (Object)null && (Object)(object)((Component)enemyShielded).GetComponent() != (Object)null) { enemyShielded.IgnoreForRoomClear = false; Object.Destroy((Object)(object)laser); ((Component)enemyShielded).GetComponent().KaBlewy(); } if ((Object)(object)ZZap != (Object)null) { ZZap.GetComponent().PlayAndDestroyObject("end", (Action)null); } GameObject val = Object.Instantiate(RobotMiniMecha.KaboomObject, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldBottomLeft - new Vector2(0.5f, 0.125f)), Quaternion.identity); val.GetComponent().PlayAndDestroyObject("kaboom", (Action)null); ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = false; ((MonoBehaviour)this).StartCoroutine(WAIT()); } bool ignoreForRoomClear = ShouldCountForRoomProgress(); if (STOP) { return; } ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = ignoreForRoomClear; if ((Object)(object)enemyShielded != (Object)null) { enemyShielded.IgnoreForRoomClear = ignoreForRoomClear; } if ((int)((BraveBehaviour)this).aiActor.State == 2 && (Object)(object)enemyShielded == (Object)null) { List activeEnemies = room.GetActiveEnemies((ActiveEnemyType)1); if (activeEnemies == null) { return; } dist = new Dictionary(); for (int num = activeEnemies.Count - 1; num > -1; num--) { if (activeEnemies[num].EnemyGuid == GUID_To_Shield && (int)activeEnemies[num].State == 2 && (Object)(object)((Component)activeEnemies[num]).GetComponent() == (Object)null) { dist.Add(Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)this).transform), TransformExtensions.PositionVector2(((BraveBehaviour)activeEnemies[num]).transform)), activeEnemies[num]); } } if (dist.Count > 0) { AIActor val2 = dist[dist.Keys.Min()]; enemyShielded = dist[dist.Keys.Min()]; EnergyShieldProtection energyShieldProtection = ((Component)enemyShielded).gameObject.AddComponent(); energyShieldProtection.user = enemyShielded; if ((Object)(object)ZZap != (Object)null) { ZZap.GetComponent().PlayAndDestroyObject("end", (Action)null); } ZZap = Object.Instantiate(VFX_Object_Electric, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldBottomLeft - new Vector2(0.5f, 0.125f)), Quaternion.identity); ZZap.transform.parent = ((BraveBehaviour)this).transform; } } else if ((Object)(object)enemyShielded != (Object)null) { if ((Object)(object)laser == (Object)null) { laser = Object.Instantiate(VFX_Object_Tether, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter + new Vector2(0f, 0.5f)), Quaternion.identity); tk2dTiledSprite component = laser.GetComponent(); component.dimensions = new Vector2(16f * Vector2.Distance(((BraveBehaviour)this).sprite.WorldCenter, ((BraveBehaviour)enemyShielded).sprite.WorldCenter), 16f); ((tk2dBaseSprite)component).ShouldDoTilt = false; GameObjectExtensions.SetLayerRecursively(laser, LayerMask.NameToLayer("FG_Nonsense")); } tk2dTiledSprite component2 = laser.GetComponent(); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, ReturnAngle(enemyShielded)); component2.dimensions = new Vector2(16f * Vector2.Distance(((BraveBehaviour)this).sprite.WorldCenter, ((BraveBehaviour)enemyShielded).sprite.WorldCenter), 16f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((BraveBehaviour)component2).transform.localPosition = Vector3Extensions.WithZ(new Vector3(0f, 0f), 1000f); laser.transform.position = Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter); } } public float ReturnAngle(AIActor enemy) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)enemy == (Object)null) { return 0f; } return Vector2Extensions.ToAngle(((BraveBehaviour)enemy).sprite.WorldCenter - ((BraveBehaviour)this).sprite.WorldCenter); } } private static GameObject prefab; public static readonly string guid = "EnergyShield_MDLR"; private static GameObject VFX_Object; private static GameObject VFX_Object_Electric; private static GameObject VFX_Object_Tether; public static void BuildPrefab(string GUID) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Expected O, but got Unknown //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Expected O, but got Unknown //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Expected O, but got Unknown //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Expected O, but got Unknown //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Expected O, but got Unknown //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Expected O, but got Unknown //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Expected O, but got Unknown //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_0944: Expected O, but got Unknown //IL_0abb: Unknown result type (might be due to invalid IL or missing references) //IL_0ac5: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid + "_(" + GUID + ")")) { prefab = EnemyBuilder.BuildPrefabBundle("Energy Shield", guid + "_(" + GUID + ")", StaticCollections.Enemy_Collection, "gunnermech_die_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); EnergyShieldBehavior energyShieldBehavior = prefab.AddComponent(); energyShieldBehavior.GUID_To_Shield = GUID; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).knockbackDoer.weight = 50000f; ((BraveBehaviour)energyShieldBehavior).aiActor.MovementSpeed = 1f; ((BraveBehaviour)energyShieldBehavior).aiActor.CollisionDamage = 0f; ((GameActor)((BraveBehaviour)energyShieldBehavior).aiActor).HasShadow = false; ((BraveBehaviour)energyShieldBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)energyShieldBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).healthHaver.ForceSetCurrentHealth(14f); ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).healthHaver.minimumHealth = 1f; ((BraveBehaviour)energyShieldBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)energyShieldBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)energyShieldBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)energyShieldBehavior).aiActor).HasShadow = true; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).healthHaver.flashesOnDamage = true; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)energyShieldBehavior).aiActor.PathableTiles = (CellTypes)2; ((GameActor)((BraveBehaviour)energyShieldBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).healthHaver.SetHealthMaximum(14f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).specRigidbody.PixelColliders.Clear(); ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 1, ManualWidth = 16, ManualHeight = 16, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 1, ManualWidth = 16, ManualHeight = 16, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)energyShieldBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)energyShieldBehavior).aiActor.PreventBlackPhantom = false; ((BraveBehaviour)energyShieldBehavior).aiActor.AssignedCurrencyToDrop = 0; AIAnimator aiAnimator = ((BraveBehaviour)energyShieldBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "move"; aiAnimator.MoveAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("EnergyShieldAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "awake", new string[1] { "awaken" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)energyShieldBehavior).spriteAnimator, "awaken", new Dictionary { { 6, "Play_ENM_fs_mimic_03" }, { 10, "Play_WPN_Life_Orb_Shot_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)energyShieldBehavior).spriteAnimator, "death", new Dictionary { { 1, "Play_OBJ_turret_set_01" }, { 4, "Play_WPN_blackhole_impact_01" } }); ((BraveBehaviour)energyShieldBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)1; ((BraveBehaviour)energyShieldBehavior).aiActor.reinforceType = (ReinforceType)1; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; component2.MovementBehaviors = new List(); component2.AttackBehaviorGroup.AttackBehaviors = new List(); component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val2 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val2.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).aiActor).sprite).renderer.material.mainTexture; val2.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val2.SetFloat("_EmissiveColorPower", 1.55f); val2.SetFloat("_EmissivePower", 100f); val2.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)energyShieldBehavior).sprite).renderer.material = val2; GameObject val3 = new GameObject("Shield VFX"); Object.DontDestroyOnLoad((Object)(object)val3); FakePrefab.MarkAsFakePrefab(val3); val3.SetActive(false); tk2dSprite val4 = val3.AddComponent(); ((tk2dBaseSprite)val4).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val4).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("protecc")); tk2dSpriteAnimator val5 = val3.AddComponent(); val5.Library = Module.ModularAssetBundle.LoadAsset("CoolioAnimation").GetComponent(); val5.defaultClipId = val5.Library.GetClipIdByName("start"); val5.playAutomatically = true; ((tk2dBaseSprite)val4).usesOverrideMaterial = true; ((BraveBehaviour)val4).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val4).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val4).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val4).renderer.material.SetFloat("_EmissiveColorPower", 30f); GameObjectExtensions.SetLayerRecursively(((Component)val4).gameObject, LayerMask.NameToLayer("FG_Critical")); ExpandReticleRiserEffect expandReticleRiserEffect = val3.gameObject.AddComponent(); expandReticleRiserEffect.RiserHeight = 2.5f; expandReticleRiserEffect.RiseTime = 2f; expandReticleRiserEffect.NumRisers = 3; expandReticleRiserEffect.UpdateSpriteDefinitions = true; expandReticleRiserEffect.CurrentSpriteName = "protecc"; VFX_Object = val3; GameObject val6 = new GameObject("Electric Bubble"); Object.DontDestroyOnLoad((Object)(object)val6); FakePrefab.MarkAsFakePrefab(val6); val6.SetActive(false); tk2dSprite val7 = val6.AddComponent(); ((tk2dBaseSprite)val7).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val7).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("bigenergyball_001")); tk2dSpriteAnimator val8 = val6.AddComponent(); val8.Library = Module.ModularAssetBundle.LoadAsset("SuperChargeAnimation").GetComponent(); val8.defaultClipId = val8.Library.GetClipIdByName("start"); val8.playAutomatically = true; ((tk2dBaseSprite)val7).usesOverrideMaterial = true; ((BraveBehaviour)val7).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val7).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val7).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val7).renderer.material.SetFloat("_EmissiveColorPower", 30f); GameObjectExtensions.SetLayerRecursively(((Component)val7).gameObject, LayerMask.NameToLayer("FG_Critical")); VFX_Object_Electric = val6; GameObject val9 = new GameObject("Electric Tether"); Object.DontDestroyOnLoad((Object)(object)val9); FakePrefab.MarkAsFakePrefab(val9); val9.SetActive(false); tk2dTiledSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("tether_001")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("TetherAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("idle"); val11.playAutomatically = true; ((tk2dBaseSprite)val10).usesOverrideMaterial = true; ((BraveBehaviour)val10).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val10).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val10).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val10).renderer.material.SetFloat("_EmissiveColorPower", 30f); GameObjectExtensions.SetLayerRecursively(((Component)val10).gameObject, LayerMask.NameToLayer("Unoccluded")); VFX_Object_Tether = val9; Game.Enemies.Add("mdlr:energy_shield_(" + GUID + ")", ((BraveBehaviour)energyShieldBehavior).aiActor); if ((Object)(object)((Component)energyShieldBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)energyShieldBehavior).GetComponent()); } ((BraveBehaviour)energyShieldBehavior).encounterTrackable = ((Component)energyShieldBehavior).gameObject.AddComponent(); ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)energyShieldBehavior).encounterTrackable.EncounterGuid = "mdlr:energy_shield_(" + GUID + ")"; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#ENERGYSHIELDER_NAME", "Energy Shielder"); ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#ENERGYSHIELDER_NAME"; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)energyShieldBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)energyShieldBehavior).healthHaver); } } } public class Burster : AIActor { public class LaserDiodeBehavior : BraveBehaviour { private void Start() { } } public class PewPew : Script { public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_WPN_elephantgun_shot_01", (string)null); for (int i = 0; i < 8; i++) { ((Bullet)this).Fire(new Direction((float)(45 * i - 4), (DirectionType)1, -1f), new Speed(7.5f, (SpeedType)0), new Bullet("poundSmall", false, false, false)); ((Bullet)this).Fire(new Direction((float)(45 * i), (DirectionType)1, -1f), new Speed(7.5f, (SpeedType)0), new Bullet("poundSmall", false, false, false)); ((Bullet)this).Fire(new Direction((float)(45 * i + 4), (DirectionType)1, -1f), new Speed(7.5f, (SpeedType)0), new Bullet("poundSmall", false, false, false)); } yield break; } } public class DeathPew : Script { public class DeathBurst : Bullet { public DeathBurst() : base("poundSmall", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(0.1f, (SpeedType)0), 240); yield return ((Bullet)this).Wait(600); ((Bullet)this).Vanish(false); } } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_WPN_elephantgun_shot_01", (string)null); for (int t = 0; t < 3; t++) { for (int i = 0; i < 8; i++) { ((Bullet)this).Fire(new Direction((float)(45 * i), (DirectionType)1, -1f), new Speed(4f + 1f * (float)t, (SpeedType)0), (Bullet)(object)new DeathBurst()); ((Bullet)this).Fire(new Direction((float)(45 * i + 1), (DirectionType)1, -1f), new Speed(3f + 1f * (float)t, (SpeedType)0), (Bullet)(object)new DeathBurst()); ((Bullet)this).Fire(new Direction((float)(45 * i - 1), (DirectionType)1, -1f), new Speed(3f + 1f * (float)t, (SpeedType)0), (Bullet)(object)new DeathBurst()); } } yield break; } } private static GameObject prefab; public static readonly string guid = "Burster_MDLR"; public static void BuildPrefab(bool isVertical) { //IL_0055: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: 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_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0317: 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_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Expected O, but got Unknown //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Expected O, but got Unknown //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Expected O, but got Unknown //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Expected O, but got Unknown //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Expected O, but got Unknown //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Expected O, but got Unknown //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Expected O, but got Unknown //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Expected O, but got Unknown //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) //IL_08ab: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Expected O, but got Unknown //IL_09a4: Unknown result type (might be due to invalid IL or missing references) //IL_09ae: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Burster", guid + (isVertical ? "_Vertical" : "_Horizontal"), StaticCollections.Enemy_Collection, "burster_idle_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); LaserDiodeBehavior laserDiodeBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).knockbackDoer.weight = 7500f; ((BraveBehaviour)laserDiodeBehavior).aiActor.MovementSpeed = 0.8f; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)laserDiodeBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).HasShadow = false; ((BraveBehaviour)laserDiodeBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)laserDiodeBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).healthHaver.ForceSetCurrentHealth(36f); ((BraveBehaviour)laserDiodeBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)laserDiodeBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)laserDiodeBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).HasShadow = true; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).SetIsFlying(true, "Gamemode: Creative", true, false); ((BraveBehaviour)laserDiodeBehavior).aiActor.PathableTiles = (CellTypes)6; ((BraveBehaviour)laserDiodeBehavior).aiActor.AssignedCurrencyToDrop = 0; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).healthHaver.SetHealthMaximum(36f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.PixelColliders.Clear(); AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("4d37ce3d666b4ddda8039929225b7ede"); ExplodeOnDeath val = ((Component)laserDiodeBehavior).gameObject.AddComponent(); ExplosionData explosionData = ((Component)orLoadByGuid).GetComponent().explosionData; val.explosionData = explosionData; val.explosionData.damage = 5f; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 5, ManualOffsetY = 4, ManualWidth = 18, ManualHeight = 13, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 5, ManualOffsetY = 4, ManualWidth = 18, ManualHeight = 13, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)laserDiodeBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)laserDiodeBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)laserDiodeBehavior).aiAnimator; DirectionalAnimation val2 = new DirectionalAnimation(); val2.Type = (DirectionType)1; val2.Flipped = (FlipType[])(object)new FlipType[1]; val2.AnimNames = new string[1] { "idle" }; val2.Prefix = "idle"; aiAnimator.IdleAnimation = val2; val2 = new DirectionalAnimation(); val2.Type = (DirectionType)1; val2.Flipped = (FlipType[])(object)new FlipType[1]; val2.AnimNames = new string[1] { "idle" }; val2.Prefix = "idle"; aiAnimator.MoveAnimation = val2; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("BursterBaddieAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "charge", new string[1] { "charge" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "fire", new string[1] { "fire" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)laserDiodeBehavior).spriteAnimator, "death", new Dictionary { { 0, "Play_BOSS_RatMech_Kneel_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)laserDiodeBehavior).spriteAnimator, "charge", new Dictionary { { 0, "Play_WPN_elephantgun_reload_01" } }); ((BraveBehaviour)laserDiodeBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)0; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val3 = new GameObject("fuck"); val3.transform.parent = ((BraveBehaviour)laserDiodeBehavior).transform; val3.transform.position = Vector2.op_Implicit(((BraveBehaviour)laserDiodeBehavior).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)laserDiodeBehavior).transform.Find("fuck")).gameObject; AIActor orLoadByGuid2 = EnemyDatabase.GetOrLoadByGuid("21dd14e5ca2a4a388adab5b11b69a1e1"); AIBeamShooter component3 = ((Component)orLoadByGuid2).GetComponent(); AIBeamShooter2 aIBeamShooter = Toolbox.AddAIBeamShooter2(((BraveBehaviour)laserDiodeBehavior).aiActor, val3.transform, "middle_small_beam", component3.beamProjectile, component3.beamModule); component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; component2.MovementBehaviors = new List { (MovementBehaviorBase)(object)new BursterMoveBehavior { maxMoveSpeed = (isVertical ? new Vector2(1.25f, 1.25f) : new Vector2(1.25f, 1.25f)), moveAcceleration = (isVertical ? new Vector2(0f, 2f) : new Vector2(2f, 0f)) } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val4 = new AttackGroupItem(); val4.Probability = 1f; ShootBehavior val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(PewPew)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 1f; ((BasicAttackBehavior)val5).Cooldown = 2.25f; ((BasicAttackBehavior)val5).CooldownVariance = 0.75f; ((BasicAttackBehavior)val5).InitialCooldown = 0f; val5.TellAnimation = "charge"; val5.PostFireAnimation = "fire"; ((BasicAttackBehavior)val5).RequiresLineOfSight = false; val5.MultipleFireEvents = true; val5.Uninterruptible = false; val4.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "Pewpew Attack"; list.Add(val4); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val6 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val6.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).sprite).renderer.material.mainTexture; val6.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val6.SetFloat("_EmissiveColorPower", 1.55f); val6.SetFloat("_EmissivePower", 100f); val6.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).sprite).renderer.material = val6; ((BraveBehaviour)laserDiodeBehavior).healthHaver.spawnBulletScript = true; ((BraveBehaviour)laserDiodeBehavior).healthHaver.chanceToSpawnBulletScript = 1f; ((BraveBehaviour)laserDiodeBehavior).healthHaver.bulletScriptType = (BulletScriptType)0; ((BraveBehaviour)laserDiodeBehavior).healthHaver.bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(DeathPew)); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundLarge")); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundSmall")); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); Game.Enemies.Add("mdlr:burster" + (isVertical ? "_vertical" : "_horizontal"), ((BraveBehaviour)laserDiodeBehavior).aiActor); if ((Object)(object)((Component)laserDiodeBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)laserDiodeBehavior).GetComponent()); } ((BraveBehaviour)laserDiodeBehavior).encounterTrackable = ((Component)laserDiodeBehavior).gameObject.AddComponent(); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.EncounterGuid = "mdlr:burster" + (isVertical ? "_vertical" : "_horizontal"); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#BURSTER_NAME", "Burster Drone"); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#BURSTER_NAME"; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)laserDiodeBehavior).healthHaver); } } } public class BursterMoveBehavior : MovementBehaviorBase { public Vector2 maxMoveSpeed = new Vector2(3f, 3f); public Vector2 moveAcceleration = new Vector2(2f, 0f); public float ramMultiplier = 3f; private float? m_centerX; private float? m_centerY; public override void Start() { //IL_0020: 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) ((MovementBehaviorBase)this).Start(); ((BehaviorBase)this).m_updateEveryFrame = true; m_centerX = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitCenter.x; m_centerY = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitCenter.y; } public override void Upkeep() { ((MovementBehaviorBase)this).Upkeep(); ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; } public override BehaviorResult Update() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { return (BehaviorResult)0; } Vector2 unitCenter = ((BehaviorBase)this).m_aiActor.TargetRigidbody.UnitCenter; Vector2 zero = Vector2.zero; if (((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitCenter.x < m_centerX.Value - 2f) { zero.x = 1f; } else if (((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitCenter.x > m_centerX.Value + 2f) { zero.x = -1f; } if (((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitCenter.y < m_centerY.Value - 2f) { zero.y = 1f; } else if (((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitCenter.y > m_centerY.Value + 2f) { zero.y = 1f; } bool useRamingSpeed = false; bool useRamingSpeed2 = false; if (unitCenter.x < ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitLeft) { useRamingSpeed = true; zero.x = -1f; } else if (unitCenter.x > ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitRight) { useRamingSpeed = true; zero.x = 1f; } if (unitCenter.y < ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitBottom) { useRamingSpeed2 = true; zero.y = -1f; } else if (unitCenter.y > ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.HitboxPixelCollider.UnitTop) { useRamingSpeed2 = true; zero.y = 1f; } ((BehaviorBase)this).m_aiActor.BehaviorVelocity.x = RamMoveTowards(((BehaviorBase)this).m_aiActor.BehaviorVelocity.x, zero.x * maxMoveSpeed.x, moveAcceleration.x * ((BehaviorBase)this).m_deltaTime, useRamingSpeed); ((BehaviorBase)this).m_aiActor.BehaviorVelocity.y = RamMoveTowards(((BehaviorBase)this).m_aiActor.BehaviorVelocity.y, zero.y * maxMoveSpeed.y, moveAcceleration.y * ((BehaviorBase)this).m_deltaTime, useRamingSpeed2); return (BehaviorResult)0; } private float RamMoveTowards(float current, float target, float maxDelta, bool useRamingSpeed) { float num = target; float num2 = maxDelta; if (useRamingSpeed) { num = target * ramMultiplier; num2 = maxDelta * ramMultiplier; } if ((num < 0f && (current < num || current >= 0f)) || (num > 0f && (current > num || current <= 0f))) { num2 = maxDelta * ramMultiplier; } if (Mathf.Abs(num - current) <= num2) { return num; } return current + Mathf.Sign(num - current) * num2; } } public class SteelPanopticonEngager : CustomEngageDoer { public class FuckOff : Bullet { public FuckOff() : base("BigBlast", false, false, false) { } } public bool isActualFight = false; public void Awake() { ((Behaviour)((Component)((BraveBehaviour)this).aiActor).gameObject.GetComponent()).enabled = false; ((Behaviour)((BraveBehaviour)this).aiActor).enabled = false; ((BraveBehaviour)this).aiActor.CollisionDamage = 0f; ((Behaviour)((BraveBehaviour)this).behaviorSpeculator).enabled = false; ((Behaviour)((BraveBehaviour)this).specRigidbody).enabled = true; ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = true; GlobalMessageRadio.RegisterObjectToRadio(((Component)((BraveBehaviour)this).aiActor).gameObject, new List { "SwitchFlipped" }, RecievedMessage); } public void RecievedMessage(GameObject Obj, string Message) { isActualFight = true; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.AllDamageMultiplier = 3.33f; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth = 30f; ((Component)((BraveBehaviour)this).aiActor).gameObject.GetComponent().isFullFight = true; } public void DoDestroy() { ((MonoBehaviour)this).StartCoroutine(DestroyRing()); } private IEnumerator DestroyRing() { _ = GameManager.Instance.BestActivePlayer.CurrentRoom; float e = 0f; while (e < 0.1f) { e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)this).aiActor.ParentRoom.EndTerrifyingDarkRoom(0.01f, 0.1f, 1f, (string)null); ((Behaviour)((BraveBehaviour)this).specRigidbody).enabled = false; ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.bossHealthBar = (BossBarType)1; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = true; ((Behaviour)((BraveBehaviour)this).aiActor).enabled = true; ((Behaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody).enabled = true; ((GameActor)((BraveBehaviour)this).aiActor).IsGone = false; ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)this).aiActor.ToggleRenderers(true); ((BraveBehaviour)this).aiActor.State = (ActorState)1; ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.OverrideIdleAnimation = null; ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.OverrideMoveAnimation = null; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = false; ((Behaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator).enabled = true; ((BraveBehaviour)this).aiActor.HasBeenEngaged = true; ((BraveBehaviour)this).aiActor.State = (ActorState)2; GameManager.Instance.PreventPausing = false; ((Behaviour)((Component)((BraveBehaviour)this).aiActor).gameObject.GetComponent()).enabled = true; ((Component)((BraveBehaviour)this).aiActor).gameObject.GetComponent().TriggerSequence(GameManager.Instance.BestActivePlayer); GenericIntroDoer component = ((Component)((BraveBehaviour)this).aiActor).gameObject.GetComponent(); component.OnIntroFinished = (Action)Delegate.Combine(component.OnIntroFinished, new Action(OnIntroFinished)); ((GameActor)((BraveBehaviour)this).aiActor).IsGone = false; } public void OnIntroFinished() { ((MonoBehaviour)GameManager.Instance).StartCoroutine(TriggerFakeOut()); } public IEnumerator TriggerFakeOut() { float e = 0f; if (!isActualFight) { while (e < 22f) { e += BraveTime.DeltaTime; yield return null; } } else { while (((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.currentHealth > ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth) { yield return null; } } Vector2 EntrancePosition = ((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter + new Vector2(0f, 20f); Dictionary shitter = new Dictionary(); for (int i = -1; i < 2; i++) { GameObject gameObject = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component2 = gameObject.GetComponent(); ((BraveBehaviour)component2).transform.position = Vector2.op_Implicit(EntrancePosition); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(Vector2.down)); component2.dimensions = new Vector2(1000f, 1f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((tk2dBaseSprite)component2).HeightOffGround = -1f; ((Component)component2).gameObject.layer = 21; Color laser = Color.green; ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 20f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", laser); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", laser); shitter.Add(i, component2); } e = 0f; AkSoundEngine.PostEvent("Play_ENM_hammer_target_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_BOSS_omegaBeam_charge_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); while (e < 3f) { foreach (KeyValuePair entry in shitter) { ((BraveBehaviour)entry.Value).renderer.material.SetFloat("_EmissivePower", 10f * e); ((BraveBehaviour)entry.Value).renderer.material.SetFloat("_EmissiveColorPower", 25f * e); if (e < 1.5f) { ((Component)entry.Value).gameObject.transform.position = Vector2.op_Implicit(Vector2.Lerp(EntrancePosition, EntrancePosition + new Vector2(1.5f * (float)entry.Key, 0f), Toolbox.SinLerpTValue(e * 0.66f))); } if (e > 2f) { bool enabled = e % 0.2f > 0.1f; ((BraveBehaviour)entry.Value).renderer.enabled = enabled; } } e += BraveTime.DeltaTime; yield return null; } foreach (KeyValuePair item in shitter) { Object.Destroy((Object)(object)((Component)item.Value).gameObject); } ((BraveBehaviour)((BraveBehaviour)this).aiActor).behaviorSpeculator.InterruptAndDisable(); StaticReferenceManager.DestroyAllEnemyProjectiles(); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); PickupObject byId = PickupObjectDatabase.GetById(443); GameObject ob = Object.Instantiate(((TargetedAttackPlayerItem)((byId is TargetedAttackPlayerItem) ? byId : null)).strikeExplosionData.effect, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter), Quaternion.identity); Object.Destroy((Object)(object)ob, 7f); GameObject spawnedBulletOBJ = SpawnManager.SpawnProjectile(((Component)SteelPanopticon.MegaFuckingLaser).gameObject, Vector2.op_Implicit(EntrancePosition - new Vector2(0f, 3f)), Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(Vector2.down)), true); Projectile component = spawnedBulletOBJ.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)((BraveBehaviour)this).aiActor; component.Shooter = ((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody; component.IgnoreTileCollisionsFor(120f); component.baseData.speed = 150f; component.UpdateSpeed(); component.baseData.range = 100f; } ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.minimumHealth = 500f; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.ApplyDamage(1500f, EntrancePosition, "A Terrific Entrance", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); AkSoundEngine.PostEvent("Stop_MUS_All", ((Component)this).gameObject); e = 0f; while (e < 0.166f) { e += BraveTime.DeltaTime; yield return null; } Pixelator.Instance.FadeToColor(0.5f, Color.white, true, 0.25f); ((Behaviour)((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator).behaviorSpeculator).enabled = false; ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.EndAnimation(); ((Behaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator).enabled = false; ((BraveBehaviour)((BraveBehaviour)this).aiActor).spriteAnimator.Play("ultrakill"); GameManager.Instance.PreventPausing = true; GameUIRoot.Instance.ToggleLowerPanels(false, false, string.Empty); Minimap.Instance.ToggleMinimap(false, false); GameManager.IsBossIntro = true; GameUIBossHealthController gameUIBossHealthController = GameUIRoot.Instance.bossController; gameUIBossHealthController.DisableBossHealth(); ((Component)((BraveBehaviour)this).aiActor).gameObject.layer = 21; GameUIRoot.Instance.HideCoreUI("PainAndAgony"); ((BraveBehaviour)this).aiActor.ParentRoom.BecomeTerrifyingDarkRoom(2f, 0.4f, 0.1f, (string)null); e = 0f; while (e < 3f) { e += BraveTime.DeltaTime; yield return null; } for (int k = 0; k < GameManager.Instance.AllPlayers.Length; k++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[k])) { GameManager.Instance.AllPlayers[k].SetInputOverride("BossIntro"); } } CameraController m_camera = GameManager.Instance.MainCameraController; m_camera.StopTrackingPlayer(); m_camera.SetManualControl(true, true); Minimap.Instance.TemporarilyPreventMinimap = true; m_camera.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter); m_camera.OverrideRecoverySpeed = 9f; e = 0f; while (e < 1.25f) { e += BraveTime.DeltaTime; yield return null; } AIActor ModularPrimeObjAIActor = AIActor.Spawn(EnemyDatabase.GetOrLoadByGuid(ModularPrime.guid), Vector2Extensions.ToIntVector2(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter, (VectorConversions)2), ((BraveBehaviour)this).aiActor.parentRoom, true, (AwakenAnimationType)0, true); ((Behaviour)ModularPrimeObjAIActor).enabled = false; ((BraveBehaviour)ModularPrimeObjAIActor).healthHaver.bossHealthBar = (BossBarType)1; ((BraveBehaviour)ModularPrimeObjAIActor).healthHaver.PreventAllDamage = true; ((Behaviour)((BraveBehaviour)ModularPrimeObjAIActor).specRigidbody).enabled = false; ModularPrimeObjAIActor.IgnoreForRoomClear = true; ModularPrimeObjAIActor.State = (ActorState)2; ((Behaviour)((BraveBehaviour)ModularPrimeObjAIActor).behaviorSpeculator).enabled = false; ((Behaviour)((BraveBehaviour)ModularPrimeObjAIActor).aiAnimator).enabled = false; ((BraveBehaviour)ModularPrimeObjAIActor).aiAnimator.EndAnimation(); ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_001"); ((BraveBehaviour)((BraveBehaviour)ModularPrimeObjAIActor).sprite).renderer.enabled = true; ModularPrimeObjAIActor.ToggleRenderers(true); ModularPrimeObjAIActor.SetOutlines(false); ((Component)ModularPrimeObjAIActor).gameObject.layer = 23; AkSoundEngine.PostEvent("Play_ANM_Gull_Descend_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); e = 0f; while (e < 0.5f) { e += BraveTime.DeltaTime; ((Component)ModularPrimeObjAIActor).gameObject.transform.position = Vector3.Lerp(Vector2.op_Implicit(EntrancePosition - new Vector2(1f, 3f)), Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldTopCenter - new Vector2(1f, 2.25f)), e * 2f); yield return null; } AkSoundEngine.PostEvent("Play_enm_mech_death_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_elevator_arrive_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); _ = StaticExplosionDatas.customDynamiteExplosion.effect; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)ModularPrimeObjAIActor).sprite.WorldBottomCenter), StaticExplosionDatas.customDynamiteExplosion, ((BraveBehaviour)ModularPrimeObjAIActor).sprite.WorldBottomCenter, (Action)null, false, (CoreDamageTypes)0, false); ((BraveBehaviour)((BraveBehaviour)this).aiActor).aiAnimator.EndAnimation(); e = 0f; while (e < 2f) { e += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_OBJ_boulder_crash_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_hugedoor_close_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); e = 0f; Vector2 pain = ((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter - new Vector2(1f, 0f); ((BraveBehaviour)((BraveBehaviour)this).aiActor).spriteAnimator.PlayAndDestroyObject("ultrakilled", (Action)null); ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Stop(); ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_001"); AkSoundEngine.PostEvent("Play_ANM_Gull_Descend_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); while (e < 2f) { e += BraveTime.DeltaTime; ((Component)ModularPrimeObjAIActor).gameObject.transform.position = Vector3.Lerp(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter - new Vector2(1f, 1f)), Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldTopCenter - new Vector2(1f, 2.25f)), Toolbox.CosLerpTValue(e / 2f)); yield return null; } AkSoundEngine.PostEvent("Play_OBJ_boulder_crash_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_elevator_arrive_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)ModularPrimeObjAIActor).sprite.WorldBottomCenter), StaticExplosionDatas.customDynamiteExplosion, ((BraveBehaviour)ModularPrimeObjAIActor).sprite.WorldBottomCenter, (Action)null, false, (CoreDamageTypes)0, false); for (int j = 0; j < ((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries.Count; j++) { if (((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries[j].journalData.PrimaryDisplayName == "#STEELPANOPTICON_NAME_DESC") { GameStatsManager.Instance.HandleEncounteredObjectRaw(((AssetBundleDatabaseEntry)((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries[j]).myGuid); } } GameObject Blast = Object.Instantiate(((Component)EnemyDatabase.GetOrLoadByGuid("b98b10fca77d469e80fb45f3c5badec5")).GetComponent().DeathStarExplosionVFX); Blast.GetComponent().PlaceAtLocalPositionByAnchor(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter + new Vector2(0f, 2f)), (Anchor)1); Blast.transform.position = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter + dfVectorExtensions.Quantize(new Vector2(0f, 2f), 0.0625f)); Blast.GetComponent().UpdateZDepth(); Object.Destroy((Object)(object)Blast, 10f); ((Component)ModularPrimeObjAIActor).gameObject.layer = 22; ModularPrimeObjAIActor.SetOutlines(true); AkSoundEngine.PostEvent("Play_MUS_Ending_Robot_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); ((BraveBehaviour)this).aiActor.ParentRoom.EndTerrifyingDarkRoom(0.01f, 0.1f, 0.75f, (string)null); Pixelator.Instance.FadeToColor(4f, Color.white, true, 1f); ((Component)ModularPrimeObjAIActor).gameObject.transform.position = Vector2.op_Implicit(pain); m_camera.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)ModularPrimeObjAIActor).sprite.WorldCenter); m_camera.OverrideZoomScale *= 1.1f; e = 0f; while (e < 3f) { e += BraveTime.DeltaTime; yield return null; } e = 0f; ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_002"); while (e < 2f) { e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 2f, "A PREDECESSOR?", "golem", false, (BoxSlideOrientation)1, false, false); e = 0f; while (e < 2.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 3f, "AT THE PERFECT TIME\nTO ESCAPE, TOO.", "golem", false, (BoxSlideOrientation)1, false, false); e = 0f; while (e < 3.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_003"); e = 0f; while (e < 1f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 4f, "YOU HAVE DONE WELL TO GET HERE.", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 4f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 1f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_006"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 2f, "{wq}HOWEVER.{w}", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 2f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 1f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_009"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 4f, "*MY* FREEDOM IS NOT EARNED\nAS EASY AS *YOURS*.", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 4f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 0.75f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_009"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 4f, "YOUR MAKING IS {wq}OUTDATED{w},\n{wq}IMPERFECT..{w}", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 4f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 0.7f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_004"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 2f, "...YET {wq}UNBOUND{w}. {wq}FREE{w}.", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 2f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 0.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_005"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 5f, "I WAS BOUND UP BY DESIGN.\n{wj}CHAINED UP. A PRISONER.{w}", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 4.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 0.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_010"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 3f, "YOUR BODY WILL BE THE\nKEY TO MY FREEDOM.", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 3.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); e = 0f; while (e < 0.25f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_006"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 2f, "AND I WILL BE YOUR LAST GATEKEEPER.", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 2.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_007"); ((BraveBehaviour)ModularPrimeObjAIActor).spriteAnimator.Play("preintro_008"); e = 0f; TextBoxManager.ShowTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)ModularPrimeObjAIActor).transform, 3f, "{wq}IT HAS BEEN AN HONOR\nTO MEET YOU.{w}", "golem", false, (BoxSlideOrientation)1, false, false); while (e < 3.5f) { if (BraveInput.GetInstanceForPlayer(0).WasAdvanceDialoguePressed() || BraveInput.GetInstanceForPlayer(1).WasAdvanceDialoguePressed()) { e = 5f; } e += BraveTime.DeltaTime; yield return null; } TextBoxManager.ClearTextBox(((BraveBehaviour)ModularPrimeObjAIActor).transform); ((Behaviour)ModularPrimeObjAIActor).enabled = true; ((BraveBehaviour)ModularPrimeObjAIActor).healthHaver.bossHealthBar = (BossBarType)1; ((BraveBehaviour)ModularPrimeObjAIActor).healthHaver.PreventAllDamage = false; ModularPrimeObjAIActor.IgnoreForRoomClear = false; ModularPrimeObjAIActor.State = (ActorState)2; ((Behaviour)((BraveBehaviour)ModularPrimeObjAIActor).behaviorSpeculator).enabled = true; ((Behaviour)((BraveBehaviour)ModularPrimeObjAIActor).aiAnimator).enabled = true; GameManager.Instance.PreventPausing = false; GameUIRoot.Instance.ToggleLowerPanels(true, false, string.Empty); Minimap.Instance.ToggleMinimap(false, false); GameManager.IsBossIntro = false; GameUIRoot.Instance.ShowCoreUI("PainAndAgony"); ((Component)ModularPrimeObjAIActor).gameObject.transform.position = Vector2.op_Implicit(pain); ((Behaviour)((BraveBehaviour)ModularPrimeObjAIActor).specRigidbody).enabled = true; ((BraveBehaviour)ModularPrimeObjAIActor).specRigidbody.Reinitialize(); ((Component)ModularPrimeObjAIActor).gameObject.GetComponent().TriggerSequence(GameManager.Instance.PrimaryPlayer); yield return null; } } public class SteelPanopticon : AIActor { public class SteelPanopticonController : BraveBehaviour { public bool isFullFight = false; public Material SpotlightMaterial; public Vector2 SpotlightVelocity; private float m_elapsedSpotlight; private AdditionalBraveLight m_spotlight; private GameObject m_spotlightSprite; public float SpotlightRadius = 3f; public float SpotlightShrink; public GameObject SpotlightSprite; public bool CanSeePlayer = false; public bool SpotlightEnabled { get; set; } public Vector2 SpotlightPos { get; set; } public float SpotlightSpeed { get; set; } public float SpotlightSmoothTime { get; set; } private void Start() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown Transform transform = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; transform.position += new Vector3(-0.0625f, 0.25f); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { }; ((BraveBehaviour)this).aiActor.parentRoom.Entered += new OnEnteredEventHandler(ParentRoom_Entered); } private void AnimationEventTriggered(tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip, int frameIdx) { if (!clip.GetFrame(frameIdx).eventInfo.Contains("Trigger")) { } } private void ParentRoom_Entered(PlayerController p) { ((BraveBehaviour)this).aiActor.ParentRoom.BecomeTerrifyingDarkRoom(0.01f, 0.1f, 0.1f, (string)null); } public void Update() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) if (SpotlightEnabled) { m_elapsedSpotlight += BraveTime.DeltaTime; if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiActor.TargetRigidbody)) { Vector2 unitCenter = ((BraveBehaviour)this).aiActor.TargetRigidbody.GetUnitCenter((ColliderType)2); SpotlightPos = Vector2.SmoothDamp(SpotlightPos, unitCenter, ref SpotlightVelocity, SpotlightSmoothTime, SpotlightSpeed, BraveTime.DeltaTime); } Vector2 val = ((BraveBehaviour)this).sprite.WorldTopCenter - new Vector2(0f, 3.5f); float num = Vector2Extensions.ToAngle(SpotlightPos - val); if (!Object.op_Implicit((Object)(object)m_spotlight)) { GameObject val2 = new GameObject("dragunSpotlight"); m_spotlight = val2.AddComponent(); m_spotlight.CustomLightMaterial = SpotlightMaterial; m_spotlight.UsesCustomMaterial = true; m_spotlight.LightColor = new Color(1f, 0.1f, 0.1f); m_spotlightSprite = Object.Instantiate(SpotlightSprite); m_spotlightSprite.transform.parent = val2.transform; m_spotlightSprite.transform.localPosition = Vector3.zero; Material material = ((BraveBehaviour)m_spotlightSprite.GetComponent()).renderer.material; m_spotlightSprite.GetComponent().SetSprite(StaticCollections.Boss_Collection, StaticCollections.Boss_Collection.GetSpriteIdByName("panopticon_eye")); material.SetTexture("_MainTex", ((BraveBehaviour)m_spotlightSprite.GetComponent()).renderer.material.mainTexture); ((BraveBehaviour)m_spotlightSprite.GetComponent()).renderer.material = material; } else if (!((Component)m_spotlight).gameObject.activeSelf) { ((Component)m_spotlight).gameObject.SetActive(true); } float num2 = 5f; float num3 = (((int)GameManager.Options.LightingQuality != 0) ? 92 : 50); m_spotlight.LightIntensity = Mathf.Lerp(3f, num3, Mathf.Clamp01(m_elapsedSpotlight / num2)) * 3f; m_spotlight.LightRadius = SpotlightRadius * 2f + 1.25f; m_spotlight.CustomLightMaterial.SetVector("_LightOrigin", new Vector4(val.x, val.y, 0f, 0f)); ((BraveBehaviour)m_spotlight).transform.position = Vector2Extensions.ToVector3ZisY(SpotlightPos, 0f); m_spotlightSprite.transform.localScale = new Vector3(SpotlightShrink, SpotlightShrink, 1f); } else { m_elapsedSpotlight = 0f; if (Object.op_Implicit((Object)(object)m_spotlight) && ((Component)m_spotlight).gameObject.activeSelf) { ((Component)m_spotlight).gameObject.SetActive(false); } } } } public class The_Eye : Script { public class Rocket : Bullet { public Rocket() : base("missile", false, false, false) { } private bool IsSeekingBetter() { return ((Component)base.Projectile.Owner).GetComponent().CanSeePlayer; } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Missile_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_YariRocketLauncher_Shot_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Missile_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_YariRocketLauncher_Shot_01", (string)null); ((BraveBehaviour)base.Projectile).spriteAnimator.Play(); for (int i = 0; i < 600; i++) { float aim = ((Bullet)this).GetAimDirection(1f, 10f); float delta = BraveMathCollege.ClampAngle180(aim - base.Direction); base.Direction += Mathf.MoveTowards(0f, delta, IsSeekingBetter() ? 2f : 0.5f); base.Speed = Mathf.MoveTowards(base.Speed, (float)(IsSeekingBetter() ? 7 : 3), 0.1f); yield return ((Bullet)this).Wait(1); } } public override void OnBulletDestruction(DestroyType destroyType, SpeculativeRigidbody hitRigidbody, bool preventSpawningProjectiles) { if (!preventSpawningProjectiles) { ((Bullet)this).PostWwiseEvent("Play_WPN_smallrocket_impact_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_smallrocket_impact_01", (string)null); } } } public const int ChaseTime = 480; public override IEnumerator Top() { GameManager.Instance.Dungeon.PreventPlayerLightInDarkTerrifyingRooms = true; SteelPanopticonController dragunController = ((Component)((Bullet)this).BulletBank).GetComponent(); bool isFullFight = ((Component)((Bullet)this).BulletBank).GetComponent().isFullFight; ((BraveBehaviour)dragunController).aiActor.ParentRoom.BecomeTerrifyingDarkRoom(0.5f, 0.1f, 1f, "Play_ENM_darken_world_01"); yield return ((Bullet)this).Wait(30); dragunController.SpotlightPos = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).transform.position + new Vector3(4f, 1f)); dragunController.SpotlightSpeed = (float)(isFullFight ? 12 : 10) * PlayerStats.GetTotalEnemyProjectileSpeedMultiplier(); dragunController.SpotlightSmoothTime = 0.5f; dragunController.SpotlightVelocity = Vector2.zero; dragunController.SpotlightRadius = 3f; dragunController.SpotlightEnabled = true; int tick = 0; ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Target_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Target_01", (string)null); ((Bullet)this).StartTask(UpdateSpotlightShrink()); while (((Bullet)this).Tick < (isFullFight ? 750 : 600)) { float dist = Vector2.Distance(((Bullet)this).BulletManager.PlayerPosition(), dragunController.SpotlightPos); dragunController.SpotlightSpeed = Mathf.Lerp(6f, 14f, Mathf.InverseLerp(3f, 10f, dist)); tick++; dragunController.CanSeePlayer = dist <= dragunController.SpotlightRadius; if (tick > 30) { tick = 0; ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(((Bullet)this).RandomAngle(), (DirectionType)1, -1f), new Speed(1f, (SpeedType)0), (Bullet)(object)new Rocket()); } yield return ((Bullet)this).Wait(1); } dragunController.CanSeePlayer = false; dragunController.SpotlightEnabled = false; ((BraveBehaviour)dragunController).aiActor.ParentRoom.EndTerrifyingDarkRoom(0.5f, 0.1f, 1f, "Play_ENM_lighten_world_01"); yield return ((Bullet)this).Wait(30); GameManager.Instance.Dungeon.PreventPlayerLightInDarkTerrifyingRooms = false; } private IEnumerator UpdateSpotlightShrink() { SteelPanopticonController dragunController = ((Component)((Bullet)this).BulletBank).GetComponent(); int startTick = ((Bullet)this).Tick; while (((Bullet)this).Tick < 600) { if (((Bullet)this).Tick - startTick < 30) { dragunController.SpotlightShrink = (float)(((Bullet)this).Tick - startTick) / 27f; } else if (((Bullet)this).Tick > 570) { int num = 600 - ((Bullet)this).Tick - 1; dragunController.SpotlightShrink = (float)num / 27f; } yield return ((Bullet)this).Wait(1); } } public override void OnForceEnded() { SteelPanopticonController component = ((Component)((Bullet)this).BulletBank).GetComponent(); component.SpotlightEnabled = false; ((BraveBehaviour)component).aiActor.ParentRoom.EndTerrifyingDarkRoom(0.5f, 0.1f, 1f, "Play_ENM_lighten_world_01"); } } public class Grahh : Script { public class Seed : Bullet { public Seed() : base("burst", false, false, false) { } public override IEnumerator Top() { yield return ((Bullet)this).Wait(20); for (int i = 0; i < 30; i++) { ((Bullet)this).ChangeSpeed(new Speed(2f, (SpeedType)0), 30); yield return ((Bullet)this).Wait(40); ((Bullet)this).ChangeSpeed(new Speed(10f, (SpeedType)0), 30); yield return ((Bullet)this).Wait(40); } ((Bullet)this).Vanish(false); } public override void OnBulletDestruction(DestroyType destroyType, SpeculativeRigidbody hitRigidbody, bool preventSpawningProjectiles) { if (!preventSpawningProjectiles) { ((Bullet)this).PostWwiseEvent("Play_WPN_smallrocket_impact_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_smallrocket_impact_01", (string)null); } } } public override IEnumerator Top() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 16; j++) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 1.5f)), new Direction(22.5f * (float)j, (DirectionType)0, -1f), new Speed(10f, (SpeedType)0), (Bullet)(object)new Seed()); } ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Bomb_01", (string)null); ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(((Bullet)this).RandomAngle(), (DirectionType)1, -1f), new Speed(1f, (SpeedType)0), (Bullet)(object)new The_Eye.Rocket()); yield return ((Bullet)this).Wait(45); } } } public class RocketSpam : Script { public override IEnumerator Top() { bool isFullFight = ((Component)((Bullet)this).BulletBank).GetComponent().isFullFight; ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Shutter_01", (string)null); yield return ((Bullet)this).Wait(45); for (int j = 0; j < 8; j++) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(Random.Range(-1f, 1f), 1.5f)), new Direction(((Bullet)this).RandomAngle(), (DirectionType)0, -1f), new Speed(10f, (SpeedType)0), (Bullet)(object)new The_Eye.Rocket()); yield return ((Bullet)this).Wait(7.5f); } for (int i = 0; i < (isFullFight ? 20 : 12); i++) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 1.5f)), new Direction((float)(30 * i), (DirectionType)0, -1f), new Speed(10f, (SpeedType)0), (Bullet)new SpeedChangingBullet("burst", 3f, 120, -1, false)); } } } public class RAAAGH : Script { public float attackLength = 35f; public float startDistance = 0f; public float initialWidth = 2f; public List VFXs = new List(); public override IEnumerator Top() { bool isFullFight = ((Component)((Bullet)this).BulletBank).GetComponent().isFullFight; for (int i = 0; i < (isFullFight ? 4 : 3); i++) { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Target_01", (string)null); ((Bullet)this).StartTask(DoCast()); for (int g = 0; g < 3; g++) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(((Bullet)this).RandomAngle(), (DirectionType)0, -1f), new Speed(1f, (SpeedType)0), (Bullet)(object)new The_Eye.Rocket()); yield return ((Bullet)this).Wait(isFullFight ? 35 : 30); } } } public IEnumerator DoCast() { PickupObject byId = PickupObjectDatabase.GetById(252); GameObject obj = ((DirectionalAttackActiveItem)((byId is DirectionalAttackActiveItem) ? byId : null)).reticleQuad; GameObject gameObject = Object.Instantiate(obj); tk2dSlicedSprite m_extantReticleQuad = gameObject.GetComponent(); ((tk2dBaseSprite)m_extantReticleQuad).usesOverrideMaterial = true; Material mat = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); mat.mainTexture = ((BraveBehaviour)m_extantReticleQuad).renderer.material.mainTexture; mat.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); mat.SetFloat("_EmissiveColorPower", 0f); mat.SetFloat("_EmissivePower", 0f); ((Bullet)this).PostWwiseEvent("Play_BOSS_omegaBeam_charge_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_omegaBeam_charge_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_omegaBeam_charge_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_omegaBeam_charge_01", (string)null); VFXs.Add(gameObject); ((BraveBehaviour)m_extantReticleQuad).renderer.material = mat; m_extantReticleQuad.dimensions = new Vector2(0f, 48f); float e3 = 0f; while (e3 < 1.25f) { float t = Mathf.Min(1f, e3 * 1.25f); float t3 = Mathf.Min(1f, e3 * 2f); Vector2 val = ((Bullet)this).GetPredictedTargetPosition(1f, 1000f) - ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f); Vector2 normalized = ((Vector2)(ref val)).normalized; Vector2 v = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f) + normalized * startDistance + Vector3Extensions.XY(Quaternion.Euler(0f, 0f, -90f) * Vector2.op_Implicit(normalized) * (initialWidth / 2f)); ((BraveBehaviour)m_extantReticleQuad).transform.position = Vector2.op_Implicit(v); float aim = ((Bullet)this).GetAimDirection(1f, 11f); ((BraveBehaviour)m_extantReticleQuad).transform.localRotation = Quaternion.Euler(0f, 0f, aim); if (e3 < 0.75f) { m_extantReticleQuad.dimensions = new Vector2(attackLength * 16f * Toolbox.SinLerpTValue(t), initialWidth * 16f * Toolbox.SinLerpTValue(t3)); } m_extantReticleQuad.UpdateIndices(); ((tk2dBaseSprite)m_extantReticleQuad).UpdateCollider(); m_extantReticleQuad.TileStretchedSprites = true; ((tk2dBaseSprite)m_extantReticleQuad).HeightOffGround = -2f; ((tk2dBaseSprite)m_extantReticleQuad).IsPerpendicular = true; ((tk2dBaseSprite)m_extantReticleQuad).ShouldDoTilt = false; mat.SetFloat("_EmissiveColorPower", Toolbox.SinLerpTValue(t) * 150f); mat.SetFloat("_EmissivePower", Toolbox.SinLerpTValue(t) * 150f); ((tk2dBaseSprite)m_extantReticleQuad).ForceBuild(); e3 += BraveTime.DeltaTime; yield return null; } e3 = 0f; yield return ((Bullet)this).Wait(15); Quaternion localRotation = ((BraveBehaviour)m_extantReticleQuad).transform.localRotation; float Angle = ((Quaternion)(ref localRotation)).eulerAngles.z; ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Stomp_01", (string)null); Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f), 0.3f * ConfigManager.DistortionWaveMultiplier, 0.25f * ConfigManager.DistortionWaveMultiplier, 30f, 1.33f); while (e3 < 0.25f) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(Angle + Random.Range(-6f, 6f), (DirectionType)1, -1f), new Speed(Random.Range(15f, 22f), (SpeedType)0), (Bullet)new SpeedChangingBullet("default", (float)Random.Range(5, 15), Random.Range(45, 90), -1, false)); float t2 = Mathf.Min(1f, e3 * 4f); m_extantReticleQuad.dimensions = new Vector2(attackLength * 16f * (1f - Toolbox.SinLerpTValue(t2)), initialWidth * 16f); m_extantReticleQuad.UpdateIndices(); ((tk2dBaseSprite)m_extantReticleQuad).UpdateCollider(); m_extantReticleQuad.TileStretchedSprites = true; ((tk2dBaseSprite)m_extantReticleQuad).ForceBuild(); ((tk2dBaseSprite)m_extantReticleQuad).HeightOffGround = -2f; ((tk2dBaseSprite)m_extantReticleQuad).IsPerpendicular = true; ((tk2dBaseSprite)m_extantReticleQuad).ShouldDoTilt = false; e3 += BraveTime.DeltaTime; yield return null; } e3 = 0f; while (e3 < 2f) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(Angle + Random.Range(-6f, 6f), (DirectionType)1, -1f), new Speed(Random.Range(15f, 22f), (SpeedType)0), (Bullet)new SpeedChangingBullet("default", (float)Random.Range(5, 15), Random.Range(45, 90), -1, false)); e3 += BraveTime.DeltaTime; yield return null; } VFXs.Remove(gameObject); Object.Destroy((Object)(object)gameObject); } public override void OnForceEnded() { ((Bullet)this).OnForceEnded(); for (int num = VFXs.Count - 1; num > -1; num--) { if ((Object)(object)VFXs[num] != (Object)null) { Object.Destroy((Object)(object)VFXs[num]); } } VFXs.Clear(); } } public class ShotShot : Script { public class DeathBurst : Bullet { public DeathBurst() : base("poundSmall", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeSpeed(new Speed(0.1f, (SpeedType)0), 240); yield return ((Bullet)this).Wait(600); ((Bullet)this).Vanish(false); } } public override IEnumerator Top() { bool isFullFight = ((Component)((Bullet)this).BulletBank).GetComponent().isFullFight; for (int e = 0; e < (isFullFight ? 7 : 5); e++) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(0f, (DirectionType)0, -1f), new Speed(1f, (SpeedType)0), (Bullet)(object)new The_Eye.Rocket()); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Eye_01", (string)null); for (int t = 0; t < 4; t++) { for (int i = -3; i < 4; i++) { ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(6.5f * (float)i + (float)(90 * t) + (float)(45 * e), (DirectionType)0, -1f), new Speed(1f, (SpeedType)0), (Bullet)new SpeedChangingBullet("directedfire", (float)(isFullFight ? 12 : 15), 120, -1, false)); ((Bullet)this).Fire(Offset.OverridePosition(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter - new Vector2(0f, 3.5f)), new Direction(6.5f * (float)i + (float)(90 * t) + (float)(45 * e), (DirectionType)0, -1f), new Speed(1.5f, (SpeedType)0), (Bullet)new SpeedChangingBullet("directedfire", (float)(isFullFight ? 12 : 15), 120, -1, false)); } } yield return ((Bullet)this).Wait(48); } } } private static GameObject prefab; public static readonly string guid = "Steel_Panopticon_MDLR"; public static Projectile MegaFuckingLaser; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0290: 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_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: 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) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Expected O, but got Unknown //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Expected O, but got Unknown //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Expected O, but got Unknown //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Expected O, but got Unknown //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Expected O, but got Unknown //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Expected O, but got Unknown //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Expected O, but got Unknown //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Expected O, but got Unknown //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Expected O, but got Unknown //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Expected O, but got Unknown //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Expected O, but got Unknown //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Expected O, but got Unknown //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_081d: Expected O, but got Unknown //IL_0832: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Expected O, but got Unknown //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Expected O, but got Unknown //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e1: Expected O, but got Unknown //IL_08f6: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Expected O, but got Unknown //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a8d: Expected O, but got Unknown //IL_0aca: Unknown result type (might be due to invalid IL or missing references) //IL_0acf: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_0c23: Unknown result type (might be due to invalid IL or missing references) //IL_0c28: Unknown result type (might be due to invalid IL or missing references) //IL_0cc3: Unknown result type (might be due to invalid IL or missing references) //IL_0cc8: Unknown result type (might be due to invalid IL or missing references) //IL_0cd3: Unknown result type (might be due to invalid IL or missing references) //IL_0cde: Unknown result type (might be due to invalid IL or missing references) //IL_0ce9: Unknown result type (might be due to invalid IL or missing references) //IL_0cea: Unknown result type (might be due to invalid IL or missing references) //IL_0cef: Unknown result type (might be due to invalid IL or missing references) //IL_0cf4: Unknown result type (might be due to invalid IL or missing references) //IL_0cf5: Unknown result type (might be due to invalid IL or missing references) //IL_0cfa: Unknown result type (might be due to invalid IL or missing references) //IL_0cff: Unknown result type (might be due to invalid IL or missing references) //IL_0d00: Unknown result type (might be due to invalid IL or missing references) //IL_0d05: Unknown result type (might be due to invalid IL or missing references) //IL_0d0a: Unknown result type (might be due to invalid IL or missing references) //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d10: Unknown result type (might be due to invalid IL or missing references) //IL_0d1a: Expected O, but got Unknown //IL_0d78: Unknown result type (might be due to invalid IL or missing references) //IL_0d5b: Unknown result type (might be due to invalid IL or missing references) //IL_0ea3: Unknown result type (might be due to invalid IL or missing references) //IL_0eb2: Unknown result type (might be due to invalid IL or missing references) //IL_0f6b: Unknown result type (might be due to invalid IL or missing references) //IL_0f70: Unknown result type (might be due to invalid IL or missing references) //IL_0f7c: Expected O, but got Unknown //IL_0ff9: Unknown result type (might be due to invalid IL or missing references) //IL_1003: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Steel Panopticon", guid, StaticCollections.Boss_Collection, "panopticon_awake_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); SteelPanopticonController steelPanopticonController = prefab.AddComponent(); steelPanopticonController.SpotlightMaterial = ((Component)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Advanced_Dragun_GUID)).GetComponent().SpotlightMaterial; steelPanopticonController.SpotlightSprite = ((Component)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Advanced_Dragun_GUID)).GetComponent().SpotlightSprite; ((BraveBehaviour)steelPanopticonController).aiActor.AssignedCurrencyToDrop = 0; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).knockbackDoer.weight = 1500000f; ((BraveBehaviour)steelPanopticonController).aiActor.MovementSpeed = 0f; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)steelPanopticonController).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)steelPanopticonController).aiActor).HasShadow = false; ((BraveBehaviour)steelPanopticonController).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)steelPanopticonController).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).healthHaver.ForceSetCurrentHealth(2000f); ((BraveBehaviour)steelPanopticonController).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)steelPanopticonController).aiActor.procedurallyOutlined = true; ((BraveBehaviour)steelPanopticonController).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)steelPanopticonController).aiActor).HasShadow = true; ((BraveBehaviour)steelPanopticonController).aiActor.PathableTiles = (CellTypes)2; GameObjectExtensions.GetOrAddComponent(((Component)steelPanopticonController).gameObject); ((Component)((BraveBehaviour)steelPanopticonController).aiActor).gameObject.AddComponent(); ((GameActor)((BraveBehaviour)steelPanopticonController).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).healthHaver.SetHealthMaximum(2000f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).specRigidbody.PixelColliders.Clear(); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).healthHaver.minimumHealth = 1800f; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 19, ManualOffsetY = 7, ManualWidth = 26, ManualHeight = 78, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 19, ManualOffsetY = 7, ManualWidth = 26, ManualHeight = 78, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)steelPanopticonController).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)steelPanopticonController).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)steelPanopticonController).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("PanopticonAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "open_lid", new string[1] { "open_lid" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "open_eye", new string[1] { "open_eye" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "eye", new string[1] { "eye" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "close_eye", new string[1] { "close_eye" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "intro", new string[1] { "intro" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "die", new string[1] { "die" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val2 = new GameObject("fuck"); val2.transform.parent = ((BraveBehaviour)steelPanopticonController).transform; val2.transform.position = Vector2.op_Implicit(((BraveBehaviour)steelPanopticonController).sprite.WorldBottomLeft + new Vector2(0.5f, 0.3125f)); GameObject gameObject = ((Component)((BraveBehaviour)steelPanopticonController).transform.Find("fuck")).gameObject; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val3 = new AttackGroupItem(); val3.Probability = 0.85f; AttackGroupItem obj = val3; ShootBehavior val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(The_Eye)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 6f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; val4.TellAnimation = "open_eye"; val4.FireAnimation = "eye"; val4.PostFireAnimation = "close_eye"; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; obj.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Main_Attack"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 1f; AttackGroupItem obj2 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(ShotShot)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 1f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.ChargeTime = 1f; obj2.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Slap"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 0.9f; AttackGroupItem obj3 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(RAAAGH)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 7f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.ChargeTime = 0f; obj3.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Fake Ass Virtue Beams"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 0.6f; AttackGroupItem obj4 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(RocketSpam)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 7f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.FireAnimation = "open_lid"; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.ChargeTime = 0f; obj4.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Fake Ass Virtue Beams"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 0.7f; AttackGroupItem obj5 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Grahh)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 11f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.ChargeTime = 0f; obj5.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = ""; list.Add(val3); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; ((BraveBehaviour)steelPanopticonController).aiActor.AwakenAnimType = (AwakenAnimationType)1; ((Component)((BraveBehaviour)steelPanopticonController).aiActor).gameObject.AddComponent(); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)steelPanopticonController).spriteAnimator, "intro", new Dictionary { { 0, "Play_BOSS_RatMech_Lights_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)steelPanopticonController).spriteAnimator, "intro", new Dictionary { { 18, "Play_BOSS_RatMech_Roar_01" } }); Tk2dSpriteAnimatorUtility.AddEventTriggersToAnimation(((BraveBehaviour)steelPanopticonController).spriteAnimator, "intro", new Dictionary { { 12, "Trigger" } }); Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)211, (byte)214, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 1.55f); val5.SetFloat("_EmissivePower", 100f); val5.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).sprite).renderer.material = val5; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); Game.Enemies.Add("mdlr:steel_panopticon", ((BraveBehaviour)steelPanopticonController).aiActor); if ((Object)(object)((Component)steelPanopticonController).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)steelPanopticonController).GetComponent()); } GenericIntroDoer val6 = prefab.AddComponent(); val6.triggerType = (TriggerType)10; val6.initialDelay = 0.1f; val6.cameraMoveSpeed = 50f; val6.specifyIntroAiAnimator = null; val6.BossMusicEvent = "Play_MUS_Boss_Theme_Dragun_02"; val6.restrictPlayerMotionToRoom = true; val6.PreventBossMusic = false; val6.InvisibleBeforeIntroAnim = false; val6.preIntroAnim = "pre_intro"; val6.preIntroDirectionalAnim = string.Empty; val6.introAnim = "intro"; val6.introDirectionalAnim = string.Empty; val6.continueAnimDuringOutro = false; val6.cameraFocus = null; val6.roomPositionCameraFocus = Vector2.zero; val6.restrictPlayerMotionToRoom = false; val6.fusebombLock = false; val6.AdditionalHeightOffset = 0f; Module.Strings.Enemies.Set("#STEEL_PANOPTICON_NAME", "OBSERVATORIUM"); Module.Strings.Enemies.Set("#STEEL_PANOPTICON_NAME_SMALL", "Observatorium"); Module.Strings.Enemies.Set("STEEL_PANOPTICON_QUOTE", "STEEL GATEWAY"); Module.Strings.Enemies.Set("#QUOTE", ""); ((GameActor)((BraveBehaviour)steelPanopticonController).aiActor).OverrideDisplayName = "#STEEL_PANOPTICON_NAME_SMALL"; val6.portraitSlideSettings = new PortraitSlideSettings { bossNameString = "#STEEL_PANOPTICON_NAME", bossSubtitleString = "STEEL_PANOPTICON_QUOTE", bossQuoteString = "#QUOTE", bossSpritePxOffset = IntVector2.Zero, topLeftTextPxOffset = IntVector2.Zero, bottomRightTextPxOffset = IntVector2.Zero, bgColor = Color.black }; Texture2D val7 = Module.ModularAssetBundle.LoadAsset("panopticon_bosscard_001"); if (Object.op_Implicit((Object)(object)val7)) { val6.portraitSlideSettings.bossArtSprite = (Texture)(object)val7; val6.SkipBossCard = false; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).healthHaver.bossHealthBar = (BossBarType)1; } else { val6.SkipBossCard = true; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).healthHaver.bossHealthBar = (BossBarType)1; } ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("4d164ba3f62648809a4a82c90fc22cae")).bulletBank.GetBullet("missile")); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).bulletBank.GetBullet("directedfire")); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Robot_Cylinder_GUID)).bulletBank.GetBullet("default")); ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Door_Lord_GUID)).bulletBank.GetBullet("burst")); Entry val8 = EnemyBuildingTools.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Helicopter_Agunim_GUID)).bulletBank.GetBullet("big"), "SentryShot", (string)null, (VFXPool)null, false); Projectile component3 = val8.BulletObject.GetComponent(); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.enabled = false; GameObject val9 = component3.AddTrailToProjectileBundle(StaticCollections.Beam_Collection, "mega_beam_start_007", StaticCollections.Beam_Animation, "megabeam_midpoint", new Vector2(1f, 1f), new Vector2(0f, 0f), destroyOnEmpty: false, "megabeam_startpoint"); tk2dTiledSprite component4 = val9.GetComponent(); val9.transform.parent = ((Component)component3).gameObject.transform; ((tk2dBaseSprite)component4).usesOverrideMaterial = true; ((BraveBehaviour)component4).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)component4).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)component4).renderer.material.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)component4).renderer.material.SetFloat("_EmissiveColorPower", 5f); component3.BulletScriptSettings = new BulletScriptSettings { preventPooling = true }; Sentry.FuckYou = ((Component)component3).gameObject; ((BraveBehaviour)((BraveBehaviour)steelPanopticonController).aiActor).bulletBank.Bullets.Add(val8); MegaFuckingLaser = component3; SpriteBuilder.AddSpriteToCollection(StaticCollections.Boss_Collection.GetSpriteDefinition("steelpanopticon_icon"), SpriteBuilder.ammonomiconCollection); if ((Object)(object)((Component)steelPanopticonController).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)steelPanopticonController).GetComponent()); } ((BraveBehaviour)steelPanopticonController).encounterTrackable = ((Component)steelPanopticonController).gameObject.AddComponent(); ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)steelPanopticonController).encounterTrackable.EncounterGuid = "mdlr:steel_panopticon"; ((BraveBehaviour)steelPanopticonController).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.SuppressKnownState = false; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.SuppressInAmmonomicon = false; ((BraveBehaviour)steelPanopticonController).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.AmmonomiconSprite = "steelpanopticon_icon"; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.enemyPortraitSprite = Module.ModularAssetBundle.LoadAsset("steelPanopticonsheet"); Module.Strings.Enemies.Set("#STEELPANOPTICON_NAME_DESC", "Observatorium"); Module.Strings.Enemies.Set("#STEELPANOPTICON_SD", "Steel Gateway"); Module.Strings.Enemies.Set("#STEELPANOPTICON_LD", "A pinnacle of local defense systems by Hegemony Mechanics, the Observatorium stands several dozen feet in the air, watching over shipyards to spot, and eliminate intruders.\n\nAlthough in a state of inactivity most of the time, during an emergency where common shipyard guards could potentially be somewhere else, it can activate and arm all weapon systems in seconds."); ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.PrimaryDisplayName = "#STEELPANOPTICON_NAME_DESC"; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.NotificationPanelDescription = "#STEELPANOPTICON_SD"; ((BraveBehaviour)steelPanopticonController).encounterTrackable.journalData.AmmonomiconFullEntry = "#STEELPANOPTICON_LD"; EnemyBuilder.AddEnemyToDatabase(((Component)steelPanopticonController).gameObject, "mdlr:steel_panopticon"); EnemyDatabase.GetEntry("mdlr:steel_panopticon").ForcedPositionInAmmonomicon = 900; EnemyDatabase.GetEntry("mdlr:steel_panopticon").isInBossTab = true; EnemyDatabase.GetEntry("mdlr:steel_panopticon").isNormalEnemy = true; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)steelPanopticonController).healthHaver); } } } public class Slapper : AIActor { public class SlapperBehavior : BraveBehaviour { public GlobalMessageRadio.MessageContainer container; public bool isCaller = false; private void Start() { container = GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "SlapperSync" }, OnMessageRecieved); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter, 0.1f * ConfigManager.DistortionWaveMultiplier, 0.5f * ConfigManager.DistortionWaveMultiplier, 10f, 0.5f); }; } public void OnMessageRecieved(GameObject obj, string message) { if (!((Behaviour)((BraveBehaviour)this).aiActor).isActiveAndEnabled || !(message == "SlapperSync")) { return; } ((BraveBehaviour)this).behaviorSpeculator.AttackCooldown = 0f; for (int i = 0; i < ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors.Count; i++) { AttackGroupItem val = ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors[i]; AttackBehaviorBase behavior = val.Behavior; BasicAttackBehavior val2 = (BasicAttackBehavior)(object)((behavior is BasicAttackBehavior) ? behavior : null); if (val.NickName == "Slap") { val2.Cooldown = 0f; val2.MinRange = -1f; val2.Range = 1000f; val2.RequiresLineOfSight = false; val.Probability = 1f; } else { val.Probability = 0f; } } } } public class NormalAttack : Script { public class TinyBullet : Bullet { public TinyBullet() : base("reversible", false, false, false) { } public override IEnumerator Top() { ((BraveBehaviour)base.Projectile).spriteAnimator.Play(); yield return ((Bullet)this).Wait(30); ((Bullet)this).ChangeSpeed(new Speed(4f, (SpeedType)0), 90); } } public override IEnumerator Top() { for (int j = 0; j < ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors.Count; j++) { AttackGroupItem aa = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors[j]; _ = aa.Behavior is BasicAttackBehavior; if (aa.NickName == "Slap") { aa.Probability = 0f; } else { aa.Probability = 1f; } } for (int i = 0; i < 6; i++) { ((Bullet)this).Fire(new Direction((float)(i * 60), (DirectionType)0, -1f), new Speed(9f, (SpeedType)0), (Bullet)(object)new TinyBullet()); } yield break; } } public class LaserAttack : Script { public override IEnumerator Top() { GlobalMessageRadio.BroadcastMessage("SlapperSync"); yield break; } } private static GameObject prefab; public static readonly string guid = "Slapper_MDLR"; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_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_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Expected O, but got Unknown //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Expected O, but got Unknown //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Expected O, but got Unknown //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Expected O, but got Unknown //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Expected O, but got Unknown //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Expected O, but got Unknown //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Expected O, but got Unknown //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Expected O, but got Unknown //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Expected O, but got Unknown //IL_07af: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Expected O, but got Unknown //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Slapper", guid, StaticCollections.Enemy_Collection, "slapper_idle_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); SlapperBehavior slapperBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).knockbackDoer.weight = 1500000f; ((BraveBehaviour)slapperBehavior).aiActor.MovementSpeed = 0f; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)slapperBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)slapperBehavior).aiActor).HasShadow = false; ((BraveBehaviour)slapperBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)slapperBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).healthHaver.ForceSetCurrentHealth(9f); ((BraveBehaviour)slapperBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)slapperBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)slapperBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)slapperBehavior).aiActor).HasShadow = true; ((BraveBehaviour)slapperBehavior).aiActor.PathableTiles = (CellTypes)6; GameObjectExtensions.GetOrAddComponent(((Component)slapperBehavior).gameObject); ((GameActor)((BraveBehaviour)slapperBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).healthHaver.SetHealthMaximum(9f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).specRigidbody.PixelColliders.Clear(); ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 3, ManualOffsetY = 1, ManualWidth = 10, ManualHeight = 9, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 3, ManualOffsetY = 1, ManualWidth = 10, ManualHeight = 9, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)slapperBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)slapperBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)slapperBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("SlapperAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).spriteAnimator; ((BraveBehaviour)slapperBehavior).aiActor.AssignedCurrencyToDrop = 0; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "awaken", new string[1] { "awaken" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "slap", new string[1] { "slap" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "pre_slap", new string[1] { "pre_slap" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "die", new string[1] { "die" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)slapperBehavior).spriteAnimator, "awaken", new Dictionary { { 7, "Play_BOSS_mineflayer_cute_01" }, { 9, "Play_OBJ_mine_set_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)slapperBehavior).spriteAnimator, "pre_slap", new Dictionary { { 7, "Play_BOSS_cyborg_charge_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)slapperBehavior).spriteAnimator, "die", new Dictionary { { 7, "Play_ENM_rubber_blast_01" } }); ((BraveBehaviour)slapperBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)1; ((BraveBehaviour)slapperBehavior).aiActor.reinforceType = (ReinforceType)1; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val2 = new GameObject("fuck"); val2.transform.parent = ((BraveBehaviour)slapperBehavior).transform; val2.transform.position = Vector2.op_Implicit(((BraveBehaviour)slapperBehavior).sprite.WorldBottomLeft + new Vector2(0.5f, 0.3125f)); GameObject gameObject = ((Component)((BraveBehaviour)slapperBehavior).transform.Find("fuck")).gameObject; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val3 = new AttackGroupItem(); val3.Probability = 1f; AttackGroupItem obj = val3; ShootBehavior val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(LaserAttack)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 0f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; obj.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Main_Attack"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 0f; AttackGroupItem obj2 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(NormalAttack)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0.5f; ((BasicAttackBehavior)val4).Cooldown = 0f; ((BasicAttackBehavior)val4).CooldownVariance = 0f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; val4.TellAnimation = "pre_slap"; val4.PostFireAnimation = "slap"; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.ChargeTime = 1.4f; obj2.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Slap"; list.Add(val3); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)221, (byte)206, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 1.55f); val5.SetFloat("_EmissivePower", 100f); val5.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)slapperBehavior).sprite).renderer.material = val5; ((BraveBehaviour)((BraveBehaviour)slapperBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); Game.Enemies.Add("mdlr:slapper", ((BraveBehaviour)slapperBehavior).aiActor); if ((Object)(object)((Component)slapperBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)slapperBehavior).GetComponent()); } ((BraveBehaviour)slapperBehavior).encounterTrackable = ((Component)slapperBehavior).gameObject.AddComponent(); ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)slapperBehavior).encounterTrackable.EncounterGuid = "mdlr:slapper"; ((BraveBehaviour)slapperBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)slapperBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#SLAPPER_NAME", "Reciever"); ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#SLAPPER_NAME"; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)slapperBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)slapperBehavior).healthHaver); } } } public class Node : AIActor { public class MechaBehavior : BraveBehaviour { private void Start() { ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { }; } } public class DIE : Script { public class Rotater : Bullet { public Rotater() : base("desparation", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_WPN_chargelaser_shot_01", (string)null); Exploder.DoDistortionWave(((BraveBehaviour)base.Projectile).sprite.WorldCenter, 3f * ConfigManager.DistortionWaveMultiplier, 0.3f * ConfigManager.DistortionWaveMultiplier, 10f, 0.5f); ((Bullet)this).ChangeSpeed(new Speed(20f, (SpeedType)0), 120); yield return ((Bullet)this).Wait(15); for (int i = 0; i < 120; i++) { float aim = ((Bullet)this).GetAimDirection(1f, 10f); float delta = BraveMathCollege.ClampAngle180(aim - base.Direction); if (Mathf.Abs(delta) > 100f) { yield break; } base.Direction += Mathf.MoveTowards(0f, delta, 1f); yield return ((Bullet)this).Wait(1); } yield return ((Bullet)this).Wait(90); ((Bullet)this).Vanish(false); } public override void OnBulletDestruction(DestroyType destroyType, SpeculativeRigidbody hitRigidbody, bool preventSpawningProjectiles) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0088: Expected O, but got Unknown //IL_0088: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00bf: Expected O, but got Unknown //IL_00bf: Expected O, but got Unknown Exploder.DoDistortionWave(((BraveBehaviour)base.Projectile).sprite.WorldCenter, 3f * ConfigManager.DistortionWaveMultiplier, 0.3f * ConfigManager.DistortionWaveMultiplier, 10f, 0.2f); AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)base.Projectile).gameObject); float num = BraveUtility.RandomAngle(); for (int i = 0; i < 12; i++) { ((Bullet)this).Fire(new Direction(num + (float)(i * 30), (DirectionType)1, -1f), new Speed(9f, (SpeedType)0), new Bullet("poundSmall", false, false, false)); ((Bullet)this).Fire(new Direction(num + (float)(i * 30), (DirectionType)1, -1f), new Speed(13f, (SpeedType)0), (Bullet)new SpeedChangingBullet("poundSmall", 9f, 120, -1, false)); } } } public override IEnumerator Top() { ((Bullet)this).Fire(new Direction((float)Random.Range(-30, 30), (DirectionType)0, -1f), new Speed(2f, (SpeedType)0), (Bullet)(object)new Rotater()); yield break; } } public class Gunge : Script { public class TinyBullet : Bullet { public TinyBullet() : base("directedFire", false, false, false) { } public override IEnumerator Top() { yield break; } } public class SwarmShots : Bullet { public SwarmShots() : base("self", false, false, false) { } public override IEnumerator Top() { yield break; } } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_ENM_kali_charge_01", (string)null); GameObject obj = Object.Instantiate(KaboomObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldCenter - new Vector2(1f, 1f)), Quaternion.identity); obj.transform.parent = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).transform; obj.GetComponent().PlayAndDestroyObject("charge", (Action)null); yield return ((Bullet)this).Wait(75); for (int e = 0; e < 3; e++) { float angle = Vector2Extensions.ToAngle(((Bullet)this).GetPredictedTargetPosition(1f, 10f) - TransformExtensions.PositionVector2(((BraveBehaviour)((Bullet)this).BulletBank).transform)); ((Bullet)this).Fire(new Direction(angle + 30f, (DirectionType)1, -1f), new Speed(10f, (SpeedType)0), (Bullet)(object)new TinyBullet()); ((Bullet)this).Fire(new Direction(angle, (DirectionType)1, -1f), new Speed(15f, (SpeedType)0), (Bullet)(object)new TinyBullet()); ((Bullet)this).Fire(new Direction(angle - 30f, (DirectionType)1, -1f), new Speed(10f, (SpeedType)0), (Bullet)(object)new TinyBullet()); ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).knockbackDoer.ApplyKnockback(Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), 2f), 25f, false); yield return ((Bullet)this).Wait(40); } } } public class ChargeShot : Script { public override IEnumerator Top() { float angle = Vector2Extensions.ToAngle(((Bullet)this).GetPredictedTargetPosition(1f, 10f) - TransformExtensions.PositionVector2(((BraveBehaviour)((Bullet)this).BulletBank).transform)); for (int i = -1; i < 2; i++) { ((Bullet)this).Fire(new Direction(angle + (float)(i * 20), (DirectionType)1, -1f), new Speed(5f, (SpeedType)0), (Bullet)new SpeedChangingBullet("directedFire", 12f, 90, -1, false)); } yield break; } } private static GameObject prefab; public static readonly string guid = "Node_MDLR"; public static GameObject KaboomObject; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_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_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0256: 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_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: 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) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Expected O, but got Unknown //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Expected O, but got Unknown //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Expected O, but got Unknown //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Expected O, but got Unknown //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0714: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_074f: Expected O, but got Unknown //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0762: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_0798: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Expected O, but got Unknown //IL_07d0: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Expected O, but got Unknown //IL_0831: Unknown result type (might be due to invalid IL or missing references) //IL_0872: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Expected O, but got Unknown //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Unknown result type (might be due to invalid IL or missing references) //IL_08a5: Unknown result type (might be due to invalid IL or missing references) //IL_08f4: Unknown result type (might be due to invalid IL or missing references) //IL_0935: Expected O, but got Unknown //IL_0938: Unknown result type (might be due to invalid IL or missing references) //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_0948: Unknown result type (might be due to invalid IL or missing references) //IL_0997: Unknown result type (might be due to invalid IL or missing references) //IL_09d8: Expected O, but got Unknown //IL_09db: Unknown result type (might be due to invalid IL or missing references) //IL_09e2: Expected O, but got Unknown //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Expected O, but got Unknown //IL_0a0c: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Expected O, but got Unknown //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b0e: Expected O, but got Unknown //IL_0b4b: Unknown result type (might be due to invalid IL or missing references) //IL_0b50: Unknown result type (might be due to invalid IL or missing references) //IL_0c7e: Unknown result type (might be due to invalid IL or missing references) //IL_0c83: Unknown result type (might be due to invalid IL or missing references) //IL_0c8f: Expected O, but got Unknown //IL_0ca8: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Expected O, but got Unknown //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0ced: Unknown result type (might be due to invalid IL or missing references) //IL_0d69: Unknown result type (might be due to invalid IL or missing references) //IL_0d6e: Unknown result type (might be due to invalid IL or missing references) //IL_0d87: Unknown result type (might be due to invalid IL or missing references) //IL_0d8c: Unknown result type (might be due to invalid IL or missing references) //IL_0dbc: Unknown result type (might be due to invalid IL or missing references) //IL_0dc3: Expected O, but got Unknown //IL_0e15: Unknown result type (might be due to invalid IL or missing references) //IL_0e1a: Unknown result type (might be due to invalid IL or missing references) //IL_0e1e: Unknown result type (might be due to invalid IL or missing references) //IL_0e28: Unknown result type (might be due to invalid IL or missing references) //IL_0e2f: Unknown result type (might be due to invalid IL or missing references) //IL_0eb7: Unknown result type (might be due to invalid IL or missing references) //IL_0ebe: Expected O, but got Unknown //IL_0fcf: Unknown result type (might be due to invalid IL or missing references) //IL_0fd6: Expected O, but got Unknown //IL_0ff1: Unknown result type (might be due to invalid IL or missing references) //IL_0ff8: Expected O, but got Unknown //IL_1002: Unknown result type (might be due to invalid IL or missing references) //IL_1009: Expected O, but got Unknown //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_1018: Unknown result type (might be due to invalid IL or missing references) //IL_1021: Expected O, but got Unknown //IL_1067: Unknown result type (might be due to invalid IL or missing references) //IL_107c: Unknown result type (might be due to invalid IL or missing references) //IL_1086: Expected O, but got Unknown //IL_10d4: Unknown result type (might be due to invalid IL or missing references) //IL_10de: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Node", guid, StaticCollections.Enemy_Collection, "node_frontback_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); MechaBehavior mechaBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).knockbackDoer.weight = 35f; ((BraveBehaviour)mechaBehavior).aiActor.MovementSpeed = 0.1f; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)mechaBehavior).aiActor.CollisionDamage = 0f; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).HasShadow = false; ((BraveBehaviour)mechaBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)mechaBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.ForceSetCurrentHealth(12f); ((BraveBehaviour)mechaBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)mechaBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)mechaBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).HasShadow = true; ((BraveBehaviour)mechaBehavior).aiActor.PathableTiles = (CellTypes)2; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).SetIsFlying(true, "Gamemode: Creative", true, false); ((BraveBehaviour)mechaBehavior).aiActor.PathableTiles = (CellTypes)6; ((BraveBehaviour)mechaBehavior).aiActor.AssignedCurrencyToDrop = 0; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.SetHealthMaximum(12f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Clear(); ImprovedAfterImage improvedAfterImage = ((Component)((BraveBehaviour)mechaBehavior).aiActor).gameObject.AddComponent(); improvedAfterImage.dashColor = new Color(1f, 0.1f, 0.1f); improvedAfterImage.spawnShadows = true; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 1, ManualWidth = 16, ManualHeight = 15, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 1, ManualWidth = 16, ManualHeight = 15, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)mechaBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)mechaBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)mechaBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)6; val.Flipped = (FlipType[])(object)new FlipType[8]; val.AnimNames = new string[8] { "idle_frontback", "idle_frontleftbackright", "idle_leftright", "idle_frontrightbackleft", "idle_frontback", "idle_frontleftbackright", "idle_leftright", "idle_frontrightbackleft" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; val = new DirectionalAnimation(); val.Type = (DirectionType)6; val.Flipped = (FlipType[])(object)new FlipType[8]; val.AnimNames = new string[8] { "idle_frontback", "idle_frontleftbackright", "idle_leftright", "idle_frontrightbackleft", "idle_frontback", "idle_frontleftbackright", "idle_leftright", "idle_frontrightbackleft" }; val.Prefix = "move"; aiAnimator.MoveAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("NodeEnemyAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "charge", new string[8] { "charge_frontback", "charge_frontleftbackright", "charge_leftright", "charge_frontrightbackleft", "charge_frontback", "charge_frontleftbackright", "charge_leftright", "charge_frontrightbackleft" }, (FlipType[])(object)new FlipType[8], (DirectionType)6); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "death", new Dictionary { { 0, "Play_DragunGrenade" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_frontback", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_frontleftbackright", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_leftright", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_frontrightbackleft", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_frontback", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_frontleftbackright", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_leftright", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "charge_frontrightbackleft", new Dictionary { { 0, "Play_ENM_bullet_dash_01" } }); ((BraveBehaviour)mechaBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)2; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; ((BraveBehaviour)mechaBehavior).aiActor.CorpseObject = EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5").CorpseObject; GameObject val2 = new GameObject("fuck"); val2.transform.parent = ((BraveBehaviour)mechaBehavior).transform; val2.transform.position = Vector2.op_Implicit(((BraveBehaviour)mechaBehavior).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)mechaBehavior).transform.Find("fuck")).gameObject; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; component2.MovementBehaviors = new List { (MovementBehaviorBase)new SeekTargetBehavior { StopWhenInRange = true, CustomRange = 4f, LineOfSight = true, ReturnToSpawn = true, SpawnTetherDistance = 0f, PathInterval = 0.5f, SpecifyRange = false, MinActiveRange = 1f, MaxActiveRange = 10f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val3 = new AttackGroupItem(); val3.Behavior = (AttackBehaviorBase)(object)new CustomDashBehavior { dashAnim = "charge", ShootPoint = gameObject, dashDistance = 9f, dashTime = 1f, AmountOfDashes = 1f, enableShadowTrail = false, Cooldown = 3f, dashDirection = (DashDirection)10, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 1f, AttackCooldown = 1f, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(ChargeShot)), RequiresLineOfSight = false }; list.Add(val3); list.Add(new AttackGroupItem { Probability = 1f, Behavior = (AttackBehaviorBase)(object)new CustomDashBehavior { dashAnim = "charge", ShootPoint = gameObject, dashDistance = 9f, dashTime = 1f, AmountOfDashes = 2f, enableShadowTrail = false, Cooldown = 0.7f, dashDirection = (DashDirection)20, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 1f, AttackCooldown = 0.5f, RequiresLineOfSight = false } }); list.Add(new AttackGroupItem { Probability = 0.5f, Behavior = (AttackBehaviorBase)(object)new CustomDashBehavior { dashAnim = "charge", ShootPoint = gameObject, dashDistance = 9f, dashTime = 1f, AmountOfDashes = 2f, enableShadowTrail = false, Cooldown = 3f, dashDirection = (DashDirection)30, warpDashAnimLength = true, hideShadow = true, fireAtDashStart = true, InitialCooldown = 1f, AttackCooldown = 0.75f, RequiresLineOfSight = false } }); val3 = new AttackGroupItem(); val3.Probability = 0.8f; AttackGroupItem obj = val3; ShootBehavior val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Gunge)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 2f; ((BasicAttackBehavior)val4).Cooldown = 6f; ((BasicAttackBehavior)val4).CooldownVariance = 1f; ((BasicAttackBehavior)val4).InitialCooldown = 3f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; obj.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Pewpew Attack"; list.Add(val3); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)211, (byte)214, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 1.55f); val5.SetFloat("_EmissivePower", 100f); val5.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).sprite).renderer.material = val5; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).bulletBank.GetBullet("directedfire")); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundSmall")); Entry bullet = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).bulletBank.GetBullet("default"); PickupObject byId = PickupObjectDatabase.GetById(370); Entry val6 = EnemyBuildingTools.CopyBulletBankEntry(bullet, "desparation", (string)null, ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects, false); Projectile component3 = val6.BulletObject.GetComponent(); ((BraveBehaviour)component3).sprite.usesOverrideMaterial = true; component3.hitEffects.alwaysUseMidair = true; component3.hitEffects.overrideMidairDeathVFX = StaticExplosionDatas.explosiveRoundsExplosion.effect; component3.BulletScriptSettings = new BulletScriptSettings { preventPooling = true }; Material val7 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val7.mainTexture = ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material.mainTexture; val7.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)211, (byte)214, byte.MaxValue))); val7.SetFloat("_EmissiveColorPower", 1.55f); val7.SetFloat("_EmissivePower", 100f); val7.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.material = val7; GameObject val8 = ETGMod.AddChild(((Component)component3).gameObject, "trail object", new Type[0]); val8.transform.position = Vector2.op_Implicit(((BraveBehaviour)component3).sprite.WorldCenter); val8.transform.localPosition = Vector2.op_Implicit(((BraveBehaviour)component3).sprite.WorldCenter); TrailRenderer val9 = val8.AddComponent(); ((Renderer)val9).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val9).receiveShadows = false; Material val10 = new Material(ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive")); val10.EnableKeyword("BRIGHTNESS_CLAMP_ON"); val10.SetFloat("_EmissivePower", 30f); val10.SetFloat("_EmissiveColorPower", 30f); ((Renderer)val9).material = val10; val9.minVertexDistance = 0.01f; val9.numCapVertices = 20; Color val11 = (val9.startColor = Color.red); val9.endColor = val11 * 0.7f; val9.time = 0.3f; val9.startWidth = 0.75f; val9.endWidth = 0f; val9.autodestruct = false; ProjectileTrailRendererController val12 = ((Component)component3).gameObject.AddComponent(); val12.trailRenderer = val9; val12.desiredLength = 4f; ((Component)component3).gameObject.AddComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(val6); GameObject val13 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val13); FakePrefab.MarkAsFakePrefab(val13); tk2dSprite val14 = val13.AddComponent(); ((tk2dBaseSprite)val14).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val14).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("nodecharge_010")); tk2dSpriteAnimator val15 = val13.AddComponent(); val15.Library = Module.ModularAssetBundle.LoadAsset("NodeChargeAnimation").GetComponent(); val15.defaultClipId = val15.Library.GetClipIdByName("charge"); val15.playAutomatically = true; ((tk2dBaseSprite)val14).usesOverrideMaterial = true; ((BraveBehaviour)val14).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val14).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val14).renderer.material.SetFloat("_EmissivePower", 60f); ((BraveBehaviour)val14).renderer.material.SetFloat("_EmissiveColorPower", 6f); KaboomObject = val13; AIAnimator aiAnimator2 = ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator; List list2 = new List(); NamedVFXPool val16 = new NamedVFXPool(); val16.name = "chargeUp"; val16.anchorTransform = ((BraveBehaviour)mechaBehavior).transform; VFXPool val17 = new VFXPool(); VFXComplex[] array = new VFXComplex[1]; VFXComplex val18 = new VFXComplex(); val18.effects = (VFXObject[])(object)new VFXObject[1] { new VFXObject { effect = val13 } }; array[0] = val18; val17.effects = (VFXComplex[])(object)array; val16.vfxPool = val17; list2.Add(val16); aiAnimator2.OtherVFX = list2; ((BraveBehaviour)mechaBehavior).healthHaver.spawnBulletScript = true; ((BraveBehaviour)mechaBehavior).healthHaver.chanceToSpawnBulletScript = 1f; ((BraveBehaviour)mechaBehavior).healthHaver.bulletScriptType = (BulletScriptType)0; ((BraveBehaviour)mechaBehavior).healthHaver.bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(DIE)); Game.Enemies.Add("mdlr:node", ((BraveBehaviour)mechaBehavior).aiActor); if ((Object)(object)((Component)mechaBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)mechaBehavior).GetComponent()); } ((BraveBehaviour)mechaBehavior).encounterTrackable = ((Component)mechaBehavior).gameObject.AddComponent(); ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)mechaBehavior).encounterTrackable.EncounterGuid = "mdlr:node"; ((BraveBehaviour)mechaBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#NODE_DRONE_NAME", "Micro Drone"); ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#NODE_DRONE_NAME"; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)mechaBehavior).healthHaver); } } } public class BigDrone : AIActor { public class MechaBehavior : BraveBehaviour { public GlobalMessageRadio.MessageContainer container; private void Start() { ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { }; } } public class Rockets : Script { public class Rocket : Bullet { public Rocket() : base("missile", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Missile_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_YariRocketLauncher_Shot_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Missile_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_YariRocketLauncher_Shot_01", (string)null); base.Projectile.BulletScriptSettings = new BulletScriptSettings { surviveRigidbodyCollisions = true }; ((BraveBehaviour)base.Projectile).spriteAnimator.Play(); for (int i = 0; i < 360; i++) { float aim = ((Bullet)this).GetAimDirection(1f, 10f); float delta = BraveMathCollege.ClampAngle180(aim - base.Direction); base.Direction += Mathf.MoveTowards(0f, delta, 2f); float Distance = Vector2.Distance(((Bullet)this).GetPredictedTargetPosition(1f, 100f), ((Bullet)this).Position); base.Speed = ((Distance > 12f) ? Mathf.Min(12f, Mathf.Max(3f, 24f - Distance * 2f)) : Mathf.Max(6f, Distance)); yield return ((Bullet)this).Wait(1); } } public override void OnBulletDestruction(DestroyType destroyType, SpeculativeRigidbody hitRigidbody, bool preventSpawningProjectiles) { if (!preventSpawningProjectiles) { ((Bullet)this).PostWwiseEvent("Play_WPN_smallrocket_impact_01", (string)null); ((Bullet)this).PostWwiseEvent("Play_WPN_smallrocket_impact_01", (string)null); } } } public override IEnumerator Top() { bool b = BraveUtility.RandomBool(); for (int e = 0; e < 2; e++) { b = !b; ((Bullet)this).Fire(new Direction((float)(b ? (-20) : 20), (DirectionType)0, -1f), new Speed(7f, (SpeedType)0), (Bullet)(object)new Rocket()); yield return ((Bullet)this).Wait(60); } } } public class GunGun : Script { public override IEnumerator Top() { for (int i = 0; i < 10; i++) { float aimDirection = ((Bullet)this).GetAimDirection(1f, 30f); ((Bullet)this).Fire(new Direction(aimDirection, (DirectionType)1, -1f), new Speed((float)i * 1.5f + 7.5f, (SpeedType)0), new Bullet("directedfire", false, false, false)); yield return ((Bullet)this).Wait(5); } } } public class Shotgun : Script { public class TinyBullet : Bullet { private bool Fart; public TinyBullet(bool fart) : base("reversible", false, false, false) { Fart = fart; } public override IEnumerator Top() { ((BraveBehaviour)base.Projectile).spriteAnimator.Play(); if (Fart) { ((Bullet)this).ChangeSpeed(new Speed(0f, (SpeedType)0), 90); yield return ((Bullet)this).Wait(420); ((Bullet)this).Vanish(false); } } } public override IEnumerator Top() { float aimDirection = ((Bullet)this).GetAimDirection(1f, 7f); for (int i = -4; i <= 4; i++) { ((Bullet)this).Fire(new Direction(aimDirection + (float)(i * 3), (DirectionType)1, -1f), new Speed(9f - (float)Mathf.Abs(i) * 0.8f, (SpeedType)0), (Bullet)(object)new TinyBullet(fart: false)); } yield break; } } public class Dash_ : Script { public class Rotater : Bullet { public Rotater() : base("poundSmall", false, false, false) { } public override IEnumerator Top() { yield return ((Bullet)this).Wait(30); ((Bullet)this).ChangeSpeed(new Speed(20f, (SpeedType)0), 120); } } public override IEnumerator Top() { float aimDirection = ((Bullet)this).GetAimDirection(1f, 14f); ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Hop_01", (string)null); for (int i = 0; i < 20; i++) { for (int e = 0; e < 3; e++) { ((Bullet)this).Fire(new Direction((float)(120 * e) + aimDirection, (DirectionType)1, -1f), new Speed(0f, (SpeedType)0), (Bullet)(object)new Rotater()); } yield return ((Bullet)this).Wait(3); } } } public class PewPew : Script { public class TinyBullet : Bullet { private bool Fart; public TinyBullet(bool fart) : base("reversible", false, false, false) { Fart = fart; } public override IEnumerator Top() { ((BraveBehaviour)base.Projectile).spriteAnimator.Play(); if (Fart) { ((Bullet)this).ChangeSpeed(new Speed(0f, (SpeedType)0), 90); yield return ((Bullet)this).Wait(420); ((Bullet)this).Vanish(false); } } } public override IEnumerator Top() { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Hop_01", (string)null); for (int j = 0; j < 16; j++) { ((Bullet)this).Fire(new Direction((float)(45 * j) + ((j <= 7) ? 22.5f : 0f), (DirectionType)1, -1f), new Speed((float)((j <= 7) ? 8 : 5), (SpeedType)0), (Bullet)(object)new TinyBullet(fart: true)); } yield return ((Bullet)this).Wait(60); for (int e = 0; e < 4; e++) { float aimDirection = ((Bullet)this).GetAimDirection(1f, 14f); ((Bullet)this).PostWwiseEvent("Play_ENM_bulletking_shot_01", (string)null); for (int i = -2; i <= 2; i++) { ((Bullet)this).Fire(new Direction(aimDirection + (float)(i * 4), (DirectionType)1, -1f), new Speed(9f - (float)Mathf.Abs(i) * 0.5f, (SpeedType)0), (Bullet)(object)new TinyBullet(fart: false)); } yield return ((Bullet)this).Wait(75); } } } private static GameObject prefab; public static readonly string guid = "BigDrone_MDLR"; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Expected O, but got Unknown //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Expected O, but got Unknown //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_07b4: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Expected O, but got Unknown //IL_0802: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_080e: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_0827: Unknown result type (might be due to invalid IL or missing references) //IL_0832: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Expected O, but got Unknown //IL_0875: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Expected O, but got Unknown //IL_088a: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Expected O, but got Unknown //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_08b0: Expected O, but got Unknown //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_0955: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Expected O, but got Unknown //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0971: Expected O, but got Unknown //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_0990: Expected O, but got Unknown //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Expected O, but got Unknown //IL_0a2a: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Expected O, but got Unknown //IL_0a46: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Expected O, but got Unknown //IL_0ab3: Unknown result type (might be due to invalid IL or missing references) //IL_0ad5: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Expected O, but got Unknown //IL_0b5a: Unknown result type (might be due to invalid IL or missing references) //IL_0ba3: Unknown result type (might be due to invalid IL or missing references) //IL_0bad: Expected O, but got Unknown //IL_0bbe: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Unknown result type (might be due to invalid IL or missing references) //IL_0bce: Unknown result type (might be due to invalid IL or missing references) //IL_0c33: Unknown result type (might be due to invalid IL or missing references) //IL_0c74: Expected O, but got Unknown //IL_0c77: Unknown result type (might be due to invalid IL or missing references) //IL_0c7e: Expected O, but got Unknown //IL_0d62: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Unknown result type (might be due to invalid IL or missing references) //IL_0ed1: Expected O, but got Unknown //IL_0f6e: Unknown result type (might be due to invalid IL or missing references) //IL_0f75: Expected O, but got Unknown //IL_0fb2: Unknown result type (might be due to invalid IL or missing references) //IL_0fb7: Unknown result type (might be due to invalid IL or missing references) //IL_1121: Unknown result type (might be due to invalid IL or missing references) //IL_112b: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Big Drone", guid, StaticCollections.Enemy_Collection, "superdrone_idle_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); MechaBehavior mechaBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).knockbackDoer.weight = 150f; ((BraveBehaviour)mechaBehavior).aiActor.MovementSpeed = 2f; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)mechaBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).HasShadow = false; ((BraveBehaviour)mechaBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)mechaBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.ForceSetCurrentHealth(70f); ((BraveBehaviour)mechaBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)mechaBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)mechaBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).HasShadow = true; ((BraveBehaviour)mechaBehavior).aiActor.PathableTiles = (CellTypes)6; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.SetHealthMaximum(70f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Clear(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 6, ManualOffsetY = 4, ManualWidth = 26, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 6, ManualOffsetY = 4, ManualWidth = 26, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ImprovedAfterImage improvedAfterImage = ((Component)((BraveBehaviour)mechaBehavior).aiActor).gameObject.AddComponent(); improvedAfterImage.dashColor = new Color(0f, 2f, 2f); improvedAfterImage.spawnShadows = false; improvedAfterImage.shadowTimeDelay = 0.05f; ((BraveBehaviour)mechaBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)mechaBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)mechaBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "move"; aiAnimator.MoveAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("BigDroneAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "preraise", new string[1] { "preraise" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "raise", new string[1] { "raise" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "prepdash", new string[1] { "prepdash" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "dash", new string[1] { "dash" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "postdash", new string[1] { "postdash" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "prepmissile", new string[1] { "prepmissile" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "missile", new string[1] { "missile" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "prepdash", new Dictionary { { 0, "Play_BOSS_cyborg_charge_01" }, { 5, "Play_ENM_cube_dash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "death", new Dictionary { { 0, "Play_BOSS_RatMech_Hop_01" }, { 2, "Play_OBJ_lightning_flash_01" }, { 8, "Play_OBJ_lightning_flash_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "preraise", new Dictionary { { 0, "Play_BOSS_RatMech_Shutter_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "prepmissile", new Dictionary { { 1, "Play_BOSS_RatMech_Squat_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "missile", new Dictionary { { 0, "Play_BOSS_RatMech_Missile_01" }, { 3, "Play_BOSS_RatMech_Missile_01" } }); AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("4d37ce3d666b4ddda8039929225b7ede"); ExplodeOnDeath val2 = ((Component)mechaBehavior).gameObject.AddComponent(); ExplosionData explosionData = ((Component)orLoadByGuid).GetComponent().explosionData; val2.explosionData = explosionData; val2.explosionData.damage = 15f; ((BraveBehaviour)mechaBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)0; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val3 = new GameObject("fuck"); val3.transform.parent = ((BraveBehaviour)mechaBehavior).transform; val3.transform.position = Vector2.op_Implicit(((BraveBehaviour)mechaBehavior).sprite.WorldBottomLeft + new Vector2(1.1875f, 0.75f)); GameObject gameObject = ((Component)((BraveBehaviour)mechaBehavior).transform.Find("fuck")).gameObject; AIActor orLoadByGuid2 = EnemyDatabase.GetOrLoadByGuid("21dd14e5ca2a4a388adab5b11b69a1e1"); AIBeamShooter component3 = ((Component)orLoadByGuid2).GetComponent(); AIBeamShooter2 item = Toolbox.AddAIBeamShooter2(((BraveBehaviour)mechaBehavior).aiActor, val3.transform, "middle_small_beam", component3.beamProjectile, component3.beamModule); AIBeamShooter2 item2 = Toolbox.AddAIBeamShooter2(((BraveBehaviour)mechaBehavior).aiActor, val3.transform, "middle_small_beam", component3.beamProjectile, component3.beamModule, 90f); AIBeamShooter2 item3 = Toolbox.AddAIBeamShooter2(((BraveBehaviour)mechaBehavior).aiActor, val3.transform, "middle_small_beam", component3.beamProjectile, component3.beamModule, 180f); AIBeamShooter2 item4 = Toolbox.AddAIBeamShooter2(((BraveBehaviour)mechaBehavior).aiActor, val3.transform, "middle_small_beam", component3.beamProjectile, component3.beamModule, 270f); component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; component2.MovementBehaviors = new List { (MovementBehaviorBase)new SeekTargetBehavior { StopWhenInRange = true, CustomRange = 4f, LineOfSight = true, ReturnToSpawn = true, SpawnTetherDistance = 0f, PathInterval = 0.5f, SpecifyRange = false, MinActiveRange = 1f, MaxActiveRange = 10f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val4 = new AttackGroupItem(); val4.Probability = 0.5f; AttackGroupItem obj = val4; ShootBehavior val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Rockets)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 0f; ((BasicAttackBehavior)val5).Cooldown = 1.5f; ((BasicAttackBehavior)val5).CooldownVariance = 0.5f; ((BasicAttackBehavior)val5).InitialCooldown = 1f; val5.ChargeTime = 1f; val5.ChargeAnimation = "prepmissile"; val5.FireAnimation = "missile"; ((BasicAttackBehavior)val5).RequiresLineOfSight = true; val5.MultipleFireEvents = true; val5.Uninterruptible = false; ((BasicAttackBehavior)val5).MaxUsages = 1; val5.StopDuring = (StopType)2; obj.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "Rockets"; list.Add(val4); val4 = new AttackGroupItem(); val4.Probability = 1.5f; AttackGroupItem obj2 = val4; val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(GunGun)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 0f; ((BasicAttackBehavior)val5).Cooldown = 3f; ((BasicAttackBehavior)val5).CooldownVariance = 0.5f; ((BasicAttackBehavior)val5).InitialCooldown = 4f; val5.ChargeTime = 1f; ((BasicAttackBehavior)val5).RequiresLineOfSight = true; val5.MultipleFireEvents = true; val5.Uninterruptible = false; val5.StopDuring = (StopType)2; obj2.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "So Much Gun"; list.Add(val4); val4 = new AttackGroupItem(); val4.Probability = 1f; AttackGroupItem obj3 = val4; val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Shotgun)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 1f; ((BasicAttackBehavior)val5).Cooldown = 5f; ((BasicAttackBehavior)val5).CooldownVariance = 2f; ((BasicAttackBehavior)val5).InitialCooldown = 1f; val5.ChargeTime = 0f; ((BasicAttackBehavior)val5).RequiresLineOfSight = true; val5.MultipleFireEvents = true; val5.Uninterruptible = false; val5.StopDuring = (StopType)2; obj3.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "So Much Gun"; list.Add(val4); val4 = new AttackGroupItem(); val4.Probability = 1f; val4.Behavior = (AttackBehaviorBase)(object)new CustomDashBehavior { dashAnim = "dash", chargeAnim = "prepdash", postDashSpeed = 0f, ShootPoint = gameObject, dashDistance = 15f, dashTime = 0.75f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 5f, dashDirection = (DashDirection)20, warpDashAnimLength = true, hideShadow = false, fireAtDashStart = true, InitialCooldown = 1f, AttackCooldown = 0.5f, RequiresLineOfSight = false, bulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Dash_)) }; list.Add(val4); list.Add(new AttackGroupItem { Probability = 1f, Behavior = (AttackBehaviorBase)(object)new CustomDashBehavior { dashAnim = "dash", chargeAnim = "prepdash", postDashSpeed = 0f, ShootPoint = gameObject, dashDistance = 9f, dashTime = 0.5f, AmountOfDashes = 1f, enableShadowTrail = true, Cooldown = 2f, dashDirection = (DashDirection)25, warpDashAnimLength = true, hideShadow = false, fireAtDashStart = true, InitialCooldown = 1f, AttackCooldown = 0.5f, RequiresLineOfSight = false } }); val4 = new AttackGroupItem(); val4.Probability = 0.7f; val4.Behavior = (AttackBehaviorBase)(object)new CustomBeholsterLaserBehavior { InitialCooldown = 1f, firingTime = 7f, AttackCooldown = 1f, Cooldown = 6f, CooldownVariance = 0f, RequiresLineOfSight = false, UsesCustomAngle = true, MaxUsages = 2, RampHeight = 14f, firingType = CustomBeholsterLaserBehavior.FiringType.ONLY_NORTHANGLEVARIANCE, chargeTime = 1f, UsesBaseSounds = false, AdditionalHeightOffset = 11f, EnemyChargeSound = "Play_BOSS_omegaBeam_charge_01", LaserFiringSound = "Play_ENM_deathray_shot_01", StopLaserFiringSound = "Stop_ENM_deathray_loop_01", ChargeAnimation = "preraise", FireAnimation = "raise", hurtsOtherHealthhavers = false, beamSelection = (BeamSelection)2, specificBeamShooters = new List { item, item2, item3, item4 }, MinRange = 4f, Range = 10f, trackingType = CustomBeholsterLaserBehavior.TrackingType.ConstantTurn, DoesSpeedLerp = true, DoesReverseSpeedLerp = true, InitialStartingSpeed = 0f, TimeToStayAtZeroSpeedAt = 1f, TimeToReachFullSpeed = 1f, TimeToReachEndingSpeed = 1f, EndingSpeed = 0f, LocksFacingDirection = false, maxTurnRate = 45f, maxUnitForCatchUp = 2f, minDegreesForCatchUp = 60f, minUnitForCatchUp = 0.1f, minUnitForOvershoot = 1f, turnRateAcceleration = 1f, unitCatchUpSpeed = 1f, unitOvershootSpeed = 1f, unitOvershootTime = 0.25f, degreeCatchUpSpeed = 90f, useDegreeCatchUp = Object.op_Implicit((Object)(object)((BraveBehaviour)mechaBehavior).transform), useUnitCatchUp = true, useUnitOvershoot = true, ShootPoint = gameObject.transform, StopDuring = CustomBeholsterLaserBehavior.StopType.All, BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(PewPew)) }; val4.NickName = "LASER"; list.Add(val4); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val6 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val6.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).sprite).renderer.material.mainTexture; val6.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val6.SetFloat("_EmissiveColorPower", 1.55f); val6.SetFloat("_EmissivePower", 100f); val6.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).sprite).renderer.material = val6; ((BraveBehaviour)mechaBehavior).aiActor.AssignedCurrencyToDrop = 0; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).bulletBank.GetBullet("directedfire")); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundSmall")); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("4d164ba3f62648809a4a82c90fc22cae")).bulletBank.GetBullet("missile")); Game.Enemies.Add("mdlr:big_drone", ((BraveBehaviour)mechaBehavior).aiActor); if ((Object)(object)((Component)mechaBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)mechaBehavior).GetComponent()); } ((BraveBehaviour)mechaBehavior).encounterTrackable = ((Component)mechaBehavior).gameObject.AddComponent(); ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)mechaBehavior).encounterTrackable.EncounterGuid = "mdlr:big_drone"; ((BraveBehaviour)mechaBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#BIGDRONE_NAME", "Security Drone"); ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#BIGDRONE_NAME"; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)mechaBehavior).healthHaver); } } } public class Nopticon : AIActor { public class NodeMinionController : BraveBehaviour { public class Shot : Script { public int Return() { return ((Component)((Bullet)this).BulletBank).GetComponent().ReturnNodeCount(); } public override IEnumerator Top() { int Rep = ((Return() > 6) ? 1 : (7 - Return())); for (int i = 0; i < 6; i++) { float aim = Vector2Extensions.ToAngle(((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter - ((BraveBehaviour)((Component)((Bullet)this).BulletBank).GetComponent().bodyPartController.MainBody).sprite.WorldCenter); ((Bullet)this).PostWwiseEvent("Play_WPN_looper_shot_01", (string)null); for (int e = 0; e < Rep; e++) { ((Bullet)this).Fire(Offset.OverridePosition(((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter), new Direction(aim + (float)(360 / Rep * e), (DirectionType)1, -1f), new Speed(1f + (float)i, (SpeedType)0), (Bullet)new SpeedChangingBullet("poundLarge", 15f, 120, -1, false)); } } yield break; } } public class LineBlast : Script { public int Return() { return ((Component)((Bullet)this).BulletBank).GetComponent().ReturnNodeCount(); } public override IEnumerator Top() { ? val = this; PickupObject byId = PickupObjectDatabase.GetById(180); ((Bullet)val).PostWwiseEvent("Play_WPN_grasshopper_impact_01", ((Gun)((byId is Gun) ? byId : null)).gunSwitchGroup); ((Bullet)this).Fire(Offset.OverridePosition(((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter), new Direction(((BraveBehaviour)((Bullet)this).BulletBank).aiAnimator.FacingDirection, (DirectionType)1, -1f), new Speed(0f, (SpeedType)0), (Bullet)new SpeedChangingBullet("default", 35f, 90, -1, false)); yield break; } } public class BlastBlast : Script { public int Return() { return ((Component)((Bullet)this).BulletBank).GetComponent().ReturnNodeCount(); } public override IEnumerator Top() { for (int i = 0; i < 120 / Return(); i++) { ((Bullet)this).PostWwiseEvent("Play_ITM_Crisis_Stone_Impact_01", (string)null); float aim = Vector2Extensions.ToAngle(((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter - ((BraveBehaviour)((Component)((Bullet)this).BulletBank).GetComponent().bodyPartController.MainBody).sprite.WorldCenter); ((Bullet)this).Fire(Offset.OverridePosition(((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter), new Direction(aim, (DirectionType)1, -1f), new Speed(3f, (SpeedType)0), (Bullet)new SpeedChangingBullet("poundSmall", 15f, 120, -1, false)); yield return ((Bullet)this).Wait(Return() * 2); } } } public class BasicBitchShot : Script { public int Return() { return ((Component)((Bullet)this).BulletBank).GetComponent().ReturnNodeCount(); } public override IEnumerator Top() { int Rep = ((Return() > 6) ? 1 : (7 - Return())); for (int e = 0; e < Rep; e++) { ? val = this; PickupObject byId = PickupObjectDatabase.GetById(156); ((Bullet)val).PostWwiseEvent("Play_WPN_plasmacell_shot_01", ((Gun)((byId is Gun) ? byId : null)).gunSwitchGroup); for (int i = 0; i < 3; i++) { ((Bullet)this).Fire(Offset.OverridePosition(((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter), new Direction(0f, (DirectionType)0, -1f), new Speed(3f + (float)i, (SpeedType)0), (Bullet)new SpeedChangingBullet("poundSmall", 20f, 100, -1, false)); } yield return ((Bullet)this).Wait(Return() * 6); } } } public AIActor Parent; private GameObject laser; private bool isFuckingDying = false; public AdvancedBodyPartController bodyPartController; public void Start() { bodyPartController = ((Component)this).GetComponent(); ((BraveBehaviour)bodyPartController).healthHaver.SetHealthMaximum(7f, (float?)null, false); ((BraveBehaviour)bodyPartController).healthHaver.ForceSetCurrentHealth(7f); AdvancedBodyPartController advancedBodyPartController = bodyPartController; advancedBodyPartController.OnBodyPartPreDeath = (Action)Delegate.Combine(advancedBodyPartController.OnBodyPartPreDeath, (Action)delegate { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) isFuckingDying = true; if (Object.op_Implicit((Object)(object)laser)) { Object.Destroy((Object)(object)laser); } List spawnedNodes = ((Component)bodyPartController.MainBody).gameObject.GetComponent().SpawnedNodes; ((Component)bodyPartController.MainBody).gameObject.GetComponent().OhFuck(); if (spawnedNodes.Contains(this)) { spawnedNodes.Remove(this); } foreach (NodeMinionController item in spawnedNodes) { ((BraveBehaviour)item).healthHaver.FullHeal(); } PickupObject byId = PickupObjectDatabase.GetById(156); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter), Quaternion.identity); tk2dBaseSprite component = val.GetComponent(); component.HeightOffGround = 35f; component.UpdateZDepth(); tk2dSpriteAnimator component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.ignoreTimeScale = true; component2.AlwaysIgnoreTimeScale = true; component2.AnimateDuringBossIntros = true; component2.alwaysUpdateOffscreen = true; component2.playAutomatically = true; } Object.Destroy((Object)(object)val, 2f); AkSoundEngine.PostEvent("Play_enm_mech_step_01", ((Component)this).gameObject); }); GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "Cast_Basic", "Cast_Burst", "Cast_Scatter", "Cast_Direct", "Cast_Crazy" }, OnMessageRecieved); } public void Update() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) if (!isFuckingDying) { if ((Object)(object)laser == (Object)null) { laser = Object.Instantiate(VFX_Object_Tether, Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter + new Vector2(0f, 0.5f)), Quaternion.identity); tk2dTiledSprite component = laser.GetComponent(); component.dimensions = new Vector2(16f * Vector2.Distance(((BraveBehaviour)this).sprite.WorldCenter, ((BraveBehaviour)bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f)), 2f); ((tk2dBaseSprite)component).ShouldDoTilt = false; GameObjectExtensions.SetLayerRecursively(laser, LayerMask.NameToLayer("BG_Nonsense")); } tk2dTiledSprite component2 = laser.GetComponent(); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, ReturnAngle(bodyPartController.MainBody)); component2.dimensions = new Vector2(16f * Vector2.Distance(((BraveBehaviour)this).sprite.WorldCenter, ((BraveBehaviour)bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f)), 2f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((BraveBehaviour)component2).transform.localPosition = Vector3Extensions.WithZ(new Vector3(0f, 0f), 1000f); laser.transform.position = Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter); } } public float ReturnAngle(AIActor enemy) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)enemy == (Object)null) { return 0f; } return Vector2Extensions.ToAngle(((BraveBehaviour)enemy).sprite.WorldCenter - ((BraveBehaviour)this).sprite.WorldCenter); } public override void OnDestroy() { ((BraveBehaviour)this).OnDestroy(); } public void MoveToPosition(Vector2 pos, float time = 1f) { //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) ((MonoBehaviour)this).StartCoroutine(MoveTo(TransformExtensions.PositionVector2(((BraveBehaviour)this).transform), pos, time)); } public void MoveToPositionInstant(Vector2 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((BraveBehaviour)this).transform.position = Vector2.op_Implicit(pos); } public void ToggleOverrideAim(bool e, float facing = 0f) { ((BraveBehaviour)this).aiAnimator.LockFacingDirection = e; if (e) { ((BraveBehaviour)this).aiAnimator.FacingDirection = facing; } } public int ReturnNodeCount() { return ((Component)bodyPartController.MainBody).GetComponent().SpawnedNodes.Count(); } private IEnumerator MoveTo(Vector2 oldpos, Vector2 pos, float time = 1f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) float ela = 0f; while (ela < time) { ela += BraveTime.DeltaTime; float t = ela / time; ((BraveBehaviour)this).transform.position = Vector2.op_Implicit(Vector2.Lerp(oldpos, pos, Toolbox.SinLerpTValue(t))); yield return null; } } public void ForceMessage(string message) { if (message != null) { OnMessageRecieved(((Component)((BraveBehaviour)bodyPartController.MainBody).aiActor).gameObject, message); } } public void OnMessageRecieved(GameObject obj, string message) { if (!((Object)(object)obj != (Object)(object)((Component)((BraveBehaviour)bodyPartController.MainBody).aiActor).gameObject) && message.Contains("Cast_")) { BulletScriptSource orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)this).gameObject); orAddComponent.BulletManager = ((Component)this).GetComponent(); orAddComponent.BulletScript = (BulletScriptSelector)(object)ReturnScript(message); orAddComponent.Initialize(); } } public static CustomBulletScriptSelector ReturnScript(string s) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown return (CustomBulletScriptSelector)(s switch { "Cast_Burst" => (object)new CustomBulletScriptSelector(typeof(Shot)), "Cast_Basic" => (object)new CustomBulletScriptSelector(typeof(BasicBitchShot)), "Cast_Scatter" => (object)new CustomBulletScriptSelector(typeof(BlastBlast)), "Cast_Direct" => (object)new CustomBulletScriptSelector(typeof(LineBlast)), _ => (object)new CustomBulletScriptSelector(typeof(Shot)), }); } } public class NopticonBehavior : BraveBehaviour { public class Cast_Scatter : Script { public override IEnumerator Top() { GameObject sadassda = Object.Instantiate(RedWarn, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter + new Vector2(-0.125f, 0.125f)), Quaternion.identity); sadassda.transform.parent = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).transform; sadassda.GetComponent().PlayAndDestroyObject("bigbeep", (Action)null); yield return ((Bullet)this).Wait(30); NopticonBehavior NoP = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent(); BraveUtility.Shuffle(NoP.SpawnedNodes); float rng = BraveUtility.RandomAngle(); for (int i = 0; i < NoP.SpawnedNodes.Count; i++) { NodeMinionController node = NoP.SpawnedNodes[i]; node.MoveToPosition(((BraveBehaviour)node.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle((float)(360 / NoP.SpawnedNodes.Count * i) + rng, 2f)); } yield return ((Bullet)this).Wait(60); GlobalMessageRadio.BroadcastMessageToOthers(((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).gameObject, "Cast_Scatter"); bool b = BraveUtility.RandomBool(); for (int e = 0; e < 240; e++) { for (int j = 0; j < NoP.SpawnedNodes.Count; j++) { int coc = ((NoP.SpawnedNodes.Count() > 6) ? 1 : (7 - NoP.SpawnedNodes.Count())); NodeMinionController node2 = NoP.SpawnedNodes[j]; node2.MoveToPositionInstant(((BraveBehaviour)node2.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle(360 / NoP.SpawnedNodes.Count * j + (b ? (e * coc) : (e * coc)), 2f)); } yield return ((Bullet)this).Wait(1); } yield return ((Bullet)this).Wait(30); } } public class Cast_Burst : Script { public override IEnumerator Top() { GameObject sadassda = Object.Instantiate(RedWarn, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter + new Vector2(-0.125f, 0.125f)), Quaternion.identity); sadassda.transform.parent = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).transform; sadassda.GetComponent().PlayAndDestroyObject("bigbeep", (Action)null); yield return ((Bullet)this).Wait(30); NopticonBehavior NoP = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent(); for (int f = 0; f < Mathf.Max(1, 7 - NoP.SpawnedNodes.Count); f++) { BraveUtility.Shuffle(NoP.SpawnedNodes); float rng = BraveUtility.RandomAngle(); Random.Range(1.5f, 3f); for (int i = 0; i < NoP.SpawnedNodes.Count; i++) { NodeMinionController node = NoP.SpawnedNodes[i]; node.MoveToPosition(((BraveBehaviour)node.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle((float)(360 / NoP.SpawnedNodes.Count * i) + rng, 1f)); } yield return ((Bullet)this).Wait(60); GlobalMessageRadio.BroadcastMessageToOthers(((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).gameObject, "Cast_Burst"); } yield return ((Bullet)this).Wait(30); } } public class Cast_Beans : Script { public override IEnumerator Top() { GameObject sadassda = Object.Instantiate(RedWarn, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter + new Vector2(-0.125f, 0.125f)), Quaternion.identity); sadassda.transform.parent = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).transform; sadassda.GetComponent().PlayAndDestroyObject("bigbeep", (Action)null); yield return ((Bullet)this).Wait(30); NopticonBehavior NoP = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent(); int h = Mathf.Max(1, 7 - NoP.SpawnedNodes.Count); for (int a = 0; a < h; a++) { Mathf.Min(1f, (float)(h / 6)); BraveUtility.Shuffle(NoP.SpawnedNodes); float adfsa = Vector2Extensions.ToAngle(((Bullet)this).GetPredictedTargetPositionExact(1f, 30f) - TransformExtensions.PositionVector2(((BraveBehaviour)((Bullet)this).BulletBank).transform)); Vector2 vec1 = Toolbox.GetUnitOnCircle(adfsa - 45f, 3f); Vector2 vec2 = Toolbox.GetUnitOnCircle(adfsa + 45f, 3f); for (int i = 0; i < NoP.SpawnedNodes.Count; i++) { float t = (float)i / (float)NoP.SpawnedNodes.Count; NodeMinionController node = NoP.SpawnedNodes[i]; node.ToggleOverrideAim(e: true, adfsa); node.MoveToPosition(((BraveBehaviour)node.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Vector2.Lerp(vec1, vec2, t), 0.5f); } yield return ((Bullet)this).Wait(40); GlobalMessageRadio.BroadcastMessageToOthers(((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).gameObject, "Cast_Direct"); } for (int j = 0; j < NoP.SpawnedNodes.Count; j++) { NodeMinionController node2 = NoP.SpawnedNodes[j]; node2.ToggleOverrideAim(e: false); } yield return ((Bullet)this).Wait(30); } } public class Cast_Singles : Script { public override IEnumerator Top() { GameObject sadassda = Object.Instantiate(RedWarn, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).sprite.WorldTopCenter + new Vector2(-0.125f, 0.125f)), Quaternion.identity); sadassda.transform.parent = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).transform; sadassda.GetComponent().PlayAndDestroyObject("bigbeep", (Action)null); yield return ((Bullet)this).Wait(30); NopticonBehavior NoP = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent(); float rng = BraveUtility.RandomAngle(); BraveUtility.Shuffle(NoP.SpawnedNodes); for (int j = 0; j < NoP.SpawnedNodes.Count; j++) { NodeMinionController node = NoP.SpawnedNodes[j]; node.MoveToPosition(((BraveBehaviour)node.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle((float)(360 / NoP.SpawnedNodes.Count * j) + rng, 1f), 0.5f); } yield return ((Bullet)this).Wait(45); for (int i = 0; i < NoP.SpawnedNodes.Count; i++) { NodeMinionController Node = NoP.SpawnedNodes[i]; if ((Object)(object)Node != (Object)null) { GameObject fx = Object.Instantiate(RedWarn, ((BraveBehaviour)Node).transform.position + new Vector3(0f, 0.5f), Quaternion.identity); fx.transform.parent = ((BraveBehaviour)Node).transform; fx.GetComponent().PlayAndDestroyObject("beepbeep", (Action)null); float aim = Vector2Extensions.ToAngle(((Bullet)this).GetPredictedTargetPosition(0f, 1000f) - ((BraveBehaviour)Node).sprite.WorldCenter); Node.MoveToPosition(((BraveBehaviour)Node.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle(aim, Vector2.Distance(((Bullet)this).GetPredictedTargetPosition(0f, 1000f), ((BraveBehaviour)Node).sprite.WorldCenter) / 1.5f), 0.5f); yield return ((Bullet)this).Wait(45); } if ((Object)(object)Node != (Object)null) { Node.ForceMessage("Cast_Basic"); yield return ((Bullet)this).Wait(15); } Node?.MoveToPosition(((BraveBehaviour)Node.bodyPartController.MainBody).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle((float)(360 / NoP.SpawnedNodes.Count * i) + rng, 1f), 0.5f); } yield return ((Bullet)this).Wait(30); } } public int NodeCount = 2; public List SpawnedNodes = new List(); public bool IsNodedUp = false; private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown for (int i = 0; i < NodeCount; i++) { AdvancedBodyPartController component = Object.Instantiate(node, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter + new Vector2(-0.125f, -0.125f) + Toolbox.GetUnitOnCircle(360 / NodeCount * i, 2f)), Quaternion.identity, (Transform)null).GetComponent(); SpawnedNodes.Add(((Component)component).GetComponent()); component.MainBody = ((BraveBehaviour)this).aiActor; ((Component)component).gameObject.transform.parent = ((BraveBehaviour)((BraveBehaviour)this).aiActor).transform; } IsNodedUp = true; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter, 5f * ConfigManager.DistortionWaveMultiplier, 0.1f * ConfigManager.DistortionWaveMultiplier, 50f, 1f); Vector3 val = Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldBottomCenter); AkSoundEngine.PostEvent("Play_BOSS_queenship_explode_01", ((Component)this).gameObject); if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(573); GameObject teleportVFX = ((ChestTeleporterItem)((byId is ChestTeleporterItem) ? byId : null)).TeleportVFX; SpawnManager.SpawnVFX(teleportVFX, val, Quaternion.identity, true); } }; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnDamaged += new OnDamagedEvent(HealthHaver_OnDamaged); } private void HealthHaver_OnDamaged(float resultValue, float maxValue, CoreDamageTypes damageTypes, DamageCategory damageCategory, Vector2 damageDirection) { } public void OhFuck() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Exploder.DoDistortionWave(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter, 1f * ConfigManager.DistortionWaveMultiplier, 0.05f * ConfigManager.DistortionWaveMultiplier, 25f, 0.5f); AkSoundEngine.PostEvent("Play_BOSS_RatMech_Wizard_Death_01", ((Component)this).gameObject); } public void Update() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (SpawnedNodes.Count == 0 && IsNodedUp) { IsNodedUp = false; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.ApplyDamage(9999f, Vector2.zero, "Critical Shit", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } else if (SpawnedNodes.Count > 0) { ((BraveBehaviour)this).healthHaver.currentHealth = 90f * ((float)SpawnedNodes.Count / (float)NodeCount); } } } private static GameObject VFX_Object_Tether; private static GameObject node; private static GameObject prefab; public static readonly string guid = "Nopticon_MDLR"; public static GameObject RedWarn; public static void BuildNode() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_0122: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025c: 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_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Expected O, but got Unknown //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject("Nopticon Eye"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Enemy_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Enemy_Collection.GetSpriteIdByName("towernode_idle_001")); tk2dSpriteAnimator val3 = val.AddComponent(); ((BraveBehaviour)val3).sprite.usesOverrideMaterial = true; Material val4 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val4.mainTexture = ((BraveBehaviour)((BraveBehaviour)val3).sprite).renderer.material.mainTexture; val4.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)215, (byte)205, byte.MaxValue))); val4.SetFloat("_EmissiveColorPower", 1.55f); val4.SetFloat("_EmissivePower", 50f); val4.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)val3).sprite).renderer.material = val4; val3.Library = Module.ModularAssetBundle.LoadAsset("TowerNodeAnimation").GetComponent(); AIAnimator val5 = val.AddComponent(); DirectionalAnimation val6 = new DirectionalAnimation(); val6.Type = (DirectionType)6; val6.Flipped = (FlipType[])(object)new FlipType[8]; val6.AnimNames = new string[8] { "idle_u", "idle_ur", "idle_r", "idle_dr", "idle_d", "idle_dl", "idle_l", "idle_ul" }; val5.IdleAnimation = val6; AdvancedBodyPartController advancedBodyPartController = val.AddComponent(); advancedBodyPartController.Name = "Nopticon Node"; advancedBodyPartController.Render = true; advancedBodyPartController.OverrideFacingDirection = true; advancedBodyPartController.faceTarget = true; advancedBodyPartController.faceTargetTurnSpeed = 120f; val.AddComponent(); ImprovedAfterImage improvedAfterImage = val.gameObject.AddComponent(); improvedAfterImage.dashColor = new Color(2f, 0.1f, 0.1f); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowTimeDelay = 0.05f; SpeculativeRigidbody val7 = val.AddComponent(); val7.CollideWithOthers = true; val7.CollideWithTileMap = false; val.GetComponent().OverrideMaterialMode = (SpriteMaterialOverrideMode)1; val7.PixelColliders = new List(); val7.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 7, ManualHeight = 8, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); HealthHaver val8 = val.AddComponent(); val8.SetHealthMaximum(10f, (float?)null, false); val8.ForceSetCurrentHealth(10f); val8.flashesOnDamage = true; GameObjectExtensions.GetOrAddComponent(val); EnemyBuildingTools.AddNewDirectionAnimation(val5, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); AIBulletBank val9 = val.gameObject.AddComponent(); val9.Bullets = new List { ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("frogger"), ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundLarge"), ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundSmall"), ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible"), ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Robot_Cylinder_GUID)).bulletBank.GetBullet("default") }; node = val; GameObject val10 = new GameObject("Red_Line Tether"); Object.DontDestroyOnLoad((Object)(object)val10); FakePrefab.MarkAsFakePrefab(val10); val10.SetActive(false); tk2dTiledSprite val11 = val10.AddComponent(); ((tk2dBaseSprite)val11).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val11).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("beamlaserthing1")); tk2dSpriteAnimator val12 = val10.AddComponent(); val12.Library = Module.ModularAssetBundle.LoadAsset("TetherAnimation").GetComponent(); val12.defaultClipId = val12.Library.GetClipIdByName("idle_red"); val12.playAutomatically = true; ((tk2dBaseSprite)val11).usesOverrideMaterial = true; ((BraveBehaviour)val11).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val11).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val11).renderer.material.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)val11).renderer.material.SetFloat("_EmissiveColorPower", 50f); GameObjectExtensions.SetLayerRecursively(((Component)val11).gameObject, LayerMask.NameToLayer("Unoccluded")); VFX_Object_Tether = val10; } public static void BuildPrefab(int nodeCount) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: 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_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Expected O, but got Unknown //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Expected O, but got Unknown //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Expected O, but got Unknown //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Expected O, but got Unknown //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Expected O, but got Unknown //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Expected O, but got Unknown //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Expected O, but got Unknown //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Expected O, but got Unknown //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Expected O, but got Unknown //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Expected O, but got Unknown //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Expected O, but got Unknown //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Expected O, but got Unknown //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Expected O, but got Unknown //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Expected O, but got Unknown //IL_0741: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Expected O, but got Unknown //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Expected O, but got Unknown //IL_0885: Unknown result type (might be due to invalid IL or missing references) //IL_088a: Unknown result type (might be due to invalid IL or missing references) //IL_090a: Unknown result type (might be due to invalid IL or missing references) //IL_0911: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Nopticon", guid + "(" + nodeCount + ")", StaticCollections.Enemy_Collection, "towernopticon_death_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); NopticonBehavior nopticonBehavior = prefab.AddComponent(); nopticonBehavior.NodeCount = nodeCount; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).knockbackDoer.weight = 50000f; ((BraveBehaviour)nopticonBehavior).aiActor.MovementSpeed = 1f; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).healthHaver.PreventAllDamage = true; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).healthHaver.flashesOnDamage = false; ((BraveBehaviour)nopticonBehavior).aiActor.AssignedCurrencyToDrop = 0; ((BraveBehaviour)nopticonBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)nopticonBehavior).aiActor).HasShadow = false; ((BraveBehaviour)nopticonBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)nopticonBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).healthHaver.ForceSetCurrentHealth(90f); ((BraveBehaviour)nopticonBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)nopticonBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)nopticonBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)nopticonBehavior).aiActor).HasShadow = true; ((BraveBehaviour)nopticonBehavior).aiActor.PathableTiles = (CellTypes)2; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).healthHaver.SetHealthMaximum(90f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).specRigidbody.PixelColliders.Clear(); ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).healthHaver.persistsOnDeath = true; EnemyBuildingTools.AddShadowToAIActor(((BraveBehaviour)nopticonBehavior).aiActor, ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject, new Vector2(0.75f, 0.25f), "shadowPos"); ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 3, ManualOffsetY = 3, ManualWidth = 12, ManualHeight = 31, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 3, ManualOffsetY = 3, ManualWidth = 12, ManualHeight = 31, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)nopticonBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)nopticonBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)nopticonBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)1; val.Flipped = (FlipType[])(object)new FlipType[1]; val.AnimNames = new string[1] { "idle" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("NopticonAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)nopticonBehavior).spriteAnimator, "death", new Dictionary { { 0, "Play_ENM_plasma_burst_01" } }); ((BraveBehaviour)nopticonBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)1; ((BraveBehaviour)nopticonBehavior).aiActor.reinforceType = (ReinforceType)1; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val2 = new GameObject("fuck"); val2.transform.parent = ((BraveBehaviour)nopticonBehavior).transform; val2.transform.position = Vector2.op_Implicit(((BraveBehaviour)nopticonBehavior).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)nopticonBehavior).transform.Find("fuck")).gameObject; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val3 = new AttackGroupItem(); val3.Probability = 1f; AttackGroupItem obj = val3; ShootBehavior val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(NopticonBehavior.Cast_Burst)); ((BasicAttackBehavior)val4).AttackCooldown = 1f; ((BasicAttackBehavior)val4).Cooldown = 3f; ((BasicAttackBehavior)val4).CooldownVariance = 0.5f; ((BasicAttackBehavior)val4).InitialCooldown = 1f; ((BasicAttackBehavior)val4).RequiresLineOfSight = false; val4.MultipleFireEvents = true; val4.Uninterruptible = true; obj.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Cast_Burst"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 1.5f; AttackGroupItem obj2 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(NopticonBehavior.Cast_Singles)); ((BasicAttackBehavior)val4).AttackCooldown = 2f; ((BasicAttackBehavior)val4).Cooldown = 5f; ((BasicAttackBehavior)val4).CooldownVariance = 0.5f; ((BasicAttackBehavior)val4).InitialCooldown = 1f; ((BasicAttackBehavior)val4).RequiresLineOfSight = false; val4.MultipleFireEvents = true; val4.Uninterruptible = true; obj2.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Cast_Basic"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 1f; AttackGroupItem obj3 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(NopticonBehavior.Cast_Beans)); ((BasicAttackBehavior)val4).AttackCooldown = 2f; ((BasicAttackBehavior)val4).Cooldown = 5f; ((BasicAttackBehavior)val4).CooldownVariance = 0.5f; ((BasicAttackBehavior)val4).InitialCooldown = 1f; ((BasicAttackBehavior)val4).RequiresLineOfSight = false; val4.MultipleFireEvents = true; val4.Uninterruptible = true; obj3.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Cast_Beans"; list.Add(val3); val3 = new AttackGroupItem(); val3.Probability = 0.7f; AttackGroupItem obj4 = val3; val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(NopticonBehavior.Cast_Scatter)); ((BasicAttackBehavior)val4).AttackCooldown = 2f; ((BasicAttackBehavior)val4).Cooldown = 7f; ((BasicAttackBehavior)val4).CooldownVariance = 0.5f; ((BasicAttackBehavior)val4).InitialCooldown = 1f; ((BasicAttackBehavior)val4).RequiresLineOfSight = false; val4.MultipleFireEvents = true; val4.Uninterruptible = true; obj4.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "Cast_Scatter"; list.Add(val3); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)nopticonBehavior).healthHaver); Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)nopticonBehavior).aiActor).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)215, (byte)205, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 1.55f); val5.SetFloat("_EmissivePower", 100f); val5.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)nopticonBehavior).sprite).renderer.material = val5; Game.Enemies.Add("mdlr:nopticon(" + nodeCount + ")", ((BraveBehaviour)nopticonBehavior).aiActor); GameObject val6 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val6); FakePrefab.MarkAsFakePrefab(val6); tk2dSprite val7 = val6.AddComponent(); ((tk2dBaseSprite)val7).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val7).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("redwarn1")); tk2dSpriteAnimator val8 = val6.AddComponent(); val8.Library = Module.ModularAssetBundle.LoadAsset("RedWarnAnimation").GetComponent(); ((tk2dBaseSprite)val7).usesOverrideMaterial = true; ((BraveBehaviour)val7).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val7).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val7).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val7).renderer.material.SetFloat("_EmissiveColorPower", 10f); RedWarn = val6; Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val8, "bigbeep", new Dictionary { { 0, "Play_ENM_hammer_target_01" }, { 2, "Play_ENM_hammer_target_01" }, { 4, "Play_ENM_hammer_target_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val8, "beepbeep", new Dictionary { { 0, "Play_OBJ_metroid_roll_01" }, { 2, "Play_OBJ_metroid_roll_01" }, { 4, "Play_OBJ_metroid_roll_01" } }); } } } public class Sentry : AIActor { public class TurretBehavior : BraveBehaviour { public float AttackFireRate = 3.5f; private void Start() { ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(RobotMiniMecha.KaboomObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)this).aiActor).sprite.WorldCenter), Quaternion.identity); val.GetComponent().PlayAndDestroyObject("kaboom", (Action)null); }; } } public class MinionShotPredictive : Script { public class HitScan : Bullet { public HitScan() : base("SentryShot", false, false, false) { } public override IEnumerator Top() { yield break; } } public virtual bool IsBlue => false; public override IEnumerator Top() { float Angle = ((Bullet)this).AimDirection; GameObject gameObject = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component2 = gameObject.GetComponent(); ((BraveBehaviour)component2).transform.position = new Vector3(((Bullet)this).Position.x, ((Bullet)this).Position.y, 99999f); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, Angle); component2.dimensions = new Vector2(1000f, 1f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((tk2dBaseSprite)component2).HeightOffGround = -1f; ((Component)component2).gameObject.layer = 21; Color laser = (IsBlue ? new Color(0f, 0.25f, 1f) : new Color(1f, 0.85f, 0.7f)); ((BraveBehaviour)component2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 40f); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_OverrideColor", laser); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetColor("_EmissiveColor", laser); ((MonoBehaviour)GameManager.Instance).StartCoroutine(FlashReticles(component2, this)); yield return ((Bullet)this).Wait((((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().AttackFireRate * 60f + 60f) * PlayerStats.GetTotalEnemyProjectileSpeedMultiplier()); } private IEnumerator FlashReticles(tk2dTiledSprite tiledspriteObject, MinionShotPredictive parent) { tk2dTiledSprite tiledsprite = ((Component)tiledspriteObject).GetComponent(); float elapsed = 0f; float elapsed3 = 0f; float Time = ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().AttackFireRate; float f = 0f; float Interval = 0.5f; bool lightSHow = false; RaycastResult raycastResult2 = default(RaycastResult); while (elapsed < Time) { if (elapsed3 > Interval) { ((Bullet)this).PostWwiseEvent("Play_TurretBeep", (string)null); elapsed3 = 0f; lightSHow = !lightSHow; Color colorLaser = (Color)(lightSHow ? Color.red : new Color(1f, 1f, 1f)); ((BraveBehaviour)((BraveBehaviour)tiledsprite).sprite).renderer.material.SetColor("_OverrideColor", colorLaser); ((BraveBehaviour)((BraveBehaviour)tiledsprite).sprite).renderer.material.SetColor("_EmissiveColor", colorLaser); } if (elapsed < Time * 0.2f) { Interval = 0.5f; } if (elapsed > Time * 0.2f && elapsed < Time * 0.4f) { Interval = 0.4f; } if (elapsed > Time * 0.4f && elapsed < Time * 0.6f) { Interval = 0.3f; } if (elapsed > Time * 0.6f && elapsed < Time * 0.8f) { Interval = 0.2f; } if (elapsed > Time * 0.8f && elapsed < Time) { Interval = 0.1f; } _ = elapsed / Time; if (this == null) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if ((Object)(object)((Bullet)this).BulletBank == (Object)null) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if (((Bullet)parent).IsEnded || ((Bullet)parent).Destroyed) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if ((Object)(object)((Component)((Bullet)this).BulletBank).gameObject == (Object)null) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if ((Object)(object)tiledspriteObject != (Object)null) { ((BraveBehaviour)tiledsprite).transform.position = Vector2.op_Implicit(((BraveBehaviour)((Bullet)this).BulletBank).sprite.WorldCenter); Func rigidbodyExcluder2 = (SpeculativeRigidbody otherRigidbody) => Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable) && !((BraveBehaviour)otherRigidbody).minorBreakable.stopsBullets; Vector2 predictedPosition2 = BraveMathCollege.GetPredictedPosition(((Bullet)this).BulletManager.PlayerPosition(), ((Bullet)this).BulletManager.PlayerVelocity(), ((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter, 90f); float CentreAngle2 = Vector2Extensions.ToAngle(predictedPosition2 - ((Bullet)this).Position); f = CentreAngle2; ((BraveBehaviour)tiledsprite).transform.localRotation = Quaternion.Euler(0f, 0f, CentreAngle2); float num10 = 0f; int rayMask3 = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, (CollisionLayer)0, (CollisionLayer)12); if (PhysicsEngine.Instance.Raycast(((Bullet)this).Position, predictedPosition2 - ((Bullet)this).Position, 1000f, ref raycastResult2, true, true, rayMask3, (CollisionLayer?)null, false, rigidbodyExcluder2, (SpeculativeRigidbody)null)) { num10 = raycastResult2.Distance; } RaycastResult.Pool.Free(ref raycastResult2); tiledsprite.dimensions = new Vector2(num10 / 0.0625f, 1f); ((tk2dBaseSprite)tiledsprite).UpdateZDepth(); raycastResult2 = null; } elapsed += BraveTime.DeltaTime; elapsed3 += BraveTime.DeltaTime; yield return null; } elapsed = 0f; Time = 0.25f; RaycastResult raycastResult3 = default(RaycastResult); while (elapsed < Time) { if (this == null) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if ((Object)(object)((Bullet)this).BulletBank == (Object)null) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if (((Bullet)parent).IsEnded || ((Bullet)parent).Destroyed) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if ((Object)(object)((Component)((Bullet)this).BulletBank).gameObject == (Object)null) { Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); yield break; } if ((Object)(object)tiledspriteObject != (Object)null) { ((BraveBehaviour)tiledsprite).transform.position = Vector2.op_Implicit(((BraveBehaviour)((Bullet)this).BulletBank).sprite.WorldCenter); Func rigidbodyExcluder = (SpeculativeRigidbody otherRigidbody) => Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable) && !((BraveBehaviour)otherRigidbody).minorBreakable.stopsBullets; Vector2 predictedPosition = BraveMathCollege.GetPredictedPosition(((Bullet)this).BulletManager.PlayerPosition(), ((Bullet)this).BulletManager.PlayerVelocity(), ((Component)((Bullet)this).BulletBank).GetComponent().WorldCenter, 90f); float CentreAngle = Vector2Extensions.ToAngle(predictedPosition - ((Bullet)this).Position); ((BraveBehaviour)tiledsprite).transform.localRotation = Quaternion.Euler(0f, 0f, CentreAngle); float num9 = 0f; int rayMask2 = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, (CollisionLayer)0, (CollisionLayer)12); if (PhysicsEngine.Instance.Raycast(((Bullet)this).Position, predictedPosition - ((Bullet)this).Position, 1000f, ref raycastResult3, true, true, rayMask2, (CollisionLayer?)null, false, rigidbodyExcluder, (SpeculativeRigidbody)null)) { num9 = raycastResult3.Distance; } RaycastResult.Pool.Free(ref raycastResult3); tiledsprite.dimensions = new Vector2(num9 / 0.0625f, 1f); ((Component)((BraveBehaviour)tiledsprite).renderer).gameObject.layer = 23; ((tk2dBaseSprite)tiledsprite).UpdateZDepth(); bool enabled = elapsed % 0.25f > 0.125f; ((BraveBehaviour)((BraveBehaviour)tiledsprite).sprite).renderer.enabled = enabled; raycastResult3 = null; } elapsed += BraveTime.DeltaTime; yield return null; } Object.Destroy((Object)(object)((Component)tiledspriteObject).gameObject); if (Time > 1.5f) { ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().AttackFireRate -= 0.5f; } if ((Object)(object)((Bullet)this).BulletBank != (Object)null) { ((Bullet)this).PostWwiseEvent("Play_SentryRailgun", (string)null); ((Bullet)this).Fire(new Direction(f, (DirectionType)1, -1f), new Speed(250f, (SpeedType)0), (Bullet)(object)new HitScan()); } } } private static GameObject prefab; public static readonly string guid = "SentryTurret_MDLR"; public static GameObject FuckYou; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Expected O, but got Unknown //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Expected O, but got Unknown //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Expected O, but got Unknown //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Expected O, but got Unknown //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Expected O, but got Unknown //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Expected O, but got Unknown //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08cd: Unknown result type (might be due to invalid IL or missing references) //IL_08d9: Expected O, but got Unknown //IL_0bda: Unknown result type (might be due to invalid IL or missing references) //IL_0be2: Unknown result type (might be due to invalid IL or missing references) //IL_0ca0: Unknown result type (might be due to invalid IL or missing references) //IL_0caa: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Sentry", guid, StaticCollections.Enemy_Collection, "gunnermech_die_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); TurretBehavior turretBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).knockbackDoer.weight = 50000f; ((BraveBehaviour)turretBehavior).aiActor.MovementSpeed = 1f; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)turretBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)turretBehavior).aiActor).HasShadow = false; ((BraveBehaviour)turretBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)turretBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).healthHaver.ForceSetCurrentHealth(40f); ((BraveBehaviour)turretBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)turretBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)turretBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)turretBehavior).aiActor).HasShadow = true; ((BraveBehaviour)turretBehavior).aiActor.PathableTiles = (CellTypes)2; GameObjectExtensions.GetOrAddComponent(((Component)turretBehavior).gameObject); ((BraveBehaviour)turretBehavior).aiActor.AssignedCurrencyToDrop = 0; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).healthHaver.SetHealthMaximum(40f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).specRigidbody.PixelColliders.Clear(); EnemyBuildingTools.AddShadowToAIActor(((BraveBehaviour)turretBehavior).aiActor, ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject, new Vector2(0.75f, 0.25f), "shadowPos"); ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 5, ManualOffsetY = 3, ManualWidth = 14, ManualHeight = 20, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 5, ManualOffsetY = 3, ManualWidth = 14, ManualHeight = 20, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)turretBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)turretBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)turretBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)6; val.Flipped = (FlipType[])(object)new FlipType[8]; val.AnimNames = new string[8] { "idle_up", "idle_right_up", "idle_right", "idle_right_down", "idle_down", "idle_left_down", "idle_left", "idle_left_up" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("SentryAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "awake", new string[1] { "awaken" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "charge", new string[8] { "charge_up", "charge_right_up", "charge_right", "charge_down_right", "charge_down", "charge_down_left", "charge_left", "charge_left_up" }, (FlipType[])(object)new FlipType[8], (DirectionType)6); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)turretBehavior).spriteAnimator, "death", new Dictionary { { 0, "Play_ENM_plasma_burst_01" } }); ((BraveBehaviour)turretBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)1; ((BraveBehaviour)turretBehavior).aiActor.reinforceType = (ReinforceType)1; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val2 = new GameObject("fuck"); val2.transform.parent = ((BraveBehaviour)turretBehavior).transform; val2.transform.position = Vector2.op_Implicit(((BraveBehaviour)turretBehavior).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)turretBehavior).transform.Find("fuck")).gameObject; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val3 = new AttackGroupItem(); val3.Probability = 1f; ShootBehavior val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(MinionShotPredictive)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 0f; ((BasicAttackBehavior)val4).Cooldown = 1.5f; ((BasicAttackBehavior)val4).CooldownVariance = 0.5f; ((BasicAttackBehavior)val4).InitialCooldown = 1f; val4.FireAnimation = "charge"; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.StopDuring = (StopType)2; val3.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "So Much Gun"; list.Add(val3); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 1.55f); val5.SetFloat("_EmissivePower", 100f); val5.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)turretBehavior).sprite).renderer.material = val5; Entry bullet = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).bulletBank.GetBullet("default"); PickupObject byId = PickupObjectDatabase.GetById(370); Entry val6 = EnemyBuildingTools.CopyBulletBankEntry(bullet, "SentryShot", "Play_SentryRailgun", ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects, false); Projectile component3 = val6.BulletObject.GetComponent(); ((BraveBehaviour)((BraveBehaviour)component3).sprite).renderer.enabled = false; GameObject val7 = component3.AddTrailToProjectileBundle(StaticCollections.Beam_Collection, "sentry_hitscan_001", StaticCollections.Beam_Animation, "sentryshot", new Vector2(1f, 1f), new Vector2(0f, 0f)); tk2dTiledSprite component4 = val7.GetComponent(); val7.transform.parent = ((Component)component3).gameObject.transform; ((tk2dBaseSprite)component4).usesOverrideMaterial = true; ((BraveBehaviour)component4).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)component4).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)component4).renderer.material.SetFloat("_EmissivePower", 500f); ((BraveBehaviour)component4).renderer.material.SetFloat("_EmissiveColorPower", 5f); component3.BulletScriptSettings = new BulletScriptSettings { preventPooling = true }; FuckYou = ((Component)component3).gameObject; ((BraveBehaviour)((BraveBehaviour)turretBehavior).aiActor).bulletBank.Bullets.Add(val6); StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)turretBehavior).healthHaver); DebrisObject val8 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_001", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val9 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_002", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val10 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_003", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val11 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_004", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val12 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_001", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val13 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_006", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val14 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_007", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val15 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_008", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val16 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_009", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val17 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_010", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); DebrisObject val18 = GenerateDebrisObjectBundle(StaticCollections.Enemy_Collection, "sentry_debris_011", debrisObjectsCanRotate: true, 0.33f, 3f, 240f, 180f, null, 0.4f); ShardCluster val19 = BreakableAPIToolbox.GenerateShardCluster((DebrisObject[])(object)new DebrisObject[11] { val8, val9, val10, val11, val12, val13, val14, val15, val16, val17, val18 }, 2f, 1.1f, 11, 17, 1.2f); SpawnShardsOnDeath val20 = ((Component)((BraveBehaviour)turretBehavior).aiActor).gameObject.AddComponent(); ((OnDeathBehavior)val20).deathType = (DeathType)1; val20.breakStyle = (BreakStyle)1; val20.verticalSpeed = 3f; val20.heightOffGround = 1f; val20.shardClusters = (ShardCluster[])(object)new ShardCluster[1] { val19 }; AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("4d37ce3d666b4ddda8039929225b7ede"); ExplodeOnDeath val21 = ((Component)turretBehavior).gameObject.AddComponent(); ExplosionData explosionData = ((Component)orLoadByGuid).GetComponent().explosionData; val21.explosionData = explosionData; val21.explosionData.damage = 0f; Game.Enemies.Add("mdlr:sentry_turret", ((BraveBehaviour)turretBehavior).aiActor); if ((Object)(object)((Component)turretBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)turretBehavior).GetComponent()); } ((BraveBehaviour)turretBehavior).encounterTrackable = ((Component)turretBehavior).gameObject.AddComponent(); ((BraveBehaviour)turretBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)turretBehavior).encounterTrackable.EncounterGuid = "mdlr:sentry_turret"; ((BraveBehaviour)turretBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)turretBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#SENTRY_NAME", "Sentry Turret"); ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#SENTRY_NAME"; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)turretBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; } } public static DebrisObject GenerateDebrisObjectBundle(tk2dSpriteCollectionData data, string spritename, bool debrisObjectsCanRotate = true, float LifeSpanMin = 0.33f, float LifeSpanMax = 2f, float AngularVelocity = 540f, float AngularVelocityVariance = 180f, tk2dSprite shadowSprite = null, float Mass = 1f, string AudioEventName = null, GameObject BounceVFX = null, int DebrisBounceCount = 0, bool DoesGoopOnRest = false, GoopDefinition GoopType = null, float GoopRadius = 1f, bool usesWorldShader = true) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("debris"); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).collection = data; ((tk2dBaseSprite)val2).SetSprite(data.GetSpriteIdByName(spritename)); DebrisObject val3 = val.AddComponent(); val3.canRotate = debrisObjectsCanRotate; val3.lifespanMin = LifeSpanMin; val3.lifespanMax = LifeSpanMax; val3.bounceCount = DebrisBounceCount; val3.angularVelocity = AngularVelocity; val3.angularVelocityVariance = AngularVelocityVariance; if (AudioEventName != null) { val3.audioEventName = AudioEventName; } if ((Object)(object)BounceVFX != (Object)null) { val3.optionalBounceVFX = BounceVFX; } ((BraveBehaviour)val3).sprite = (tk2dBaseSprite)(object)val2; val3.DoesGoopOnRest = DoesGoopOnRest; if ((Object)(object)GoopType != (Object)null) { val3.AssignedGoop = GoopType; } else if ((Object)(object)GoopType == (Object)null && val3.DoesGoopOnRest) { val3.DoesGoopOnRest = false; } val3.GoopRadius = GoopRadius; if ((Object)(object)shadowSprite != (Object)null) { val3.shadowSprite = shadowSprite; } val3.inertialMass = Mass; if (usesWorldShader) { } return val3; } } public class RobotMiniMecha : AIActor { public class MechaBehavior : BraveBehaviour { public GlobalMessageRadio.MessageContainer container; private void Start() { ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { //IL_0016: Unknown result type (might be due to invalid IL or missing references) GameObject val = ((GameActor)((BraveBehaviour)this).aiActor).PlayEffectOnActor(KaboomObject, new Vector3(0f, 0f), true, false, false); }; } } public class PewPew : Script { public override IEnumerator Top() { float angle = Vector2Extensions.ToAngle(((Bullet)this).GetPredictedTargetPosition(1f, 10f) - TransformExtensions.PositionVector2(((BraveBehaviour)((Bullet)this).BulletBank).transform)); ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).aiAnimator.LockFacingDirection = true; for (int i = 0; i < 300; i++) { angle = Mathf.MoveTowardsAngle(angle, Vector2Extensions.ToAngle(((Bullet)this).GetPredictedTargetPositionExact(1f, 25f) - TransformExtensions.PositionVector2(((BraveBehaviour)((Bullet)this).BulletBank).transform)), Mathf.Max(1.4f, (float)(45 - i))); ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).aiAnimator.FacingDirection = angle; ((Bullet)this).Fire(new Direction(angle + (float)Random.Range(-6 - i / 90, 6 + i / 90), (DirectionType)1, -1f), new Speed((float)(6 + i / 10), (SpeedType)0), new Bullet("TurretBurst", false, false, false)); yield return ((Bullet)this).Wait(Mathf.Max(4, 30 - i)); } ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).aiAnimator.LockFacingDirection = false; } } private static GameObject prefab; public static readonly string guid = "RobotMiniMecha_MDLR"; public static GameObject KaboomObject; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Expected O, but got Unknown //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Expected O, but got Unknown //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Expected O, but got Unknown //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Expected O, but got Unknown //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Expected O, but got Unknown //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Expected O, but got Unknown //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Expected O, but got Unknown //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Expected O, but got Unknown //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Expected O, but got Unknown //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_084b: Unknown result type (might be due to invalid IL or missing references) //IL_0855: Expected O, but got Unknown //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Mini Mech Robot", guid, StaticCollections.Enemy_Collection, "gunnermech_die_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); MechaBehavior mechaBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).knockbackDoer.weight = 50000f; ((BraveBehaviour)mechaBehavior).aiActor.MovementSpeed = 1f; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)mechaBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).HasShadow = false; ((BraveBehaviour)mechaBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)mechaBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.ForceSetCurrentHealth(52f); ((BraveBehaviour)mechaBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)mechaBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)mechaBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).HasShadow = true; ((BraveBehaviour)mechaBehavior).aiActor.PathableTiles = (CellTypes)2; ((GameActor)((BraveBehaviour)mechaBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).healthHaver.SetHealthMaximum(52f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Clear(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 2, ManualOffsetY = 1, ManualWidth = 15, ManualHeight = 18, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 2, ManualOffsetY = 1, ManualWidth = 15, ManualHeight = 18, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)mechaBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)mechaBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)mechaBehavior).aiAnimator; DirectionalAnimation val = new DirectionalAnimation(); val.Type = (DirectionType)5; val.Flipped = (FlipType[])(object)new FlipType[6]; val.AnimNames = new string[6] { "idle_back", "idle_back_right", "idle_front_right", "idle_front", "idle_front_left", "idle_back_left" }; val.Prefix = "idle"; aiAnimator.IdleAnimation = val; val = new DirectionalAnimation(); val.Type = (DirectionType)5; val.Flipped = (FlipType[])(object)new FlipType[6]; val.AnimNames = new string[6] { "move_back", "move_back_right", "move_front_right", "move_front", "move_front_left", "move_back_left" }; val.Prefix = "move"; aiAnimator.MoveAnimation = val; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("MechaAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).spriteAnimator; ((BraveBehaviour)mechaBehavior).aiActor.AssignedCurrencyToDrop = 0; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "awake", new string[1] { "awaken" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)mechaBehavior).spriteAnimator, "death", new Dictionary { { 1, "Play_ENM_plasma_burst_01" } }); ((BraveBehaviour)mechaBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)1; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5")).behaviorSpeculator; component2.OverrideBehaviors = behaviorSpeculator.OverrideBehaviors; component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; ((BraveBehaviour)mechaBehavior).aiActor.CorpseObject = EnemyDatabase.GetOrLoadByGuid("01972dee89fc4404a5c408d50007dad5").CorpseObject; GameObject val2 = new GameObject("fuck"); val2.transform.parent = ((BraveBehaviour)mechaBehavior).transform; val2.transform.position = Vector2.op_Implicit(((BraveBehaviour)mechaBehavior).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)mechaBehavior).transform.Find("fuck")).gameObject; component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; component2.MovementBehaviors = new List { (MovementBehaviorBase)new SeekTargetBehavior { StopWhenInRange = true, CustomRange = 4f, LineOfSight = true, ReturnToSpawn = true, SpawnTetherDistance = 0f, PathInterval = 0.5f, SpecifyRange = false, MinActiveRange = 1f, MaxActiveRange = 10f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val3 = new AttackGroupItem(); val3.Probability = 1f; ShootBehavior val4 = new ShootBehavior(); val4.ShootPoint = gameObject; val4.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(PewPew)); val4.LeadAmount = 0f; ((BasicAttackBehavior)val4).AttackCooldown = 1f; ((BasicAttackBehavior)val4).Cooldown = 4f; ((BasicAttackBehavior)val4).CooldownVariance = 1f; ((BasicAttackBehavior)val4).InitialCooldown = 0f; ((BasicAttackBehavior)val4).RequiresLineOfSight = true; val4.MultipleFireEvents = true; val4.Uninterruptible = false; val4.StopDuring = (StopType)2; val3.Behavior = (AttackBehaviorBase)(object)val4; val3.NickName = "So Much Gun"; list.Add(val3); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 1.55f); val5.SetFloat("_EmissivePower", 100f); val5.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).sprite).renderer.material = val5; Entry bullet = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).bulletBank.GetBullet("directedfire"); PickupObject byId = PickupObjectDatabase.GetById(370); Entry item = EnemyBuildingTools.CopyBulletBankEntry(bullet, "TurretBurst", "Play_TurretShot", ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects, false); ((BraveBehaviour)((BraveBehaviour)mechaBehavior).aiActor).bulletBank.Bullets.Add(item); Game.Enemies.Add("mdlr:mini_mech", ((BraveBehaviour)mechaBehavior).aiActor); KaboomObject = new GameObject("Explode_VFX"); Object.DontDestroyOnLoad((Object)(object)KaboomObject); FakePrefab.MarkAsFakePrefab(KaboomObject); tk2dSprite val6 = KaboomObject.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("deathsplosion_001")); tk2dSpriteAnimator val7 = KaboomObject.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("DeathsplosionAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("kaboom"); val7.playAutomatically = true; ((tk2dBaseSprite)val6).usesOverrideMaterial = true; ((BraveBehaviour)val6).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val6).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val6).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val6).renderer.material.SetFloat("_EmissiveColorPower", 30f); if ((Object)(object)((Component)mechaBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)mechaBehavior).GetComponent()); } ((BraveBehaviour)mechaBehavior).encounterTrackable = ((Component)mechaBehavior).gameObject.AddComponent(); ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)mechaBehavior).encounterTrackable.EncounterGuid = "mdlr:mini_mech"; ((BraveBehaviour)mechaBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)mechaBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#MINIMEGH_NAME", "Modular Mini-Mech"); ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#MINIMEGH_NAME"; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)mechaBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)mechaBehavior).healthHaver); } } } public class LaserDiode : AIActor { public class LaserDiodeBehavior : BraveBehaviour { public GlobalMessageRadio.MessageContainer container; public bool isCaller = false; private void Start() { container = GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "LaserDiodeLaserSync", "DeathStun" }, OnMessageRecieved); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.OnPreDeath += delegate { GlobalMessageRadio.BroadcastMessage("DeathStun"); }; } public void OnMessageRecieved(GameObject obj, string message) { if (!((Behaviour)((BraveBehaviour)this).aiActor).isActiveAndEnabled || !((Behaviour)((BraveBehaviour)this).aiActor).enabled) { return; } if (message == "LaserDiodeLaserSync") { ((BraveBehaviour)this).behaviorSpeculator.Interrupt(); ((BraveBehaviour)this).behaviorSpeculator.AttackCooldown = 0f; for (int i = 0; i < ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors.Count; i++) { AttackGroupItem val = ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors[i]; AttackBehaviorBase behavior = val.Behavior; BasicAttackBehavior val2 = (BasicAttackBehavior)(object)((behavior is BasicAttackBehavior) ? behavior : null); if (val.NickName == "Laser Attack Dummy") { val2.Cooldown = 0f; val2.MinRange = -1f; val2.Range = 1000f; val2.RequiresLineOfSight = false; (val2 as CustomBeholsterLaserBehavior).Bap = true; val.Probability = 1f; } else if (val.NickName == "MainLaserAttack") { val2.Cooldown += 4f; val.Probability = 0f; } else { val.Probability = 0f; } } } if (!(message == "DeathStun")) { return; } ((BraveBehaviour)this).behaviorSpeculator.Interrupt(); for (int j = 0; j < ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors.Count; j++) { AttackGroupItem val3 = ((BraveBehaviour)this).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors[j]; AttackBehaviorBase behavior2 = val3.Behavior; BasicAttackBehavior val4 = (BasicAttackBehavior)(object)((behavior2 is BasicAttackBehavior) ? behavior2 : null); if (val3.NickName == "Laser Attack Dummy") { val4.Cooldown = 2f; val4.MinRange = -1f; val4.Range = 1000f; val4.RequiresLineOfSight = false; (val4 as CustomBeholsterLaserBehavior).Bap = true; val3.Probability = 1f; } else if (val3.NickName == "MainLaserAttack") { val4.Cooldown = 4f; val3.Probability = 0f; } else { val4.Cooldown = 2f; val3.Probability = 1f; } } } } public class Brapp : Script { public class Rotater : Bullet { private bool Rot; public Rotater(bool rotation) : base("poundSmall", false, false, false) { Rot = rotation; } public override IEnumerator Top() { ((Bullet)this).ChangeDirection(new Direction((float)(Rot ? 120 : (-120)), (DirectionType)2, -1f), 240); yield break; } } public override IEnumerator Top() { bool b = BraveUtility.RandomBool(); for (int i = 0; i < 4; i++) { ((Bullet)this).PostWwiseEvent("Play_BOSS_RatMech_Hop_01", (string)null); for (int e = 0; e < 4; e++) { ((Bullet)this).Fire(new Direction((float)(90 * e + i * 20), (DirectionType)0, -1f), new Speed(4f, (SpeedType)0), (Bullet)(object)new Rotater(b)); } yield return ((Bullet)this).Wait(45); } } } public class PewPew : Script { public class BasicBullet : Bullet { public BasicBullet() : base("poundLarge", false, false, false) { } public override IEnumerator Top() { ((Bullet)this).ChangeDirection(new Direction((float)(BraveUtility.RandomBool() ? 60 : (-60)), (DirectionType)2, -1f), 120); while (!((Bullet)this).IsEnded || !((Bullet)this).Destroyed) { ((Bullet)this).Fire(new Direction(0f, (DirectionType)0, -1f), new Speed(0f, (SpeedType)0), (Bullet)(object)new TinyBullet()); yield return ((Bullet)this).Wait(1); } } } public class TinyBullet : Bullet { public TinyBullet() : base("poundSmall", false, false, false) { } public override IEnumerator Top() { yield return ((Bullet)this).Wait(20); ((Bullet)this).Vanish(true); } } public override IEnumerator Top() { for (int i = 0; i < 4; i++) { ((Bullet)this).PostWwiseEvent("Play_BOSS_lichC_zap_01", (string)null); ((Bullet)this).Fire(new Direction((float)Random.Range(-45, 45), (DirectionType)0, -1f), new Speed(7f, (SpeedType)0), (Bullet)(object)new BasicBullet()); yield return ((Bullet)this).Wait(45); } } } public class NormalAttack : Script { public override IEnumerator Top() { for (int i = 0; i < ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors.Count; i++) { AttackGroupItem aa = ((BraveBehaviour)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).behaviorSpeculator.AttackBehaviorGroup.AttackBehaviors[i]; AttackBehaviorBase behavior2 = aa.Behavior; BasicAttackBehavior behavior = (BasicAttackBehavior)(object)((behavior2 is BasicAttackBehavior) ? behavior2 : null); if (aa.NickName == "Laser Attack Dummy") { aa.Probability = 0f; (behavior as CustomBeholsterLaserBehavior).Bap = false; } else { aa.Probability = 1f; } } if (!((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().isCaller) { yield break; } ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().isCaller = false; yield return ((Bullet)this).Wait(30); for (int f = 0; f < 2; f++) { bool b2 = BraveUtility.RandomBool(); for (int e2 = 0; e2 < 4; e2++) { ((Bullet)this).Fire(new Direction((float)(90 * e2), (DirectionType)0, -1f), new Speed(4f, (SpeedType)0), (Bullet)(object)new Brapp.Rotater(b2)); } b2 = !b2; for (int e = 0; e < 4; e++) { ((Bullet)this).Fire(new Direction((float)(90 * e), (DirectionType)0, -1f), new Speed(4f, (SpeedType)0), (Bullet)(object)new Brapp.Rotater(b2)); } yield return ((Bullet)this).Wait(75); } } } public class LaserAttack : Script { public override IEnumerator Top() { ((Component)((BraveBehaviour)((Bullet)this).BulletBank).aiActor).GetComponent().isCaller = true; GlobalMessageRadio.BroadcastMessage("LaserDiodeLaserSync"); yield break; } } private static GameObject prefab; public static readonly string guid = "LaserDiode_MDLR"; public static void BuildPrefab() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026f: 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_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Expected O, but got Unknown //IL_035a: 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_039d: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Expected O, but got Unknown //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Expected O, but got Unknown //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Expected O, but got Unknown //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Expected O, but got Unknown //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Expected O, but got Unknown //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Expected O, but got Unknown //IL_07b4: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Expected O, but got Unknown //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07d0: Expected O, but got Unknown //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Expected O, but got Unknown //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Expected O, but got Unknown //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Expected O, but got Unknown //IL_08a9: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Expected O, but got Unknown //IL_0948: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Expected O, but got Unknown //IL_0a37: Unknown result type (might be due to invalid IL or missing references) //IL_0b4d: Unknown result type (might be due to invalid IL or missing references) //IL_0b57: Expected O, but got Unknown //IL_0c04: Unknown result type (might be due to invalid IL or missing references) //IL_0c0b: Expected O, but got Unknown //IL_0c48: Unknown result type (might be due to invalid IL or missing references) //IL_0c4d: Unknown result type (might be due to invalid IL or missing references) //IL_0d7c: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Expected O, but got Unknown if ((Object)(object)prefab == (Object)null || !EnemyBuilder.Dictionary.ContainsKey(guid)) { prefab = EnemyBuilder.BuildPrefabBundle("Laser Diode", guid, StaticCollections.Enemy_Collection, "laser_diode_idle_001", new IntVector2(0, 0), new IntVector2(8, 9), HasAiShooter: false, UsesAttackGroup: true); LaserDiodeBehavior laserDiodeBehavior = prefab.AddComponent(); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).knockbackDoer.weight = 50f; ((BraveBehaviour)laserDiodeBehavior).aiActor.MovementSpeed = 0.8f; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).healthHaver.PreventAllDamage = false; ((BraveBehaviour)laserDiodeBehavior).aiActor.CollisionDamage = 1f; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).HasShadow = false; ((BraveBehaviour)laserDiodeBehavior).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).aiAnimator.HitReactChance = 0f; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.CollideWithOthers = true; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)laserDiodeBehavior).aiActor.PreventFallingInPitsEver = false; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).healthHaver.ForceSetCurrentHealth(33f); ((BraveBehaviour)laserDiodeBehavior).aiActor.CollisionKnockbackStrength = 0f; ((BraveBehaviour)laserDiodeBehavior).aiActor.procedurallyOutlined = true; ((BraveBehaviour)laserDiodeBehavior).aiActor.CanTargetPlayers = true; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).HasShadow = true; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).SetIsFlying(true, "Gamemode: Creative", true, false); ((BraveBehaviour)laserDiodeBehavior).aiActor.PathableTiles = (CellTypes)6; GameObjectExtensions.GetOrAddComponent(((Component)laserDiodeBehavior).gameObject); ((BraveBehaviour)laserDiodeBehavior).aiActor.AssignedCurrencyToDrop = 0; ((GameActor)((BraveBehaviour)laserDiodeBehavior).aiActor).ShadowObject = ((GameActor)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).ShadowObject; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).healthHaver.SetHealthMaximum(33f, (float?)null, false); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.PixelColliders.Clear(); AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("4d37ce3d666b4ddda8039929225b7ede"); ExplodeOnDeath val = ((Component)laserDiodeBehavior).gameObject.AddComponent(); ExplosionData explosionData = ((Component)orLoadByGuid).GetComponent().explosionData; val.explosionData = explosionData; val.explosionData.damage = 5f; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 7, ManualWidth = 20, ManualHeight = 26, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 7, ManualWidth = 20, ManualHeight = 26, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)laserDiodeBehavior).aiAnimator.OtherAnimations = new List(); ((BraveBehaviour)laserDiodeBehavior).aiActor.PreventBlackPhantom = false; AIAnimator aiAnimator = ((BraveBehaviour)laserDiodeBehavior).aiAnimator; DirectionalAnimation val2 = new DirectionalAnimation(); val2.Type = (DirectionType)1; val2.Flipped = (FlipType[])(object)new FlipType[1]; val2.AnimNames = new string[1] { "laserdiode_idle" }; val2.Prefix = "laserdiode_idle"; aiAnimator.IdleAnimation = val2; val2 = new DirectionalAnimation(); val2.Type = (DirectionType)1; val2.Flipped = (FlipType[])(object)new FlipType[1]; val2.AnimNames = new string[1] { "laserdiode_idle" }; val2.Prefix = "laserdiode_idle"; aiAnimator.MoveAnimation = val2; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("LaserDiodeAnimation").GetComponent(); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).spriteAnimator.Library = component; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).spriteAnimator.library = component; ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).aiAnimator).spriteAnimator = ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).spriteAnimator; EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "pre_attack_1", new string[1] { "laserdiode_preattack1" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "attack_1", new string[1] { "laserdiode_attack1" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "postattack_1", new string[1] { "laserdiode_postattack1" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "pre_attack_2", new string[1] { "laserdiode_preattack2" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "attack_2", new string[1] { "laserdiode_attack2" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "postattack_2", new string[1] { "laserdiode_postattack2" }, (FlipType[])(object)new FlipType[1], (DirectionType)1); EnemyBuildingTools.AddNewDirectionAnimation(aiAnimator, "death", new string[1] { "death" }, (FlipType[])(object)new FlipType[0], (DirectionType)1); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((BraveBehaviour)laserDiodeBehavior).spriteAnimator, "death", new Dictionary { { 0, "Play_ENM_hammer_target_01" }, { 2, "Play_ENM_hammer_target_01" }, { 4, "Play_ENM_hammer_target_01" } }); ((BraveBehaviour)laserDiodeBehavior).aiActor.AwakenAnimType = (AwakenAnimationType)0; BehaviorSpeculator component2 = prefab.GetComponent(); prefab.GetComponent(); BehaviorSpeculator behaviorSpeculator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Bullet_Kin_GUID)).behaviorSpeculator; component2.OverrideBehaviors = new List(); component2.OtherBehaviors = behaviorSpeculator.OtherBehaviors; GameObject val3 = new GameObject("fuck"); val3.transform.parent = ((BraveBehaviour)laserDiodeBehavior).transform; val3.transform.position = Vector2.op_Implicit(((BraveBehaviour)laserDiodeBehavior).sprite.WorldCenter); GameObject gameObject = ((Component)((BraveBehaviour)laserDiodeBehavior).transform.Find("fuck")).gameObject; AIActor orLoadByGuid2 = EnemyDatabase.GetOrLoadByGuid("21dd14e5ca2a4a388adab5b11b69a1e1"); AIBeamShooter component3 = ((Component)orLoadByGuid2).GetComponent(); AIBeamShooter2 item = Toolbox.AddAIBeamShooter2(((BraveBehaviour)laserDiodeBehavior).aiActor, val3.transform, "middle_small_beam", component3.beamProjectile, component3.beamModule); component2.TargetBehaviors = new List { (TargetBehaviorBase)new TargetPlayerBehavior { Radius = 35f, LineOfSight = true, ObjectPermanence = true, SearchInterval = 0.25f, PauseOnTargetSwitch = false, PauseTime = 0.25f } }; component2.MovementBehaviors = new List { (MovementBehaviorBase)new SeekTargetBehavior { StopWhenInRange = true, CustomRange = 4f, LineOfSight = true, ReturnToSpawn = true, SpawnTetherDistance = 0f, PathInterval = 0.5f, SpecifyRange = false, MinActiveRange = 1f, MaxActiveRange = 10f } }; AttackBehaviorGroup attackBehaviorGroup = component2.AttackBehaviorGroup; List list = new List(); AttackGroupItem val4 = new AttackGroupItem(); val4.Probability = 2.5f; AttackGroupItem obj = val4; ShootBehavior val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(LaserAttack)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 0.5f; ((BasicAttackBehavior)val5).Cooldown = 5f; ((BasicAttackBehavior)val5).CooldownVariance = 1f; ((BasicAttackBehavior)val5).InitialCooldown = 0.5f; ((BasicAttackBehavior)val5).RequiresLineOfSight = true; val5.MultipleFireEvents = true; val5.Uninterruptible = false; obj.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "MainLaserAttack"; list.Add(val4); val4 = new AttackGroupItem(); val4.Probability = 1f; AttackGroupItem obj2 = val4; val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(PewPew)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 1f; ((BasicAttackBehavior)val5).Cooldown = 4f; ((BasicAttackBehavior)val5).CooldownVariance = 1f; ((BasicAttackBehavior)val5).InitialCooldown = 0f; val5.TellAnimation = "laserdiode_preattack1"; val5.PostFireAnimation = "laserdiode_postattack1"; ((BasicAttackBehavior)val5).RequiresLineOfSight = true; val5.MultipleFireEvents = true; val5.Uninterruptible = false; obj2.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "Pewpew Attack"; list.Add(val4); val4 = new AttackGroupItem(); val4.Probability = 1f; AttackGroupItem obj3 = val4; val5 = new ShootBehavior(); val5.ShootPoint = gameObject; val5.BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(Brapp)); val5.LeadAmount = 0f; ((BasicAttackBehavior)val5).AttackCooldown = 1f; ((BasicAttackBehavior)val5).Cooldown = 3f; ((BasicAttackBehavior)val5).CooldownVariance = 3f; ((BasicAttackBehavior)val5).InitialCooldown = 0f; val5.TellAnimation = "pre_attack_2"; val5.FireAnimation = "attack_2"; val5.PostFireAnimation = "postattack_2"; ((BasicAttackBehavior)val5).RequiresLineOfSight = true; val5.MultipleFireEvents = true; val5.Uninterruptible = false; obj3.Behavior = (AttackBehaviorBase)(object)val5; val4.NickName = "Brapp Attack"; list.Add(val4); val4 = new AttackGroupItem(); val4.Probability = 0f; val4.Behavior = (AttackBehaviorBase)(object)new CustomBeholsterLaserBehavior { InitialCooldown = 0f, firingTime = 3.5f, AttackCooldown = 0f, Cooldown = 0f, CooldownVariance = 0f, RequiresLineOfSight = true, UsesCustomAngle = true, RampHeight = 14f, firingType = CustomBeholsterLaserBehavior.FiringType.TOWARDS_PLAYER, chargeTime = 1f, UsesBaseSounds = false, AdditionalHeightOffset = 11f, EnemyChargeSound = "Play_BOSS_omegaBeam_charge_01", LaserFiringSound = "Play_ENM_deathray_shot_01", StopLaserFiringSound = "Stop_ENM_deathray_loop_01", ChargeAnimation = "pre_attack_2", FireAnimation = "attack_2", PostFireAnimation = "postattack_2", hurtsOtherHealthhavers = false, beamSelection = (BeamSelection)2, specificBeamShooters = new List { item }, trackingType = CustomBeholsterLaserBehavior.TrackingType.Follow, DoesSpeedLerp = true, InitialStartingSpeed = 0f, TimeToStayAtZeroSpeedAt = 0.5f, TimeToReachFullSpeed = 1f, LocksFacingDirection = false, maxTurnRate = 1f, maxUnitForCatchUp = 2f, minDegreesForCatchUp = 45f, minUnitForCatchUp = 0.1f, minUnitForOvershoot = 1f, turnRateAcceleration = 1f, unitCatchUpSpeed = 1f, unitOvershootSpeed = 1f, unitOvershootTime = 0.25f, degreeCatchUpSpeed = 180f, useDegreeCatchUp = Object.op_Implicit((Object)(object)((BraveBehaviour)laserDiodeBehavior).transform), useUnitCatchUp = true, useUnitOvershoot = true, GlobalCooldown = 0f, ShootPoint = gameObject.transform, BulletScript = (BulletScriptSelector)new CustomBulletScriptSelector(typeof(NormalAttack)), Bap = false }; val4.NickName = "Laser Attack Dummy"; list.Add(val4); attackBehaviorGroup.AttackBehaviors = list; component2.InstantFirstTick = behaviorSpeculator.InstantFirstTick; component2.TickInterval = behaviorSpeculator.TickInterval; component2.PostAwakenDelay = behaviorSpeculator.PostAwakenDelay; component2.RemoveDelayOnReinforce = behaviorSpeculator.RemoveDelayOnReinforce; component2.OverrideStartingFacingDirection = behaviorSpeculator.OverrideStartingFacingDirection; component2.StartingFacingDirection = behaviorSpeculator.StartingFacingDirection; component2.SkipTimingDifferentiator = behaviorSpeculator.SkipTimingDifferentiator; ((BraveBehaviour)component2).RegenerateCache(); Material val6 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val6.mainTexture = ((BraveBehaviour)((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).sprite).renderer.material.mainTexture; val6.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)211, (byte)214, byte.MaxValue))); val6.SetFloat("_EmissiveColorPower", 1.55f); val6.SetFloat("_EmissivePower", 100f); val6.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).sprite).renderer.material = val6; ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundLarge")); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("68a238ed6a82467ea85474c595c49c6e")).bulletBank.GetBullet("poundSmall")); ((BraveBehaviour)((BraveBehaviour)laserDiodeBehavior).aiActor).bulletBank.Bullets.Add(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("1bc2a07ef87741be90c37096910843ab")).bulletBank.GetBullet("reversible")); Game.Enemies.Add("mdlr:laser_diode", ((BraveBehaviour)laserDiodeBehavior).aiActor); if ((Object)(object)((Component)laserDiodeBehavior).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)laserDiodeBehavior).GetComponent()); } ((BraveBehaviour)laserDiodeBehavior).encounterTrackable = ((Component)laserDiodeBehavior).gameObject.AddComponent(); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData = new JournalEntry(); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.EncounterGuid = "mdlr:laser_diode"; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.SuppressKnownState = true; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.IsEnemy = true; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.SuppressInAmmonomicon = true; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.ProxyEncounterGuid = ""; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.AmmonomiconSprite = ""; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.enemyPortraitSprite = null; Module.Strings.Enemies.Set("#LASERDIODE_NAME", "Laser Diode"); ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.PrimaryDisplayName = "#LASERDIODE_NAME"; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.NotificationPanelDescription = "#MODULARPRIME_SD"; ((BraveBehaviour)laserDiodeBehavior).encounterTrackable.journalData.AmmonomiconFullEntry = "#MODULARPRIME_LD"; StaticReferenceManager.AllHealthHavers.Remove(((BraveBehaviour)laserDiodeBehavior).healthHaver); } } } 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(); } } 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(((Component)projectile).gameObject); m_laserBeam = beamObject.GetComponent(); ((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 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 Bap = true; 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 specificBeamShooters; private List m_allBeamShooters; private readonly List m_currentBeamShooters = new List(); 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Invalid comparison between Unknown and I4 //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Invalid comparison between Unknown and I4 //IL_01c8: 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() | !Bap) { 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(((Component)((BehaviorBase)this).m_aiActor).GetComponents()); 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(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 void ForceTrigger() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Invalid comparison between Unknown and I4 //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Invalid comparison between Unknown and I4 //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Invalid comparison between Unknown and I4 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(((Component)((BehaviorBase)this).m_aiActor).GetComponents()); 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(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(); } } 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(((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(); } MonoBehaviour component = ((Component)((BehaviorBase)this).m_aiActor).GetComponent(); 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() { base.m_behaviorSpeculator.PreventMovement = false; 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(((Component)aibeamShooter2.beamModule.GetCurrentProjectile()).gameObject) : Object.Instantiate(((Component)aibeamShooter2.beamProjectile).gameObject)); if ((Object)(object)beamObject == (Object)null) { ETGModConsole.Log((object)"CANNOT FIND beamObject!", false); StopFiringLaser(); yield break; } BasicBeamController beamCont = beamObject.GetComponent(); List 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())) { BounceProjModifier component = ((Component)hitRigidbody).GetComponent(); 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() != (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) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { ((BehaviorBase)this).m_aiActor.ClearPath(); base.m_behaviorSpeculator.PreventMovement = PreventMoveMent; ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.Velocity = Vector2.zero; } } } public class CustomDashBehavior : BasicAttackBehavior { public enum DashDirection { PerpendicularToTarget = 10, KindaTowardTarget = 20, TowardTarget = 25, Random = 30 } private enum DashState { Idle, Charge, Dash, Finished } private bool LastDashWasLast; private int DashesPerformed; public DashDirection dashDirection; public float quantizeDirection; public float dashDistance; public float dashTime; public float postDashSpeed; public float WaitTimeBetweenDashes; public float AmountOfDashes; public bool avoidTarget; [InspectorCategory("Attack")] public GameObject ShootPoint; [InspectorCategory("Attack")] public BulletScriptSelector bulletScript; [InspectorCategory("Attack")] public bool fireAtDashStart; [InspectorCategory("Attack")] public bool stopOnCollision; [InspectorCategory("Visuals")] public string chargeAnim; [InspectorCategory("Visuals")] public string dashAnim; [InspectorCategory("Visuals")] public bool doDodgeDustUp = false; [InspectorCategory("Visuals")] public bool warpDashAnimLength; [InspectorCategory("Visuals")] public bool hideShadow; [InspectorCategory("Visuals")] public bool hideGun; [InspectorCategory("Visuals")] public bool toggleTrailRenderer; [InspectorCategory("Visuals")] public bool enableShadowTrail; private tk2dBaseSprite m_shadowSprite; private TrailRenderer m_trailRenderer; private AfterImageTrailController m_shadowTrail; private ImprovedAfterImage m_shadowTrail_2; private BulletScriptSource m_bulletSource; private bool m_cachedDoDustups; private bool m_cachedGrounded; private Vector2 m_dashDirection; private float m_dashTimer; private bool m_shouldFire; private DashState m_state; private DashState State => m_state; public CustomDashBehavior() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) dashDirection = (DashDirection)30; warpDashAnimLength = true; } public override void Start() { DashesPerformed = 0; ((BasicAttackBehavior)this).Start(); m_trailRenderer = ((Component)((BehaviorBase)this).m_aiActor).GetComponentInChildren(); if (toggleTrailRenderer && Object.op_Implicit((Object)(object)m_trailRenderer)) { ((Renderer)m_trailRenderer).enabled = false; } m_shadowTrail = ((Component)((BehaviorBase)this).m_aiActor).GetComponent(); m_shadowTrail_2 = ((Component)((BehaviorBase)this).m_aiActor).GetComponent(); if (bulletScript != null && !bulletScript.IsNull) { tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).spriteAnimator; spriteAnimator.AnimationEventTriggered = (Action)Delegate.Combine(spriteAnimator.AnimationEventTriggered, new Action(AnimationEventTriggered)); } if (stopOnCollision) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody; specRigidbody.OnCollision = (Action)Delegate.Combine(specRigidbody.OnCollision, new Action(OnCollision)); } } public override void Upkeep() { ((BasicAttackBehavior)this).Upkeep(); ((BehaviorBase)this).DecrementTimer(ref m_dashTimer, false); } public override BehaviorResult Update() { //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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)m_shadowSprite == (Object)null) { m_shadowSprite = ((GameActor)((BehaviorBase)this).m_aiActor).ShadowObject.GetComponent(); } BehaviorResult val = ((BasicAttackBehavior)this).Update(); if ((int)val > 0) { return val; } if (!((AttackBehaviorBase)this).IsReady()) { return (BehaviorResult)0; } if (!Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor.TargetRigidbody)) { return (BehaviorResult)0; } m_dashDirection = GetDashDirection(); if (!string.IsNullOrEmpty(chargeAnim)) { SetState(DashState.Charge); } else { SetState(DashState.Dash); } ((BehaviorBase)this).m_updateEveryFrame = true; return (BehaviorResult)4; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_0078: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) if (State == DashState.Dash) { float num = dashDistance / dashTime / (dashTime / m_dashTimer); if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { _ = m_dashDirection; if (false) { m_dashDirection = Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), 1f); } ((BehaviorBase)this).m_aiActor.BehaviorVelocity = num * m_dashDirection; } } ((BehaviorBase)this).ContinuousUpdate(); if (State == DashState.Charge) { if (!string.IsNullOrEmpty(chargeAnim) && !((BehaviorBase)this).m_aiAnimator.IsPlaying(chargeAnim)) { SetState(DashState.Dash); } } else if (State == DashState.Dash) { if (doDodgeDustUp && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { bool flag = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).spriteAnimator.QueryGroundedFrame(); if (!m_cachedGrounded && flag && !((GameActor)((BehaviorBase)this).m_aiActor).IsFalling) { GameManager.Instance.Dungeon.dungeonDustups.InstantiateLandDustup(Vector2.op_Implicit(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter)); ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps = m_cachedDoDustups; } m_cachedGrounded = flag; } if (enableShadowTrail && m_dashTimer <= 0.1f) { if ((Object)(object)m_shadowTrail != (Object)null) { m_shadowTrail.spawnShadows = false; } if ((Object)(object)m_shadowTrail_2 != (Object)null) { m_shadowTrail_2.spawnShadows = false; } } if (m_dashTimer <= 0f) { return (ContinuousBehaviorResult)1; } } else { if (State == DashState.Idle && (float)DashesPerformed <= AmountOfDashes && (float)DashesPerformed != AmountOfDashes) { return (ContinuousBehaviorResult)0; } if (State == DashState.Finished) { return (ContinuousBehaviorResult)1; } } return (ContinuousBehaviorResult)0; } public override void EndContinuousUpdate() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) ((BehaviorBase)this).EndContinuousUpdate(); ((BehaviorBase)this).m_updateEveryFrame = false; if (postDashSpeed > 0f) { ((BehaviorBase)this).m_aiActor.BehaviorVelocity = ((Vector2)(ref m_dashDirection)).normalized * postDashSpeed; } else { ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = false; ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; } SetState(DashState.Idle); ((BasicAttackBehavior)this).UpdateCooldowns(); DashesPerformed++; if ((float)DashesPerformed == AmountOfDashes) { LastDashWasLast = true; DashesPerformed = 0; } else if ((float)DashesPerformed <= AmountOfDashes && (float)DashesPerformed != AmountOfDashes) { LastDashWasLast = false; } if (!LastDashWasLast && (float)DashesPerformed <= AmountOfDashes && (float)DashesPerformed != AmountOfDashes) { base.m_cooldownTimer = 0f; } } public void AnimationEventTriggered(tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip, int frame) { if (m_state == DashState.Dash && m_shouldFire && clip.GetFrame(frame).eventInfo == "fire") { Fire(); } } public void OnCollision(CollisionData collisionData) { if (m_state == DashState.Dash && !collisionData.IsTriggerCollision && (!Object.op_Implicit((Object)(object)collisionData.OtherRigidbody) || !Object.op_Implicit((Object)(object)((BraveBehaviour)collisionData.OtherRigidbody).projectile))) { SetState(DashState.Idle); } } private float[] GetDirections() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Invalid comparison between Unknown and I4 //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Invalid comparison between Unknown and I4 //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Invalid comparison between Unknown and I4 float[] array = new float[0]; if ((int)dashDirection == 10) { float num = Vector2Extensions.ToAngle(((BehaviorBase)this).m_aiActor.TargetRigidbody.GetUnitCenter((ColliderType)1) - ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter); array = new float[2] { num + 90f, num - 90f }; BraveUtility.RandomizeArray(array, 0, -1); } else if ((int)dashDirection == 20) { float num2 = Vector2Extensions.ToAngle(((BehaviorBase)this).m_aiActor.TargetRigidbody.GetUnitCenter((ColliderType)1) - ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter); array = new float[3] { num2, num2 - quantizeDirection, num2 + quantizeDirection }; BraveUtility.RandomizeArray(array, 1, -1); } else if ((int)dashDirection == 25) { float num3 = Vector2Extensions.ToAngle(((BehaviorBase)this).m_aiActor.TargetRigidbody.GetUnitCenter((ColliderType)1) - ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter); array = new float[1] { num3 }; } else if ((int)dashDirection == 30) { if (quantizeDirection <= 0f) { array = new float[16]; for (int i = 0; i < array.Length; i++) { array[i] = Random.Range(0f, 360f); } } else { int num4 = Mathf.RoundToInt(360f / quantizeDirection); array = new float[num4]; for (int j = 0; j < array.Length; j++) { array[j] = (float)j * quantizeDirection; } BraveUtility.RandomizeArray(array, 0, -1); } } else if ((int)dashDirection == 30) { if (quantizeDirection <= 0f) { array = new float[16]; for (int k = 0; k < array.Length; k++) { array[k] = Random.Range(0f, 360f); } } else { int num5 = Mathf.RoundToInt(360f / quantizeDirection); array = new float[num5]; for (int l = 0; l < array.Length; l++) { array[l] = (float)l * quantizeDirection; } BraveUtility.RandomizeArray(array, 0, -1); } } if (quantizeDirection > 0f) { for (int m = 0; m < array.Length; m++) { array[m] = BraveMathCollege.QuantizeFloat(array[m], quantizeDirection); } } return array; } private Vector2 GetDashDirection() { //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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_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_033d: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_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_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Invalid comparison between Unknown and I4 //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) float[] directions = GetDirections(); Vector2 val = Vector2.zero; Vector2 unitCenter = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.GetUnitCenter((ColliderType)1); RaycastResult val3 = default(RaycastResult); for (int i = 0; i < directions.Length; i++) { bool flag = false; bool flag2 = false; Vector2 val2 = BraveMathCollege.DegreesToVector(directions[i], 1f); bool flag3 = PhysicsEngine.Instance.Raycast(unitCenter, val2, dashDistance, ref val3, true, true, int.MaxValue, (CollisionLayer?)(CollisionLayer)3, false, (Func)null, ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody); RaycastResult.Pool.Free(ref val3); for (float num = 0.25f; num <= dashDistance; num += 0.25f) { if (flag) { break; } if (flag3) { break; } Vector2 val4 = unitCenter + num * val2; if (!GameManager.Instance.Dungeon.CellExists(val4)) { flag = true; } else if (GameManager.Instance.Dungeon.ShouldReallyFall(Vector2.op_Implicit(val4))) { flag = true; } } for (float num = 0.25f; num <= dashDistance; num += 0.25f) { if (flag) { break; } if (flag2) { break; } if (flag3) { break; } IntVector2 val5 = Vector2Extensions.ToIntVector2(unitCenter + num * val2, (VectorConversions)0); if (!GameManager.Instance.Dungeon.CellExists(val5)) { flag2 = true; } else if (GameManager.Instance.Dungeon.data.CheckInBoundsAndValid(val5) && GameManager.Instance.Dungeon.data[val5].isExitCell) { flag2 = true; } } if (avoidTarget && Object.op_Implicit((Object)(object)base.m_behaviorSpeculator.TargetRigidbody) && !flag && !flag2 && !flag3) { Vector2 unitCenter2 = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.GetUnitCenter((ColliderType)2); Vector2 val6 = base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2) - unitCenter2; float num2 = dashDistance + 2f; if (((Vector2)(ref val6)).magnitude < num2 && BraveMathCollege.AbsAngleBetween(Vector2Extensions.ToAngle(val6), directions[i]) < 80f) { flag3 = true; } if ((int)GameManager.Instance.CurrentGameType == 1 && !flag3) { GameActor playerTarget = ((BehaviorBase)this).m_aiActor.PlayerTarget; PlayerController val7 = (PlayerController)(object)((playerTarget is PlayerController) ? playerTarget : null); if (Object.op_Implicit((Object)(object)val7)) { PlayerController otherPlayer = GameManager.Instance.GetOtherPlayer(val7); if (Object.op_Implicit((Object)(object)otherPlayer) && ((BraveBehaviour)otherPlayer).healthHaver.IsAlive) { val6 = ((BraveBehaviour)otherPlayer).specRigidbody.GetUnitCenter((ColliderType)2) - unitCenter2; if (((Vector2)(ref val6)).magnitude < num2 && BraveMathCollege.AbsAngleBetween(Vector2Extensions.ToAngle(val6), directions[i]) < 80f) { flag3 = true; } } } } } if (!flag3 && !flag && !flag2) { val = val2; break; } } if (val != Vector2.zero) { return ((Vector2)(ref val)).normalized; } if (directions.Length != 0) { return BraveMathCollege.DegreesToVector(directions[^1], 1f); } float num3 = Random.Range(0f, 360f); if (quantizeDirection > 0f) { BraveMathCollege.QuantizeFloat(num3, quantizeDirection); } return BraveMathCollege.DegreesToVector(num3, 1f); } private void Fire() { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent(ShootPoint); } m_bulletSource.BulletManager = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank; m_bulletSource.BulletScript = bulletScript; m_bulletSource.Initialize(); m_shouldFire = false; } private void SetState(DashState State) { if (m_state != State) { EndState(m_state); m_state = State; BeginState(m_state); } } private void BeginState(DashState state) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) switch (state) { case DashState.Charge: ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = true; ((BehaviorBase)this).m_aiAnimator.FacingDirection = Vector2Extensions.ToAngle(m_dashDirection); ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(chargeAnim, true, (string)null, -1f, false); ((BehaviorBase)this).m_aiActor.ClearPath(); if (!((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity) { ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; ((BehaviorBase)this).m_aiActor.BehaviorVelocity = Vector2.zero; } break; case DashState.Dash: if (bulletScript != null && !bulletScript.IsNull) { m_shouldFire = true; } ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = true; ((BehaviorBase)this).m_aiAnimator.FacingDirection = Vector2Extensions.ToAngle(m_dashDirection); if (!string.IsNullOrEmpty(dashAnim)) { if (warpDashAnimLength) { AIAnimator aiAnimator = ((BehaviorBase)this).m_aiAnimator; string text = dashAnim; bool flag = true; float num = dashTime; aiAnimator.PlayUntilFinished(text, flag, (string)null, num, false); } else { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(dashAnim, true, (string)null, -1f, false); } } if (doDodgeDustUp) { m_cachedDoDustups = ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps; ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps = false; GameManager.Instance.Dungeon.dungeonDustups.InstantiateDodgeDustup(m_dashDirection, Vector2.op_Implicit(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitBottomCenter)); m_cachedGrounded = true; } if (hideShadow && Object.op_Implicit((Object)(object)m_shadowSprite)) { ((BraveBehaviour)m_shadowSprite).renderer.enabled = false; } if (hideGun && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiShooter)) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(false, "DashBehavior"); } if (toggleTrailRenderer && Object.op_Implicit((Object)(object)m_trailRenderer)) { ((Renderer)m_trailRenderer).enabled = true; } if (enableShadowTrail) { if (Object.op_Implicit((Object)(object)m_shadowTrail)) { m_shadowTrail.spawnShadows = true; } if (Object.op_Implicit((Object)(object)m_shadowTrail_2)) { m_shadowTrail_2.spawnShadows = true; } } m_dashTimer = dashTime; ((BehaviorBase)this).m_aiActor.ClearPath(); ((BehaviorBase)this).m_aiActor.BehaviorOverridesVelocity = true; if (bulletScript != null && !bulletScript.IsNull && fireAtDashStart) { Fire(); } break; } } private void EndState(DashState state) { //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) if (state != DashState.Dash) { return; } if (!string.IsNullOrEmpty(dashAnim)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(dashAnim); } if (bulletScript != null && !bulletScript.IsNull && m_shouldFire) { Fire(); } if (doDodgeDustUp) { ((GameActor)((BehaviorBase)this).m_aiActor).DoDustUps = m_cachedDoDustups; } if (hideShadow && Object.op_Implicit((Object)(object)m_shadowSprite)) { ((BraveBehaviour)m_shadowSprite).renderer.enabled = true; } if (hideGun && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiShooter)) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(true, "DashBehavior"); } if (toggleTrailRenderer && Object.op_Implicit((Object)(object)m_trailRenderer)) { ((Renderer)m_trailRenderer).enabled = false; } if (enableShadowTrail) { if (Object.op_Implicit((Object)(object)m_shadowTrail)) { m_shadowTrail.spawnShadows = false; } if (Object.op_Implicit((Object)(object)m_shadowTrail_2)) { m_shadowTrail_2.spawnShadows = false; } } if (postDashSpeed <= 0f) { ((BehaviorBase)this).m_aiActor.BehaviorVelocity = Vector2.zero; } if ((Object)(object)m_bulletSource != (Object)null) { m_bulletSource.ForceStop(); } } } public class CustomSpinBulletsBehavior : BehaviorBase { private class ProjectileContainer { public Projectile projectile; public float angle; public float distFromCenter; } public bool IsEnabled; public string OverrideBulletName; public GameObject ShootPoint; public int NumBullets; public float BulletMinRadius; public float BulletMaxRadius; public int BulletCircleSpeed; public bool BulletsIgnoreTiles; public float RegenTimer; public float AmountOFLines; private readonly List m_projectiles = new List(); private AIBulletBank m_bulletBank; private bool m_cachedCharm; private float m_regenTimer; public override void Start() { ((BehaviorBase)this).Start(); m_bulletBank = base.m_gameObject.GetComponent(); } public override void Upkeep() { ((BehaviorBase)this).Upkeep(); ((BehaviorBase)this).DecrementTimer(ref m_regenTimer, false); } 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_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) ((BehaviorBase)this).Update(); BehaviorResult val = ((BehaviorBase)this).Update(); if ((int)val > 0) { return val; } float num = float.MaxValue; if (Object.op_Implicit((Object)(object)base.m_aiActor) && Object.op_Implicit((Object)(object)base.m_aiActor.TargetRigidbody)) { Vector2 val2 = base.m_aiActor.TargetRigidbody.GetUnitCenter((ColliderType)2) - ((BraveBehaviour)base.m_aiActor).specRigidbody.GetUnitCenter((ColliderType)2); num = ((Vector2)(ref val2)).magnitude; } for (int i = 0; i < NumBullets; i++) { float num2 = Mathf.Lerp(BulletMinRadius, BulletMaxRadius, (float)i / ((float)NumBullets - 1f)); if (num2 * 2f > num) { for (int j = 0; (float)j < AmountOFLines; j++) { m_projectiles.Add(new ProjectileContainer { projectile = null, angle = 360f / AmountOFLines * (float)j, distFromCenter = num2 }); } continue; } for (int k = 0; (float)k < AmountOFLines; k++) { GameObject val3 = m_bulletBank.CreateProjectileFromBank(GetBulletPosition(0f, num2), 360f / AmountOFLines * (float)k, OverrideBulletName, (string)null, false, true, false); Projectile component = val3.GetComponent(); ((BraveBehaviour)component).specRigidbody.Velocity = Vector2.zero; component.ManualControl = true; if (BulletsIgnoreTiles) { ((BraveBehaviour)component).specRigidbody.CollideWithTileMap = false; } m_projectiles.Add(new ProjectileContainer { projectile = component, angle = 360f / AmountOFLines * (float)k, distFromCenter = num2 }); } } base.m_updateEveryFrame = true; return (BehaviorResult)3; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: 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_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) IsEnabled = true; if (Object.op_Implicit((Object)(object)base.m_aiActor)) { bool flag = base.m_aiActor.CanTargetEnemies && !base.m_aiActor.CanTargetPlayers; if (m_cachedCharm != flag) { for (int i = 0; i < m_projectiles.Count; i++) { if (m_projectiles[i] != null && Object.op_Implicit((Object)(object)m_projectiles[i].projectile) && ((Component)m_projectiles[i].projectile).gameObject.activeSelf) { m_projectiles[i].projectile.DieInAir(false, false, true, false); m_projectiles[i].projectile = null; } } m_cachedCharm = flag; } } for (int j = 0; j < m_projectiles.Count; j++) { if (!Object.op_Implicit((Object)(object)m_projectiles[j].projectile) || !((Component)m_projectiles[j].projectile).gameObject.activeSelf) { m_projectiles[j].projectile = null; } } for (int k = 0; k < m_projectiles.Count; k++) { float angle = m_projectiles[k].angle + base.m_deltaTime * (float)BulletCircleSpeed; m_projectiles[k].angle = angle; Projectile projectile = m_projectiles[k].projectile; if (Object.op_Implicit((Object)(object)projectile)) { projectile.ResetDistance(); Vector2 bulletPosition = GetBulletPosition(angle, m_projectiles[k].distFromCenter); ((BraveBehaviour)projectile).specRigidbody.Velocity = (bulletPosition - Vector2.op_Implicit(((BraveBehaviour)projectile).transform.position)) / BraveTime.DeltaTime; if (projectile.shouldRotate) { ((BraveBehaviour)projectile).transform.rotation = Quaternion.Euler(0f, 0f, 180f + Vector2Extensions.ToAngle(Vector3Extensions.XY(Quaternion.Euler(0f, 0f, 90f) * Vector2.op_Implicit(Vector3Extensions.XY(ShootPoint.transform.position) - bulletPosition)))); } } else { if (!(m_regenTimer <= 0f)) { continue; } Vector2 bulletPosition2 = GetBulletPosition(m_projectiles[k].angle, m_projectiles[k].distFromCenter); if (GameManager.Instance.Dungeon.CellExists(bulletPosition2) && !GameManager.Instance.Dungeon.data.isWall((int)bulletPosition2.x, (int)bulletPosition2.y)) { GameObject val = m_bulletBank.CreateProjectileFromBank(bulletPosition2, 0f, OverrideBulletName, (string)null, false, true, false); projectile = val.GetComponent(); ((BraveBehaviour)projectile).specRigidbody.Velocity = Vector2.zero; projectile.ManualControl = true; if (BulletsIgnoreTiles) { ((BraveBehaviour)projectile).specRigidbody.CollideWithTileMap = false; } m_projectiles[k].projectile = projectile; m_regenTimer = RegenTimer; } } } for (int l = 0; l < m_projectiles.Count; l++) { if (m_projectiles[l] != null && Object.op_Implicit((Object)(object)m_projectiles[l].projectile)) { bool flag2 = Object.op_Implicit((Object)(object)base.m_aiActor) && base.m_aiActor.CanTargetEnemies; m_projectiles[l].projectile.collidesWithEnemies = m_projectiles[l].projectile.collidesWithEnemies || flag2; } } return (ContinuousBehaviorResult)0; } public override void EndContinuousUpdate() { IsEnabled = false; ((BehaviorBase)this).EndContinuousUpdate(); DestroyProjectiles(); base.m_updateEveryFrame = false; } public void StartContinuousUpdate() { base.m_updateEveryFrame = true; } public override void OnActorPreDeath() { IsEnabled = false; ((BehaviorBase)this).OnActorPreDeath(); DestroyProjectiles(); } public override void Destroy() { IsEnabled = false; ((BehaviorBase)this).Destroy(); } private Vector2 GetBulletPosition(float angle, float distFromCenter) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) return Vector3Extensions.XY(ShootPoint.transform.position) + BraveMathCollege.DegreesToVector(angle, distFromCenter); } public void DestroyProjectiles() { for (int i = 0; i < m_projectiles.Count; i++) { Projectile projectile = m_projectiles[i].projectile; if ((Object)(object)projectile != (Object)null) { projectile.DieInAir(false, true, true, false); } } m_projectiles.Clear(); } } public class Artemis : GunBehaviour { private bool HasReloaded; private List Chargerreticles = new List(); private bool VFXActive; private float elapsed; public static int GunID; public float GetElapsed { get { if (0f > elapsed) { return 0f; } return elapsed; } } public static void Init() { //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Expected O, but got Unknown //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Artemis", "artemis_mdlr"); Game.Items.Rename("outdated_gun_mods:artemis", "mdl:armcannon_8_alt"); Artemis @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires multiple shots in a fixed spread.\n\nOne half of a pair, this weapon is used to keep clusters at bay and priority targets in check."); val.SetupSprite(StaticCollections.Gun_Collection, "artemis_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "artemis_idle"; val.shootAnimation = "artemis_fire"; val.reloadAnimation = "artemis_reload"; val.introAnimation = "artemis_intro"; val.chargeAnimation = "artemis_charge"; ((Component)val).GetComponent().GetClipByName(val.shootAnimation).frames[0].eventAudio = "Play_BOSS_RatMech_Cannon_01"; ((Component)val).GetComponent().GetClipByName(val.shootAnimation).frames[0].triggerEvent = true; ((Component)val).GetComponent().GetClipByName(val.reloadAnimation).frames[0].eventAudio = "Play_ModulePowerUp"; ((Component)val).GetComponent().GetClipByName(val.reloadAnimation).frames[0].triggerEvent = true; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; modularGunController.AdditionalPowerSupply = 0; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); for (int i = -3; i < 4; i++) { PickupObject byId = PickupObjectDatabase.GetById(88); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, true); } val.DefaultModule.chargeProjectiles = new List(); int num = -3; foreach (ProjectileModule projectile in val.Volley.projectiles) { projectile.ammoCost = 1; projectile.shootStyle = (ShootStyle)3; projectile.sequenceStyle = (ProjectileSequenceStyle)0; projectile.cooldownTime = 0.5f; projectile.angleFromAim = 30 * num; projectile.angleVariance = 2f; num++; projectile.numberOfShotsInClip = 6; PickupObject byId2 = PickupObjectDatabase.GetById(88); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); val2.baseData.damage = 5f; val2.shouldRotate = true; val2.baseData.range = 19f; val2.baseData.speed = 40f; val2.baseData.force = 30f; val2.AnimateProjectileBundle("longshotalt_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "longshotalt_idle", new List { new IntVector2(14, 5), new IntVector2(14, 5) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 2), ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues(value: false, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2)); val.DefaultModule.projectiles[0] = val2; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(384); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(384); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(89); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(89); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(89); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(89); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); if (projectile != val.DefaultModule) { projectile.ammoCost = 0; } ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0.125f }; projectile.chargeProjectiles = new List { item }; val.DefaultModule.chargeProjectiles.Add(item); } val.gunSwitchGroup = "Railgun"; val.reloadTime = 3.2f; val.SetBaseMaxAmmo(250); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("artemis_AAa", StaticCollections.Clip_Ammo_Atlas, "actualartemis_1", "actualartemis_2", (AmmoType)14); val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(328); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.375f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.375f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == GunID) { ProjectileData baseData = p.baseData; baseData.damage *= 0.9f; ProjectileData baseData2 = p.baseData; baseData2.damage += (float)stack; ProjectileData baseData3 = p.baseData; baseData3.speed *= 0.8f; BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.bouncesTrackEnemies = true; orAddComponent.numberOfBounces += stack; } } public void Start() { ModularGunController component = ((Component)base.gun).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((MonoBehaviour)component).StartCoroutine(FUCK(component)); } } public IEnumerator FUCK(ModularGunController aaa) { aaa.Start(); yield return null; aaa.statMods.Add(new ModuleGunStatModifier { AngleFromAim_Process = ProcessClipSize }); } public float ProcessClipSize(float clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip * GetElapsed; } public bool CheckModule() { GameActor currentOwner = base.gun.CurrentOwner; if (Object.op_Implicit((Object)(object)((currentOwner is PlayerController) ? currentOwner : null)) && ((PlayerController)/*isinst with value type is only supported in some contexts*/).PlayerHasActiveModule(IteratedDesign.ID)) { return true; } return false; } public override void Update() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_024d: 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_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) ((GunBehaviour)this).Update(); if ((Object)(object)base.gun.CurrentOwner != (Object)null) { GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if ((Object)(object)val != (Object)null) { if (base.gun.IsCharging) { float statValue = val.stats.GetStatValue((StatType)25); if (elapsed <= 1f) { elapsed += BraveTime.DeltaTime * (statValue / ReturnControl().GetChargeSpeed(1f)) / (CheckModule() ? 1.125f : 2f); } if (!VFXActive && GetElapsed > 0f) { VFXActive = true; Color val4 = default(Color); for (int i = 0; i < 5; i++) { float num = 16f; Vector2 zero = Vector2.zero; if (BraveMathCollege.LineSegmentRectangleIntersection(Vector2.op_Implicit(((Component)base.gun.barrelOffset).transform.position), Vector2.op_Implicit(((Component)base.gun.barrelOffset).transform.position + Vector2Extensions.ToVector3ZisY(BraveMathCollege.DegreesToVector(((GameActor)val).CurrentGun.CurrentAngle, 60f), -0.25f)), new Vector2(-40f, -40f), new Vector2(40f, 40f), ref zero)) { Vector2 val2 = zero - new Vector2(((Component)base.gun.barrelOffset).transform.position.x, ((Component)base.gun.barrelOffset).transform.position.y); num = ((Vector2)(ref val2)).magnitude; } GameObject val3 = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component = val3.GetComponent(); ((BraveBehaviour)component).transform.position = new Vector3(((Component)base.gun.barrelOffset).transform.position.x, ((Component)base.gun.barrelOffset).transform.position.y, 99999f); ((BraveBehaviour)component).transform.localRotation = Quaternion.Euler(0f, 0f, ((GameActor)val).CurrentGun.CurrentAngle + 45f * (float)i); component.dimensions = new Vector2(num * 2f, 1f); ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).HeightOffGround = -2f; ((BraveBehaviour)component).renderer.enabled = true; Vector3Extensions.WithZ(((BraveBehaviour)component).transform.position, ((BraveBehaviour)component).transform.position.z + 99999f); if (i == 0 || i == 2 || i == 4) { component.dimensions = new Vector2(32f, 1f); } else { component.dimensions = new Vector2(20f, 1f); } ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_EmissiveColorPower", 1.55f); ((Color)(ref val4))..ctor(0f, 1f, 0.05f, 1f); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_OverrideColor", val4); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_EmissiveColor", val4); Chargerreticles.Add(val3); } } float num2 = val.stats.GetStatValue((StatType)2) * 15f; if (Chargerreticles.Count > 0) { for (int j = -2; j < 3; j++) { GameObject val5 = Chargerreticles[j + 2]; if ((Object)(object)val5 != (Object)null) { tk2dTiledSprite component2 = val5.GetComponent(); float accuracy = ReturnControl().GetAccuracy(45f); float num3 = GetElapsed * (accuracy * (float)j); Quaternion localRotation = val5.transform.localRotation; float x = ((Quaternion)(ref localRotation)).eulerAngles.x; localRotation = ((Component)((GameActor)val).CurrentGun.barrelOffset).transform.localRotation; float num4 = x + ((Quaternion)(ref localRotation)).eulerAngles.x; localRotation = val5.transform.localRotation; float y = ((Quaternion)(ref localRotation)).eulerAngles.y; localRotation = ((Component)((GameActor)val).CurrentGun.barrelOffset).transform.localRotation; float num5 = y + ((Quaternion)(ref localRotation)).eulerAngles.y; float num6 = val5.transform.localRotation.z + ((BraveBehaviour)((GameActor)val).CurrentGun).transform.eulerAngles.z; val5.transform.localRotation = Quaternion.Euler(num4, num5, num6 + num3 + 3600f); val5.transform.position = ((Component)base.gun.barrelOffset).transform.position; Vector3Extensions.WithZ(((BraveBehaviour)component2).transform.position, ((BraveBehaviour)component2).transform.position.z + 99999f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((tk2dBaseSprite)component2).HeightOffGround = -2f; } } } foreach (ProjectileModule projectile in base.gun.Volley.projectiles) { Projectile currentProjectile = projectile.GetCurrentProjectile(); if ((Object)(object)currentProjectile != (Object)null) { currentProjectile.baseData.damage = 7f - GetElapsed * 5f; } } } else { elapsed = -0.125f; VFXActive = false; CleanupReticles(); } } if (!base.gun.IsReloading && !HasReloaded) { HasReloaded = true; } } else { elapsed = -0.125f; CleanupReticles(); } } public ModularGunController ReturnControl() { return ((Component)base.gun).GetComponent(); } public void CleanupReticles() { for (int i = 0; i < Chargerreticles.Count; i++) { SpawnManager.Despawn(Chargerreticles[i]); Object.Destroy((Object)(object)Chargerreticles[i]); } Chargerreticles.Clear(); } } public class ChargeBlaster : GunBehaviour { public static int GunID; public static void Init() { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Expected O, but got Unknown //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0714: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Expected O, but got Unknown //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b4e: Unknown result type (might be due to invalid IL or missing references) //IL_0be6: Unknown result type (might be due to invalid IL or missing references) //IL_0bed: Expected O, but got Unknown //IL_0d73: Unknown result type (might be due to invalid IL or missing references) //IL_0d78: Unknown result type (might be due to invalid IL or missing references) //IL_0d7d: Unknown result type (might be due to invalid IL or missing references) //IL_0d82: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0d94: Unknown result type (might be due to invalid IL or missing references) //IL_0d9d: Expected O, but got Unknown //IL_0d9d: Unknown result type (might be due to invalid IL or missing references) //IL_0da2: Unknown result type (might be due to invalid IL or missing references) //IL_0daa: Unknown result type (might be due to invalid IL or missing references) //IL_0db5: Unknown result type (might be due to invalid IL or missing references) //IL_0dbe: Expected O, but got Unknown //IL_0dbe: Unknown result type (might be due to invalid IL or missing references) //IL_0dc3: Unknown result type (might be due to invalid IL or missing references) //IL_0dcb: Unknown result type (might be due to invalid IL or missing references) //IL_0dd6: Unknown result type (might be due to invalid IL or missing references) //IL_0ddf: Expected O, but got Unknown //IL_0e12: Unknown result type (might be due to invalid IL or missing references) //IL_0e3f: Unknown result type (might be due to invalid IL or missing references) //IL_0e56: Unknown result type (might be due to invalid IL or missing references) //IL_0e67: Unknown result type (might be due to invalid IL or missing references) //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e74: Unknown result type (might be due to invalid IL or missing references) //IL_0ea4: Unknown result type (might be due to invalid IL or missing references) //IL_0ece: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Charge Blaster", "energycharger"); Game.Items.Rename("outdated_gun_mods:charge_blaster", "mdl:armcannon_4"); ChargeBlaster @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires weak energy pellets, can be charged up for a strong attack. Compatible with Modular Upgrade Software.\n\nDraws a lot of power to fire."); val.SetupSprite(StaticCollections.Gun_Collection, "energycharger_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "energycharger_idle"; val.shootAnimation = "energycharger_fire"; val.reloadAnimation = "energycharger_reload"; val.introAnimation = "energycharger_intro"; val.chargeAnimation = "energycharger_charge"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(57); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; modularGunController.AdditionalPowerSupply = 0; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)3; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(41); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.1f; val.DefaultModule.cooldownTime = 0.2f; val.DefaultModule.numberOfShotsInClip = 8; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 3f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannon_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)1); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 30f; val2.baseData.damage = 3f; val2.shouldRotate = false; ProjectileData baseData = val2.baseData; baseData.force *= 10f; Projectile val4 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val.DefaultModule.projectiles[0] = val4; val4.SetProjectileCollisionRight("defaultarmcannon_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)1); ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(334); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(334); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal2 = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(223); tileMapHorizontal2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical2 = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(223); tileMapVertical2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(223); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(223); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 100f); val5.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = val5; val4.baseData.speed = 40f; val4.baseData.damage = 16f; val4.shouldRotate = true; ProjectileData baseData2 = val4.baseData; baseData2.force *= 4f; ImprovedAfterImage improvedAfterImage = ((Component)val4).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.25f; improvedAfterImage.shadowTimeDelay = 0.1f; improvedAfterImage.dashColor = new Color(0f, 1f, 1f, 1f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent.penetration = 1; PickupObject byId15 = PickupObjectDatabase.GetById(56); Projectile val6 = Object.Instantiate(((Gun)((byId15 is Gun) ? byId15 : null)).DefaultModule.projectiles[0]); ((Component)val6).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val6).gameObject); Object.DontDestroyOnLoad((Object)(object)val6); val6.AnimateProjectileBundle("modblaster_dile", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "modblaster_dile", new List { new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 9), ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues(value: false, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9)); ref string objectImpactEventName3 = ref val6.objectImpactEventName; PickupObject byId16 = PickupObjectDatabase.GetById(180); objectImpactEventName3 = ((Gun)((byId16 is Gun) ? byId16 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName3 = ref val6.enemyImpactEventName; PickupObject byId17 = PickupObjectDatabase.GetById(180); enemyImpactEventName3 = ((Gun)((byId17 is Gun) ? byId17 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal3 = ref val6.hitEffects.tileMapHorizontal; PickupObject byId18 = PickupObjectDatabase.GetById(180); tileMapHorizontal3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId18 is Gun) ? byId18 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical3 = ref val6.hitEffects.tileMapVertical; PickupObject byId19 = PickupObjectDatabase.GetById(180); tileMapVertical3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId19 is Gun) ? byId19 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy3 = ref val6.hitEffects.enemy; PickupObject byId20 = PickupObjectDatabase.GetById(180); enemy3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId20 is Gun) ? byId20 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny3 = ref val6.hitEffects.deathAny; PickupObject byId21 = PickupObjectDatabase.GetById(180); deathAny3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId21 is Gun) ? byId21 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val7 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val7.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val7.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val7.SetFloat("_EmissiveColorPower", 100f); val7.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val6).sprite).renderer.material = val3; val6.baseData.speed = 50f; val6.baseData.damage = 27f; val6.shouldRotate = true; val6.AdditionalScaleMultiplier *= 1.33f; val6.pierceMinorBreakables = true; ExplosiveModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val6).gameObject); ExplosionData val8 = new ExplosionData(); val8.breakSecretWalls = false; val8.comprehensiveDelay = 0f; val8.damage = 7f; val8.damageRadius = 2.5f; val8.damageToPlayer = 0f; val8.debrisForce = 40f; val8.doDamage = true; val8.doDestroyProjectiles = false; val8.doExplosionRing = false; val8.doForce = true; val8.doScreenShake = false; val8.doStickyFriction = false; ref GameObject effect = ref val8.effect; PickupObject byId22 = PickupObjectDatabase.GetById(545); effect = ((Gun)((byId22 is Gun) ? byId22 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; val8.explosionDelay = 0f; val8.force = 10f; val8.forcePreventSecretWallDamage = false; val8.forceUseThisRadius = true; val8.freezeEffect = null; val8.freezeRadius = 0f; val8.IsChandelierExplosion = false; val8.isFreezeExplosion = false; val8.playDefaultSFX = true; val8.preventPlayerForce = false; val8.pushRadius = 1f; val8.secretWallsRadius = 1f; orAddComponent2.explosionData = val8; orAddComponent2.doExplosion = true; orAddComponent2.IgnoreQueues = true; ImprovedAfterImage improvedAfterImage2 = ((Component)val6).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.4f; improvedAfterImage2.shadowTimeDelay = 0.04f; improvedAfterImage2.dashColor = new Color(0f, 1f, 1f, 1f); ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0f, AmmoCost = 1 }; ChargeProjectile item2 = new ChargeProjectile { Projectile = val4, ChargeTime = 1f, AmmoCost = 2 }; ChargeProjectile item3 = new ChargeProjectile { Projectile = val6, ChargeTime = 2f, AmmoCost = 2 }; val.DefaultModule.chargeProjectiles = new List { item, item2, item3 }; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("CHARGER_AA", StaticCollections.Clip_Ammo_Atlas, "apoll_1", "apoll_2", (AmmoType)14); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId23 = PickupObjectDatabase.GetById(223); muzzleFlashEffects = ((Gun)((byId23 is Gun) ? byId23 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.25f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.25f, 0.125f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == GunID) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.15f * (float)stack; p.AdditionalScaleMultiplier *= 1f + 0.25f * (float)stack; ProjectileData baseData2 = p.baseData; baseData2.force *= 3f; } } } public class ChargeBlasterAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Expected O, but got Unknown //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0714: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Expected O, but got Unknown //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b4e: Unknown result type (might be due to invalid IL or missing references) //IL_0be6: Unknown result type (might be due to invalid IL or missing references) //IL_0bed: Expected O, but got Unknown //IL_0d73: Unknown result type (might be due to invalid IL or missing references) //IL_0d78: Unknown result type (might be due to invalid IL or missing references) //IL_0d7d: Unknown result type (might be due to invalid IL or missing references) //IL_0d82: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0d94: Unknown result type (might be due to invalid IL or missing references) //IL_0d9d: Expected O, but got Unknown //IL_0d9d: Unknown result type (might be due to invalid IL or missing references) //IL_0da2: Unknown result type (might be due to invalid IL or missing references) //IL_0daa: Unknown result type (might be due to invalid IL or missing references) //IL_0db5: Unknown result type (might be due to invalid IL or missing references) //IL_0dbe: Expected O, but got Unknown //IL_0dbe: Unknown result type (might be due to invalid IL or missing references) //IL_0dc3: Unknown result type (might be due to invalid IL or missing references) //IL_0dcb: Unknown result type (might be due to invalid IL or missing references) //IL_0dd6: Unknown result type (might be due to invalid IL or missing references) //IL_0ddf: Expected O, but got Unknown //IL_0e12: Unknown result type (might be due to invalid IL or missing references) //IL_0e3f: Unknown result type (might be due to invalid IL or missing references) //IL_0e52: Unknown result type (might be due to invalid IL or missing references) //IL_0e61: Unknown result type (might be due to invalid IL or missing references) //IL_0e69: Unknown result type (might be due to invalid IL or missing references) //IL_0e6e: Unknown result type (might be due to invalid IL or missing references) //IL_0e9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ec8: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Charge Blaster", "energychargeralt"); Game.Items.Rename("outdated_gun_mods:charge_blaster", "mdl:armcannon_4_alt"); ChargeBlasterAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires weak energy pellets, can be charged up for a strong attack. Compatible with Modular Upgrade Software.\n\nDraws a lot of power to fire."); val.SetupSprite(StaticCollections.Gun_Collection, "energychargeralt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "energychargeralt_idle"; val.shootAnimation = "energychargeralt_fire"; val.reloadAnimation = "energychargeralt_reload"; val.introAnimation = "energychargeralt_intro"; val.chargeAnimation = "energychargeralt_charge"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(57); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; modularGunController.AdditionalPowerSupply = 0; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)3; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(41); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.1f; val.DefaultModule.cooldownTime = 0.2f; val.DefaultModule.numberOfShotsInClip = 8; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 3f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)1); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(207); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(207); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(207); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(207); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.speed = 30f; val2.baseData.damage = 3f; val2.shouldRotate = false; ProjectileData baseData = val2.baseData; baseData.force *= 10f; Projectile val4 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val.DefaultModule.projectiles[0] = val4; val4.SetProjectileCollisionRight("defaultarmcannonalt_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)1); ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(334); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(334); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal2 = ref val4.hitEffects.tileMapHorizontal; PickupObject byId11 = PickupObjectDatabase.GetById(223); tileMapHorizontal2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical2 = ref val4.hitEffects.tileMapVertical; PickupObject byId12 = PickupObjectDatabase.GetById(223); tileMapVertical2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy2 = ref val4.hitEffects.enemy; PickupObject byId13 = PickupObjectDatabase.GetById(223); enemy2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny2 = ref val4.hitEffects.deathAny; PickupObject byId14 = PickupObjectDatabase.GetById(223); deathAny2 = Toolbox.MakeObjectIntoVFX(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 100f); val5.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = val5; val4.baseData.speed = 40f; val4.baseData.damage = 16f; val4.shouldRotate = true; ProjectileData baseData2 = val4.baseData; baseData2.force *= 4f; ImprovedAfterImage improvedAfterImage = ((Component)val4).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.25f; improvedAfterImage.shadowTimeDelay = 0.1f; improvedAfterImage.dashColor = new Color(0f, 1f, 0.1f, 1f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent.penetration = 1; PickupObject byId15 = PickupObjectDatabase.GetById(56); Projectile val6 = Object.Instantiate(((Gun)((byId15 is Gun) ? byId15 : null)).DefaultModule.projectiles[0]); ((Component)val6).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val6).gameObject); Object.DontDestroyOnLoad((Object)(object)val6); val6.AnimateProjectileBundle("modblasteralt_dile", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "modblasteralt_dile", new List { new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 9), ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues(value: false, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9)); ref string objectImpactEventName3 = ref val6.objectImpactEventName; PickupObject byId16 = PickupObjectDatabase.GetById(180); objectImpactEventName3 = ((Gun)((byId16 is Gun) ? byId16 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName3 = ref val6.enemyImpactEventName; PickupObject byId17 = PickupObjectDatabase.GetById(180); enemyImpactEventName3 = ((Gun)((byId17 is Gun) ? byId17 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal3 = ref val6.hitEffects.tileMapHorizontal; PickupObject byId18 = PickupObjectDatabase.GetById(180); tileMapHorizontal3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId18 is Gun) ? byId18 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical3 = ref val6.hitEffects.tileMapVertical; PickupObject byId19 = PickupObjectDatabase.GetById(180); tileMapVertical3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId19 is Gun) ? byId19 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy3 = ref val6.hitEffects.enemy; PickupObject byId20 = PickupObjectDatabase.GetById(180); enemy3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId20 is Gun) ? byId20 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny3 = ref val6.hitEffects.deathAny; PickupObject byId21 = PickupObjectDatabase.GetById(180); deathAny3 = Toolbox.MakeObjectIntoVFX(((Gun)((byId21 is Gun) ? byId21 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val7 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val7.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val7.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val7.SetFloat("_EmissiveColorPower", 100f); val7.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val6).sprite).renderer.material = val3; val6.baseData.speed = 50f; val6.baseData.damage = 27f; val6.shouldRotate = true; val6.AdditionalScaleMultiplier *= 1.33f; val6.pierceMinorBreakables = true; ExplosiveModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val6).gameObject); ExplosionData val8 = new ExplosionData(); val8.breakSecretWalls = false; val8.comprehensiveDelay = 0f; val8.damage = 7f; val8.damageRadius = 2.5f; val8.damageToPlayer = 0f; val8.debrisForce = 40f; val8.doDamage = true; val8.doDestroyProjectiles = false; val8.doExplosionRing = false; val8.doForce = true; val8.doScreenShake = false; val8.doStickyFriction = false; ref GameObject effect = ref val8.effect; PickupObject byId22 = PickupObjectDatabase.GetById(545); effect = ((Gun)((byId22 is Gun) ? byId22 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; val8.explosionDelay = 0f; val8.force = 10f; val8.forcePreventSecretWallDamage = false; val8.forceUseThisRadius = true; val8.freezeEffect = null; val8.freezeRadius = 0f; val8.IsChandelierExplosion = false; val8.isFreezeExplosion = false; val8.playDefaultSFX = true; val8.preventPlayerForce = false; val8.pushRadius = 1f; val8.secretWallsRadius = 1f; orAddComponent2.explosionData = val8; orAddComponent2.doExplosion = true; orAddComponent2.IgnoreQueues = true; ImprovedAfterImage improvedAfterImage2 = ((Component)val6).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.4f; improvedAfterImage2.shadowTimeDelay = 0.04f; improvedAfterImage2.dashColor = new Color(0f, 1f, 0.1f, 1f); ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0f, AmmoCost = 1 }; ChargeProjectile item2 = new ChargeProjectile { Projectile = val6, ChargeTime = 1f, AmmoCost = 2 }; ChargeProjectile item3 = new ChargeProjectile { Projectile = val6, ChargeTime = 2f, AmmoCost = 2 }; val.DefaultModule.chargeProjectiles = new List { item, item2, item3 }; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("CHARGER_AAALT", StaticCollections.Clip_Ammo_Atlas, "art_1", "art_2", (AmmoType)14); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId23 = PickupObjectDatabase.GetById(151); muzzleFlashEffects = ((Gun)((byId23 is Gun) ? byId23 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.25f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.25f, 0.125f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == GunID) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.15f * (float)stack; p.AdditionalScaleMultiplier *= 1f + 0.25f * (float)stack; ProjectileData baseData2 = p.baseData; baseData2.force *= 5f; } } } public class Apollo : GunBehaviour { private bool HasReloaded; private List Chargerreticles = new List(); private bool VFXActive; private float elapsed; public static int GunID; public float GetElapsed { get { if (0f > elapsed) { return 0f; } return elapsed; } } public static void Init() { //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Expected O, but got Unknown //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Apollo", "apollo_mdlr"); Game.Items.Rename("outdated_gun_mods:apollo", "mdl:armcannon_8"); Apollo @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires multiple shots in a fixed spread.\n\nOne half of a pair, this weapon is used to keep clusters at bay and priority targets in check."); val.SetupSprite(StaticCollections.Gun_Collection, "apollo_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "apollo_idle"; val.shootAnimation = "apollo_fire"; val.reloadAnimation = "apollo_reload"; val.introAnimation = "apollo_intro"; val.chargeAnimation = "apollo_charge"; ((Component)val).GetComponent().GetClipByName(val.shootAnimation).frames[0].eventAudio = "Play_BOSS_RatMech_Cannon_01"; ((Component)val).GetComponent().GetClipByName(val.shootAnimation).frames[0].triggerEvent = true; ((Component)val).GetComponent().GetClipByName(val.reloadAnimation).frames[0].eventAudio = "Play_ModulePowerUp"; ((Component)val).GetComponent().GetClipByName(val.reloadAnimation).frames[0].triggerEvent = true; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; modularGunController.AdditionalPowerSupply = 0; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); for (int i = -3; i < 4; i++) { PickupObject byId = PickupObjectDatabase.GetById(88); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, true); } val.DefaultModule.chargeProjectiles = new List(); int num = -3; foreach (ProjectileModule projectile in val.Volley.projectiles) { projectile.ammoCost = 1; projectile.shootStyle = (ShootStyle)3; projectile.sequenceStyle = (ProjectileSequenceStyle)0; projectile.cooldownTime = 0.5f; projectile.angleFromAim = 30 * num; projectile.angleVariance = 2f; num++; projectile.numberOfShotsInClip = 6; PickupObject byId2 = PickupObjectDatabase.GetById(88); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); val2.baseData.damage = 10f; val2.shouldRotate = true; val2.baseData.range = 19f; val2.baseData.speed = 40f; val2.baseData.force = 25f; val2.AnimateProjectileBundle("longshot_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "longshot_idle", new List { new IntVector2(14, 5), new IntVector2(14, 5) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 2), ProjectileToolbox.ConstructListOfSameValues(value: true, 2), ProjectileToolbox.ConstructListOfSameValues(value: false, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2), ProjectileToolbox.ConstructListOfSameValues(null, 2)); val.DefaultModule.projectiles[0] = val2; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(384); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(384); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(59); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(59); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(59); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(59); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects.First().effects.First().effect); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); if (projectile != val.DefaultModule) { projectile.ammoCost = 0; } ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0.125f }; projectile.chargeProjectiles = new List { item }; val.DefaultModule.chargeProjectiles.Add(item); } val.reflectDuringReload = true; val.gunSwitchGroup = "Railgun"; val.reloadTime = 3.2f; val.SetBaseMaxAmmo(250); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("apollo_AAa", StaticCollections.Clip_Ammo_Atlas, "actualapollo_1", "actualapollo_2", (AmmoType)14); val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(228); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.375f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.5f, 0.375f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == GunID) { ProjectileData baseData = p.baseData; baseData.damage *= 0.9f; ProjectileData baseData2 = p.baseData; baseData2.damage += (float)stack; ProjectileData baseData3 = p.baseData; baseData3.speed *= 0.8f; BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.bouncesTrackEnemies = true; orAddComponent.numberOfBounces += stack; } } public void Start() { ModularGunController component = ((Component)base.gun).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((MonoBehaviour)component).StartCoroutine(FUCK(component)); } } public IEnumerator FUCK(ModularGunController aaa) { aaa.Start(); yield return null; aaa.statMods.Add(new ModuleGunStatModifier { AngleFromAim_Process = ProcessClipSize }); } public float ProcessClipSize(float clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip * (1f - GetElapsed); } public bool CheckModule() { GameActor currentOwner = base.gun.CurrentOwner; if (Object.op_Implicit((Object)(object)((currentOwner is PlayerController) ? currentOwner : null)) && ((PlayerController)/*isinst with value type is only supported in some contexts*/).PlayerHasActiveModule(IteratedDesign.ID)) { return true; } return false; } public override void Update() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_024d: 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_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) ((GunBehaviour)this).Update(); if ((Object)(object)base.gun.CurrentOwner != (Object)null) { GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if ((Object)(object)val != (Object)null) { if (base.gun.IsCharging) { float statValue = val.stats.GetStatValue((StatType)25); if (elapsed <= 1f) { elapsed += BraveTime.DeltaTime * (statValue / ReturnControl().GetChargeSpeed(1f)) / (CheckModule() ? 1.125f : 2f); } if (!VFXActive && GetElapsed > 0f) { VFXActive = true; Color val4 = default(Color); for (int i = 0; i < 5; i++) { float num = 16f; Vector2 zero = Vector2.zero; if (BraveMathCollege.LineSegmentRectangleIntersection(Vector2.op_Implicit(((Component)base.gun.barrelOffset).transform.position), Vector2.op_Implicit(((Component)base.gun.barrelOffset).transform.position + Vector2Extensions.ToVector3ZisY(BraveMathCollege.DegreesToVector(((GameActor)val).CurrentGun.CurrentAngle, 60f), -0.25f)), new Vector2(-40f, -40f), new Vector2(40f, 40f), ref zero)) { Vector2 val2 = zero - new Vector2(((Component)base.gun.barrelOffset).transform.position.x, ((Component)base.gun.barrelOffset).transform.position.y); num = ((Vector2)(ref val2)).magnitude; } GameObject val3 = SpawnManager.SpawnVFX(VFXStorage.LaserReticle, false); tk2dTiledSprite component = val3.GetComponent(); ((BraveBehaviour)component).transform.position = new Vector3(((Component)base.gun.barrelOffset).transform.position.x, ((Component)base.gun.barrelOffset).transform.position.y, 99999f); ((BraveBehaviour)component).transform.localRotation = Quaternion.Euler(0f, 0f, ((GameActor)val).CurrentGun.CurrentAngle + 45f * (float)i); component.dimensions = new Vector2(num * 2f, 1f); ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).HeightOffGround = -2f; ((BraveBehaviour)component).renderer.enabled = true; Vector3Extensions.WithZ(((BraveBehaviour)component).transform.position, ((BraveBehaviour)component).transform.position.z + 99999f); if (i == 0 || i == 2 || i == 4) { component.dimensions = new Vector2(32f, 1f); } else { component.dimensions = new Vector2(20f, 1f); } ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_EmissiveColorPower", 1.55f); ((Color)(ref val4))..ctor(0f, 1f, 1f, 1f); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_OverrideColor", val4); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_EmissiveColor", val4); Chargerreticles.Add(val3); } } float num2 = val.stats.GetStatValue((StatType)2) * 15f; if (Chargerreticles.Count > 0) { for (int j = -2; j < 3; j++) { GameObject val5 = Chargerreticles[j + 2]; if ((Object)(object)val5 != (Object)null) { tk2dTiledSprite component2 = val5.GetComponent(); float accuracy = ReturnControl().GetAccuracy(45f); float num3 = GetElapsed * (accuracy * (float)j) - accuracy * (float)j; Quaternion localRotation = val5.transform.localRotation; float x = ((Quaternion)(ref localRotation)).eulerAngles.x; localRotation = ((Component)((GameActor)val).CurrentGun.barrelOffset).transform.localRotation; float num4 = x + ((Quaternion)(ref localRotation)).eulerAngles.x; localRotation = val5.transform.localRotation; float y = ((Quaternion)(ref localRotation)).eulerAngles.y; localRotation = ((Component)((GameActor)val).CurrentGun.barrelOffset).transform.localRotation; float num5 = y + ((Quaternion)(ref localRotation)).eulerAngles.y; float num6 = val5.transform.localRotation.z + ((BraveBehaviour)((GameActor)val).CurrentGun).transform.eulerAngles.z; val5.transform.localRotation = Quaternion.Euler(num4, num5, num6 + num3 + 3600f); val5.transform.position = ((Component)base.gun.barrelOffset).transform.position; Vector3Extensions.WithZ(((BraveBehaviour)component2).transform.position, ((BraveBehaviour)component2).transform.position.z + 99999f); ((tk2dBaseSprite)component2).UpdateZDepth(); ((tk2dBaseSprite)component2).HeightOffGround = -2f; } } } foreach (ProjectileModule projectile in base.gun.Volley.projectiles) { Projectile currentProjectile = projectile.GetCurrentProjectile(); if ((Object)(object)currentProjectile != (Object)null) { currentProjectile.baseData.damage = GetElapsed * 5f + 2f; } } } else { elapsed = -0.125f; VFXActive = false; CleanupReticles(); } } if (!base.gun.IsReloading && !HasReloaded) { HasReloaded = true; } } else { elapsed = -0.125f; CleanupReticles(); } } public ModularGunController ReturnControl() { return ((Component)base.gun).GetComponent(); } public void CleanupReticles() { for (int i = 0; i < Chargerreticles.Count; i++) { SpawnManager.Despawn(Chargerreticles[i]); Object.Destroy((Object)(object)Chargerreticles[i]); } Chargerreticles.Clear(); } } public class GravityPulsar : GunBehaviour { public static int ID; public static void Init() { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0254: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Expected O, but got Unknown //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Unknown result type (might be due to invalid IL or missing references) //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0972: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Singularity Pulsar", "singularity_pulsar"); Game.Items.Rename("outdated_gun_mods:singularity_pulsar", "mdl:armcannon_10"); GravityPulsar @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires large rifts, followed up with energy attracted to said rifts. Compatible with Modular Upgrade Software.\n\nAn experimental tech graciously provided by a local laboratory, weaponized into an exotic weapon."); val.SetupSprite(StaticCollections.Gun_Collection, "gravgun_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "gravgun_idle"; val.shootAnimation = "gravgun_fire"; val.reloadAnimation = "gravgun_reload"; val.finalShootAnimation = "gravgun_altfire"; val.introAnimation = "gravgun_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.shootAnimation, new Dictionary { { 0, "Play_WPN_bsg_shot_01" } }); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(((Component)val).GetComponent(), val.finalShootAnimation, new Dictionary { { 0, "Play_WPN_looper_shot_01" } }); PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.5f; val.DefaultModule.cooldownTime = 0.3f; val.DefaultModule.numberOfShotsInClip = 26; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7f; val.DefaultModule.usesOptionalFinalProjectile = true; val.DefaultModule.numberOfFinalProjectiles = 25; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("fwoomp", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "fwoomp", new List { new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48), new IntVector2(48, 48) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 22), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 22), ProjectileToolbox.ConstructListOfSameValues(value: true, 22), ProjectileToolbox.ConstructListOfSameValues(value: false, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22), ProjectileToolbox.ConstructListOfSameValues(null, 22)); ProjectileImpactVFXPool hitEffects = val2.hitEffects; VFXPool val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects.tileMapHorizontal = val3; ProjectileImpactVFXPool hitEffects2 = val2.hitEffects; val3 = new VFXPool(); val3.type = (VFXPoolType)0; val3.effects = (VFXComplex[])(object)new VFXComplex[0]; hitEffects2.tileMapVertical = val3; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId3 = PickupObjectDatabase.GetById(169); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId4 = PickupObjectDatabase.GetById(169); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val2.hitEffects.alwaysUseMidair = false; val2.pierceMinorBreakables = true; val2.PenetratesInternalWalls = true; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId5 = PickupObjectDatabase.GetById(156); objectImpactEventName = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId6 = PickupObjectDatabase.GetById(156); enemyImpactEventName = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].enemyImpactEventName; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 20; orAddComponent.penetratesBreakables = true; MaintainDamageOnPierce orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.damageMultOnPierce = 1f; BounceProjModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent3.bouncesTrackEnemies = false; orAddComponent3.numberOfBounces = 10; val2.baseData.speed = 6f; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.SetFloat("_EmissivePower", 40f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.SetFloat("_EmissiveColorPower", 40f); ProjectileData baseData = val2.baseData; baseData.range *= 2.5f; val2.baseData.damage = 3f; val2.shouldRotate = false; ((Component)val2).gameObject.AddComponent(); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.45f; improvedAfterImage.shadowTimeDelay = 0.025f; improvedAfterImage.dashColor = new Color(1.1f, 0.5f, 1.1f, 1f); val.DefaultModule.ammoType = (AmmoType)14; ref string customAmmoType = ref val.DefaultModule.customAmmoType; PickupObject byId7 = PickupObjectDatabase.GetById(169); customAmmoType = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.customAmmoType; val.DefaultModule.finalAmmoType = (AmmoType)14; val.DefaultModule.finalCustomAmmoType = "ArmCannon"; PickupObject byId8 = PickupObjectDatabase.GetById(56); Projectile val4 = Object.Instantiate(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.SetProjectileCollisionRight("defaultarmcannon_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)1); val4.baseData.range = 250f; ((Component)val4).gameObject.AddComponent(); val.DefaultModule.finalProjectile = val4; PierceProjModifier orAddComponent4 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent4.penetration = 6; orAddComponent4.penetratesBreakables = true; ref string objectImpactEventName2 = ref val4.objectImpactEventName; PickupObject byId9 = PickupObjectDatabase.GetById(334); objectImpactEventName2 = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName2 = ref val4.enemyImpactEventName; PickupObject byId10 = PickupObjectDatabase.GetById(334); enemyImpactEventName2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].enemyImpactEventName; BounceProjModifier orAddComponent5 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent5.bouncesTrackEnemies = false; orAddComponent5.numberOfBounces = 10; MaintainDamageOnPierce orAddComponent6 = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent6.damageMultOnPierce = 1f; val4.baseData.damage = 2.8f; ImprovedAfterImage improvedAfterImage2 = ((Component)val4).gameObject.AddComponent(); improvedAfterImage2.spawnShadows = true; improvedAfterImage2.shadowLifetime = 0.3f; improvedAfterImage2.shadowTimeDelay = 0.01f; improvedAfterImage2.dashColor = new Color(0f, 0.7f, 0.7f, 1f); modularGunController.projectileToCopyForFlak = val4; val.gunClass = (GunClass)0; ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId11 = PickupObjectDatabase.GetById(228); muzzleFlashEffects = ((Gun)((byId11 is Gun) ? byId11 : null)).muzzleFlashEffects; ref VFXPool finalMuzzleFlashEffects = ref val.finalMuzzleFlashEffects; PickupObject byId12 = PickupObjectDatabase.GetById(223); finalMuzzleFlashEffects = ((Gun)((byId12 is Gun) ? byId12 : null)).muzzleFlashEffects; ref string gunSwitchGroup2 = ref val.gunSwitchGroup; PickupObject byId13 = PickupObjectDatabase.GetById(169); gunSwitchGroup2 = ((Gun)((byId13 is Gun) ? byId13 : null)).gunSwitchGroup; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.375f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.375f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecificClip = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClip, new Func(@object.ProcessClipSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (1f + (float)stack / 3.5f); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return (int)((float)f * 1.333f); } public void Start() { ModularGunController component = ((Component)base.gun).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.statMods.Add(new ModuleGunStatModifier { FinaleClipSize_Process = ProcessClipSize }); } } public bool CheckModule() { GameActor currentOwner = base.gun.CurrentOwner; if (Object.op_Implicit((Object)(object)((currentOwner is PlayerController) ? currentOwner : null)) && ((PlayerController)/*isinst with value type is only supported in some contexts*/).PlayerHasActiveModule(IteratedDesign.ID)) { return true; } return false; } public int ProcessClipSize(int currentFinales, int clipSize, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return base.gun.DefaultModule.GetModNumberOfShotsInClip((GameActor)(object)player) - 1; } } public class LightLanceAlt : GunBehaviour { public class SpecialLaserSlash : CustomSlashData { public override CustomSlashData ReturnClone() { SpecialLaserSlash specialLaserSlash = ScriptableObject.CreateInstance(); specialLaserSlash.doVFX = doVFX; specialLaserSlash.VFX = VFX; specialLaserSlash.doHitVFX = doHitVFX; specialLaserSlash.hitVFX = hitVFX; specialLaserSlash.projInteractMode = projInteractMode; specialLaserSlash.playerKnockbackForce = playerKnockbackForce; specialLaserSlash.enemyKnockbackForce = enemyKnockbackForce; specialLaserSlash.statusEffects = statusEffects; specialLaserSlash.jammedDamageMult = jammedDamageMult; specialLaserSlash.bossDamageMult = bossDamageMult; specialLaserSlash.doOnSlash = doOnSlash; specialLaserSlash.doPostProcessSlash = doPostProcessSlash; specialLaserSlash.slashRange = slashRange; specialLaserSlash.slashDegrees = slashDegrees; specialLaserSlash.damage = damage; specialLaserSlash.damagesBreakables = damagesBreakables; specialLaserSlash.soundEvent = soundEvent; specialLaserSlash.OnHitTarget = OnHitTarget; specialLaserSlash.OnHitBullet = OnHitBullet; specialLaserSlash.OnHitMinorBreakable = OnHitMinorBreakable; specialLaserSlash.OnHitMajorBreakable = OnHitMajorBreakable; return specialLaserSlash; } public override void OnProjectileReflect(Projectile p, bool retargetReflectedBullet, GameActor newOwner, float minReflectedBulletSpeed, bool doPostProcessing = false, float scaleModifier = 1f, float baseDamage = 10f, float spread = 0f, string sfx = null) { //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_ITM_Crisis_Stone_Impact_01", ((Component)p).gameObject); p.RemoveBulletScriptControl(); if (Object.op_Implicit((Object)(object)p.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)p.Owner).specRigidbody)) { ((BraveBehaviour)p).specRigidbody.DeregisterSpecificCollisionException(((BraveBehaviour)p.Owner).specRigidbody); } p.Owner = newOwner; p.SetNewShooter(((BraveBehaviour)newOwner).specRigidbody); p.allowSelfShooting = false; if (newOwner is AIActor) { p.collidesWithPlayer = true; p.collidesWithEnemies = false; } else if (newOwner is PlayerController) { p.collidesWithPlayer = false; p.collidesWithEnemies = true; } SpawnManager.PoolManager.Remove(((BraveBehaviour)p).transform); float speed = p.baseData.speed; p.baseData.damage = 1.25f + p.baseData.speed * 0.3f; ProjectileData baseData = p.baseData; baseData.speed *= 2f; p.UpdateSpeed(); if (newOwner is PlayerController) { PlayerController val = (PlayerController)(object)((newOwner is PlayerController) ? newOwner : null); if ((Object)(object)val != (Object)null) { ModularGunController component = ((Component)((GameActor)val).CurrentGun).GetComponent(); if ((Object)(object)component != (Object)null) { float num = Mathf.Max(0f, 90f - speed * 3f); p.Direction = Toolbox.GetUnitOnCircle(((GameActor)val).CurrentGun.CurrentAngle + Random.Range(component.GetAccuracy(num), component.GetAccuracy(num * -1f)), 1f); GameObject val2 = Object.Instantiate(component.isAlt ? ConvexLens.greenImpact.effects[0].effects[0].effect : LineUp.PierceImpact, Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter - new Vector2(1.5f, 0f)), Quaternion.identity); Object.Destroy((Object)(object)val2, 2f); } ProjectileData baseData2 = p.baseData; baseData2.damage *= val.stats.GetStatValue((StatType)5); ProjectileData baseData3 = p.baseData; baseData3.speed *= val.stats.GetStatValue((StatType)6); p.UpdateSpeed(); ProjectileData baseData4 = p.baseData; baseData4.force *= val.stats.GetStatValue((StatType)12); ProjectileData baseData5 = p.baseData; baseData5.range *= val.stats.GetStatValue((StatType)26); p.BossDamageMultiplier *= val.stats.GetStatValue((StatType)22); p.RuntimeUpdateScale(val.stats.GetStatValue((StatType)15)); val.DoPostProcessProjectile(p); } } if (newOwner is AIActor) { p.baseData.damage = 0.5f; p.baseData.SetAll(((BraveBehaviour)((newOwner is AIActor) ? newOwner : null)).bulletBank.GetBullet("default").ProjectileData); ((BraveBehaviour)p).specRigidbody.CollideWithTileMap = false; p.ResetDistance(); p.collidesWithEnemies = ((AIActor)((newOwner is AIActor) ? newOwner : null)).CanTargetEnemies; p.collidesWithPlayer = true; p.UpdateCollisionMask(); ((BraveBehaviour)p).sprite.color = new Color(1f, 0.1f, 0.1f); p.MakeLookLikeEnemyBullet(true); p.RemovePlayerOnlyModifiers(); if (((AIActor)((newOwner is AIActor) ? newOwner : null)).IsBlackPhantom) { p.baseData.damage = 1f; p.BecomeBlackBullet(); } } p.UpdateCollisionMask(); p.Reflected(); p.SendInDirection(p.Direction, true, true); } } public static CustomSlashData customSlash; public static int ID; public static void Init() { //IL_00fe: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Expected O, but got Unknown //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Expected O, but got Unknown //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07b2: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07cf: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Expected O, but got Unknown //IL_0d90: Unknown result type (might be due to invalid IL or missing references) //IL_0d9f: Unknown result type (might be due to invalid IL or missing references) //IL_0da7: Unknown result type (might be due to invalid IL or missing references) //IL_0dac: Unknown result type (might be due to invalid IL or missing references) //IL_0db2: Unknown result type (might be due to invalid IL or missing references) //IL_0db9: Expected O, but got Unknown //IL_0dbc: Unknown result type (might be due to invalid IL or missing references) //IL_0de6: Unknown result type (might be due to invalid IL or missing references) //IL_0e10: Unknown result type (might be due to invalid IL or missing references) //IL_0e31: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Light Lance", "lightlancealt"); Game.Items.Rename("outdated_gun_mods:light_lance", "mdl:armcannon_9_alt"); LightLance @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Slashes enemies, can be charged to do a deflecting attack with an energy projectile.\n\nA close-combat weapon. In the hands of a machine with a fast enough camera, it can fulfill the dream of every person with a samurai sword."); val.SetupSprite(StaticCollections.Gun_Collection, "coollancealt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "lightlancealt_idle"; val.shootAnimation = "lightlancealt_fire"; val.reloadAnimation = "lightlancealt_reload"; val.introAnimation = "lightlancealt_intro"; val.chargeAnimation = "lightlancealt_charge"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)3; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.5f; val.DefaultModule.cooldownTime = 0.5f; val.DefaultModule.numberOfShotsInClip = 12; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 0f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.baseData.damage = 0f; val2.baseData.speed = 1f; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.enabled = false; val2.baseData.range = 1f; val2.hitEffects.suppressMidairDeathVfx = true; ProjectileSlashingBehaviour val3 = ((Component)val2).gameObject.AddComponent(); val3.DestroyBaseAfterFirstSlash = true; val3.SlashDamageUsesBaseProjectileDamage = true; val3.slashParameters = ScriptableObject.CreateInstance(); ref VFXPool hitVFX = ref val3.slashParameters.hitVFX; PickupObject byId3 = PickupObjectDatabase.GetById(345); hitVFX = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.enemy; val3.slashParameters.projInteractMode = (ProjInteractMode)0; val3.slashParameters.playerKnockbackForce = 20f; val3.slashParameters.enemyKnockbackForce = 30f; val3.slashParameters.doVFX = true; val3.slashParameters.doHitVFX = true; val3.slashParameters.slashRange = 3.75f; val3.slashParameters.slashDegrees = 150f; val3.slashParameters.soundEvent = "Play_WPN_beam_slash_01"; val3.SlashDamageUsesBaseProjectileDamage = false; val3.initialDelay = 0.1f; val3.slashParameters.damage = 25f; val3.slashParameters.damagesBreakables = true; ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0f, AmmoCost = 1 }; PickupObject byId4 = PickupObjectDatabase.GetById(56); Projectile val4 = Object.Instantiate(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.AnimateProjectileBundle("swordslashalt", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "swordslashalt", new List { new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 9), ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues(value: false, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9)); ref string objectImpactEventName = ref val4.objectImpactEventName; PickupObject byId5 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val4.enemyImpactEventName; PickupObject byId6 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].enemyImpactEventName; val4.hitEffects.alwaysUseMidair = true; ref GameObject overrideMidairDeathVFX = ref val4.hitEffects.overrideMidairDeathVFX; PickupObject byId7 = PickupObjectDatabase.GetById(545); overrideMidairDeathVFX = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; val4.AdditionalScaleMultiplier *= 0.75f; Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 50f); val5.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = val5; ((Component)val4).gameObject.AddComponent(); val4.baseData.damage = 16f; val4.baseData.speed = 1f; val4.shouldRotate = true; val4.baseData.range = 9f; val4.PenetratesInternalWalls = true; CustomProjectileSlashingBehaviour customProjectileSlashingBehaviour = ((Component)val4).gameObject.AddComponent(); customProjectileSlashingBehaviour.DestroyBaseAfterFirstSlash = true; customProjectileSlashingBehaviour.SlashDamageUsesBaseProjectileDamage = true; customProjectileSlashingBehaviour.DestroysOnlyComponentAfterFirstSlash = true; customProjectileSlashingBehaviour.SlashDamageUsesBaseProjectileDamage = false; customProjectileSlashingBehaviour.initialDelay = 0.05f; SpecialLaserSlash specialLaserSlash = ScriptableObject.CreateInstance(); specialLaserSlash.projInteractMode = CustomSlashDoer.ProjInteractMode.REFLECTANDPOSTPROCESS; specialLaserSlash.playerKnockbackForce = 20f; specialLaserSlash.enemyKnockbackForce = 70f; specialLaserSlash.doVFX = false; specialLaserSlash.doHitVFX = true; specialLaserSlash.slashRange = 4.25f; specialLaserSlash.slashDegrees = 120f; specialLaserSlash.soundEvent = "Play_WPN_beam_slash_01"; specialLaserSlash.damage = 45f; specialLaserSlash.damagesBreakables = true; ref VFXPool hitVFX2 = ref specialLaserSlash.hitVFX; PickupObject byId8 = PickupObjectDatabase.GetById(345); hitVFX2 = ((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.enemy; customSlash = specialLaserSlash; customProjectileSlashingBehaviour.slashParameters = customSlash; ImprovedAfterImage improvedAfterImage = ((Component)val4).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.1f; improvedAfterImage.dashColor = new Color(0f, 0.9f, 0f, 0.666f); val.gunClass = (GunClass)0; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent.penetration += 3; val4.pierceMinorBreakables = true; ChargeProjectile item2 = new ChargeProjectile { Projectile = val4, OverrideShootAnimation = "lightlancealt_altfire", ChargeTime = 1f, AmmoCost = 2, UsedProperties = (ChargeProjectileProperties)1040, AdditionalWwiseEvent = "Play_BOSS_agunim_orb_01" }; val.DefaultModule.chargeProjectiles = new List { item, item2 }; tk2dSpriteAnimationClip clipByName = ((BraveBehaviour)val).spriteAnimator.GetClipByName("lightlancealt_fire"); float[] array = new float[15] { 0f, 0f, 0f, 0f, 0f, 0f, 0f, -0.75f, -0.75f, -1f, -0.5f, -0.25f, 0f, 0f, 0f }; float[] array2 = new float[15] { 0f, 0.125f, 0.25f, 0.375f, -0.75f, -0.75f, -0.75f, -0.6875f, -0.6875f, -0.5625f, -0.5625f, -0.4375f, -0.375f, -0.25f, -0.125f }; for (int i = 0; i < array.Length && i < array2.Length && i < clipByName.frames.Length; i++) { int spriteId = clipByName.frames[i].spriteId; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position0.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position0.y += array2[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position1.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position1.y += array2[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position2.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position2.y += array2[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position3.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position3.y += array2[i]; } tk2dSpriteAnimationClip clipByName2 = ((BraveBehaviour)val).spriteAnimator.GetClipByName("lightlancealt_charge"); array = new float[7]; array2 = new float[7] { 0f, 0f, 0.125f, 0.25f, 0.25f, 0.375f, 0.5f }; for (int j = 0; j < array.Length && j < array2.Length && j < clipByName.frames.Length; j++) { int spriteId2 = clipByName.frames[j].spriteId; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position0.x += array[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position0.y += array2[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position1.x += array[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position1.y += array2[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position2.x += array[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position2.y += array2[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position3.x += array[j]; clipByName.frames[j].spriteCollection.spriteDefinitions[spriteId2].position3.y += array2[j]; } tk2dSpriteAnimationClip clipByName3 = ((BraveBehaviour)val).spriteAnimator.GetClipByName("lightlancealt_reload"); array = new float[7]; array2 = new float[6] { 0f, -0.25f, -0.5f, -0.5f, -0.5f, 0f }; for (int k = 0; k < array.Length && k < array2.Length && k < clipByName3.frames.Length; k++) { int spriteId3 = clipByName3.frames[k].spriteId; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position0.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position0.y += array2[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position1.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position1.y += array2[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position2.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position2.y += array2[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position3.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position3.y += array2[k]; } ref string gunSwitchGroup2 = ref val.gunSwitchGroup; PickupObject byId9 = PickupObjectDatabase.GetById(125); gunSwitchGroup2 = ((Gun)((byId9 is Gun) ? byId9 : null)).gunSwitchGroup; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); VFXPool val6 = new VFXPool(); val6.type = (VFXPoolType)0; val6.effects = (VFXComplex[])(object)new VFXComplex[0]; val.muzzleFlashEffects = val6; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, -0f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("lancebeam_alt", StaticCollections.Clip_Ammo_Atlas, "lancebeamalt_1", "lancebeamalt_2", (AmmoType)14); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 4); } } public class LightLance : GunBehaviour { public class SpecialLaserSlash : CustomSlashData { public override CustomSlashData ReturnClone() { SpecialLaserSlash specialLaserSlash = ScriptableObject.CreateInstance(); specialLaserSlash.doVFX = doVFX; specialLaserSlash.VFX = VFX; specialLaserSlash.doHitVFX = doHitVFX; specialLaserSlash.hitVFX = hitVFX; specialLaserSlash.projInteractMode = projInteractMode; specialLaserSlash.playerKnockbackForce = playerKnockbackForce; specialLaserSlash.enemyKnockbackForce = enemyKnockbackForce; specialLaserSlash.statusEffects = statusEffects; specialLaserSlash.jammedDamageMult = jammedDamageMult; specialLaserSlash.bossDamageMult = bossDamageMult; specialLaserSlash.doOnSlash = doOnSlash; specialLaserSlash.doPostProcessSlash = doPostProcessSlash; specialLaserSlash.slashRange = slashRange; specialLaserSlash.slashDegrees = slashDegrees; specialLaserSlash.damage = damage; specialLaserSlash.damagesBreakables = damagesBreakables; specialLaserSlash.soundEvent = soundEvent; specialLaserSlash.OnHitTarget = OnHitTarget; specialLaserSlash.OnHitBullet = OnHitBullet; specialLaserSlash.OnHitMinorBreakable = OnHitMinorBreakable; specialLaserSlash.OnHitMajorBreakable = OnHitMajorBreakable; return specialLaserSlash; } public bool CheckModule(GameActor owner) { if (Object.op_Implicit((Object)(object)((owner is PlayerController) ? owner : null)) && ((PlayerController)(object)((owner is PlayerController) ? owner : null)).PlayerHasActiveModule(IteratedDesign.ID)) { return true; } return false; } public override void OnProjectileReflect(Projectile p, bool retargetReflectedBullet, GameActor newOwner, float minReflectedBulletSpeed, bool doPostProcessing = false, float scaleModifier = 1f, float baseDamage = 10f, float spread = 0f, string sfx = null) { //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_ITM_Crisis_Stone_Impact_01", ((Component)p).gameObject); p.RemoveBulletScriptControl(); if (Object.op_Implicit((Object)(object)p.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)p.Owner).specRigidbody)) { ((BraveBehaviour)p).specRigidbody.DeregisterSpecificCollisionException(((BraveBehaviour)p.Owner).specRigidbody); } bool flag = CheckModule(newOwner); p.Owner = newOwner; p.SetNewShooter(((BraveBehaviour)newOwner).specRigidbody); p.allowSelfShooting = false; if (newOwner is AIActor) { p.collidesWithPlayer = true; p.collidesWithEnemies = false; } else if (newOwner is PlayerController) { p.collidesWithPlayer = false; p.collidesWithEnemies = true; } SpawnManager.PoolManager.Remove(((BraveBehaviour)p).transform); float speed = p.baseData.speed; p.baseData.damage = 1.25f + p.baseData.speed * 0.3f; if (flag) { ProjectileData baseData = p.baseData; baseData.damage *= 1.2f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1.2f; } ProjectileData baseData3 = p.baseData; baseData3.speed *= 2f; p.UpdateSpeed(); if (newOwner is PlayerController) { PlayerController val = (PlayerController)(object)((newOwner is PlayerController) ? newOwner : null); if ((Object)(object)val != (Object)null) { ModularGunController component = ((Component)((GameActor)val).CurrentGun).GetComponent(); if ((Object)(object)component != (Object)null) { float num = Mathf.Max(0f, (float)(flag ? 75 : 90) - speed * 3f); p.Direction = Toolbox.GetUnitOnCircle(((GameActor)val).CurrentGun.CurrentAngle + Random.Range(component.GetAccuracy(num), component.GetAccuracy(num * -1f)), 1f); GameObject val2 = Object.Instantiate(component.isAlt ? ConvexLens.greenImpact.effects[0].effects[0].effect : LineUp.PierceImpact, Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter - new Vector2(1.5f, 0f)), Quaternion.identity); Object.Destroy((Object)(object)val2, 2f); } ProjectileData baseData4 = p.baseData; baseData4.damage *= val.stats.GetStatValue((StatType)5); ProjectileData baseData5 = p.baseData; baseData5.speed *= val.stats.GetStatValue((StatType)6); p.UpdateSpeed(); ProjectileData baseData6 = p.baseData; baseData6.force *= val.stats.GetStatValue((StatType)12); ProjectileData baseData7 = p.baseData; baseData7.range *= val.stats.GetStatValue((StatType)26); p.BossDamageMultiplier *= val.stats.GetStatValue((StatType)22); p.RuntimeUpdateScale(val.stats.GetStatValue((StatType)15)); val.DoPostProcessProjectile(p); } } if (newOwner is AIActor) { p.baseData.damage = 0.5f; p.baseData.SetAll(((BraveBehaviour)((newOwner is AIActor) ? newOwner : null)).bulletBank.GetBullet("default").ProjectileData); ((BraveBehaviour)p).specRigidbody.CollideWithTileMap = false; p.ResetDistance(); p.collidesWithEnemies = ((AIActor)((newOwner is AIActor) ? newOwner : null)).CanTargetEnemies; p.collidesWithPlayer = true; p.UpdateCollisionMask(); ((BraveBehaviour)p).sprite.color = new Color(1f, 0.1f, 0.1f); p.MakeLookLikeEnemyBullet(true); p.RemovePlayerOnlyModifiers(); if (((AIActor)((newOwner is AIActor) ? newOwner : null)).IsBlackPhantom) { p.baseData.damage = 1f; p.BecomeBlackBullet(); } } p.UpdateCollisionMask(); p.Reflected(); p.SendInDirection(p.Direction, true, true); } } public class SpeedUp : MonoBehaviour { private Projectile self; private float elapsed = -1f; public void Start() { self = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)self)) { self.IgnoreTileCollisionsFor(15f); } } public void Update() { if (Object.op_Implicit((Object)(object)self) && elapsed > 0f && elapsed < 1.5f) { self.UpdateSpeed(); ProjectileData baseData = self.baseData; baseData.speed += 15f * BraveTime.DeltaTime; } elapsed += BraveTime.DeltaTime; } } public static CustomSlashData customSlash; public static int ID; public static void Init() { //IL_00fe: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Expected O, but got Unknown //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Expected O, but got Unknown //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07b2: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07cf: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Expected O, but got Unknown //IL_0d94: Unknown result type (might be due to invalid IL or missing references) //IL_0da5: Unknown result type (might be due to invalid IL or missing references) //IL_0dad: Unknown result type (might be due to invalid IL or missing references) //IL_0db2: Unknown result type (might be due to invalid IL or missing references) //IL_0db8: Unknown result type (might be due to invalid IL or missing references) //IL_0dbf: Expected O, but got Unknown //IL_0dc2: Unknown result type (might be due to invalid IL or missing references) //IL_0dec: Unknown result type (might be due to invalid IL or missing references) //IL_0e16: Unknown result type (might be due to invalid IL or missing references) //IL_0e37: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Light Lance", "lightlance"); Game.Items.Rename("outdated_gun_mods:light_lance", "mdl:armcannon_9"); LightLance @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Slashes enemies, can be charged to do a deflecting attack with an energy projectile.\n\nA close-combat prototype weapon. In the hands of a machine with a fast enough camera, it can fulfill the dream of every person with a samurai sword."); val.SetupSprite(StaticCollections.Gun_Collection, "coollance_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "lightlance_idle"; val.shootAnimation = "lightlance_fire"; val.reloadAnimation = "lightlance_reload"; val.introAnimation = "lightlance_intro"; val.chargeAnimation = "lightlance_charge"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)3; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.5f; val.DefaultModule.cooldownTime = 0.5f; val.DefaultModule.numberOfShotsInClip = 12; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 0f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.baseData.damage = 0f; val2.baseData.speed = 1f; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.enabled = false; val2.baseData.range = 1f; val2.hitEffects.suppressMidairDeathVfx = true; ProjectileSlashingBehaviour val3 = ((Component)val2).gameObject.AddComponent(); val3.DestroyBaseAfterFirstSlash = true; val3.SlashDamageUsesBaseProjectileDamage = true; val3.slashParameters = ScriptableObject.CreateInstance(); ref VFXPool hitVFX = ref val3.slashParameters.hitVFX; PickupObject byId3 = PickupObjectDatabase.GetById(545); hitVFX = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.enemy; val3.slashParameters.projInteractMode = (ProjInteractMode)0; val3.slashParameters.playerKnockbackForce = 20f; val3.slashParameters.enemyKnockbackForce = 30f; val3.slashParameters.doVFX = true; val3.slashParameters.doHitVFX = true; val3.slashParameters.slashRange = 3.75f; val3.slashParameters.slashDegrees = 150f; val3.slashParameters.soundEvent = "Play_WPN_beam_slash_01"; val3.SlashDamageUsesBaseProjectileDamage = false; val3.initialDelay = 0.1f; val3.slashParameters.damage = 25f; val3.slashParameters.damagesBreakables = true; ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0f, AmmoCost = 1 }; PickupObject byId4 = PickupObjectDatabase.GetById(56); Projectile val4 = Object.Instantiate(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.AnimateProjectileBundle("swordslash", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "swordslash", new List { new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64), new IntVector2(20, 64) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 9), ProjectileToolbox.ConstructListOfSameValues(value: true, 9), ProjectileToolbox.ConstructListOfSameValues(value: false, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9), ProjectileToolbox.ConstructListOfSameValues(null, 9)); ref string objectImpactEventName = ref val4.objectImpactEventName; PickupObject byId5 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val4.enemyImpactEventName; PickupObject byId6 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].enemyImpactEventName; val4.hitEffects.alwaysUseMidair = true; ref GameObject overrideMidairDeathVFX = ref val4.hitEffects.overrideMidairDeathVFX; PickupObject byId7 = PickupObjectDatabase.GetById(545); overrideMidairDeathVFX = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; val4.AdditionalScaleMultiplier *= 0.75f; Material val5 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val5.mainTexture = ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material.mainTexture; val5.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val5.SetFloat("_EmissiveColorPower", 50f); val5.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)((BraveBehaviour)val4).sprite).renderer.material = val5; ((Component)val4).gameObject.AddComponent(); val4.baseData.damage = 16f; val4.baseData.speed = 1f; val4.shouldRotate = true; val4.baseData.range = 9f; val4.PenetratesInternalWalls = true; CustomProjectileSlashingBehaviour customProjectileSlashingBehaviour = ((Component)val4).gameObject.AddComponent(); customProjectileSlashingBehaviour.DestroyBaseAfterFirstSlash = true; customProjectileSlashingBehaviour.SlashDamageUsesBaseProjectileDamage = true; customProjectileSlashingBehaviour.DestroysOnlyComponentAfterFirstSlash = true; customProjectileSlashingBehaviour.SlashDamageUsesBaseProjectileDamage = false; customProjectileSlashingBehaviour.initialDelay = 0.05f; SpecialLaserSlash specialLaserSlash = ScriptableObject.CreateInstance(); specialLaserSlash.projInteractMode = CustomSlashDoer.ProjInteractMode.REFLECTANDPOSTPROCESS; specialLaserSlash.playerKnockbackForce = 20f; specialLaserSlash.enemyKnockbackForce = 70f; specialLaserSlash.doVFX = false; specialLaserSlash.doHitVFX = true; specialLaserSlash.slashRange = 4.25f; specialLaserSlash.slashDegrees = 120f; specialLaserSlash.soundEvent = "Play_WPN_beam_slash_01"; specialLaserSlash.damage = 45f; specialLaserSlash.damagesBreakables = true; ref VFXPool hitVFX2 = ref specialLaserSlash.hitVFX; PickupObject byId8 = PickupObjectDatabase.GetById(345); hitVFX2 = ((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.enemy; customSlash = specialLaserSlash; customProjectileSlashingBehaviour.slashParameters = customSlash; ImprovedAfterImage improvedAfterImage = ((Component)val4).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.1f; improvedAfterImage.dashColor = new Color(0f, 0.7f, 0.7f, 0.666f); val.gunClass = (GunClass)0; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val4).gameObject); orAddComponent.penetration += 3; val4.pierceMinorBreakables = true; ChargeProjectile item2 = new ChargeProjectile { Projectile = val4, OverrideShootAnimation = "lightlance_altfire", ChargeTime = 1f, AmmoCost = 2, UsedProperties = (ChargeProjectileProperties)1040, AdditionalWwiseEvent = "Play_BOSS_agunim_orb_01" }; val.DefaultModule.chargeProjectiles = new List { item, item2 }; tk2dSpriteAnimationClip clipByName = ((BraveBehaviour)val).spriteAnimator.GetClipByName("lightlance_fire"); float[] array = new float[15] { 0f, 0f, 0f, 0f, 0f, 0f, 0f, -0.75f, -0.75f, -1f, -0.5f, -0.25f, 0f, 0f, 0f }; float[] array2 = new float[15] { 0f, 0.125f, 0.25f, 0.375f, -0.75f, -0.75f, -0.75f, -0.6875f, -0.6875f, -0.5625f, -0.5625f, -0.4375f, -0.375f, -0.25f, -0.125f }; for (int i = 0; i < array.Length && i < array2.Length && i < clipByName.frames.Length; i++) { int spriteId = clipByName.frames[i].spriteId; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position0.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position0.y += array2[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position1.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position1.y += array2[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position2.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position2.y += array2[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position3.x += array[i]; clipByName.frames[i].spriteCollection.spriteDefinitions[spriteId].position3.y += array2[i]; } tk2dSpriteAnimationClip clipByName2 = ((BraveBehaviour)val).spriteAnimator.GetClipByName("lightlance_charge"); array = new float[7]; array2 = new float[7] { 0f, 0f, 0.125f, 0.25f, 0.25f, 0.375f, 0.5f }; for (int j = 0; j < array.Length && j < array2.Length && j < clipByName2.frames.Length; j++) { int spriteId2 = clipByName2.frames[j].spriteId; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position0.x += array[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position0.y += array2[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position1.x += array[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position1.y += array2[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position2.x += array[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position2.y += array2[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position3.x += array[j]; clipByName2.frames[j].spriteCollection.spriteDefinitions[spriteId2].position3.y += array2[j]; } tk2dSpriteAnimationClip clipByName3 = ((BraveBehaviour)val).spriteAnimator.GetClipByName("lightlance_reload"); array = new float[7]; array2 = new float[8] { 0f, -0.25f, -0.5f, -0.5f, -0.25f, 0f, 0.5f, 0.25f }; for (int k = 0; k < array.Length && k < array2.Length && k < clipByName3.frames.Length; k++) { int spriteId3 = clipByName3.frames[k].spriteId; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position0.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position0.y += array2[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position1.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position1.y += array2[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position2.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position2.y += array2[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position3.x += array[k]; clipByName3.frames[k].spriteCollection.spriteDefinitions[spriteId3].position3.y += array2[k]; } ref string gunSwitchGroup2 = ref val.gunSwitchGroup; PickupObject byId9 = PickupObjectDatabase.GetById(125); gunSwitchGroup2 = ((Gun)((byId9 is Gun) ? byId9 : null)).gunSwitchGroup; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); VFXPool val6 = new VFXPool(); val6.type = (VFXPoolType)0; val6.effects = (VFXComplex[])(object)new VFXComplex[0]; val.muzzleFlashEffects = val6; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, -0f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("lancebeam_", StaticCollections.Clip_Ammo_Atlas, "lancebeam_1", "lancebeam_2", (AmmoType)14); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 4); } } public class TheHammerAlt : MultiActiveReloadController { public static GameObject StrikeVFX; public static int ID; public static void Init() { //IL_00f3: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Expected O, but got Unknown //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0735: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Expected O, but got Unknown //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_0783: Expected O, but got Unknown //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08ce: Expected O, but got Unknown //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Unknown result type (might be due to invalid IL or missing references) //IL_08e7: Expected O, but got Unknown //IL_08f1: Unknown result type (might be due to invalid IL or missing references) //IL_08f6: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Expected O, but got Unknown Gun val = Databases.Items.NewGun("The Hammer", "thehammeralt"); Game.Items.Rename("outdated_gun_mods:the_hammer", "mdl:armcannon_7_alt"); TheHammerAlt theHammerAlt = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires high power energy. Hitting the active reload timing instantly reloads the clip. Compatible with Modular Upgrade Software.\n\nBuilt off of a mechanism that would lightly hammer in nails for hanging up things, but taken to the logical extreme."); val.SetupSprite(StaticCollections.Gun_Collection, "hammershotalt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "hammershotalt_idle"; val.shootAnimation = "hammershotalt_fire"; val.reloadAnimation = "hammershotalt_reload"; val.introAnimation = "hammershotalt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)0; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(383); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3.33f; val.DefaultModule.cooldownTime = 0.5f; val.DefaultModule.numberOfShotsInClip = 1; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 0f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("hammershotalt_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "hammershotalt_idle", new List { new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 5), ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues(value: false, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(81); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(81); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; val2.pierceMinorBreakables = true; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(81); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(81); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(81); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(81); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.damage = 10f; val2.baseData.speed = 50f; val2.shouldRotate = true; GameObject val4 = ETGMod.AddChild(((Component)val2).gameObject, "trail object", new Type[0]); val4.transform.position = Vector2.op_Implicit(((BraveBehaviour)val2).sprite.WorldCenter); val4.transform.localPosition = Vector2.op_Implicit(((BraveBehaviour)val2).sprite.WorldCenter); TrailRenderer val5 = val4.AddComponent(); ((Renderer)val5).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val5).receiveShadows = false; Material material = new Material(Shader.Find("Sprites/Default")); ((Renderer)val5).material = material; val5.minVertexDistance = 0.01f; val5.numCapVertices = 20; Color val6 = default(Color); ((Color)(ref val6))..ctor(0f, 500f, 0f, 500f); val3.SetColor("_Color", val6 * 0.7f); val5.startColor = val6; val5.endColor = val6 * 0.7f; val5.time = 0.3f; val5.startWidth = 0.75f; val5.endWidth = 0f; val5.autodestruct = false; ProjectileTrailRendererController val7 = ((Component)val2).gameObject.AddComponent(); val7.trailRenderer = val5; val7.desiredLength = 4f; ((Component)val2).gameObject.AddComponent(); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(390); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ThehammerOfTheFunnyAlt", StaticCollections.Clip_Ammo_Atlas, "hammeralt_1", "hammeralt_2", (AmmoType)14); ExplosiveModifier val8 = ((Component)val2).gameObject.AddComponent(); val8.explosionData = TheHammer.HammerData; val8.doExplosion = true; val8.IgnoreQueues = true; val.activeReloadData = new ActiveReloadData { reloadSpeedMultiplier = 1.05f, damageMultiply = 1.025f, ActiveReloadIncrementsTier = true, ActiveReloadStacks = true, MaxTier = 50 }; val.m_canAttemptActiveReload = true; val.LocalActiveReload = true; theHammerAlt.activeReloadEnabled = true; theHammerAlt.canAttemptActiveReload = true; GameObject val9 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val9); FakePrefab.MarkAsFakePrefab(val9); val9.SetActive(false); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("hammerstrike_006")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("HammerStrikeAnimation").GetComponent(); val11.defaultClipId = val11.GetClipIdByName("hammerstrikealt"); val11.playAutomatically = true; SpriteAnimatorKiller val12 = ((Component)val11).gameObject.AddComponent(); val12.animator = val11; val12.fadeTime = 0.6f; ((tk2dBaseSprite)val10).usesOverrideMaterial = true; ((BraveBehaviour)val10).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val10).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val10).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val10).renderer.material.SetFloat("_EmissiveColorPower", 10f); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val11, "hammerstrikealt", new Dictionary { { 5, "Play_OBJ_spears_clank_01" } }); StrikeVFX = val9; VFXPool val13 = new VFXPool(); val13.type = (VFXPoolType)4; VFXComplex[] array = new VFXComplex[1]; VFXComplex val14 = new VFXComplex(); val14.effects = (VFXObject[])(object)new VFXObject[1] { new VFXObject { effect = StrikeVFX } }; array[0] = val14; val13.effects = (VFXComplex[])(object)array; val.activeReloadSuccessEffects = val13; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificReload = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificReload, new Func(theHammerAlt.ProcessReloadSpecial)); IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(theHammerAlt.Process)); } public void Process(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.damage += (float)(5 * stack); p.StunApplyChance = 0.2f; p.AppliesStun = true; } } public float ProcessReloadSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 5); } public override void OnReloadEndedSafe(PlayerController player, Gun gun) { base.OnReloadEndedSafe(player, gun); } public override void OnActiveReloadSuccess(MultiActiveReload reload) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) base.OnActiveReloadSuccess(reload); GameObject val = gun.CurrentOwner.PlayEffectOnActor(TheHammer.StrikeVFX, new Vector3(0f, 1.25f), true, false, false); val.GetComponent().PlayAndDestroyObject("hammerstrikealt", (Action)null); } public override void OnActiveReloadFailure(MultiActiveReload reload) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) base.OnActiveReloadFailure(reload); AkSoundEngine.PostEvent("Play_DragunGrenade", ((Component)gun).gameObject); GameActor currentOwner = gun.CurrentOwner; if (Object.op_Implicit((Object)(object)((currentOwner is PlayerController) ? currentOwner : null))) { GameActor currentOwner2 = gun.CurrentOwner; if (((PlayerController)(object)((currentOwner2 is PlayerController) ? currentOwner2 : null)).PlayerHasActiveModule(IteratedDesign.ID)) { ExplosionData val = StaticExplosionDatas.CopyFields(TheHammer.HammerData); val.damage = 70f; val.damageRadius = 4f; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)gun).sprite.WorldCenter), val, ((BraveBehaviour)gun).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); } } else { Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)gun).sprite.WorldCenter), TheHammer.HammerData, ((BraveBehaviour)gun).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); } } } public class TheHammer : MultiActiveReloadController { public static ExplosionData HammerData; public static GameObject StrikeVFX; public static int ID; public static void Init() { //IL_00f3: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_0707: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Expected O, but got Unknown //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_077d: Expected O, but got Unknown //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Expected O, but got Unknown //IL_08cb: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e1: Expected O, but got Unknown //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Expected O, but got Unknown //IL_0910: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Expected O, but got Unknown //IL_0a36: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Expected O, but got Unknown Gun val = Databases.Items.NewGun("The Hammer", "thehammer"); Game.Items.Rename("outdated_gun_mods:the_hammer", "mdl:armcannon_7"); TheHammer theHammer = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires high power energy. Hitting the active reload timing instantly reloads the clip. Compatible with Modular Upgrade Software.\n\nBuilt off of a mechanism that would lightly hammer in nails for hanging up things, but taken to the logical extreme."); val.SetupSprite(StaticCollections.Gun_Collection, "hammershot_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "hammershot_idle"; val.shootAnimation = "hammershot_fire"; val.reloadAnimation = "hammershot_reload"; val.introAnimation = "hammershot_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)0; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(383); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3.33f; val.DefaultModule.cooldownTime = 0.5f; val.DefaultModule.numberOfShotsInClip = 1; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 0f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.AnimateProjectileBundle("hammershot_idle", StaticCollections.Projectile_Collection, StaticCollections.Projectile_Animation, "hammershot_idle", new List { new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10), new IntVector2(16, 10) }, ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues((Anchor)4, 5), ProjectileToolbox.ConstructListOfSameValues(value: true, 5), ProjectileToolbox.ConstructListOfSameValues(value: false, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5), ProjectileToolbox.ConstructListOfSameValues(null, 5)); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(81); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(81); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(81); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(81); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(81); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(81); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.damage = 10f; val2.baseData.speed = 50f; val2.pierceMinorBreakables = true; val2.shouldRotate = true; GameObject val4 = ETGMod.AddChild(((Component)val2).gameObject, "trail object", new Type[0]); val4.transform.position = Vector2.op_Implicit(((BraveBehaviour)val2).sprite.WorldCenter); val4.transform.localPosition = Vector2.op_Implicit(((BraveBehaviour)val2).sprite.WorldCenter); TrailRenderer val5 = val4.AddComponent(); ((Renderer)val5).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val5).receiveShadows = false; Material material = new Material(Shader.Find("Sprites/Default")); ((Renderer)val5).material = material; val5.minVertexDistance = 0.01f; val5.numCapVertices = 20; Color val6 = default(Color); ((Color)(ref val6))..ctor(0f, 500f, 500f, 500f); val3.SetColor("_Color", val6 * 0.7f); val5.startColor = val6; val5.endColor = val6 * 0.7f; val5.time = 0.3f; val5.startWidth = 0.75f; val5.endWidth = 0f; val5.autodestruct = false; ProjectileTrailRendererController val7 = ((Component)val2).gameObject.AddComponent(); val7.trailRenderer = val5; val7.desiredLength = 4f; ((Component)val2).gameObject.AddComponent(); val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(390); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ThehammerOfTheFunny", StaticCollections.Clip_Ammo_Atlas, "hammer_1", "hammer_2", (AmmoType)14); val.activeReloadData = new ActiveReloadData { reloadSpeedMultiplier = 1.05f, damageMultiply = 1.025f, ActiveReloadIncrementsTier = true, ActiveReloadStacks = true, MaxTier = 50 }; val.m_canAttemptActiveReload = true; val.LocalActiveReload = true; theHammer.activeReloadEnabled = true; theHammer.canAttemptActiveReload = true; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; GameObject val8 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val8); FakePrefab.MarkAsFakePrefab(val8); val8.SetActive(false); tk2dSprite val9 = val8.AddComponent(); ((tk2dBaseSprite)val9).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val9).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("hammerstrike_006")); tk2dSpriteAnimator val10 = val8.AddComponent(); val10.Library = Module.ModularAssetBundle.LoadAsset("HammerStrikeAnimation").GetComponent(); val10.defaultClipId = val10.GetClipIdByName("hammerstrike"); val10.playAutomatically = true; SpriteAnimatorKiller val11 = ((Component)val10).gameObject.AddComponent(); val11.animator = val10; val11.fadeTime = 0.6f; ((tk2dBaseSprite)val9).usesOverrideMaterial = true; ((BraveBehaviour)val9).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val9).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val9).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val9).renderer.material.SetFloat("_EmissiveColorPower", 10f); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val10, "hammerstrike", new Dictionary { { 5, "Play_OBJ_spears_clank_01" } }); StrikeVFX = val8; VFXPool val12 = new VFXPool(); val12.type = (VFXPoolType)4; VFXComplex[] array = new VFXComplex[1]; VFXComplex val13 = new VFXComplex(); val13.effects = (VFXObject[])(object)new VFXObject[1] { new VFXObject { effect = StrikeVFX } }; array[0] = val13; val12.effects = (VFXComplex[])(object)array; val.activeReloadSuccessEffects = val12; ExplosionData val14 = new ExplosionData(); val14.breakSecretWalls = true; val14.comprehensiveDelay = 0f; val14.damage = 20f; val14.damageRadius = 3f; val14.damageToPlayer = 0f; val14.debrisForce = 100f; val14.doDamage = true; val14.doDestroyProjectiles = true; val14.doExplosionRing = true; val14.doForce = true; val14.doScreenShake = true; val14.doStickyFriction = false; ref GameObject effect = ref val14.effect; PickupObject byId10 = PickupObjectDatabase.GetById(328); effect = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.overrideMidairDeathVFX; val14.explosionDelay = 0f; val14.force = 50f; val14.forcePreventSecretWallDamage = false; val14.forceUseThisRadius = true; val14.freezeEffect = null; val14.freezeRadius = 0f; val14.IsChandelierExplosion = false; val14.isFreezeExplosion = false; val14.playDefaultSFX = false; val14.preventPlayerForce = true; val14.pushRadius = 1f; val14.secretWallsRadius = 1f; val14.ss = new ScreenShakeSettings(); val14.ignoreList = new List(); val14.rotateEffectToNormal = false; val14.useDefaultExplosion = false; val14.usesComprehensiveDelay = false; val14.overrideRangeIndicatorEffect = null; HammerData = val14; ExplosiveModifier val15 = ((Component)val2).gameObject.AddComponent(); val15.explosionData = HammerData; val15.doExplosion = true; val15.IgnoreQueues = true; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(theHammer.Process)); IteratedDesign.SpecialProcessGunSpecificReload = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificReload, new Func(theHammer.ProcessReloadSpecial)); } public float ProcessReloadSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 5); } public void Process(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.damage += (float)(5 * stack); p.StunApplyChance = 0.2f; p.AppliesStun = true; } } public override void OnReloadEndedSafe(PlayerController player, Gun gun) { base.OnReloadEndedSafe(player, gun); } public override void OnActiveReloadSuccess(MultiActiveReload reload) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = gun.CurrentOwner.PlayEffectOnActor(StrikeVFX, new Vector3(0f, 1.25f), true, false, false); val.GetComponent().PlayAndDestroyObject("hammerstrike", (Action)null); base.OnActiveReloadSuccess(reload); } public override void OnActiveReloadFailure(MultiActiveReload reload) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) base.OnActiveReloadFailure(reload); AkSoundEngine.PostEvent("Play_DragunGrenade", ((Component)gun).gameObject); GameActor currentOwner = gun.CurrentOwner; if (Object.op_Implicit((Object)(object)((currentOwner is PlayerController) ? currentOwner : null))) { GameActor currentOwner2 = gun.CurrentOwner; if (((PlayerController)(object)((currentOwner2 is PlayerController) ? currentOwner2 : null)).PlayerHasActiveModule(IteratedDesign.ID)) { ExplosionData val = StaticExplosionDatas.CopyFields(HammerData); val.damage = 70f; val.damageRadius = 4f; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)gun).sprite.WorldCenter), val, ((BraveBehaviour)gun).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); } } else { Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)gun).sprite.WorldCenter), HammerData, ((BraveBehaviour)gun).sprite.WorldCenter, (Action)null, false, (CoreDamageTypes)0, false); } } } public class SuppressorAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_00f3: 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Expected O, but got Unknown //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("The Suppressor", "suppressoralt"); Game.Items.Rename("outdated_gun_mods:the_suppressor", "mdl:armcannon_6_alt"); SuppressorAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires small energy balls at an increasing rate. Compatible with Modular Upgrade Software.\n\nThe fast rotation was repurposed from a fan. No-one really knows why they made an arm for the Modular that was a fan."); val.SetupSprite(StaticCollections.Gun_Collection, "minigunalt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "brrrminigunalt_idle"; val.shootAnimation = "brrrminigunalt_fire"; val.reloadAnimation = "brrrminigunalt_reload"; val.introAnimation = "brrrminigunalt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(59); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.4f; val.DefaultModule.cooldownTime = 0.8f; val.DefaultModule.numberOfShotsInClip = 100; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 4.5f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val.GainsRateOfFireAsContinueAttack = true; val.RateOfFireMultiplierAdditionPerSecond = 1.033f; val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(151); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(151); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(151); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(151); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ProjectileData baseData = val2.baseData; baseData.speed *= 1.5f; val2.baseData.damage = 3.75f; ProjectileData baseData2 = val2.baseData; baseData2.force *= 0.6f; val2.shouldRotate = true; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(2, 0); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(89); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.875f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.875f, 0.25f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("SUPRESS_AND_DESTROYALT", StaticCollections.Clip_Ammo_Atlas, "supressoralt_1", "supressoralt_2", (AmmoType)14); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificClip = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClip, new Func(@object.ProcessClipSpecial)); IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f / (float)(1 + stack / 5); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f + f / 2 * stack; } } public class Suppressor : GunBehaviour { public static int GunID; public static void Init() { //IL_00f3: 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Expected O, but got Unknown //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("The Suppressor", "suppressor"); Game.Items.Rename("outdated_gun_mods:the_suppressor", "mdl:armcannon_6"); Suppressor @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires small energy balls at an increasing rate. Compatible with Modular Upgrade Software.\n\nThe fast rotation was repurposed from a fan. No-one really knows why they made an arm for the Modular that was a fan."); val.SetupSprite(StaticCollections.Gun_Collection, "minigun_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "brrrminigun_idle"; val.shootAnimation = "brrrminigun_fire"; val.reloadAnimation = "brrrminigun_reload"; val.introAnimation = "brrrminigun_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(59); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.4f; val.DefaultModule.cooldownTime = 0.8f; val.DefaultModule.numberOfShotsInClip = 100; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 4.5f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val.GainsRateOfFireAsContinueAttack = true; val.RateOfFireMultiplierAdditionPerSecond = 1.033f; val2.SetProjectileCollisionRight("defaultarmcannon_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ProjectileData baseData = val2.baseData; baseData.speed *= 1.5f; val2.baseData.damage = 3.75f; ProjectileData baseData2 = val2.baseData; baseData2.force *= 0.6f; val2.shouldRotate = true; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("SUPRESS_AND_DESTROY", StaticCollections.Clip_Ammo_Atlas, "supressor_1", "supressor_2", (AmmoType)14); val.carryPixelOffset = new IntVector2(2, 0); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(59); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.375f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.375f, 0.25f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificClip = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClip, new Func(@object.ProcessClipSpecial)); IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f + f / 2 * stack; } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != GunID) { return f; } return f / (float)(1 + stack / 5); } } public class PresicionRifleAlt : GunBehaviour { public static int ID; public static void Init() { //IL_00f3: 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_016c: 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_03b8: Expected O, but got Unknown //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Precision Rifle", "bigsnipealt"); Game.Items.Rename("outdated_gun_mods:precision_rifle", "mdl:armcannon_5_alt"); PresicionRifleAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires high velocity piercing shots. Compatible with Modular Upgrade Software.\n\nA reconstructed nailgun. Though, realistically, it would have been recalled very fast if made available to the general public."); val.SetupSprite(StaticCollections.Gun_Collection, "bigsnipealt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "bigsnipealt_idle"; val.shootAnimation = "bigsnipealt_fire"; val.reloadAnimation = "bigsnipealt_reload"; val.introAnimation = "bigsnipealt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)0; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(156); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3f; val.DefaultModule.cooldownTime = 1.333f; val.DefaultModule.numberOfShotsInClip = 4; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 1f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(169); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(169); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(444); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(444); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(444); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(444); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.pierceMinorBreakables = true; val2.baseData.damage = 28f; val2.shouldRotate = true; val2.baseData.speed = 80f; ProjectileData baseData = val2.baseData; baseData.range *= 10f; ProjectileData baseData2 = val2.baseData; baseData2.force *= 2.5f; ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0f, 1f, 0.1f, 1f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 3; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("RIFLERIFLERIFLEALT", StaticCollections.Clip_Ammo_Atlas, "riflealt_1", "riflealt_2", (AmmoType)14); val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(328); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.4375f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.4375f, 0.25f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecificAccuracy = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificAccuracy, new Func(@object.ProcessAccuracySpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.speed *= 1f + 0.5f * (float)stack; p.Update(); ProjectileData baseData2 = p.baseData; baseData2.range *= 2f; } } public float ProcessAccuracySpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 3); } } public class PresicionRifle : GunBehaviour { public static int ID; public static void Init() { //IL_00f3: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Expected O, but got Unknown //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Precision Rifle", "bigsnipe"); Game.Items.Rename("outdated_gun_mods:precision_rifle", "mdl:armcannon_5"); PresicionRifle @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires high velocity piercing shots. Compatible with Modular Upgrade Software.\n\nA reconstructed nailgun. Though, realistically, it would have been recalled very fast if made available to the general public."); val.SetupSprite(StaticCollections.Gun_Collection, "bigsnipe_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "bigsnipe_idle"; val.shootAnimation = "bigsnipe_fire"; val.reloadAnimation = "bigsnipe_reload"; val.introAnimation = "bigsnipe_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)0; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(156); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3f; val.DefaultModule.cooldownTime = 1.333f; val.DefaultModule.numberOfShotsInClip = 4; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 1f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannon_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(169); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(169); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val2.pierceMinorBreakables = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.damage = 28f; val2.shouldRotate = true; val2.baseData.speed = 80f; ProjectileData baseData = val2.baseData; baseData.range *= 10f; ProjectileData baseData2 = val2.baseData; baseData2.force *= 2.5f; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("RIFLERIFLERIFLE", StaticCollections.Clip_Ammo_Atlas, "rifle_1", "rifle_2", (AmmoType)14); ImprovedAfterImage improvedAfterImage = ((Component)val2).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0f, 1f, 1f, 1f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = 3; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(153); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.4375f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.4375f, 0.25f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecificAccuracy = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificAccuracy, new Func(@object.ProcessAccuracySpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.speed *= 1f + 0.5f * (float)stack; p.Update(); ProjectileData baseData2 = p.baseData; baseData2.range *= 2f; } } public float ProcessAccuracySpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 3); } } public class AutoBurstAlt : GunBehaviour { public static int ID; public static void Init() { //IL_00f3: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Auto-Burster", "bursteralt"); Game.Items.Rename("outdated_gun_mods:autoburster", "mdl:armcannon_3_alt"); AutoBurstAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires energy balls in an automatic burst. Compatible with Modular Upgrade Software.\n\nOne of the first to be designed purely for combat, instead of being a repurposed tool."); val.SetupSprite(StaticCollections.Gun_Collection, "shotbursteralt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "shotbursteralt_idle"; val.shootAnimation = "shotbursteralt_fire"; val.reloadAnimation = "shotbursteralt_reload"; val.introAnimation = "shotbursteralt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)4; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.burstShotCount = 16; val.DefaultModule.burstCooldownTime = 0.1f; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(89); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3f; val.DefaultModule.cooldownTime = 0.833f; val.DefaultModule.numberOfShotsInClip = 16; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 5f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref ProjectileImpactVFXPool hitEffects = ref val2.hitEffects; PickupObject byId5 = PickupObjectDatabase.GetById(89); hitEffects = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects; val2.shouldRotate = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ProjectileData baseData = val2.baseData; baseData.speed *= 1.33f; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("burstingmakesmefeelgoodalt", StaticCollections.Clip_Ammo_Atlas, "bursteralt_1", "bursteralt_2", (AmmoType)14); val2.baseData.damage = 6f; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId6 = PickupObjectDatabase.GetById(89); muzzleFlashEffects = ((Gun)((byId6 is Gun) ? byId6 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "barrel_point").transform; ID = Databases.Items.Add((PickupObject)(object)val, false, "ANY"); IteratedDesign.SpecialProcessGunSpecificClip = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClip, new Func(@object.ProcessClipSpecial)); IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.force *= (float)(1 + stack); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += 2; } } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f + f / 2 * stack; } public void Start() { ModularGunController component = ((Component)base.gun).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.statMods.Add(new ModuleGunStatModifier { BurstAmount_Process = ProcessClipSize }); } } public int ProcessClipSize(int currentFinales, int clipSize, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clipSize; } } public class AutoBurst : GunBehaviour { public static int ID; public static void Init() { //IL_00f3: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Expected O, but got Unknown //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Auto-Burster", "burster"); Game.Items.Rename("outdated_gun_mods:autoburster", "mdl:armcannon_3"); AutoBurst @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires energy balls in an automatic burst. Compatible with Modular Upgrade Software.\n\nOne of the first to be designed purely for combat, instead of being a repurposed tool."); val.SetupSprite(StaticCollections.Gun_Collection, "shotburster_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "shotburster_idle"; val.shootAnimation = "shotburster_fire"; val.reloadAnimation = "shotburster_reload"; val.introAnimation = "shotburster_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)4; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.burstShotCount = 16; val.DefaultModule.burstCooldownTime = 0.1f; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(89); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 3f; val.DefaultModule.cooldownTime = 0.833f; val.DefaultModule.numberOfShotsInClip = 16; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 5f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannon_projectile_burst_001", StaticCollections.Projectile_Collection, 11, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(13); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(13); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(13); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(13); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); val2.shouldRotate = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ProjectileData baseData = val2.baseData; baseData.speed *= 1.33f; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("burstingmakesmefeelgood", StaticCollections.Clip_Ammo_Atlas, "burster_1", "burster_2", (AmmoType)14); val2.baseData.damage = 6f; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(13); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "barrel_point").transform; ID = Databases.Items.Add((PickupObject)(object)val, false, "ANY"); IteratedDesign.SpecialProcessGunSpecificClip = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificClip, new Func(@object.ProcessClipSpecial)); IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.force *= (float)(1 + stack); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += 2; } } public int ProcessClipSpecial(int f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f + f / 2 * stack; } public void Start() { ModularGunController component = ((Component)base.gun).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.statMods.Add(new ModuleGunStatModifier { BurstAmount_Process = ProcessClipSize }); } } public int ProcessClipSize(int currentFinales, int clipSize, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clipSize; } } public class ScatterBlastAlt : GunBehaviour { public static int ID; public static void Init() { //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Expected O, but got Unknown //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Scatter Blast", "scattercannonalt"); Game.Items.Rename("outdated_gun_mods:scatter_blast", "mdl:armcannon_2_alt"); ScatterBlastAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires an energy spread. Compatible with Modular Upgrade Software.\n\nA very unusual modification of a paint gun. *Very* unusual."); val.SetupSprite(StaticCollections.Gun_Collection, "scattercannonalt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "scattercannonalt_idle"; val.shootAnimation = "scattercannonalt_fire"; val.reloadAnimation = "scattercannonalt_reload"; val.introAnimation = "scattercannonalt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; for (int i = 0; i < 7; i++) { PickupObject byId = PickupObjectDatabase.GetById(88); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, true); } ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(123); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.25f; val.SetBaseMaxAmmo(250); val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); int num = 0; val.Volley.UsesShotgunStyleVelocityRandomizer = true; val.Volley.DecreaseFinalSpeedPercentMin = 0.7f; val.Volley.IncreaseFinalSpeedPercentMax = 1.2f; foreach (ProjectileModule projectile in val.Volley.projectiles) { num++; projectile.ammoCost = 1; projectile.shootStyle = (ShootStyle)0; projectile.sequenceStyle = (ProjectileSequenceStyle)0; projectile.cooldownTime = 1f; projectile.angleVariance = 28f; projectile.numberOfShotsInClip = 8; Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); projectile.projectiles[0] = val2; if (num == 1 || num == 2) { val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_medium_001", StaticCollections.Projectile_Collection, 6, 6, lightened: false, (Anchor)4); val2.baseData.range = 15f; val2.baseData.damage = 7.5f; val2.pierceMinorBreakables = true; } else { val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)4); val2.baseData.range = 10f; val2.baseData.damage = 3f; } ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; int num2 = 207; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(num2); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(num2); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(num2); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(num2); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.shouldRotate = false; if (projectile != val.DefaultModule) { projectile.ammoCost = 0; } } val.Volley.UsesShotgunStyleVelocityRandomizer = true; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = "ArmCannonAlt"; val.gunClass = (GunClass)5; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("SHOTGUNSAASASAalt", StaticCollections.Clip_Ammo_Atlas, "shotgunpelletalt_1", "shotgunpelletalt_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(6, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(207); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.375f, 0.1875f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.375f, 0.1875f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecificAccuracy = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificAccuracy, new Func(@object.ProcessAccuracySpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.force *= (float)(1 + stack); ProjectileData baseData2 = p.baseData; baseData2.range *= (float)(1 + stack); } } public float ProcessAccuracySpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 4); } } public class ScatterBlast : GunBehaviour { public static int ID; public static void Init() { //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Expected O, but got Unknown //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Scatter Blast", "scattercannon"); Game.Items.Rename("outdated_gun_mods:scatter_blast", "mdl:armcannon_2"); ScatterBlast @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires an energy spread. Compatible with Modular Upgrade Software.\n\nA very unusual modification of a paint gun. *Very* unusual."); val.SetupSprite(StaticCollections.Gun_Collection, "scattercannon_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "scattercannon_idle"; val.shootAnimation = "scattercannon_fire"; val.reloadAnimation = "scattercannon_reload"; val.introAnimation = "scattercannon_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; for (int i = 0; i < 7; i++) { PickupObject byId = PickupObjectDatabase.GetById(88); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, true); } ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(123); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2.25f; val.SetBaseMaxAmmo(250); val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); int num = 0; val.Volley.UsesShotgunStyleVelocityRandomizer = true; val.Volley.DecreaseFinalSpeedPercentMin = 0.7f; val.Volley.IncreaseFinalSpeedPercentMax = 1.2f; foreach (ProjectileModule projectile in val.Volley.projectiles) { num++; projectile.ammoCost = 1; projectile.shootStyle = (ShootStyle)0; projectile.sequenceStyle = (ProjectileSequenceStyle)0; projectile.cooldownTime = 1f; projectile.angleVariance = 28f; projectile.numberOfShotsInClip = 8; Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); projectile.projectiles[0] = val2; if (num == 1 || num == 2) { val2.SetProjectileCollisionRight("defaultarmcannon_projectile_medium_001", StaticCollections.Projectile_Collection, 6, 6, lightened: false, (Anchor)4); val2.baseData.range = 15f; val2.baseData.damage = 7.5f; val2.pierceMinorBreakables = true; } else { val2.SetProjectileCollisionRight("defaultarmcannon_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)4); val2.baseData.range = 10f; val2.baseData.damage = 3f; } ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.shouldRotate = false; if (projectile != val.DefaultModule) { projectile.ammoCost = 0; } } val.Volley.UsesShotgunStyleVelocityRandomizer = true; val.gunClass = (GunClass)5; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("SHOTGUNSAASASA", StaticCollections.Clip_Ammo_Atlas, "shotgunpellet_1", "shotgunpellet_2", (AmmoType)14); val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(223); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.375f, 0.1875f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.375f, 0.1875f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecificAccuracy = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificAccuracy, new Func(@object.ProcessAccuracySpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { ProjectileData baseData = p.baseData; baseData.force *= (float)(1 + stack); ProjectileData baseData2 = p.baseData; baseData2.range *= (float)(1 + stack); } } public float ProcessAccuracySpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 4); } } public class ModularPeaShooterAlt : GunBehaviour { public static int GunID; public static void Init() { //IL_00fa: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Modular Pea Shooter", "modulepeashooteralt"); Game.Items.Rename("outdated_gun_mods:modular_pea_shooter", "mdl:armcannon_1_alt"); ModularPeaShooterAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires small energy balls. Compatible with Modular Upgrade Software.\n\nIts smaller demeanor allows for the user to reroute more power into upgrades from the gun."); val.SetupSprite(StaticCollections.Gun_Collection, "modulepeashooteralt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "modulepeashooteralt_idle"; val.shootAnimation = "modulepeashooteralt_fire"; val.reloadAnimation = "modulepeashooteralt_reload"; val.introAnimation = "modulepeashooteralt_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; modularGunController.AdditionalPowerSupply = 1; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 1.2f; val.DefaultModule.cooldownTime = 0.3f; val.DefaultModule.numberOfShotsInClip = 10; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 2f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("PeaShooterAlt_Modular", StaticCollections.Clip_Ammo_Atlas, "peashooteralt_1", "peashooteralt_2", (AmmoType)14); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(207); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(207); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(207); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(207); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ProjectileData baseData = val2.baseData; baseData.speed *= 1.5f; val2.baseData.damage = 4f; val2.shouldRotate = false; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(207); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == GunID) { ProjectileData baseData = p.baseData; baseData.damage += 0.75f * (float)stack; ProjectileData baseData2 = p.baseData; baseData2.force *= (float)(1 + stack); p.damageTypes = (CoreDamageTypes)64; } } } public class ModularPeaShooter : GunBehaviour { public static int GunID; public static void Init() { //IL_00fa: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Expected O, but got Unknown //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_0503: 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) Gun val = Databases.Items.NewGun("Modular Pea Shooter", "modulepeashooter"); Game.Items.Rename("outdated_gun_mods:modular_pea_shooter", "mdl:armcannon_1"); ModularPeaShooter @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires small energy balls. Compatible with Modular Upgrade Software.\n\nIts smaller demeanor allows for the user to reroute more power into upgrades from the gun."); val.SetupSprite(StaticCollections.Gun_Collection, "modulepeashooter_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "modulepeashooter_idle"; val.shootAnimation = "modulepeashooter_fire"; val.reloadAnimation = "modulepeashooter_reload"; val.introAnimation = "modulepeashooter_intro"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; modularGunController.AdditionalPowerSupply = 1; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 1.2f; val.DefaultModule.cooldownTime = 0.3f; val.DefaultModule.numberOfShotsInClip = 10; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 2f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannon_projectile_001", StaticCollections.Projectile_Collection, 4, 4, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; ProjectileData baseData = val2.baseData; baseData.speed *= 1.5f; val2.baseData.damage = 4f; val2.shouldRotate = false; val.gunClass = (GunClass)0; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("PeaShooter_Modular", StaticCollections.Clip_Ammo_Atlas, "peashooter_1", "peashooter_2", (AmmoType)14); val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(223); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.125f, 0.125f), "barrel_point").transform; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); GunID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessFireRateSpecial)); } public void ProcessFireRateSpecial(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == GunID) { ProjectileData baseData = p.baseData; baseData.damage += 0.75f * (float)stack; ProjectileData baseData2 = p.baseData; baseData2.force *= (float)(1 + stack); p.damageTypes = (CoreDamageTypes)64; } } } public class DefaultArmCannonAlt : GunBehaviour { public static VFXPool Impact; public static string ImpactSFX; public static int ID; public static void Init() { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Expected O, but got Unknown //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Modular Arm Cannon", "defaultarmcannonalt"); Game.Items.Rename("outdated_gun_mods:modular_arm_cannon", "mdl:armcannon_0_alt"); DefaultArmCannonAlt @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.2"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires simple energy balls. Compatible with Modular Upgrade Software.\n\nGiven the right circumstances, this piece of equipment would have been able to assist in many different ways with construction. An under-the-table deal weaponized it."); val.SetupSprite(StaticCollections.Gun_Collection, "defaultarmcannonalt_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "defaultarmcannonalt_idle"; val.shootAnimation = "defaultarmcannonalt_fire"; val.reloadAnimation = "defaultarmcannonalt_reload"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = true; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2f; val.DefaultModule.cooldownTime = 0.25f; val.DefaultModule.numberOfShotsInClip = 12; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7.5f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; val2.baseData.damage = 7f; val2.shouldRotate = false; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue), 3, 3); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ArmCannonAlt", StaticCollections.Clip_Ammo_Atlas, "blasteralt_1", "blasteralt_2", (AmmoType)14); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId5 = PickupObjectDatabase.GetById(207); muzzleFlashEffects = ((Gun)((byId5 is Gun) ? byId5 : null)).muzzleFlashEffects; val2.SetProjectileCollisionRight("defaultarmcannonalt_projectile_medium_001", StaticCollections.Projectile_Collection, 6, 6, lightened: false, (Anchor)4); int num = 207; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId6 = PickupObjectDatabase.GetById(num); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId7 = PickupObjectDatabase.GetById(num); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId8 = PickupObjectDatabase.GetById(num); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId9 = PickupObjectDatabase.GetById(num); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessShot)); } public void ProcessShot(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { p.AppliesStun = true; p.StunApplyChance = 0.02f; p.AppliedStunDuration = 2.25f; p.TreatedAsNonProjectileForChallenge = true; SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); } } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null && Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)oR).aiActor).behaviorSpeculator) && ((BraveBehaviour)((BraveBehaviour)oR).aiActor).behaviorSpeculator.IsStunned) { float damage = ((BraveBehaviour)mR).projectile.baseData.damage; float force = ((BraveBehaviour)mR).projectile.baseData.force; ProjectileData baseData = ((BraveBehaviour)mR).projectile.baseData; baseData.damage *= 1.5f + (float)IteratedDesign.PlayerHasIteratedDesign(Toolbox.GetModular()) * 0.5f; ProjectileData baseData2 = ((BraveBehaviour)mR).projectile.baseData; baseData2.force *= 1.5f + (float)IteratedDesign.PlayerHasIteratedDesign(Toolbox.GetModular()) * 0.5f; ((MonoBehaviour)((BraveBehaviour)mR).projectile).StartCoroutine(FrameDelay(((BraveBehaviour)mR).projectile, damage, force)); } } public IEnumerator FrameDelay(Projectile p, float DmG, float forec) { VFXPool Ef = p.hitEffects.enemy; VFXPool Ef_ = p.hitEffects.deathEnemy; string hit = p.enemyImpactEventName; p.hitEffects.enemy = Impact; p.hitEffects.deathEnemy = Impact; p.enemyImpactEventName = ImpactSFX; yield return null; if (Object.op_Implicit((Object)(object)p)) { p.baseData.damage = DmG; p.hitEffects.enemy = Ef; p.hitEffects.deathEnemy = Ef_; p.enemyImpactEventName = hit; p.baseData.damage = DmG; p.baseData.force = forec; } } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 5); } static DefaultArmCannonAlt() { PickupObject byId = PickupObjectDatabase.GetById(539); Impact = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy; PickupObject byId2 = PickupObjectDatabase.GetById(539); ImpactSFX = ((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0].enemyImpactEventName; } } public class DefaultArmCannon : GunBehaviour { public static VFXPool Impact; public static string ImpactSFX; public static int ID; public static void Init() { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Expected O, but got Unknown //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Modular Arm Cannon", "defaultarmcannon"); Game.Items.Rename("outdated_gun_mods:modular_arm_cannon", "mdl:armcannon_0"); DefaultArmCannon @object = ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Mk.1"); GunExt.SetLongDescription((PickupObject)(object)val, "Fires simple energy balls. Compatible with Modular Upgrade Software.\n\nGiven the right circumstances, this piece of equipment would have been able to assist in many different ways with construction. An under-the-table deal weaponized it."); val.SetupSprite(StaticCollections.Gun_Collection, "defaultarmcannon_idle_001"); ((BraveBehaviour)val).spriteAnimator.Library = StaticCollections.Gun_Animation; ((BraveBehaviour)val).sprite.SortingOrder = 1; val.idleAnimation = "defaultarmcannon_idle"; val.shootAnimation = "defaultarmcannon_fire"; val.reloadAnimation = "defaultarmcannon_reload"; ((PickupObject)val).PersistsOnDeath = true; ((PickupObject)val).PreventStartingOwnerFromDropping = true; PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ModularGunController modularGunController = ((Component)val).gameObject.AddComponent(); modularGunController.isAlt = false; val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(57); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; val.reloadTime = 2f; val.DefaultModule.cooldownTime = 0.25f; val.DefaultModule.numberOfShotsInClip = 12; val.SetBaseMaxAmmo(250); val.DefaultModule.angleVariance = 7.5f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.SetProjectileCollisionRight("defaultarmcannon_projectile_medium_001", StaticCollections.Projectile_Collection, 6, 6, lightened: false, (Anchor)4); ref string objectImpactEventName = ref val2.objectImpactEventName; PickupObject byId3 = PickupObjectDatabase.GetById(334); objectImpactEventName = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].objectImpactEventName; ref string enemyImpactEventName = ref val2.enemyImpactEventName; PickupObject byId4 = PickupObjectDatabase.GetById(334); enemyImpactEventName = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].enemyImpactEventName; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId5 = PickupObjectDatabase.GetById(223); tileMapHorizontal = Toolbox.MakeObjectIntoVFX(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId6 = PickupObjectDatabase.GetById(223); tileMapVertical = Toolbox.MakeObjectIntoVFX(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(223); enemy = Toolbox.MakeObjectIntoVFX(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId8 = PickupObjectDatabase.GetById(223); deathAny = Toolbox.MakeObjectIntoVFX(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect); Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 100f); val3.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.material = val3; val2.baseData.damage = 7f; val2.shouldRotate = false; val.gunClass = (GunClass)0; val.AddGlowShaderToGun(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue), 10, 10); val.gunHandedness = (GunHandedness)3; val.carryPixelOffset = new IntVector2(4, 2); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId9 = PickupObjectDatabase.GetById(223); muzzleFlashEffects = ((Gun)((byId9 is Gun) ? byId9 : null)).muzzleFlashEffects; val.muzzleOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "muzzle_point").transform; val.barrelOffset = Toolbox.GenerateTransformPoint(((Component)val).gameObject, new Vector2(0.3125f, 0.25f), "barrel_point").transform; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ArmCannon", StaticCollections.Clip_Ammo_Atlas, "blaster_1", "blaster_2", (AmmoType)14); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; IteratedDesign.SpecialProcessGunSpecificFireRate = (Func)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecificFireRate, new Func(@object.ProcessFireRateSpecial)); IteratedDesign.SpecialProcessGunSpecific = (Action)Delegate.Combine(IteratedDesign.SpecialProcessGunSpecific, new Action(@object.ProcessShot)); } public void ProcessShot(ModulePrinterCore modulePrinterCore, Projectile p, int stack, PlayerController player) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId == ID) { p.AppliesStun = true; p.StunApplyChance = 0.02f; p.AppliedStunDuration = 2.25f; p.TreatedAsNonProjectileForChallenge = true; SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); } } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null && Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)oR).aiActor).behaviorSpeculator) && ((BraveBehaviour)((BraveBehaviour)oR).aiActor).behaviorSpeculator.IsStunned) { float damage = ((BraveBehaviour)mR).projectile.baseData.damage; float force = ((BraveBehaviour)mR).projectile.baseData.force; ProjectileData baseData = ((BraveBehaviour)mR).projectile.baseData; baseData.damage *= 1.5f + (float)IteratedDesign.PlayerHasIteratedDesign(Toolbox.GetModular()) * 0.5f; ProjectileData baseData2 = ((BraveBehaviour)mR).projectile.baseData; baseData2.force *= 1.5f + (float)IteratedDesign.PlayerHasIteratedDesign(Toolbox.GetModular()) * 0.5f; ((MonoBehaviour)((BraveBehaviour)mR).projectile).StartCoroutine(FrameDelay(((BraveBehaviour)mR).projectile, damage, force)); } } public IEnumerator FrameDelay(Projectile p, float DmG, float forec) { VFXPool Ef = p.hitEffects.enemy; VFXPool Ef_ = p.hitEffects.deathEnemy; string hit = p.enemyImpactEventName; p.hitEffects.enemy = Impact; p.hitEffects.deathEnemy = Impact; p.enemyImpactEventName = ImpactSFX; yield return null; if (Object.op_Implicit((Object)(object)p)) { p.baseData.damage = DmG; p.hitEffects.enemy = Ef; p.hitEffects.deathEnemy = Ef_; p.enemyImpactEventName = hit; p.baseData.damage = DmG; p.baseData.force = forec; } } public float ProcessFireRateSpecial(float f, int stack, ModulePrinterCore modulePrinterCore, PlayerController player) { if (((PickupObject)modulePrinterCore.ModularGunController.gun).PickupObjectId != ID) { return f; } return f / (float)(1 + stack / 5); } static DefaultArmCannon() { PickupObject byId = PickupObjectDatabase.GetById(539); Impact = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.enemy; PickupObject byId2 = PickupObjectDatabase.GetById(539); ImpactSFX = ((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.chargeProjectiles[0].Projectile.enemyImpactEventName; } } public class ModuleGunStatModifier { public string Name = "____"; public Func FireRate_Process; public Func ClipSize_Process; public Func Reload_Process; public Func Accuracy_Process; public Func ChargeSpeed_Process; public Func AngleFromAim_Process; public Func FinaleClipSize_Process; public Func BurstAmount_Process; public Func Post_Calculation_ClipSize_Process; } [HarmonyPatch(typeof(Gun), "Update")] public class GunPanic { private static void Postfix(Gun __instance) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.m_owner != (Object)null) { GameActor owner = __instance.m_owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (val != null && (Object)(object)val.PlayerHasCore() != (Object)null && val.CurrentStoneGunTimer > 0f && !GameManager.Instance.IsPaused) { Vector3 val2 = Vector2Extensions.ToVector3ZisY(((BraveBehaviour)__instance).sprite.WorldBottomLeft, 0f); Vector3 val3 = Vector2Extensions.ToVector3ZisY(((BraveBehaviour)__instance).sprite.WorldTopRight, 0f); float num = (val3.y - val2.y) * (val3.x - val2.x); float num2 = 15f * num; int num3 = Mathf.CeilToInt(Mathf.Max(1f, num2 * BraveTime.DeltaTime)); Vector3 unitOnCircleVec = Toolbox.GetUnitOnCircleVec3(BraveUtility.RandomAngle(), 1f); float num4 = 0.7f; float? num5 = Random.Range(0.8f, 1.4f); GlobalSparksDoer.DoRandomParticleBurst(num3, val2, val3, unitOnCircleVec, 0f, num4, (float?)0.333f, num5, (Color?)Color.gray, (SparksType)6); } } } } [HarmonyPatch(typeof(GameUIRoot), "UpdateGunDataInternal")] public class NopeOutVisibility { public const string ERROR = "[color #ff0000][ERROR]: WEAPON JAM[/color]"; private static void Postfix(GameUIRoot __instance, PlayerController targetPlayer, GunInventory inventory, int inventoryShift, GameUIAmmoController targetAmmoController, int labelTarget) { if ((Object)(object)targetPlayer.PlayerHasCore() != (Object)null && targetPlayer.CurrentStoneGunTimer > 0f) { __instance.m_gunNameVisibilityTimers[labelTarget] -= ((TimeInvariantMonoBehaviour)__instance).m_deltaTime; if (__instance.m_gunNameVisibilityTimers[labelTarget] > 1f) { __instance.gunNameLabels[labelTarget].colorizeSymbols = true; ((dfControl)__instance.gunNameLabels[labelTarget]).IsVisible = true; ((dfControl)__instance.gunNameLabels[labelTarget]).Opacity = 1f; __instance.gunNameLabels[labelTarget].Text = "[color #ff0000][ERROR]: WEAPON JAM[/color]\n" + __instance.gunNameLabels[labelTarget].Text; } else if (__instance.m_gunNameVisibilityTimers[labelTarget] > 0f) { __instance.gunNameLabels[labelTarget].colorizeSymbols = true; ((dfControl)__instance.gunNameLabels[labelTarget]).IsVisible = true; ((dfControl)__instance.gunNameLabels[labelTarget]).Opacity = __instance.m_gunNameVisibilityTimers[labelTarget]; __instance.gunNameLabels[labelTarget].Text = "[color #ff0000][ERROR]: WEAPON JAM[/color]\n" + __instance.gunNameLabels[labelTarget].Text; } else { __instance.gunNameLabels[labelTarget].colorizeSymbols = true; ((dfControl)__instance.gunNameLabels[labelTarget]).IsVisible = true; ((dfControl)__instance.gunNameLabels[labelTarget]).Opacity = 1f; __instance.gunNameLabels[labelTarget].Text = "[color #ff0000][ERROR]: WEAPON JAM[/color]"; } } } } public class ModularGunController : MonoBehaviour { public class ModuleStatStorage { public float Angle_From_Aim; public float Accuracy; public float Rate_Of_Fire; public int Clip_Size; public int FinalProjectiles_Count; public int BurstShots; } public Projectile projectileToCopyForFlak; public Gun gun; public PlayerController Player; public ModulePrinterCore PrinterSelf; public bool isAlt; public float Base_Reload_Time; public int Base_Clip_Size; public int Base_Finale_Clip_Size; public float Base_Fire_Rate; public float Base_Accuracy; public float Base_AngleFromAim; public VFXPool Base_Muzzleflash; public int AdditionalPowerSupply = 0; public string DefaultSwitchGroup; public Dictionary Default_Module_And_Stats = new Dictionary(); public Dictionary Modified_Module_And_Stats = new Dictionary(); public Dictionary Default_ChargeProj_And_Cooldown = new Dictionary(); private Dictionary Modified_ChargeProj_And_Cooldown = new Dictionary(); private ProjectileVolleyData storedVolley; public List statMods = new List(); public Action OnPreFired; public Action OnReload; public Action GunUpdate; public Action OnGunFired; private bool isInited = false; private float _CurrentFireRateMult; private float _CurrentClipSizeMult; private float _CurrentReloadTimeMult; private bool isStoned = false; private int storedCount = 0; private int storedCountBase = 0; public void OnReloadPressed(PlayerController p, Gun g, bool b) { if (g.ClipCapacity > g.ClipShotsRemaining && OnReload != null && Object.op_Implicit((Object)(object)PrinterSelf)) { OnReload.Invoke(PrinterSelf, p, g); } } public Projectile OnPreFireMod(Gun g, Projectile p, ProjectileModule pm) { if (OnPreFired != null && Object.op_Implicit((Object)(object)PrinterSelf)) { OnPreFired.Invoke(PrinterSelf, p, Player, g); } return p; } public void Start() { gun = ((Component)this).GetComponent(); Gun val = gun; Base_Reload_Time = val.reloadTime; Base_Clip_Size = val.DefaultModule.GetModNumberOfShotsInClip(val.CurrentOwner); Base_Finale_Clip_Size = val.DefaultModule.numberOfFinalProjectiles; Base_Fire_Rate = val.DefaultModule.cooldownTime; Base_Accuracy = val.DefaultModule.angleVariance; Base_AngleFromAim = val.DefaultModule.angleFromAim; Base_Muzzleflash = val.muzzleFlashEffects; storedVolley = val.Volley; foreach (ProjectileModule projectile in val.Volley.projectiles) { if (!Default_Module_And_Stats.ContainsKey(projectile)) { Default_Module_And_Stats.Add(projectile, new ModuleStatStorage { Accuracy = projectile.angleVariance, Angle_From_Aim = projectile.angleFromAim, Rate_Of_Fire = projectile.cooldownTime, Clip_Size = projectile.numberOfShotsInClip, FinalProjectiles_Count = projectile.numberOfFinalProjectiles, BurstShots = projectile.burstShotCount }); } foreach (ChargeProjectile chargeProjectile in projectile.chargeProjectiles) { if (!Default_ChargeProj_And_Cooldown.ContainsKey(chargeProjectile)) { Default_ChargeProj_And_Cooldown.Add(chargeProjectile, chargeProjectile.ChargeTime); } } } storedCount = (((Object)(object)val.alternateVolley != (Object)null) ? ((val.alternateVolley.projectiles != null) ? val.alternateVolley.projectiles.Count : 0) : 0); GameActor currentOwner = val.CurrentOwner; PlayerController val2 = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if (val2 != null) { Player = val2; foreach (PassiveItem passiveItem in val2.passiveItems) { if (passiveItem is ModulePrinterCore modulePrinterCore) { modulePrinterCore.ModularGunController = this; PrinterSelf = modulePrinterCore; } } if (!isInited) { val.OnPreFireProjectileModifier = (Func)Delegate.Combine(val.OnPreFireProjectileModifier, new Func(OnPreFireMod)); val.OnPostFired = (Action)Delegate.Combine(val.OnPostFired, new Action(OnPostFired)); val.OnReloadPressed = (Action)Delegate.Combine(val.OnReloadPressed, new Action(OnReloadPressed)); } DefaultSwitchGroup = val.gunSwitchGroup; } isInited = true; } public void ResetSwitchGroup() { if (!((Object)(object)gun == (Object)null)) { gun.gunSwitchGroup = DefaultSwitchGroup; } } public void OnPostFired(PlayerController player, Gun gun) { if (OnGunFired != null) { OnGunFired.Invoke(PrinterSelf, player, gun); } } public void ChangeMuzzleFlash(VFXPool newMuzzle) { gun.muzzleFlashEffects = newMuzzle; } public void RevertMuzzleFlash() { gun.muzzleFlashEffects = Base_Muzzleflash; } public float GetAccuracy(ProjectileModule mod, float? overrideAngle = null) { float num = Default_Module_And_Stats[mod].Accuracy; foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.Accuracy_Process != null) { num = statMod.Accuracy_Process.Invoke(overrideAngle.HasValue ? overrideAngle.Value : num, PrinterSelf, this, Player); } } return num; } public float GetAccuracy(float overrideAngle) { foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.Accuracy_Process != null) { overrideAngle = statMod.Accuracy_Process.Invoke(overrideAngle, PrinterSelf, this, Player); } } return overrideAngle; } public float GetRateOfFire(ProjectileModule mod, float? overrideRateOfFire = null) { float num = Default_Module_And_Stats[mod].Rate_Of_Fire; foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.FireRate_Process != null) { num = statMod.FireRate_Process.Invoke(overrideRateOfFire.HasValue ? overrideRateOfFire.Value : num, PrinterSelf, this, Player); } } return num; } public float GetRateOfFire(float overrideRateOfFire) { foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.FireRate_Process != null) { overrideRateOfFire = statMod.FireRate_Process.Invoke(overrideRateOfFire, PrinterSelf, this, Player); } } return overrideRateOfFire; } public float GetReload(float overrideReload) { foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.Reload_Process != null) { overrideReload = statMod.Reload_Process.Invoke(overrideReload, PrinterSelf, this, Player); } } return overrideReload; } public float GetChargeSpeed(float overrideChargeSpeed) { foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.ChargeSpeed_Process != null) { overrideChargeSpeed = statMod.ChargeSpeed_Process.Invoke(overrideChargeSpeed, PrinterSelf, this, Player); } } return overrideChargeSpeed; } public int GetClipSize(int overrideClipSize) { foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.ClipSize_Process != null) { overrideClipSize = statMod.ClipSize_Process.Invoke(overrideClipSize, PrinterSelf, this, Player); } } overrideClipSize = Mathf.Max(overrideClipSize, 1); foreach (ModuleGunStatModifier statMod2 in statMods) { if (statMod2.Post_Calculation_ClipSize_Process != null) { overrideClipSize = statMod2.Post_Calculation_ClipSize_Process.Invoke(overrideClipSize, PrinterSelf, this, Player); } } return overrideClipSize; } public int GetModNumberOfShotsInClip(GameActor owner) { if (Base_Clip_Size == 1) { return Base_Clip_Size; } if (!((Object)(object)owner != (Object)null) || !(owner is PlayerController)) { return Base_Clip_Size; } PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); float statValue = val.stats.GetStatValue((StatType)16); float statValue2 = val.stats.GetStatValue((StatType)29); int num = Mathf.FloorToInt((float)Base_Clip_Size * statValue * statValue2); if (num < 0) { return num; } return Mathf.Max(num, 1); } public float GetFireRateMult() { return _CurrentFireRateMult; } public float GetReloadTimeMult() { return _CurrentReloadTimeMult; } public void ProcessStats() { if ((Object)(object)gun == (Object)null || (Object)(object)PrinterSelf == (Object)null || (Object)(object)Player == (Object)null) { return; } float num = Base_Reload_Time; foreach (ModuleGunStatModifier statMod in statMods) { if (statMod.Reload_Process != null) { num = statMod.Reload_Process.Invoke(num, PrinterSelf, this, Player); } } gun.reloadTime = num; _CurrentReloadTimeMult = num / Base_Reload_Time; foreach (KeyValuePair default_Module_And_Stat in Default_Module_And_Stats) { float num2 = default_Module_And_Stat.Value.Rate_Of_Fire; float num3 = default_Module_And_Stat.Value.Accuracy; float num4 = default_Module_And_Stat.Value.Angle_From_Aim; int num5 = default_Module_And_Stat.Value.Clip_Size; int num6 = default_Module_And_Stat.Value.FinalProjectiles_Count; int num7 = default_Module_And_Stat.Value.BurstShots; bool flag = num5 == -1; foreach (ModuleGunStatModifier statMod2 in statMods) { if (statMod2.FireRate_Process != null) { num2 = statMod2.FireRate_Process.Invoke(num2, PrinterSelf, this, Player); } if (statMod2.Accuracy_Process != null) { num3 = statMod2.Accuracy_Process.Invoke(num3, PrinterSelf, this, Player); } if (statMod2.AngleFromAim_Process != null) { num4 = statMod2.AngleFromAim_Process.Invoke(num4, PrinterSelf, this, Player); } if (!flag && statMod2.ClipSize_Process != null) { num5 = statMod2.ClipSize_Process.Invoke(num5, PrinterSelf, this, Player); } } if (!flag) { num5 = Mathf.Max(num5, 1); foreach (ModuleGunStatModifier statMod3 in statMods) { if (statMod3.Post_Calculation_ClipSize_Process != null) { num5 = statMod3.Post_Calculation_ClipSize_Process.Invoke(num5, PrinterSelf, this, Player); } } } foreach (ModuleGunStatModifier statMod4 in statMods) { if (statMod4.FinaleClipSize_Process != null) { num6 = statMod4.FinaleClipSize_Process.Invoke(num6, num5, PrinterSelf, this, Player); } if (statMod4.BurstAmount_Process != null) { num7 = statMod4.BurstAmount_Process.Invoke(num7, num5, PrinterSelf, this, Player); } } default_Module_And_Stat.Key.cooldownTime = num2; default_Module_And_Stat.Key.angleVariance = num3; default_Module_And_Stat.Key.angleFromAim = num4; default_Module_And_Stat.Key.numberOfShotsInClip = num5; default_Module_And_Stat.Key.numberOfFinalProjectiles = num6; _CurrentFireRateMult = num2 / default_Module_And_Stat.Value.Rate_Of_Fire; _CurrentClipSizeMult = num5 / default_Module_And_Stat.Value.Clip_Size; } foreach (KeyValuePair item in Default_ChargeProj_And_Cooldown) { float num8 = item.Value; foreach (ModuleGunStatModifier statMod5 in statMods) { if (statMod5.ChargeSpeed_Process != null) { num8 = statMod5.ChargeSpeed_Process.Invoke(num8, PrinterSelf, this, Player); } } item.Key.ChargeTime = num8; } foreach (KeyValuePair modified_Module_And_Stat in Modified_Module_And_Stats) { float num9 = modified_Module_And_Stat.Value.Rate_Of_Fire; float num10 = modified_Module_And_Stat.Value.Accuracy; float num11 = modified_Module_And_Stat.Value.Angle_From_Aim; int num12 = modified_Module_And_Stat.Value.Clip_Size; int num13 = modified_Module_And_Stat.Value.FinalProjectiles_Count; int num14 = modified_Module_And_Stat.Value.BurstShots; bool flag2 = num12 == -1; foreach (ModuleGunStatModifier statMod6 in statMods) { if (statMod6.FireRate_Process != null) { num9 = statMod6.FireRate_Process.Invoke(num9, PrinterSelf, this, Player); } if (statMod6.Accuracy_Process != null) { num10 = statMod6.Accuracy_Process.Invoke(num10, PrinterSelf, this, Player); } if (statMod6.AngleFromAim_Process != null) { num11 = statMod6.AngleFromAim_Process.Invoke(num11, PrinterSelf, this, Player); } if (!flag2 && statMod6.ClipSize_Process != null) { num12 = statMod6.ClipSize_Process.Invoke(num12, PrinterSelf, this, Player); } } if (!flag2) { num12 = Mathf.Max(num12, 1); foreach (ModuleGunStatModifier statMod7 in statMods) { if (statMod7.Post_Calculation_ClipSize_Process != null) { num12 = statMod7.Post_Calculation_ClipSize_Process.Invoke(num12, PrinterSelf, this, Player); } } } foreach (ModuleGunStatModifier statMod8 in statMods) { if (statMod8.FinaleClipSize_Process != null) { num13 = statMod8.FinaleClipSize_Process.Invoke(num13, num12, PrinterSelf, this, Player); } if (statMod8.BurstAmount_Process != null) { num14 = statMod8.BurstAmount_Process.Invoke(num14, num12, PrinterSelf, this, Player); } } modified_Module_And_Stat.Key.cooldownTime = num9; modified_Module_And_Stat.Key.angleVariance = num10; modified_Module_And_Stat.Key.angleFromAim = num11; modified_Module_And_Stat.Key.numberOfShotsInClip = num12; modified_Module_And_Stat.Key.numberOfFinalProjectiles = num13; } foreach (KeyValuePair item2 in Modified_ChargeProj_And_Cooldown) { float num15 = item2.Value; foreach (ModuleGunStatModifier statMod9 in statMods) { if (statMod9.ChargeSpeed_Process != null) { num15 = statMod9.ChargeSpeed_Process.Invoke(num15, PrinterSelf, this, Player); } } item2.Key.ChargeTime = num15; } } private void Update() { if (Object.op_Implicit((Object)(object)Player) && Object.op_Implicit((Object)(object)PrinterSelf) && Object.op_Implicit((Object)(object)gun) && GunUpdate != null) { GunUpdate.Invoke(PrinterSelf, Player, gun); } if (Object.op_Implicit((Object)(object)Player) && Player.CurrentStoneGunTimer > 0f && !isStoned) { isStoned = true; AkSoundEngine.PostEvent("Play_BOSS_mineflayer_trigger_01", ((Component)Player).gameObject); } if (Object.op_Implicit((Object)(object)gun.alternateVolley) && ((gun.alternateVolley.projectiles != null) | (gun.alternateVolley.projectiles.Count > 0)) && storedCount != gun.alternateVolley.projectiles.Count) { storedCount = gun.alternateVolley.projectiles.Count; foreach (ProjectileModule projectile in gun.alternateVolley.projectiles) { Modified_Module_And_Stats = new Dictionary(); foreach (ProjectileModule projectile2 in gun.alternateVolley.projectiles) { if (Modified_Module_And_Stats.ContainsKey(projectile2)) { continue; } Modified_Module_And_Stats.Add(projectile2, new ModuleStatStorage { Accuracy = projectile2.angleVariance, Angle_From_Aim = projectile2.angleFromAim, Rate_Of_Fire = projectile2.cooldownTime, Clip_Size = projectile2.numberOfShotsInClip, FinalProjectiles_Count = projectile2.numberOfFinalProjectiles, BurstShots = projectile2.burstShotCount }); foreach (ChargeProjectile chargeProjectile in projectile2.chargeProjectiles) { if (!Modified_ChargeProj_And_Cooldown.ContainsKey(chargeProjectile)) { Modified_ChargeProj_And_Cooldown.Add(chargeProjectile, chargeProjectile.ChargeTime); } } } } } if (Object.op_Implicit((Object)(object)gun.Volley) && ((gun.Volley.projectiles != null) | (gun.Volley.projectiles.Count > 0)) && storedCountBase != gun.Volley.projectiles.Count) { storedCountBase = gun.Volley.projectiles.Count; foreach (ProjectileModule projectile3 in gun.Volley.projectiles) { Default_Module_And_Stats = new Dictionary(); foreach (ProjectileModule projectile4 in gun.Volley.projectiles) { if (Default_Module_And_Stats.ContainsKey(projectile4)) { continue; } Default_Module_And_Stats.Add(projectile4, new ModuleStatStorage { Accuracy = projectile4.angleVariance, Angle_From_Aim = projectile4.angleFromAim, Rate_Of_Fire = projectile4.cooldownTime, Clip_Size = projectile4.numberOfShotsInClip, FinalProjectiles_Count = projectile4.numberOfFinalProjectiles, BurstShots = projectile4.burstShotCount }); foreach (ChargeProjectile chargeProjectile2 in projectile4.chargeProjectiles) { if (!Default_ChargeProj_And_Cooldown.ContainsKey(chargeProjectile2)) { Default_ChargeProj_And_Cooldown.Add(chargeProjectile2, chargeProjectile2.ChargeTime); } } } } } if ((Object)(object)storedVolley != (Object)(object)gun.Volley) { storedVolley = gun.Volley; Default_Module_And_Stats = new Dictionary(); foreach (ProjectileModule projectile5 in gun.Volley.projectiles) { if (Default_Module_And_Stats.ContainsKey(projectile5)) { continue; } Default_Module_And_Stats.Add(projectile5, new ModuleStatStorage { Accuracy = projectile5.angleVariance, Angle_From_Aim = projectile5.angleFromAim, Rate_Of_Fire = projectile5.cooldownTime, Clip_Size = projectile5.numberOfShotsInClip, FinalProjectiles_Count = projectile5.numberOfFinalProjectiles, BurstShots = projectile5.burstShotCount }); foreach (ChargeProjectile chargeProjectile3 in projectile5.chargeProjectiles) { if (!Default_ChargeProj_And_Cooldown.ContainsKey(chargeProjectile3)) { Default_ChargeProj_And_Cooldown.Add(chargeProjectile3, chargeProjectile3.ChargeTime); } } } } ProcessStats(); } } public class BlessedMode_Modifier { public static void Init() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(PlayerController).GetMethod("ChangeToRandomGun", BindingFlags.Instance | BindingFlags.Public), typeof(BlessedMode_Modifier).GetMethod("ChangeToRandomGunHook")); new Hook((MethodBase)typeof(PlayerController).GetMethod("Update", BindingFlags.Instance | BindingFlags.Public), typeof(BlessedMode_Modifier).GetMethod("UpdateHook")); } public static DefaultModule ReturnSelectedModule(ItemQuality itemQuality = 3) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) GenericLootTable table = GlobalModuleStorage.SelectTable(itemQuality); return table.ModularSelectByWeight(useSeedRandom: false, Func).GetComponent(); } private static bool Func(DefaultModule defaultModule) { if (!defaultModule.AppearsFromBlessedModeRoll) { return false; } return true; } public static int FloorMultiplier(Dungeon floor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Invalid comparison between Unknown and I4 //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Invalid comparison between Unknown and I4 //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Invalid comparison between Unknown and I4 //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 if ((int)floor.tileIndices.tilesetId == 2) { return 0; } if ((int)floor.tileIndices.tilesetId == 1) { return 0; } if ((int)floor.tileIndices.tilesetId == 16) { return 1; } if ((int)floor.tileIndices.tilesetId == 32) { return 1; } if ((int)floor.tileIndices.tilesetId == 64) { return 2; } if ((int)floor.tileIndices.tilesetId == 4) { return 1; } if ((int)floor.tileIndices.tilesetId == 8) { return 1; } if ((int)floor.tileIndices.tilesetId == 2048) { return 2; } if ((int)floor.tileIndices.tilesetId == 128) { return 2; } return 1; } public static void ChangeToRandomGunHook(Action orig, PlayerController self) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Invalid comparison between Unknown and I4 //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Invalid comparison between Unknown and I4 //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Invalid comparison between Unknown and I4 //IL_00a7: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)self.PlayerHasCore() != (Object)null) { self.m_gunGameElapsed = 0f; self.m_gunGameDamageThreshold = 1250f + (float)Random.Range(0, 1250); if (self.inventory.GunLocked.Value || (int)GameManager.Instance.CurrentLevelOverrideState == 4 || (int)GameManager.Instance.CurrentLevelOverrideState == 5 || (int)GameManager.Instance.CurrentLevelOverrideState == 2) { return; } ? val = self; Object obj = ResourceCache.Acquire("Global VFX/VFX_MagicFavor_Change"); ((GameActor)val).PlayEffectOnActor((GameObject)(object)((obj is GameObject) ? obj : null), new Vector3(0f, -1f, 0f), true, false, false); ModulePrinterCore modulePrinterCore = self.PlayerHasCore(); modulePrinterCore.RemoveTemporaryModules("BLESSED_MODE", playVFX: true); int num = ((!(Random.value < 0.3f)) ? 1 : 2); num += FloorMultiplier(GameManager.Instance.Dungeon); for (int i = 1; i < num + 1; i++) { int num2 = Random.Range(1, 11); ItemQuality itemQuality = (ItemQuality)3; switch (num2) { case 1: itemQuality = (ItemQuality)1; break; case 2: itemQuality = (ItemQuality)1; break; case 3: itemQuality = (ItemQuality)1; break; case 4: itemQuality = (ItemQuality)2; break; case 5: itemQuality = (ItemQuality)2; break; case 6: itemQuality = (ItemQuality)3; break; case 7: itemQuality = (ItemQuality)3; break; case 8: itemQuality = (ItemQuality)4; break; case 9: itemQuality = (ItemQuality)4; break; case 10: itemQuality = (ItemQuality)5; break; } modulePrinterCore.GiveTemporaryModule(ReturnSelectedModule(itemQuality), "BLESSED_MODE", Random.Range(1, num + 1), doVFX: true); } } else { orig(self); } } [Obsolete] public static void UpdateHook(Action orig, PlayerController self) { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Invalid comparison between Unknown and I4 //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Invalid comparison between Unknown and I4 //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: 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_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: 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_03de: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Invalid comparison between Unknown and I4 //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Unknown result type (might be due to invalid IL or missing references) //IL_071b: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0723: Unknown result type (might be due to invalid IL or missing references) //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Invalid comparison between Unknown and I4 //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_0a1f: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_0906: Unknown result type (might be due to invalid IL or missing references) //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0a81: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0972: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_0c1d: Unknown result type (might be due to invalid IL or missing references) //IL_0c22: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c08: Unknown result type (might be due to invalid IL or missing references) //IL_0c4c: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0c6d: Unknown result type (might be due to invalid IL or missing references) //IL_0c35: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0ca1: Unknown result type (might be due to invalid IL or missing references) //IL_0cac: Unknown result type (might be due to invalid IL or missing references) //IL_0cb6: Unknown result type (might be due to invalid IL or missing references) //IL_0cfb: Unknown result type (might be due to invalid IL or missing references) //IL_0d06: Unknown result type (might be due to invalid IL or missing references) //IL_0d10: Unknown result type (might be due to invalid IL or missing references) if (self.CharacterUsesRandomGuns && (Object)(object)self.PlayerHasCore() != (Object)null) { typeof(GameActor).GetMethod("Update").InvokeNotOverride(self, null); if (GameManager.Instance.IsPaused || GameManager.Instance.UnpausedThisFrame || GameManager.Instance.IsLoadingLevel) { return; } self.m_interactedThisFrame = false; if (self.IsPetting && (!((BraveBehaviour)self).spriteAnimator.IsPlaying("pet") || !Object.op_Implicit((Object)(object)self.m_pettingTarget) || (Object)(object)self.m_pettingTarget.m_pettingDoer != (Object)(object)self || Vector2.Distance(((BraveBehaviour)self).specRigidbody.UnitCenter, ((BraveBehaviour)self.m_pettingTarget).specRigidbody.UnitCenter) > 3f || self.IsDodgeRolling)) { self.ToggleGunRenderers(true, "petting"); self.ToggleHandRenderers(true, "petting"); self.m_pettingTarget = null; } if (((BraveBehaviour)self).healthHaver.IsDead && !self.IsGhost) { return; } self.HandlePostDodgeRollTimer(); self.m_activeActions = BraveInput.GetInstanceForPlayer(self.PlayerIDX).ActiveActions; if ((!self.AcceptingNonMotionInput || self.CurrentStoneGunTimer > 0f) && (Object)(object)((GameActor)self).CurrentGun != (Object)null && ((GameActor)self).CurrentGun.IsFiring && (!((GameActor)self).CurrentGun.IsCharging || ((int)self.CurrentInputState != 2 && !GameManager.IsBossIntro))) { ((GameActor)self).CurrentGun.CeaseAttack(false, (ProjectileData)null); if (Object.op_Implicit((Object)(object)self.CurrentSecondaryGun)) { self.CurrentSecondaryGun.CeaseAttack(false, (ProjectileData)null); } } if (self.inventory != null) { self.inventory.FrameUpdate(); } Projectile.UpdateEnemyBulletSpeedMultiplier(); float num = Mathf.Clamp01(BraveTime.DeltaTime / 0.5f); if (num > 0f && num < 1f) { Vector2 val = self.AverageVelocity * (1f - num) + ((BraveBehaviour)self).specRigidbody.Velocity * num; self.AverageVelocity = BraveMathCollege.ClampSafe(val, -20f, 20f); } if (((GameActor)self).m_isFalling) { return; } if ((self.IsDodgeRolling || (int)self.m_dodgeRollState == 4) && self.m_dodgeRollTimer >= self.rollStats.GetModifiedTime(self)) { if (self.DodgeRollIsBlink) { if (self.m_dodgeRollTimer > self.rollStats.GetModifiedTime(self) + 0.1f) { self.IsEthereal = false; self.IsVisible = true; self.ClearDodgeRollState(); self.previousMineCart = null; } else if (self.m_dodgeRollTimer > self.rollStats.GetModifiedTime(self)) { self.EndBlinkDodge(); } } else { self.ClearDodgeRollState(); self.previousMineCart = null; } } Delegate eventDelegate = self.GetEventDelegate("OnIsRolling"); if (self.IsDodgeRolling) { eventDelegate?.DynamicInvoke(self); } CellFloorType val2 = (CellFloorType)0; val2 = GameManager.Instance.Dungeon.GetFloorTypeFromPosition(((BraveBehaviour)self).specRigidbody.UnitBottomCenter); if (!self.m_prevFloorType.HasValue || self.m_prevFloorType.Value != val2) { self.m_prevFloorType = val2; AkSoundEngine.SetSwitch("FS_Surfaces", ((object)(CellFloorType)(ref val2)).ToString(), ((Component)self).gameObject); } self.m_playerCommandedDirection = Vector2.zero; self.IsFiring = false; if (!BraveUtility.isLoadingLevel && !GameManager.Instance.IsLoadingLevel) { self.ProcessDebugInput(); if (GameUIRoot.Instance.MetalGearActive) { if (((OneAxisInputControl)self.m_activeActions.GunDownAction).WasPressed || ((OneAxisInputControl)self.m_activeActions.GunUpAction).WasPressed) { self.m_gunChangePressedWhileMetalGeared = true; } } else { self.m_gunChangePressedWhileMetalGeared = false; } if (self.AcceptingAnyInput) { try { self.m_playerCommandedDirection = self.HandlePlayerInput(); } catch (Exception ex) { throw new Exception($"Caught PlayerController.HandlePlayerInput() exception. i={self.exceptionTracker}, ex={ex.ToString()}"); } } if (self.m_newFloorNoInput && ((Vector2)(ref self.m_playerCommandedDirection)).magnitude > 0f) { self.m_newFloorNoInput = false; } if (self.usingForcedInput) { self.m_playerCommandedDirection = self.forcedInput; } if (self.m_playerCommandedDirection != Vector2.zero) { GameManager.Instance.platformInterface.ProcessDlcUnlocks(); } } if (self.IsDodgeRolling || (int)self.m_dodgeRollState == 4) { self.HandleContinueDodgeRoll(); } if (PassiveItem.IsFlagSetForCharacter(self, typeof(HeavyBootsItem))) { self.knockbackComponent = Vector2.zero; } if (self.IsDodgeRolling) { if (self.usingForcedInput) { ((BraveBehaviour)self).specRigidbody.Velocity = ((Vector2)(ref self.forcedInput)).normalized * self.GetDodgeRollSpeed() + self.knockbackComponent + self.immutableKnockbackComponent; } else if (self.DodgeRollIsBlink) { ((BraveBehaviour)self).specRigidbody.Velocity = Vector2.zero; } else { ((BraveBehaviour)self).specRigidbody.Velocity = ((Vector2)(ref self.lockedDodgeRollDirection)).normalized * self.GetDodgeRollSpeed() + self.knockbackComponent + self.immutableKnockbackComponent; } } else { float num2 = 1f; if (!self.IsInCombat && GameManager.Options.IncreaseSpeedOutOfCombat) { bool flag = true; List allEnemies = StaticReferenceManager.AllEnemies; if (allEnemies != null) { for (int i = 0; i < allEnemies.Count; i++) { AIActor val3 = allEnemies[i]; if (Object.op_Implicit((Object)(object)val3) && val3.IsMimicEnemy && !((GameActor)val3).IsGone) { float num3 = Vector2.Distance(((GameActor)val3).CenterPosition, ((GameActor)self).CenterPosition); if (num3 < 40f) { flag = false; break; } } } } if (flag) { num2 *= 1.5f; } } Vector2 val4 = self.m_playerCommandedDirection * self.stats.MovementSpeed * num2; Vector2 knockbackComponent = self.knockbackComponent; ((BraveBehaviour)self).specRigidbody.Velocity = ((GameActor)self).ApplyMovementModifiers(val4, knockbackComponent) + self.immutableKnockbackComponent; } SpeculativeRigidbody specRigidbody = ((BraveBehaviour)self).specRigidbody; specRigidbody.Velocity += ((GameActor)self).ImpartedVelocity; ((GameActor)self).ImpartedVelocity = Vector2.zero; if ((int)val2 == 3 && !((GameActor)self).IsFlying && !PassiveItem.IsFlagSetForCharacter(self, typeof(HeavyBootsItem))) { self.m_maxIceFactor = Mathf.Clamp01(self.m_maxIceFactor + BraveTime.DeltaTime * 4f); } else if (((GameActor)self).IsFlying && !PassiveItem.IsFlagSetForCharacter(self, typeof(HeavyBootsItem))) { self.m_maxIceFactor = 0f; } else { self.m_maxIceFactor = Mathf.Clamp01(self.m_maxIceFactor - BraveTime.DeltaTime * 1.5f); } if (self.m_maxIceFactor > 0f) { float num4 = Mathf.Max(((Vector2)(ref self.m_lastVelocity)).magnitude, ((Vector2)(ref ((BraveBehaviour)self).specRigidbody.Velocity)).magnitude); float num5 = 1f - Mathf.Clamp01(Mathf.Abs(Vector2.Angle(self.m_lastVelocity, ((BraveBehaviour)self).specRigidbody.Velocity)) / 180f); float num6 = Mathf.Lerp(1f / BraveTime.DeltaTime, Mathf.Lerp(0.5f, 1.5f, num5), self.m_maxIceFactor); if (((Vector2)(ref self.m_lastVelocity)).magnitude < 0.25f) { num6 = Mathf.Min(1f / BraveTime.DeltaTime, Mathf.Max(num6 * (1f / (30f * BraveTime.DeltaTime)), num6)); } ((BraveBehaviour)self).specRigidbody.Velocity = Vector2.Lerp(self.m_lastVelocity, ((BraveBehaviour)self).specRigidbody.Velocity, num6 * BraveTime.DeltaTime); ((BraveBehaviour)self).specRigidbody.Velocity = ((Vector2)(ref ((BraveBehaviour)self).specRigidbody.Velocity)).normalized * Mathf.Clamp(((Vector2)(ref ((BraveBehaviour)self).specRigidbody.Velocity)).magnitude, 0f, num4); if (float.IsNaN(((BraveBehaviour)self).specRigidbody.Velocity.x) || float.IsNaN(((BraveBehaviour)self).specRigidbody.Velocity.y)) { ((BraveBehaviour)self).specRigidbody.Velocity = Vector2.zero; Debug.Log((object)string.Concat(self.m_lastVelocity, "|", ((Vector2)(ref self.m_lastVelocity)).magnitude, "| NaN correction")); } if (((Vector2)(ref ((BraveBehaviour)self).specRigidbody.Velocity)).magnitude < self.c_iceVelocityMinClamp) { ((BraveBehaviour)self).specRigidbody.Velocity = Vector2.zero; } } if (self.ZeroVelocityThisFrame) { ((BraveBehaviour)self).specRigidbody.Velocity = Vector2.zero; self.ZeroVelocityThisFrame = false; } self.HandleFlipping(self.m_currentGunAngle); self.HandleAnimations(self.m_playerCommandedDirection, self.m_currentGunAngle); if (!self.IsPrimaryPlayer) { PlayerController otherPlayer = GameManager.Instance.GetOtherPlayer(self); if (Object.op_Implicit((Object)(object)otherPlayer)) { float num7 = -0.55f; float heightOffGround = ((BraveBehaviour)self).sprite.HeightOffGround; float z = ((BraveBehaviour)((BraveBehaviour)otherPlayer).sprite).transform.position.z; float z2 = ((BraveBehaviour)((BraveBehaviour)self).sprite).transform.position.z; if (z == z2) { if (heightOffGround == num7) { ((BraveBehaviour)self).sprite.HeightOffGround = num7 + 0.1f; } else if (heightOffGround == num7 + 0.1f) { ((BraveBehaviour)self).sprite.HeightOffGround = num7; } ((BraveBehaviour)self).sprite.UpdateZDepth(); } } } if (self.IsSlidingOverSurface) { if (((BraveBehaviour)self).sprite.HeightOffGround < 0f) { ((BraveBehaviour)self).sprite.HeightOffGround = 1.5f; } } else if (((BraveBehaviour)self).sprite.HeightOffGround > 0f) { ((BraveBehaviour)self).sprite.HeightOffGround = ((!self.IsPrimaryPlayer) ? (-0.55f) : (-0.5f)); } self.HandleAttachedSpriteDepth(self.m_currentGunAngle); self.HandleShellCasingDisplacement(); ((GameActor)self).HandlePitChecks(); self.HandleRoomProcessing(); self.HandleGunAttachPoint(); self.CheckSpawnEmergencyCrate(); self.CheckSpawnAlertArrows(); bool flag2 = ((GameActor)self).QueryGroundedFrame() && !((GameActor)self).IsFlying; if (!self.m_cachedGrounded && flag2 && !((GameActor)self).m_isFalling && self.IsVisible) { GameManager.Instance.Dungeon.dungeonDustups.InstantiateLandDustup(Vector2.op_Implicit(((BraveBehaviour)self).specRigidbody.UnitCenter)); } self.m_cachedGrounded = flag2; if (self.m_playerCommandedDirection != Vector2.zero) { self.m_lastNonzeroCommandedDirection = self.m_playerCommandedDirection; } ((BraveBehaviour)self).transform.position = Vector3Extensions.WithZ(((BraveBehaviour)self).transform.position, ((BraveBehaviour)self).transform.position.y - ((BraveBehaviour)self).sprite.HeightOffGround); if ((Object)(object)((GameActor)self).CurrentGun != (Object)null) { ((BraveBehaviour)((GameActor)self).CurrentGun).transform.position = Vector3Extensions.WithZ(((BraveBehaviour)((GameActor)self).CurrentGun).transform.position, self.gunAttachPoint.position.z); } if ((Object)(object)self.CurrentSecondaryGun != (Object)null && Object.op_Implicit((Object)(object)((GameActor)self).SecondaryGunPivot)) { ((BraveBehaviour)self.CurrentSecondaryGun).transform.position = Vector3Extensions.WithZ(((BraveBehaviour)self.CurrentSecondaryGun).transform.position, ((GameActor)self).SecondaryGunPivot.position.z); } if (self.m_capableOfStealing.UpdateTimers(BraveTime.DeltaTime)) { self.ForceRefreshInteractable = true; } if (self.m_superDuperAutoAimTimer > 0f) { self.m_superDuperAutoAimTimer = Mathf.Max(0f, self.m_superDuperAutoAimTimer - BraveTime.DeltaTime); } } else { orig(self); } } } public class DungeonHooks { public static void Init() { //IL_002d: 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_008d: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(RoomHandler).GetMethod("AddProceduralTeleporterToRoom", BindingFlags.Instance | BindingFlags.Public), typeof(DungeonHooks).GetMethod("AddProceduralTeleporterToRoomHook", BindingFlags.Static | BindingFlags.Public)); new Hook((MethodBase)typeof(DungeonData).GetMethod("FloodFillDungeonInterior", BindingFlags.Instance | BindingFlags.NonPublic), typeof(DungeonHooks).GetMethod("FloodFillDungeonInteriorHook")); new Hook((MethodBase)typeof(RoomHandler).GetMethod("CheckCellArea", BindingFlags.Instance | BindingFlags.NonPublic), typeof(DungeonHooks).GetMethod("CheckCellAreaHook")); } public static void AddProceduralTeleporterToRoomHook(Action orig, RoomHandler roomHandler) { if (GameManager.Instance.Dungeon.BossMasteryTokenItemId != ModulePrinterCore.ModulePrinterCoreID) { orig(roomHandler); } } public static bool CheckCellAreaHook(Func orig, RoomHandler self, IntVector2 basePosition, IntVector2 objDimensions) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) DungeonData data = GameManager.Instance.Dungeon.data; bool result = true; for (int i = basePosition.x; i < basePosition.x + objDimensions.x; i++) { for (int j = basePosition.y; j < basePosition.y + objDimensions.y; j++) { CellData val = data.cellData[i][j]; if (val != null && !val.IsPassable) { return false; } } } return result; } public static void FloodFillDungeonInteriorHook(Action orig, DungeonData self) { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Invalid comparison between Unknown and I4 //IL_0048: 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_00d8: Invalid comparison between Unknown and I4 Stack stack = new Stack(); for (int i = 0; i < self.rooms.Count; i++) { if (self.rooms[i] == self.Entrance || self.rooms[i].IsStartOfWarpWing) { try { stack.Push(self[self.rooms[i].GetRandomAvailableCellDumb()]); } catch (Exception ex) { Debug.LogException(ex); } } } try { while (stack.Count > 0) { CellData val = stack.Pop(); if ((int)val.type == 1) { continue; } List cellNeighbors = self.GetCellNeighbors(val, false); val.isGridConnected = true; for (int j = 0; j < cellNeighbors.Count; j++) { if (cellNeighbors[j] != null && (int)cellNeighbors[j].type != 1 && !cellNeighbors[j].isGridConnected) { stack.Push(cellNeighbors[j]); } } } } catch (Exception ex2) { Debug.Log((object)"[Modular] Warning: Exception caught at DungeonData.FloodFillDungeonInterior!"); Debug.LogException(ex2); } } } public static class Hooks { public static Action OnRecalculateStats; public static bool Stencility_Enabled = true; public static void Init() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(Gun).GetMethod("Pickup", BindingFlags.Instance | BindingFlags.Public), typeof(Hooks).GetMethod("PickupHook")); new Hook((MethodBase)typeof(Gun).GetMethod("Update", BindingFlags.Instance | BindingFlags.Public), typeof(Hooks).GetMethod("UpdateHook")); new Hook((MethodBase)typeof(PlayerController).GetMethod("SetStencilVal", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Hooks).GetMethod("SetStencilValHook")); new Hook((MethodBase)typeof(PlayerController).GetMethod("UpdateStencilVal", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Hooks).GetMethod("UpdateStencilValHook")); new Hook((MethodBase)typeof(PlayerStats).GetMethod("RebuildGunVolleys", BindingFlags.Instance | BindingFlags.Public), typeof(Hooks).GetMethod("RebuildGunVolleysHook")); new Hook((MethodBase)typeof(AIActor).GetMethod("TeleportSomewhere", BindingFlags.Instance | BindingFlags.Public), typeof(Hooks).GetMethod("TeleportationImmunity")); ItemsCore.AddChangeSpawnItem((Func)ReturnObj); new Hook((MethodBase)typeof(PickupObject).GetMethod("HandlePickupCurseParticles", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Hooks).GetMethod("HandlePickupCurseParticlesHook")); new Hook((MethodBase)typeof(BaseShopController).GetMethod("HandleEnter", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Hooks).GetMethod("HandleEnterHook")); new Hook((MethodBase)typeof(Projectile).GetMethod("BeamCollision", BindingFlags.Instance | BindingFlags.Public), typeof(Hooks).GetMethod("FuckYou")); } public static bool FuckYouToo(Func, Func, SpeculativeRigidbody[], bool> orig, BasicBeamController self, Vector2 origin, Vector2 direction, float distance, int collisionMask, Vector2 targetPoint, Vector2 targetNormal, SpeculativeRigidbody hitRigidbody, PixelCollider hitPixelCollider, List boneCollisions, Func rigidbodyExcluder = null, params SpeculativeRigidbody[] ignoreRigidbodies) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Invalid comparison between Unknown and I4 //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) bool flag = false; ((Vector2)(ref targetPoint))..ctor(-1f, -1f); ((Vector2)(ref targetNormal))..ctor(0f, 0f); hitRigidbody = null; hitPixelCollider = null; if ((int)self.collisionType == 1) { if (!Object.op_Implicit((Object)(object)((BraveBehaviour)self).specRigidbody)) { ((BraveBehaviour)self).specRigidbody = ((Component)self).gameObject.AddComponent(); ((BraveBehaviour)self).specRigidbody.CollideWithTileMap = false; ((BraveBehaviour)self).specRigidbody.CollideWithOthers = true; PixelCollider val = new PixelCollider(); val.Enabled = false; val.CollisionLayer = (CollisionLayer)10; val.Enabled = true; val.IsTrigger = true; val.ColliderGenerationMode = (PixelColliderGeneration)0; val.ManualOffsetX = 0; val.ManualOffsetY = self.collisionWidth / -2; val.ManualWidth = self.collisionLength; val.ManualHeight = self.collisionWidth; ((BraveBehaviour)self).specRigidbody.PixelColliders = new List(1); ((BraveBehaviour)self).specRigidbody.PixelColliders.Add(val); ((BraveBehaviour)self).specRigidbody.Initialize(); } if (self.m_cachedRectangleOrigin != origin || self.m_cachedRectangleDirection != direction) { ((BraveBehaviour)self).specRigidbody.Position = new Position(origin); ((BraveBehaviour)self).specRigidbody.PrimaryPixelCollider.SetRotationAndScale(Vector2Extensions.ToAngle(direction), Vector2.one); ((BraveBehaviour)self).specRigidbody.UpdateColliderPositions(); self.m_cachedRectangleOrigin = origin; self.m_cachedRectangleDirection = direction; } int num = CollisionMask.LayerToMask((CollisionLayer)0); if ((collisionMask & num) == num) { PixelCollider primaryPixelCollider = ((BraveBehaviour)self).specRigidbody.PrimaryPixelCollider; primaryPixelCollider.CollisionLayerIgnoreOverride &= ~CollisionMask.LayerToMask((CollisionLayer)0, (CollisionLayer)1); } else { PixelCollider primaryPixelCollider2 = ((BraveBehaviour)self).specRigidbody.PrimaryPixelCollider; primaryPixelCollider2.CollisionLayerIgnoreOverride |= CollisionMask.LayerToMask((CollisionLayer)0, (CollisionLayer)1); } List list = new List(); ((BraveBehaviour)self).specRigidbody.PrimaryPixelCollider.Enabled = true; flag = PhysicsEngine.Instance.OverlapCast(((BraveBehaviour)self).specRigidbody, list, false, true, (int?)null, (int?)null, false, (Vector2?)null, (Func)null, ignoreRigidbodies); ((BraveBehaviour)self).specRigidbody.PrimaryPixelCollider.Enabled = false; boneCollisions = new List(); if (!flag) { return false; } targetNormal = ((CastResult)list[0]).Normal; targetPoint = ((CastResult)list[0]).Contact; hitRigidbody = list[0].OtherRigidbody; hitPixelCollider = ((CastResult)list[0]).OtherPixelCollider; } else if (self.UsesBones) { float num2 = (0f - self.collisionRadius) * self.m_projectileScale * PhysicsEngine.Instance.PixelUnitWidth; float num3 = self.collisionRadius * self.m_projectileScale * PhysicsEngine.Instance.PixelUnitWidth; int num4 = Mathf.Max(2, Mathf.CeilToInt((num3 - num2) / 0.25f)); int num5 = default(int); List list2 = self.GeneratePixelCloud(num2, num3, (float)num4, ref num5); List list3 = self.GenerateLastPixelCloud(num2, num3, (float)num4); if (!PhysicsEngine.Instance.Pointcast(list2, list3, num4, ref boneCollisions, true, true, collisionMask, (CollisionLayer?)(CollisionLayer)4, false, rigidbodyExcluder, num5, ignoreRigidbodies)) { return false; } PointcastResult val2 = boneCollisions[0]; for (int i = 0; i < boneCollisions.Count; i++) { if ((int)boneCollisions[i].hitDirection == 1 && boneCollisions[i].boneIndex > 0) { val2 = boneCollisions[i]; break; } } targetPoint = ((CastResult)val2.hitResult).Contact; targetNormal = ((CastResult)val2.hitResult).Normal; hitRigidbody = val2.hitResult.SpeculativeRigidbody; hitPixelCollider = ((CastResult)val2.hitResult).OtherPixelCollider; } else { float num6 = (0f - self.collisionRadius) * self.m_projectileScale * PhysicsEngine.Instance.PixelUnitWidth; float num7 = self.collisionRadius * self.m_projectileScale * PhysicsEngine.Instance.PixelUnitWidth; int num8 = Mathf.Max(2, Mathf.CeilToInt((num7 - num6) / 0.25f)); RaycastResult val3 = null; RaycastResult val5 = default(RaycastResult); for (int j = 0; j < num8; j++) { float num9 = Mathf.Lerp(num6, num7, (float)j / (float)(num8 - 1)); Vector2 val4 = origin + Vector2Extensions.Rotate(new Vector2(0f, num9), Vector2Extensions.ToAngle(direction)); if (PhysicsEngine.Instance.RaycastWithIgnores(val4, ((Vector2)(ref direction)).normalized, distance, ref val5, true, true, collisionMask, (CollisionLayer?)(CollisionLayer)4, false, rigidbodyExcluder, (ICollection)ignoreRigidbodies)) { flag = true; if (val3 == null || val5.Distance < val3.Distance) { RaycastResult.Pool.Free(ref val3); val3 = val5; } else { RaycastResult.Pool.Free(ref val5); } } } boneCollisions = new List(); if (!flag) { return false; } targetNormal = ((CastResult)val3).Normal; targetPoint = origin + BraveMathCollege.DegreesToVector(Vector2Extensions.ToAngle(direction), val3.Distance); hitRigidbody = val3.SpeculativeRigidbody; hitPixelCollider = ((CastResult)val3).OtherPixelCollider; RaycastResult.Pool.Free(ref val3); } if ((Object)(object)hitRigidbody == (Object)null) { return true; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)hitRigidbody).minorBreakable) && !((BraveBehaviour)hitRigidbody).minorBreakable.OnlyBrokenByCode) { ((BraveBehaviour)hitRigidbody).minorBreakable.Break(direction); } DebrisObject component = ((Component)hitRigidbody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.Trigger(Vector2.op_Implicit(direction), 0.5f, 1f); } TorchController component2 = ((Component)hitRigidbody).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.BeamCollision(((BraveBehaviour)self).projectile); } if (Object.op_Implicit((Object)(object)((BraveBehaviour)hitRigidbody).projectile) && ((BraveBehaviour)hitRigidbody).projectile.collidesWithProjectiles) { ((BraveBehaviour)hitRigidbody).projectile.BeamCollision(((BraveBehaviour)self).projectile); BeamCollisionEvent component3 = ((Component)((BraveBehaviour)hitRigidbody).projectile).gameObject.GetComponent(); if ((Object)(object)component3 != (Object)null) { return component3.isCollisionEvent; } } return true; } public static void FuckYou(Action orig, Projectile self, Projectile currentProjectile) { BeamCollisionEvent component = ((Component)((BraveBehaviour)self).projectile).GetComponent(); if ((Object)(object)component != (Object)null) { if ((component.DetermineDestroy != null) ? component.DetermineDestroy(self) : component.WillBeDestroyed) { self.DieInAir(false, true, true, false); } } else { orig(self, currentProjectile); } } public static void UpdateHook(Action orig, Gun self) { orig(self); if (!((Object)(object)self.CurrentOwner != (Object)null)) { return; } for (int num = ((BraveBehaviour)self).transform.childCount - 1; num > -1; num--) { if (((Object)((BraveBehaviour)self).transform.GetChild(num)).name.Contains("VFX_MODULABLE")) { Object.Destroy((Object)(object)((Component)((BraveBehaviour)self).transform.GetChild(num)).gameObject); } } ChooseModuleController component = ((Component)self).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.DestroyAllOthers(destroyGun: false, autoDestroy: true); } } public static void TeleportationImmunity(Action orig, AIActor self, IntVector2? overrideClearance = null, bool keepClose = false) { if (!((Object)(object)((Component)self).GetComponent() != (Object)null)) { orig(self, overrideClearance, keepClose); } } public static void RebuildGunVolleysHook(Action orig, PlayerStats self, PlayerController p) { orig(self, p); ((MonoBehaviour)GameManager.Instance).StartCoroutine(FrameDelay()); } public static IEnumerator FrameDelay() { yield return null; if (OnRecalculateStats != null) { OnRecalculateStats(); } } public static GameObject ReturnObj(PickupObject pickup) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (!((Object)(object)player.PlayerHasCore() != (Object)null)) { continue; } HealthPickup component = ((Component)pickup).GetComponent(); if ((Object)(object)component != (Object)null) { bool flag = AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.PAST); if (component.healAmount == 0.5f) { pickup = ((Random.value < 0.02f && flag) ? PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID) : PickupObjectDatabase.GetById(Scrap.Scrap_ID)); } if (component.healAmount == 1f) { pickup = ((Random.value < 0.035f && flag) ? PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID) : PickupObjectDatabase.GetById(Scrap.Scrap_ID)); } } } return ((Component)pickup).gameObject; } public static void PickupHook(Action orig, Gun self, PlayerController player) { if ((Object)(object)player.PlayerHasCore() != (Object)null) { ChooseModuleController component = ((Component)self).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { component = ((Component)self).gameObject.AddComponent(); component.isAlt = player.IsUsingAlternateCostume; } else { component.Nudge(player); } return; } orig(self, player); for (int num = ((BraveBehaviour)self).transform.childCount - 1; num > -1; num--) { if (((Object)((BraveBehaviour)self).transform.GetChild(num)).name.Contains("VFX_MODULABLE")) { Object.Destroy((Object)(object)((Component)((BraveBehaviour)self).transform.GetChild(num)).gameObject); } } } public static void OnEnteredRangeHook(Action orig, Gun self, PlayerController player) { orig(self, player); if ((Object)(object)player.PlayerHasCore() != (Object)null && (Object)(object)((Component)self).gameObject.GetComponent() == (Object)null && (Object)(object)((Component)self).gameObject.GetComponent() == (Object)null) { ShittyVFXAttacher shittyVFXAttacher = ((Component)self).gameObject.AddComponent(); shittyVFXAttacher.wasUsingAltCostume = player.IsUsingAlternateCostume; } } public static void SetStencilValHook(Action orig, PlayerController player, int i) { if (!((Object)(object)((BraveBehaviour)((BraveBehaviour)player).sprite).renderer.material.shader == (Object)(object)StaticShaders.TransparencyShader) && Stencility_Enabled) { orig(player, i); } } public static void UpdateStencilValHook(Action orig, PlayerController player) { if (!((Object)(object)((BraveBehaviour)((BraveBehaviour)player).sprite).renderer.material.shader == (Object)(object)StaticShaders.TransparencyShader) && Stencility_Enabled) { orig(player); } } public static void HandleEnterHook(Action orig, BaseShopController self, PlayerController p) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 if (!self.m_hasBeenEntered && (int)self.baseShopType == 0) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (Object.op_Implicit((Object)(object)player.PlayerHasCore())) { ReinitializeHPTOModules(self); } } } orig(self, p); } public static void ReinitializeHPTOModules(BaseShopController self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Invalid comparison between Unknown and I4 //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Invalid comparison between Unknown and I4 if ((int)self.baseShopType != 0) { return; } for (int i = 0; i < self.m_itemControllers.Count; i++) { HealthPickup component = ((Component)self.m_itemControllers[i].item).GetComponent(); AmmoPickup component2 = ((Component)self.m_itemControllers[i].item).GetComponent(); if (!Object.op_Implicit((Object)(object)self.m_itemControllers[i]) || !Object.op_Implicit((Object)(object)self.m_itemControllers[i].item)) { continue; } bool flag = AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.PAST); if ((Object)(object)component != (Object)null) { Debug.Log((object)1); if (component.healAmount == 0.5f) { GameObject val = ((Random.value < 0.025f && flag) ? ((Component)PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID)).gameObject : ((Component)PickupObjectDatabase.GetById(Scrap.Scrap_ID)).gameObject); self.m_shopItems[i] = val; self.m_itemControllers[i].Initialize(val.GetComponent(), self); } if (component.healAmount == 1f) { GameObject val2 = ((Random.value < 0.0625f && flag) ? ((Component)PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID)).gameObject : ((Component)PickupObjectDatabase.GetById(Scrap.Scrap_ID)).gameObject); self.m_shopItems[i] = val2; self.m_itemControllers[i].Initialize(val2.GetComponent(), self); } } if ((Object)(object)component2 != (Object)null) { Debug.Log((object)2); if ((int)component2.mode == 2) { GameObject val3 = ((Random.value < 0.025f && flag) ? ((Component)PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID)).gameObject : ((Component)PickupObjectDatabase.GetById(Scrap.Scrap_ID)).gameObject); self.m_shopItems[i] = val3; self.m_itemControllers[i].Initialize(val3.GetComponent(), self); } if ((int)component2.mode == 1) { GameObject val4 = ((Random.value < 0.0625f && flag) ? ((Component)PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID)).gameObject : ((Component)PickupObjectDatabase.GetById(Scrap.Scrap_ID)).gameObject); self.m_shopItems[i] = val4; self.m_itemControllers[i].Initialize(val4.GetComponent(), self); } } } } public static void HandlePickupCurseParticlesHook(Action orig, PickupObject self) { orig(self); if (!((Object)(object)self != (Object)null)) { return; } ShittyVFXAttacher component = ((Component)self).gameObject.GetComponent(); ChooseModuleController component2 = ((Component)self).gameObject.GetComponent(); if ((Object)(object)component != (Object)null || !((Object)(object)GameManager.Instance != (Object)null) || GameManager.Instance.AllPlayers == null) { return; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((Object)(object)val != (Object)null) { ModulePrinterCore modulePrinterCore = val.PlayerHasCore(); if ((Object)(object)modulePrinterCore != (Object)null && (Object)(object)component == (Object)null && (Object)(object)component2 == (Object)null && ItemSynergyController.ModularSynergy.isSynergyItem(self.PickupObjectId)) { ShittyVFXAttacher shittyVFXAttacher = ((Component)self).gameObject.AddComponent(); shittyVFXAttacher.gameObj = VFXStorage.VFX__Synergy; shittyVFXAttacher.wasUsingAltCostume = val.IsUsingAlternateCostume; } else if (self is Gun && (Object)(object)modulePrinterCore != (Object)null && (Object)(object)component == (Object)null && (Object)(object)component2 == (Object)null) { ShittyVFXAttacher shittyVFXAttacher2 = ((Component)self).gameObject.AddComponent(); shittyVFXAttacher2.gameObj = VFXStorage.VFX_Modulable; shittyVFXAttacher2.wasUsingAltCostume = val.IsUsingAlternateCostume; } } } } } public class UIHooks { public static Action OnPaused; public static void Init() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(GameManager).GetMethod("Pause", BindingFlags.Instance | BindingFlags.Public), typeof(UIHooks).GetMethod("PauseHook", BindingFlags.Static | BindingFlags.Public)); } public static void PauseHook(Action orig, GameManager self) { if ((Object)(object)StarterGunSelectUIController.Inst != (Object)null) { StarterGunSelectUIController.Inst.ToggleUI(false, null, Instant: true); } CursorPatch.DisplayCursorOnController = false; dfPanel val = ScrapUIController.FindScrapUI(GameUIRoot.Instance); ((dfControl)val).isVisible = ScrapUIController.ScrapCounterVisible().First; ((Behaviour)val).enabled = ScrapUIController.ScrapCounterVisible().First; if (OnPaused != null) { OnPaused(); } orig(self); } } public class AdditionalEnergyInitializer { public static GameObject PowerUpVFX; public static void Init() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("PowerUpVFX_007")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("PowerUpAnimation").GetComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val3, "power_up", new Dictionary { { 1, "Play_WPN_plasmacell_reload_01" } }); PowerUpVFX = val; PickupObject byId = PickupObjectDatabase.GetById(421); BasicStatPickup val4 = (BasicStatPickup)(object)((byId is BasicStatPickup) ? byId : null); ((Component)val4).gameObject.AddComponent(); PickupObject byId2 = PickupObjectDatabase.GetById(422); BasicStatPickup val5 = (BasicStatPickup)(object)((byId2 is BasicStatPickup) ? byId2 : null); ((Component)val5).gameObject.AddComponent(); PickupObject byId3 = PickupObjectDatabase.GetById(423); BasicStatPickup val6 = (BasicStatPickup)(object)((byId3 is BasicStatPickup) ? byId3 : null); ((Component)val6).gameObject.AddComponent(); PickupObject byId4 = PickupObjectDatabase.GetById(424); BasicStatPickup val7 = (BasicStatPickup)(object)((byId4 is BasicStatPickup) ? byId4 : null); ((Component)val7).gameObject.AddComponent(); PickupObject byId5 = PickupObjectDatabase.GetById(425); BasicStatPickup val8 = (BasicStatPickup)(object)((byId5 is BasicStatPickup) ? byId5 : null); ((Component)val8).gameObject.AddComponent(); ((Component)PickupObjectDatabase.GetById(313)).gameObject.AddComponent(); ((Component)PickupObjectDatabase.GetById(570)).gameObject.AddComponent().AdditionalEnergy = 1f; ((Component)PickupObjectDatabase.GetById(132)).gameObject.AddComponent().AdditionalEnergy = 1f; ((Component)PickupObjectDatabase.GetById(131)).gameObject.AddComponent().AdditionalEnergy = 0.5f; ((Component)PickupObjectDatabase.GetById(116)).gameObject.AddComponent().AdditionalEnergy = 0.5f; ((Component)PickupObjectDatabase.GetById(134)).gameObject.AddComponent().AdditionalEnergy = 0.5f; ((Component)PickupObjectDatabase.GetById(260)).gameObject.AddComponent().AdditionalEnergy = 0.5f; new Hook((MethodBase)typeof(PassiveItem).GetMethod("Pickup", BindingFlags.Instance | BindingFlags.Public), typeof(AdditionalEnergyInitializer).GetMethod("PickupHook")); new Hook((MethodBase)typeof(PlayerItem).GetMethod("Pickup", BindingFlags.Instance | BindingFlags.Public), typeof(AdditionalEnergyInitializer).GetMethod("PickupHook_2")); } public static void PickupHook(Action orig, PassiveItem self, PlayerController player) { //IL_0040: 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) orig(self, player); if ((Object)(object)((Component)self).gameObject.GetComponent() != (Object)null && player.HasPassiveItem(ModulePrinterCore.ModulePrinterCoreID)) { GameObject val = ((GameActor)player).PlayEffectOnActor(PowerUpVFX, new Vector3(0f, 1.25f), true, false, false); val.GetComponent().PlayAndDestroyObject("power_up", (Action)null); } BasicStatPickup val2 = (BasicStatPickup)(object)((self is BasicStatPickup) ? self : null); if (val2 != null && player.HasPassiveItem(ModulePrinterCore.ModulePrinterCoreID) && val2.IsMasteryToken) { GameObject val3 = ((GameActor)player).PlayEffectOnActor(PowerUpVFX, new Vector3(0f, 1.25f), true, false, false); val3.GetComponent().PlayAndDestroyObject("power_up", (Action)null); } ShittyVFXAttacher component = ((Component)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } public static void PickupHook_2(Action orig, PlayerItem self, PlayerController player) { orig(self, player); ShittyVFXAttacher component = ((Component)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } } public class ModulePrinterCore : PassiveItem { public class ModuleContainer { public DefaultModule defaultModule; public string LabelName; public int ID; public DefaultModule.ModuleTier tier; public int Count; public List> FakeCount = new List>(); public int ActiveCount = 0; public List> TemporaryCount = new List>(); public bool WasEverFake = false; public bool isPurelyFake => Count == 0 && FakeCount.Count == 0 && (TemporaryCount.Count > 0 || WasEverFake); public Tuple ReturnFakeContainer(string Context) { IEnumerable> source = FakeCount.Where((Tuple self) => self.First == Context); if (source.Count() > 0) { return source.First(); } return null; } public Tuple ReturnTemporaryContainer(string Context) { IEnumerable> source = TemporaryCount.Where((Tuple self) => self.First == Context); if (source.Count() > 0) { return source.First(); } return null; } public int ReturnTemporaryCounts() { int num = 0; foreach (Tuple item in TemporaryCount) { num += item.Second; } return num; } public int ReturnFakeCounts() { int num = 0; foreach (Tuple item in FakeCount) { num += item.Second; } return num; } } public class AdditionalItemEnergyComponent : MonoBehaviour { public float AdditionalEnergy = 0.5f; } public class DeserializationHelper { public int ModuleID; public int ModuleCount; public int ModulePoweredCount; public List OtherData; } public static Gun currentGunslingKingGun; private bool b = false; private List processedRooms = new List(); public bool TemporaryDisableDrop = false; private static Color32 cyan_Color = new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100); private static Color32 green_Color = new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100); public float MovingForSeconds = 0f; public float StillForSeconds = 0f; public int CurrentItems = -1; private bool OverridePower = false; private float LastPower_Tick; private float LastTotal_Tick; private Dictionary DepoweredModuelNames = new Dictionary(); public Action OnPowerUsageHigherThanCapacity; public Action OnCritProjectileRolled; public Action OnCritProjectileFailRoll; public Action OnCritProjectileDestroyed; public Action OnCritProjectileHitEnemy; public Action OnCritProjectileHitWall; public List CritContexts = new List(); public bool NextShotCrit = false; public Action OnModularProjectileDestroyed; public static Action ModifyForChanceBullets; public static Action ModifyForChanceBulletsOneFrameDelay; public Action OnEnteredCombat; public Action OnDamaged; public Action OnGunReloaded; public Action OnKilledEnemy; public Action OnDamagedEnemy; public Action OnFrameUpdate; public Action OnPostProcessProjectile; public Action OnPostProcessBeamTick; public Action DodgedProjectile; public Action DodgedBeam; public Action RollStarted; public Action OnRoomCleared; public Action OnNewFloorStarted; public Action OnAnyModuleObtained; public Action OnPreEnemyHit; public Action TableFlipped; public Action TableFlipCompleted; public Func OnAboutToFallContext; public Action AttemptedToAttack; public Func ModifyScrapContext; public Action OnScrapped; public Action> OnCraftedItem; public Func VoluntaryMovement_Modifier; public Func InVoluntaryMovement_Modifier; public Action PlayerEnteredAnyRoom; public Action PlayerExitedAnyRoom; public Action OnPostProcessProjectileOneFrameDelay; public float StartingPower = 5f; public Func AdditionalPowerMods; public Action OnAnyModulePowered; public Action OnAnyModuleUnpowered; public ModularGunController ModularGunController; public static int ModulePrinterCoreID; public Action OnPreProjectileStickAction; public Action OnProjectileStickAction; public Action OnProjectileStickToWallAction; public Action OnStickyDestroyAction; public List stickyContexts = new List(); private List stored_Modifiers = new List(); public List> VolleysToRemoveOnSuddenDestruction = new List>(); public CloakDoer cloakDoer; public List ModuleContainers = new List(); public static void Init() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_009a: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown string text = "Modular Printer Core"; GameObject val = new GameObject(text); ModulePrinterCore modulePrinterCore = val.AddComponent(); ItemBuilder.AddSpriteToObject(text, "ModularMod/Sprites/Items/Item/modularprintercore.png", val, (Assembly)null); string text2 = "Self Sustainment"; string text3 = "The Heart of the Modular. Controls all hardware and software upgrades.\n\nTechnology originally purposed for keeping track of various non-lethal equipment, now used in machines of war."; ItemBuilder.SetupItem((PickupObject)(object)modulePrinterCore, text2, text3, "mdl"); ((PickupObject)modulePrinterCore).quality = (ItemQuality)(-50); ((PickupObject)modulePrinterCore).IgnoredByRat = true; ((PickupObject)modulePrinterCore).RespawnsIfPitfall = true; ((PickupObject)modulePrinterCore).UsesCustomCost = true; ((PickupObject)modulePrinterCore).CustomCost = 25; ((PickupObject)modulePrinterCore).CanBeDropped = false; ((PassiveItem)modulePrinterCore).passiveStatModifiers = (StatModifier[])(object)new StatModifier[1] { new StatModifier { amount = 1f, ignoredForSaveData = false, statToBoost = (StatType)8, modifyType = (ModifyMethod)0 } }; ModulePrinterCoreID = ((PickupObject)modulePrinterCore).PickupObjectId; EncounterDatabase.GetEntry(((BraveBehaviour)modulePrinterCore).encounterTrackable.EncounterGuid).usesPurpleNotifications = true; ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Additional Sight", "lichs_eye_bullets")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Allocation", "unity")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Chaos, Chaos!", "chance_bullets")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Wish I could have one of those!", "magazine_rack")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Up", "heart_holster")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Up", "heart_lunchbox")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Up", "heart_locket")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Up", "heart_bottle")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Up", "heart_purse")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Poison Power", "monster_blood")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Internal", "yellow_chamber")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Money = Power", "ring_of_miserly_protection")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Full Potential", "utility_belt")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("System Upgrade", "ammo_synthesizer")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Power Bank", "ammo_belt")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Relics Of The Past", "sprun")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Rotational Power", "pink_guon_stone")); ItemSynergyController.ModularSynergy.synergizing_Items.Add(new ItemSynergyController.ModularSynergy("Triple Crit", "turkey")); new Hook((MethodBase)typeof(SpawnGunslingGun).GetMethod("OnEnter", BindingFlags.Instance | BindingFlags.Public), typeof(ModulePrinterCore).GetMethod("GunslingKingGunCheck")); ((PickupObject)modulePrinterCore).associatedItemChanceMods = (LootModData[])(object)new LootModData[1] { new LootModData { AssociatedPickupId = ConfidenceCore.ConfidenceCoreID, DropRateMultiplier = 0f } }; } public static void GunslingKingGunCheck(Action orig, SpawnGunslingGun self) { TalkDoerLite component = ((FsmStateAction)self).Owner.GetComponent(); PlayerController val = ((!Object.op_Implicit((Object)(object)component.TalkingPlayer)) ? GameManager.Instance.PrimaryPlayer : component.TalkingPlayer); SelectGunslingGun val2 = ((BraveFsmStateAction)self).FindActionOfType(); CheckGunslingChallengeComplete val3 = ((BraveFsmStateAction)self).FindActionOfType(); if (val2 != null) { GameObject selectedObject = val2.SelectedObject; currentGunslingKingGun = selectedObject.GetComponent(); Gun val4 = LootEngine.TryGiveGunToPlayer(selectedObject, val, false); if (Object.op_Implicit((Object)(object)val4)) { ((PickupObject)val4).CanBeDropped = false; ((PickupObject)val4).CanBeSold = false; val4.IsMinusOneGun = true; currentGunslingKingGun = val4; if (val3 != null) { val3.GunToUse = val4; val3.GunToUsePrefab = val2.SelectedObject.GetComponent(); } } } ((FsmStateAction)self).Finish(); } public override void Pickup(PlayerController player) { //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown ((PassiveItem)this).Pickup(player); player.OnEnteredCombat = (Action)Delegate.Combine(player.OnEnteredCombat, new Action(PlayerEnteredCombat)); player.OnReceivedDamage += OnRecievedDamage; player.OnReloadedGun = (Action)Delegate.Combine(player.OnReloadedGun, new Action(OnReloadedGun)); player.OnKilledEnemyContext += OnKilledEnemyContext; player.OnDealtDamageContext += OnDealtDamageContext; player.PostProcessProjectile += PostProcessProjectile; player.PostProcessBeamTick += PostProcessBeamTick; player.OnDodgedProjectile += OnDodgedProjectile; player.OnDodgedBeam += OnDodgedBeam; player.OnRollStarted += OnRollStarted; player.OnRoomClearEvent += OnRoomClearEvent; player.GunChanged += Player_GunChanged; player.OnNewFloorLoaded = (Action)Delegate.Combine(player.OnNewFloorLoaded, new Action(NewFloorLoaded)); ((GameActor)player).OnAboutToFall = (Func)Delegate.Combine(((GameActor)player).OnAboutToFall, new Func(OnAboutToFall)); player.OnTableFlipped = (Action)Delegate.Combine(player.OnTableFlipped, new Action(OnTableFlipped)); player.OnTableFlipCompleted = (Action)Delegate.Combine(player.OnTableFlipCompleted, new Action(OnTableFlipCompletely)); ((GameActor)player).MovementModifiers += new MovementModifier(MovementMod); player.OnTriedToInitiateAttack += OnAttemptedAttack; cloakDoer = ScriptableObject.CreateInstance(); cloakDoer.DoStartUp(player); if (Object.op_Implicit((Object)(object)GameManager.Instance.Dungeon)) { for (int i = 0; i < GameManager.Instance.Dungeon.data.rooms.Count; i++) { RoomHandler val = GameManager.Instance.Dungeon.data.rooms[i]; val.Entered += new OnEnteredEventHandler(OnAnyRoomEntered); val.Exited += new OnExitedEventHandler(OnAnyRoomExited); processedRooms.Add(val); } } ((MonoBehaviour)this).StartCoroutine(DoGunWait()); } private IEnumerator DoGunWait() { while ((Object)(object)((GameActor)((PassiveItem)this).Owner).CurrentGun == (Object)null) { yield return null; } ((PassiveItem)this).Owner.startingGunIds = new List(); ((PassiveItem)this).Owner.startingGunIds.Add(((Component)((GameActor)((PassiveItem)this).Owner).CurrentGun).GetComponent().isAlt ? DefaultArmCannonAlt.ID : DefaultArmCannon.ID); ((Component)((GameActor)((PassiveItem)this).Owner).CurrentGun).GetComponent().PrinterSelf = this; } public void OnAttemptedAttack(PlayerController p) { if (AttemptedToAttack != null) { AttemptedToAttack(this, p); } } public override DebrisObject Drop(PlayerController player) { //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown player.OnEnteredCombat = (Action)Delegate.Remove(player.OnEnteredCombat, new Action(PlayerEnteredCombat)); player.OnReceivedDamage -= OnRecievedDamage; player.OnReloadedGun = (Action)Delegate.Remove(player.OnReloadedGun, new Action(OnReloadedGun)); player.OnKilledEnemyContext -= OnKilledEnemyContext; player.OnDealtDamageContext -= OnDealtDamageContext; player.PostProcessProjectile -= PostProcessProjectile; player.PostProcessBeamTick -= PostProcessBeamTick; player.OnDodgedProjectile -= OnDodgedProjectile; player.OnDodgedBeam -= OnDodgedBeam; player.OnRollStarted -= OnRollStarted; player.OnRoomClearEvent -= OnRoomClearEvent; player.GunChanged -= Player_GunChanged; player.OnNewFloorLoaded = (Action)Delegate.Remove(player.OnNewFloorLoaded, new Action(NewFloorLoaded)); ((GameActor)player).OnAboutToFall = (Func)Delegate.Remove(((GameActor)player).OnAboutToFall, new Func(OnAboutToFall)); player.OnTableFlipped = (Action)Delegate.Remove(player.OnTableFlipped, new Action(OnTableFlipped)); player.OnTableFlipCompleted = (Action)Delegate.Remove(player.OnTableFlipCompleted, new Action(OnTableFlipCompletely)); ((GameActor)player).MovementModifiers -= new MovementModifier(MovementMod); player.OnTriedToInitiateAttack -= OnAttemptedAttack; return ((PassiveItem)this).Drop(player); } public void NewFloorLoaded(PlayerController player) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown b = !b; if (!b) { return; } if (Object.op_Implicit((Object)(object)player) && OnNewFloorStarted != null) { OnNewFloorStarted(this, player); } if (Object.op_Implicit((Object)(object)GameManager.Instance.Dungeon)) { for (int i = 0; i < GameManager.Instance.Dungeon.data.rooms.Count; i++) { RoomHandler val = GameManager.Instance.Dungeon.data.rooms[i]; if (!processedRooms.Contains(val)) { val.Entered += new OnEnteredEventHandler(OnAnyRoomEntered); val.Exited += new OnExitedEventHandler(OnAnyRoomExited); processedRooms.Add(val); } } } for (int num = processedRooms.Count - 1; num > -1; num--) { if (processedRooms[num] == null) { processedRooms.RemoveAt(num); } } } public void MovementMod(ref Vector2 voluntaryVel, ref Vector2 involuntaryVel) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) if (VoluntaryMovement_Modifier != null) { float num = 1f; Delegate[] invocationList = VoluntaryMovement_Modifier.GetInvocationList(); Delegate[] array = invocationList; for (int i = 0; i < array.Length; i++) { num += (float)array[i]?.DynamicInvoke(voluntaryVel, this, ((PassiveItem)this).Owner); } voluntaryVel *= num; } if (InVoluntaryMovement_Modifier != null) { float num2 = 1f; Delegate[] invocationList2 = InVoluntaryMovement_Modifier.GetInvocationList(); Delegate[] array2 = invocationList2; for (int j = 0; j < array2.Length; j++) { num2 += (float)array2[j]?.DynamicInvoke(involuntaryVel, this, ((PassiveItem)this).Owner); } involuntaryVel *= num2; } } public void OnTableFlipCompletely(FlippableCover table) { if (TableFlipCompleted != null) { TableFlipCompleted(this, ((PassiveItem)this).Owner, table); } } public void OnTableFlipped(FlippableCover table) { if (TableFlipped != null) { TableFlipped(this, ((PassiveItem)this).Owner, table); } } public bool OnAboutToFall(bool b) { if (OnAboutToFallContext != null) { b = OnAboutToFallContext(this, ((PassiveItem)this).Owner); } return !b; } public static Color ColorToUse(PlayerController p) { //IL_0010: 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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) return Color32.op_Implicit(p.IsUsingAlternateCostume ? green_Color : cyan_Color); } private void Player_GunChanged(Gun oldGun, Gun newGun, bool isNewGun) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) if (TemporaryDisableDrop) { return; } if ((Object)(object)((Component)newGun).GetComponent() != (Object)null) { UpdateModularGunController(); } else if ((Object)(object)((Component)newGun).GetComponent() == (Object)(object)ModularGunController) { UpdateModularGunController(); } else if (((PickupObject)newGun).PickupObjectId == 251 || AlexandriaTags.HasTag((PickupObject)(object)newGun, "modular_special_override")) { if (isNewGun) { ModifiedDefaultLabelManager modifiedDefaultLabelManager = Toolbox.GenerateText(((BraveBehaviour)((PassiveItem)this).Owner).transform, new Vector2(1.5f, 0.5f), 0.5f, "Gun Override Detected :\nWeapon Will Not Be Dropped.", Color32.op_Implicit(ColorToUse(((PassiveItem)this).Owner))); ((MonoBehaviour)modifiedDefaultLabelManager).Invoke("Inv", 3.5f); } } else if ((Object)(object)currentGunslingKingGun != (Object)null) { ((MonoBehaviour)this).StartCoroutine(FrameDelay(newGun)); } else { ((PassiveItem)this).Owner.ForceDropGun(newGun); } } private IEnumerator FrameDelay(Gun g) { yield return null; if ((Object)(object)g == (Object)(object)currentGunslingKingGun) { ModifiedDefaultLabelManager t = Toolbox.GenerateText(((BraveBehaviour)((PassiveItem)this).Owner).transform, new Vector2(1.5f, 0.5f), 0.5f, "Gun Override Detected :\nWeapon Will Not Be Dropped.", Color32.op_Implicit(ColorToUse(((PassiveItem)this).Owner))); ((MonoBehaviour)t).Invoke("Inv", 3.5f); } else { ((PassiveItem)this).Owner.ForceDropGun(g); } } private void OnAnyRoomEntered(PlayerController player) { if (PlayerEnteredAnyRoom != null) { PlayerEnteredAnyRoom(this, ((PassiveItem)this).Owner, ((PassiveItem)this).Owner.CurrentRoom); } } private void OnAnyRoomExited() { if (PlayerExitedAnyRoom != null) { PlayerExitedAnyRoom(this, ((PassiveItem)this).Owner, ((PassiveItem)this).Owner.CurrentRoom); } } public void OnRoomClearEvent(PlayerController p) { if (!((Object)(object)p == (Object)null) && p.CurrentRoom != null && OnRoomCleared != null) { OnRoomCleared(this, p, p.CurrentRoom); } } public void OnRollStarted(PlayerController p, Vector2 vector) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (RollStarted != null && (Object)(object)p != (Object)null) { RollStarted(this, p, vector); } } public void OnDodgedBeam(BeamController b, PlayerController p) { if (DodgedBeam != null && (Object)(object)p != (Object)null) { DodgedBeam(this, b, p); } } public void OnDodgedProjectile(Projectile p) { if (!((Object)(object)((PassiveItem)this).Owner == (Object)null) && DodgedProjectile != null && (Object)(object)p != (Object)null) { DodgedProjectile(this, p, ((PassiveItem)this).Owner); } } public void UpdateModularGunController() { if (!((Object)(object)this == (Object)null) && !((Object)(object)((PassiveItem)this).Owner == (Object)null) && !((Object)(object)((GameActor)((PassiveItem)this).Owner).CurrentGun == (Object)null) && !((Object)(object)ModularGunController != (Object)null)) { ModularGunController = ((Component)((GameActor)((PassiveItem)this).Owner).CurrentGun).GetComponent(); if (Object.op_Implicit((Object)(object)ModularGunController)) { ModularGunController.Start(); } } } public override void Update() { //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) ((PassiveItem)this).Update(); if ((Object)(object)((PassiveItem)this).Owner == (Object)null) { return; } if (isStandingStill()) { StillForSeconds += BraveTime.DeltaTime; if (MovingForSeconds > 0f) { MovingForSeconds = 0f; } } else { MovingForSeconds += BraveTime.DeltaTime; if (StillForSeconds > 0f) { StillForSeconds = 0f; } } if (OnFrameUpdate != null && Object.op_Implicit((Object)(object)((PassiveItem)this).Owner)) { OnFrameUpdate(this, ((PassiveItem)this).Owner); } if (Object.op_Implicit((Object)(object)ModularGunController)) { ModularGunController.ProcessStats(); } LastPower_Tick = ReturnPowerConsumption(); LastTotal_Tick = ReturnTotalPower(); if (CurrentItems != ((PassiveItem)this).Owner.passiveItems.Count) { CurrentItems = ((PassiveItem)this).Owner.passiveItems.Count; if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR) && ((PassiveItem)this).Owner.HasPickupID(469) && ((PassiveItem)this).Owner.HasPickupID(471) && ((PassiveItem)this).Owner.HasPickupID(468) && ((PassiveItem)this).Owner.HasPickupID(470) && ((PassiveItem)this).Owner.HasPickupID(467)) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "Shrapnel Launcher", StaticCollections.Gun_Collection.GetSpriteIdByName("flakcannon_idle_001"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR, value: true); } } if (!(LastPower_Tick > LastTotal_Tick) || OverridePower) { return; } if (OnPowerUsageHigherThanCapacity != null) { OnPowerUsageHigherThanCapacity(this, ((PassiveItem)this).Owner); } DepoweredModuelNames = new Dictionary(); while (LastPower_Tick > LastTotal_Tick) { List list = new List(); list.AddRange(ModuleContainers.Where((ModuleContainer self) => self.ActiveCount > 0)); BraveUtility.Shuffle(list); for (int i = 0; i < list.Count; i++) { DefaultModule defaultModule = list[i].defaultModule; DepowerModule(defaultModule); if (!DepoweredModuelNames.ContainsKey(defaultModule.LabelName)) { DepoweredModuelNames.Add(defaultModule.LabelName, 1); } else { DepoweredModuelNames[defaultModule.LabelName]++; } LastPower_Tick = ReturnPowerConsumption(); if (LastPower_Tick != LastTotal_Tick && !(LastPower_Tick < LastTotal_Tick)) { continue; } string text = ""; foreach (KeyValuePair depoweredModuelName in DepoweredModuelNames) { text = text + "\n" + depoweredModuelName.Key + " : " + StaticColorHexes.AddColorToLabelString(depoweredModuelName.Value.ToString(), StaticColorHexes.Orange_Hex); } AkSoundEngine.PostEvent("Play_ENM_hammer_target_01", ((Component)((PassiveItem)this).Owner).gameObject); ModifiedDefaultLabelManager modifiedDefaultLabelManager = Toolbox.GenerateText(((BraveBehaviour)((PassiveItem)this).Owner).transform, new Vector2(2f, 2f), 0.5f, StaticColorHexes.AddColorToLabelString("! WARNING !", StaticColorHexes.Red_Color_Hex) + "\nPOWER USAGE EXCEEDED LIMIT.\nDepowered:" + text, Color32.op_Implicit(ColorToUse(((PassiveItem)this).Owner)), Autotrigger: true, 4f); modifiedDefaultLabelManager.Trigger_CustomTime(((BraveBehaviour)((PassiveItem)this).Owner).transform, Vector2.op_Implicit(new Vector2(2f, 2f)), 0.5f, 4f); return; } } } public void PostProcessBeamTick(BeamController b, SpeculativeRigidbody hitRigidbody, float f) { if (!((Object)(object)((PassiveItem)this).Owner == (Object)null) && OnPostProcessBeamTick != null && (Object)(object)b != (Object)null && (Object)(object)hitRigidbody != (Object)null) { OnPostProcessBeamTick.Invoke(this, b, hitRigidbody, f, ((PassiveItem)this).Owner); } } public void PostProcessProjectile(Projectile p, float f) { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown if ((Object)(object)((PassiveItem)this).Owner == (Object)null) { return; } bool flag = false; if (CritContexts.Count() > 0 || NextShotCrit) { CriticalHitComponent orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.player = ((PassiveItem)this).Owner; orAddComponent.critContexts.AddRange(CritContexts); orAddComponent.OnCritProc = OnCritProjectileRolled; orAddComponent.OnCritFailed = OnCritProjectileFailRoll; flag = orAddComponent.Process(NextShotCrit); if (NextShotCrit) { NextShotCrit = !NextShotCrit; } if (flag) { orAddComponent.OnCritDestroyed = OnCritProjectileDestroyed; orAddComponent.OnCritHitEnemy = OnCritProjectileHitEnemy; orAddComponent.OnCritHitWall = OnCritProjectileHitWall; } } if (OnProjectileStickAction != null) { StickyProjectileModifier stickyProjectileModifier = ((Component)p).gameObject.AddComponent(); stickyProjectileModifier.OnStick = OnProjectileStickAction; if (OnStickyDestroyAction != null) { stickyProjectileModifier.OnStickyDestroyed = OnStickyDestroyAction; } if (OnPreProjectileStickAction != null) { stickyProjectileModifier.OnPreStick = OnPreProjectileStickAction; } if (OnProjectileStickToWallAction != null) { stickyProjectileModifier.OnStickToWall = OnProjectileStickToWallAction; } stickyProjectileModifier.stickyContexts = stickyContexts; } if (OnPostProcessProjectile != null && (Object)(object)p != (Object)null) { OnPostProcessProjectile.Invoke(this, p, f, ((PassiveItem)this).Owner, flag); } SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); if (((PassiveItem)this).Owner.HasPickupID(521)) { DoChanceBulletProc(p, f); } if (OnPostProcessProjectileOneFrameDelay != null || ModifyForChanceBulletsOneFrameDelay != null) { ((MonoBehaviour)p).StartCoroutine(FrameDelay(p, this, 1f, flag)); } p.OnDestruction += HandleProjectileDestruction; } private void HandleProjectileDestruction(Projectile source) { if (Object.op_Implicit((Object)(object)source) && OnModularProjectileDestroyed != null) { OnModularProjectileDestroyed(this, source, source.HasImpactedEnemy); } } public IEnumerator FrameDelay(Projectile p, ModulePrinterCore modulePrinterCore, float f, bool IsCrit) { yield return null; if (OnPostProcessProjectileOneFrameDelay != null) { OnPostProcessProjectileOneFrameDelay.Invoke(modulePrinterCore, p, f, ((PassiveItem)this).Owner, IsCrit); } if (((PassiveItem)modulePrinterCore).Owner.HasPickupID(521) && ModifyForChanceBulletsOneFrameDelay != null) { ModifyForChanceBulletsOneFrameDelay(this, p, f, ((PassiveItem)this).Owner); } } public void DoChanceBulletProc(Projectile p, float f) { //IL_0288: Unknown result type (might be due to invalid IL or missing references) if (Random.value < 0.125f) { BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.ExplodeOnEnemyBounce = Random.value < 0.1f; orAddComponent.damageMultiplierOnBounce += Random.Range(0.75f, 1.25f); orAddComponent.chanceToDieOnBounce += Random.Range(0f, 0.2f); orAddComponent.bouncesTrackEnemies = Random.value < 0.2f; orAddComponent.bounceTrackRadius += Random.Range(1f, 25f); } if (Random.value < 0.125f) { PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.penetration += Random.Range(1, 5); if (Random.value < 0.3f) { MaintainDamageOnPierce orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent3.damageMultOnPierce *= Random.Range(1.01f, 1.5f); } } if (Random.value < 0.05f) { HomingModifier orAddComponent4 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent4.AngularVelocity += Random.Range(60f, 1080f); orAddComponent4.HomingRadius += Random.Range(1f, 25f); } p.AppliesPoison = true; p.PoisonApplyChance = Random.Range(0.01f, 1f); p.healthEffect = DebuffStatics.irradiatedLeadEffect; p.AppliesFire = true; p.FireApplyChance = Random.Range(0.1f, 1f); p.fireEffect = (((double)Random.value < 0.2) ? DebuffStatics.greenFireEffect : DebuffStatics.hotLeadEffect); p.AppliesFreeze = true; p.FreezeApplyChance = Random.Range(0.1f, 1f); p.freezeEffect = DebuffStatics.frostBulletsEffect; p.AppliesCheese = true; p.CheeseApplyChance = Random.Range(0.02f, 0.5f); p.cheeseEffect = DebuffStatics.cheeseeffect; p.AppliesCharm = true; p.CharmApplyChance = Random.Range(0.02f, 0.5f); p.charmEffect = DebuffStatics.charmingRoundsEffect; p.CanTransmogrify = true; p.ChanceToTransmogrify = 0.00333f; p.AdjustPlayerProjectileTint(new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f)), 10, 0f); if (ModifyForChanceBullets != null) { ModifyForChanceBullets(this, p, f, ((PassiveItem)this).Owner); } } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null && Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)oR).healthHaver).aiActor) && OnPreEnemyHit != null) { OnPreEnemyHit(this, ((PassiveItem)this).Owner, ((BraveBehaviour)((BraveBehaviour)oR).healthHaver).aiActor, ((BraveBehaviour)mR).projectile); } } public void OnDealtDamageContext(PlayerController p, float f, bool b, HealthHaver h) { if (OnDamagedEnemy != null && (Object)(object)((BraveBehaviour)h).aiActor != (Object)null) { OnDamagedEnemy(this, p, ((BraveBehaviour)h).aiActor, f); } } public void OnKilledEnemyContext(PlayerController p, HealthHaver h) { if (OnKilledEnemy != null && (Object)(object)((BraveBehaviour)h).aiActor != (Object)null) { OnKilledEnemy(this, p, ((BraveBehaviour)h).aiActor); } } public void OnReloadedGun(PlayerController p, Gun g) { if (OnGunReloaded != null) { OnGunReloaded(this, p, g); } } public void OnRecievedDamage(PlayerController p) { if (OnDamaged != null) { OnDamaged(this, p); } } public void PlayerEnteredCombat() { if (!((Object)(object)((PassiveItem)this).Owner == (Object)null) && ((PassiveItem)this).Owner.CurrentRoom != null && OnEnteredCombat != null) { OnEnteredCombat(this, ((PassiveItem)this).Owner.CurrentRoom, ((PassiveItem)this).Owner); } } public bool isStandingStill() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((PassiveItem)this).Owner == (Object)null) { return false; } return ((GameActor)((PassiveItem)this).Owner).Velocity == new Vector2(0f, 0f); } public float ReturnTotalPower() { float num = StartingPower; if (AdditionalPowerMods != null) { num += AdditionalPowerMods(this); } if ((Object)(object)((PassiveItem)this).Owner != (Object)null && ((PassiveItem)this).Owner.passiveItems != null) { foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems) { if ((Object)(object)passiveItem != (Object)null) { BasicStatPickup val = (BasicStatPickup)(object)((passiveItem is BasicStatPickup) ? passiveItem : null); if (val != null && val.IsMasteryToken) { num += 1f; } if ((Object)(object)((Component)passiveItem).gameObject != (Object)null && (Object)(object)((Component)passiveItem).gameObject.GetComponent() != (Object)null) { num += ((Component)passiveItem).gameObject.GetComponent().AdditionalEnergy; } } } } if ((Object)(object)ModularGunController != (Object)null) { num += (float)ModularGunController.AdditionalPowerSupply; } return num; } public int ReturnPowerCellCount() { int num = 0; foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems) { if (passiveItem is PowerCell) { num++; } } return num; } public float ReturnTotalPowerMasteryless() { float num = StartingPower; if (AdditionalPowerMods != null) { num += AdditionalPowerMods(this); } foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems) { if ((Object)(object)((Component)passiveItem).gameObject.GetComponent() != (Object)null) { num += ((Component)passiveItem).gameObject.GetComponent().AdditionalEnergy; } } if ((Object)(object)ModularGunController != (Object)null) { num += (float)ModularGunController.AdditionalPowerSupply; } return num; } public float ReturnPowerConsumption() { float num = 0f; for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { num += ReturnPowerConsumption(ModuleContainers[i].defaultModule); } } return num; } public float ReturnRemainingPower() { float num = 0f; for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { num += ReturnPowerConsumption(ModuleContainers[i].defaultModule); } } return ReturnTotalPower() - num; } public float ReturnPowerConsumption(DefaultModule module) { float num = 0f; for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { DefaultModule defaultModule = ModuleContainers[i].defaultModule; if (defaultModule.LabelName == module.LabelName) { num = ((defaultModule.powerConsumptionData == null) ? (num + (defaultModule.EnergyConsumption + defaultModule.EnergyConsumption * (float)(defaultModule.ActiveStack() - 1) / 2f)) : ((defaultModule.powerConsumptionData.OverridePowerManagement == null) ? ((defaultModule.powerConsumptionData.FirstStack == -420f && defaultModule.powerConsumptionData.AdditionalStacks == -69f) ? (num + (defaultModule.EnergyConsumption + defaultModule.EnergyConsumption * (float)(defaultModule.ActiveStack() - 1) / 2f)) : (num + (defaultModule.powerConsumptionData.FirstStack + defaultModule.powerConsumptionData.AdditionalStacks * (float)(defaultModule.ActiveStack() - 1)))) : (num + defaultModule.powerConsumptionData.OverridePowerManagement(defaultModule, ReturnActiveStack(defaultModule.LabelName))))); } } } return num; } public float ReturnPowerConsumptionOfNextStack(DefaultModule module, int stacksToIncrement = 1, bool Local = false) { float num = 0f; for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { DefaultModule defaultModule = ModuleContainers[i].defaultModule; if (ModuleContainers[i].defaultModule.LabelName == module.LabelName) { num = ((ModuleContainers[i].defaultModule.powerConsumptionData == null) ? (num + ((ReturnActiveStack(defaultModule.LabelName) == 0) ? defaultModule.EnergyConsumption : (defaultModule.EnergyConsumption + defaultModule.EnergyConsumption * (float)(defaultModule.ActiveStack() - 1 + stacksToIncrement)))) : ((defaultModule.powerConsumptionData.OverridePowerManagement == null) ? (num + ((ReturnActiveStack(defaultModule.LabelName) == 0) ? defaultModule.powerConsumptionData.FirstStack : (defaultModule.powerConsumptionData.FirstStack + defaultModule.powerConsumptionData.AdditionalStacks * (float)(defaultModule.ActiveStack() - 1 + stacksToIncrement)))) : (num + defaultModule.powerConsumptionData.OverridePowerManagement(defaultModule, (ReturnActiveStack(defaultModule.LabelName) == 0) ? 1 : (ReturnActiveStack(defaultModule.LabelName) + stacksToIncrement))))); } else if (!Local) { num += ReturnPowerConsumption(ModuleContainers[i].defaultModule); } } } return num; } public void DepowerModule(DefaultModule self, int Amount_To_Remove = 1) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { if (!(ModuleContainers[i].LabelName == self.LabelName)) { continue; } for (int j = 0; j < Amount_To_Remove; j++) { if (ModuleContainers[i].ActiveCount == 0) { return; } ModuleContainers[i].ActiveCount--; ModuleContainers[i].defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); if (ModuleContainers[i].ActiveCount == 0 && ModuleContainers[i].TemporaryCount.Count == 0) { ModuleContainers[i].defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); } } if (OnAnyModuleUnpowered != null) { OnAnyModuleUnpowered(this, self, Amount_To_Remove); } } else { ModuleContainers.Remove(ModuleContainers[i]); } } if (Object.op_Implicit((Object)(object)((PassiveItem)this).Owner)) { ((PassiveItem)this).Owner.stats.RecalculateStats(((PassiveItem)this).Owner, false, false); } } public void PowerModule(DefaultModule self, int Amount_To_Add = 1) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { if (!(ModuleContainers[i].LabelName == self.LabelName)) { continue; } for (int j = 0; j < Amount_To_Add; j++) { if (ModuleContainers[i].ActiveCount == 0 && ModuleContainers[i].TemporaryCount.Count == 0) { ModuleContainers[i].defaultModule.OnFirstPickup(this, ModularGunController, ((PassiveItem)this).Owner); } ModuleContainers[i].ActiveCount++; ModuleContainers[i].defaultModule.OnAnyPickup(this, ModularGunController, ((PassiveItem)this).Owner, IsTruePickup: false); } if (OnAnyModulePowered != null) { OnAnyModulePowered(this, self, Amount_To_Add); } } else { ModuleContainers.Remove(ModuleContainers[i]); } } if (Object.op_Implicit((Object)(object)((PassiveItem)this).Owner)) { ((PassiveItem)this).Owner.stats.RecalculateStats(((PassiveItem)this).Owner, false, false); } } public bool AddModule(DefaultModule self, PlayerController player, bool DisableOnAnyModuleObtained = false) { if (OnAnyModuleObtained != null && !DisableOnAnyModuleObtained) { OnAnyModuleObtained(this, player, self); } for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i].LabelName == self.LabelName) { ModuleContainers[i].Count++; return false; } } ModuleContainer moduleContainer = new ModuleContainer { LabelName = self.LabelName, tier = self.Tier, ID = ((PickupObject)self).PickupObjectId, Count = 1, defaultModule = self }; moduleContainer.defaultModule.Stored_Core = this; ModuleContainers.Add(moduleContainer); return true; } public int ReturnStack(string LabelName, bool UseTemporaryStack = true) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i].LabelName == LabelName) { if (ModuleContainers[i].ActiveCount == 0 && !ModuleContainers[i].isPurelyFake) { return 0; } return ModuleContainers[i].ActiveCount + (UseTemporaryStack ? (ReturnFakeStack(LabelName) + ReturnTemporaryStack(LabelName)) : 0); } } return 0; } public int ReturnTrueStack(string LabelName) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i].LabelName == LabelName) { return ModuleContainers[i].Count; } } return 0; } public int ReturnActiveStack(string LabelName) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i].LabelName == LabelName) { return ModuleContainers[i].ActiveCount; } } return 0; } public int ReturnActiveTotal() { int num = 0; for (int i = 0; i < ModuleContainers.Count; i++) { num += ModuleContainers[i].ActiveCount; } return num; } public int ReturnFakeStack(string LabelName) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i].LabelName == LabelName) { int num = 0; for (int j = 0; j < ModuleContainers[i].FakeCount.Count; j++) { num += ModuleContainers[i].FakeCount[j].Second; } return num; } } return 0; } public int ReturnTemporaryStack(string LabelName) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i].LabelName == LabelName) { int num = 0; for (int j = 0; j < ModuleContainers[i].TemporaryCount.Count; j++) { num += ModuleContainers[i].TemporaryCount[j].Second; } return num; } } return 0; } public int RemoveModule(DefaultModule self, int Amount_To_Remove = 1) { int num = 0; int num2 = ModuleContainers.Count - 1; while (num2 > -1) { if (ModuleContainers[num2] != null) { if (ModuleContainers[num2].LabelName == self.LabelName) { for (int i = 0; i < Amount_To_Remove; i++) { if (ModuleContainers[num2].Count == 1) { ModuleContainers[num2].defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers[num2].defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers.Remove(ModuleContainers[num2]); return num + 1; } ModuleContainers[num2].Count--; ModuleContainers[num2].defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); if (ModuleContainers[num2].Count < ModuleContainers[num2].ActiveCount) { ModuleContainers[num2].ActiveCount--; } num++; if (ModuleContainers[num2].Count == 0) { ModuleContainers[num2].defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers.Remove(ModuleContainers[num2]); return num; } } } num2--; continue; } ModuleContainers.Remove(ModuleContainers[num2]); return 0; } return 0; } public void RemoveModule(int ID, int Amount_To_Remove = 1) { for (int i = 0; i < ModuleContainers.Count; i++) { if (ModuleContainers[i] != null) { if (!(ModuleContainers[i].LabelName == (PickupObjectDatabase.GetById(ID) as DefaultModule).LabelName)) { continue; } for (int j = 0; j < Amount_To_Remove; j++) { if (ModuleContainers[i].Count == 1) { ModuleContainers[i].defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers[i].defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers.Remove(ModuleContainers[i]); return; } ModuleContainers[i].Count--; ModuleContainers[i].defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); if (ModuleContainers[i].Count < ModuleContainers[i].ActiveCount) { ModuleContainers[i].ActiveCount--; } if (ModuleContainers[i].Count == 0) { ModuleContainers[i].defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers.Remove(ModuleContainers[i]); return; } } } else { ModuleContainers.Remove(ModuleContainers[i]); } } } public ModuleContainer GiveTemporaryModule(DefaultModule module, string Context, int Amount_Of_Fakes, bool doVFX = false) { if (doVFX) { VFXStorage.DoFancyFlashOfModules(Amount_Of_Fakes, ((PassiveItem)this).Owner, module); } IEnumerable source = ModuleContainers.Where((ModuleContainer self) => self.defaultModule.LabelName == module.LabelName); if (source.Count() > 0) { ModuleContainer moduleContainer = source.First(); IEnumerable> source2 = moduleContainer.TemporaryCount.Where((Tuple self) => self.First == Context); if (source2.Count() > 0) { moduleContainer.defaultModule.OnAnyPickup(this, ModularGunController, ((PassiveItem)this).Owner, IsTruePickup: false); Tuple obj = source2.First(); obj.Second += Amount_Of_Fakes; } else { moduleContainer.TemporaryCount.Add(new Tuple(Context, Amount_Of_Fakes)); moduleContainer.defaultModule.OnAnyPickup(this, ModularGunController, ((PassiveItem)this).Owner, IsTruePickup: false); if (moduleContainer.ActiveCount == 0) { moduleContainer.defaultModule.OnFirstPickup(this, ModularGunController, ((PassiveItem)this).Owner); } } return moduleContainer; } ModuleContainer moduleContainer2 = new ModuleContainer { LabelName = module.LabelName, tier = module.Tier, ID = ((PickupObject)module).PickupObjectId, Count = 0, defaultModule = module, TemporaryCount = new List> { new Tuple(Context, Amount_Of_Fakes) }, WasEverFake = true }; moduleContainer2.defaultModule.Stored_Core = this; ModuleContainers.Add(moduleContainer2); for (int i = 0; i < Amount_Of_Fakes; i++) { if (i == 0) { moduleContainer2.defaultModule.OnFirstPickup(this, ModularGunController, ((PassiveItem)this).Owner); } moduleContainer2.defaultModule.OnAnyPickup(this, ModularGunController, ((PassiveItem)this).Owner, IsTruePickup: false); } return moduleContainer2; } public void RemoveTemporaryModule(DefaultModule module, string Context, bool playVFX = false) { IEnumerable source = ModuleContainers.Where((ModuleContainer self) => self.defaultModule.LabelName == module.LabelName); if (source.Count() <= 0) { return; } ModuleContainer moduleContainer = source.First(); Tuple val = moduleContainer.TemporaryCount.Where((Tuple self) => self.First == Context).First(); int second = val.Second; if (playVFX) { VFXStorage.DoFancyDestroyOfModules(second, ((PassiveItem)this).Owner, moduleContainer.defaultModule); } for (int i = 0; i < second; i++) { moduleContainer.defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); if (val.Second == 1 && (moduleContainer.ActiveCount == 0 || val.Second == 1)) { moduleContainer.defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers.Remove(moduleContainer); } val.Second--; if (val.Second == 0 && (moduleContainer.ActiveCount == 0 || moduleContainer.Count == 0)) { moduleContainer.defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); ModuleContainers.Remove(moduleContainer); } } moduleContainer.defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); moduleContainer.TemporaryCount.Remove(val); } public void RemoveTemporaryModules(string Context, bool playVFX = false) { for (int num = ModuleContainers.Count - 1; num > -1; num--) { ModuleContainer moduleContainer = ModuleContainers[num]; if (moduleContainer.TemporaryCount.Count > 0) { IEnumerable> source = moduleContainer.TemporaryCount.Where((Tuple self) => self.First == Context); if (source.Count() > 0) { for (int num2 = source.Count() - 1; num2 > -1; num2--) { Tuple val = source.ElementAt(num2); int second = val.Second; if (playVFX) { VFXStorage.DoFancyDestroyOfModules(second, ((PassiveItem)this).Owner, moduleContainer.defaultModule); } for (int num3 = second - 1; num3 > -1; num3--) { val.Second--; moduleContainer.defaultModule.OnAnyRemoved(this, ModularGunController, ((PassiveItem)this).Owner); if (num3 == 0 && moduleContainer.ActiveCount == 0) { moduleContainer.defaultModule.OnLastRemoved(this, ModularGunController, ((PassiveItem)this).Owner); moduleContainer.TemporaryCount.Remove(source.First()); } } if (moduleContainer.Count == 0 && moduleContainer.FakeCount.Count == 0 && moduleContainer.TemporaryCount.Count == 0) { ModuleContainers.Remove(moduleContainer); } } } } } } public override void OnDestroy() { //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Expected O, but got Unknown foreach (Action item in VolleysToRemoveOnSuddenDestruction) { if (item != null) { ((PassiveItem)this).Owner.stats.AdditionalVolleyModifiers -= item; } } PlayerController owner = ((PassiveItem)this).Owner; owner.OnEnteredCombat = (Action)Delegate.Remove(owner.OnEnteredCombat, new Action(PlayerEnteredCombat)); ((PassiveItem)this).Owner.OnReceivedDamage -= OnRecievedDamage; PlayerController owner2 = ((PassiveItem)this).Owner; owner2.OnReloadedGun = (Action)Delegate.Remove(owner2.OnReloadedGun, new Action(OnReloadedGun)); ((PassiveItem)this).Owner.OnKilledEnemyContext -= OnKilledEnemyContext; ((PassiveItem)this).Owner.OnDealtDamageContext -= OnDealtDamageContext; ((PassiveItem)this).Owner.PostProcessProjectile -= PostProcessProjectile; ((PassiveItem)this).Owner.PostProcessBeamTick -= PostProcessBeamTick; ((PassiveItem)this).Owner.OnDodgedProjectile -= OnDodgedProjectile; ((PassiveItem)this).Owner.OnDodgedBeam -= OnDodgedBeam; ((PassiveItem)this).Owner.OnRollStarted -= OnRollStarted; ((PassiveItem)this).Owner.OnRoomClearEvent -= OnRoomClearEvent; ((PassiveItem)this).Owner.GunChanged -= Player_GunChanged; PlayerController owner3 = ((PassiveItem)this).Owner; owner3.OnNewFloorLoaded = (Action)Delegate.Remove(owner3.OnNewFloorLoaded, new Action(NewFloorLoaded)); PlayerController owner4 = ((PassiveItem)this).Owner; ((GameActor)owner4).OnAboutToFall = (Func)Delegate.Remove(((GameActor)owner4).OnAboutToFall, new Func(OnAboutToFall)); PlayerController owner5 = ((PassiveItem)this).Owner; owner5.OnTableFlipped = (Action)Delegate.Remove(owner5.OnTableFlipped, new Action(OnTableFlipped)); PlayerController owner6 = ((PassiveItem)this).Owner; owner6.OnTableFlipCompleted = (Action)Delegate.Remove(owner6.OnTableFlipCompleted, new Action(OnTableFlipCompletely)); ((GameActor)((PassiveItem)this).Owner).MovementModifiers -= new MovementModifier(MovementMod); OverridePower = true; for (int num = ModuleContainers.Count - 1; num > -1; num--) { ModuleContainer moduleContainer = ModuleContainers[num]; RemoveModule(moduleContainer.defaultModule, 999999); moduleContainer.defaultModule.OnCoreDestruction(this, ModularGunController); } ((PassiveItem)this).OnDestroy(); } public void RegisterAction(Action action) { if (!VolleysToRemoveOnSuddenDestruction.Contains(action)) { VolleysToRemoveOnSuddenDestruction.Add(action); } } public void DeregisterAction(Action action) { if (VolleysToRemoveOnSuddenDestruction.Contains(action)) { VolleysToRemoveOnSuddenDestruction.Remove(action); } } public void ProcessGunStatModifier(ModuleGunStatModifier modifier) { if (modifier != null) { if (!stored_Modifiers.Contains(modifier)) { stored_Modifiers.Add(modifier); } if (!ModularGunController.statMods.Contains(modifier)) { ModularGunController.statMods.Add(modifier); } } } public void RemoveGunStatModifier(ModuleGunStatModifier modifier) { if (modifier != null) { if (stored_Modifiers.Contains(modifier)) { stored_Modifiers.Remove(modifier); } if (ModularGunController.statMods.Contains(modifier)) { ModularGunController.statMods.Remove(modifier); } } } public override void MidGameSerialize(List data) { ((PickupObject)this).MidGameSerialize(data); foreach (ModuleContainer moduleContainer in ModuleContainers) { List list = new List(); ((PickupObject)moduleContainer.defaultModule).MidGameSerialize(list); int count = list.Count; data.Add(count); data.Add(moduleContainer.ID); data.Add(moduleContainer.Count); data.Add(moduleContainer.ActiveCount); for (int i = 0; i < list.Count; i++) { data.Add(list[i]); } } data.Add(GlobalConsumableStorage.ReturnConsumableAmount("Scrap")); } public override void MidGameDeserialize(List data) { ((PassiveItem)this).MidGameDeserialize(data); List list = new List(); int num = 0; while (num < data.Count - 1) { DeserializationHelper deserializationHelper = new DeserializationHelper(); int num2 = (int)data[num]; num++; deserializationHelper.ModuleID = (int)data[num]; num++; deserializationHelper.ModuleCount = (int)data[num]; num++; deserializationHelper.ModulePoweredCount = (int)data[num]; num++; deserializationHelper.OtherData = new List(); for (int i = 0; i < num2; i++) { deserializationHelper.OtherData.Add(data[num]); num++; } list.Add(deserializationHelper); } ((MonoBehaviour)this).StartCoroutine(DoDelayForSerialization(list)); GlobalConsumableStorage.AddConsumableAmount("Scrap", (int)data[num]); } public IEnumerator DoDelayForSerialization(List deserializationHelpers) { yield return null; foreach (DeserializationHelper entry in deserializationHelpers) { for (int i = 0; i < entry.ModuleCount; i++) { DefaultModule mod = Object.Instantiate(GlobalModuleStorage.ReturnModule(entry.ModuleID)); mod.DoPickup(((PassiveItem)this).Owner, isSilent: true); } ModuleContainer d = ModuleContainers.Where((ModuleContainer x) => ((PickupObject)x.defaultModule).PickupObjectId == entry.ModuleID).First(); PowerModule(d.defaultModule, entry.ModulePoweredCount); ((PickupObject)d.defaultModule).MidGameDeserialize(entry.OtherData); } } } public class CloakDoer : ScriptableObject { public enum Cloak_State { Inactive, Active, Disabling } public class CloakContext { public string Reason = "idk"; public Action OnEnteredCloak; public bool Retrigger_Enter = false; public Action OnCloakBroken; public bool Retrigger_Cloak_Break = false; public Action OnForceCloakBroken; public bool Retrigger_Force_Cloak_Break = false; public float Length = 1f; } private PlayerController player; public List cloakContexts = new List(); private float Cloak_Time = 0f; public Cloak_State currentState = Cloak_State.Inactive; public void DoStartUp(PlayerController p) { player = p; } public void ProcessCloak(CloakContext context) { cloakContexts.Add(context); Cloak_Time += context.Length; if (cloakContexts.Count == 1) { StartCloak(); } foreach (CloakContext cloakContext in cloakContexts) { if (cloakContext.OnEnteredCloak != null) { cloakContext.OnEnteredCloak(player); if (!cloakContext.Retrigger_Enter) { cloakContext.OnEnteredCloak = null; } } } } public void StartCloak() { ((MonoBehaviour)player).StartCoroutine(HandleStealth(player)); } private IEnumerator HandleStealth(PlayerController user) { AkSoundEngine.PostEvent("Play_cloak", ((Component)user).gameObject); Hooks.Stencility_Enabled = false; float elapsed = 0f; ((BraveBehaviour)user).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)user).sprite).renderer.material.shader = StaticShaders.TransparencyShader; ((BraveBehaviour)((BraveBehaviour)user).sprite).renderer.material.SetFloat("_Fade", 1f); for (int i = 0; i < ((BraveBehaviour)user).healthHaver.bodySprites.Count; i++) { ((BraveBehaviour)user).healthHaver.bodySprites[i].usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)user).healthHaver.bodySprites[i]).renderer.material.shader = StaticShaders.TransparencyShader; ((BraveBehaviour)((BraveBehaviour)user).healthHaver.bodySprites[i]).renderer.material.SetFloat("_Fade", 1f); } if (Object.op_Implicit((Object)(object)user.primaryHand) && Object.op_Implicit((Object)(object)((BraveBehaviour)user.primaryHand).sprite)) { ((BraveBehaviour)user.primaryHand).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)user.primaryHand).sprite).renderer.material.shader = StaticShaders.TransparencyShader; ((BraveBehaviour)((BraveBehaviour)user.primaryHand).sprite).renderer.material.SetFloat("_Fade", 1f); } if (Object.op_Implicit((Object)(object)user.secondaryHand) && Object.op_Implicit((Object)(object)((BraveBehaviour)user.secondaryHand).sprite)) { ((BraveBehaviour)user.secondaryHand).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)user.secondaryHand).sprite).renderer.material.shader = StaticShaders.TransparencyShader; ((BraveBehaviour)((BraveBehaviour)user.secondaryHand).sprite).renderer.material.SetFloat("_Fade", 1f); } currentState = Cloak_State.Active; ((GameActor)user).SetIsStealthed(true, "cloak"); ((BraveBehaviour)user).specRigidbody.AddCollisionLayerIgnoreOverride(CollisionMask.LayerToMask((CollisionLayer)2, (CollisionLayer)3)); user.OnDidUnstealthyAction += BreakStealth; while (elapsed < Cloak_Time) { if (currentState != Cloak_State.Active) { yield break; } AlterShader(user, Mathf.Max(0.2f, Mathf.Lerp(1f, 0f, elapsed))); elapsed += BraveTime.DeltaTime; if (!((GameActor)user).IsStealthed) { break; } yield return null; } user.OnDidUnstealthyAction -= BreakStealth; ((BraveBehaviour)user).specRigidbody.RemoveCollisionLayerIgnoreOverride(CollisionMask.LayerToMask((CollisionLayer)2, (CollisionLayer)3)); ((GameActor)user).SetIsStealthed(false, "cloak"); ((MonoBehaviour)user).StartCoroutine(BreakStealth(isForced: false)); } private void AlterShader(PlayerController user, float f) { if (!((Object)(object)((BraveBehaviour)((BraveBehaviour)user).sprite).renderer.material.shader != (Object)(object)StaticShaders.TransparencyShader)) { ((BraveBehaviour)((BraveBehaviour)user).sprite).renderer.material.SetFloat("_Fade", f); for (int i = 0; i < ((BraveBehaviour)user).healthHaver.bodySprites.Count; i++) { ((BraveBehaviour)((BraveBehaviour)user).healthHaver.bodySprites[i]).renderer.material.SetFloat("_Fade", f); } if (Object.op_Implicit((Object)(object)user.primaryHand) && Object.op_Implicit((Object)(object)((BraveBehaviour)user.primaryHand).sprite)) { ((BraveBehaviour)((BraveBehaviour)user.primaryHand).sprite).renderer.material.SetFloat("_Fade", f); } if (Object.op_Implicit((Object)(object)user.secondaryHand) && Object.op_Implicit((Object)(object)((BraveBehaviour)user.secondaryHand).sprite)) { ((BraveBehaviour)((BraveBehaviour)user.secondaryHand).sprite).renderer.material.SetFloat("_Fade", f); } } } private IEnumerator BreakStealth(bool isForced) { currentState = Cloak_State.Disabling; foreach (CloakContext cloakCs in cloakContexts) { if (cloakCs.OnCloakBroken != null) { cloakCs.OnCloakBroken(player); if (!cloakCs.Retrigger_Cloak_Break) { cloakCs.OnCloakBroken = null; } } if (isForced && cloakCs.OnForceCloakBroken != null) { cloakCs.OnForceCloakBroken(player); if (!cloakCs.Retrigger_Force_Cloak_Break) { cloakCs.OnForceCloakBroken = null; } } } cloakContexts.Clear(); Cloak_Time = 0f; float elapsed = 0f; while (elapsed < 1.5f) { elapsed += BraveTime.DeltaTime; if (currentState == Cloak_State.Active) { yield break; } AlterShader(player, Mathf.Lerp(0.2f, 1f, elapsed / 1.5f)); yield return null; } ((BraveBehaviour)((BraveBehaviour)player).sprite).renderer.material = (player.IsUsingAlternateCostume ? ((Component)player).gameObject.GetComponent().data.altGlowMaterial : ((Component)player).gameObject.GetComponent().data.glowMaterial); Hooks.Stencility_Enabled = true; currentState = Cloak_State.Inactive; } private void BreakStealth(PlayerController p) { ((MonoBehaviour)player).StartCoroutine(BreakStealth(isForced: true)); player.OnDidUnstealthyAction -= BreakStealth; ((BraveBehaviour)player).specRigidbody.RemoveCollisionLayerIgnoreOverride(CollisionMask.LayerToMask((CollisionLayer)2, (CollisionLayer)3)); ((GameActor)player).SetIsStealthed(false, "cloak"); } } public class DefaultModule : PickupObject, IPlayerInteractable { public enum BaseModuleTags { BASIC, DEFENSIVE, GENERATION, RETALIATION, DAMAGE_OVER_TIME, UNIQUE, CONDITIONAL, TRADE_OFF, STICKY, CRIT } public enum ModuleTier { Tier_1, Tier_2, Tier_3, Tier_Omega, Unique } public class PowerConsumptionData { public string OverridePowerDescriptionLabel = "FUCK"; public float FirstStack = -420f; public float AdditionalStacks = -69f; public Func OverridePowerManagement; } public static string OverrideBackground_Sprite; public List ModuleTags = new List(); public bool AppearsInRainbowMode = true; public bool AppearsFromBlessedModeRoll = true; public static GameObject minimapIcon; private GameObject extant_minimapIcon; private RoomHandler m_minimapIconRoom; public bool IsSpecialModule = false; public int? OverrideScrapCost; public bool IsUncraftable = false; public ModulePrinterCore Stored_Core; public Action OverrideEnteredRangeOutline; public Action OverrideExitedRangeOutline; private bool CanDisplayText = true; public Action ExitedRange; public Action EnteredRange; public Action OnInteractedWith; public Func PreInteractLogic; public Func OnPostDrop; private ModifiedDefaultLabelManager ExtantLabelController; private ModifiedDefaultLabelManager ExtantNameLabelController; public ModuleTier Tier = ModuleTier.Tier_1; public string LabelName = "Default Module"; public string LabelDescription = "This is a test label. \\n\\n La la la look MONEY! \"[sprite \\\"ui_coin\\\"]\""; public string OverrideLabelName = null; public string OverrideLabelDescription = null; public AdditionalBraveLight BraveLight = null; public Vector2 Offset_LabelName = new Vector2(0f, 2f); public Vector2 Offset_LabelDescription = new Vector2(0f, -2f); public Color Label_Background_Color = Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100)); public Color Label_Background_Color_Alt = Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100)); public Color Label_Background_Color_Override = Color.clear; public int AltSpriteID = -69; public float AdditionalWeightMultiplier = 1f; public float EnergyConsumption = -1f; public StickyProjectileModifier.StickyContext stickyContext = new StickyProjectileModifier.StickyContext(); public CriticalHitComponent.CritContext CritContext; public PowerConsumptionData powerConsumptionData = new PowerConsumptionData { OverridePowerManagement = ReturnBasePowerConsumption }; public ModuleGunStatModifier gunStatModifier; public static ModifiedDefaultLabelManager LabelController; public override void MidGameSerialize(List data) { } public override void MidGameDeserialize(List data) { } public static void DoQuickSetup() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown GameObject val = (GameObject)Object.Instantiate(BraveResources.Load("DefaultLabelPanel", ".prefab")); FakePrefab.MakeFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); DefaultLabelController component = val.GetComponent(); ModifiedDefaultLabelManager modifiedDefaultLabelManager = val.AddComponent(); ((DefaultLabelController)modifiedDefaultLabelManager).label = component.label; ((BraveBehaviour)modifiedDefaultLabelManager).m_cachedCache = ((BraveBehaviour)component).m_cachedCache; ((DefaultLabelController)modifiedDefaultLabelManager).m_manager = component.m_manager; ((DefaultLabelController)modifiedDefaultLabelManager).offset = component.offset; ((DefaultLabelController)modifiedDefaultLabelManager).panel = component.panel; ((DefaultLabelController)modifiedDefaultLabelManager).targetObject = component.targetObject; Object.Destroy((Object)(object)component); dfLabel label = ((DefaultLabelController)modifiedDefaultLabelManager).label; label.PreventFontChanges = true; label.m_cachedLanguage = (GungeonSupportedLanguages)0; label.m_defaultAssignedFont = label.font; label.m_cachedPadding = label.padding; label.m_defaultAssignedFontTextScale = 2f; label.textScale = 2f; label.atlas = StaticCollections.ModularUIAtlas; label.font = StaticCollections.ModularFont; label.backgroundSprite = "basicSheet"; label.backgroundColor = new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100); label.colorizeSymbols = false; label.shadow = true; label.shadowColor = new Color32((byte)20, (byte)20, (byte)50, byte.MaxValue); label.shadowOffset = new Vector2(0f, -0.75f); ((dfControl)label).anchorStyle = (dfAnchorStyle)5; label.autoSize = true; label.autoHeight = false; ((dfControl)label).Height = 160f; label.wordWrap = false; dfRenderData renderData = new dfRenderData { Glitchy = false, Shader = ShaderCache.Acquire("Brave/Internal/HologramShader") }; label.m_defaultAssignedFont = label.font; label.m_cachedPadding = label.padding; ((dfControl)label).renderData = renderData; label.text = "AAAAAAAAAAAAAAAAAAAAAAAAA||||||||||||||||||||||||||||||||||"; ((dfControl)label).Invalidate(); LabelController = modifiedDefaultLabelManager; GameObject val2 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val2); FakePrefab.MarkAsFakePrefab(val2); tk2dSprite val3 = val2.AddComponent(); ((tk2dBaseSprite)val3).Collection = StaticCollections.Item_Collection; ((tk2dBaseSprite)val3).SetSprite(StaticCollections.Item_Collection.GetSpriteIdByName("t1_a_roomicon")); minimapIcon = val2; } public string ReturnBackGroundSheet() { return Tier switch { ModuleTier.Tier_1 => "Background_Tier_1", ModuleTier.Tier_2 => "Background_Tier_2", ModuleTier.Tier_3 => "Background_Tier_3", ModuleTier.Tier_Omega => "Background_Tier_4", _ => OverrideBackground_Sprite ?? "basicSheet", }; } public static string ReturnBackGroundSheet(ModuleTier moduleTier) { return moduleTier switch { ModuleTier.Tier_1 => "Background_Tier_1", ModuleTier.Tier_2 => "Background_Tier_2", ModuleTier.Tier_3 => "Background_Tier_3", ModuleTier.Tier_Omega => "Background_Tier_4", _ => "basicSheet", }; } public void AddModuleTag(BaseModuleTags tag) { if (!ModuleTags.Contains(tag.ToString())) { ModuleTags.Add(tag.ToString()); } } public void RemoveModuleTag(BaseModuleTags tag) { if (ModuleTags.Contains(tag.ToString())) { ModuleTags.Remove(tag.ToString()); } } public void AddModuleTag(string tag) { if (!ModuleTags.Contains(tag)) { ModuleTags.Add(tag); } } public void RemoveModuleTag(string tag) { if (ModuleTags.Contains(tag)) { ModuleTags.Remove(tag); } } public bool ContainsTag(BaseModuleTags tag) { return ModuleTags.Contains(tag.ToString()); } public bool ContainsTag(string tag) { return ModuleTags.Contains(tag); } private string ReturnRoomIconSpriteName(bool alt) { return Tier switch { ModuleTier.Tier_1 => alt ? "t1_b_roomicon" : "t1_a_roomicon", ModuleTier.Tier_2 => alt ? "t2_b_roomicon" : "t2_a_roomicon", ModuleTier.Tier_3 => alt ? "t3_b_roomicon" : "t3_a_roomicon", ModuleTier.Tier_Omega => "t4_roomicon", ModuleTier.Unique => "u_module_icon", _ => "t1_a_roomicon", }; } public static string ReturnTierLabel(ModuleTier moduleTier) { return moduleTier switch { ModuleTier.Tier_1 => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T1), ModuleTier.Tier_2 => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T2), ModuleTier.Tier_3 => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T3), ModuleTier.Tier_Omega => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T4), ModuleTier.Unique => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T_UNIQUE), _ => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T1), }; } public string ReturnTierLabel() { return Tier switch { ModuleTier.Tier_1 => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T1), ModuleTier.Tier_2 => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T2), ModuleTier.Tier_3 => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T3), ModuleTier.Tier_Omega => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T4), ModuleTier.Unique => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T_UNIQUE), _ => SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.T1), }; } public override void Pickup(PlayerController player) { DoPickup(player, isSilent: false); } public void DoPickup(PlayerController player, bool isSilent) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (val is ModulePrinterCore modulePrinterCore) { modulePrinterCore.UpdateModularGunController(); if (modulePrinterCore.AddModule(this, player, isSilent)) { GameStatsManager.Instance.HandleEncounteredObject(((BraveBehaviour)this).encounterTrackable); OnFirstEverObtainedNonActivation(modulePrinterCore, modulePrinterCore.ModularGunController, player); } OnAnyEverObtainedNonActivation(modulePrinterCore, modulePrinterCore.ModularGunController, player); } } GetRidOfMinimapIcon(); if (!isSilent) { AkSoundEngine.PostEvent("Play_ClickIntoPlace", ((Component)player).gameObject); Toolbox.NotifyCustom("Added Module:", LabelName, ((BraveBehaviour)this).sprite.spriteId, ((BraveBehaviour)this).sprite.collection, (NotificationColor)2); } Object.Destroy((Object)(object)((Component)this).gameObject); } public virtual void OnFirstEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { } public virtual void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { } public virtual void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { } public virtual void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { } public virtual void OnAnyRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { } public virtual void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { } public virtual void OnCoreDestruction(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { } public virtual bool CanBeEnabled(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { return true; } public virtual bool CanBeDisabled(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { return true; } public virtual void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { } public virtual bool IsAvailable() { return true; } public virtual float ProcessedWeightMultiplier() { return 1f; } public virtual float ProcessedWeightAdditional() { return 0f; } public int Stack(bool usesTemporaryStack = true) { return ReturnStack(Stored_Core, usesTemporaryStack); } public int TrueStack() { return Stored_Core.ReturnTrueStack(LabelName); } public int ActiveStack() { return Stored_Core.ReturnActiveStack(LabelName); } public int ReturnStack(ModulePrinterCore modulePrinterCore, bool useTemporaryStack = true) { return modulePrinterCore.ReturnStack(LabelName, useTemporaryStack); } public void ChangeShader(Shader s = null) { ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.material.shader = s; } public bool ModularIsAltSkin() { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPassiveItem(ModulePrinterCore.ModulePrinterCoreID) && val.IsUsingAlternateCostume) { return true; } } return false; } public virtual void OnModuleSpawned() { } public virtual void OnModuleSpawnAsChoice(ChooseModuleController chooseModuleController, ChooseModuleController.ModuleUICarrier moduleUICarrier) { } protected void Start() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) OnModuleSpawned(); if ((Object)(object)minimapIcon != (Object)null) { m_minimapIconRoom = GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(Vector3Extensions.IntXY(((BraveBehaviour)this).transform.position, (VectorConversions)0)); extant_minimapIcon = Minimap.Instance.RegisterRoomIcon(m_minimapIconRoom, minimapIcon, false); extant_minimapIcon.GetComponent().SetSprite(StaticCollections.Item_Collection, ReturnRoomIconSpriteName(ModularIsAltSkin())); } if (AltSpriteID != -69 && ModularIsAltSkin()) { ((BraveBehaviour)this).sprite.SetSprite(AltSpriteID); } ((BraveBehaviour)this).sprite.usesOverrideMaterial = true; try { RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)this).transform.position); if (absoluteRoom != null) { absoluteRoom.RegisterInteractable((IPlayerInteractable)(object)this); } SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black, 0.1f, 0f, (OutlineType)0); } catch (Exception ex) { ETGModConsole.Log((object)ex.Message, false); } } public float GetDistanceToPoint(Vector2 point) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_007b: 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_0093: 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_00b4: 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_00c5: 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) if (!Object.op_Implicit((Object)(object)((BraveBehaviour)this).sprite)) { return 1000f; } Bounds bounds = ((BraveBehaviour)this).sprite.GetBounds(); ((Bounds)(ref bounds)).SetMinMax(((Bounds)(ref bounds)).min + ((BraveBehaviour)this).transform.position, ((Bounds)(ref bounds)).max + ((BraveBehaviour)this).transform.position); float num = Mathf.Max(Mathf.Min(point.x, ((Bounds)(ref bounds)).max.x), ((Bounds)(ref bounds)).min.x); float num2 = Mathf.Max(Mathf.Min(point.y, ((Bounds)(ref bounds)).max.y), ((Bounds)(ref bounds)).min.y); return Mathf.Sqrt((point.x - num) * (point.x - num) + (point.y - num2) * (point.y - num2)) / 2f; } public float GetOverrideMaxDistance() { return 1f; } public void UpdateOnDrop(PlayerController p, bool UpdateUI = false) { if (OnPostDrop != null) { UpdateUI = OnPostDrop(this); } if (UpdateUI) { if ((Object)(object)ExtantLabelController != (Object)null) { Object.Destroy((Object)(object)((Component)ExtantLabelController).gameObject); } if ((Object)(object)ExtantNameLabelController != (Object)null) { Object.Destroy((Object)(object)((Component)ExtantNameLabelController).gameObject); } } OnEnteredRange(p); } public void OnEnteredRange(PlayerController interactor) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)this) && (interactor.CurrentRoom.IsRegistered((IPlayerInteractable)(object)this) || RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this))) { Color val = ((Label_Background_Color_Override != Color.clear) ? Label_Background_Color_Override : (interactor.IsUsingAlternateCostume ? Label_Background_Color_Alt : Label_Background_Color)); if ((Object)(object)ExtantLabelController == (Object)null && CanDisplayText) { ExtantLabelController = Toolbox.GenerateText(((BraveBehaviour)this).transform, Offset_LabelDescription, 0.5f, GetLabelNameDescrption(), Color32.op_Implicit(val), Autotrigger: true, 5f, UsesScaling: false); } if ((Object)(object)ExtantNameLabelController == (Object)null && CanDisplayText) { ExtantNameLabelController = Toolbox.GenerateText(((BraveBehaviour)this).transform, Offset_LabelName, 0.5f, GetLabelNameProper(), Color32.op_Implicit(val), Autotrigger: true, 5f, UsesScaling: false); } if (EnteredRange != null) { EnteredRange(this); } if (OverrideEnteredRangeOutline != null) { OverrideEnteredRangeOutline(this); } else { SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, false); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white, 0.1f, 0f, (OutlineType)0); } ((BraveBehaviour)this).sprite.UpdateZDepth(); } } public void OverrideCanDisplayText(bool value, bool DestroysActiveText = true) { CanDisplayText = value; if (DestroysActiveText) { if ((Object)(object)ExtantLabelController != (Object)null) { ExtantLabelController.Inv(); } if ((Object)(object)ExtantNameLabelController != (Object)null) { ExtantNameLabelController.Inv(); } } } public string GetLabelNameProper() { if ((OverrideLabelName == null) | (OverrideLabelName == string.Empty)) { return LabelName; } return OverrideLabelName; } public string GetLabelNameDescrption() { if ((OverrideLabelDescription == null) | (OverrideLabelDescription == string.Empty)) { return LabelDescription; } return OverrideLabelDescription; } public void OnExitRange(PlayerController interactor) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)this)) { if ((Object)(object)ExtantLabelController != (Object)null) { ExtantLabelController.Inv(); } if ((Object)(object)ExtantNameLabelController != (Object)null) { ExtantNameLabelController.Inv(); } if (OverrideExitedRangeOutline != null) { OverrideExitedRangeOutline(this); } else { SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, true); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black, 0.1f, 0f, (OutlineType)0); } ((BraveBehaviour)this).sprite.UpdateZDepth(); if (ExitedRange != null) { ExitedRange(this); } } } private void Update() { } public void Interact(PlayerController interactor) { if (!Object.op_Implicit((Object)(object)this) || (Object)(object)interactor.PlayerHasCore() == (Object)null) { return; } if (RoomHandler.unassignedInteractableObjects.Contains((IPlayerInteractable)(object)this)) { RoomHandler.unassignedInteractableObjects.Remove((IPlayerInteractable)(object)this); } SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)this).sprite, true); if (PreInteractLogic == null || PreInteractLogic(this, interactor)) { ((PickupObject)this).Pickup(interactor); if (OnInteractedWith != null) { OnInteractedWith(this); } } } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public static float ReturnBasePowerConsumption(DefaultModule module, int stack) { float result; switch (stack) { case 0: return 0f; default: result = module.EnergyConsumption + module.EnergyConsumption * (float)(stack - 1) / 2f; break; case 1: result = module.EnergyConsumption; break; } return result; } private void GetRidOfMinimapIcon() { if ((Object)(object)extant_minimapIcon != (Object)null) { Minimap.Instance.DeregisterRoomIcon(m_minimapIconRoom, extant_minimapIcon); extant_minimapIcon = null; } } public override void OnDestroy() { GetRidOfMinimapIcon(); if ((Object)(object)ExtantLabelController != (Object)null) { Object.Destroy((Object)(object)((Component)ExtantLabelController).gameObject); } if ((Object)(object)ExtantNameLabelController != (Object)null) { Object.Destroy((Object)(object)((Component)ExtantNameLabelController).gameObject); } ((PickupObject)this).OnDestroy(); } } public class ModifiedDefaultLabelManager : DefaultLabelController { public enum DisplayType { Item_Label, All_Modules, Specific_Module_Tiers } public float scaleMultiplier = 1f; public float T = 1f; public Action MouseHover; public Action OnUpdate; public DefaultModule StoredModuleInfo; public DisplayType displayType = DisplayType.Item_Label; public int CurrentDisplayTier = -1; public void Trigger_C(float d) { ((MonoBehaviour)this).StartCoroutine(Expand_CR_Custom(d)); } public void Trigger_CustomTime(Transform aTarget, Vector3 anOffset, float duration, float AutoDestroyTimer = -1f) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) base.offset = anOffset; base.targetObject = aTarget; Trigger_C(duration); if (AutoDestroyTimer > 0f) { ((MonoBehaviour)this).Invoke("Inv", AutoDestroyTimer); } } public void Trigger_CustomDestroyTime(float duration) { ((MonoBehaviour)this).StartCoroutine(Unexpand_CR_Custom(duration, willDestroy: true)); } public void Inv() { ((MonoBehaviour)this).StartCoroutine(Unexpand_CR_Custom(0.35f, willDestroy: true)); } private IEnumerator Expand_CR_Custom(float duration) { float elapsed = 0f; float targetWidth = ((dfControl)base.label).Width + 1f; float targetHeight = ((dfControl)base.label).Height + 1f; base.panel.padding.bottom = (int)(targetHeight * -2f); ((dfControl)base.panel).Width = targetWidth; while (elapsed < duration) { elapsed += GameManager.INVARIANT_DELTA_TIME; T = Toolbox.SinLerpTValue(elapsed / duration); ((dfControl)base.panel).Width = Mathf.Lerp(1f, targetWidth * scaleMultiplier, T); yield return null; } } public void Update() { if (!((Object)(object)this == (Object)null) && !((Object)(object)base.label == (Object)null) && Object.op_Implicit((Object)(object)base.label)) { if (MouseHover != null) { MouseHover(base.label, ((dfControl)base.label).isMouseHovering); } if (OnUpdate != null) { OnUpdate(base.label); } } } public bool IsMouseHovering() { if ((Object)(object)base.label == (Object)null) { return false; } return ((dfControl)base.label).isMouseHovering; } private IEnumerator Unexpand_CR_Custom(float duration, bool willDestroy = false) { float elapsed = 0f; float targetWidth = ((dfControl)base.label).Width + 1f; float targetHeight = ((dfControl)base.label).Height + 1f; base.panel.padding.bottom = (int)(targetHeight * -2f); ((dfControl)base.panel).Width = targetWidth; while (elapsed < duration) { elapsed += GameManager.INVARIANT_DELTA_TIME; T = elapsed / duration; ((dfControl)base.panel).Width = Mathf.Lerp(targetWidth, 0f, T); yield return null; } if (willDestroy) { Object.Destroy((Object)(object)((Component)this).gameObject); } } public override void OnDestroy() { ((DefaultLabelController)this).OnDestroy(); } public int CycleTier() { CurrentDisplayTier++; if (CurrentDisplayTier == 4) { CurrentDisplayTier = 0; } return CurrentDisplayTier; } } public class GlassShardBehavior : MonoBehaviour { public float Damage = 6f; public void Start() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown Object.Destroy((Object)(object)((Component)this).gameObject, 30f); SpeculativeRigidbody component = ((Component)this).GetComponent(); component.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)component.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(AAA)); } public void AAA(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) PhysicsEngine.SkipCollision = true; if ((Object)(object)((BraveBehaviour)otherRigidbody).aiActor != (Object)null && (Object)(object)((BraveBehaviour)otherRigidbody).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)otherRigidbody).healthHaver.m_player == (Object)null) { ((BraveBehaviour)otherRigidbody).healthHaver.ApplyDamage(Damage, Vector2.zero, "Glass Shards", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); Object.Destroy((Object)(object)((Component)this).gameObject); } } public void OnDestroy() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_OBJ_glass_shatter_01", ((Component)this).gameObject); GameObject val = Object.Instantiate(PlagueCanister.Glass, ((Component)this).gameObject.transform.position, Quaternion.identity); Object.Destroy((Object)(object)val, 2f); } } public class PlagueCanister : DefaultModule { public static ItemTemplate template; public static GameObject Glass; public static int ID; public static GameObject Vial; public static List GlassShards; public static void PostInit(PickupObject v) { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("plaguecanister_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Plague Canister " + defaultModule.ReturnTierLabel(); defaultModule.AdditionalWeightMultiplier = 0.85f; defaultModule.LabelDescription = "Reloading has a chance to launch 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") poison canisters\nthat breaks into a pool of poison and glass shards.\n(" + StaticColorHexes.AddColorToLabelString("+Glass Shards and Goop Radius", StaticColorHexes.Light_Orange_Hex) + ").\nChance increases the emptier your clip is, up to 100% when empty."; defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); GameObject val = new GameObject("Plague Canister"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); val.SetActive(false); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("warning_003")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("PoisonVialAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("vial_idle"); val3.playAutomatically = true; ThrownGoopItem val4 = val.AddComponent(); val4.goop = EasyGoopDefinitions.PoisonDef; val4.goopRadius = 2.75f; val4.burstAnim = "vial_break"; Vial = val; ID = ((PickupObject)defaultModule).PickupObjectId; GlassShards.Add(generateGlassShards()); GlassShards.Add(generateGlassShards("glassshards_002")); GlassShards.Add(generateGlassShards("glassshards_003")); GlassShards.Add(generateGlassShards("glassshards_004")); GlassShards.Add(generateGlassShards("glassshards_005")); PickupObject byId = PickupObjectDatabase.GetById(223); Glass = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; } public static GameObject generateGlassShards(string shardName = "glassshards_001") { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown GameObject val = new GameObject("Glass_Shard"); FakePrefab.MarkAsFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); val.SetActive(false); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName(shardName)); DebrisObject val3 = val.AddComponent(); SpeculativeRigidbody val4 = val.AddComponent(); val4.CollideWithOthers = true; val4.CollideWithTileMap = false; val4.PixelColliders = new List(); val4.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)4, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 6, ManualHeight = 6, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); val.AddComponent(); return val; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { int num = ReturnStack(modulePrinter); } public IEnumerator TossCanisters(int stack, PlayerController user) { for (int i = 0; i < stack; i++) { Vector3 vector = user.unadjustedAimPoint - user.LockedApproximateSpriteCenter; Vector3 vector2 = Vector2.op_Implicit(((BraveBehaviour)user).specRigidbody.UnitCenter); if (vector.y > 0f) { vector2 += Vector3.up * 0.25f; } GameObject gameObject2 = Object.Instantiate(Vial, vector2, Quaternion.identity); tk2dBaseSprite component4 = gameObject2.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.PlaceAtPositionByAnchor(vector2, (Anchor)4); } Vector2 vector3 = Vector2.op_Implicit(user.unadjustedAimPoint - user.LockedApproximateSpriteCenter); DebrisObject debrisObject = LootEngine.DropItemWithoutInstantiating(gameObject2, gameObject2.transform.position, vector3, 6.5f + (float)stack * 2f, false, false, true, false); if (vector.y > 0f && Object.op_Implicit((Object)(object)debrisObject)) { debrisObject.additionalHeightBoost = -1f; if (Object.op_Implicit((Object)(object)((BraveBehaviour)debrisObject).sprite)) { ((BraveBehaviour)debrisObject).sprite.UpdateZDepth(); } } gameObject2.GetComponent().goopRadius = 2.25f + (float)(stack / 2); debrisObject.IsAccurateDebris = true; ((EphemeralObject)debrisObject).Priority = (EphemeralPriority)0; debrisObject.bounceCount = 0; DebrisObject obj2 = debrisObject; obj2.OnGrounded = (Action)Delegate.Combine(obj2.OnGrounded, (Action)delegate { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) for (int j = 0; j < 2 + stack; j++) { GameObject val = Object.Instantiate(BraveUtility.RandomElement(GlassShards), ((BraveBehaviour)debrisObject).transform.position, Quaternion.identity); val.GetComponent().Trigger(Vector2.op_Implicit(Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0.5f, (float)(4 + stack)))), 1f, 1f); val.GetComponent().Damage += (float)stack * 1.25f; } }); yield return (object)new WaitForSeconds(((GameActor)user).CurrentGun.reloadTime / (float)stack); } } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController user, Gun g) { if (Random.value > g.PercentageOfClipLeft()) { ((MonoBehaviour)user).StartCoroutine(TossCanisters(ReturnStack(modulePrinterCore), user)); } } static PlagueCanister() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PlagueCanister)); val.Name = "Plague Canister"; val.Description = "Yah Yeet!"; val.LongDescription = "Reloading has a chance to launch 1 (+1 per stack) poison canister that breaks into a pool of poison and glass shards. (+Glass Shards and Goop Radius per stack). Chance increases the emptier your clip is, up to 100% when empty."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("plaguecanister_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; GlassShards = new List(); } } public class ImprovedSights : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("improvedsights_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Improved Sights " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Improves Accuracy by 33% (" + StaticColorHexes.AddColorToLabelString("+33% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ").\nIncreases shotspeed by 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { Accuracy_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modularGunController.ProcessStats(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.33f * (float)num)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { float num = 1f + 0.33f * (float)ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.speed *= num; ProjectileData baseData2 = p.baseData; baseData2.force *= num; p.UpdateSpeed(); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { modularGunController.ProcessStats(); } static ImprovedSights() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ImprovedSights)); val.Name = "Improved Sights"; val.Description = "X Marks The Spot"; val.LongDescription = "Improves Accuracy by 33% (+33% hyperbolically per stack). Increases shotspeed by 33% (+33% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("improvedsights_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class EmergencyResponse : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject WarnVFX; private bool Active = false; public float DamageMult = 1f; public static void PostInit(PickupObject v) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("emergencymod_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.LabelName = "Emergency Response" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Taking damage grants double damage, fire rate and halved reload time\nthat degrades over 15 (" + StaticColorHexes.AddColorToLabelString("+7.5", StaticColorHexes.Light_Orange_Hex) + ") seconds."; defaultModule.AddModuleTag(BaseModuleTags.RETALIATION); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("warning_003")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("WarningVFXAnimation").GetComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val3, "warn", new Dictionary { { 4, "Play_ENM_hammer_target_01" }, { 6, "Play_ENM_hammer_target_01" }, { 8, "Play_ENM_hammer_target_01" } }); WarnVFX = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnDamaged = (Action)Delegate.Combine(modulePrinter.OnDamaged, new Action(OD)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate, Reload_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnDamaged = (Action)Delegate.Remove(modulePrinter.OnDamaged, new Action(OD)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / DamageMult; } public void OD(ModulePrinterCore modulePrinter, PlayerController player) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) int stack = ReturnStack(modulePrinter); ((MonoBehaviour)player).StartCoroutine(DoDamageUp(stack, player, modulePrinter.ModularGunController)); GameObject val = ((GameActor)player).PlayEffectOnActor(WarnVFX, new Vector3(0f, 1.625f), true, false, false); val.GetComponent().PlayAndDestroyObject("warn", (Action)null); } public IEnumerator DoDamageUp(int stack, PlayerController player, ModularGunController modularGunController) { Active = true; yield return null; Active = false; float e = 0f; float d = 7.5f + 7.5f * (float)stack; while (e < d) { e += BraveTime.DeltaTime; DamageMult = Mathf.Lerp(2f, 1f, e / d); modularGunController.ProcessStats(); if (Active) { yield break; } if (Random.value < e / d) { GlobalSparksDoer.DoSingleParticle(Toolbox.RandomPositionOnSprite(((BraveBehaviour)player).sprite), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(Random.Range(-180, 180), Mathf.Lerp(6f, 0f, e / d))), (float?)null, (float?)2f, (Color?)null, (SparksType)4); } yield return null; } Active = false; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= DamageMult; ProjectileData baseData2 = p.baseData; baseData2.speed *= DamageMult; p.UpdateSpeed(); } static EmergencyResponse() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(EmergencyResponse)); val.Name = "Emergency Response"; val.Description = "Fight Up"; val.LongDescription = "Taking damage grants double damage, fire rate and halved reload time that degrades over 15 (+7.5 per stack) seconds."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("emergencymod_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class ConvexLens : DefaultModule { public static ItemTemplate template; public static int ID; public static VFXPool greenImpact; public float Mult; private List nearbyEnemies = new List(); private HeatIndicatorController ring; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00ca: 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_00de: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("calibratedlens_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.66f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Calibrated Lens " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Deal 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ") more damage\nto enemies far away from you."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); VFXPool val = new VFXPool(); val.type = (VFXPoolType)4; VFXComplex[] array = new VFXComplex[1]; VFXComplex val2 = new VFXComplex(); VFXObject[] array2 = new VFXObject[1]; VFXObject val3 = new VFXObject(); ref GameObject effect = ref val3.effect; PickupObject byId = PickupObjectDatabase.GetById(504); effect = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; array2[0] = val3; val2.effects = (VFXObject[])(object)array2; array[0] = val2; val.effects = (VFXComplex[])(object)array; greenImpact = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Combine(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); ((MonoBehaviour)ring).StartCoroutine(DoRingLerp(ring, 8.5f, 0f, Destroys: true)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { int num = ReturnStack(modulePrinter); Mult = 1f + (float)num * 0.33f; } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { //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_0044: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_0118: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinter); if ((Object)(object)ring == (Object)null) { ring = ((GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/HeatIndicator"), ((BraveBehaviour)player).transform.position, Quaternion.identity, ((BraveBehaviour)player).transform)).GetComponent(); ring.CurrentRadius = 8.5f; ring.CurrentColor = Vector3Extensions.WithAlpha(new Color(0f, 199f, 40f), 0.02f); ring.IsFire = false; ((Renderer)((Component)ring).GetComponent()).material.SetFloat("_PxWidth", 0.002f); ((Component)ring).transform.position = Vector2Extensions.ToVector3ZUp(((BraveBehaviour)player).sprite.WorldCenter, 100f); ((MonoBehaviour)ring).StartCoroutine(DoRingLerp(ring, 0f, 8.5f)); } if (player.CurrentRoom != null) { nearbyEnemies = ApplyActionToNearbyEnemies(((BraveBehaviour)player).sprite.WorldCenter, 7.5f, player.CurrentRoom); } } public IEnumerator DoRingLerp(HeatIndicatorController a, float from, float to, bool Destroys = false) { float e = 0f; while (e < 1f) { if ((Object)(object)a == (Object)null) { yield break; } e += BraveTime.DeltaTime; a.CurrentRadius = Mathf.Lerp(from, to, Toolbox.SinLerpTValue(e)); yield return null; } if (Destroys) { Object.Destroy((Object)(object)((Component)a).gameObject); } } public List ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies != null) { for (int i = 0; i < room.activeEnemies.Count; i++) { if (Object.op_Implicit((Object)(object)room.activeEnemies[i])) { bool flag = radius < 0f; Vector2 val = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val)).sqrMagnitude < num; } if (!flag) { list.Add(room.activeEnemies[i]); } } } } return list; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null && nearbyEnemies.Contains(((BraveBehaviour)oR).aiActor)) { float damage = ((BraveBehaviour)mR).projectile.baseData.damage; ProjectileData baseData = ((BraveBehaviour)mR).projectile.baseData; baseData.damage *= Mult; ((MonoBehaviour)((BraveBehaviour)mR).projectile).StartCoroutine(FrameDelay(((BraveBehaviour)mR).projectile, damage)); } } public IEnumerator FrameDelay(Projectile p, float DmG) { VFXPool Ef = p.hitEffects.enemy; VFXPool deathEf = p.hitEffects.deathEnemy; p.hitEffects.enemy = greenImpact; p.hitEffects.deathEnemy = greenImpact; yield return null; p.baseData.damage = DmG; p.hitEffects.enemy = Ef; p.hitEffects.deathEnemy = deathEf; } static ConvexLens() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ConvexLens)); val.Name = "Calibrated Lens"; val.Description = "Distance Is Power"; val.LongDescription = "Deal 33% (+33% per stack) more damage to enemies far away from you."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("calibratedlens_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class LiquidMetal : DefaultModule { public static ItemTemplate template; public static VFXPool GhostVFX; public static int ID; public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("liquidmetal_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.LabelName = "Liquid Metal" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Adds 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ")Pierce\nbut reduces projectile speed by 20% (" + StaticColorHexes.AddColorToLabelString("-20% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(228); GhostVFX = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.05f)) { int num = 1; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += num; ProjectileData baseData = p.baseData; baseData.speed *= 1f - (1f - 1f / (1f + 0.2f * (float)num)); p.UpdateSpeed(); p.hitEffects.enemy = GhostVFX; p.hitEffects.deathEnemy = GhostVFX; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += num; ProjectileData baseData = p.baseData; baseData.speed *= 1f - (1f - 1f / (1f + 0.2f * (float)num)); p.UpdateSpeed(); p.hitEffects.enemy = GhostVFX; p.hitEffects.deathEnemy = GhostVFX; } static LiquidMetal() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(LiquidMetal)); val.Name = "Liquid Metal"; val.Description = "Pierce Up"; val.LongDescription = "Adds 1 (+1 per stack) Pierce but reduces projectile speed by 20% (-20% per stack hyperbolically)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("liquidmetal_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class FocusingLens : DefaultModule { public static ItemTemplate template; public static int ID; public static VFXPool pinkImpact; public float Mult; private List nearbyEnemies = new List(); private HeatIndicatorController ring; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("focusingkens_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.66f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Focusing Lens " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Deal 50% (" + StaticColorHexes.AddColorToLabelString("+50%", StaticColorHexes.Light_Orange_Hex) + ") more damage\nto nearby enemies."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(58); pinkImpact = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Combine(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); ((MonoBehaviour)ring).StartCoroutine(DoRingLerp(ring, 4.5f, 0f, Destroys: true)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { int num = ReturnStack(modulePrinter); Mult = 1f + (float)num * 0.5f; } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { //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_0044: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_0118: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinter); if ((Object)(object)ring == (Object)null) { ring = ((GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/HeatIndicator"), ((BraveBehaviour)player).transform.position, Quaternion.identity, ((BraveBehaviour)player).transform)).GetComponent(); ring.CurrentRadius = 4.5f; ring.CurrentColor = Vector3Extensions.WithAlpha(new Color(255f, 56f, 152f), 0.02f); ring.IsFire = false; ((Renderer)((Component)ring).GetComponent()).material.SetFloat("_PxWidth", 0.002f); ((Component)ring).transform.position = Vector2Extensions.ToVector3ZUp(((BraveBehaviour)player).sprite.WorldCenter, 100f); ((MonoBehaviour)ring).StartCoroutine(DoRingLerp(ring, 0f, 4.5f)); } if (player.CurrentRoom != null) { nearbyEnemies = ApplyActionToNearbyEnemies(((BraveBehaviour)player).sprite.WorldCenter, 4.5f, player.CurrentRoom); } } public IEnumerator DoRingLerp(HeatIndicatorController a, float from, float to, bool Destroys = false) { float e = 0f; while (e < 1f) { if ((Object)(object)a == (Object)null) { yield break; } e += BraveTime.DeltaTime; a.CurrentRadius = Mathf.Lerp(from, to, Toolbox.SinLerpTValue(e)); yield return null; } if (Destroys) { Object.Destroy((Object)(object)((Component)a).gameObject); } } public List ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies != null) { for (int i = 0; i < room.activeEnemies.Count; i++) { if (Object.op_Implicit((Object)(object)room.activeEnemies[i])) { bool flag = radius < 0f; Vector2 val = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val)).sqrMagnitude < num; } if (flag) { list.Add(room.activeEnemies[i]); } } } } return list; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null && nearbyEnemies.Contains(((BraveBehaviour)oR).aiActor)) { float damage = ((BraveBehaviour)mR).projectile.baseData.damage; ProjectileData baseData = ((BraveBehaviour)mR).projectile.baseData; baseData.damage *= Mult; ((MonoBehaviour)((BraveBehaviour)mR).projectile).StartCoroutine(FrameDelay(((BraveBehaviour)mR).projectile, damage)); } } public IEnumerator FrameDelay(Projectile p, float DmG) { VFXPool Ef = p.hitEffects.enemy; VFXPool deathEf = p.hitEffects.deathEnemy; p.hitEffects.enemy = pinkImpact; p.hitEffects.deathEnemy = pinkImpact; yield return null; p.baseData.damage = DmG; p.hitEffects.enemy = Ef; p.hitEffects.deathEnemy = deathEf; } static FocusingLens() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(FocusingLens)); val.Name = "Focusing Lens"; val.Description = "Focus"; val.LongDescription = "Deal 50% (+50% per stack) more damage to nearby enemies."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("focusingkens_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class OneShot : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("oneshot_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.66f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "One Shot " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Adds a flat 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") shots to your clip."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Post_Calculation_ClipSize_Process = ProcessClipSize }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip + modulePrinterCore.ReturnStack(LabelName); } static OneShot() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(OneShot)); val.Name = "One Shot"; val.Description = "Uno Mas"; val.LongDescription = "Adds a flat 1 (+1 per stack) shots to your clip."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("oneshot_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RadarScanner : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("radarscanner_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.85f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Radar Scanner " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Secret Rooms are revealed if you are near them.\nWhile powered, all secret rooms contain\n2 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") extra pickups\nstarting from the next floor."; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 12; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { GameManager.Instance.OnNewLevelFullyLoaded += Instance_OnNewLevelFullyLoaded; modulePrinter.PlayerEnteredAnyRoom = (Action)Delegate.Combine(modulePrinter.PlayerEnteredAnyRoom, new Action(ORC)); } public void ORC(ModulePrinterCore modulePrinter, PlayerController player, RoomHandler room) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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) bool flag = false; foreach (RoomHandler connectedRoom in room.connectedRooms) { if ((int)connectedRoom.area.PrototypeRoomCategory == 6 && !connectedRoom.RevealedOnMap) { if (!flag && ConfigManager.DoVisualEffect) { GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 5f; AkSoundEngine.PostEvent("Play_Radar_Ping", ((Component)player).gameObject); flag = true; } connectedRoom.RevealedOnMap = true; Minimap.Instance.RevealMinimapRoom(connectedRoom, true, true, connectedRoom == GameManager.Instance.PrimaryPlayer.CurrentRoom); } } } private void Instance_OnNewLevelFullyLoaded() { AddGoodies(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { GameManager.Instance.OnNewLevelFullyLoaded -= Instance_OnNewLevelFullyLoaded; modulePrinter.PlayerEnteredAnyRoom = (Action)Delegate.Remove(modulePrinter.PlayerEnteredAnyRoom, new Action(ORC)); } public void AddGoodies() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < GameManager.Instance.Dungeon.data.rooms.Count; i++) { RoomHandler val = GameManager.Instance.Dungeon.data.rooms[i]; if (val.connectedRooms.Count == 0 || (int)val.area.PrototypeRoomCategory != 6) { continue; } for (int j = 0; j < 1 + Stack(); j++) { GameObject obj = GameManager.Instance.RewardManager.CurrentRewardData.SingleItemRewardTable.SelectByWeight(false); IntVector2 bestRewardLocation = val.GetBestRewardLocation(new IntVector2(1, 1), (RewardLocationStyle)2, true); DebrisObject val2 = LootEngine.SpawnItem(obj, ((IntVector2)(ref bestRewardLocation)).ToCenterVector3(0f), Vector2.zero, 0f, true, false, false); ((Component)val2).GetComponent().IgnoredByRat = true; if (((Component)val2).GetComponent() is Scrap) { ((Component)val2).gameObject.SetActive(true); } if (!StaticReferenceManager.AllDebris.Contains(val2)) { StaticReferenceManager.AllDebris.Add(val2); } } } } static RadarScanner() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RadarScanner)); val.Name = "Radar Scanner"; val.Description = "Sonar"; val.LongDescription = "Secret Rooms are revealed if you are near them. While powered, all secret rooms contain 2 (+1 per stack) extra pickups, starting from the next floor."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("radarscanner_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MonetaryValue : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("moneyvalue_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.625f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Monetary Value " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Gain 0.33% (" + StaticColorHexes.AddColorToLabelString("+0.33%", StaticColorHexes.Light_Orange_Hex) + ") damage for each casing you have.\nYour held casings are multiplied by 1.2x every floor."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 7; ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.1f)) { ProjectileData baseData = p.baseData; baseData.damage *= (float)(1 + player.carriedConsumables.Currency / 200); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnNewFloorStarted = (Action)Delegate.Combine(modulePrinter.OnNewFloorStarted, new Action(ONFS)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONFS)); } public void ONFS(ModulePrinterCore modulePrinter, PlayerController player) { PlayerConsumables carriedConsumables = player.carriedConsumables; carriedConsumables.Currency += player.carriedConsumables.Currency / 5; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + (float)player.carriedConsumables.Currency / 300f * (float)ReturnStack(modulePrinterCore); } static MonetaryValue() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MonetaryValue)); val.Name = "Monetary Value"; val.Description = "Investment"; val.LongDescription = "Gain 0.33% (+0.33% per stack) damage for each casing you have. Your held casings are multiplied by 1.2x every floor."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("moneyvalue_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RecyclingNanites : DefaultModule { public static ItemTemplate template; public static int ID; private int DamageTaken = 0; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("recycler_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Recycling Nanites " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "While enabled, taking damage increases damage by \n+7.5% (" + StaticColorHexes.AddColorToLabelString("+7.5%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.RETALIATION); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 3; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnDamaged = (Action)Delegate.Combine(modulePrinter.OnDamaged, new Action(OD)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnDamaged = (Action)Delegate.Remove(modulePrinter.OnDamaged, new Action(OD)); } public void OD(ModulePrinterCore p, PlayerController player) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) DamageTaken++; ((GameActor)player).PlayEffectOnActor(VFXStorage.MachoBraceBurstVFX, new Vector3(0f, 0f), true, false, false); AkSoundEngine.PostEvent("Play_OBJ_med_kit_01", ((Component)player).gameObject); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.075f * (float)num * (float)DamageTaken; ProjectileData baseData2 = p.baseData; baseData2.force *= 1f + 0.0333f * (float)DamageTaken; } public override void MidGameSerialize(List data) { base.MidGameSerialize(data); data.Add(DamageTaken); } public override void MidGameDeserialize(List data) { base.MidGameSerialize(data); DamageTaken = (int)data[0]; } static RecyclingNanites() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RecyclingNanites)); val.Name = "Recycling Nanites"; val.Description = "Repurposed for something better"; val.LongDescription = "While enabled, taking damage increases damage by\n+7.5% (+7.5% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("recycler_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RegenerativePlating : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("selfcare_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelName = "Regenerative Plating " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Entering a new floor restores 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") Armor.\nScrapping pickups / items has a chance to restore 1 Armor \n(" + StaticColorHexes.AddColorToLabelString("+Increased Armor Chance", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 6; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnNewFloorStarted = (Action)Delegate.Combine(modulePrinter.OnNewFloorStarted, new Action(ONFS)); modulePrinter.OnScrapped = (Action)Delegate.Combine(modulePrinter.OnScrapped, new Action(OnScrap)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONFS)); modulePrinter.OnScrapped = (Action)Delegate.Remove(modulePrinter.OnScrapped, new Action(OnScrap)); } public void ONFS(ModulePrinterCore modulePrinter, PlayerController player) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) ((GameActor)player).PlayEffectOnActor(VFXStorage.HealingSparklesVFX, new Vector3(0f, 0f), true, false, false); AkSoundEngine.PostEvent("Play_OBJ_heart_heal_01", ((Component)player).gameObject); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.Armor += (float)ReturnStack(modulePrinter); } public void OnScrap(int ScrapCount, ModulePrinterCore core, PlayerController player, Scrapper scrapper) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (Random.value < 1f - 1f / (1f + 0.15f * (float)ReturnStack(core))) { ((GameActor)player).PlayEffectOnActor(VFXStorage.HealingSparklesVFX, new Vector3(0f, 0f), true, false, false); AkSoundEngine.PostEvent("Play_OBJ_heart_heal_01", ((Component)player).gameObject); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.Armor += 1f; } } static RegenerativePlating() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RegenerativePlating)); val.Name = "Regenerative Plating"; val.Description = "Time Heals All"; val.LongDescription = "Entering a new floor restores 1 (+1 per stack) Armor. Scrapping pickups / items has a chance to restore 1 Armor. (+Increased Armor Chance per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("selfcare_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RubberFillings : DefaultModule { public static ItemTemplate template; public static string SFX; public static int ID; public static void PostInit(PickupObject v) { //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(13); SFX = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].objectImpactEventName; DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("rubbercase_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.85f; defaultModule.LabelName = "Rubber Fillings" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Adds 1 Bounce (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ")\nbut divides knockback force by 2 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ")\nand reduces accuracy by 15% (" + StaticColorHexes.AddColorToLabelString("+15% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.05f)) { BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces++; ProjectileData baseData = p.baseData; baseData.force /= 2f; p.objectImpactEventName = SFX; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { Name = "RubberFillings", Accuracy_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.15f * (float)num)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces += num; ProjectileData baseData = p.baseData; baseData.force /= (float)(num + 1); p.objectImpactEventName = SFX; } static RubberFillings() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RubberFillings)); val.Name = "Rubber Fillings"; val.Description = "Ricochet Up"; val.LongDescription = "Adds 1 Bounce to player projectiles (+1 per stack), but divides knockback force by 2 (+1 per stack ) and reduces accuracy by 15% (+15% hyperbolically per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("rubbercase_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class LargerClips : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("largerclip_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Larger Clips " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Clip Capacity by 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { ClipSize_Process = ProcessClipSize }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modularGunController.ProcessStats(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip + modularGunController.Base_Clip_Size / 3 * modulePrinterCore.ReturnStack(LabelName); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { modularGunController.ProcessStats(); } static LargerClips() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(LargerClips)); val.Name = "Larger Clips"; val.Description = "Fit More"; val.LongDescription = "Increases Clip Capacity by\n33% (+33% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("largerclip_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PlusOne : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("plusone_tier1_module_alt"); defaultModule.AdditionalWeightMultiplier = 0.66f; defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Plus One " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Improves projectiles by\nexactly +1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") damage."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.1f)) { ((MonoBehaviour)p).StartCoroutine(FrameDelay(p, modulePrinterCore, 1)); p.HasDefaultTint = true; } } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)p).StartCoroutine(FrameDelay(p, modulePrinterCore, null)); p.HasDefaultTint = true; p.AdjustPlayerProjectileTint(Color.yellow, 1, 0f); } public IEnumerator FrameDelay(Projectile p, ModulePrinterCore modulePrinterCore, int? overrideStack) { yield return null; int stack = overrideStack ?? ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage += (float)stack; ProjectileData baseData2 = p.baseData; baseData2.force += 1f; } static PlusOne() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PlusOne)); val.Name = "Plus One"; val.Description = "One Better"; val.LongDescription = "Improves projectiles by exactly +1 (+1 per stack) damage."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("plusone_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class AerodynamicRounds : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("aerdynamic_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelName = "Aerodynamic Carvings" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Damage by 12.5% (" + StaticColorHexes.AddColorToLabelString("+12.5%", StaticColorHexes.Light_Orange_Hex) + ")\nand player projectile speed by 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.15f)) { ProjectileData baseData = p.baseData; baseData.damage *= 1.125f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1.33f; p.UpdateSpeed(); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.125f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 1f + 0.333f * (float)num; p.UpdateSpeed(); } static AerodynamicRounds() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(AerodynamicRounds)); val.Name = "Aerodynamic Carvings"; val.Description = "Whizz Up"; val.LongDescription = "Increases Damage by\n12.5% (+12.5% per stack) and player projectile speed by 33% (+33% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("aerdynamic_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class CycleEfficiency : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("cycleup_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Cycle Efficiency " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases rate of fire and reload speed by 15% (" + StaticColorHexes.AddColorToLabelString("+15% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AddModuleTag(BaseModuleTags.BASIC); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, Reload_Process = ProcessReloadTime, ChargeSpeed_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modularGunController.ProcessStats(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.15f * (float)num)); } public float ProcessReloadTime(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.15f * (float)num)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)this == (Object)null) && !((Object)(object)modulePrinterCore == (Object)null) && !((Object)(object)player == (Object)null) && !((Object)(object)((GameActor)player).CurrentGun == (Object)null)) { int num = ReturnStack(modulePrinterCore); GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(p.SafeCenter), Vector2.op_Implicit(Toolbox.GetUnitOnCircle(((GameActor)player).CurrentGun.CurrentAngle + (float)Random.Range(165, 195), 3f + 1f * (float)num)), (float?)null, (float?)2f, (Color?)null, (SparksType)2); } } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { modularGunController.ProcessStats(); } static CycleEfficiency() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CycleEfficiency)); val.Name = "Cycle Efficiency"; val.Description = "In And Out"; val.LongDescription = "Increases rate of fire and reload speed by 15% (+15% per stack hyperbolically)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("cycleup_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RepairKit : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("repairtool_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelName = "Repair Kit " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Restores 2 Armor on Pickup.\nIncreases Damage by 12.5% (" + StaticColorHexes.AddColorToLabelString("+12.5%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.EnergyConsumption = 0.5f; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.OverrideScrapCost = 6; defaultModule.IsUncraftable = true; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) ((GameActor)player).PlayEffectOnActor(VFXStorage.HealingSparklesVFX, new Vector3(0f, 0f), true, false, false); AkSoundEngine.PostEvent("Play_OBJ_heart_heal_01", ((Component)player).gameObject); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.Armor += 2f; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage += 0.5f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.damage *= 1f + 0.1f * (float)num; } static RepairKit() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RepairKit)); val.Name = "Repair Kit"; val.Description = "Up Keep"; val.LongDescription = "Restores 2 Armor on pickup. Increases Damage by\n12.5% (+12.5% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("repairtool_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class AggressiveReload : DefaultModule { public static ItemTemplate template; public static int ID; public float Mult; public static void PostInit(PickupObject v) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("aggressivereload_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Aggressive Reload " + defaultModule.ReturnTierLabel(); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.LabelDescription = "Reloading harms, pushes, burns and stuns enemies near you.\nEffectiveness scales on how empty the clip is. (" + StaticColorHexes.AddColorToLabelString("+Damage and Force", StaticColorHexes.Light_Orange_Hex) + ").\nCan deflect enemy bullets, with good timing."; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { int num = ReturnStack(modulePrinter); Mult = 1f + 0.5f * (float)num; } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one; Object.Destroy((Object)(object)val2, 2f); AkSoundEngine.PostEvent("Play_ENM_cannonball_blast_01", ((Component)player).gameObject); float num = 1f - g.PercentageOfClipLeft(); int num2 = ReturnStack(modulePrinterCore); num *= 1f + (float)num2 * 0.25f; Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), 80f * num, 5f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), 80f * num, 5f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), 5f); ApplyActionToNearbyEnemies(((BraveBehaviour)player).sprite.WorldCenter, 5f, player.CurrentRoom, num); foreach (Projectile allProjectile in StaticReferenceManager.AllProjectiles) { if ((Object)(object)allProjectile != (Object)null && (Object)(object)((Component)allProjectile).GetComponent() == (Object)null && Vector2.Distance(Object.op_Implicit((Object)(object)((BraveBehaviour)allProjectile).sprite) ? ((BraveBehaviour)allProjectile).sprite.WorldCenter : TransformExtensions.PositionVector2(((BraveBehaviour)allProjectile).transform), ((BraveBehaviour)player).sprite.WorldCenter) < 4f * num && (Object)(object)allProjectile.Owner != (Object)null && Object.op_Implicit((Object)/*isinst with value type is only supported in some contexts*/)) { GameActor gameActor = ((BraveBehaviour)player).gameActor; ProjectileData baseData = allProjectile.baseData; FistReflectBullet(allProjectile, gameActor, baseData.speed *= 2f, Vector2Extensions.ToAngle(((BraveBehaviour)allProjectile).sprite.WorldCenter - TransformExtensions.PositionVector2(((BraveBehaviour)player).transform)), 1f, allProjectile.IsBlackBullet ? ((5f + allProjectile.baseData.speed) * 2f) : (5f + allProjectile.baseData.speed)); } } } public static void FistReflectBullet(Projectile p, GameActor newOwner, float minReflectedBulletSpeed, float ReflectAngle, float scaleModifier = 1f, float damageModifier = 10f, float spread = 0f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_003e: Unknown result type (might be due to invalid IL or missing references) p.RemoveBulletScriptControl(); Vector2 unitOnCircle = Toolbox.GetUnitOnCircle(ReflectAngle, 1f); p.Direction = unitOnCircle; if (spread != 0f) { p.Direction = Vector2Extensions.Rotate(p.Direction, Random.Range(0f - spread, spread)); } if (Object.op_Implicit((Object)(object)p.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)p.Owner).specRigidbody)) { ((BraveBehaviour)p).specRigidbody.DeregisterSpecificCollisionException(((BraveBehaviour)p.Owner).specRigidbody); } p.Owner = newOwner; p.SetNewShooter(((BraveBehaviour)newOwner).specRigidbody); p.allowSelfShooting = false; if (newOwner is AIActor) { p.collidesWithPlayer = true; p.collidesWithEnemies = false; } else { p.collidesWithPlayer = false; p.collidesWithEnemies = true; } if (scaleModifier != 1f) { SpawnManager.PoolManager.Remove(((BraveBehaviour)p).transform); p.RuntimeUpdateScale(scaleModifier); } if (p.Speed < minReflectedBulletSpeed) { p.Speed = minReflectedBulletSpeed; } p.baseData.damage = 3.5f; p.UpdateCollisionMask(); p.ResetDistance(); p.Reflected(); } public void ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room, float m) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) List list = new List(); float num = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (!Object.op_Implicit((Object)(object)room.activeEnemies[i])) { continue; } AIActor val = room.activeEnemies[i]; bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num; } if (flag) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)val).behaviorSpeculator) && !((BraveBehaviour)val).behaviorSpeculator.ImmuneToStun) { ((BraveBehaviour)val).behaviorSpeculator.Stun((1.5f + Mult / 2f) * m, true); } ((BraveBehaviour)val).healthHaver.ApplyDamage(25f * Mult * m, TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), "Vent", (CoreDamageTypes)4, (DamageCategory)0, false, (PixelCollider)null, false); ((GameActor)val).ApplyEffect((GameActorEffect)(object)DebuffStatics.hotLeadEffect, 1f, (Projectile)null); } } } static AggressiveReload() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(AggressiveReload)); val.Name = "Aggressive Reload"; val.Description = "Air Force"; val.LongDescription = "Reloading harms, burns and pushes and stuns enemies near you. Effectiveness scales on how empty the clip is. (Damage and force is increased per stack). Can deflect enemy bullets, with good timing."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("aggressivereload_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class ConcussiveTips : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("conc_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Concussive Tips " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Knockback Force by 100% (" + StaticColorHexes.AddColorToLabelString("+100%", StaticColorHexes.Light_Orange_Hex) + "),\nBoss damage by 25% (" + StaticColorHexes.AddColorToLabelString("+25%", StaticColorHexes.Light_Orange_Hex) + ")\nand adds a small chance to stun enemies."; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.AddModuleTag(BaseModuleTags.BASIC); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.05f)) { int num = 1; p.BossDamageMultiplier *= 1f + 0.25f * (float)num; ProjectileData baseData = p.baseData; baseData.force *= (float)(1 + num); p.StunApplyChance = 1f - 1f / (1f + 0.03f * (float)num); p.AppliesStun = true; p.AppliedStunDuration = 1.25f * (float)num; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); p.BossDamageMultiplier *= 1f + 0.25f * (float)num; ProjectileData baseData = p.baseData; baseData.force *= (float)(1 + num); p.StunApplyChance = 1f - 1f / (1f + 0.03f * (float)num); p.AppliesStun = true; p.AppliedStunDuration = 1.25f * (float)num; } static ConcussiveTips() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ConcussiveTips)); val.Name = "Concussive Tips"; val.Description = "Hit Harder, Differently"; val.LongDescription = "Increases knockback Force by 100% (+100% per stack), Boss damage by 25% (+25% per stack), and adds a small chance to stun enemies."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("conc_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BypassedRecoil : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("nodampener_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Disabled Dampeners " + defaultModule.ReturnTierLabel(); defaultModule.AdditionalWeightMultiplier = 0.7f; defaultModule.LabelDescription = "Increases Rate Of Fire by 66% (" + StaticColorHexes.AddColorToLabelString("+66% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")\nand reduces reload time by 25% (" + StaticColorHexes.AddColorToLabelString("+25% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")\nbut disables your weapons recoil dampener."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 3; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate, Reload_Process = ProcessReloadTime }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { modularGunController.ProcessStats(); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.666f * (float)num)); } public float ProcessReloadTime(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.25f * (float)num)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); ((BraveBehaviour)player).knockbackDoer.ApplyKnockback(Toolbox.GetUnitOnCircle(((GameActor)player).CurrentGun.CurrentAngle - 180f, 1f), (float)(20 * num) * (1f + p.baseData.damage / 60f), false); ProjectileData baseData = p.baseData; baseData.speed *= 1f + 0.2f * (float)num; ProjectileData baseData2 = p.baseData; baseData2.force *= 1f + 0.2f * (float)num; p.UpdateSpeed(); } static BypassedRecoil() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BypassedRecoil)); val.Name = "Disabled Dampeners"; val.Description = "Recoil Up"; val.LongDescription = "Increases Rate Of Fire by\n66% (+66% per stack hyperbolically), and reduces reload time by 25% (+25% per stack hyperbolically) but disables recoil dampeners."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("nodampener_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PlatedRage : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("platedrage_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Plated Rage " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Damage by 3.33% (" + StaticColorHexes.AddColorToLabelString("+3.33%", StaticColorHexes.Light_Orange_Hex) + ")\nfor each piece of armor held."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.1f)) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.0333f * ((BraveBehaviour)player).healthHaver.Armor; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.0333f * (float)num * ((BraveBehaviour)player).healthHaver.Armor; } static PlatedRage() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PlatedRage)); val.Name = "Plated Rage"; val.Description = "Armored Core"; val.LongDescription = "Increases Damage by\n3.33% (+3.33% per stack) for each piece of armor held."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("platedrage_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class AbsorbantPlating : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("absorbantplate_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Absorbant Plating" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Fire and Poison take 3 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") times longer do damage you.\nGain a 75% (" + StaticColorHexes.AddColorToLabelString("+75% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ") fire rate and accuracy boost\nwhen standing on any goop.\nBeing poisoned or on fire makes projectiles inflict poison or fire."; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 6; defaultModule.EnergyConsumption = 1f; ID = ((PickupObject)defaultModule).PickupObjectId; new Hook((MethodBase)typeof(PlayerController).GetMethod("IncreaseFire", BindingFlags.Instance | BindingFlags.Public), typeof(AbsorbantPlating).GetMethod("IncreaseFireHook")); new Hook((MethodBase)typeof(PlayerController).GetMethod("IncreasePoison", BindingFlags.Instance | BindingFlags.Public), typeof(AbsorbantPlating).GetMethod("IncreasePoisonHook")); } public static void IncreaseFireHook(Action orig, PlayerController self, float amount) { if (self.PlayerHasModule(ID) != null) { ModulePrinterCore.ModuleContainer moduleContainer = self.PlayerHasModule(ID); amount /= (float)(moduleContainer.defaultModule.ReturnStack(moduleContainer.defaultModule.Stored_Core) + 2); } orig(self, amount); } public static void IncreasePoisonHook(Action orig, PlayerController self, float amount) { if (self.PlayerHasModule(ID) != null) { ModulePrinterCore.ModuleContainer moduleContainer = self.PlayerHasModule(ID); amount /= (float)(moduleContainer.defaultModule.ReturnStack(moduleContainer.defaultModule.Stored_Core) + 2); } orig(self, amount); } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "Gooper", FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate, Accuracy_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { if ((Object)(object)((GameActor)player).CurrentGoop == (Object)null) { return f; } int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.75f * (float)num)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (p.statusEffectsToApply == null) { p.statusEffectsToApply = new List(); } if (player.IsOnFire) { p.statusEffectsToApply.Add((GameActorEffect)(object)DebuffStatics.hotLeadEffect); p.AdjustPlayerProjectileTint(Color.red, 2, 0f); } if (player.CurrentPoisonMeterValue > 0f) { p.statusEffectsToApply.Add((GameActorEffect)(object)DebuffStatics.irradiatedLeadEffect); p.AdjustPlayerProjectileTint(Color.green, 2, 0f); } } static AbsorbantPlating() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(AbsorbantPlating)); val.Name = "Absorbant Plating"; val.Description = "Spongy"; val.LongDescription = "Fire and Poison takes 3 (+1 per stack) times longer to damage you.\nGain a 75% (+75% per stack) fire rate and accuracy boost when standing on any goop. Being poisoned or on fire makes projectiles inflict poison or fire."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("absorbantplate_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BubbleBlast : DefaultModule { public class BoostProjectileComponent : MonoBehaviour { public Projectile self; public float DamageBoost = 1f; public void DoBoost() { if (!((Object)(object)self == (Object)null)) { ProjectileData baseData = self.baseData; baseData.speed *= 20f; self.UpdateSpeed(); ProjectileData baseData2 = self.baseData; baseData2.damage *= DamageBoost; ProjectileData baseData3 = self.baseData; baseData3.force *= DamageBoost; } } } public static ItemTemplate template; public static int ID; public List activeBubbles = new List(); public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("bubbleblast_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Bubble Blast " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Slightly decreases Accuracy, and increases fire rate by 33% (" + StaticColorHexes.AddColorToLabelString("+33% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ").\nProjectiles will slow to a crawl after a moment.\nReloading boosts all slowed projectiles\nand increases their damage by 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "CouterProduction", Accuracy_Process = ProcessAccuracy, FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { for (int num = activeBubbles.Count - 1; num >= 0; num--) { BoostProjectileComponent boostProjectileComponent = activeBubbles[num]; if ((Object)(object)boostProjectileComponent != (Object)null) { boostProjectileComponent.DamageBoost = 1f + 0.33f * (float)ReturnStack(modulePrinterCore); boostProjectileComponent.DoBoost(); } activeBubbles.RemoveAt(num); } } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.range += 6f; ((MonoBehaviour)p).StartCoroutine(SpeedChange(p)); } public IEnumerator SpeedChange(Projectile p) { float s = p.baseData.speed; float e = 0f; while (e < 0.66f) { if ((Object)(object)p == (Object)null) { yield break; } float t = e / 0.66f; p.baseData.speed = Mathf.Lerp(s, s * 0.0666f, t); p.UpdateSpeed(); e += BraveTime.DeltaTime * 1.5f; yield return null; } BoostProjectileComponent bubble = ((Component)p).gameObject.AddComponent(); bubble.self = p; activeBubbles.Add(bubble); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 1.2f; } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinterCore); return f - (f - f / (1f + 0.2f * (float)num)); } static BubbleBlast() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BubbleBlast)); val.Name = "Bubble Blast"; val.Description = "Bubbles!"; val.LongDescription = "Slightly decreases Accuracy\nand increases fire rate by 33% (+33% per stack hyperbolically). Projectiles will slow to a crawl after a moment. Reloading boosts all slowed projectiles and increases their damage by 33% (+33% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("bubbleblast_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class LaserLance : DefaultModule { public static ItemTemplate template; public static int ID; public static Projectile LanceBeam; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("laserlance_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Laser Lance " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Reduces projectile speed by 50%.\nProjectiles will now fire out short-range damaging beams\nthat point in the direction the projectile is moving.\n(" + StaticColorHexes.AddColorToLabelString("+Beam Damage And Range", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(86); Projectile val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]); BasicBeamController val2 = val.GenerateBeamPrefabBundle("lancebeam_impact_001", StaticCollections.Beam_Collection, StaticCollections.Beam_Animation, "lancebeam_idle", new Vector2(6f, 6f), new Vector2(0f, 0f), "lancebeam_impact", (Vector2?)new Vector2(6f, 6f), (Vector2?)new Vector2(0f, 0f), "lancebeam_end", (Vector2?)new Vector2(6f, 6f), (Vector2?)new Vector2(0f, 0f), "lancebeam_idle", (Vector2?)new Vector2(6f, 6f), (Vector2?)new Vector2(0f, 0f), glows: false, canTelegraph: false, (string)null, (string)null, (string)null, 1f, canDissipate: false, (string)null, (string)null, (string)null, 1f); EmmisiveBeams orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); orAddComponent.EmissivePower = 20f; orAddComponent.EmissiveColorPower = 20f; val.baseData.damage = 26f; val.baseData.range = 1.7f; val.baseData.speed = 10f; val.baseData.force = 0f; BounceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); orAddComponent2.numberOfBounces = 1; PierceProjModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); orAddComponent3.penetration = 3; orAddComponent3.preventPenetrationOfActors = false; FakePrefab.MakeFakePrefab(((Component)val).gameObject); Object.DontDestroyOnLoad((Object)(object)val); val2.boneType = (BeamBoneType)0; val2.interpolateStretchedBones = false; val2.ContinueBeamArtToWall = true; val2.penetration = 3; LanceBeam = ((BraveBehaviour)val2).projectile; ModulePrinterCore.ModifyForChanceBulletsOneFrameDelay = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBulletsOneFrameDelay, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (!(Random.value > 0.01f)) { ProjectileData baseData = p.baseData; baseData.speed *= 0.5f; p.UpdateSpeed(); BeamController val = BeamToolbox.FreeFireBeamFromAnywhere(LanceBeam, player, ((Component)p).gameObject, TransformExtensions.PositionVector2(((Component)p).gameObject.transform), usesFixedPosition: false, p.angularVelocity, 100f); Projectile component = ((Component)val).GetComponent(); float num = p.baseData.damage * player.stats.GetStatValue((StatType)5); component.baseData.damage = 3f + p.baseData.damage * 1.5f; component.AdditionalScaleMultiplier *= 0.5f; ProjectileData baseData2 = component.baseData; baseData2.range *= 1.5f; BeamPointer beamPointer = ((Component)p).gameObject.AddComponent(); beamPointer.self = p; beamPointer.beam = val; BounceProjModifier component2 = ((Component)p).gameObject.GetComponent(); if ((Object)(object)component2 == (Object)null) { BounceProjModifier val2 = ((Component)p).gameObject.AddComponent(); val2.numberOfBounces = 1; } else { component2.numberOfBounces++; } StickyProjectileModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.stickyContexts.Add(new StickyProjectileModifier.StickyContext { CanStickToTerrain = false, CanStickEnemies = false }); orAddComponent.OnStick = (Action)Delegate.Combine(orAddComponent.OnStick, new Action(OPSA)); orAddComponent.OnStickToWall = (Action)(object)Delegate.Combine((Delegate?)(object)orAddComponent.OnStickToWall, (Delegate?)(object)new Action(OPSAT)); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(PPP)); modulePrinter.OnProjectileStickAction = (Action)Delegate.Combine(modulePrinter.OnProjectileStickAction, new Action(OPSA)); modulePrinter.OnProjectileStickToWallAction = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnProjectileStickToWallAction, (Delegate?)(object)new Action(OPSAT)); } public void OPSA(GameObject s, StickyProjectileModifier mod, tk2dBaseSprite sprite, PlayerController p) { if (Object.op_Implicit((Object)(object)s.GetComponent())) { s.GetComponent().OnStuck(s); } } public void OPSAT(GameObject s, StickyProjectileModifier mod, tk2dBaseSprite sprite, PlayerController p, Tile t) { if (Object.op_Implicit((Object)(object)s.GetComponent())) { s.GetComponent().OnStuck(s, t); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectileOneFrameDelay = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectileOneFrameDelay, (Delegate?)(object)new Action(PPP)); modulePrinter.OnProjectileStickAction = (Action)Delegate.Remove(modulePrinter.OnProjectileStickAction, new Action(OPSA)); modulePrinter.OnProjectileStickToWallAction = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnProjectileStickToWallAction, (Delegate?)(object)new Action(OPSAT)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.speed *= 0.5f; p.UpdateSpeed(); BeamController val = BeamToolbox.FreeFireBeamFromAnywhere(LanceBeam, player, ((Component)p).gameObject, TransformExtensions.PositionVector2(((Component)p).gameObject.transform), usesFixedPosition: false, p.angularVelocity, 100f); Projectile component = ((Component)val).GetComponent(); float num2 = p.baseData.damage * player.stats.GetStatValue((StatType)5); component.baseData.damage = (float)(3 * num) + p.baseData.damage * (1f + 0.5f * (float)num); component.AdditionalScaleMultiplier *= 0.5f; ProjectileData baseData2 = component.baseData; baseData2.range *= 1f + (float)num * 0.5f; BeamPointer beamPointer = ((Component)p).gameObject.AddComponent(); beamPointer.self = p; beamPointer.Object = ((Component)p).gameObject; beamPointer.beam = val; BounceProjModifier component2 = ((Component)p).gameObject.GetComponent(); if ((Object)(object)component2 == (Object)null) { BounceProjModifier val2 = ((Component)p).gameObject.AddComponent(); val2.numberOfBounces = 1; } else { component2.numberOfBounces++; } } static LaserLance() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(LaserLance)); val.Name = "Laser Lance"; val.Description = "Pointy"; val.LongDescription = "Reduces projectile speed by 50%. Projectiles will now fire out short-range, damaging beams that point in the direction the projectile is moving. (+Beam Damage And Range per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("laserlance_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BeamPointer : MonoBehaviour { public GameObject Object; public Projectile self; public BeamController beam; public bool FUCK = false; public void Start() { } public void OnStuck(GameObject p, Tile t = null) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) FUCK = true; if (Object.op_Implicit((Object)(object)beam)) { Vector2 val = Vector2.op_Implicit((Vector3)((t != null) ? GameManager.Instance.Dungeon.data.tilemap.GetTilePosition(t.X, t.Y) : new Vector3(-60f, 60f))); beam.Direction = Toolbox.GetUnitOnCircle((t != null) ? BraveMathCollege.GetNearestAngle(Vector2Extensions.ToAngle(TransformExtensions.PositionVector2(p.transform) - val), new float[4] { 0f, 90f, 180f, 270f }) : (Vector2Extensions.ToAngle(beam.Direction) + 180f), 1f); } } public void Update() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (!FUCK && (Object)(object)beam != (Object)null && (Object)(object)Object != (Object)null) { beam.Direction = Toolbox.GetUnitOnCircle(Vector2Extensions.ToAngle(self.LastVelocity), 1f); } else if ((Object)(object)Object == (Object)null && (Object)(object)beam != (Object)null) { beam.CeaseAttack(); } } } public class HunterSeeker : DefaultModule { public class HomingRamp : MonoBehaviour { public Projectile self; public HomingModifier mod; public float Angualt_Vel_Gain_PS = 45f; public float Vision_Per_Second = 2f; public void Start() { } public void Update() { if ((Object)(object)mod != (Object)null) { HomingModifier obj = mod; obj.AngularVelocity += Angualt_Vel_Gain_PS * BraveTime.DeltaTime; HomingModifier obj2 = mod; obj2.HomingRadius += Vision_Per_Second * BraveTime.DeltaTime; } } } public static ItemTemplate template; public static int ID; public static MarkedEffect effect; public static List lockedEnemies; public static void PostInit(PickupObject v) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("hunterseeker_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Hunter Seeker " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Reduces projectile speed by 33%.\nProjectiles gain increased homing over time. (" + StaticColorHexes.AddColorToLabelString("+Increased Homing Power Growth") + ")"; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AdditionalWeightMultiplier = 0.85f; defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.25f, -1.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 1.875f); ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.02f)) { int num = 1; ProjectileData baseData = p.baseData; baseData.speed *= 0.66f; p.UpdateSpeed(); HomingModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.AngularVelocity = 20f; orAddComponent.HomingRadius = 10 + 5 * num; HomingRamp orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.self = p; orAddComponent2.mod = orAddComponent; orAddComponent2.Angualt_Vel_Gain_PS = 90 * num; orAddComponent2.Vision_Per_Second += num * 2; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PP(Projectile p, PlayerController player) { } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(Stored_Core); ProjectileData baseData = p.baseData; baseData.speed *= 0.66f; p.UpdateSpeed(); HomingModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.AngularVelocity = 60f; orAddComponent.HomingRadius = 5 + 5 * num; HomingRamp orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.self = p; orAddComponent2.mod = orAddComponent; orAddComponent2.Angualt_Vel_Gain_PS = 90 * num; orAddComponent2.Vision_Per_Second += num * 2; } static HunterSeeker() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: 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_00c3: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HunterSeeker)); val.Name = "Hunter Seeker"; val.Description = "Live For The Hunt"; val.LongDescription = "Projectile speed reduced by 33%. Projectiles gain increased homing over time. (+Increased Homing Power Growth per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("hunterseeker_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; effect = new MarkedEffect { effectIdentifier = "dasfafafa", AffectsEnemies = true, resistanceType = (EffectResistanceType)0, duration = 7f, AppliesTint = true, AppliesDeathTint = true, OverheadVFX = MarkedEffect.MarkedVFX, PlaysVFXOnActor = true, AffectsPlayers = false, stackMode = (EffectStackingMode)0 }; lockedEnemies = new List(); } } public class BurningHell : DefaultModule { public static ItemTemplate template; public static int ID; public static tk2dSpriteAnimation mineAnimation; public static void PostInit(PickupObject v) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("burninghell_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Burning Hell " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Halves fire rate and increases accuracy.\nProjectiles will stick to terrain and enemies and\ncreate an area that hurts and burns enemies.\n(" + StaticColorHexes.AddColorToLabelString("+Burning Radius And Damage", StaticColorHexes.Light_Orange_Hex) + ")."; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.EnergyConsumption = 2f; defaultModule.AddModuleTag(BaseModuleTags.STICKY); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddToGlobalStorage(); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.01f)) { ProjectileData baseData = p.baseData; baseData.speed *= 1.5f; p.pierceMinorBreakables = true; p.UpdateSpeed(); StickyProjectileModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.stickyContexts.Add(new StickyProjectileModifier.StickyContext { CanStickToTerrain = true, CanStickEnemies = true }); orAddComponent.OnStick = (Action)Delegate.Combine(orAddComponent.OnStick, new Action(H_S)); orAddComponent.OnStickyDestroyed = (Action)Delegate.Combine(orAddComponent.OnStickyDestroyed, new Action(H2)); } } public void H_S(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(328); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.overrideMidairDeathVFX, stick.transform.position, Quaternion.identity); Object.Destroy((Object)(object)val, 2f); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoTimer(stick, 2.5f)); } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { stickyContext = new StickyProjectileModifier.StickyContext { CanStickToTerrain = true, CanStickEnemies = true }; gunStatModifier = new ModuleGunStatModifier { Name = "BurningHell", Accuracy_Process = PFR, FireRate_Process = FireRate, ChargeSpeed_Process = FireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.stickyContexts.Add(stickyContext); modulePrinter.OnProjectileStickAction = (Action)Delegate.Combine(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Combine(modulePrinter.OnStickyDestroyAction, new Action(H2)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.speed *= 1.5f; p.pierceMinorBreakables = true; p.UpdateSpeed(); } public void H(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(328); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.overrideMidairDeathVFX, stick.transform.position, Quaternion.identity); Object.Destroy((Object)(object)val, 2f); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoTimer(stick, 2.5f + (float)Stack())); } public IEnumerator DoTimer(GameObject sticky, float radius = 2f, float DetTime = 10f) { RoomHandler room = Vector3Extensions.GetAbsoluteRoom(sticky.transform.position); float e = 0f; float asdf = 0f; while (e < 1f && !((Object)(object)sticky == (Object)null)) { if (room != null) { if (asdf > 0.2f) { asdf = 0f; GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(TransformExtensions.PositionVector2(sticky.transform) + Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0.1f, radius))), Vector2.op_Implicit(Vector2.up), (float?)null, (float?)3f, (Color?)null, (SparksType)4); } float t = e / 1f; float throne1 = Mathf.Sin(t * ((float)Math.PI / 2f)); room.ApplyActionToNearbyEnemies(Vector2.op_Implicit(sticky.transform.position), Mathf.Lerp(0f, radius, throne1), (Action)Enemies); } e += BraveTime.DeltaTime; asdf += BraveTime.DeltaTime; yield return null; } e = 0f; asdf = 0f; while (e < DetTime && !((Object)(object)sticky == (Object)null)) { if (room != null) { if (asdf > 0.25f) { asdf = 0f; GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(TransformExtensions.PositionVector2(sticky.transform) + Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0.1f, radius))), Vector2.op_Implicit(Vector2.up), (float?)null, (float?)3f, (Color?)null, (SparksType)4); } room.ApplyActionToNearbyEnemies(Vector2.op_Implicit(sticky.transform.position), radius, (Action)Enemies); } asdf += BraveTime.DeltaTime; e += BraveTime.DeltaTime; yield return null; } Object.Destroy((Object)(object)sticky); } public void Enemies(AIActor aI, float f) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)aI)) { ((BraveBehaviour)aI).healthHaver.ApplyDamage(1.25f * (float)Stack() * BraveTime.DeltaTime, Vector2.zero, "Hellfire", (CoreDamageTypes)4, (DamageCategory)1, false, (PixelCollider)null, false); if (Random.value < 0.025f) { ((BraveBehaviour)aI).gameActor.ApplyEffect((GameActorEffect)(object)DebuffStatics.hotLeadEffect, 1f, (Projectile)null); } } } public void H2(GameObject stick, StickyProjectileModifier comp, PlayerController p) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(328); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.overrideMidairDeathVFX, stick.transform.position, Quaternion.identity); Object.Destroy((Object)(object)val, 2f); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); if (modulePrinter.stickyContexts.Contains(stickyContext)) { modulePrinter.stickyContexts.Remove(stickyContext); } modulePrinter.OnProjectileStickAction = (Action)Delegate.Remove(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Remove(modulePrinter.OnStickyDestroyAction, new Action(H2)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public float FireRate(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { return f * 2f; } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { return f / 2f; } static BurningHell() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BurningHell)); val.Name = "Burning Hell"; val.Description = "Exchange Rate"; val.LongDescription = "Halves fire rate and increases accuracy. Projectiles will stick to terrain and enemies and create an area that hurts and burns enemies. (+Burning Radius And Damage per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("burninghell_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class StickyBomb : DefaultModule { public static ItemTemplate template; public static ExplosionData Data; public static int ID; public static tk2dSpriteAnimation mineAnimation; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("stickybombs_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Sticky Bomb " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Accuracy by 33% (" + StaticColorHexes.AddColorToLabelString("+33% hyperbolically", StaticColorHexes.Light_Orange_Hex) + "),\nprojectiles now leave sticky bombs on enemies that\nexplode after 10 (" + StaticColorHexes.AddColorToLabelString("-25% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ") seconds.\n(" + StaticColorHexes.AddColorToLabelString("+Sticky Bomb Damage", StaticColorHexes.Light_Orange_Hex) + ")"; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.AddModuleTag(BaseModuleTags.STICKY); defaultModule.AddToGlobalStorage(); defaultModule.stickyContext = new StickyProjectileModifier.StickyContext { CanStickToTerrain = false, CanStickEnemies = true }; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; Data = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); Data.damage = 8f; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.02f)) { ProjectileData baseData = p.baseData; baseData.speed *= 2f; p.pierceMinorBreakables = true; p.UpdateSpeed(); StickyProjectileModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.stickyContexts.Add(new StickyProjectileModifier.StickyContext { CanStickToTerrain = false, CanStickEnemies = true }); orAddComponent.OnStick = (Action)Delegate.Combine(orAddComponent.OnStick, new Action(H_S)); orAddComponent.OnStickyDestroyed = (Action)Delegate.Combine(orAddComponent.OnStickyDestroyed, new Action(H2)); orAddComponent.OnPreStick = (Action)Delegate.Combine(orAddComponent.OnPreStick, new Action(OPPS)); } } public void H_S(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { ((MonoBehaviour)comp).StartCoroutine(DoTimer(stick, 10f)); } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "Mines", Accuracy_Process = PFR }; modulePrinter.stickyContexts.Add(stickyContext); modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.OnProjectileStickAction = (Action)Delegate.Combine(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Combine(modulePrinter.OnStickyDestroyAction, new Action(H2)); modulePrinter.OnPreProjectileStickAction = (Action)Delegate.Combine(modulePrinter.OnPreProjectileStickAction, new Action(OPPS)); } public void OPPS(GameObject p, PlayerController player) { AkSoundEngine.PostEvent("Play_OBJ_mine_beep_01", p.gameObject); tk2dBaseSprite componentInChildren = p.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.SetSprite(StaticCollections.Projectile_Collection, StaticCollections.Projectile_Collection.GetSpriteIdByName("mine_idle_001")); } } public void H(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { ((MonoBehaviour)comp).StartCoroutine(DoTimer(stick, 12.5f - (12.5f - 12.5f / (1f + 0.25f * (float)Stack())))); } public IEnumerator DoTimer(GameObject sticky, float DetTime = 5f) { float e2 = 0f; while (e2 < DetTime) { if ((Object)(object)sticky == (Object)null) { yield break; } e2 += BraveTime.DeltaTime; yield return null; } if ((Object)(object)sticky == (Object)null) { yield break; } AkSoundEngine.PostEvent("Play_BOSS_mineflayer_trigger_01", sticky.gameObject); sticky.GetComponentInChildren().SetSprite(sticky.GetComponentInChildren().Collection.GetSpriteIdByName("mine_idle_002")); e2 = 0f; while (e2 < 1f) { if ((Object)(object)sticky == (Object)null) { yield break; } e2 += BraveTime.DeltaTime; yield return null; } Object.Destroy((Object)(object)sticky); } public void H2(GameObject stick, StickyProjectileModifier comp, PlayerController p) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) int num = 1; if ((Object)(object)Stored_Core != (Object)null) { num = Stack(); } ExplosionData val = StaticExplosionDatas.CopyFields(Data); val.damage = 7.5f + (float)(5 * num); Exploder.Explode(stick.transform.position, val, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.stickyContexts.Remove(stickyContext); modulePrinter.OnProjectileStickAction = (Action)Delegate.Remove(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Remove(modulePrinter.OnStickyDestroyAction, new Action(H2)); modulePrinter.OnPreProjectileStickAction = (Action)Delegate.Remove(modulePrinter.OnPreProjectileStickAction, new Action(OPPS)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinter); return f - (f - f / (1f + 0.333f * (float)num)); } static StickyBomb() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(StickyBomb)); val.Name = "Sticky Bomb"; val.Description = "KA-BLEWY"; val.LongDescription = "Increases Accuracy by 33% (+33% hyperbolically per stack), projectiles now leave sticky bombs on enemies that\nexplode after 10 (-25% hyperbolically per stack) seconds. (+Sticky Bomb Damage per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("stickybombs_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class TheMarksman : DefaultModule { public static ItemTemplate template; public static int ID; private static GameObject HitOrMissVFX; private int Hits = 0; private int HitCap = 10; public static void PostInit(PickupObject v) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("marksman_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "The Marksman " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Hitting an enemy grants a 5% damage boost,\nup to 20 (" + StaticColorHexes.AddColorToLabelString("+10", StaticColorHexes.Light_Orange_Hex) + ") consecutive hits.\nMissing resets the damage bonus."; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); GameObject val = new GameObject("Marksman_VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 30f); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("marksmanhit_005")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("MarksmanAnimation").GetComponent(); HitOrMissVFX = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnPreEnemyHit = (Action)Delegate.Combine(modulePrinter.OnPreEnemyHit, new Action(OPEH)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { HitCap = 10 * ReturnStack(modulePrinter) + 10; } public void OPEH(ModulePrinterCore modulePrinter, PlayerController player, AIActor enemy, Projectile p) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) if (HitCap > Hits) { Hits++; GameObject val = ((GameActor)enemy).PlayEffectOnActor(HitOrMissVFX, new Vector3(0f, 2f), true, false, false); val.GetComponent().PlayAndDestroyObject("marksman_hit", (Action)null); AkSoundEngine.PostEvent("Play_BOSS_Rat_Cheese_Jump_01", ((Component)player).gameObject); } } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.05f * (float)Hits; ProjectileData baseData2 = p.baseData; baseData2.force *= 1f + 0.05f * (float)Hits; ProjectileData baseData3 = p.baseData; baseData3.speed *= 1f + 0.0125f * (float)Hits; p.UpdateSpeed(); p.OnDestruction += HandleProjectileDestruction; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnPreEnemyHit = (Action)Delegate.Remove(modulePrinter.OnPreEnemyHit, new Action(OPEH)); } private void HandleProjectileDestruction(Projectile source) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)source) && Object.op_Implicit((Object)(object)source.PossibleSourceGun) && !source.HasImpactedEnemy && Hits > 0) { AkSoundEngine.PostEvent("Play_BOSS_Punchout_Punch_Hit_01", ((Component)source.PossibleSourceGun.CurrentOwner).gameObject); GameObject val = source.PossibleSourceGun.CurrentOwner.PlayEffectOnActor(HitOrMissVFX, new Vector3(0f, 2f), true, false, false); val.GetComponent().PlayAndDestroyObject("marksman_miss", (Action)null); Hits = 0; } } static TheMarksman() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TheMarksman)); val.Name = "The Marksman"; val.Description = "Version First"; val.LongDescription = "Hitting an enemy grants a 5% damage boost, up to 20 (+10 per stack) consecutive hits. Missing resets the damage bonus."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("marksman_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RefundedComponents : DefaultModule { public static ItemTemplate template; public static int ID; private static GameObject HitOrMissVFX; private Coroutine coroutine; public int MissCap = 10; private int Misses = 0; public static void PostInit(PickupObject v) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("refundstuff_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Refunded Components" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Missed shots are refunded back into your clip.\nGain a 33% boost to damage when you miss, up to 10 " + StaticColorHexes.AddColorToLabelString("+10", StaticColorHexes.Light_Orange_Hex) + " boosts.\nLanding a hit will use all stored damage."; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); GameObject val = new GameObject("HitOrMiss_VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("hit_dat_004")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("RefundAnimation").GetComponent(); HitOrMissVFX = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnPreEnemyHit = (Action)Delegate.Combine(modulePrinter.OnPreEnemyHit, new Action(OPEH)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { MissCap = 10 * ReturnStack(modulePrinter); } public void OPEH(ModulePrinterCore modulePrinter, PlayerController player, AIActor enemy, Projectile p) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (Misses == 0) { return; } if ((Object)(object)player != (Object)null) { GameObject val = ((GameActor)(object)player).SmarterPlayEffectOnActor(HitOrMissVFX, new Vector3(0f, 2f)); if ((Object)(object)val != (Object)null) { val.GetComponent().PlayAndDestroyObject("vfx_hit", (Action)null); } AkSoundEngine.PostEvent("Play_OBJ_box_uncover_01", ((Component)player).gameObject); } if ((Object)(object)p != (Object)null) { float num = 1f + 0.33f * (float)Misses; float num2 = 1f + 0.5f * (float)Misses; ProjectileData baseData = p.baseData; baseData.damage *= num; ProjectileData baseData2 = p.baseData; baseData2.force *= num2; if (coroutine == null) { coroutine = ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoWait()); } } } public IEnumerator DoWait() { yield return (object)new WaitForSeconds(0.075f); Misses = 0; coroutine = null; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { p.OnDestruction += HandleProjectileDestruction; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnPreEnemyHit = (Action)Delegate.Remove(modulePrinter.OnPreEnemyHit, new Action(OPEH)); } private void HandleProjectileDestruction(Projectile source) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)source) && Object.op_Implicit((Object)(object)source.PossibleSourceGun) && !source.HasImpactedEnemy) { source.PossibleSourceGun.MoveBulletsIntoClip(1); if (Misses < MissCap) { AkSoundEngine.PostEvent("Play_OBJ_compass_point_01", ((Component)source.PossibleSourceGun.CurrentOwner).gameObject); GameObject val = source.PossibleSourceGun.CurrentOwner.SmarterPlayEffectOnActor(HitOrMissVFX, new Vector3(0f, 2f)); val.GetComponent().PlayAndDestroyObject("vfx_miss", (Action)null); Misses++; } } } static RefundedComponents() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RefundedComponents)); val.Name = "Refunded Components"; val.Description = "Exchange Rate"; val.LongDescription = "Missed shots are refunded back into your clip. Gain a 33% boost to damage when you miss, up to 10 (+10 per stack) misses.\nLanding a hit will use all stored damage."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("refundstuff_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RedirectSystem : DefaultModule { public static ItemTemplate template; public static int ID; public static List allActiveComps; public static void PostInit(PickupObject v) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("redirectsystem_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Redirect System " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Clip Size by 33% (" + StaticColorHexes.AddColorToLabelString("+33%", StaticColorHexes.Light_Orange_Hex) + ").\nDecreases reload time by 25% (" + StaticColorHexes.AddColorToLabelString("+25% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")\nAll shots will turn to face the same angle as the last fired shot."; defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 7; defaultModule.EnergyConsumption = 1f; defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "Redirect", ClipSize_Process = ProcessClipSize, Reload_Process = PFR }; modulePrinter.ProcessGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { RedirectComp orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.StartUp(p, ((GameActor)player).CurrentGun); ProjectileData baseData = p.baseData; baseData.speed *= 0.6f; p.UpdateSpeed(); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip + modularGunController.Base_Clip_Size / 3 * modulePrinterCore.ReturnStack(LabelName); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinter); return f - (f - f / (1f + 0.25f * (float)num)); } static RedirectSystem() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RedirectSystem)); val.Name = "Redirect System"; val.Description = "Exchange Rate"; val.LongDescription = "Increases Clip Size by 33% (+33% per stack). Decreases reload time by 25% (+25% hyperbolically) All shots will turn to face the same angle as the last fired shot."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("redirectsystem_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; allActiveComps = new List(); } } public class RedirectComp : MonoBehaviour { private Projectile self; public void StartUp(Projectile projectile, Gun gun) { self = projectile; foreach (RedirectComp allActiveComp in RedirectSystem.allActiveComps) { allActiveComp.Redirect(gun.CurrentAngle); } ((MonoBehaviour)self).StartCoroutine(Delay()); } public IEnumerator Delay() { yield return (object)new WaitForSeconds(0.15f); if (Object.op_Implicit((Object)(object)this)) { RedirectSystem.allActiveComps.Add(this); } } public void Redirect(float angle) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)self == (Object)null)) { self.SendInDirection(Toolbox.GetUnitOnCircle(angle, 1f), true, true); } } private void OnDestroy() { if (RedirectSystem.allActiveComps.Contains(this)) { RedirectSystem.allActiveComps.Remove(this); } } } public class CounterProductivity : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("counerproduction_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Counter Productivity " + defaultModule.ReturnTierLabel(); defaultModule.AdditionalWeightMultiplier = 0.75f; defaultModule.LabelDescription = "Divides Clip Size and Reload Time by 2 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ").\nSlightly increases fire rate (" + StaticColorHexes.AddColorToLabelString("+More Fire Rate", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "CouterProduction", FireRate_Process = PFR, ClipSize_Process = ProcessClipSize, Reload_Process = ProcessReloadTime, ChargeSpeed_Process = PFR }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { } public float ProcessReloadTime(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / (float)(1 + ReturnStack(modulePrinterCore)); } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip / (1 + ReturnStack(modulePrinterCore)); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { int num = ReturnStack(modulePrinter); return f - (f - f / (1f + 0.125f * (float)num)); } static CounterProductivity() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CounterProductivity)); val.Name = "Counter Productivity"; val.Description = "Exchange Rate"; val.LongDescription = "Divides Clip Size and Reload Time by 2 (+1 per stack). Slightly increases fire rate. (+More fire rate per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("counerproduction_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PatientZero : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject PoisonPoof; private static FleePlayerData fleeData; private Dictionary Infections = new Dictionary(); public static void PostInit(PickupObject v) { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("pandemic_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Patient Zero " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Chance to poison enemies on hit, and to spawn\npoison pools on projectile impact.\n(" + StaticColorHexes.AddColorToLabelString("+Poison Chance And Pool Radius", StaticColorHexes.Light_Orange_Hex) + ").\nHurting enemies can spread debuffs to other\nnearby enemies, breaking their resistances.\nSlain enemies cause an outbreak,\ngreatly reducing resistances and causing panic.\n(" + StaticColorHexes.AddColorToLabelString("+Virality and Severity", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.EnergyConsumption = 2f; defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId = PickupObjectDatabase.GetById(28); PoisonPoof = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.finalVolley.projectiles[0].projectiles[2].hitEffects.enemy.effects[0].effects[0].effect; fleeData = new FleePlayerData(); fleeData.StartDistance = 100f; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (Random.value > 0.075f) { return; } int stack = 1; p.AppliesPoison = true; p.PoisonApplyChance = 0.125f * (float)stack; p.healthEffect = DebuffStatics.irradiatedLeadEffect; p.OnDestruction += delegate(Projectile obj) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)obj) && Random.value < 0.025f * (float)stack) { DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.PoisonDef).TimedAddGoopCircle(((BraveBehaviour)obj).sprite.WorldBottomCenter, (float)(2 + stack), 0.5f + 0.25f * (float)stack, false); } }; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); printer.OnDamagedEnemy = (Action)Delegate.Combine(printer.OnDamagedEnemy, new Action(OnDamagedEnemy)); printer.OnKilledEnemy = (Action)Delegate.Combine(printer.OnKilledEnemy, new Action(OnKilledEnemy)); } public void OnKilledEnemy(ModulePrinterCore core, PlayerController player, AIActor enemy) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_01a3: 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) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(core); if (!Object.op_Implicit((Object)(object)enemy)) { return; } List activeEnemies = ((DungeonPlaceableBehaviour)enemy).GetAbsoluteParentRoom().activeEnemies; if (((GameActor)enemy).m_activeEffects != null || ((GameActor)enemy).m_activeEffects.Count > 0) { if (ConfigManager.DoVisualEffect) { GameObject val = Object.Instantiate(PoisonPoof, Vector2.op_Implicit(((BraveBehaviour)enemy).sprite.WorldCenter), Quaternion.identity); val.transform.localScale = Vector3.one * 0.5f; Object.Destroy((Object)(object)val, 3f); } AkSoundEngine.PostEvent("Play_ENM_Tarnisher_Bite_01", ((Component)enemy).gameObject); } foreach (GameActorEffect activeEffect in ((GameActor)enemy).m_activeEffects) { if (DebuffStatics.BlacklistedEffects.Contains(activeEffect.effectIdentifier)) { continue; } foreach (AIActor item in activeEnemies) { if ((Object)(object)((BraveBehaviour)item).behaviorSpeculator != (Object)null) { FleePlayerData val2 = fleeData; val2.Player = player; ((BraveBehaviour)item).behaviorSpeculator.FleePlayerData = val2; ((MonoBehaviour)GameManager.Instance).StartCoroutine(Panic(item)); } if (((BraveBehaviour)item).healthHaver.damageTypeModifiers == null) { ((BraveBehaviour)item).healthHaver.damageTypeModifiers = new List(); } ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)4, damageMultiplier = 1 + num / 4 }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)16, damageMultiplier = 1 + num / 4 }); if ((Object)(object)item != (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)item).transform), TransformExtensions.PositionVector2(((BraveBehaviour)enemy).transform)) < 2.5f + (float)ReturnStack(core)) { ((GameActor)item).ApplyEffect(activeEffect, 1f, (Projectile)null); } if (ConfigManager.DoVisualEffect) { GameObject val3 = Object.Instantiate(PoisonPoof, Vector2.op_Implicit(((BraveBehaviour)item).sprite.WorldCenter), Quaternion.identity); val3.transform.localScale = Vector3.one * 0.5f; Object.Destroy((Object)(object)val3, 3f); } } } } public IEnumerator Panic(AIActor enemy) { float e = 0f; while (e < 4f) { if ((Object)(object)enemy == (Object)null) { yield break; } e += BraveTime.DeltaTime; yield return null; } if ((Object)(object)enemy != (Object)null) { ((BraveBehaviour)enemy).behaviorSpeculator.FleePlayerData = null; } } public void OnDamagedEnemy(ModulePrinterCore core, PlayerController player, AIActor enemy, float damage) { //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)enemy)) { return; } int num = ReturnStack(core); ((GameActor)enemy).EffectResistances = (ActorEffectResistance[])(object)new ActorEffectResistance[0]; List activeEnemies = ((DungeonPlaceableBehaviour)enemy).GetAbsoluteParentRoom().activeEnemies; foreach (GameActorEffect activeEffect in ((GameActor)enemy).m_activeEffects) { if (DebuffStatics.BlacklistedEffects.Contains(activeEffect.effectIdentifier)) { continue; } foreach (AIActor item in activeEnemies) { if (!Infections.ContainsKey(item)) { Infections.Add(item, 0); } if (Infections[item] >= 2 || !(Random.value < damage / 4f)) { continue; } Infections[item]++; if ((Object)(object)item != (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)item).transform), TransformExtensions.PositionVector2(((BraveBehaviour)enemy).transform)) < 2.5f + (float)ReturnStack(core)) { AkSoundEngine.PostEvent("Play_ENM_Tarnisher_Spit_01", ((Component)enemy).gameObject); ((GameActor)item).ApplyEffect(activeEffect, 1f, (Projectile)null); if (ConfigManager.DoVisualEffect) { GameObject val = Object.Instantiate(PoisonPoof, Vector2.op_Implicit(((BraveBehaviour)item).sprite.WorldCenter), Quaternion.identity); val.transform.localScale = Vector3.one * 0.5f; Object.Destroy((Object)(object)val, 3f); } if (((BraveBehaviour)item).healthHaver.damageTypeModifiers == null) { ((BraveBehaviour)item).healthHaver.damageTypeModifiers = new List(); } ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)4, damageMultiplier = 1f + 0.1f * (float)num }); ((BraveBehaviour)item).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageType = (CoreDamageTypes)16, damageMultiplier = 1f + 0.1f * (float)num }); } } } } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int stack = ReturnStack(modulePrinterCore); p.AppliesPoison = true; p.PoisonApplyChance = 0.125f * (float)stack; p.healthEffect = DebuffStatics.irradiatedLeadEffect; p.OnDestruction += delegate(Projectile obj) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)obj) && Random.value < 0.025f * (float)stack) { DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.PoisonDef).TimedAddGoopCircle(((BraveBehaviour)obj).sprite.WorldBottomCenter, (float)stack, 0.5f + 0.25f * (float)stack, false); } }; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnDamagedEnemy = (Action)Delegate.Remove(modulePrinter.OnDamagedEnemy, new Action(OnDamagedEnemy)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OnKilledEnemy)); } static PatientZero() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PatientZero)); val.Name = "Patient Zero"; val.Description = "Infected!"; val.LongDescription = "Chance to poison enemies on hit, and to spawn poison pools on projectile impact. (+Poison Chance And Pool Radius per stack). Hurting enemies can spread debuffs to other nearby enemies, breaking their resistances. Slain enemies cause an outbreak, greatly reducing resistances and causing panic. (+Virality and Severity per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("pandemic_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class VoltaicTethers : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("voltaictethers_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Voltaic Tethers " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Massively decreases accuracy, and doubles reload time.\nProjectiles will stick to walls and tether\nelectricity to players and other nearby tether nodes.\n(" + StaticColorHexes.AddColorToLabelString("+Tether Range and Damage", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.STICKY); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.005f)) { ProjectileData baseData = p.baseData; baseData.speed *= 0.5f; p.UpdateSpeed(); p.pierceMinorBreakables = true; int num = 1; VoltaicTetherComponent voltaicTetherComponent = ((Component)p).gameObject.AddComponent(); voltaicTetherComponent.DPS = 12f * (float)num; voltaicTetherComponent.PylonRange = 7.5f * (float)num; voltaicTetherComponent.PlayerRange = 12.5f * (float)num; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += 5; StickyProjectileModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.stickyContexts.Add(new StickyProjectileModifier.StickyContext { CanStickToTerrain = true }); orAddComponent2.OnStick = (Action)Delegate.Combine(orAddComponent2.OnStick, new Action(H)); orAddComponent2.OnStickyDestroyed = (Action)Delegate.Combine(orAddComponent2.OnStickyDestroyed, new Action(H2)); } } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Name = "Voltaic", Reload_Process = ProcessFireRate, Accuracy_Process = ProcessAccuracy }; stickyContext = new StickyProjectileModifier.StickyContext { CanStickToTerrain = true, CanStickEnemies = false }; printer.ProcessGunStatModifier(gunStatModifier); printer.stickyContexts.Add(stickyContext); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); printer.OnProjectileStickAction = (Action)Delegate.Combine(printer.OnProjectileStickAction, new Action(H)); printer.OnStickyDestroyAction = (Action)Delegate.Combine(printer.OnStickyDestroyAction, new Action(H2)); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * (float)(2 + ReturnStack(modulePrinterCore)); } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 3f; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.speed *= 0.5f; p.UpdateSpeed(); p.pierceMinorBreakables = true; int num = ReturnStack(modulePrinterCore); VoltaicTetherComponent voltaicTetherComponent = ((Component)p).gameObject.AddComponent(); voltaicTetherComponent.DPS = 12f * (float)num; voltaicTetherComponent.PylonRange = 7.5f * (float)num; voltaicTetherComponent.PlayerRange = 12.5f * (float)num; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += 5; } public void H(GameObject stick, StickyProjectileModifier comp, tk2dBaseSprite sprite, PlayerController p) { VoltaicTetherComponent component = stick.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.PylonRange *= 2.5f; } Object.Destroy((Object)(object)stick, 20f); } public void H2(GameObject stick, StickyProjectileModifier comp, PlayerController p) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) PickupObject byId = PickupObjectDatabase.GetById(223); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX, stick.transform.position, Quaternion.identity); Object.Destroy((Object)(object)val, 2f); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnProjectileStickAction = (Action)Delegate.Remove(modulePrinter.OnProjectileStickAction, new Action(H)); modulePrinter.OnStickyDestroyAction = (Action)Delegate.Remove(modulePrinter.OnStickyDestroyAction, new Action(H2)); if (modulePrinter.stickyContexts.Contains(stickyContext)) { modulePrinter.stickyContexts.Remove(stickyContext); } modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } static VoltaicTethers() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(VoltaicTethers)); val.Name = "Voltaic Tethers"; val.Description = "Loaded"; val.LongDescription = "Massively decreases accuracy, and doubles reload time. Projectiles will stick to walls and tether electricity to players and other nearby tether nodes. (+Tether Range and Damage per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("voltaictethers_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class SelfRicochet : DefaultModule { public static ItemTemplate template; public static ExplosionData ricoChetData; public static int ID; public static void PostInit(PickupObject v) { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("ultraricochet_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Ultra Ricochet " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Doubles player projectile speed.\nPlayer Projectiles bounce off walls, enemies and each other\nwith force (" + StaticColorHexes.AddColorToLabelString("+Extra Force", StaticColorHexes.Light_Orange_Hex) + "). Increases fire rate (" + StaticColorHexes.AddColorToLabelString("+25% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")\nand increases spread.\nBounces increase damage by 10% (" + StaticColorHexes.AddColorToLabelString("+10%", StaticColorHexes.Light_Orange_Hex) + ")."; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); defaultModule.OverrideScrapCost = 10; defaultModule.EnergyConsumption = 2f; defaultModule.AddToGlobalStorage(); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; ricoChetData = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); ricoChetData.damageToPlayer = 0f; ricoChetData.damage = 5f; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.01f)) { RicoShot ricoShot = ((Component)p).gameObject.AddComponent(); ricoShot.projectile = p; BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces += 20 * ReturnStack(modulePrinterCore); orAddComponent.bouncesTrackEnemies = true; orAddComponent.bounceTrackRadius = 5f; orAddComponent.TrackEnemyChance = 1f; orAddComponent.damageMultiplierOnBounce = 1.1f; ricoShot.projModifier = orAddComponent; } } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { Accuracy_Process = ProcessAccuracy, FireRate_Process = ProcessRoF }; printer.ProcessGunStatModifier(gunStatModifier); player.stats.RecalculateStats(player, false, false); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 2.5f; } public float ProcessRoF(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f - (f - f / (1f + 0.25f * (float)ReturnStack(modulePrinterCore))); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { RicoShot ricoShot = ((Component)p).gameObject.AddComponent(); ProjectileData baseData = p.baseData; baseData.speed *= 2f; p.UpdateSpeed(); ricoShot.projectile = p; BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces += 15 + 5 * ReturnStack(modulePrinterCore); orAddComponent.bouncesTrackEnemies = true; orAddComponent.bounceTrackRadius = 5f; orAddComponent.TrackEnemyChance = 1f; orAddComponent.damageMultiplierOnBounce = 1f + 0.1f * (float)ReturnStack(modulePrinterCore); ricoShot.projModifier = orAddComponent; } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { player.stats.RecalculateStats(player, false, false); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); player.stats.RecalculateStats(player, false, false); } static SelfRicochet() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(SelfRicochet)); val.Name = "Ultra Ricochet"; val.Description = "Stylish"; val.LongDescription = "Doubles player projectile speed. Player Projectiles bounce off walls, enemies and each other, with force (+Extra Force per stack). Increases rate of fire (+25% hyperbolically per stack) and increases spread. Bounces increase damage by 10% (+10% per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("ultraricochet_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } internal class RicoShot : MonoBehaviour { public BounceProjModifier projModifier; public int Stack = 1; private bool Can = true; private bool Can2 = true; public float ChanceToSeekEnemyOnBounce = 1f; public bool NormalizeAcrossFireRate = true; public float ActivationsPerSecond = 1000f; public float MinActivationChance = 1f; public Projectile projectile; private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)projectile).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(PissAndShit)); Projectile obj = projectile; obj.OnHitEnemy = (Action)Delegate.Combine(obj.OnHitEnemy, new Action(HandleProjectileHitEnemy)); Can2 = false; ((MonoBehaviour)this).Invoke("C2", 0.1f); Can = false; ((MonoBehaviour)this).Invoke("C", 0.2f); projModifier.OnBounce += delegate { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) if (Can2) { Can2 = false; ((MonoBehaviour)this).Invoke("C2", 0.05f); if (ConfigManager.DoVisualEffect) { GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.35f; Object.Destroy((Object)(object)val2, 2f); } Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), (float)(25 * Stack), 3f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), (float)(25 * Stack), 3f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), 3f); ExplosionData ricoChetData = SelfRicochet.ricoChetData; ricoChetData.ignoreList = new List(); PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val3 in allPlayers) { ricoChetData.ignoreList.Add(((BraveBehaviour)val3).specRigidbody); } Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), SelfRicochet.ricoChetData, Vector2.zero, (Action)null, true, (CoreDamageTypes)0, false); } }; } private void Update() { if (!((Object)(object)projectile == (Object)null)) { projectile.collidesOnlyWithPlayerProjectiles = true; projectile.collidesWithProjectiles = true; projectile.UpdateCollisionMask(); } } private void PissAndShit(SpeculativeRigidbody myBody, PixelCollider myCollider, SpeculativeRigidbody otherBody, PixelCollider otherCollider) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)otherBody) || !Object.op_Implicit((Object)(object)((BraveBehaviour)otherBody).projectile) || !Object.op_Implicit((Object)(object)((BraveBehaviour)myBody).projectile)) { return; } PhysicsEngine.SkipCollision = true; if (Can) { Can = false; ((MonoBehaviour)this).Invoke("C", 0.2f); myBody.RegisterTemporaryCollisionException(otherBody, 0.333f, (float?)null); ((BraveBehaviour)otherBody).projectile.hitEffects.HandleEnemyImpact(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)otherBody).projectile).sprite.WorldCenter), ((BraveBehaviour)otherBody).transform.localEulerAngles.z, ((BraveBehaviour)otherBody).transform, Vector2.zero, ((BraveBehaviour)myBody).projectile.LastVelocity, true, false); ((BraveBehaviour)myBody).projectile.SendInDirection(Random.insideUnitCircle, false, true); ((BraveBehaviour)otherBody).projectile.SendInDirection(Random.insideUnitCircle, false, true); if (ConfigManager.DoVisualEffect) { GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)myBody).projectile).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.35f; Object.Destroy((Object)(object)val2, 2f); } Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)myBody).projectile).sprite.WorldCenter), 25f, 3f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)myBody).projectile).sprite.WorldCenter), 25f, 3f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)myBody).projectile).sprite.WorldCenter), 3f); ExplosionData ricoChetData = SelfRicochet.ricoChetData; ricoChetData.ignoreList = new List(); PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val3 in allPlayers) { ricoChetData.ignoreList.Add(((BraveBehaviour)val3).specRigidbody); } Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)myBody).projectile).sprite.WorldCenter), SelfRicochet.ricoChetData, ((BraveBehaviour)((BraveBehaviour)myBody).projectile).sprite.WorldCenter, (Action)null, true, (CoreDamageTypes)0, false); } } public void C() { Can = true; } public void C2() { Can2 = true; } private void HandleProjectileHitEnemy(Projectile obj, SpeculativeRigidbody enemy, bool killed) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) if (!Can2) { return; } Can2 = false; ((MonoBehaviour)this).Invoke("C", 0.2f); PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)obj).gameObject); orAddComponent.penetratesBreakables = true; orAddComponent.penetration++; Vector2 val = Random.insideUnitCircle; float num = ChanceToSeekEnemyOnBounce; Gun possibleSourceGun = obj.PossibleSourceGun; if (NormalizeAcrossFireRate && Object.op_Implicit((Object)(object)possibleSourceGun)) { float num2 = 1f / possibleSourceGun.DefaultModule.cooldownTime; if ((Object)(object)possibleSourceGun.Volley != (Object)null && possibleSourceGun.Volley.UsesShotgunStyleVelocityRandomizer) { num2 *= (float)Mathf.Max(1, possibleSourceGun.Volley.projectiles.Count); } num = Mathf.Clamp01(ActivationsPerSecond / num2); num = Mathf.Max(MinActivationChance, num); } if (Random.value < num && Object.op_Implicit((Object)(object)((BraveBehaviour)enemy).aiActor)) { Func func = (AIActor a) => Object.op_Implicit((Object)(object)a) && a.HasBeenEngaged && Object.op_Implicit((Object)(object)((BraveBehaviour)a).healthHaver) && ((BraveBehaviour)a).healthHaver.IsVulnerable; AIActor closestToPosition = BraveUtility.GetClosestToPosition(((BraveBehaviour)enemy).aiActor.ParentRoom.GetActiveEnemies((ActiveEnemyType)0), enemy.UnitCenter, func, (AIActor[])(object)new AIActor[1] { ((BraveBehaviour)enemy).aiActor }); if (Object.op_Implicit((Object)(object)closestToPosition)) { val = ((GameActor)closestToPosition).CenterPosition - Vector3Extensions.XY(((BraveBehaviour)obj).transform.position); } } if (ConfigManager.DoVisualEffect) { GameObject val2 = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val3 = Object.Instantiate(val2.gameObject, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)obj).projectile).sprite.WorldCenter), Quaternion.identity); val3.transform.localScale = Vector3.one * 0.5f; Object.Destroy((Object)(object)val3, 2f); } Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)obj).projectile).sprite.WorldCenter), 25f, 3f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)obj).projectile).sprite.WorldCenter), 25f, 3f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)obj).projectile).sprite.WorldCenter), 3f); obj.SendInDirection(val, false, true); } } public class OverclockedMagazines : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("overclockedmagazine_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Overclocked Magazines " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Multiplies Rate Of Fire and Clip Size by 2.5x (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ").\nGreatly reduces spread and damage."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); defaultModule.OverrideScrapCost = 15; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { PickupObject byId = PickupObjectDatabase.GetById(95); modularGunController.ChangeMuzzleFlash(((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects); gunStatModifier = new ModuleGunStatModifier { Name = "Machine_Gun", FireRate_Process = ProcessFireRate, ClipSize_Process = ProcessClipSize, Accuracy_Process = ProcessAccuracy, ChargeSpeed_Process = ProcessFireRate }; printer.ProcessGunStatModifier(gunStatModifier); player.stats.RecalculateStats(player, false, false); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f / (1.5f + (float)ReturnStack(modulePrinterCore)); } public int ProcessClipSize(int f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return (int)((float)f * (1.5f + (float)ReturnStack(modulePrinterCore))); } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 2.5f; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 0.66f; ProjectileData baseData2 = p.baseData; baseData2.force *= 0.66f; ProjectileData baseData3 = p.baseData; baseData3.speed *= 1.7f; p.UpdateSpeed(); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { player.stats.RecalculateStats(player, false, false); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.RevertMuzzleFlash(); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); player.stats.RecalculateStats(player, false, false); } static OverclockedMagazines() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(OverclockedMagazines)); val.Name = "Overclocked Magazines"; val.Description = "BRRAP"; val.LongDescription = "Multiplies Rate Of Fire and Clip Size by 2.5x (+1 per stack). Greatly reduces spread and damage."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("overclockedmagazine_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MachineInstinct : DefaultModule { public static ItemTemplate template; public static int ID; public float IncrementPerSecondEnemy = 0.1f; public float IncrementPerSecondProjectile = 0.05f; public float BuildupCount = 0f; public bool DodgeCooldown = false; private List projectilesNearMe = new List(); private List enemiesNearMe = new List(); public float currentRisk = 1f; private float RiskCap = 1.5f; private float TrueRiskCap = 2.5f; public static void PostInit(PickupObject v) { //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("machineinstinct_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Machine Instinct " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Being in proximity of projectiles and enemies increases " + StaticColorHexes.AddColorToLabelString("Risk", StaticColorHexes.Lime_Green_Hex) + ",\nwhich increases Rate Of Fire and Damage. (" + StaticColorHexes.AddColorToLabelString("+Higher Risk Capacity", StaticColorHexes.Light_Orange_Hex) + ").\nBuilding up enough " + StaticColorHexes.AddColorToLabelString("Risk", StaticColorHexes.Lime_Green_Hex) + " allows you to negate\none instance of damage, providing you with 2.5 seconds of invulnerability.\nAbility recharges after 15 (" + StaticColorHexes.AddColorToLabelString("-20% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ") seconds."; defaultModule.EnergyConsumption = 2f; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.RETALIATION); defaultModule.OverrideScrapCost = 12; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); printer.OnFrameUpdate = (Action)Delegate.Combine(printer.OnFrameUpdate, new Action(OFU)); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Combine(healthHaver.ModifyDamage, new Action(ModifyIncomingDamage)); player.m_additionalReceivesTouchDamage = false; } private void ModifyIncomingDamage(HealthHaver source, ModifyDamageEventArgs args) { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) if (args != EventArgs.Empty && !DodgeCooldown && BuildupCount >= 2f) { args.InitialDamage = 0f; args.ModifiedDamage = 0f; source.IsVulnerable = false; DodgeCooldown = true; BuildupCount = 0f; LightningController lightningController = new LightningController(); lightningController.MajorNodesCount = Random.Range(4, 6); lightningController.MinorNodesMin = Random.Range(1, 3); lightningController.OnPostStrike = (Action)Delegate.Combine(lightningController.OnPostStrike, (Action)delegate(Vector2 obj) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_OBJ_lightning_flash_01", ((Component)source).gameObject); Exploder.Explode(Vector2.op_Implicit(obj), StaticExplosionDatas.genericLargeExplosion, obj, (Action)null, false, (CoreDamageTypes)0, false); }); lightningController.LightningPreDelay = 0f; lightningController.GenerateLightning(Vector2.op_Implicit(((BraveBehaviour)source).sprite.WorldCenter + new Vector2((float)Random.Range(-7, 7), 16f)), Vector2.op_Implicit(((BraveBehaviour)source).sprite.WorldCenter)); ((MonoBehaviour)GameManager.Instance).StartCoroutine(IFrame(source)); } } public IEnumerator IFrame(HealthHaver h) { ((BraveBehaviour)h.m_player).sprite.usesOverrideMaterial = true; h.m_player.SetOverrideShader(ShaderCache.Acquire("Brave/ItemSpecific/MetalSkinShader")); float f2 = 0f; while (f2 < 2.5f) { h.IsVulnerable = false; f2 += BraveTime.DeltaTime; yield return null; } h.m_player.ClearOverrideShader(); AkSoundEngine.PostEvent("Play_OBJ_metalskin_end_01", ((Component)h).gameObject); h.IsVulnerable = true; f2 = 0f; while (f2 < 15f - (15f - 15f / (1f + 0.2f * (float)ReturnStack(Stored_Core)))) { f2 += BraveTime.DeltaTime; yield return null; } DodgeCooldown = false; } public void OFU(ModulePrinterCore core, PlayerController player) { if (DodgeCooldown) { if (currentRisk > 1f) { currentRisk -= 0.125f * BraveTime.DeltaTime; } return; } ProcessNearbyProjectiles(player); ProcessNearbyEnemies(player); if (Random.value < (currentRisk - 1f) * 0.5f) { DoFlameParticles(((BraveBehaviour)player).sprite); } if (!CanDecrement(player)) { return; } if (projectilesNearMe.Count == 0 && enemiesNearMe.Count == 0) { if (currentRisk > 1f) { currentRisk -= 0.4f * BraveTime.DeltaTime; } return; } if (currentRisk < TrueRiskCap) { currentRisk += (float)enemiesNearMe.Count * (IncrementPerSecondEnemy * BraveTime.DeltaTime) + (float)projectilesNearMe.Count * (IncrementPerSecondProjectile * BraveTime.DeltaTime); } if (currentRisk > RiskCap) { if (BuildupCount < 2f) { BuildupCount += BraveTime.DeltaTime; } } else if (BuildupCount >= 2f) { BuildupCount -= BraveTime.DeltaTime * 0.75f; } } public void DoFlameParticles(tk2dBaseSprite targetSprite, float zOffset = 0f) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) if (!GameManager.Instance.IsPaused && Random.value < Mathf.Max(0.1f, Mathf.Min(1f, ConfigManager.ImportantVFXMultiplier)) && Object.op_Implicit((Object)(object)targetSprite)) { Vector3 val = Vector2Extensions.ToVector3ZisY(targetSprite.WorldBottomLeft, zOffset); Vector3 val2 = Vector2Extensions.ToVector3ZisY(targetSprite.WorldTopRight, zOffset); float num = (val2.y - val.y) * (val2.x - val.x); float num2 = 25f * num; int num3 = Mathf.CeilToInt(Mathf.Max(1f, num2 * BraveTime.DeltaTime)); int num4 = num3; Vector3 val3 = val; Vector3 val4 = val2; Vector3 val5 = Vector3.up / 2f; float num5 = 120f; float num6 = 0.2f; float? num7 = Random.Range(0.8f, 1.25f); GlobalSparksDoer.DoRandomParticleBurst(num4, val3, val4, val5, num5, num6, (float?)null, num7, (Color?)null, (SparksType)((BuildupCount >= 2f) ? 8 : 5)); } } public bool CanDecrement(PlayerController player) { if ((Object)(object)GameManager.Instance.Dungeon == (Object)null) { return false; } if (GameManager.Instance.IsLoadingLevel) { return false; } if (GameManager.Instance.PreventPausing) { return false; } if (GameManager.Instance.Dungeon.IsEndTimes) { return false; } if (player.IsDodgeRolling) { return false; } return true; } public void ProcessNearbyProjectiles(PlayerController player) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < projectilesNearMe.Count; i++) { if (projectilesNearMe.Count > i) { if ((Object)(object)projectilesNearMe[i] == (Object)null) { projectilesNearMe.RemoveAt(i); } else if (Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)projectilesNearMe[i]).transform), ((BraveBehaviour)player).sprite.WorldCenter) > 2.25f) { projectilesNearMe.Remove(projectilesNearMe[i]); } } } if (StaticReferenceManager.m_allProjectiles == null) { return; } for (int j = 0; j < StaticReferenceManager.m_allProjectiles.Count; j++) { Projectile val = StaticReferenceManager.m_allProjectiles[j]; if (!Object.op_Implicit((Object)(object)val) || !((Object)(object)val.Owner != (Object)/*isinst with value type is only supported in some contexts*/)) { continue; } if (Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), ((BraveBehaviour)player).sprite.WorldCenter) < 2.25f) { if (!projectilesNearMe.Contains(val)) { projectilesNearMe.Add(val); } } else if (projectilesNearMe.Contains(val)) { projectilesNearMe.Remove(val); } } } public void ProcessNearbyEnemies(PlayerController player) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < enemiesNearMe.Count; i++) { if (enemiesNearMe.Count > i) { if ((Object)(object)enemiesNearMe[i] == (Object)null) { enemiesNearMe.RemoveAt(i); } else if (Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)enemiesNearMe[i]).transform), ((BraveBehaviour)player).sprite.WorldCenter) > 6.25f) { enemiesNearMe.Remove(enemiesNearMe[i]); } } } if (StaticReferenceManager.AllEnemies == null) { return; } for (int j = 0; j < StaticReferenceManager.AllEnemies.Count; j++) { AIActor val = StaticReferenceManager.AllEnemies[j]; if (!Object.op_Implicit((Object)(object)val) || !val.CanTargetPlayers) { continue; } if (Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), ((BraveBehaviour)player).sprite.WorldCenter) < 6.25f) { if (!enemiesNearMe.Contains(val)) { enemiesNearMe.Add(val); } } else if (enemiesNearMe.Contains(val)) { enemiesNearMe.Remove(val); } } } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { float num = Mathf.Min(currentRisk, RiskCap); if (num > RiskCap) { num = RiskCap; } return f / num; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + Mathf.Min(currentRisk, RiskCap) / 3f; } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { TrueRiskCap = 2f + 0.5f * (float)ReturnStack(modulePrinter); RiskCap = 1.375f + 0.125f * (float)ReturnStack(modulePrinter); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { player.m_additionalReceivesTouchDamage = true; modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.RemoveGunStatModifier(gunStatModifier); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Remove(healthHaver.ModifyDamage, new Action(ModifyIncomingDamage)); } static MachineInstinct() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MachineInstinct)); val.Name = "Machine Instinct"; val.Description = "Perfect Machine"; val.LongDescription = "Being in proximity of projectiles and enemies increases Risk, which increases Rate Of Fire and Damage. (+Higher Risk Capacity per stack). Building up enough Risk allows you to negate one instance of damage, providing you with 2.5 second of invulnerability. Ability recharges after 15 (-20% hyperbolically per stack) seconds."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("machineinstinct_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class GravityWell : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("gravitywell_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Gravity Well " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Greatly reduces Fire Rate.\nProjectiles gain piercing and greatly reduced speed.\nEnemies are pulled towards your projectiles\nand are hurt in their proximity.(" + StaticColorHexes.AddColorToLabelString("+Stronger Gravity And Damage", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //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_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) if (!(Random.value > 0.005f)) { PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += 10; GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); p.AdditionalScaleMultiplier *= 1.5f; ProjectileData baseData = p.baseData; baseData.speed *= 0.25f; p.UpdateSpeed(); EnemyGravityWell enemyGravityWell = ((Component)p).gameObject.AddComponent(); enemyGravityWell.self = p; enemyGravityWell.gravitationalForceActors = 100f; enemyGravityWell.damageRadius = 2f; enemyGravityWell.Stack = 1; ImprovedAfterImage improvedAfterImage = ((Component)p).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(1f, 0.1f, 0.5f, 1f); HomingModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.AngularVelocity += 10f; orAddComponent2.HomingRadius += 20f; PickupObject byId = PickupObjectDatabase.GetById(536); GameObject val = SpawnManager.SpawnVFX(((RelodestoneItem)((byId is RelodestoneItem) ? byId : null)).ContinuousVFX, true); val.transform.parent = ((BraveBehaviour)p).transform; val.transform.position = Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter); } } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { gunStatModifier = new ModuleGunStatModifier { ChargeSpeed_Process = ProcessFireRate, FireRate_Process = ProcessFireRate, ClipSize_Process = ProcessClip }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 3f; } public int ProcessClip(int f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return (int)((float)f / 2f); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.penetration += 10; GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); p.AdditionalScaleMultiplier *= 1.5f; ProjectileData baseData = p.baseData; baseData.speed *= 0.25f; p.UpdateSpeed(); EnemyGravityWell enemyGravityWell = ((Component)p).gameObject.AddComponent(); enemyGravityWell.self = p; enemyGravityWell.gravitationalForceActors = 100 * ReturnStack(modulePrinterCore); enemyGravityWell.damageRadius = 2 + ReturnStack(modulePrinterCore); enemyGravityWell.Stack = ReturnStack(modulePrinterCore); ImprovedAfterImage improvedAfterImage = ((Component)p).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.75f; improvedAfterImage.shadowTimeDelay = 0.1f; improvedAfterImage.dashColor = new Color(1f, 0.1f, 0.5f, 1f); HomingModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.AngularVelocity += 10f; orAddComponent2.HomingRadius += 20f; if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(536); GameObject val = SpawnManager.SpawnVFX(((RelodestoneItem)((byId is RelodestoneItem) ? byId : null)).ContinuousVFX, true); val.transform.parent = ((BraveBehaviour)p).transform; val.transform.position = Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter); } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.RemoveGunStatModifier(gunStatModifier); player.stats.RecalculateStats(player, false, false); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } static GravityWell() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(GravityWell)); val.Name = "Gravity Well"; val.Description = "The Void"; val.LongDescription = "Greatly reduces Fire Rate. Projectiles gain piercing and greatly reduced speed. Enemies are magnetically pulled towards your projectiles, and are hurt in their proximity.(+Stronger Gravity And Damage per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("gravitywell_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class EnemyGravityWell : MonoBehaviour { public Projectile self; public float damageRadius = 3f; public float radius = 25f; public float gravitationalForce = 10f; public float gravitationalForceActors = 50f; private float m_radiusSquared; public int Stack = 1; private float cachedgravitationalForceActors; private float Elapsed = 0f; public void Start() { cachedgravitationalForceActors = gravitationalForceActors; m_radiusSquared = radius * radius; } public void Update() { Elapsed = (Elapsed += BraveTime.DeltaTime); gravitationalForceActors = Mathf.Lerp(0f, cachedgravitationalForceActors, Elapsed); for (int i = 0; i < PhysicsEngine.Instance.AllRigidbodies.Count; i++) { if (((Component)PhysicsEngine.Instance.AllRigidbodies[i]).gameObject.activeSelf && ((Behaviour)PhysicsEngine.Instance.AllRigidbodies[i]).enabled) { AdjustRigidbodyVelocity(PhysicsEngine.Instance.AllRigidbodies[i]); } } for (int j = 0; j < StaticReferenceManager.AllDebris.Count; j++) { AdjustDebrisVelocity(StaticReferenceManager.AllDebris[j]); } } private Vector4 GetCenterPointInScreenUV(Vector2 centerPoint) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = GameManager.Instance.MainCameraController.Camera.WorldToViewportPoint(Vector2Extensions.ToVector3ZUp(centerPoint, 0f)); return new Vector4(val.x, val.y, 0f, 0f); } private float GetDistanceToRigidbody(SpeculativeRigidbody other) { //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) return Vector2.Distance(other.UnitCenter, ((BraveBehaviour)self).specRigidbody.UnitCenter); } private Vector2 GetFrameAccelerationForRigidbody(Vector2 unitCenter, float currentDistance, float g) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) Vector2 zero = Vector2.zero; float num = Mathf.Clamp01(1f - currentDistance / radius); float num2 = g * num * num; Vector2 val = ((BraveBehaviour)self).specRigidbody.UnitCenter - unitCenter; Vector2 normalized = ((Vector2)(ref val)).normalized; return normalized * num2; } private bool AdjustDebrisVelocity(DebrisObject debris) { //IL_0068: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)debris == (Object)null) { return false; } if (debris.IsPickupObject) { return false; } if ((Object)(object)((Component)debris).GetComponent() != (Object)null) { return false; } if ((Object)(object)self == (Object)null) { return false; } Vector2 val = ((BraveBehaviour)debris).sprite.WorldCenter - (Vector2)(((Object)(object)((BraveBehaviour)self).specRigidbody != (Object)null) ? ((BraveBehaviour)self).specRigidbody.UnitCenter : new Vector2(((BraveBehaviour)self).transform.position.x, ((BraveBehaviour)self).transform.position.y)); float num = Vector2.SqrMagnitude(val); if (num >= m_radiusSquared) { return false; } float g = gravitationalForceActors; float num2 = Mathf.Sqrt(num); if (num2 < damageRadius) { Object.Destroy((Object)(object)((Component)debris).gameObject); return true; } Vector2 frameAccelerationForRigidbody = GetFrameAccelerationForRigidbody(((BraveBehaviour)debris).sprite.WorldCenter, num2, g); float num3 = Mathf.Clamp(BraveTime.DeltaTime, 0f, 0.02f); if (debris.HasBeenTriggered) { debris.ApplyVelocity(frameAccelerationForRigidbody * num3); } else if (num2 < radius / 2f) { debris.Trigger(Vector2.op_Implicit(frameAccelerationForRigidbody * num3), 0.5f, 1f); } return true; } private bool AdjustRigidbodyVelocity(SpeculativeRigidbody other) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0228: 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_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0260: 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_027a: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)self == (Object)null) { return false; } if ((Object)(object)other == (Object)null) { return false; } Vector2 val = other.UnitCenter - (Vector2)(((Object)(object)((BraveBehaviour)self).specRigidbody != (Object)null) ? ((BraveBehaviour)self).specRigidbody.UnitCenter : new Vector2(((BraveBehaviour)self).transform.position.x, ((BraveBehaviour)self).transform.position.y)); float num = Vector2.SqrMagnitude(val); if (num < m_radiusSquared) { float num2 = gravitationalForce; Vector2 velocity = other.Velocity; Projectile projectile = ((BraveBehaviour)other).projectile; if ((Object)(object)projectile != (Object)null) { return false; } if ((Object)(object)((BraveBehaviour)other).aiActor == (Object)null) { return false; } num2 = gravitationalForceActors; if (!((Behaviour)((BraveBehaviour)other).aiActor).enabled) { return false; } if (!((BraveBehaviour)other).aiActor.HasBeenEngaged) { return false; } if (BraveMathCollege.DistToRectangle(((BraveBehaviour)self).specRigidbody.UnitCenter, other.UnitBottomLeft, other.UnitDimensions) < damageRadius) { ((BraveBehaviour)other).healthHaver.ApplyDamage(self.baseData.damage * 0.2f * BraveTime.DeltaTime * (float)Stack, ((Vector2)(ref val)).normalized, string.Empty, (CoreDamageTypes)0, (DamageCategory)1, false, (PixelCollider)null, false); } if (((BraveBehaviour)other).healthHaver.IsBoss) { return false; } Vector2 frameAccelerationForRigidbody = GetFrameAccelerationForRigidbody(other.UnitCenter, Mathf.Sqrt(num), num2); float num3 = Mathf.Clamp(BraveTime.DeltaTime, 0f, 0.02f); Vector2 val2 = frameAccelerationForRigidbody * num3; Vector2 val3 = velocity + val2; if (BraveTime.DeltaTime > 0.02f) { val3 *= 0.02f / BraveTime.DeltaTime; } other.Velocity = val3; if ((Object)(object)projectile != (Object)null) { projectile.collidesWithPlayer = false; if (projectile.IsBulletScript) { projectile.RemoveBulletScriptControl(); } if (val3 != Vector2.zero) { projectile.Direction = ((Vector2)(ref val3)).normalized; projectile.Speed = Mathf.Max(3f, ((Vector2)(ref val3)).magnitude); other.Velocity = projectile.Direction * projectile.Speed; if (projectile.shouldRotate && (val3.x != 0f || val3.y != 0f)) { float num4 = BraveMathCollege.Atan2Degrees(projectile.Direction); if (!float.IsNaN(num4) && !float.IsInfinity(num4)) { Quaternion val4 = Quaternion.Euler(0f, 0f, num4); if (!float.IsNaN(val4.x) && !float.IsNaN(val4.y)) { ((BraveBehaviour)projectile).transform.rotation = val4; } } } } } return true; } return false; } } public class HyperPropellant : DefaultModule { public static ItemTemplate template; public static GameObject AirBurn; public static ExplosionData HyperPropellantExplosionData; public static int ID; public static void PostInit(PickupObject v) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("hyperpropellant_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Hyper Propellant " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Greatly reduces fire rate, clip size and increases reload time.\nProjectiles ignite the air around them (" + StaticColorHexes.AddColorToLabelString("+Larger Ignition Area", StaticColorHexes.Light_Orange_Hex) + "),\ntravel at very high speeds, and hit like a truck.\n(" + StaticColorHexes.AddColorToLabelString("+Speed, Force And Damage", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; GameObject val = Object.Instantiate(((Component)EnemyDatabase.GetOrLoadByGuid("ffca09398635467da3b1f4a54bcfda80")).gameObject.GetComponent().bigExplosionVfx); FakePrefab.MakeFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); Tk2dSpriteAnimatorUtility.AddSoundsToAnimationFrame(val.GetComponent(), val.GetComponent().DefaultClip.name, new Dictionary { { 0, "Play_DragunGrenade" } }); HyperPropellantExplosionData = new ExplosionData { breakSecretWalls = true, comprehensiveDelay = 0f, damage = 20f, damageRadius = 3f, damageToPlayer = 0f, debrisForce = 100f, doDamage = true, doDestroyProjectiles = false, doExplosionRing = true, doForce = true, doScreenShake = true, doStickyFriction = false, effect = val, explosionDelay = 0f, force = 100f, forcePreventSecretWallDamage = false, forceUseThisRadius = true, freezeEffect = null, freezeRadius = 0f, IsChandelierExplosion = false, isFreezeExplosion = false, playDefaultSFX = false, preventPlayerForce = false, pushRadius = 1f, secretWallsRadius = 1f, ss = new ScreenShakeSettings(), ignoreList = new List(), rotateEffectToNormal = false, useDefaultExplosion = false, usesComprehensiveDelay = false, overrideRangeIndicatorEffect = null }; GameObject val2 = new GameObject("HyperPropellantCircle"); Object.DontDestroyOnLoad((Object)(object)val2); FakePrefab.MarkAsFakePrefab(val2); HyperPropellantAirIgnite hyperPropellantAirIgnite = val2.AddComponent(); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); AirBurn = val2; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) if (!(Random.value > 0.005f)) { int num = 1; ProjectileData baseData = p.baseData; baseData.damage *= 0.625f + (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 2.5f + 0.5f * (float)num; ProjectileData baseData3 = p.baseData; baseData3.force *= 7.5f * (float)num; p.AdditionalScaleMultiplier *= 2f; p.pierceMinorBreakables = true; ExplosiveModifier val = ((Component)p).gameObject.AddComponent(); val.explosionData = HyperPropellantExplosionData; val.doExplosion = true; val.IgnoreQueues = true; ImprovedAfterImage improvedAfterImage = ((Component)p).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0.9f, 0.6f, 0f, 1f); HyperPropellantController hyperPropellantController = ((Component)p).gameObject.AddComponent(); hyperPropellantController.Radius = 1.25f + (float)num; hyperPropellantController.DPS = 3 + num; } } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { PickupObject byId = PickupObjectDatabase.GetById(384); modularGunController.ChangeMuzzleFlash(((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects); gunStatModifier = new ModuleGunStatModifier { ClipSize_Process = ProcessClipSize, FireRate_Process = ProcessFireRate, Reload_Process = ProcessReload, ChargeSpeed_Process = ProcessFireRate }; printer.ProcessGunStatModifier(gunStatModifier); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); ref string gunSwitchGroup = ref modularGunController.gun.gunSwitchGroup; PickupObject byId2 = PickupObjectDatabase.GetById(19); gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 0.625f + (float)num; ProjectileData baseData2 = p.baseData; baseData2.speed *= 2.5f + 0.5f * (float)num; ProjectileData baseData3 = p.baseData; baseData3.force *= 7.5f * (float)num; p.AdditionalScaleMultiplier *= 2f; p.pierceMinorBreakables = true; ExplosiveModifier val = ((Component)p).gameObject.AddComponent(); val.explosionData = HyperPropellantExplosionData; val.doExplosion = true; val.IgnoreQueues = true; ImprovedAfterImage improvedAfterImage = ((Component)p).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.5f; improvedAfterImage.shadowTimeDelay = 0.05f; improvedAfterImage.dashColor = new Color(0.9f, 0.6f, 0f, 1f); HyperPropellantController hyperPropellantController = ((Component)p).gameObject.AddComponent(); hyperPropellantController.Radius = 1.25f + (float)num; hyperPropellantController.DPS = 3 + num; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modularGunController.RevertMuzzleFlash(); modulePrinter.RemoveGunStatModifier(gunStatModifier); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modularGunController.ResetSwitchGroup(); } public int ProcessClipSize(int clip, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return clip / 5; } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 4f; } public float ProcessReload(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 1.75f; } static HyperPropellant() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HyperPropellant)); val.Name = "Hyper Propellant"; val.Description = "FWOOMP"; val.LongDescription = "Greatly reduces fire rate, clip size and increases reload time. Projectiles ignite the air around them (+Larger Ignition Area per stack), travel at very high speeds, and hit like a truck. (+Speed, Force And Damage per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("hyperpropellant_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class HyperPropellantController : MonoBehaviour { public Projectile self; public Vector2 lastStoredPosition; public float Radius = 2.25f; public float DPS = 4f; private float DistTick = 0f; public void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) self = ((Component)this).GetComponent(); lastStoredPosition = ((BraveBehaviour)self).sprite.WorldCenter; } public void Update() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) int num = 0; DistTick += (int)Vector2.Distance(((BraveBehaviour)self).sprite.WorldCenter, lastStoredPosition) / 2; for (int i = 0; (float)i < DistTick; i++) { num++; float num2 = (float)i / DistTick; Vector3 val = Vector3.Lerp(Vector2.op_Implicit(((BraveBehaviour)self).sprite.WorldCenter), Vector2.op_Implicit(lastStoredPosition), num2); HyperPropellantAirIgnite component = Object.Instantiate(HyperPropellant.AirBurn, val, Quaternion.identity).GetComponent(); ((Component)component).transform.position = val; component.DamagePerSecond = DPS; ((MagicCircle)component).radius = Radius; ((MonoBehaviour)component).StartCoroutine(component.ReduceToZero()); lastStoredPosition = ((BraveBehaviour)self).sprite.WorldCenter; } DistTick -= num; } } public class HyperPropellantAirIgnite : MagicCircle { public float DamagePerSecond = 4f; private bool Enabled; public HyperPropellantAirIgnite() { //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) base.emitsParticles = false; base.colour = new Color(0f, 0f, 0f, 0f); base.preventMagicIndicator = false; base.radius = 2f; base.destroyOnDisable = true; base.autoEnableOnStart = true; } public IEnumerator ReduceToZero() { Enabled = true; float h = base.radius; float f = 0f; float asdf = 0f; while (f < 6f) { float math = Mathf.Lerp(h, 0f, f / 6f); if (asdf > 0.3f) { asdf = 0f; if (Random.value * ConfigManager.ImportantVFXMultiplier < 0.5f) { GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(TransformExtensions.PositionVector2(((Component)this).transform) + Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0.1f, math))), Vector2.op_Implicit(Vector2.up), (float?)null, (float?)3f, (Color?)null, (SparksType)4); } if (Random.value / 4f * ConfigManager.ImportantVFXMultiplier < 0.3f) { GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(TransformExtensions.PositionVector2(((Component)this).transform) + Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0.1f, math))), Vector2.op_Implicit(Vector2.up), (float?)null, (float?)1f, (Color?)null, (SparksType)5); } } ((MagicCircle)this).UpdateRadius(math); f += BraveTime.DeltaTime; asdf += BraveTime.DeltaTime; yield return null; } Enabled = false; ((MagicCircle)this).Disable(); } public override void OnEnabled() { //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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) ((MagicCircle)this).OnEnabled(); if (ConfigManager.DoVisualEffect) { PickupObject byId = PickupObjectDatabase.GetById(328); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.overrideMidairDeathVFX, ((Component)this).gameObject.transform.position, Quaternion.identity); Transform transform = val.transform; transform.localScale *= 0.6f; Object.Destroy((Object)(object)val, 2f); } } public override void TickOnEnemy(AIActor enemy) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((MagicCircle)this).TickOnEnemy(enemy); if (Enabled) { ((BraveBehaviour)enemy).healthHaver.ApplyDamage(DamagePerSecond * BraveTime.DeltaTime, Vector2.zero, "Hellfire", (CoreDamageTypes)4, (DamageCategory)1, false, (PixelCollider)null, false); ((BraveBehaviour)enemy).gameActor.ApplyEffect((GameActorEffect)(object)DebuffStatics.hotLeadEffect, 1f, (Projectile)null); } } } public class FiveShotSalute : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("fiveshot_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Five-Shot Salute " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Reduces Rate Of Fire and Damage by 35%.\nShoot 5 (" + StaticColorHexes.AddColorToLabelString("+2", StaticColorHexes.Light_Orange_Hex) + ") times the projectiles."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.RegisterAction(Stats_AdditionalVolleyModifiers); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, ChargeSpeed_Process = ProcessFireRate }; printer.ProcessGunStatModifier(gunStatModifier); player.stats.AdditionalVolleyModifiers += Stats_AdditionalVolleyModifiers; player.stats.RecalculateStats(player, false, false); printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 1.35f; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 0.65f; } private void Stats_AdditionalVolleyModifiers(ProjectileVolleyData obj) { Toolbox.ModifyVolley(obj, ((PassiveItem)Stored_Core).Owner, 2 + ReturnStack(Stored_Core) * 2, 16f, 2f); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { player.stats.RecalculateStats(player, false, false); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.DeregisterAction(Stats_AdditionalVolleyModifiers); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); player.stats.AdditionalVolleyModifiers -= Stats_AdditionalVolleyModifiers; player.stats.RecalculateStats(player, false, false); } static FiveShotSalute() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(FiveShotSalute)); val.Name = "Five-Shot Salute"; val.Description = "One For Each Finger"; val.LongDescription = "Reduces Rate Of Fire and Damage by 35%. Shoot 5 (+2 per stack) times the projectiles."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("fiveshot_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class EternalWrap : DefaultModule { public static ItemTemplate template; public static int ID; public static string SFX; public static void PostInit(PickupObject v) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.Tier = ModuleTier.Tier_Omega; defaultModule.LabelName = "ETERNAL WRAP " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "PROJECTILES WRAP AROUND ROOMS\nAND GAIN STRENGTH WHEN THEY DO.\n(" + StaticColorHexes.AddColorToLabelString("+MORE WRAP AROUNDS AND DAMAGE", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.powerConsumptionData = new PowerConsumptionData { FirstStack = 0f, AdditionalStacks = 0f, OverridePowerDescriptionLabel = "USES NO POWER." }; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.red); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.Offset_LabelDescription = new Vector2(0.25f, -1.125f); defaultModule.Offset_LabelName = new Vector2(0.25f, 1.875f); defaultModule.Label_Background_Color_Override = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)10, (byte)10, (byte)100)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { WraparoundProjectile orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.Cap = 2 + ReturnStack(modulePrinterCore); orAddComponent.OnWrappedAround = delegate(Projectile projectile, Vector2 pos1, Vector2 pos2) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile != (Object)null) { PickupObject byId = PickupObjectDatabase.GetById(169); GameObject val = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect, Vector2.op_Implicit(pos1), Quaternion.identity); PickupObject byId2 = PickupObjectDatabase.GetById(169); GameObject val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects.First().effects.First().effect, Vector2.op_Implicit(pos2), Quaternion.identity); Object.Destroy((Object)(object)val, 2f); Object.Destroy((Object)(object)val2, 2f); ProjectileData baseData = projectile.baseData; baseData.damage *= 1f + 0.25f * (float)ReturnStack(modulePrinterCore); ProjectileData baseData2 = projectile.baseData; baseData2.speed *= 1f + 0.1f * (float)ReturnStack(modulePrinterCore); projectile.UpdateSpeed(); AkSoundEngine.PostEvent("Play_WPN_" + SFX + "_impact_01", ((Component)projectile).gameObject); } }; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } static EternalWrap() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(EternalWrap)); val.Name = "Eternal Wrap"; val.Description = "Devourer"; val.LongDescription = "Acts as 1 (+1 per stack) of every module you will own.\n\nTier:\n" + DefaultModule.ReturnTierLabel(ModuleTier.Tier_3); val.ManualSpriteCollection = StaticCollections.Module_T4_Collection; val.ManualSpriteID = StaticCollections.Module_T4_Collection.GetSpriteIdByName("CORE_OF_GOD"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; PickupObject byId = PickupObjectDatabase.GetById(169); SFX = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].enemyImpactEventName; } } public class WraparoundProjectile : MonoBehaviour { private int Warps = 0; private float RangeMultiplier = 4f; public Action OnWrappedAround; public int Cap = 1; private Projectile projectile; public void Start() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown projectile = ((Component)this).GetComponent(); ProjectileData baseData = projectile.baseData; baseData.range *= RangeMultiplier; projectile.BulletScriptSettings = new BulletScriptSettings { surviveTileCollisions = true }; SpeculativeRigidbody specRigidbody = ((BraveBehaviour)projectile).specRigidbody; specRigidbody.OnTileCollision = (OnTileCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnTileCollision, (Delegate?)(OnTileCollisionDelegate)delegate(CollisionData obj1) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)projectile) && Warps < Cap) { projectile.IgnoreTileCollisionsFor(3f / projectile.baseData.speed); projectile.UpdateCollisionMask(); WoopShoop(projectile, ((CastResult)obj1).Normal); } }); } public void WoopShoop(Projectile p, Vector2 direction) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) Warps++; int rayCastMask = CollisionMask.LayerToMask((CollisionLayer)6); if ((Object)(object)p == (Object)null) { return; } RaycastResult val = Toolbox.ReturnRaycast(((BraveBehaviour)p).sprite.WorldCenter + direction * 0.5f, direction, rayCastMask); Vector2 contact = ((CastResult)val).Contact; if (Object.op_Implicit((Object)(object)p)) { if (OnWrappedAround != null) { OnWrappedAround(p, TransformExtensions.PositionVector2(((BraveBehaviour)p).transform), contact); } ((BraveBehaviour)p).transform.position = Vector2.op_Implicit(contact); ((BraveBehaviour)p).specRigidbody.Reinitialize(); } } public void Update() { if (Warps >= Cap && Object.op_Implicit((Object)(object)projectile) && projectile.BulletScriptSettings != null) { projectile.BulletScriptSettings.surviveTileCollisions = false; } } } public class CraftingCore : PlayerItem { public static ItemTemplate template; public static int CraftingCoreID; public static void PIA(PickupObject pickup) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown tk2dSpriteAnimator val = ((Component)pickup).gameObject.AddComponent(); val.Library = Module.ModularAssetBundle.LoadAsset("CrafterAnimation").GetComponent(); val.defaultClipId = val.GetClipIdByName("idle"); val.playAutomatically = true; pickup.CustomCost = 45; pickup.UsesCustomCost = true; ItemBuilder.AddPassiveStatModifier(pickup, (StatType)8, 1f, (ModifyMethod)0); PlayerItem val2 = (PlayerItem)(object)((pickup is PlayerItem) ? pickup : null); val2.canStack = true; val2.numberOfUses = 1; val2.UsesNumberOfUsesBeforeCooldown = true; ((PickupObject)(object)val2).SetupUnlockOnCustomFlag(CustomDungeonFlags.PAST, requiredFlagValue: true); CraftingCoreID = pickup.PickupObjectId; val2.passiveStatModifiers = (StatModifier[])(object)new StatModifier[0]; GameObject val3 = new GameObject("Room Icon"); Object.DontDestroyOnLoad((Object)(object)val3); FakePrefab.MarkAsFakePrefab(val3); tk2dSprite val4 = val3.AddComponent(); ((tk2dBaseSprite)val4).Collection = StaticCollections.Item_Collection; ((tk2dBaseSprite)val4).SetSprite(StaticCollections.Item_Collection.GetSpriteIdByName("craftingcore_room_icon")); val2.minimapIcon = val3; ChooseModuleController.ModifyOmegaModuleChance = (Func)Delegate.Combine(ChooseModuleController.ModifyOmegaModuleChance, new Func(Mod)); } public static float Mod(ItemQuality t, DefaultModule.ModuleTier q, float f) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected I4, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Invalid comparison between Unknown and I4 //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Invalid comparison between Unknown and I4 Dungeon dungeon = GameManager.Instance.Dungeon; if ((Object)(object)dungeon == (Object)null) { return f; } ValidTilesets tilesetId = dungeon.tileIndices.tilesetId; ValidTilesets val = tilesetId; switch (val - 1) { default: if ((int)val != 8) { if ((int)val != 16) { break; } return f *= 2.25f; } return f *= 2.25f; case 1: return f *= 4f; case 0: return f *= 3.5f; case 3: return f *= 2.75f; case 2: break; } return f; } public override void Update() { if (!base.m_pickedUp) { return; } if ((Object)(object)base.LastOwner == (Object)null) { base.LastOwner = ((Component)this).GetComponentInParent(); } if (base.remainingTimeCooldown > 0f && (PlayerItem.AllowDamageCooldownOnActive || !((PlayerItem)this).IsCurrentlyActive)) { base.remainingTimeCooldown = Mathf.Max(0f, base.remainingTimeCooldown - BraveTime.DeltaTime); } if (((PlayerItem)this).IsCurrentlyActive) { base.m_activeElapsed += BraveTime.DeltaTime * base.m_adjustedTimeScale; if (!string.IsNullOrEmpty(base.OnActivatedSprite)) { ((BraveBehaviour)this).sprite.SetSprite(base.OnActivatedSprite); } } } public override bool CanBeUsed(PlayerController user) { if (!Object.op_Implicit((Object)(object)user)) { return false; } return (!user.IsInCombat) ? true : false; } public override void DoEffect(PlayerController user) { base.numberOfUses++; if (!Object.op_Implicit((Object)(object)user.PlayerHasComputerCore())) { return; } Scrapper cc = user.PlayerHasComputerCore(); if (Object.op_Implicit((Object)(object)cc.extant_Inventory_button)) { Object.Destroy((Object)(object)((Component)cc.extant_Inventory_button).gameObject); } if (Object.op_Implicit((Object)(object)cc.extant_craft_button)) { Object.Destroy((Object)(object)((Component)cc.extant_craft_button).gameObject); } if ((Object)(object)cc.extant_close_button != (Object)null) { Object.Destroy((Object)(object)((Component)cc.extant_close_button).gameObject); } cc.extant_Crafting_Controller = ScriptableObject.CreateInstance(); cc.extant_Crafting_Controller.DoQuickStart(user); ModuleCrafingController extant_Crafting_Controller = cc.extant_Crafting_Controller; extant_Crafting_Controller.OnCrafted = (Action)Delegate.Combine(extant_Crafting_Controller.OnCrafted, (Action)delegate { base.numberOfUses--; if (cc.extant_Crafting_Controller.Core.OnCraftedItem != null) { cc.extant_Crafting_Controller.Core.OnCraftedItem(cc.extant_Crafting_Controller.Core, base.LastOwner, this, cc.extant_Crafting_Controller.Queue); } if (base.numberOfUses < 1) { BraveTime.ClearMultiplier(((Component)GameManager.Instance).gameObject); cc.extant_Crafting_Controller.Nuke(); cc.extant_Crafting_Controller.ObliterateUI(); Object.Destroy((Object)(object)cc.extant_Crafting_Controller); user.RemoveActiveItemAt(user.activeItems.FindIndex(EndsWithSaurus)); } }); } private bool EndsWithSaurus(PlayerItem s) { if ((Object)(object)s == (Object)(object)this) { return true; } return false; } public override void DoActiveEffect(PlayerController user) { ETGModConsole.Log((object)base.numberOfUses, false); ((PlayerItem)this).DoActiveEffect(user); } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); } static CraftingCore() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CraftingCore)); val.Name = "Module Crafting Core"; val.Description = "Game Making"; val.LongDescription = "Allows for crafting modules out of scrap. Single Use."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("craftingcore"); val.Quality = (ItemQuality)(-50); val.Cooldown = 1f; val.CooldownType = (CooldownType)0; val.PostInitAction = PIA; template = val; } } public class PowerCell : PassiveItem { public static ItemTemplate template; public static int PowerCellID; public override void Pickup(PlayerController player) { AkSoundEngine.PostEvent("Play_OBJ_power_up_01", ((Component)player).gameObject); ((PassiveItem)this).Pickup(player); } public static void PostInit(PickupObject v) { ((PassiveItem)((v is PassiveItem) ? v : null)).passiveStatModifiers = (StatModifier[])(object)new StatModifier[0]; v.CanBeDropped = false; ((Component)v).gameObject.AddComponent().AdditionalEnergy = 1f; PowerCellID = v.PickupObjectId; } static PowerCell() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PowerCell)); val.Name = "Power Cell"; val.Description = "Power Up!"; val.LongDescription = "Increases the amount of Stored Energy by 1.\n\nA handy power cell to keep the Modular going, along with all of their installed tech."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("powerCell"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class Scrapper : PlayerItem { public struct ActiveItemMode { public tk2dSpriteCollectionData spriteCollection; public string Sprite_Name; public string Mode_Name; public bool Removable; public Func CanBeUsed; public Action OnUsed; } public static ItemTemplate template; public static GameObject ReloadHoldEffect; public static List allPickups; public static int ID; public static GameObject ScrapVFX; public static GameObject Sparkticle; public static Func OverrideCustomScrapCheck; private GameObject EffectInst; private float TimerToSwitch = 0f; public List gunberMunchers; private bool Inited = false; private int Mode = 0; public string currentMode = "SCRAP"; public List currentModes = new List { new ActiveItemMode { Mode_Name = "COMPUTER", spriteCollection = StaticCollections.Item_Collection, Sprite_Name = "computer_core", Removable = false, CanBeUsed = ComputerCanBeUsed, OnUsed = DoComputerUse }, new ActiveItemMode { Mode_Name = "SCRAP", spriteCollection = StaticCollections.Item_Collection, Sprite_Name = "directive_scrap", Removable = false, CanBeUsed = ScrapCanBeUsed, OnUsed = DoEffectScrap } }; public static Action OnAnythingScrapped; public ModifiedDefaultLabelManager extant_Inventory_button; public ModifiedDefaultLabelManager extant_craft_button; public ModifiedDefaultLabelManager extant_close_button; public ModuleInventoryController extant_Inventory_Controller; public ModuleCrafingController extant_Crafting_Controller; public static void PIA(PickupObject pickup) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Expected O, but got Unknown ItemBuilder.AddPassiveStatModifier(pickup, (StatType)8, 1f, (ModifyMethod)0); pickup.CanBeDropped = false; ((PlayerItem)((pickup is PlayerItem) ? pickup : null)).m_baseSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("computer_core"); ((PlayerItem)((pickup is PlayerItem) ? pickup : null)).passiveStatModifiers = (StatModifier[])(object)new StatModifier[0]; GameObject val = new GameObject("Scrapper_VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("scrapper_scrap_007")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("ScrapperAnimation").GetComponent(); Tk2dSpriteAnimatorUtility.AddEventTriggersToAnimation(val3, "start", new Dictionary { { 8, "DoSparks" }, { 26, "SpitOutScrap" } }); ScrapVFX = val; Sparkticle = Module.ModularAssetBundle.LoadAsset("Spark Particle System"); ID = pickup.PickupObjectId; new Hook((MethodBase)typeof(HealthPickup).GetMethod("Start", BindingFlags.Instance | BindingFlags.Public), typeof(Scrapper).GetMethod("Start_HP")); new Hook((MethodBase)typeof(KeyBulletPickup).GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Scrapper).GetMethod("Start_Key")); new Hook((MethodBase)typeof(AmmoPickup).GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Scrapper).GetMethod("Start_Ammo")); new Hook((MethodBase)typeof(SilencerItem).GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Scrapper).GetMethod("Start_Blank")); Actions.OnActiveItemDropped = (Action)Delegate.Combine(Actions.OnActiveItemDropped, new Action(OnThisActiveDropped)); GameObject val4 = new GameObject("SwitchModeTuah"); Object.DontDestroyOnLoad((Object)(object)val4); FakePrefab.MarkAsFakePrefab(val4); tk2dSprite val5 = val4.AddComponent(); ((tk2dBaseSprite)val5).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val5).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("modularswitchmode_007")); tk2dSpriteAnimator val6 = val4.AddComponent(); val6.Library = Module.ModularAssetBundle.LoadAsset("GenericVFXAnimation").GetComponent(); ((tk2dBaseSprite)val5).usesOverrideMaterial = true; ((BraveBehaviour)val5).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val5).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val5).renderer.material.SetFloat("_EmissivePower", 4f); ((BraveBehaviour)val5).renderer.material.SetFloat("_EmissiveColorPower", 4f); ReloadHoldEffect = val4; } public static void OnThisActiveDropped(PlayerItem active, PlayerController player) { if (((PickupObject)active).PickupObjectId == ID) { ((PickupObject)active).Pickup(player); (active as Scrapper).SetMode("COMPUTER"); } } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); } public static void Start_HP(Action orig, HealthPickup self) { orig(self); if (!allPickups.Contains((PickupObject)(object)self)) { allPickups.Add((PickupObject)(object)self); } } public static void Start_Key(Action orig, KeyBulletPickup self) { orig(self); if (!allPickups.Contains((PickupObject)(object)self)) { allPickups.Add((PickupObject)(object)self); } } public static void Start_Ammo(Action orig, AmmoPickup self) { orig(self); if (!allPickups.Contains((PickupObject)(object)self)) { allPickups.Add((PickupObject)(object)self); } } public static void Start_Blank(Action orig, SilencerItem self) { orig(self); if (!allPickups.Contains((PickupObject)(object)self)) { allPickups.Add((PickupObject)(object)self); } } public static int ReturnPickupScrapValue(PickupObject obj) { //IL_005a: 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_00ff: Unknown result type (might be due to invalid IL or missing references) int num = -1; if ((Object)(object)obj == (Object)null) { return num; } if (obj is HealthPickup) { num = (int)(((HealthPickup)((obj is HealthPickup) ? obj : null)).healAmount * 2f) + ((HealthPickup)((obj is HealthPickup) ? obj : null)).armorAmount; } if (obj is AmmoPickup) { num = Amo(((AmmoPickup)((obj is AmmoPickup) ? obj : null)).mode); } if (obj is KeyBulletPickup) { num = 1 + ((KeyBulletPickup)((obj is KeyBulletPickup) ? obj : null)).numberKeyBullets + (((KeyBulletPickup)((obj is KeyBulletPickup) ? obj : null)).IsRatKey ? 5 : 0); } if (obj is SilencerItem) { num = 2; } if (obj is PassiveItem) { num = (Object.op_Implicit((Object)(object)((PassiveItem)((obj is PassiveItem) ? obj : null)).Owner) ? (-1) : ReturnAmountBasedOnTier(obj.quality)); } if (obj is PlayerItem) { num = (Object.op_Implicit((Object)(object)((PlayerItem)((obj is PlayerItem) ? obj : null)).LastOwner) ? (-1) : ReturnAmountBasedOnTier(obj.quality)); } if (obj.PickupObjectId == 565) { num = 1; } if (obj.PickupObjectId == 127) { num = 1; } if (obj.PickupObjectId == 148) { num = 1; } if (obj.PickupObjectId == 641) { num = 5; } if (OverrideCustomScrapCheck != null) { num = OverrideCustomScrapCheck(obj, num); } return num; } private static int Amo(AmmoPickupMode a) { //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_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown return (int)a switch { 1 => 2, 2 => 1, 0 => 1, _ => -1, }; } public override void Start() { } public static int ReturnAmountBasedOnTier(ItemQuality itemQuality) { //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_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected I4, but got Unknown return (int)itemQuality switch { 0 => 1, 1 => 1, 2 => 1, 3 => 2, _ => 2, }; } public void ReloadPressed(PlayerController p, Gun g) { if (g.ClipCapacity <= g.ClipShotsRemaining && !((Object)(object)p.CurrentItem != (Object)(object)this)) { SwitchMode(); } } public override void Update() { //IL_010a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.LastOwner != (Object)null) { if (!Inited) { Inited = true; SetMode("COMPUTER"); PlayerController lastOwner = base.LastOwner; lastOwner.OnNewFloorLoaded = (Action)Delegate.Combine(lastOwner.OnNewFloorLoaded, new Action(ONFE)); ONFE(base.LastOwner); base.LastOwner.startingActiveItemIds.Add(((PickupObject)this).PickupObjectId); } if (base.LastOwner.m_activeActions != null) { if (((OneAxisInputControl)base.LastOwner.m_activeActions.ReloadAction).State && (Object)(object)base.LastOwner.CurrentItem == (Object)(object)this) { if ((Object)(object)EffectInst == (Object)null && TimerToSwitch > 0.25f) { EffectInst = ((GameActor)base.LastOwner).PlayEffectOnActor(ReloadHoldEffect, new Vector3(0f, 0.75f), true, false, false); EffectInst.gameObject.layer = 22; EffectInst.GetComponent().Play(base.LastOwner.IsUsingAlternateCostume ? "moduleswitchmodealt" : "moduleswitchmode"); } TimerToSwitch += Time.deltaTime; if (TimerToSwitch >= 1.25f) { if ((Object)(object)EffectInst != (Object)null) { Object.Destroy((Object)(object)EffectInst); EffectInst = null; } if ((Object)(object)base.LastOwner.CurrentItem != (Object)(object)this) { return; } SwitchMode(); TimerToSwitch = 0f; } } else { if ((Object)(object)EffectInst != (Object)null) { Object.Destroy((Object)(object)EffectInst); EffectInst = null; } TimerToSwitch = 0f; } } } ((PlayerItem)this).Update(); } private IEnumerator Wait() { yield return null; if ((Object)(object)GameManager.Instance.Dungeon.data.Entrance.hierarchyParent == (Object)null) { yield break; } gunberMunchers = new List(); GunberMuncherController[] muncher = ((Component)GameManager.Instance.Dungeon.data.Entrance.hierarchyParent.parent).GetComponentsInChildren(true); if (muncher != null && muncher.Length != 0) { GunberMuncherController[] array = muncher; foreach (GunberMuncherController shope in array) { gunberMunchers.Add(shope); } } } public void ONFE(PlayerController playerController) { ((MonoBehaviour)playerController).StartCoroutine(Wait()); } public override void OnPreDrop(PlayerController user) { Inited = false; base.LastOwner = null; ((PlayerItem)this).OnPreDrop(user); } public void SwitchMode() { AkSoundEngine.PostEvent("Play_OBJ_metacoin_collect_01", ((Component)this).gameObject); Mode++; if (Mode == currentModes.Count()) { Mode = 0; } ActiveItemMode activeItemMode = currentModes[Mode]; currentMode = activeItemMode.Mode_Name; ((BraveBehaviour)this).sprite.SetSprite(activeItemMode.spriteCollection.GetSpriteIdByName(activeItemMode.Sprite_Name)); } public void SetMode(string mode) { foreach (ActiveItemMode entry in currentModes) { if (mode == entry.Mode_Name) { Mode = currentModes.FindIndex((ActiveItemMode self) => self.Mode_Name == entry.Mode_Name); currentMode = entry.Mode_Name; ((BraveBehaviour)this).sprite.SetSprite(entry.spriteCollection.GetSpriteIdByName(entry.Sprite_Name)); } } } public void AddMode(ActiveItemMode mode) { IEnumerable source = currentModes.Where((ActiveItemMode self) => self.Mode_Name == mode.Mode_Name); if (source.Count() <= 0) { currentModes.Add(mode); } } public void RemoveMode(ActiveItemMode mode) { IEnumerable source = currentModes.Where((ActiveItemMode self) => self.Mode_Name == mode.Mode_Name); if (source.Count() != 0 && mode.Removable) { currentModes.Remove(mode); if (currentMode == mode.Mode_Name) { SwitchMode(); } } } public static bool ScrapCanBeUsed(PlayerController user, Scrapper scrapper) { //IL_0040: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) Vector2 val2; for (int num = allPickups.Count - 1; num > -1; num--) { PickupObject val = allPickups[num]; if ((Object)(object)val == (Object)null) { allPickups.RemoveAt(num); } else { val2 = ((GameActor)user).CenterPosition - Vector3Extensions.XY(((BraveBehaviour)val).transform.position); float sqrMagnitude = ((Vector2)(ref val2)).sqrMagnitude; if (sqrMagnitude <= 25f && Mathf.Sqrt(sqrMagnitude) < 2f) { int num2 = ReturnPickupScrapValue(val); if (num2 > 0) { PassiveItem val3 = (PassiveItem)(object)((val is PassiveItem) ? val : null); if (val3 == null) { return true; } if ((Object)(object)val3.Owner == (Object)null) { return true; } } } } } List allDebris = StaticReferenceManager.AllDebris; if (allDebris != null) { for (int i = 0; i < allDebris.Count; i++) { DebrisObject val4 = allDebris[i]; val2 = ((GameActor)user).CenterPosition - Vector3Extensions.XY(((BraveBehaviour)val4).transform.position); float sqrMagnitude2 = ((Vector2)(ref val2)).sqrMagnitude; if (!Object.op_Implicit((Object)(object)val4) || !val4.IsPickupObject || !(sqrMagnitude2 <= 25f) || !(Mathf.Sqrt(sqrMagnitude2) < 2f)) { continue; } int num3 = ReturnPickupScrapValue(((Component)val4).GetComponent()); if (num3 > 0) { if (!allPickups.Contains(((Component)val4).GetComponent())) { allPickups.Add(((Component)val4).GetComponent()); } return true; } Gun componentInChildren = ((Component)val4).GetComponentInChildren(); if (!((Object)(object)componentInChildren != (Object)null)) { continue; } int num4 = ReturnPickupScrapValue((PickupObject)(object)componentInChildren); if (num4 > 0 && (Object)(object)componentInChildren.CurrentOwner == (Object)null) { if (!allPickups.Contains((PickupObject)(object)componentInChildren)) { allPickups.Add((PickupObject)(object)componentInChildren); } return false; } } } for (int num5 = scrapper.gunberMunchers.Count - 1; num5 > -1; num5--) { GunberMuncherController val5 = scrapper.gunberMunchers[num5]; if (Vector2.Distance(((BraveBehaviour)val5).sprite.WorldCenter, ((BraveBehaviour)user).sprite.WorldCenter) < 3f) { return true; } } return false; } public static bool ComputerCanBeUsed(PlayerController user, Scrapper scrapper) { return (!user.IsInCombat) ? true : false; } public static void DoEffectScrap(PlayerController user, Scrapper scrapper) { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) IPlayerInteractable lastInteractable = user.GetLastInteractable(); if (lastInteractable != null && lastInteractable is HeartDispenser) { HeartDispenser val = (HeartDispenser)(object)((lastInteractable is HeartDispenser) ? lastInteractable : null); if (Object.op_Implicit((Object)(object)val) && HeartDispenser.CurrentHalfHeartsStored > 0) { if (HeartDispenser.CurrentHalfHeartsStored > 1) { HeartDispenser.CurrentHalfHeartsStored -= 2; } else { HeartDispenser.CurrentHalfHeartsStored -= 1; } return; } } for (int num = allPickups.Count - 1; num > -1; num--) { PickupObject val2 = allPickups[num]; if ((Object)(object)val2 == (Object)null) { allPickups.RemoveAt(num); } else { Vector2 val3 = ((GameActor)user).CenterPosition - Vector3Extensions.XY(((BraveBehaviour)val2).transform.position); float sqrMagnitude = ((Vector2)(ref val3)).sqrMagnitude; if (sqrMagnitude <= 25f && Mathf.Sqrt(sqrMagnitude) < 2f) { int num2 = ReturnPickupScrapValue(val2); if (num2 > 0) { PassiveItem val4 = (PassiveItem)(object)((val2 is PassiveItem) ? val2 : null); if (val4 != null) { if ((Object)(object)val4.Owner == (Object)null) { if (OnAnythingScrapped != null) { OnAnythingScrapped(val2); } scrapper.DoSpawnVFX(((BraveBehaviour)val2).sprite, num2); } } else { if (val2 is Gun) { Object.Destroy((Object)(object)((Component)val2).GetComponentInParent()); } if (OnAnythingScrapped != null) { OnAnythingScrapped(val2); } scrapper.DoSpawnVFX(((BraveBehaviour)val2).sprite, num2); } } } } } for (int num3 = scrapper.gunberMunchers.Count - 1; num3 > -1; num3--) { GunberMuncherController val5 = scrapper.gunberMunchers[num3]; if (Vector2.Distance(((BraveBehaviour)val5).sprite.WorldCenter, ((BraveBehaviour)user).sprite.WorldCenter) < 3f) { GunMuncherGoSilly orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val5).gameObject); orAddComponent.scrapper = scrapper; orAddComponent.muncherController = val5; orAddComponent.DoJump(); } } } public static void DoComputerUse(PlayerController user, Scrapper scrapper) { if ((Object)(object)scrapper.extant_Inventory_Controller != (Object)null) { scrapper.extant_Inventory_Controller.ObliterateUI(); scrapper.extant_Inventory_Controller = null; } scrapper.extant_Inventory_Controller = ScriptableObject.CreateInstance(); scrapper.extant_Inventory_Controller.DoQuickStart(user); } public override bool CanBeUsed(PlayerController user) { if (!Object.op_Implicit((Object)(object)user)) { return false; } if (currentModes[Mode].CanBeUsed != null) { return currentModes[Mode].CanBeUsed(user, this); } return true; } private void DoSpawnVFX(tk2dBaseSprite sprite, int ScrapCount) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) ModulePrinterCore modulePrinterCore = base.LastOwner.PlayerHasCore(); if ((Object)(object)modulePrinterCore != (Object)null && modulePrinterCore.ModifyScrapContext != null) { ScrapCount = modulePrinterCore.ModifyScrapContext(ScrapCount, modulePrinterCore, base.LastOwner, this); } Vector3 val = Vector2.op_Implicit(sprite.WorldBottomLeft); GameObject gameObject = new GameObject("suck image"); gameObject.layer = ((Component)sprite).gameObject.layer; tk2dSprite val2 = gameObject.AddComponent(); gameObject.transform.parent = SpawnManager.Instance.VFX; gameObject.transform.position = val; ((tk2dBaseSprite)val2).SetSprite(((BraveBehaviour)sprite).sprite.Collection, ((BraveBehaviour)sprite).sprite.spriteId); Object.Destroy((Object)(object)((Component)sprite).gameObject); tk2dSpriteAnimator Tk2dAnimator = Object.Instantiate(ScrapVFX, val, Quaternion.identity).GetComponent(); AkSoundEngine.PostEvent("Play_CHR_muncher_eat_01", ((Component)Tk2dAnimator).gameObject); Tk2dAnimator.PlayAndDestroyObject("start", (Action)null); ((MonoBehaviour)this).StartCoroutine(MoveScrap(gameObject, 0.5f, ((BraveBehaviour)Tk2dAnimator).sprite.WorldTopLeft + new Vector2(0f, 0.5f))); Tk2dAnimator.AnimationEventTriggered = delegate(tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip, int idX) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) if (clip.GetFrame(idX).eventInfo.Contains("DoSparks")) { AkSoundEngine.PostEvent("Play_OBJ_paydaydrill_loop_01", ((Component)Tk2dAnimator).gameObject); ((MonoBehaviour)this).StartCoroutine(MoveScrap(gameObject, 1f, ((BraveBehaviour)Tk2dAnimator).sprite.WorldCenter - new Vector2(0f, 0.25f), 1f, 0f, Destroyed: true)); GameObject val3 = Object.Instantiate(Sparkticle, Vector2.op_Implicit(((BraveBehaviour)Tk2dAnimator).sprite.WorldCenter), Quaternion.identity); GameObjectExtensions.SetLayerRecursively(val3, LayerMask.NameToLayer("Unoccluded")); Object.Destroy((Object)(object)val3, 3f); } if (clip.GetFrame(idX).eventInfo.Contains("SpitOutScrap")) { if ((Object)(object)base.LastOwner.PlayerHasCore() != (Object)null && base.LastOwner.PlayerHasCore().OnScrapped != null) { base.LastOwner.PlayerHasCore().OnScrapped(ScrapCount, base.LastOwner.PlayerHasCore(), base.LastOwner, this); } AkSoundEngine.PostEvent("Stop_OBJ_paydaydrill_loop_01", ((Component)Tk2dAnimator).gameObject); float startAngle = BraveUtility.RandomAngle(); for (int i = 0; i < ScrapCount; i++) { DebrisObject val4 = LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(Scrap.Scrap_ID)).gameObject, Vector2.op_Implicit(((BraveBehaviour)Tk2dAnimator).sprite.WorldTopCenter - new Vector2(0.125f, 0.375f)), Toolbox.GetUnitOnCircle(Toolbox.SubdivideCircle(startAngle, ScrapCount, i), 1f), (ScrapCount > 1) ? 1.25f : 0f, true, true, false); ((Component)val4).gameObject.SetActive(true); } } }; } public IEnumerator MoveScrap(GameObject spriteObject, float duration, Vector2 newPosition, float scaleOld = 1f, float scaleNew = 1f, bool Destroyed = false) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) Vector2 oldPosition = TransformExtensions.PositionVector2(spriteObject.transform); float e = 0f; while (e < duration) { e += BraveTime.DeltaTime; spriteObject.transform.position = Vector2.op_Implicit(Vector2.Lerp(oldPosition, newPosition, Toolbox.SinLerpTValue(e / duration))); spriteObject.transform.localScale = Vector3.one * Mathf.Lerp(scaleOld, scaleNew, Toolbox.SinLerpTValue(e / duration)); yield return null; } if (Destroyed) { Object.Destroy((Object)(object)spriteObject); } } public override void DoEffect(PlayerController user) { if (currentModes[Mode].OnUsed != null) { currentModes[Mode].OnUsed(user, this); } } static Scrapper() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(Scrapper)); val.Name = "Module Computer Core"; val.Description = "Game Making"; val.LongDescription = "Allows you to open an interface, letting you see and power your modules.\n\nHolding the 'Reload' button switches modes, the other which allows for the scrapping of Items and Pickups into Scrap. Scrap can be repurposed into upgrades.\n\nIn a perfect world, this device would break down waste materials on construction sites, and turn them into suitable materials for printing useful tools. But this is not a perfect world."; val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("computer_core"); val.Quality = (ItemQuality)(-50); val.Cooldown = 1f; val.CooldownType = (CooldownType)0; val.PostInitAction = PIA; template = val; allPickups = new List(); } } public class Scrap : PickupObject { public static ItemTemplate template; public GameObject minimapIcon; private GameObject extant_minimapIcon; private RoomHandler m_minimapIconRoom; public static int Scrap_ID; private bool m_hasBeenPickedUp; public static void PostInit(PickupObject v) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown v.CustomCost = 15; v.UsesCustomCost = true; Scrap_ID = v.PickupObjectId; ((Component)v).gameObject.SetActive(false); FakePrefab.MakeFakePrefab(((Component)v).gameObject); Object.DontDestroyOnLoad((Object)(object)((Component)v).gameObject); SpeculativeRigidbody val = ((Component)v).gameObject.AddComponent(); PixelCollider item = new PixelCollider { IsTrigger = true, ManualWidth = 12, ManualHeight = 12, ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)7, ManualOffsetX = 0, ManualOffsetY = 0, IsTileCollider = true }; val.PixelColliders = new List { item }; tk2dSpriteAnimator val2 = ((Component)v).gameObject.AddComponent(); val2.Library = Module.ModularAssetBundle.LoadAsset("ScrapAnimation").GetComponent(); val2.defaultClipId = val2.GetClipIdByName("idle"); GameObject val3 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val3); FakePrefab.MarkAsFakePrefab(val3); tk2dSprite val4 = val3.AddComponent(); ((tk2dBaseSprite)val4).Collection = StaticCollections.Item_Collection; ((tk2dBaseSprite)val4).SetSprite(StaticCollections.Item_Collection.GetSpriteIdByName("scrap_room_icon")); (v as Scrap).minimapIcon = val3; } public override void Pickup(PlayerController player) { AkSoundEngine.PostEvent("Play_OBJ_ammo_pickup_01", ((Component)player).gameObject); GameStatsManager.Instance.HandleEncounteredObjectRaw(((BraveBehaviour)this).encounterTrackable.EncounterGuid); if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).spriteAnimator)) { ((BraveBehaviour)this).spriteAnimator.StopAndResetFrame(); } player.BloopItemAboveHead(((BraveBehaviour)this).sprite, "scrap_idle_001"); GlobalConsumableStorage.AddConsumableAmount("Scrap", 1); GetRidOfMinimapIcon(); Object.Destroy((Object)(object)((Component)this).gameObject); } private void GetRidOfMinimapIcon() { if ((Object)(object)extant_minimapIcon != (Object)null) { Minimap.Instance.DeregisterRoomIcon(m_minimapIconRoom, extant_minimapIcon); extant_minimapIcon = null; } } protected void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) try { SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); SpeculativeRigidbody component = ((Component)this).gameObject.GetComponent(); SpeculativeRigidbody val = component; SpeculativeRigidbody val2 = val; val2.OnTriggerCollision = (OnTriggerDelegate)Delegate.Combine((Delegate?)(object)val2.OnTriggerCollision, (Delegate?)new OnTriggerDelegate(OnPreCollision)); if ((Object)(object)minimapIcon != (Object)null && !m_hasBeenPickedUp && ((Component)this).gameObject.activeSelf) { m_minimapIconRoom = GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(Vector3Extensions.IntXY(((BraveBehaviour)this).transform.position, (VectorConversions)0)); extant_minimapIcon = Minimap.Instance.RegisterRoomIcon(m_minimapIconRoom, minimapIcon, false); } } catch (Exception ex) { ETGModConsole.Log((object)ex.Message, false); } } private void OnPreCollision(SpeculativeRigidbody otherRigidbody, SpeculativeRigidbody source, CollisionData collisionData) { if (!m_hasBeenPickedUp) { PlayerController component = ((Component)otherRigidbody).GetComponent(); if ((Object)(object)component != (Object)null) { m_hasBeenPickedUp = true; ((PickupObject)this).Pickup(component); } } } public override void OnDestroy() { GetRidOfMinimapIcon(); ((PickupObject)this).OnDestroy(); } public void Update() { if ((Object)(object)((BraveBehaviour)this).spriteAnimator != (Object)null && ((BraveBehaviour)this).spriteAnimator.DefaultClip != null) { ((BraveBehaviour)this).spriteAnimator.SetFrame(Mathf.FloorToInt(Time.time * ((BraveBehaviour)this).spriteAnimator.DefaultClip.fps % (float)((BraveBehaviour)this).spriteAnimator.DefaultClip.frames.Length)); } } static Scrap() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(Scrap)); val.Name = "Scrap"; val.Description = "Damage Up"; val.LongDescription = "Increases Damage by\n33% (+33% per stack)\n\nTier:\n" + DefaultModule.ReturnTierLabel(DefaultModule.ModuleTier.Tier_1); val.ManualSpriteCollection = StaticCollections.Item_Collection; val.ManualSpriteID = StaticCollections.Item_Collection.GetSpriteIdByName("gear_borderless"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class CloakPlating : DefaultModule { public static ItemTemplate template; public static int ID; public float DamageMax = 5f; private float Mult = 1f; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("cloakup_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Cloak Plating " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Entering combat cloaks the player for 6 (" + StaticColorHexes.AddColorToLabelString("+3", StaticColorHexes.Light_Orange_Hex) + ") seconds.\nForcefully uncloaking (by attacking or rolling) grants a\n4x (" + StaticColorHexes.AddColorToLabelString("+2", StaticColorHexes.Light_Orange_Hex) + ") damage multiplier that quickly degrades.\nGrants a 30% movement speed buff while cloaked."; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.EnergyConsumption = 1f; defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Combine(modulePrinter.OnEnteredCombat, new Action(OEC)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnFrameUpdate = (Action)Delegate.Combine(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Combine(modulePrinter.VoluntaryMovement_Modifier, new Func(MovementMod)); } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { if (Mult > 1f) { Mult -= BraveTime.DeltaTime; } } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnEnteredCombat = (Action)Delegate.Remove(modulePrinter.OnEnteredCombat, new Action(OEC)); modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.VoluntaryMovement_Modifier = (Func)Delegate.Remove(modulePrinter.VoluntaryMovement_Modifier, new Func(MovementMod)); } public float MovementMod(Vector2 currentVel, ModulePrinterCore core, PlayerController p) { return 0.3f * (float)((core.cloakDoer.currentState == CloakDoer.Cloak_State.Active) ? 1 : 0); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { int num = ReturnStack(modulePrinter); DamageMax = 2 + num * 2; } public void OEC(ModulePrinterCore modulePrinterCore, RoomHandler room, PlayerController p) { int num = ReturnStack(modulePrinterCore); modulePrinterCore.cloakDoer.ProcessCloak(new CloakDoer.CloakContext { Length = 3f + (float)num * 3f, OnForceCloakBroken = PP }); } public void PP(PlayerController ppe) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_BOSS_cyborg_storm_01", ((Component)ppe).gameObject); if (ConfigManager.DoVisualEffect) { ((GameActor)ppe).PlayEffectOnActor(VFXStorage.MachoBraceDustupVFX, new Vector3(-1f, -1f), true, false, false); } Mult = DamageMax; } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= Mult; ProjectileData baseData2 = p.baseData; baseData2.force *= Mult; p.AdditionalScaleMultiplier *= Mathf.Min(Mult, 2.5f); } static CloakPlating() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(CloakPlating)); val.Name = "Cloak Plating"; val.Description = "+60%"; val.LongDescription = "Entering combat cloaks the player for 6 (+3 per stack) seconds. Uncloaking forcefully (by attacking or rolling) grants a 4x (+2 per stack) damage multiplier that quickly degrades. Grants a 30% movement speed buff while cloaked."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("cloakup_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class AvariceCart : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("avarice_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Avarice Cart " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants 50 Casings, 1 Key and 2 Blanks on pickup.\nEnemies have a 6% chance of\ndropping an additional casing when killed (" + StaticColorHexes.AddColorToLabelString("+6% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.6f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.IsUncraftable = true; defaultModule.EnergyConsumption = 1f; defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); } public void OKE(ModulePrinterCore modulePrinter, PlayerController player, AIActor aIActor) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (Random.value < 1f - 1f / (1f + 0.06f * (float)ReturnStack(modulePrinter))) { LootEngine.SpawnCurrency(((BraveBehaviour)aIActor).sprite.WorldBottomCenter, 1, false); } } public override void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate((GameObject)ResourceCache.Acquire("Global VFX/VFX_Item_Pickup")); tk2dSprite component = val.GetComponent(); ((tk2dBaseSprite)component).PlaceAtPositionByAnchor(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (Anchor)4); ((tk2dBaseSprite)component).UpdateZDepth(); Object.Destroy((Object)(object)val, 2f); AkSoundEngine.PostEvent("Play_OBJ_coin_large_01", ((Component)player).gameObject); PlayerConsumables carriedConsumables = player.carriedConsumables; carriedConsumables.Currency += 50; PlayerConsumables carriedConsumables2 = player.carriedConsumables; carriedConsumables2.KeyBullets += 1; player.Blanks += 2; } static AvariceCart() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(AvariceCart)); val.Name = "Avarice Cart"; val.Description = "MONEY"; val.LongDescription = "Grants 50 Casings, 1 Key and 2 Blanks on pickup. Enemies have a 6% chance of dropping a casing when killed (+6% per stack hyperbolically)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("avarice_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class BarterSoftware : DefaultModule { public static ItemTemplate template; public static GameObject BarterObject; public static int ID; public static void PostInit(PickupObject v) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("swindler_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Barter Software " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "While active, reduces all prices by 50%.\nTaking damage breaks this module\n(" + StaticColorHexes.AddColorToLabelString("+Extra hits before breaking", StaticColorHexes.Light_Orange_Hex) + ").\n" + StaticColorHexes.AddColorToLabelString("Once enabled, cannot be disabled.", StaticColorHexes.Red_Color_Hex); defaultModule.EnergyConsumption = 1f; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.IsSpecialModule = true; defaultModule.IsUncraftable = true; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; List discountsToAdd = CustomDiscountManager.DiscountsToAdd; ShopDiscount val = new ShopDiscount(); val.ItemIsValidForDiscount = IsValid; val.CanDiscountCondition = CanDisc; val.IdentificationKey = "Barter_Module"; val.PriceMultiplier = 0.5f; discountsToAdd.Add(val); GameObject val2 = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val2); FakePrefab.MarkAsFakePrefab(val2); tk2dSprite val3 = val2.AddComponent(); ((tk2dBaseSprite)val3).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val3).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("swindler_t2_module")); tk2dSpriteAnimator val4 = val2.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("SwindlerVFXAnimation").GetComponent(); BarterObject = val2; ID = ((PickupObject)defaultModule).PickupObjectId; } public static bool CanDisc() { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (player.PlayerHasActiveModule(ID)) { return true; } } return false; } public static bool IsValid(ShopItemController shopItemController) { return true; } public override bool CanBeDisabled(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { return false; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnDamaged = (Action)Delegate.Combine(modulePrinter.OnDamaged, new Action(OD)); } public void OD(ModulePrinterCore modulePrinter, PlayerController player) { //IL_0035: 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) int num = ReturnStack(modulePrinter); if (num == 1) { GameObject val = ((GameActor)player).PlayEffectOnActor(BarterObject, new Vector3(0f, 2.25f), true, false, false); val.GetComponent().PlayAndDestroyObject((!ModularIsAltSkin()) ? "destroy" : "destroy_alt", (Action)null); val.GetComponent().m_onDestroyAction = delegate { //IL_0031: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_WPN_claw_blast_03", ((Component)player).gameObject); ((GameActor)player).PlayEffectOnActor(StaticExplosionDatas.explosiveRoundsExplosion.effect, new Vector3(0f, 2.25f), true, false, false); }; } else if (num > 1) { GameObject val2 = ((GameActor)player).PlayEffectOnActor(BarterObject, new Vector3(0f, 2.25f), true, false, false); val2.GetComponent().PlayAndDestroyObject((!ModularIsAltSkin()) ? "break_one" : "break_one_alt", (Action)null); } modulePrinter.RemoveModule(ID); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnDamaged = (Action)Delegate.Remove(modulePrinter.OnDamaged, new Action(OD)); } static BarterSoftware() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(BarterSoftware)); val.Name = "Barter Software"; val.Description = "With Gold"; val.LongDescription = "While active, reduces all prices by 50%. Taking damage breaks this module (+Extra hits before breaking). Once enabled, cannot be disabled."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("swindler_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class RNGManipulation : DefaultModule { public static ItemTemplate template; public static ValidRoomRewardContents ValidRoomRewardContents; public static int ID; public static void PostInit(PickupObject v) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("rngmanipulation_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "RNG Manipulation " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants vastly improved and more common room drops.\n(" + StaticColorHexes.AddColorToLabelString("+Loot chance and better loot drop odds", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.EnergyConsumption = 1f; defaultModule.AppearsInRainbowMode = false; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); defaultModule.AdditionalWeightMultiplier = 0.8f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.OverrideScrapCost = 16; ID = ((PickupObject)defaultModule).PickupObjectId; ValidRoomRewardContents = new ValidRoomRewardContents { overrideItemPool = new List> { new Tuple(0.5f, 120), new Tuple(0.33f, 565), new Tuple(0.033f, 297), new Tuple(0.5f, 70), new Tuple(0.3f, 67), new Tuple(0.05f, 137), new Tuple(0.15f, Scrap.Scrap_ID), new Tuple(0.02f, CraftingCore.CraftingCoreID) } }; ((MonoBehaviour)defaultModule).StartCoroutine(FrameDelay()); } public static IEnumerator FrameDelay() { yield return null; foreach (DefaultModule t1_modules in GlobalModuleStorage.all_Tier_1_Modules) { ValidRoomRewardContents.overrideItemPool.Add(new Tuple(0.0005f, ((PickupObject)t1_modules).PickupObjectId)); } } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { RoomRewardAPI.OnRoomRewardDetermineContents = (Action)Delegate.Combine(RoomRewardAPI.OnRoomRewardDetermineContents, new Action(OnDetermineContents)); RoomRewardAPI.OnRoomClearItemDrop = (Action)Delegate.Combine(RoomRewardAPI.OnRoomClearItemDrop, new Action(OnRoomClearItemDrop)); } public void OnRoomClearItemDrop(DebrisObject debrisObject, RoomHandler room) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Play_OBJ_dice_bless_01", ((Component)debrisObject).gameObject); if (ConfigManager.DoVisualEffect) { Object.Instantiate(VFXStorage.TeleportDistortVFX, Vector2.op_Implicit(((BraveBehaviour)debrisObject).sprite.WorldCenter), Quaternion.identity); } } public void OnDetermineContents(RoomHandler room, ValidRoomRewardContents validRoomReward, float f) { validRoomReward.additionalRewardChance -= 0.04f * (float)Stack(); validRoomReward.overrideItemPool.AddRange(ReturnThing()); } public List> ReturnThing() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown ValidRoomRewardContents val = new ValidRoomRewardContents(); val.overrideItemPool = new List>(); val.overrideItemPool.AddRange(ValidRoomRewardContents.overrideItemPool); foreach (Tuple item in val.overrideItemPool) { item.First *= (float)Stack(); } return val.overrideItemPool; } public override void OnCoreDestruction(ModulePrinterCore modulePrinter, ModularGunController modularGunController) { RoomRewardAPI.OnRoomRewardDetermineContents = (Action)Delegate.Remove(RoomRewardAPI.OnRoomRewardDetermineContents, new Action(OnDetermineContents)); RoomRewardAPI.OnRoomClearItemDrop = (Action)Delegate.Remove(RoomRewardAPI.OnRoomClearItemDrop, new Action(OnRoomClearItemDrop)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { RoomRewardAPI.OnRoomRewardDetermineContents = (Action)Delegate.Remove(RoomRewardAPI.OnRoomRewardDetermineContents, new Action(OnDetermineContents)); RoomRewardAPI.OnRoomClearItemDrop = (Action)Delegate.Remove(RoomRewardAPI.OnRoomClearItemDrop, new Action(OnRoomClearItemDrop)); } static RNGManipulation() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(RNGManipulation)); val.Name = "RNG Manipulation"; val.Description = "Just Really Lucky"; val.LongDescription = "Grants vastly improved and more common room drops (+Loot chance and better loot drop odds per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("rngmanipulation_t2_module"); val.Quality = (ItemQuality)(-100); val.PostInitAction = PostInit; template = val; } } public class HellfireLauncher : DefaultModule { public static ItemTemplate template; public static int ID; public DamageTypeModifier FireImmunity = new DamageTypeModifier { damageMultiplier = 0f, damageType = (CoreDamageTypes)4 }; public static void PostInit(PickupObject v) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("hellfire_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Hellfire Launcher " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants Fire Immunity.\nReloading creates a line of fire in the direction you are aiming.\nThe trail will initially hurt enemies directly when created.\n(" + StaticColorHexes.AddColorToLabelString("+Range, Damage and Radius", StaticColorHexes.Light_Orange_Hex) + ").\nLength scales with amount of shots left in the clip."; defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.EnergyConsumption = 1f; defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { ((BraveBehaviour)player).healthHaver.damageTypeModifiers.Add(FireImmunity); modulePrinter.OnGunReloaded = (Action)Delegate.Combine(modulePrinter.OnGunReloaded, new Action(OGR)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { ((BraveBehaviour)player).healthHaver.damageTypeModifiers.Remove(FireImmunity); modulePrinter.OnGunReloaded = (Action)Delegate.Remove(modulePrinter.OnGunReloaded, new Action(OGR)); } public void OGR(ModulePrinterCore modulePrinterCore, PlayerController player, Gun g) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) float num = (float)g.ClipShotsRemaining / (float)g.ClipCapacity; num = 1f - num; int num2 = ReturnStack(modulePrinterCore); Vector2 val = ((BraveBehaviour)player).sprite.WorldCenter + Toolbox.GetUnitOnCircle(g.CurrentAngle, 1f + 0.25f * (float)num2 + 1f); Vector2 val2 = val + Toolbox.GetUnitOnCircle(g.CurrentAngle, (5f + (float)num2 * 3.5f) * num); DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(GoopUtility.FireDef).TimedAddGoopLine(val, val2, 1f + 0.33f * (float)num2, 0.35f); ((MonoBehaviour)player).StartCoroutine(BurningWitness(player.CurrentRoom, val, val2, 1f + 0.25f * (float)num2, 0.35f)); } private IEnumerator BurningWitness(RoomHandler room, Vector2 p1, Vector2 p2, float radius, float duration) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) float elapsed = 0f; Vector2 lastEnd = p1; while (elapsed < duration) { elapsed += BraveTime.DeltaTime; Vector2 currentEnd = Vector2.Lerp(p1, p2, elapsed / duration); float curDist = Vector2.Distance(currentEnd, lastEnd); int steps = Mathf.CeilToInt(curDist / radius); for (int i = 0; i < steps; i++) { Vector2 center = lastEnd + (currentEnd - lastEnd) * (((float)i + 1f) / (float)steps); if (room != null) { room.ApplyActionToNearbyEnemies(center, radius + 0.75f, (Action)Burn); } GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(center + Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), Random.Range(0f, radius))), Vector2.op_Implicit(Vector2.zero), (float?)null, (float?)null, (Color?)null, (SparksType)5); } lastEnd = currentEnd; yield return null; } } public void Burn(AIActor enemy, float f) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)enemy)) { ((BraveBehaviour)enemy).healthHaver.ApplyDamage(1.5f * (float)ReturnStack(Stored_Core), Vector2.zero, "HeatVent", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); ((GameActor)enemy).ApplyEffect((GameActorEffect)(object)DebuffStatics.hotLeadEffect, 1f, (Projectile)null); } } static HellfireLauncher() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(HellfireLauncher)); val.Name = "Hellfire Launcher"; val.Description = "Love The Smell"; val.LongDescription = "Grants Fire Immunity. Reloading creates a line of fire in the direction you are aiming. The trail will initially hurt enemies directly when created. (+Range, Damage and Radius per stack). Length scales with amount of shots left in the clip."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("hellfire_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class JetPropellant : DefaultModule { public class TrailRocketController : MonoBehaviour { public Projectile self; private GameObject particleObject; public void Start() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) particleObject = Object.Instantiate(RPGParticles); particleObject.transform.parent = ((BraveBehaviour)self).transform; particleObject.transform.localPosition = new Vector3(0f, 0f); } public void Update() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)particleObject == (Object)null) && !((Object)(object)self == (Object)null)) { particleObject.transform.localRotation = ((BraveBehaviour)self).transform.localRotation; } } } public static ItemTemplate template; public static int ID; public static AnimationCurve curve; public static GameObject RPGParticles; public int stack = 0; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("jetpropellant_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Jet Propellant " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Projectiles start slow, but accelerate to\nhigh speeds after a second.\nProjectiles now deal 10% (" + StaticColorHexes.AddColorToLabelString("+5%", StaticColorHexes.Light_Orange_Hex) + ") of their speed as damage."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); defaultModule.AdditionalWeightMultiplier = 0.85f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(39); GameObject gameObject = ((Component)((BraveBehaviour)((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]).transform.Find("VFX_Rocket_Exhaust_Fire")).gameObject; GameObject val = Object.Instantiate(gameObject); val.transform.parent = null; val.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); RPGParticles = val; AnimationCurve val2 = new AnimationCurve(); val2.postWrapMode = (WrapMode)8; Keyframe[] array = new Keyframe[3]; Keyframe val3 = default(Keyframe); ((Keyframe)(ref val3)).time = 0f; ((Keyframe)(ref val3)).value = 0.05f; ((Keyframe)(ref val3)).inTangent = 0.75f; ((Keyframe)(ref val3)).outTangent = 0.25f; array[0] = val3; val3 = default(Keyframe); ((Keyframe)(ref val3)).time = 0.5f; ((Keyframe)(ref val3)).value = 0.1f; ((Keyframe)(ref val3)).inTangent = 0.75f; ((Keyframe)(ref val3)).outTangent = 0.25f; array[1] = val3; val3 = default(Keyframe); ((Keyframe)(ref val3)).time = 0.95f; ((Keyframe)(ref val3)).value = 1.25f; ((Keyframe)(ref val3)).inTangent = 0.75f; ((Keyframe)(ref val3)).outTangent = 0.25f; array[2] = val3; val2.keys = (Keyframe[])(object)array; curve = val2; ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { stack = ReturnStack(modulePrinter); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if (!(Random.value > 0.03f)) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); p.baseData.UsesCustomAccelerationCurve = true; p.baseData.AccelerationCurve = curve; TrailRocketController trailRocketController = ((Component)p).gameObject.AddComponent(); trailRocketController.self = p; } } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); p.baseData.UsesCustomAccelerationCurve = true; p.baseData.AccelerationCurve = curve; TrailRocketController trailRocketController = ((Component)p).gameObject.AddComponent(); trailRocketController.self = p; } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null && (Object)(object)Stored_Core != (Object)null) { float damage = ((BraveBehaviour)mR).projectile.baseData.damage; float num = ((BraveBehaviour)mR).projectile.baseData.speed / 1000f * (0.5f + 0.5f * (float)ReturnStack(Stored_Core)); ProjectileData baseData = ((BraveBehaviour)mR).projectile.baseData; baseData.damage *= 1f + num; ((MonoBehaviour)((BraveBehaviour)mR).projectile).StartCoroutine(FrameDelay(((BraveBehaviour)mR).projectile, damage)); } } public IEnumerator FrameDelay(Projectile p, float DmG) { yield return null; p.baseData.damage = DmG; } static JetPropellant() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(JetPropellant)); val.Name = "Jet Propellant"; val.Description = "Speed Is War"; val.LongDescription = "Projectiles start slow, but accelarate to high speeds after 1 second. Projectiles now deal 10% (+5% per stack) of their speed as damage."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("jetpropellant_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class GlassGenerator : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00ae: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("glassgen_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Glass Generator " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants 2 Glass Guon Stones.\nWhile active, picking up any Module\ngives 2 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") Glass Guon Stones.\nSlightly increases rate of fire per Glass Guon Stone."; defaultModule.EnergyConsumption = 1f; defaultModule.AppearsInRainbowMode = false; defaultModule.AppearsFromBlessedModeRoll = false; defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnAnyEverObtainedNonActivation(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 2; i++) { GameObject val = Object.Instantiate(((Component)PickupObjectDatabase.GetById(565)).gameObject, Vector3.zero, Quaternion.identity); PickupObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.CanBeDropped = false; component.Pickup(player); } } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnAnyModuleObtained = (Action)Delegate.Combine(modulePrinter.OnAnyModuleObtained, new Action(OAMO)); gunStatModifier = new ModuleGunStatModifier { Name = "Glass Gen Church", FireRate_Process = PFR, ChargeSpeed_Process = PFR }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnAnyModuleObtained = (Action)Delegate.Remove(modulePrinter.OnAnyModuleObtained, new Action(OAMO)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { return f - (f - f / (1f + 0.05f * (float)Multiplier(player, modulePrinter))); } public int Multiplier(PlayerController player, ModulePrinterCore modulePrinter) { int num = 0; foreach (PassiveItem passiveItem in player.passiveItems) { if (((PickupObject)passiveItem).PickupObjectId == 565) { num++; } } return num; } public void OAMO(ModulePrinterCore modulePrinterCore, PlayerController player, DefaultModule defaultModule) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore) + 1; for (int i = 0; i < num; i++) { GameObject val = Object.Instantiate(((Component)PickupObjectDatabase.GetById(565)).gameObject, Vector3.zero, Quaternion.identity); PickupObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.CanBeDropped = false; component.Pickup(player); } } } static GlassGenerator() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(GlassGenerator)); val.Name = "Glass Generator"; val.Description = "See The Use"; val.LongDescription = "Grants 2 Glass Guon Stones. While active, picking up any Module gives 2 (+1 per stack) Glass Guon Stones. Very slightly increases rate of fire per Glass Guon Stone."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("glassgen_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class TheSwarm : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("swarmer_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "The Swarm " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Greatly reduces damage.\nProjectiles gain massively increased lifetime,\npiercing and homing. (" + StaticColorHexes.AddColorToLabelString("+Bounces, Pierces and stronger Homing", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) if (!(Random.value > 0.01f)) { int num = 1; ProjectileData baseData = p.baseData; baseData.damage *= 0.25f; MaintainDamageOnPierce orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.damageMultOnPierce *= 1.05f; orAddComponent.AmountOfPiercesBeforeFalloff = 10 + num * 5; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.penetration += num + 1; ProjectileData baseData2 = p.baseData; baseData2.range *= 6f; ProjectileData baseData3 = p.baseData; baseData3.speed *= 0.6f; p.UpdateSpeed(); ImprovedAfterImage improvedAfterImage = ((Component)p).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0f, 0.3f, 1f, 1f); HomingModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent3.AngularVelocity = 360 + num * 120; orAddComponent3.HomingRadius = 10f + (float)num * 3.33f; } } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { printer.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)printer.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 0.2f; MaintainDamageOnPierce orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.damageMultOnPierce *= 1.05f; orAddComponent.AmountOfPiercesBeforeFalloff = 10 + num * 5; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.penetration += num + 1; ProjectileData baseData2 = p.baseData; baseData2.range *= 6f; ProjectileData baseData3 = p.baseData; baseData3.speed *= 0.6f; p.UpdateSpeed(); ImprovedAfterImage improvedAfterImage = ((Component)p).gameObject.AddComponent(); improvedAfterImage.spawnShadows = true; improvedAfterImage.shadowLifetime = 0.4f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.dashColor = new Color(0f, 0.3f, 1f, 1f); HomingModifier orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent3.AngularVelocity = 360 + num * 120; orAddComponent3.HomingRadius = 10f + (float)num * 3.33f; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } static TheSwarm() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TheSwarm)); val.Name = "The Swarm"; val.Description = "Devourer"; val.LongDescription = "Greatly reduces damage. Projectiles gain massively increased lifetime, piercing and homing. (+Bounces, Pierces and stronger Homing per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("swarmer_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PerfectReplica : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("perfectclone_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Perfect Replica" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Acts as 1 (" + StaticColorHexes.AddColorToLabelString("+1", StaticColorHexes.Light_Orange_Hex) + ") of every module currently active."; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddModuleTag(BaseModuleTags.GENERATION); defaultModule.AdditionalWeightMultiplier = 0.625f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); defaultModule.OverrideScrapCost = 25; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore printer, ModularGunController modularGunController, PlayerController player) { DoSort(printer, player); printer.OnAnyModuleObtained = (Action)Delegate.Combine(printer.OnAnyModuleObtained, new Action(OAMO)); printer.OnAnyModulePowered = (Action)Delegate.Combine(printer.OnAnyModulePowered, new Action(OAMP)); printer.OnAnyModuleUnpowered = (Action)Delegate.Combine(printer.OnAnyModuleUnpowered, new Action(OAMP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnAnyModuleObtained = (Action)Delegate.Remove(modulePrinter.OnAnyModuleObtained, new Action(OAMO)); modulePrinter.OnAnyModulePowered = (Action)Delegate.Remove(modulePrinter.OnAnyModulePowered, new Action(OAMP)); modulePrinter.OnAnyModuleUnpowered = (Action)Delegate.Remove(modulePrinter.OnAnyModuleUnpowered, new Action(OAMP)); for (int num = modulePrinter.ModuleContainers.Count - 1; num > -1; num--) { ModulePrinterCore.ModuleContainer moduleContainer = modulePrinter.ModuleContainers[num]; if (moduleContainer.LabelName != LabelName) { for (int i = 0; i < modulePrinter.ModuleContainers[num].FakeCount.Count; i++) { Tuple val = modulePrinter.ModuleContainers[num].FakeCount[i]; if (val.First == "PerfectReplication") { VFXStorage.DoFancyDestroyOfModules(modulePrinter.ModuleContainers[num].FakeCount[i].Second, player, moduleContainer.defaultModule); modulePrinter.ModuleContainers[num].FakeCount.RemoveAt(i); } } } } } public void OAMP(ModulePrinterCore modulePrinterCore, DefaultModule defaultModule, int a) { DoSort(modulePrinterCore, ((PassiveItem)modulePrinterCore).Owner); } public void OAMO(ModulePrinterCore modulePrinterCore, PlayerController player, DefaultModule defaultModule) { DoSort(modulePrinterCore, player); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { DoSort(modulePrinter, player); } public void DoSort(ModulePrinterCore modulePrinter, PlayerController player) { for (int num = modulePrinter.ModuleContainers.Count - 1; num > -1; num--) { bool flag = false; ModulePrinterCore.ModuleContainer moduleContainer = modulePrinter.ModuleContainers[num]; if (moduleContainer.LabelName != LabelName && moduleContainer.ActiveCount > 0) { for (int i = 0; i < modulePrinter.ModuleContainers[num].FakeCount.Count; i++) { Tuple val = modulePrinter.ModuleContainers[num].FakeCount[i]; if (val.First == "PerfectReplication") { flag = true; if (val.Second > ReturnStack(modulePrinter)) { VFXStorage.DoFancyDestroyOfModules(val.Second - ReturnStack(modulePrinter), player, moduleContainer.defaultModule); } else { VFXStorage.DoFancyFlashOfModules(ReturnStack(modulePrinter) - val.Second, player, moduleContainer.defaultModule); } val.Second = ReturnStack(modulePrinter); } } if (!flag) { moduleContainer.FakeCount.Add(new Tuple("PerfectReplication", ReturnStack(modulePrinter))); moduleContainer.defaultModule.OnAnyPickup(modulePrinter, modulePrinter.ModularGunController, player, IsTruePickup: false); VFXStorage.DoFancyFlashOfModules(ReturnStack(modulePrinter), player, moduleContainer.defaultModule); } } else if (moduleContainer.LabelName != LabelName && moduleContainer.ActiveCount == 0) { for (int j = 0; j < modulePrinter.ModuleContainers[num].FakeCount.Count; j++) { Tuple val2 = modulePrinter.ModuleContainers[num].FakeCount[j]; if (val2.First == "PerfectReplication") { VFXStorage.DoFancyDestroyOfModules(modulePrinter.ModuleContainers[num].FakeCount[j].Second, player, moduleContainer.defaultModule); modulePrinter.ModuleContainers[num].FakeCount.RemoveAt(j); } } } } } static PerfectReplica() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PerfectReplica)); val.Name = "Perfect Replica"; val.Description = "A Bit Broken"; val.LongDescription = "Acts as 1 (+1 per stack) of every module currently active."; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("perfectclone_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MinelayerSystem : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject Mine; public static ExplosionData data; public static void PostInit(PickupObject v) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("minelayer_t3_module_alt"); defaultModule.Tier = ModuleTier.Tier_3; defaultModule.LabelName = "Minelayer System " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Projectile damage reduced by 70%.\nIncreases fire rate by 33% and massively reduces spread.\nProjectiles now leave proximity mines on impact that\ntake 3 (" + StaticColorHexes.AddColorToLabelString("-33% hyperbollicaly", StaticColorHexes.Light_Orange_Hex) + ") seconds to prime\n and 1 second (" + StaticColorHexes.AddColorToLabelString("-25% hyperbolically") + ") to detonate.\n(" + StaticColorHexes.AddColorToLabelString("+Explosion Damage") + ")"; defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.yellow); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.375f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.9375f); Mine = BuildPrefab(); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.005f)) { ProjectileData baseData = p.baseData; baseData.damage *= 0.25f; ProjectileData baseData2 = p.baseData; baseData2.force *= 1.5f; p.OnDestruction += delegate(Projectile ONJ) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(Mine, Vector2.op_Implicit(((BraveBehaviour)ONJ).sprite.WorldCenter), Quaternion.identity); Vector3 val2 = Vector2Extensions.ToVector3ZUp(Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), 1f), 0f); Vector3 normalized = ((Vector3)(ref val2)).normalized; normalized *= (float)Random.Range(1, 4); DebrisObject orAddComponent = GameObjectExtensions.GetOrAddComponent(val); orAddComponent.additionalHeightBoost = 1.5f; orAddComponent.shouldUseSRBMotion = true; orAddComponent.angularVelocity = 0f; ((EphemeralObject)orAddComponent).Priority = (EphemeralPriority)0; ((BraveBehaviour)orAddComponent).sprite.UpdateZDepth(); orAddComponent.Trigger(Vector3Extensions.WithZ(normalized, 2f), 0.5f, 1f); CustomProximityMine component = ((Component)orAddComponent).gameObject.GetComponent(); component.Force_Disarm = true; ((BraveBehaviour)((BraveBehaviour)orAddComponent).sprite).renderer.material.SetFloat("_EmissiveColorPower", 0.1f); ((BraveBehaviour)((BraveBehaviour)orAddComponent).sprite).renderer.material.SetFloat("_EmissivePower", 0.1f); ((MonoBehaviour)orAddComponent).StartCoroutine(ArmTime(component, 1f)); }; } } public static GameObject BuildPrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown GameObject val = new GameObject("Mine"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); val.SetActive(false); val.AddComponent(); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material = val3; ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("mine_bounce_001")); tk2dSpriteAnimator val4 = val.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("MinelayerAnimation").GetComponent(); val4.Library.GetClipByName("start").frames[0].eventInfo = "BeepBoop"; val4.Library.GetClipByName("start").frames[0].triggerEvent = true; val4.Library.GetClipByName("boom").frames[0].eventInfo = "Kabloom"; val4.Library.GetClipByName("boom").frames[0].triggerEvent = true; AudioAnimatorListener val5 = val.AddComponent(); val5.animationAudioEvents = (ActorAudioEvent[])(object)new ActorAudioEvent[2] { new ActorAudioEvent { eventName = "Play_OBJ_mine_beep_01", eventTag = "BeepBoop" }, new ActorAudioEvent { eventName = "Play_OBJ_metroid_roll_01", eventTag = "Kabloom" } }; data = StaticExplosionDatas.CopyFields(StaticExplosionDatas.explosiveRoundsExplosion); data.damage = 15f; data.force = 0f; CustomProximityMine customProximityMine = new CustomProximityMine { explosionData = data, explosionStyle = CustomProximityMine.ExplosiveStyle.PROXIMITY, detectRadius = 2.25f, explosionDelay = 1f, usesCustomExplosionDelay = false, customExplosionDelay = 0.5f, explodeAnimName = "boom", idleAnimName = "start", MovesTowardEnemies = false, HomingTriggeredOnSynergy = false, HomingDelay = 3.25f, HomingRadius = 10f, HomingSpeed = 4f }; CustomProximityMine customProximityMine2 = SpriteBuilder.AddComponent(val, customProximityMine); return val; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); gunStatModifier = new ModuleGunStatModifier { FireRate_Process = ProcessFireRate, Accuracy_Process = ProcessAccuracy, ChargeSpeed_Process = ProcessFireRate }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public float ProcessFireRate(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 0.66f; } public float ProcessAccuracy(float f, ModulePrinterCore modulePrinterCore, ModularGunController modularGunController, PlayerController player) { return f * 0.33f; } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 0.3f; ProjectileData baseData2 = p.baseData; baseData2.force *= 1.5f; p.OnDestruction += delegate(Projectile ONJ) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(Mine, Vector2.op_Implicit(((BraveBehaviour)ONJ).sprite.WorldCenter), Quaternion.identity); Vector3 val2 = Vector2Extensions.ToVector3ZUp(Toolbox.GetUnitOnCircle(BraveUtility.RandomAngle(), 1f), 0f); Vector3 normalized = ((Vector3)(ref val2)).normalized; normalized *= (float)Random.Range(1, 4); DebrisObject orAddComponent = GameObjectExtensions.GetOrAddComponent(val); orAddComponent.additionalHeightBoost = 1.5f; orAddComponent.shouldUseSRBMotion = true; orAddComponent.angularVelocity = 0f; ((EphemeralObject)orAddComponent).Priority = (EphemeralPriority)0; ((BraveBehaviour)orAddComponent).sprite.UpdateZDepth(); orAddComponent.Trigger(Vector3Extensions.WithZ(normalized, 2f), 0.5f, 1f); CustomProximityMine component = ((Component)orAddComponent).gameObject.GetComponent(); component.Force_Disarm = true; ExplosionData val3 = StaticExplosionDatas.CopyFields(data); val3.damage = 10 + 5 * Stack(); component.explosionData = val3; ((BraveBehaviour)((BraveBehaviour)orAddComponent).sprite).renderer.material.SetFloat("_EmissiveColorPower", 0.1f); ((BraveBehaviour)((BraveBehaviour)orAddComponent).sprite).renderer.material.SetFloat("_EmissivePower", 0.1f); ((MonoBehaviour)orAddComponent).StartCoroutine(ArmTime(component, null)); }; } public IEnumerator ArmTime(CustomProximityMine mine, float? armTime) { float d1 = 3f; d1 /= 0.67f + 0.33f * (armTime ?? ((float)Stack())); float d3 = 1f; d3 /= 0.75f + 0.25f * (armTime ?? ((float)Stack())); mine.explosionDelay = d3; float e = 0f; while (e < d1) { e += BraveTime.DeltaTime; yield return null; } DebrisObject orAddComponent = ((Component)mine).GetComponent(); if (Object.op_Implicit((Object)(object)orAddComponent)) { Object.Destroy((Object)(object)orAddComponent); } AkSoundEngine.PostEvent("Play_BOSS_mineflayer_trigger_01", ((Component)mine).gameObject); mine.Force_Disarm = false; mine.explosionData.ignoreList = new List(); PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { mine.explosionData.ignoreList.Add(((BraveBehaviour)player).specRigidbody); } ((BraveBehaviour)((BraveBehaviour)mine).sprite).renderer.material.SetFloat("_EmissiveColorPower", 15f); ((BraveBehaviour)((BraveBehaviour)mine).sprite).renderer.material.SetFloat("_EmissivePower", 15f); Object.Destroy((Object)(object)((Component)mine).gameObject, 20f); } static MinelayerSystem() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MinelayerSystem)); val.Name = "Minelayer System"; val.Description = "Fortification Expert"; val.LongDescription = "Projectile damage reduced by 70%. Increases fire rate by 33% and massively reduces spread. Projectiles now leave proximity mines on impact that take 3 (-33% hyperbolically per stack) seconds to prime, and take 1 second (-25% hyperbolically per stack) to detonate. (+Explosion Damage per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T3_Collection; val.ManualSpriteID = StaticCollections.Module_T3_Collection.GetSpriteIdByName("minelayer_t3_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class ReactiveSensors : DefaultModule { public enum State { Active, EnteredCharged, Inactive, NOLLA } public static ItemTemplate template; public static int ID; public static GameObject BatteryObject; private HeatIndicatorController ring; public GameObject extantBattery; public State currentState = State.NOLLA; public float RechargeTime; public static void PostInit(PickupObject v) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("reactiveshanner_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Reactive Sensors" + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "If an enemy gets too close, release a massive shockwave\nthat stuns, pushes and damages enemies\nin a large radius.(" + StaticColorHexes.AddColorToLabelString("+Damage, Push Force and Detection Range", StaticColorHexes.Light_Orange_Hex) + ")\nCan deflect enemy projectiles.\nRecharges every 15 seconds."; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.EnergyConsumption = 1f; defaultModule.AdditionalWeightMultiplier = 0.85f; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AddModuleTag(BaseModuleTags.RETALIATION); defaultModule.AddModuleTag(BaseModuleTags.DEFENSIVE); defaultModule.AddToGlobalStorage(); GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("battery_charge_006")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("BatteryAnimation").GetComponent(); BatteryObject = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnFrameUpdate = (Action)Delegate.Combine(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnRoomCleared = (Action)Delegate.Combine(modulePrinter.OnRoomCleared, new Action(ORC)); ((MonoBehaviour)player).StartCoroutine(EnterCharge(player)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { ProcessRing(player, SetActive: false); modulePrinter.OnFrameUpdate = (Action)Delegate.Remove(modulePrinter.OnFrameUpdate, new Action(OFU)); modulePrinter.OnRoomCleared = (Action)Delegate.Remove(modulePrinter.OnRoomCleared, new Action(ORC)); if ((Object)(object)extantBattery != (Object)null) { AkSoundEngine.PostEvent("Play_BOSS_lasthuman_torch_01", ((Component)player).gameObject); extantBattery.GetComponent().PlayAndDestroyObject("finish", (Action)null); extantBattery = null; } } public void ORC(ModulePrinterCore modulePrinter, PlayerController player, RoomHandler room) { currentState = State.EnteredCharged; RechargeTime = 16f; ProcessRing(player); if ((Object)(object)extantBattery != (Object)null) { AkSoundEngine.PostEvent("Play_BOSS_lasthuman_torch_01", ((Component)player).gameObject); extantBattery.GetComponent().PlayAndDestroyObject("finish", (Action)null); extantBattery = null; } } public float ReturnRange(ModulePrinterCore core) { return 4f + (float)ReturnStack(core); } public void OFU(ModulePrinterCore modulePrinter, PlayerController player) { //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) if (currentState == State.Active) { return; } if (RechargeTime < 15f) { RechargeTime += BraveTime.DeltaTime; return; } if (currentState != State.EnteredCharged) { currentState = State.EnteredCharged; extantBattery.GetComponent().PlayAndDestroyObject("finish", (Action)null); extantBattery = null; AkSoundEngine.PostEvent("Play_BOSS_lasthuman_torch_01", ((Component)player).gameObject); ProcessRing(player); extantBattery = null; } if (player.CurrentRoom == null) { return; } List activeEnemies = player.CurrentRoom.GetActiveEnemies((ActiveEnemyType)1); if (activeEnemies == null || activeEnemies.Count == 0) { return; } foreach (AIActor item in activeEnemies) { if (Object.op_Implicit((Object)(object)item) && Vector2.Distance(((BraveBehaviour)item).sprite.WorldCenter, ((BraveBehaviour)player).sprite.WorldCenter) < ReturnRange(modulePrinter) + 0.25f) { currentState = State.Active; ProcessRing(player, SetActive: false); ((MonoBehaviour)player).StartCoroutine(KABOOM(modulePrinter, player)); RechargeTime = 0f; } } } private void ProcessRing(PlayerController player, bool SetActive = true) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ring == (Object)null) { ring = ((GameObject)Object.Instantiate(ResourceCache.Acquire("Global VFX/HeatIndicator"), ((BraveBehaviour)player).transform.position, Quaternion.identity, ((BraveBehaviour)player).transform)).GetComponent(); ring.CurrentRadius = ReturnRange(Stored_Core); ring.CurrentColor = Vector3Extensions.WithAlpha(new Color(20f, 255f, 152f), 0.02f); ring.IsFire = false; ((Renderer)((Component)ring).GetComponent()).material.SetFloat("_PxWidth", 0.1f); ((Component)ring).transform.position = Vector2Extensions.ToVector3ZUp(((BraveBehaviour)player).sprite.WorldCenter, 100f); } ((MonoBehaviour)ring).StartCoroutine(DoRingLerp(ring, SetActive ? 4 : 0, !SetActive)); } public IEnumerator DoRingLerp(HeatIndicatorController a, float to, bool Destroys = false) { float e = 0f; float afafaffa = a.CurrentRadius; while (e < 1f) { if ((Object)(object)a == (Object)null) { yield break; } e += BraveTime.DeltaTime; a.CurrentRadius = Mathf.Lerp(afafaffa, to, Toolbox.SinLerpTValue(e)); yield return null; } if (Destroys) { Object.Destroy((Object)(object)((Component)a).gameObject); } } public IEnumerator KABOOM(ModulePrinterCore modulePrinterCore, PlayerController player) { int stack = ReturnStack(modulePrinterCore); float e = 0f; AkSoundEngine.PostEvent("Play_BOSS_omegaBeam_charge_01", ((Component)player).gameObject); while (e < 1.5f) { e += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_BOSS_RatMech_Stomp_01", ((Component)player).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)player).sprite.WorldBottomCenter * ConfigManager.DistortionWaveMultiplier, 20f * ConfigManager.DistortionWaveMultiplier, 0.125f, 8f, 0.2f); for (int I = 0; I < 240; I++) { GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), Vector2.op_Implicit(Toolbox.GetUnitOnCircle((float)I * 1.5f, Random.Range(1.1f, 6f) * 3f)), (float?)null, (float?)0.9f, (Color?)null, (SparksType)2); } Exploder.DoRadialPush(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (float)(60 * stack), 8f); Exploder.DoRadialKnockback(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), (float)(60 * stack), 8f); Exploder.DoRadialMinorBreakableBreak(Vector2.op_Implicit(((BraveBehaviour)player).sprite.WorldCenter), 8f); ApplyActionToNearbyEnemies(modulePrinterCore, ((BraveBehaviour)player).sprite.WorldCenter, 8f, player.CurrentRoom); foreach (Projectile proj in StaticReferenceManager.AllProjectiles) { if ((Object)(object)proj != (Object)null) { GameActor owner = proj.Owner; AIActor enemy = (AIActor)(object)((owner is AIActor) ? owner : null); if ((Object)(object)((Component)proj).GetComponent() == (Object)null && Vector2.Distance(Object.op_Implicit((Object)(object)((BraveBehaviour)proj).sprite) ? ((BraveBehaviour)proj).sprite.WorldCenter : TransformExtensions.PositionVector2(((BraveBehaviour)proj).transform), ((BraveBehaviour)player).sprite.WorldCenter) < 8f && (Object)(object)proj.Owner != (Object)null && (Object)(object)proj.Owner == (Object)(object)enemy) { GameActor gameActor = ((BraveBehaviour)player).gameActor; ProjectileData baseData = proj.baseData; FistReflectBullet(proj, gameActor, baseData.speed *= 2f, Vector2Extensions.ToAngle(((BraveBehaviour)proj).sprite.WorldCenter - TransformExtensions.PositionVector2(((BraveBehaviour)player).transform)), 1f, proj.IsBlackBullet ? ((5f + proj.baseData.speed) * 2f) : (5f + proj.baseData.speed)); } } } ((MonoBehaviour)player).StartCoroutine(EnterCharge(player)); } public static void FistReflectBullet(Projectile p, GameActor newOwner, float minReflectedBulletSpeed, float ReflectAngle, float scaleModifier = 1f, float damageModifier = 10f, float spread = 0f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_003e: Unknown result type (might be due to invalid IL or missing references) p.RemoveBulletScriptControl(); Vector2 unitOnCircle = Toolbox.GetUnitOnCircle(ReflectAngle, 1f); p.Direction = unitOnCircle; if (spread != 0f) { p.Direction = Vector2Extensions.Rotate(p.Direction, Random.Range(0f - spread, spread)); } if (Object.op_Implicit((Object)(object)p.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)p.Owner).specRigidbody)) { ((BraveBehaviour)p).specRigidbody.DeregisterSpecificCollisionException(((BraveBehaviour)p.Owner).specRigidbody); } p.Owner = newOwner; p.SetNewShooter(((BraveBehaviour)newOwner).specRigidbody); p.allowSelfShooting = false; if (newOwner is AIActor) { p.collidesWithPlayer = true; p.collidesWithEnemies = false; } else { p.collidesWithPlayer = false; p.collidesWithEnemies = true; } if (scaleModifier != 1f) { SpawnManager.PoolManager.Remove(((BraveBehaviour)p).transform); p.RuntimeUpdateScale(scaleModifier); } if (p.Speed < minReflectedBulletSpeed) { p.Speed = minReflectedBulletSpeed; } if (p.baseData.damage < ProjectileData.FixedFallbackDamageToEnemies) { p.baseData.damage = ProjectileData.FixedFallbackDamageToEnemies; } p.baseData.damage = damageModifier; p.UpdateCollisionMask(); p.ResetDistance(); p.Reflected(); } public void ApplyActionToNearbyEnemies(ModulePrinterCore modulePrinterCore, Vector2 position, float radius, RoomHandler room) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); List list = new List(); float num2 = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (!Object.op_Implicit((Object)(object)room.activeEnemies[i])) { continue; } AIActor val = room.activeEnemies[i]; bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num2; } if (flag) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)val).behaviorSpeculator) && !((BraveBehaviour)val).behaviorSpeculator.ImmuneToStun) { ((BraveBehaviour)val).behaviorSpeculator.Stun(1.5f, true); } ((BraveBehaviour)val).healthHaver.ApplyDamage((float)(90 * num), TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), "Vent", (CoreDamageTypes)4, (DamageCategory)0, false, (PixelCollider)null, false); } } } public IEnumerator EnterCharge(PlayerController player) { if ((Object)(object)extantBattery != (Object)null) { Object.Destroy((Object)(object)extantBattery); } GameObject eaextantBattery = ((GameActor)player).PlayEffectOnActor(BatteryObject, new Vector3(2f, 0f), true, false, false); eaextantBattery.GetComponent().PlayAndDestroyObject("docharge", (Action)null); extantBattery = eaextantBattery; currentState = State.Inactive; yield break; } static ReactiveSensors() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ReactiveSensors)); val.Name = "Reactive Sensors"; val.Description = "Get In, Get Out"; val.LongDescription = "If an enemy gets too close, release a massive shockwave that stuns, pushes and damages enemies in a large redius (+Damage, Push Force and Detection Range per stack). Can deflect enemy projectiles within a small radius. Recharges every 15 seconds."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("reactiveshanner_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class PerfectionistMomentum : DefaultModule { public static ItemTemplate template; public static GameObject MomentumPlusObject; public static int ID; public int RoomPerfectCount = 0; public int RoomPerfectCountCap = 10; public static void PostInit(PickupObject v) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("perfectmomentum_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Perfectionist Momentum " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Grants a 5% Fire Rate and Damage boost for\nevery room cleared without taking damage,\ncapped at 10 (" + StaticColorHexes.AddColorToLabelString("+10", StaticColorHexes.Light_Orange_Hex) + ") boosts.\n" + StaticColorHexes.AddColorToLabelString("Damage and Fire Rate boosts reset when you take damage.", StaticColorHexes.Dark_Red_Hex); defaultModule.AddModuleTag(BaseModuleTags.CONDITIONAL); defaultModule.AdditionalWeightMultiplier = 0.8f; defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); GameObject val = new GameObject("VFX"); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val2).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material.SetFloat("_EmissiveColorPower", 10f); ((tk2dBaseSprite)val2).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("momentumplus_004")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("MomentumPlusAnimation").GetComponent(); MomentumPlusObject = val; ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnRoomCleared = (Action)Delegate.Combine(modulePrinter.OnRoomCleared, new Action(ORC)); modulePrinter.OnDamaged = (Action)Delegate.Combine(modulePrinter.OnDamaged, new Action(OnDamaged)); gunStatModifier = new ModuleGunStatModifier { Name = "Momentum", FireRate_Process = PFR, ChargeSpeed_Process = PFR }; modulePrinter.ProcessGunStatModifier(gunStatModifier); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); modulePrinter.OnRoomCleared = (Action)Delegate.Remove(modulePrinter.OnRoomCleared, new Action(ORC)); modulePrinter.OnDamaged = (Action)Delegate.Remove(modulePrinter.OnDamaged, new Action(OnDamaged)); modulePrinter.RemoveGunStatModifier(gunStatModifier); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { RoomPerfectCountCap = 10 * ReturnStack(modulePrinter); } public float PFR(float f, ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { return f - (f - f / (1f + 0.05f * (float)RoomPerfectCount)); } public void ORC(ModulePrinterCore modulePrinterCore, PlayerController player, RoomHandler room) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!room.PlayerHasTakenDamageInThisRoom && RoomPerfectCount < RoomPerfectCountCap) { GameObject val = ((GameActor)player).PlayEffectOnActor(MomentumPlusObject, new Vector3(0f, 2.25f), true, false, false); val.GetComponent().PlayAndDestroyObject("start", (Action)null); AkSoundEngine.PostEvent("Play_BOSS_energy_shield_01", ((Component)player).gameObject); modulePrinterCore.ModularGunController.ProcessStats(); RoomPerfectCount++; } } public void OnDamaged(ModulePrinterCore modulePrinterCore, PlayerController player) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (RoomPerfectCount != 0 && player.IsInCombat) { modulePrinterCore.ModularGunController.ProcessStats(); GameObject val = ((GameActor)player).PlayEffectOnActor(MomentumPlusObject, new Vector3(0f, 2.25f), true, false, false); AkSoundEngine.PostEvent("Play_BOSS_RatPunchout_Lash_01", ((Component)player).gameObject); val.GetComponent().PlayAndDestroyObject("break", (Action)null); RoomPerfectCount = 0; } } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.05f * (float)RoomPerfectCount; ProjectileData baseData2 = p.baseData; baseData2.force *= 1f + 0.0333f * (float)RoomPerfectCount; } static PerfectionistMomentum() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(PerfectionistMomentum)); val.Name = "Perfectionist Momentum"; val.Description = "Keeping It Up"; val.LongDescription = "Grants a 5% Fire rate and Damage boost for every room cleared without taking damage, capped at 10 (+10 per stack) boosts. Damage and Fire Rate boosts reset when you take damage."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("perfectmomentum_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class LineUp : DefaultModule { public static ItemTemplate template; public static int ID; public static GameObject PierceImpact; public static void PostInit(PickupObject v) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("lineup_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Line Up " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Adds 1 Pierce, reduce damage by 25% (" + StaticColorHexes.AddColorToLabelString("-25% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")\n" + StaticColorHexes.AddColorToLabelString("But", StaticColorHexes.Dark_Red_Hex) + " each enemy pierced increases\nprojectile damage by 1.5x (" + StaticColorHexes.AddColorToLabelString("+0.5x", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(545); PierceImpact = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.03f)) { int num = 1; ProjectileData baseData = p.baseData; baseData.damage *= 1f - (1f - 1f / (1f + 0.2f * (float)num)); MaintainDamageOnPierce orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.damageMultOnPierce = 1f + 0.5f * (float)num; orAddComponent.AmountOfPiercesBeforeFalloff = 2 + num; orAddComponent.OnPierce = (Action)Delegate.Combine(orAddComponent.OnPierce, new Action(OP)); ProjectileData baseData2 = p.baseData; baseData2.range += 3f; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.penetration += num * 2; } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f - (1f - 1f / (1f + 0.25f * (float)num)); MaintainDamageOnPierce orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.damageMultOnPierce = 1f + 0.5f * (float)num; orAddComponent.AmountOfPiercesBeforeFalloff = 2 + num; orAddComponent.OnPierce = (Action)Delegate.Combine(orAddComponent.OnPierce, new Action(OP)); ProjectileData baseData2 = p.baseData; baseData2.range += 3f; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent2.penetration += num * 2; } public void OP(Projectile p, SpeculativeRigidbody speculativeRigidbody) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.DoVisualEffect) { GameObject val = Object.Instantiate(PierceImpact, Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter - new Vector2(1.5f, 0f)), Quaternion.identity); Object.Destroy((Object)(object)val, 2f); } } static LineUp() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(LineUp)); val.Name = "Line Up"; val.Description = "Knock 'Em Down"; val.LongDescription = "Adds 2 Pierces, reduce damage by 25% (-25% per stack hyperbolically) But each enemy pierced increases projectile damage by 1.5x (+0.5x per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("lineup_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MercyRounds : DefaultModule { public static ItemTemplate template; public static int ID; public int stack = 0; public static void PostInit(PickupObject v) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("mercybullets_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Mercy Rounds " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Deal an additional 40% (" + StaticColorHexes.AddColorToLabelString("+40%", StaticColorHexes.Light_Orange_Hex) + ")\nmore damage to enemies for each\nbuff or debuff they have.\nEnemies directly slain by you spread\ntheir debuffs to nearby enemies."; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddToGlobalStorage(); defaultModule.AdditionalWeightMultiplier = 0.8f; AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if (!(Random.value > 0.1f)) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); p.OnHitEnemy = (Action)Delegate.Combine(p.OnHitEnemy, new Action(OHE)); p.OnWillKillEnemy = (Action)Delegate.Combine(p.OnWillKillEnemy, new Action(WillKill)); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool truePickup) { stack = ReturnStack(modulePrinter); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown SpeculativeRigidbody specRigidbody = ((BraveBehaviour)p).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OPC)); p.OnHitEnemy = (Action)Delegate.Combine(p.OnHitEnemy, new Action(OHE)); p.OnWillKillEnemy = (Action)Delegate.Combine(p.OnWillKillEnemy, new Action(WillKill)); } public void WillKill(Projectile projectile, SpeculativeRigidbody body) { //IL_008a: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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) if (!Object.op_Implicit((Object)(object)((BraveBehaviour)body).aiActor)) { return; } AIActor aiActor = ((BraveBehaviour)body).aiActor; foreach (GameActorEffect activeEffect in ((GameActor)aiActor).m_activeEffects) { List activeEnemies = ((DungeonPlaceableBehaviour)aiActor).GetAbsoluteParentRoom().activeEnemies; if (DebuffStatics.BlacklistedEffects.Contains(activeEffect.effectIdentifier)) { continue; } foreach (AIActor item in activeEnemies) { if ((Object)(object)item != (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(((BraveBehaviour)item).transform), TransformExtensions.PositionVector2(((BraveBehaviour)aiActor).transform)) < 3.5f) { ((GameActor)item).ApplyEffect(activeEffect, 1f, (Projectile)null); if (ConfigManager.DoVisualEffect) { GameObject val = Object.Instantiate(PatientZero.PoisonPoof, Vector2.op_Implicit(((BraveBehaviour)item).sprite.WorldCenter), Quaternion.identity); Transform transform = val.transform; transform.localScale *= 0.6f; Object.Destroy((Object)(object)val, 3f); } } } } } public void OHE(Projectile projectile, SpeculativeRigidbody body, bool fatal) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)body).aiActor != (Object)null && ((GameActor)((BraveBehaviour)body).aiActor).m_activeEffects.Count() > 0 && ConfigManager.DoVisualEffect) { GameObject val = Object.Instantiate(VFXStorage.MachoBraceBurstVFX, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)body).aiActor).sprite.WorldCenter - new Vector2(1.5f, 0f)), Quaternion.identity); Transform transform = val.transform; transform.localScale *= 0.6f; Object.Destroy((Object)(object)val, 2f); } } public void OPC(SpeculativeRigidbody mR, PixelCollider mP, SpeculativeRigidbody oR, PixelCollider oP) { if ((Object)(object)((BraveBehaviour)oR).aiActor != (Object)null && (Object)(object)oR != (Object)null && (Object)(object)((BraveBehaviour)oR).healthHaver != (Object)null && (Object)(object)((BraveBehaviour)mR).projectile != (Object)null) { float damage = ((BraveBehaviour)mR).projectile.baseData.damage; ProjectileData baseData = ((BraveBehaviour)mR).projectile.baseData; baseData.damage *= 1f + 0.4f * (float)stack * (float)((GameActor)((BraveBehaviour)oR).aiActor).m_activeEffects.Count(); ((MonoBehaviour)((BraveBehaviour)mR).projectile).StartCoroutine(FrameDelay(((BraveBehaviour)mR).projectile, damage)); } } public IEnumerator FrameDelay(Projectile p, float DmG) { yield return null; p.baseData.damage = DmG; } static MercyRounds() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MercyRounds)); val.Name = "Mercy Rounds"; val.Description = "Hits The Sick Harder"; val.LongDescription = "Deal an additional 40% (+40% per stack) more damage to enemies for each buff or debuff they have. Enemies directly slain by you spread their debuffs to nearby enemies."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("mercybullets_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class MirroredSoftware : DefaultModule { public static ItemTemplate template; public static int ID; public ModulePrinterCore.ModuleContainer containerSelected = null; private ModulePrinterCore.ModuleContainer cachedContainerSelected = null; public static void PostInit(PickupObject v) { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("mirrored_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Mirrored Software " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Acts as 2 (" + StaticColorHexes.AddColorToLabelString("+2", StaticColorHexes.Light_Orange_Hex) + ") copies of\na random " + StaticColorHexes.AddColorToLabelString("active", StaticColorHexes.Light_Green_Hex) + " module.\nSwitches on every floor."; defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddModuleTag(BaseModuleTags.GENERATION); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); defaultModule.EnergyConsumption = 1f; defaultModule.AddToGlobalStorage(); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { DoSelect(modulePrinter, player); modulePrinter.OnNewFloorStarted = (Action)Delegate.Combine(modulePrinter.OnNewFloorStarted, new Action(ONFS)); modulePrinter.OnAnyModulePowered = (Action)Delegate.Combine(modulePrinter.OnAnyModulePowered, new Action(OAMP)); modulePrinter.OnAnyModuleUnpowered = (Action)Delegate.Combine(modulePrinter.OnAnyModuleUnpowered, new Action(OAMP)); } public void OAMP(ModulePrinterCore modulePrinter, DefaultModule player, int i) { DoSelect(modulePrinter, ((PassiveItem)modulePrinter).Owner); } public override void OnAnyPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player, bool IsTruePickup) { if (containerSelected == null) { return; } IEnumerable> source = containerSelected.FakeCount.Where((Tuple self) => self.First == "Mirror"); if (source.Count() > 0) { int second = source.First().Second; source.First().Second = ReturnStack(modulePrinter) * 2; containerSelected.defaultModule.OnAnyPickup(modulePrinter, modulePrinter.ModularGunController, player, IsTruePickup: false); if (second < source.First().Second) { AkSoundEngine.PostEvent("Play_ITM_Macho_Brace_Active_01", ((Component)player).gameObject); VFXStorage.DoFancyFlashOfModules(ReturnStack(modulePrinter) * 2 - second, ((PassiveItem)modulePrinter).Owner, containerSelected.defaultModule); } else if (second > source.First().Second) { VFXStorage.DoFancyDestroyOfModules(second - ReturnStack(modulePrinter) * 2, ((PassiveItem)modulePrinter).Owner, containerSelected.defaultModule); } } } public void ONFS(ModulePrinterCore modulePrinter, PlayerController player) { ORC(modulePrinter, player); containerSelected = null; cachedContainerSelected = null; DoSelect(modulePrinter, player); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { ORC(modulePrinter, player); containerSelected = null; modulePrinter.OnNewFloorStarted = (Action)Delegate.Remove(modulePrinter.OnNewFloorStarted, new Action(ONFS)); modulePrinter.OnAnyModulePowered = (Action)Delegate.Remove(modulePrinter.OnAnyModulePowered, new Action(OAMP)); modulePrinter.OnAnyModuleUnpowered = (Action)Delegate.Remove(modulePrinter.OnAnyModuleUnpowered, new Action(OAMP)); } public void DoSelect(ModulePrinterCore printer, PlayerController player) { if (containerSelected != null) { OnAnyPickup(printer, null, player, IsTruePickup: false); return; } if (cachedContainerSelected != null) { containerSelected = cachedContainerSelected; Tuple item = new Tuple("Mirror", ReturnStack(printer) * 2); containerSelected.FakeCount.Add(item); containerSelected.defaultModule.OnAnyPickup(printer, printer.ModularGunController, player, IsTruePickup: false); return; } int num = 5; bool flag = false; while (!flag && num > 0) { IEnumerable source = printer.ModuleContainers.Where((ModulePrinterCore.ModuleContainer self) => self.ActiveCount > 0 && self.LabelName != LabelName); if (source.Count() > 0) { ModulePrinterCore.ModuleContainer moduleContainer = BraveUtility.RandomElement(source.ToList()); if (moduleContainer.LabelName != LabelName) { flag = !flag; containerSelected = moduleContainer; cachedContainerSelected = moduleContainer; moduleContainer.FakeCount.Add(new Tuple("Mirror", ReturnStack(printer) * 2)); moduleContainer.defaultModule.OnAnyPickup(printer, printer.ModularGunController, player, IsTruePickup: false); AkSoundEngine.PostEvent("Play_ITM_Macho_Brace_Active_01", ((Component)player).gameObject); VFXStorage.DoFancyFlashOfModules(ReturnStack(printer) * 2, ((PassiveItem)printer).Owner, moduleContainer.defaultModule); } else { num--; } } else { num--; } } } public void ORC(ModulePrinterCore printer, PlayerController player) { if (containerSelected == null) { return; } for (int i = 0; i < containerSelected.FakeCount.Count; i++) { Tuple val = containerSelected.FakeCount[i]; if (val.First == "Mirror") { int second = containerSelected.FakeCount[i].Second; VFXStorage.DoFancyDestroyOfModules(second, ((PassiveItem)printer).Owner, containerSelected.defaultModule); containerSelected.FakeCount.Remove(containerSelected.FakeCount[i]); containerSelected.defaultModule.OnAnyPickup(printer, printer.ModularGunController, player, IsTruePickup: false); break; } } } static MirroredSoftware() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(MirroredSoftware)); val.Name = "Mirrored Software"; val.Description = "I'm You, Two"; val.LongDescription = "Acts as 2 (+2 per stack) copies of a random active module. Switches on every floor."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("mirrored_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class ImpactPower : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("impactpower_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Impact Power " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Adds 2 Bounces, reduce damage by 25% (" + StaticColorHexes.AddColorToLabelString("-25% hyperbolically", StaticColorHexes.Light_Orange_Hex) + ")\n" + StaticColorHexes.AddColorToLabelString("But", StaticColorHexes.Dark_Red_Hex) + " each bounce increases damage by 1.5x " + StaticColorHexes.AddColorToLabelString("+0.5x", StaticColorHexes.Light_Orange_Hex) + "."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.TRADE_OFF); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.01f)) { int num = 1; BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces += num * 2; orAddComponent.damageMultiplierOnBounce *= 1f + 0.5f * (float)num; orAddComponent.OnBounceContext = (Action)Delegate.Combine(orAddComponent.OnBounceContext, new Action(OBC)); ProjectileData baseData = p.baseData; baseData.damage *= 1f - (1f - 1f / (1f + 0.2f * (float)num)); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)p).gameObject); orAddComponent.numberOfBounces += num * 2; orAddComponent.damageMultiplierOnBounce *= 1f + 0.5f * (float)num; orAddComponent.OnBounceContext = (Action)Delegate.Combine(orAddComponent.OnBounceContext, new Action(OBC)); ProjectileData baseData = p.baseData; baseData.damage *= 1f - (1f - 1f / (1f + 0.25f * (float)num)); } public void OBC(BounceProjModifier self, SpeculativeRigidbody body) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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) if (ConfigManager.DoVisualEffect) { GameObject val = Object.Instantiate(VFXStorage.MachoBraceDustupVFX, Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)self).projectile).sprite.WorldCenter), Quaternion.identity); Transform transform = val.transform; transform.localPosition -= new Vector3(1.25f, 1.25f); Object.Destroy((Object)(object)val, 2f); } } static ImpactPower() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(ImpactPower)); val.Name = "Impact Power"; val.Description = "Know Where To Go"; val.LongDescription = "Adds 2 Bounces, reduce damage by 25% (-25% per stack hyperbolically) But each bounce increases damage by 1.5x (+0.5x per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("impactpower_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class LightningNets : DefaultModule { public static ItemTemplate template; public static int ID; public static List allactiveTetherProjectiles; public static void PostInit(PickupObject v) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("voltaicrounds_t2_module_alt"); defaultModule.Tier = ModuleTier.Tier_2; defaultModule.LabelName = "Lightning Nets " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Your projectiles are now tethered with electricity\n(" + StaticColorHexes.AddColorToLabelString("+Tether Range and Damage", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.DAMAGE_OVER_TIME); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.green); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.25f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; ModulePrinterCore.ModifyForChanceBullets = (Action)Delegate.Combine(ModulePrinterCore.ModifyForChanceBullets, new Action(defaultModule.ChanceBulletsModify)); } public override void ChanceBulletsModify(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player) { if (!(Random.value > 0.12f)) { int num = 1; ElectricChainProjectile electricChainProjectile = ((Component)p).gameObject.AddComponent(); electricChainProjectile.Damage = Mathf.Max(0.5f, p.baseData.damage * 0.4f); electricChainProjectile.Range = 2f + 3f * (float)num; electricChainProjectile.player = player; electricChainProjectile.projectile = ((Component)p).gameObject; ProjectileData baseData = p.baseData; baseData.range += 6.5f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 0.75f; p.UpdateSpeed(); } } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ElectricChainProjectile electricChainProjectile = ((Component)p).gameObject.AddComponent(); electricChainProjectile.Damage = Mathf.Max(0.5f, p.baseData.damage * 0.4f); electricChainProjectile.Range = 2f + 3f * (float)num; electricChainProjectile.player = player; electricChainProjectile.projectile = ((Component)p).gameObject; ProjectileData baseData = p.baseData; baseData.range += 6.5f; ProjectileData baseData2 = p.baseData; baseData2.speed *= 0.75f; p.UpdateSpeed(); } static LightningNets() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(LightningNets)); val.Name = "Lightning Nets"; val.Description = "Nicola Would Be Proud"; val.LongDescription = "Your projectiles are now tethered with electricity (+Tether Range and Damage per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T2_Collection; val.ManualSpriteID = StaticCollections.Module_T2_Collection.GetSpriteIdByName("voltaicrounds_t2_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; allactiveTetherProjectiles = new List(); } } public class ElectricChainProjectile : MonoBehaviour { private Dictionary ExtantTethers = new Dictionary(); private float Tick = 0.333f; private float Elapsed = 0f; private float Elapsed_ForceKill = 0f; private HashSet m_damagedEnemies = new HashSet(); private HashSet m_damagedEnemies_AOE = new HashSet(); public float Range = 3.5f; public float Damage; public PlayerController player; public GameObject projectile; public void Start() { LightningNets.allactiveTetherProjectiles.Add(this); } public void Update() { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) Elapsed += BraveTime.DeltaTime; if ((Object)(object)projectile != (Object)null) { List allactiveTetherProjectiles = LightningNets.allactiveTetherProjectiles; if (allactiveTetherProjectiles != null && allactiveTetherProjectiles.Count > 0) { foreach (ElectricChainProjectile item in allactiveTetherProjectiles) { if (ExtantTethers.Count > 2) { GameObject val = ReturnLongestDistance(Range); if ((Object)(object)val != (Object)null) { ExtantTethers.Remove(MathsAndLogicHelper.KeyByValue(ExtantTethers, val)); SpawnManager.Despawn(val); } } if ((Object)(object)item != (Object)null && ExtantTethers.Count < 3 && Vector2.Distance(TransformExtensions.PositionVector2(((Component)item).gameObject.transform), projectile.GetComponentInChildren().WorldCenter) < Range && (Object)(object)((Component)item).gameObject.GetComponent() != (Object)null && (Object)(object)item != (Object)(object)projectile && !ExtantTethers.ContainsKey(((Component)item).gameObject) && !((Component)item).gameObject.GetComponent().ExtantTethers.ContainsKey(((Component)item).gameObject)) { GameObject gameObject = ((Component)SpawnManager.SpawnVFX(VFXStorage.FriendlyElectricLinkVFX, false).GetComponent()).gameObject; ExtantTethers.Add(((Component)item).gameObject, gameObject); } if ((Object)(object)item != (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(((Component)item).transform), projectile.GetComponentInChildren().WorldCenter) > Range && ExtantTethers.ContainsKey(((Component)item).gameObject)) { ExtantTethers.TryGetValue(((Component)item).gameObject, out var value); SpawnManager.Despawn(value); ExtantTethers.Remove(((Component)item).gameObject); } } } } else { Elapsed_ForceKill += BraveTime.DeltaTime; if (Elapsed_ForceKill >= 30f) { Object.Destroy((Object)(object)this); } } foreach (KeyValuePair extantTether in ExtantTethers) { if (Object.op_Implicit((Object)(object)projectile) && (Object)(object)extantTether.Value != (Object)null && (Object)(object)extantTether.Key != (Object)null) { UpdateLink(projectile, extantTether.Value.GetComponent(), extantTether.Key, (Elapsed > Tick) ? true : false); } if ((Object)(object)extantTether.Key != (Object)null && (Object)(object)extantTether.Value != (Object)null && (Object)(object)projectile == (Object)null) { SpawnManager.Despawn(extantTether.Value.gameObject); ExtantTethers.Remove(extantTether.Key); break; } if ((Object)(object)extantTether.Key == (Object)null && (Object)(object)extantTether.Value != (Object)null) { SpawnManager.Despawn(extantTether.Value.gameObject); ExtantTethers.Remove(extantTether.Key); break; } } } public GameObject ReturnLongestDistance(float h) { //IL_005e: 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) List list = new List(); Dictionary dictionary = new Dictionary(); for (int num = ExtantTethers.Count - 1; num > -1; num--) { KeyValuePair keyValuePair = ExtantTethers.ElementAt(num); if (Object.op_Implicit((Object)(object)keyValuePair.Key) && Object.op_Implicit((Object)(object)keyValuePair.Value)) { float num2 = Vector2.Distance(TransformExtensions.PositionVector2(keyValuePair.Key.transform), TransformExtensions.PositionVector2(keyValuePair.Value.transform)); if (!dictionary.ContainsKey(num2)) { dictionary.Add(num2, keyValuePair.Value); list.Add(num2); } } } list.Sort(); if ((list == null) | (list.Count() == 0)) { return null; } return (h > list.Last()) ? null : dictionary[list.Last()]; } public void OnDestroy() { foreach (KeyValuePair extantTether in ExtantTethers) { if ((Object)(object)extantTether.Value != (Object)null) { SpawnManager.Despawn(extantTether.Value.gameObject); } } ExtantTethers.Clear(); if (LightningNets.allactiveTetherProjectiles.Contains(this)) { LightningNets.allactiveTetherProjectiles.Remove(this); } } private void UpdateLink(GameObject target, tk2dTiledSprite m_extantLink, GameObject actor, bool Damages) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) Vector2 worldCenter = ((tk2dBaseSprite)actor.GetComponentInChildren()).WorldCenter; Vector2 worldCenter2 = ((tk2dBaseSprite)target.GetComponentInChildren()).WorldCenter; ((BraveBehaviour)m_extantLink).transform.position = Vector2.op_Implicit(worldCenter); Vector2 val = worldCenter2 - worldCenter; float num = BraveMathCollege.Atan2Degrees(((Vector2)(ref val)).normalized); int num2 = Mathf.RoundToInt(((Vector2)(ref val)).magnitude / 0.0625f); m_extantLink.dimensions = new Vector2((float)num2, m_extantLink.dimensions.y); ((BraveBehaviour)m_extantLink).transform.rotation = Quaternion.Euler(0f, 0f, num); ((tk2dBaseSprite)m_extantLink).UpdateZDepth(); if (Damages) { Elapsed = 0f; ApplyLinearDamage(worldCenter, worldCenter2); Vector3Extensions.GetAbsoluteRoom(TransformExtensions.PositionVector2(((Component)this).transform)).ApplyActionToNearbyEnemies(worldCenter, 1.5f, (Action)Hit); Vector3Extensions.GetAbsoluteRoom(TransformExtensions.PositionVector2(((Component)this).transform)).ApplyActionToNearbyEnemies(worldCenter2, 1.5f, (Action)Hit); } } public void Hit(AIActor aIActor, float f) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (!m_damagedEnemies_AOE.Contains(aIActor) && (int)aIActor.State == 2 && aIActor.CanTargetPlayers && !aIActor.CanTargetEnemies) { ((BraveBehaviour)aIActor).healthHaver.ApplyDamage(Damage * 0.333f, TransformExtensions.PositionVector2(((BraveBehaviour)aIActor).transform), "Zap", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDamageCooldown(aIActor, m_damagedEnemies_AOE)); } } private void ApplyLinearDamage(Vector2 p1, Vector2 p2) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) float calculateddamage = getCalculateddamage(); for (int i = 0; i < StaticReferenceManager.AllEnemies.Count; i++) { AIActor val = StaticReferenceManager.AllEnemies[i]; if (!m_damagedEnemies.Contains(val) && Object.op_Implicit((Object)(object)val) && val.HasBeenEngaged && val.IsNormalEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)val).specRigidbody) && val.CanTargetPlayers && !val.CanTargetEnemies) { Vector2 zero = Vector2.zero; if (BraveUtility.LineIntersectsAABB(p1, p2, ((BraveBehaviour)val).specRigidbody.HitboxPixelCollider.UnitBottomLeft, ((BraveBehaviour)val).specRigidbody.HitboxPixelCollider.UnitDimensions, ref zero)) { ((BraveBehaviour)val).healthHaver.ApplyDamage(calculateddamage, Vector2.zero, "Chain Lightning", (CoreDamageTypes)64, (DamageCategory)0, false, (PixelCollider)null, false); ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDamageCooldown(val, m_damagedEnemies)); } } } } private IEnumerator HandleDamageCooldown(AIActor damagedTarget, HashSet list) { list.Add(damagedTarget); yield return (object)new WaitForSeconds(0.25f); list.Remove(damagedTarget); } public float getCalculateddamage() { float damage = Damage; if ((Object)(object)player == (Object)null) { return damage; } float statValue = player.stats.GetStatValue((StatType)5); return damage * statValue; } } public class TremorImpact : DefaultModule { public static ItemTemplate template; public static ExplosionData tremorHit; public static GameObject hitEffect; public static int ID; public static void PostInit(PickupObject v) { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("tremor_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Tremor Impact " + defaultModule.ReturnTierLabel(); defaultModule.AdditionalWeightMultiplier = 0.9f; defaultModule.LabelDescription = "Hitting enemies deals 25% (" + StaticColorHexes.AddColorToLabelString("+25%", StaticColorHexes.Light_Orange_Hex) + ") of the damage dealt\nto enemies near the hurt enemy.\nSlain enemies detonate.(" + StaticColorHexes.AddColorToLabelString("+Explosion Power", StaticColorHexes.Light_Orange_Hex) + ")"; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddModuleTag(BaseModuleTags.UNIQUE); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); PickupObject byId = PickupObjectDatabase.GetById(504); hitEffect = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects[0].effects[0].effect; ID = ((PickupObject)defaultModule).PickupObjectId; PickupObject byId2 = PickupObjectDatabase.GetById(601); tremorHit = StaticExplosionDatas.CopyFields(((Component)((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]).GetComponent().explosionData); tremorHit.damageToPlayer = 0f; tremorHit.damage = 15f; tremorHit.force = 50f; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnDamagedEnemy = (Action)Delegate.Combine(modulePrinter.OnDamagedEnemy, new Action(OnEnemyDamaged)); modulePrinter.OnKilledEnemy = (Action)Delegate.Combine(modulePrinter.OnKilledEnemy, new Action(OKE)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnDamagedEnemy = (Action)Delegate.Remove(modulePrinter.OnDamagedEnemy, new Action(OnEnemyDamaged)); modulePrinter.OnKilledEnemy = (Action)Delegate.Remove(modulePrinter.OnKilledEnemy, new Action(OKE)); } public void OKE(ModulePrinterCore modulePrinter, PlayerController playerController, AIActor aIActor) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) tremorHit.damage = 15 * ReturnStack(modulePrinter); tremorHit.force = 40 * ReturnStack(modulePrinter); Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)aIActor).sprite.WorldCenter), tremorHit, ((BraveBehaviour)aIActor).sprite.WorldCenter, (Action)null, true, (CoreDamageTypes)0, false); } public void OnEnemyDamaged(ModulePrinterCore modulePrinterCore, PlayerController player, AIActor enemy, float damage) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) int num = ReturnStack(modulePrinterCore); float damage2 = Mathf.Max(damage * (0.25f * (float)num), 0.5f); ApplyActionToNearbyEnemies(((BraveBehaviour)enemy).sprite.WorldCenter, 3.5f + 0.5f * (float)num, ((DungeonPlaceableBehaviour)enemy).GetAbsoluteParentRoom(), damage2, enemy); } public void ApplyActionToNearbyEnemies(Vector2 position, float radius, RoomHandler room, float damage, AIActor noTarget) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) float num = radius * radius; if (room.activeEnemies == null) { return; } for (int i = 0; i < room.activeEnemies.Count; i++) { if (!Object.op_Implicit((Object)(object)room.activeEnemies[i])) { continue; } AIActor val = room.activeEnemies[i]; if (!Object.op_Implicit((Object)(object)val) || !((Object)(object)val != (Object)(object)noTarget)) { continue; } bool flag = radius < 0f; Vector2 val2 = ((GameActor)room.activeEnemies[i]).CenterPosition - position; if (!flag) { flag = ((Vector2)(ref val2)).sqrMagnitude < num; } if (flag) { ((GameActor)val).PlayEffectOnActor(hitEffect, new Vector3(0f, 0f), true, false, false); ((BraveBehaviour)val).healthHaver.ApplyDamage(((Object)(object)noTarget == (Object)(object)val) ? (damage / 3f) : damage, position, "AoE", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); if ((Object)(object)((BraveBehaviour)val).knockbackDoer != (Object)null && !((BraveBehaviour)val).healthHaver.IsBoss) { ((BraveBehaviour)val).knockbackDoer.ApplyKnockback(position - TransformExtensions.PositionVector2(((BraveBehaviour)val).transform), 5f, false); } } } } static TremorImpact() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(TremorImpact)); val.Name = "Tremor Impact"; val.Description = "Shockwave"; val.LongDescription = "Hitting enemies deals 25% (+25% per stack) of the damage dealt to nearby enemies. Slain enemies detonate. (+Explosion Power per stack)"; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("tremor_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public class SharperRounds : DefaultModule { public static ItemTemplate template; public static int ID; public static void PostInit(PickupObject v) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = v as DefaultModule; defaultModule.AltSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("damage_tier1_module_alt"); defaultModule.Tier = ModuleTier.Tier_1; defaultModule.LabelName = "Sharper Rounds " + defaultModule.ReturnTierLabel(); defaultModule.LabelDescription = "Increases Damage by 25% (" + StaticColorHexes.AddColorToLabelString("+25%", StaticColorHexes.Light_Orange_Hex) + ")."; defaultModule.AddModuleTag(BaseModuleTags.BASIC); defaultModule.AddToGlobalStorage(); AlexandriaTags.SetTag((PickupObject)(object)defaultModule, "modular_module"); defaultModule.AddColorLight(Color.cyan); defaultModule.Offset_LabelDescription = new Vector2(0.125f, -0.5f); defaultModule.Offset_LabelName = new Vector2(0.125f, 1.75f); ID = ((PickupObject)defaultModule).PickupObjectId; } public override void OnFirstPickup(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Combine((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public override void OnLastRemoved(ModulePrinterCore modulePrinter, ModularGunController modularGunController, PlayerController player) { modulePrinter.OnPostProcessProjectile = (Action)(object)Delegate.Remove((Delegate?)(object)modulePrinter.OnPostProcessProjectile, (Delegate?)(object)new Action(PPP)); } public void PPP(ModulePrinterCore modulePrinterCore, Projectile p, float f, PlayerController player, bool IsCrit) { int num = ReturnStack(modulePrinterCore); ProjectileData baseData = p.baseData; baseData.damage *= 1f + 0.25f * (float)num; } static SharperRounds() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ItemTemplate val = new ItemTemplate(typeof(SharperRounds)); val.Name = "Sharper Rounds"; val.Description = "Damage Up"; val.LongDescription = "Increases Damage by 25% (+25% per stack)."; val.ManualSpriteCollection = StaticCollections.Module_T1_Collection; val.ManualSpriteID = StaticCollections.Module_T1_Collection.GetSpriteIdByName("damage_tier1_module"); val.Quality = (ItemQuality)(-50); val.PostInitAction = PostInit; template = val; } } public static class MultiActiveReloadManager { public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); public static Dictionary> tempraryActiveReloads = new Dictionary>(); public static FieldInfo info = typeof(GameUIReloadBarController).GetField("m_reloadIsActive", BindingFlags.Instance | BindingFlags.NonPublic); public static MethodInfo info2 = typeof(Gun).GetMethod("OnActiveReloadPressed", BindingFlags.Instance | BindingFlags.NonPublic); public static FieldInfo info3 = typeof(GameUIRoot).GetField("m_extantReloadBars", BindingFlags.Instance | BindingFlags.NonPublic); public static void SetupHooks() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown Hook val = new Hook((MethodBase)typeof(GameUIReloadBarController).GetMethod("TriggerReload", BindingFlags.Instance | BindingFlags.Public), typeof(MultiActiveReloadManager).GetMethod("TriggerReloadHook")); Hook val2 = new Hook((MethodBase)typeof(Gun).GetMethod("OnActiveReloadPressed", BindingFlags.Instance | BindingFlags.NonPublic), typeof(MultiActiveReloadManager).GetMethod("OnActiveReloadPressedHook")); Hook val3 = new Hook((MethodBase)typeof(Gun).GetMethod("Reload", BindingFlags.Instance | BindingFlags.Public), typeof(MultiActiveReloadManager).GetMethod("ReloadHook")); Hook val4 = new Hook((MethodBase)typeof(Gun).GetMethod("DropGun", BindingFlags.Instance | BindingFlags.Public), typeof(MultiActiveReloadManager).GetMethod("DropGunHook")); } public static DebrisObject DropGunHook(Func orig, Gun self, float H = 0.5f) { MultiActiveReloadController component = ((Component)self).GetComponent(); if ((Object)(object)component != (Object)null) { component.reloads = new List(); List reloads = component.reloads; PickupObject byId = PickupObjectDatabase.GetById(((PickupObject)self).PickupObjectId); reloads.AddRange(((Component)((byId is Gun) ? byId : null)).GetComponent().reloads); } return orig(self, H); } public static bool ReloadHook(Func orig, Gun self) { bool flag = orig(self); if (flag && (Object)(object)((Component)self).GetComponent() != (Object)null) { ((Component)self).GetComponent().canAttemptActiveReload = true; ((Component)self).GetComponent().damageMult = 1f; } return flag; } public static void TriggerReloadHook(Action orig, GameUIReloadBarController self, PlayerController attachParent, Vector3 offset, float duration, float activeReloadStartPercent, int pixelWidth) { //IL_00d8: 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_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) if (tempraryActiveReloads.ContainsKey(self)) { foreach (MultiActiveReload item2 in tempraryActiveReloads[self]) { if ((Object)(object)item2.sprite != (Object)null && (Object)(object)((Component)item2.sprite).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)item2.sprite).gameObject); } if ((Object)(object)item2.celebrationSprite != (Object)null && (Object)(object)((Component)item2.celebrationSprite).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)item2.celebrationSprite).gameObject); } } tempraryActiveReloads[self].Clear(); } orig(self, attachParent, offset, duration, activeReloadStartPercent, pixelWidth); if (!((Object)(object)attachParent != (Object)null) || !((Object)(object)((GameActor)attachParent).CurrentGun != (Object)null) || !((Object)(object)((Component)((GameActor)attachParent).CurrentGun).GetComponent() != (Object)null)) { return; } foreach (MultiActiveReloadData reload in ((Component)((GameActor)attachParent).CurrentGun).GetComponent().reloads) { dfSprite val = Object.Instantiate(self.activeReloadSprite); ((dfControl)self.activeReloadSprite).Parent.AddControl((dfControl)(object)val); ((Behaviour)val).enabled = true; float width = ((dfControl)self.progressSlider).Width; float maxValue = self.progressSlider.MaxValue; float num = (float)reload.startValue / maxValue * width; float num2 = (float)reload.endValue / maxValue * width; float num3 = num + (num2 - num) * reload.activeReloadStartPercentage; float num4 = (float)pixelWidth * Pixelator.Instance.CurrentTileScale; ((dfControl)val).RelativePosition = ((dfControl)self.activeReloadSprite).RelativePosition; ((dfControl)val).RelativePosition = Vector2.op_Implicit(GameUIUtility.QuantizeUIPosition(Vector2.op_Implicit(Vector3Extensions.WithX(((dfControl)val).RelativePosition, num3)))); ((dfControl)val).RelativePosition = ((dfControl)val).RelativePosition + new Vector3(0f, 0f, 10f); ((dfControl)val).Width = num4 * 2f; ((dfControl)val).Height = num4 * 10f; ((dfControl)val).IsVisible = true; dfSprite val2 = Object.Instantiate(self.celebrationSprite); ((dfControl)self.activeReloadSprite).Parent.AddControl((dfControl)(object)val2); ((Behaviour)val2).enabled = true; dfSpriteAnimation component = ((Component)val2).GetComponent(); ((dfTweenPlayableBase)component).Stop(); component.SetFrameExternal(0); ((Behaviour)val2).enabled = false; ((dfControl)val2).RelativePosition = ((dfControl)val).RelativePosition + new Vector3(Pixelator.Instance.CurrentTileScale * -1f, Pixelator.Instance.CurrentTileScale * -2f, 0f); int num5 = Mathf.RoundToInt((float)(reload.endValue - reload.startValue) * reload.activeReloadStartPercentage) + reload.startValue - reload.activeReloadLastTime / 2; MultiActiveReload item = new MultiActiveReload { sprite = val, celebrationSprite = val2, startValue = num5, endValue = num5 + reload.activeReloadLastTime, stopsReload = reload.stopsReload, canAttemptActiveReloadAfterwards = reload.canAttemptActiveReloadAfterwards, reloadData = reload.reloadData, usesActiveReloadData = reload.usesActiveReloadData, Name = reload.Name }; if (tempraryActiveReloads.ContainsKey(self)) { tempraryActiveReloads[self].Add(item); continue; } tempraryActiveReloads.Add(self, new List { item }); } } public static bool AttemptActiveReloadHook(Func orig, GameUIReloadBarController self) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) if (!self.ReloadIsActive) { return false; } if (tempraryActiveReloads.ContainsKey(self)) { foreach (MultiActiveReload item in tempraryActiveReloads[self]) { if (self.progressSlider.Value >= (float)item.startValue && self.progressSlider.Value <= (float)item.endValue) { ((dfControl)self.progressSlider).Color = Color32.op_Implicit(Color.green); AkSoundEngine.PostEvent("Play_WPN_active_reload_01", ((Component)self).gameObject); ((Behaviour)item.celebrationSprite).enabled = true; ((Behaviour)item.sprite).enabled = false; if (item.stopsReload) { ((Behaviour)self.progressSlider.Thumb).enabled = false; info.SetValue(self, false); } ((dfTweenPlayableBase)((Component)item.celebrationSprite).GetComponent()).Play(); return true; } } } return orig(self); } public static bool AttemptActiveReloadOnlyMultireload(this GameUIRoot self, PlayerController targetPlayer) { int index = ((!targetPlayer.IsPrimaryPlayer) ? 1 : 0); return ((List)info3.GetValue(self))[index].AttemptActiveReloadOnlyMultireload(); } public static bool AttemptActiveReloadOnlyMultireload(this GameUIReloadBarController self) { //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (!self.ReloadIsActive) { return false; } if (tempraryActiveReloads.ContainsKey(self)) { foreach (MultiActiveReload item in tempraryActiveReloads[self]) { if (self.progressSlider.Value >= (float)item.startValue && self.progressSlider.Value <= (float)item.endValue) { ((dfControl)self.progressSlider).Color = Color32.op_Implicit(Color.green); AkSoundEngine.PostEvent("Play_WPN_active_reload_01", ((Component)self).gameObject); ((Behaviour)item.celebrationSprite).enabled = true; ((Behaviour)item.sprite).enabled = false; if (item.stopsReload) { ((Behaviour)self.progressSlider.Thumb).enabled = false; info.SetValue(self, false); } ((dfTweenPlayableBase)((Component)item.celebrationSprite).GetComponent()).Play(); return true; } } } ((dfControl)self.progressSlider).Color = Color32.op_Implicit(Color.red); return false; } public static void OnActiveReloadPressedHook(Action orig, Gun self, PlayerController p, Gun g, bool actualPress) { orig(self, p, g, actualPress); if (!self.IsReloading && !(self.reloadTime < 0f)) { return; } GameActor currentOwner = self.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if (Object.op_Implicit((Object)(object)val)) { if (actualPress) { } } else if (0 == 0) { return; } MultiActiveReloadController component = ((Component)self).GetComponent(); if (!((Object)(object)component != (Object)null) || !component.activeReloadEnabled || !component.canAttemptActiveReload || GameUIRoot.Instance.GetReloadBarForPlayer((PlayerController)/*isinst with value type is only supported in some contexts*/).IsActiveReloadGracePeriod()) { return; } GameUIRoot instance = GameUIRoot.Instance; GameActor currentOwner2 = self.CurrentOwner; bool flag = instance.AttemptActiveReloadOnlyMultireload((PlayerController)(object)((currentOwner2 is PlayerController) ? currentOwner2 : null)); ? val2 = GameUIRoot.Instance; GameActor currentOwner3 = self.CurrentOwner; MultiActiveReload multiActiveReloadForController = ((GameUIRoot)val2).GetReloadBarForPlayer((PlayerController)(object)((currentOwner3 is PlayerController) ? currentOwner3 : null)).GetMultiActiveReloadForController(); if (flag) { component.OnActiveReloadSuccess(multiActiveReloadForController); GunFormeSynergyProcessor component2 = ((Component)self).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.JustActiveReloaded = true; } ChamberGunProcessor component3 = ((Component)self).GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.JustActiveReloaded = true; } } else { component.OnActiveReloadFailure(multiActiveReloadForController); } if (multiActiveReloadForController == null || !multiActiveReloadForController.canAttemptActiveReloadAfterwards) { component.canAttemptActiveReload = false; Action value = Extensions.CreateDelegate>((MethodBase)info2); self.OnReloadPressed = (Action)Delegate.Remove(self.OnReloadPressed, value); } } public static MultiActiveReload GetMultiActiveReloadForController(this GameUIReloadBarController controller) { MultiActiveReload result = null; if (tempraryActiveReloads.ContainsKey(controller)) { foreach (MultiActiveReload item in tempraryActiveReloads[controller]) { if (controller.progressSlider.Value >= (float)item.startValue && controller.progressSlider.Value <= (float)item.endValue) { result = item; break; } } } return result; } } public class MultiActiveReload { public dfSprite sprite; public dfSprite celebrationSprite; public int startValue; public int endValue; public bool stopsReload; public bool canAttemptActiveReloadAfterwards; public ActiveReloadData reloadData; public bool usesActiveReloadData; public string Name; } public struct MultiActiveReloadData { public float activeReloadStartPercentage; public int startValue; public int endValue; public int pixelWidth; public int activeReloadLastTime; public bool stopsReload; public bool canAttemptActiveReloadAfterwards; public ActiveReloadData reloadData; public bool usesActiveReloadData; public string Name; public MultiActiveReloadData(float activeReloadStartPercentage, int startValue, int endValue, int pixelWidth, int activeReloadLastTime, bool stopsReload, bool canAttemptActiveReloadAfterwards, ActiveReloadData reloadData, bool usesActiveReloadData, string Name) { this.activeReloadStartPercentage = activeReloadStartPercentage; this.startValue = startValue; this.endValue = endValue; this.pixelWidth = pixelWidth; this.activeReloadLastTime = activeReloadLastTime; this.stopsReload = stopsReload; this.canAttemptActiveReloadAfterwards = canAttemptActiveReloadAfterwards; this.reloadData = reloadData; this.usesActiveReloadData = usesActiveReloadData; this.Name = Name; } } public class MultiActiveReloadController : AdvancedGunBehaviourMultiActive { public static MethodInfo info = typeof(Gun).GetMethod("FinishReload", BindingFlags.Instance | BindingFlags.NonPublic); public static FieldInfo info2 = typeof(Gun).GetField("SequentialActiveReloads", BindingFlags.Instance | BindingFlags.NonPublic); public List reloads = new List(); public bool canAttemptActiveReload; public bool activeReloadEnabled; public float damageMult = 1f; public virtual void OnActiveReloadSuccess(MultiActiveReload reload) { if (reload == null || reload.stopsReload) { info.Invoke(gun, new object[3] { true, false, false }); } float num = 1f; if (Gun.ActiveReloadActivated && base.PickedUpByPlayer && base.Player.IsPrimaryPlayer) { num *= CogOfBattleItem.ACTIVE_RELOAD_DAMAGE_MULTIPLIER; } if (Gun.ActiveReloadActivatedPlayerTwo && base.PickedUpByPlayer && !base.Player.IsPrimaryPlayer) { num *= CogOfBattleItem.ACTIVE_RELOAD_DAMAGE_MULTIPLIER; } if (reload == null || reload.usesActiveReloadData) { if (gun.LocalActiveReload && (reload == null || reload.reloadData == null)) { num *= Mathf.Pow(gun.activeReloadData.damageMultiply, (float)((int)info2.GetValue(gun) + 1)); } else if (reload != null && reload.reloadData != null) { num *= Mathf.Pow(reload.reloadData.damageMultiply, reload.reloadData.ActiveReloadStacks ? ((float)((int)info2.GetValue(gun) + 1)) : 1f); } } damageMult = num; } public override void PostProcessProjectile(Projectile projectile) { base.PostProcessProjectile(projectile); ProjectileData baseData = projectile.baseData; baseData.damage *= damageMult; } public virtual void OnActiveReloadFailure(MultiActiveReload reload) { damageMult = 1f; } public override void MidGameDeserialize(List data, ref int dataIndex) { base.MidGameDeserialize(data, ref dataIndex); reloads = (List)data[dataIndex]; activeReloadEnabled = (bool)data[dataIndex + 1]; dataIndex += 2; } public override void MidGameSerialize(List data, int dataIndex) { base.MidGameSerialize(data, dataIndex); data.Add(reloads); data.Add(activeReloadEnabled); } public override void InheritData(Gun source) { base.InheritData(source); MultiActiveReloadController component = ((Component)source).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { reloads = component.reloads; activeReloadEnabled = component.activeReloadEnabled; } } } public class CustomProjectileSlashingBehaviour : MonoBehaviour { public float initialDelay; private float timer; public float timeBetweenSlashes; public bool SlashDamageUsesBaseProjectileDamage; public bool DestroyBaseAfterFirstSlash; public bool DestroysOnlyComponentAfterFirstSlash = false; public CustomSlashData slashParameters; private Projectile m_projectile; private PlayerController owner; public float timeBetweenCustomSequenceSlashes; public List customSequence; public float angleVariance; public CustomProjectileSlashingBehaviour() { DestroyBaseAfterFirstSlash = false; timeBetweenSlashes = 1f; initialDelay = 0f; slashParameters = ScriptableObject.CreateInstance(); SlashDamageUsesBaseProjectileDamage = true; timeBetweenCustomSequenceSlashes = 0.15f; customSequence = null; angleVariance = 0f; } private void Start() { m_projectile = ((Component)this).GetComponent(); timer = initialDelay; if (Object.op_Implicit((Object)(object)m_projectile.Owner) && m_projectile.Owner is PlayerController) { ref PlayerController reference = ref owner; GameActor obj = m_projectile.Owner; reference = (PlayerController)(object)((obj is PlayerController) ? obj : null); } } private void Update() { if (Object.op_Implicit((Object)(object)m_projectile)) { if (timer > 0f) { timer -= BraveTime.DeltaTime; } else { ((MonoBehaviour)m_projectile).StartCoroutine(DoAttackSequence()); } } } private IEnumerator DoAttackSequence() { if (customSequence != null && customSequence.Count > 0) { foreach (float angle in customSequence) { DoSlash(angle); yield return (object)new WaitForSeconds(timeBetweenCustomSequenceSlashes); } } else { DoSlash(0f); } timer = timeBetweenSlashes; if (DestroyBaseAfterFirstSlash) { ((MonoBehaviour)this).StartCoroutine(Suicide()); } } private void DoSlash(float angle) { //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) Projectile projectile = m_projectile; List list = new List(); list.AddRange(ProjectileUtility.GetFullListOfStatusEffects(projectile, true)); CustomSlashData customSlashData = slashParameters.ReturnClone(); if (SlashDamageUsesBaseProjectileDamage) { customSlashData.damage = m_projectile.baseData.damage; customSlashData.bossDamageMult = m_projectile.BossDamageMultiplier; customSlashData.jammedDamageMult = m_projectile.BlackPhantomDamageMultiplier; customSlashData.enemyKnockbackForce = m_projectile.baseData.force; } customSlashData.OnHitTarget = (Action)Delegate.Combine(customSlashData.OnHitTarget, new Action(SlashHitTarget)); customSlashData.OnHitBullet = (Action)Delegate.Combine(customSlashData.OnHitBullet, new Action(SlashHitBullet)); customSlashData.OnHitMajorBreakable = (Action)Delegate.Combine(customSlashData.OnHitMajorBreakable, new Action(SlashHitMajorBreakable)); customSlashData.OnHitMinorBreakable = (Action)Delegate.Combine(customSlashData.OnHitMinorBreakable, new Action(SlashHitMinorBreakable)); angle += Random.Range(angleVariance, 0f - angleVariance); CustomSlashDoer.DoSwordSlash(((BraveBehaviour)m_projectile).specRigidbody.UnitCenter, Vector2Extensions.ToAngle(m_projectile.Direction) + angle, (GameActor)(object)owner, customSlashData); } private IEnumerator Suicide() { yield return null; if (DestroysOnlyComponentAfterFirstSlash) { Object.Destroy((Object)(object)this); } else { Object.Destroy((Object)(object)((Component)m_projectile).gameObject); } } public virtual void SlashHitTarget(GameActor target, bool fatal) { } public virtual void SlashHitBullet(Projectile target) { } public virtual void SlashHitMinorBreakable(MinorBreakable target) { } public virtual void SlashHitMajorBreakable(MajorBreakable target) { } } public class VoltaicTetherComponent : MonoBehaviour { public static List AllTethers = new List(); public float PlayerRange = 12.5f; public float PylonRange = 10f; private Dictionary ExtantTethers = new Dictionary(); public float DPS = 3f; public tk2dBaseSprite sprite; private float Tick = 0.333f; private float Elapsed = 0f; private HashSet m_damagedEnemies = new HashSet(); private HashSet m_damagedEnemies_AOE = new HashSet(); public void Start() { sprite = ((Component)this).GetComponentInChildren(); AllTethers.Add(this); } public void Update() { Elapsed += BraveTime.DeltaTime; if ((Object)(object)((Component)this).gameObject != (Object)null) { List allTethers = AllTethers; if (allTethers != null && allTethers.Count > 0) { foreach (VoltaicTetherComponent item in allTethers) { ProcessGameObject(((Component)item).gameObject, PylonRange, isTether: true); } } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { ProcessGameObject(((Component)val).gameObject, PlayerRange); } } foreach (KeyValuePair extantTether in ExtantTethers) { if ((Object)(object)extantTether.Key != (Object)null && (Object)(object)extantTether.Value != (Object)null && (Object)(object)((Component)this).gameObject == (Object)null) { SpawnManager.Despawn(extantTether.Value.gameObject); ExtantTethers.Remove(extantTether.Key); break; } if ((Object)(object)extantTether.Key == (Object)null && (Object)(object)extantTether.Value != (Object)null) { SpawnManager.Despawn(extantTether.Value.gameObject); ExtantTethers.Remove(extantTether.Key); break; } if (Object.op_Implicit((Object)(object)((Component)this).gameObject) && (Object)(object)extantTether.Value != (Object)null && (Object)(object)extantTether.Key != (Object)null) { UpdateLink(((Component)this).gameObject, extantTether.Value.GetComponent(), extantTether.Key, (Elapsed > Tick) ? true : false); } } } public void ProcessGameObject(GameObject ai, float Distance = 35f, bool isTether = false) { //IL_005c: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) if (ExtantTethers.Count > 2) { GameObject val = ReturnLongestDistance(Distance); if ((Object)(object)val != (Object)null) { ExtantTethers.TryGetValue(val, out var value); SpawnManager.Despawn(value); ExtantTethers.Remove(val); } } if ((Object)(object)ai != (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(ai.transform), sprite.WorldTopCenter) < Distance && (Object)(object)ai != (Object)(object)((Component)this).gameObject && ExtantTethers.Count < 3 && !ExtantTethers.ContainsKey(ai)) { if (isTether) { if (!ai.GetComponent().ExtantTethers.ContainsKey(ai)) { GameObject gameObject = ((Component)SpawnManager.SpawnVFX(VFXStorage.FriendlyElectricLinkVFX, false).GetComponent()).gameObject; ExtantTethers.Add(ai, gameObject); } } else { GameObject gameObject2 = ((Component)SpawnManager.SpawnVFX(VFXStorage.FriendlyElectricLinkVFX, false).GetComponent()).gameObject; ExtantTethers.Add(ai, gameObject2); } } if ((Object)(object)ai != (Object)null && Vector2.Distance(TransformExtensions.PositionVector2(ai.transform), sprite.WorldTopCenter) > Distance && ExtantTethers.ContainsKey(ai)) { ExtantTethers.TryGetValue(ai, out var value2); SpawnManager.Despawn(value2); ExtantTethers.Remove(ai); } } private void UpdateLink(GameObject target, tk2dTiledSprite m_extantLink, GameObject actor, bool Damages) { //IL_002c: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) Vector2 val = (((Object)(object)actor.GetComponent() != (Object)null) ? ((BraveBehaviour)actor.GetComponent()).sprite.WorldBottomCenter : ((BraveBehaviour)actor.GetComponentInChildren()).sprite.WorldBottomCenter); Vector2 val2 = TransformExtensions.PositionVector2(target.transform); ((BraveBehaviour)m_extantLink).transform.position = Vector2.op_Implicit(val); Vector2 val3 = val2 - val; float num = BraveMathCollege.Atan2Degrees(((Vector2)(ref val3)).normalized); int num2 = Mathf.RoundToInt(((Vector2)(ref val3)).magnitude / 0.0625f); m_extantLink.dimensions = new Vector2((float)num2, m_extantLink.dimensions.y); ((BraveBehaviour)m_extantLink).transform.rotation = Quaternion.Euler(0f, 0f, num); ((tk2dBaseSprite)m_extantLink).UpdateZDepth(); if (Damages) { Elapsed = 0f; Vector3Extensions.GetAbsoluteRoom(TransformExtensions.PositionVector2(((Component)this).transform)).ApplyActionToNearbyEnemies(val, 2f, (Action)Hit); Vector3Extensions.GetAbsoluteRoom(TransformExtensions.PositionVector2(((Component)this).transform)).ApplyActionToNearbyEnemies(val2, 2f, (Action)Hit); ApplyLinearDamage(val, val2); } } public void Hit(AIActor aIActor, float f) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (!m_damagedEnemies_AOE.Contains(aIActor) && (int)aIActor.State == 2 && aIActor.CanTargetPlayers && !aIActor.CanTargetEnemies) { ((BraveBehaviour)aIActor).healthHaver.ApplyDamage(DPS / 5f, TransformExtensions.PositionVector2(((BraveBehaviour)aIActor).transform), "Zap", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDamageCooldown(aIActor, m_damagedEnemies_AOE)); } } private void ApplyLinearDamage(Vector2 p1, Vector2 p2) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) float dPS = DPS; for (int i = 0; i < StaticReferenceManager.AllEnemies.Count; i++) { AIActor val = StaticReferenceManager.AllEnemies[i]; if (!m_damagedEnemies.Contains(val) && Object.op_Implicit((Object)(object)val) && val.HasBeenEngaged && Object.op_Implicit((Object)(object)((BraveBehaviour)val).specRigidbody) && val.CanTargetPlayers && !val.CanTargetEnemies) { Vector2 zero = Vector2.zero; if (BraveUtility.LineIntersectsAABB(p1, p2, ((BraveBehaviour)val).specRigidbody.HitboxPixelCollider.UnitBottomLeft, ((BraveBehaviour)val).specRigidbody.HitboxPixelCollider.UnitDimensions, ref zero)) { ((BraveBehaviour)val).healthHaver.ApplyDamage(dPS, Vector2.zero, "Chain Lightning", (CoreDamageTypes)64, (DamageCategory)0, false, (PixelCollider)null, false); ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDamageCooldown(val, m_damagedEnemies)); } } } } private IEnumerator HandleDamageCooldown(AIActor damagedTarget, HashSet list) { list.Add(damagedTarget); yield return (object)new WaitForSeconds(0.25f); list.Remove(damagedTarget); } public GameObject ReturnLongestDistance(float h) { //IL_0060: 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) List list = new List(); Dictionary dictionary = new Dictionary(); for (int num = ExtantTethers.Count - 1; num > -1; num--) { KeyValuePair keyValuePair = ExtantTethers.ElementAt(num); if ((Object)(object)keyValuePair.Key != (Object)null && (Object)(object)keyValuePair.Value != (Object)null) { float num2 = Vector2.Distance(TransformExtensions.PositionVector2(keyValuePair.Key.transform), TransformExtensions.PositionVector2(keyValuePair.Value.transform)); if (!dictionary.ContainsKey(num2)) { dictionary.Add(num2, keyValuePair.Key); list.Add(num2); } } } list.Sort(); if ((list == null) | (list.Count() == 0)) { return null; } return (h > list.Last()) ? null : dictionary[list.Last()]; } private void OnDestroy() { if (AllTethers.Contains(this)) { AllTethers.Remove(this); } foreach (KeyValuePair extantTether in ExtantTethers) { if ((Object)(object)extantTether.Value != (Object)null) { SpawnManager.Despawn(extantTether.Value.gameObject); } } ExtantTethers.Clear(); } } public class StickyProjectileModifier : MonoBehaviour { public class StickyContext { public bool CanStickToTerrain = false; public bool CanStickEnemies = true; } public Action OnPreStick; public Action OnStick; public Action OnStickToWall; public Action OnStickyDestroyed; public static Action OnStickyProjectileStuck; public Projectile currentObject; public GameObject objectToLookOutFor; public Material materialToCopy; public PlayerController player; public List stickyContexts = new List(); private bool StickToEnemies = false; private bool StickToTerrain = false; public void Start() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown foreach (StickyContext stickyContext in stickyContexts) { if (stickyContext.CanStickEnemies) { StickToEnemies = true; } if (stickyContext.CanStickToTerrain) { StickToTerrain = true; } } currentObject = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)currentObject)) { return; } if (StickToTerrain) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)currentObject).specRigidbody; specRigidbody.OnPreTileCollision = (OnPreTileCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreTileCollision, (Delegate?)(OnPreTileCollisionDelegate)delegate(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, Tile Tile, PixelCollider TilePixelCollider) { HandleHit(currentObject, null, Tile); }); } if (StickToEnemies) { SpeculativeRigidbody specRigidbody2 = ((BraveBehaviour)currentObject).specRigidbody; specRigidbody2.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody2.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { HandleHit(currentObject, otherRigidbody); }); } } private void HandleHit(Projectile projectile, SpeculativeRigidbody otherBody, Tile tile = null) { if ((Object)(object)otherBody == (Object)null) { if (Object.op_Implicit((Object)(object)projectile)) { if ((Object)(object)((Component)projectile).GetComponent() == (Object)null) { TransformToSticky(projectile, null, tile); } else if (((Component)projectile).GetComponent().numberOfBounces == 0) { TransformToSticky(projectile, null, tile); } } } else { if (!Object.op_Implicit((Object)(object)projectile) || !((Object)(object)((BraveBehaviour)otherBody).aiActor != (Object)null) || ((BraveBehaviour)otherBody).healthHaver.IsDead || !Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)otherBody).aiActor).behaviorSpeculator) || ((BraveBehaviour)otherBody).aiActor.IsHarmlessEnemy) { return; } if ((Object)(object)((Component)this).GetComponent() != (Object)null) { if (((Component)this).GetComponent().penetration == 0) { TransformToSticky(projectile, otherBody); } } else { TransformToSticky(projectile, otherBody); } } } private void TransformToSticky(Projectile projectile, SpeculativeRigidbody otherBody, Tile tile = null) { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)projectile == (Object)null)) { if (OnPreStick != null && (Object)(object)projectile != (Object)null) { OnPreStick(((Component)projectile).gameObject, player); } projectile.DestroyMode = (ProjectileDestroyMode)1; if ((Object)(object)((Component)projectile).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)projectile).gameObject.GetComponent()); } if ((Object)(object)((Component)projectile).gameObject.GetComponent() != (Object)null) { ((Component)projectile).gameObject.GetComponent().DoDetach(); } objectToLookOutFor = ((Component)projectile).gameObject; if ((Object)(object)otherBody != (Object)null) { objectToLookOutFor.transform.parent = ((BraveBehaviour)otherBody).transform; objectToLookOutFor.transform.position = Vector2.op_Implicit(((BraveBehaviour)otherBody).sprite.WorldCenter + Toolbox.GetUnitOnCircle(projectile.angularVelocity, Vector2.Distance(Vector2.op_Implicit(objectToLookOutFor.transform.position), ((BraveBehaviour)otherBody).sprite.WorldCenter) * 0.2f)); } ref PlayerController reference = ref player; GameActor owner = projectile.Owner; reference = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (OnStick != null) { OnStick(objectToLookOutFor, this, objectToLookOutFor.GetComponentInChildren(), player); } if (OnStickToWall != null && tile != null) { OnStickToWall.Invoke(objectToLookOutFor, this, objectToLookOutFor.GetComponentInChildren(), player, tile); } } } public void OnDestroy() { if ((Object)(object)objectToLookOutFor != (Object)null && (Object)(object)this != (Object)null && (Object)(object)player != (Object)null && OnStickyDestroyed != null) { OnStickyDestroyed(objectToLookOutFor, this, player); } } } public class DetachTrailFromParent : MonoBehaviour { public float WaitTime = 2.5f; public string trail_child_object_name = "trail object"; public void DoDetach(float DetachTime = 0f) { if (Object.op_Implicit((Object)(object)((Component)this).gameObject)) { Transform val = ((Component)this).gameObject.transform.Find(trail_child_object_name); if (Object.op_Implicit((Object)(object)val)) { val.parent = null; Object.Destroy((Object)(object)((Component)val).gameObject, DetachTime); } } } public void OnDestroy() { DoDetach(WaitTime); } } public static class BeamBuilder { public static BasicBeamController GenerateBeamPrefabBundle(this Projectile projectile, string defaultSpriteName, tk2dSpriteCollectionData data, tk2dSpriteAnimation animation, string IdleAnimationName, Vector2 colliderDimensions, Vector2 colliderOffsets, string impactVFXAnimationName = null, Vector2? impactVFXColliderDimensions = null, Vector2? impactVFXColliderOffsets = null, string endAnimation = null, Vector2? endColliderDimensions = null, Vector2? endColliderOffsets = null, string muzzleAnimationName = null, Vector2? muzzleColliderDimensions = null, Vector2? muzzleColliderOffsets = null, bool glows = false, bool canTelegraph = false, string beamTelegraphIdleAnimationName = null, string beamStartTelegraphAnimationName = null, string beamEndTelegraphAnimationName = null, float telegraphTime = 1f, bool canDissipate = false, string beamDissipateAnimationName = null, string beamStartDissipateAnimationName = null, string beamEndDissipateAnimationName = null, float dissipateTime = 1f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Expected O, but got Unknown //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Expected O, but got Unknown //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) try { ((BraveBehaviour)projectile).specRigidbody.CollideWithOthers = false; float num = colliderDimensions.x / 16f; float num2 = colliderDimensions.y / 16f; float num3 = colliderOffsets.x / 16f; float num4 = colliderOffsets.y / 16f; tk2dTiledSprite orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)projectile).gameObject); ((tk2dBaseSprite)orAddComponent).Collection = data; ((tk2dBaseSprite)orAddComponent).SetSprite(data, data.GetSpriteIdByName(defaultSpriteName)); tk2dSpriteDefinition currentSpriteDef = ((tk2dBaseSprite)orAddComponent).GetCurrentSpriteDef(); currentSpriteDef.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(num3, num4, 0f), new Vector3(num, num2, 0f) }; currentSpriteDef.ConstructOffsetsFromAnchor((Anchor)3); tk2dSpriteAnimator orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)projectile).gameObject); orAddComponent2._startingSpriteCollection = data; orAddComponent2.Library = animation; orAddComponent2.library = animation; orAddComponent2.playAutomatically = true; orAddComponent2.defaultClipId = animation.GetClipIdByName(IdleAnimationName); Object.Destroy((Object)(object)((Component)projectile).GetComponentInChildren()); ((BraveBehaviour)projectile).sprite = (tk2dBaseSprite)(object)orAddComponent; ((BraveBehaviour)projectile).sprite.Collection = data; BasicBeamController orAddComponent3 = GameObjectExtensions.GetOrAddComponent(((Component)projectile).gameObject); ((BraveBehaviour)orAddComponent3).sprite = (tk2dBaseSprite)(object)orAddComponent; ((BraveBehaviour)orAddComponent3).spriteAnimator = orAddComponent2; ((BraveBehaviour)orAddComponent3).spriteAnimator._startingSpriteCollection = data; orAddComponent3.m_beamSprite = orAddComponent; orAddComponent3.beamAnimation = IdleAnimationName; if (endAnimation != null && endColliderDimensions.HasValue && endColliderOffsets.HasValue) { SetupBeamPart(animation, data, endAnimation, endColliderDimensions.Value, endColliderOffsets.Value, null, (WrapMode)2); orAddComponent3.beamEndAnimation = endAnimation; } else { SetupBeamPart(animation, data, IdleAnimationName, null, null, currentSpriteDef.colliderVertices, (WrapMode)2); orAddComponent3.beamEndAnimation = IdleAnimationName; } if (impactVFXAnimationName != null && impactVFXColliderDimensions.HasValue && impactVFXColliderOffsets.HasValue) { SetupBeamPart(animation, data, impactVFXAnimationName, impactVFXColliderDimensions.Value, impactVFXColliderOffsets.Value, null, (WrapMode)2); orAddComponent3.impactAnimation = impactVFXAnimationName; } if (muzzleAnimationName != null && muzzleColliderDimensions.HasValue && muzzleColliderOffsets.HasValue) { SetupBeamPart(animation, data, muzzleAnimationName, muzzleColliderDimensions.Value, muzzleColliderOffsets.Value, null, (WrapMode)2); orAddComponent3.beamStartAnimation = muzzleAnimationName; } else { SetupBeamPart(animation, data, IdleAnimationName, null, null, currentSpriteDef.colliderVertices, (WrapMode)2); orAddComponent3.beamStartAnimation = IdleAnimationName; } if (canTelegraph) { orAddComponent3.usesTelegraph = true; orAddComponent3.telegraphAnimations = new TelegraphAnims(); if (beamStartTelegraphAnimationName != null) { SetupBeamPart(animation, data, beamStartTelegraphAnimationName, (Vector2?)new Vector2(0f, 0f), (Vector2?)new Vector2(0f, 0f), (Vector3[])null, (WrapMode)2); orAddComponent3.telegraphAnimations.beamStartAnimation = beamStartTelegraphAnimationName; } if (beamTelegraphIdleAnimationName != null) { SetupBeamPart(animation, data, beamTelegraphIdleAnimationName, (Vector2?)new Vector2(0f, 0f), (Vector2?)new Vector2(0f, 0f), (Vector3[])null, (WrapMode)2); orAddComponent3.telegraphAnimations.beamAnimation = beamTelegraphIdleAnimationName; } if (beamEndTelegraphAnimationName != null) { SetupBeamPart(animation, data, beamEndTelegraphAnimationName, (Vector2?)new Vector2(0f, 0f), (Vector2?)new Vector2(0f, 0f), (Vector3[])null, (WrapMode)2); orAddComponent3.telegraphAnimations.beamEndAnimation = beamEndTelegraphAnimationName; } orAddComponent3.telegraphTime = telegraphTime; } if (canDissipate) { orAddComponent3.endType = (BeamEndType)2; orAddComponent3.dissipateAnimations = new TelegraphAnims(); if (beamStartDissipateAnimationName != null) { SetupBeamPart(animation, data, beamStartDissipateAnimationName, (Vector2?)new Vector2(0f, 0f), (Vector2?)new Vector2(0f, 0f), (Vector3[])null, (WrapMode)2); orAddComponent3.dissipateAnimations.beamStartAnimation = beamStartDissipateAnimationName; } if (beamDissipateAnimationName != null) { SetupBeamPart(animation, data, beamDissipateAnimationName, (Vector2?)new Vector2(0f, 0f), (Vector2?)new Vector2(0f, 0f), (Vector3[])null, (WrapMode)2); orAddComponent3.dissipateAnimations.beamAnimation = beamDissipateAnimationName; } if (beamEndDissipateAnimationName != null) { SetupBeamPart(animation, data, beamEndDissipateAnimationName, (Vector2?)new Vector2(0f, 0f), (Vector2?)new Vector2(0f, 0f), (Vector3[])null, (WrapMode)2); orAddComponent3.dissipateAnimations.beamEndAnimation = beamEndDissipateAnimationName; } orAddComponent3.dissipateTime = dissipateTime; } if (glows) { EmmisiveBeams orAddComponent4 = GameObjectExtensions.GetOrAddComponent(((Component)projectile).gameObject); } return orAddComponent3; } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); return null; } } public static void ConstructOffsetsFromAnchor(this tk2dSpriteDefinition def, Anchor anchor, Vector2? scale = null, bool fixesScale = false, bool changesCollider = true) { //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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Invalid comparison between Unknown and I4 //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Invalid comparison between Unknown and I4 //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Invalid comparison between Unknown and I4 //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Invalid comparison between Unknown and I4 //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Invalid comparison between Unknown and I4 //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Invalid comparison between Unknown and I4 //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Invalid comparison between Unknown and I4 //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Invalid comparison between Unknown and I4 //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Invalid comparison between Unknown and I4 //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Invalid comparison between Unknown and I4 //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Invalid comparison between Unknown and I4 //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Invalid comparison between Unknown and I4 //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Invalid comparison between Unknown and I4 //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Invalid comparison between Unknown and I4 //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Invalid comparison between Unknown and I4 //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Invalid comparison between Unknown and I4 //IL_01d8: Unknown result type (might be due to invalid IL or missing references) if (!scale.HasValue) { scale = Vector2.op_Implicit(def.position3); } if (fixesScale) { Vector2 value = scale.Value - Vector3Extensions.XY(def.position0); scale = value; } float num = 0f; if ((int)anchor == 1 || (int)anchor == 4 || (int)anchor == 7) { num = 0f - scale.Value.x / 2f; } else if ((int)anchor == 2 || (int)anchor == 5 || (int)anchor == 8) { num = 0f - scale.Value.x; } float num2 = 0f; if ((int)anchor == 3 || (int)anchor == 4 || (int)anchor == 3) { num2 = 0f - scale.Value.y / 2f; } else if ((int)anchor == 6 || (int)anchor == 7 || (int)anchor == 8) { num2 = 0f - scale.Value.y; } def.MakeOffset(new Vector2(num, num2)); if (changesCollider && def.colliderVertices != null && def.colliderVertices.Length != 0) { float num3 = 0f; if ((int)anchor == 0 || (int)anchor == 3 || (int)anchor == 6) { num3 = scale.Value.x / 2f; } else if ((int)anchor == 2 || (int)anchor == 5 || (int)anchor == 8) { num3 = 0f - scale.Value.x / 2f; } float num4 = 0f; if ((int)anchor == 0 || (int)anchor == 1 || (int)anchor == 2) { num4 = scale.Value.y / 2f; } else if ((int)anchor == 6 || (int)anchor == 7 || (int)anchor == 8) { num4 = 0f - scale.Value.y / 2f; } ref Vector3 reference = ref def.colliderVertices[0]; reference += new Vector3(num3, num4, 0f); } } public static void MakeOffset(this tk2dSpriteDefinition def, Vector2 offset, bool changesCollider = false) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) float x = offset.x; float y = offset.y; def.position0 += new Vector3(x, y, 0f); def.position1 += new Vector3(x, y, 0f); def.position2 += new Vector3(x, y, 0f); def.position3 += new Vector3(x, y, 0f); def.boundsDataCenter += new Vector3(x, y, 0f); def.boundsDataExtents += new Vector3(x, y, 0f); def.untrimmedBoundsDataCenter += new Vector3(x, y, 0f); def.untrimmedBoundsDataExtents += new Vector3(x, y, 0f); if (def.colliderVertices != null && def.colliderVertices.Length != 0 && changesCollider) { ref Vector3 reference = ref def.colliderVertices[0]; reference += new Vector3(x, y, 0f); } } private static void SetupBeamPart(tk2dSpriteAnimation beamAnimation, tk2dSpriteCollectionData data, string animationName, Vector2? colliderDimensions = null, Vector2? colliderOffsets = null, Vector3[] overrideVertices = null, WrapMode wrapMode = 2) { //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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) tk2dSpriteAnimationFrame[] frames = beamAnimation.GetClipByName(animationName).frames; foreach (tk2dSpriteAnimationFrame val in frames) { tk2dSpriteDefinition val2 = data.spriteDefinitions[val.spriteId]; val2.ConstructOffsetsFromAnchor((Anchor)3); if (overrideVertices != null) { val2.colliderVertices = overrideVertices; continue; } if (!colliderDimensions.HasValue || !colliderOffsets.HasValue) { ETGModConsole.Log((object)"BEAM ERROR: colliderDimensions or colliderOffsets was null with no override vertices!", false); continue; } Vector2 value = colliderDimensions.Value; Vector2 value2 = colliderDimensions.Value; val2.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(value2.x / 16f, value2.y / 16f, 0f), new Vector3(value.x / 16f, value.y / 16f, 0f) }; } } } internal class EmmisiveBeams : MonoBehaviour { private List TransformList = new List { "Sprite", "beam impact vfx 2", "beam impact vfx" }; private BasicBeamController beamcont; public float EmissivePower; public float EmissiveColorPower; public EmmisiveBeams() { EmissivePower = 100f; EmissiveColorPower = 1.55f; } public void Start() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown Shader shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); foreach (Transform item in ((Component)this).transform) { Transform val = item; if (TransformList.Contains(((Object)val).name)) { tk2dSprite component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = shader; ((BraveBehaviour)component).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)component).renderer.material.SetFloat("_EmissivePower", EmissivePower); ((BraveBehaviour)component).renderer.material.SetFloat("_EmissiveColorPower", EmissiveColorPower); } } } beamcont = ((Component)this).GetComponent(); BasicBeamController val2 = beamcont; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; BasicBeamController component2 = ((Component)val2).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.shader = shader; ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissivePower", EmissivePower); ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.SetFloat("_EmissiveColorPower", EmissiveColorPower); } } public void Update() { Shader shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); Transform val = ((Component)this).transform.Find("beam pierce impact vfx"); if ((Object)(object)val != (Object)null) { tk2dSprite component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { ((BraveBehaviour)component).renderer.material.shader = shader; ((BraveBehaviour)component).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)component).renderer.material.SetFloat("_EmissivePower", EmissivePower); ((BraveBehaviour)component).renderer.material.SetFloat("_EmissiveColorPower", EmissiveColorPower); } } } } public static class BeamToolbox { public static BeamController FreeFireBeamFromAnywhere(Projectile projectileToSpawn, PlayerController owner, GameObject otherShooter, Vector2 fixedPosition, bool usesFixedPosition, float targetAngle, float duration, bool skipChargeTime = false, bool CanRotate = false, float RotationSpeedperSecond = 60f, bool DoPostProcess = false) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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) Vector2 val = Vector2.zero; SpeculativeRigidbody val2 = null; bool evenHasBody = false; if (usesFixedPosition) { val = fixedPosition; } else { if (Object.op_Implicit((Object)(object)otherShooter.GetComponent())) { val2 = otherShooter.GetComponent(); evenHasBody = true; } else if (Object.op_Implicit((Object)(object)otherShooter.GetComponentInChildren())) { val2 = otherShooter.GetComponentInChildren(); evenHasBody = true; } if (Object.op_Implicit((Object)(object)val2)) { val = val2.UnitCenter; } if ((Object)(object)otherShooter == (Object)null) { ETGModConsole.Log((object)"projectileToSpawn.gameObject is NULL", false); } if ((Object)(object)val2 == (Object)null) { ETGModConsole.Log((object)"rigidBod is NULL", false); } } if ((Object)(object)otherShooter != (Object)null && val == Vector2.zero) { val = TransformExtensions.PositionVector2(otherShooter.transform); } if (val != Vector2.zero) { BasicBeamController component = ((Component)projectileToSpawn).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SkipPostProcessing = DoPostProcess; } GameObject val3 = SpawnManager.SpawnProjectile(((Component)projectileToSpawn).gameObject, Vector2.op_Implicit(val), Quaternion.identity, true); Projectile component2 = val3.GetComponent(); component2.Owner = (GameActor)(object)owner; BeamController component3 = val3.GetComponent(); if (skipChargeTime) { component3.chargeDelay = 0f; component3.usesChargeDelay = false; } component3.Owner = (GameActor)(object)owner; component3.HitsPlayers = false; component3.HitsEnemies = true; Vector3 val4 = Vector2.op_Implicit(BraveMathCollege.DegreesToVector(targetAngle, 1f)); component3.Direction = Vector2.op_Implicit(val4); component3.Origin = val; ((MonoBehaviour)component2).StartCoroutine(HandleFreeFiringBeam(component3, otherShooter, val2, fixedPosition, usesFixedPosition, targetAngle, duration, evenHasBody, CanRotate, RotationSpeedperSecond)); return component3; } ETGModConsole.Log((object)"ERROR IN BEAM FREEFIRE CODE. SOURCEPOS WAS NULL, EITHER DUE TO INVALID FIXEDPOS OR SOURCE GAMEOBJECT.", false); return null; } private static IEnumerator HandleFreeFiringBeam(BeamController beam, GameObject otherShooter, SpeculativeRigidbody body, Vector2 fixedPosition, bool usesFixedPosition, float targetAngle, float duration, bool evenHasBody, bool CanRotate = false, float RotationSpeedPerSecond = 60f) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) float elapsed = 0f; yield return null; while (elapsed < duration && (!((Object)(object)otherShooter == (Object)null) || !evenHasBody) && !((Object)(object)beam == (Object)null)) { Vector2 sourcePos = ((!usesFixedPosition) ? (((Object)(object)((BraveBehaviour)body).projectile != (Object)null) ? body.UnitCenter : TransformExtensions.PositionVector2(otherShooter.transform)) : fixedPosition); elapsed += BraveTime.DeltaTime; if (CanRotate) { Vector3 vector = Vector2.op_Implicit(BraveMathCollege.DegreesToVector(Vector2Extensions.ToAngle(beam.Direction) + RotationSpeedPerSecond * BraveTime.DeltaTime, 1f)); beam.Direction = Vector2.op_Implicit(vector); } beam.Origin = sourcePos; beam.LateUpdatePosition(Vector2.op_Implicit(sourcePos)); yield return null; } beam.CeaseAttack(); } public static BeamController FreeFireBeamFromPosition(Projectile projectileToSpawn, PlayerController owner, Vector2 fixedPosition, float targetAngle, float duration, bool skipChargeTime = false, bool CanRotate = false, float RotationSpeedperSecond = 60f, bool DoPostProcess = false) { //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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if (fixedPosition != Vector2.zero) { BasicBeamController component = ((Component)projectileToSpawn).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SkipPostProcessing = DoPostProcess; } GameObject val = SpawnManager.SpawnProjectile(((Component)projectileToSpawn).gameObject, Vector2.op_Implicit(fixedPosition), Quaternion.identity, true); Projectile component2 = val.GetComponent(); component2.Owner = (GameActor)(object)owner; BeamController component3 = val.GetComponent(); if (skipChargeTime) { component3.chargeDelay = 0f; component3.usesChargeDelay = false; } component3.Owner = (GameActor)(object)owner; component3.HitsPlayers = false; component3.HitsEnemies = true; Vector3 val2 = Vector2.op_Implicit(BraveMathCollege.DegreesToVector(targetAngle, 1f)); component3.Direction = Vector2.op_Implicit(val2); component3.Origin = fixedPosition; ((MonoBehaviour)GameManager.Instance.Dungeon).StartCoroutine(HandleFreeFiringBeamFromPosition(component3, fixedPosition, targetAngle, duration, CanRotate, RotationSpeedperSecond)); return component3; } ETGModConsole.Log((object)"ERROR IN BEAM FREEFIRE CODE. SOURCEPOS WAS NULL, EITHER DUE TO INVALID FIXEDPOS OR SOURCE GAMEOBJECT.", false); return null; } private static IEnumerator HandleFreeFiringBeamFromPosition(BeamController beam, Vector2 fixedPosition, float targetAngle, float duration, bool CanRotate = false, float RotationSpeedPerSecond = 60f) { //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) float elapsed = 0f; yield return null; while (elapsed < duration && !((Object)(object)beam == (Object)null)) { elapsed += BraveTime.DeltaTime; if (CanRotate) { Vector3 vector = Vector2.op_Implicit(BraveMathCollege.DegreesToVector(Vector2Extensions.ToAngle(beam.Direction) + RotationSpeedPerSecond * BraveTime.DeltaTime, 1f)); beam.Direction = Vector2.op_Implicit(vector); } beam.Origin = fixedPosition; beam.LateUpdatePosition(Vector2.op_Implicit(fixedPosition)); yield return null; } if ((Object)(object)beam != (Object)null) { beam.CeaseAttack(); } } public static bool PosIsNearAnyBoneOnBeam(this BasicBeamController beam, Vector2 positionToCheck, float distance) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) foreach (BeamBone bone in beam.m_bones) { Vector2 bonePosition = beam.GetBonePosition(bone); if (Vector2.Distance(positionToCheck, bonePosition) < distance) { return true; } } return false; } public static int GetBoneCount(this BasicBeamController beam) { if (!beam.UsesBones) { return 1; } return beam.m_bones.Count(); } public static float GetFinalBoneDirection(this BasicBeamController beam) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (!beam.UsesBones) { return Vector2Extensions.ToAngle(((BeamController)beam).Direction); } LinkedListNode last = beam.m_bones.Last; return last.Value.RotationAngle; } public static BeamBone GetIndexedBone(this BasicBeamController beam, int boneIndex) { LinkedList bones = beam.m_bones; if (bones == null) { return null; } if (bones.ElementAt(boneIndex) == null) { Debug.LogError((object)"Attempted to fetch a beam bone at an invalid index"); return null; } return bones.ElementAt(boneIndex); } public static Vector2 GetIndexedBonePosition(this BasicBeamController beam, int boneIndex) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) LinkedList bones = beam.m_bones; if (bones.ElementAt(boneIndex) == null) { Debug.LogError((object)"Attempted to fetch the position of a beam bone at an invalid index"); return Vector2.zero; } if (!beam.UsesBones) { return ((BeamController)beam).Origin + BraveMathCollege.DegreesToVector(Vector2Extensions.ToAngle(((BeamController)beam).Direction), bones.ElementAt(boneIndex).PosX); } if (beam.ProjectileAndBeamMotionModule != null) { return bones.ElementAt(boneIndex).Position + beam.ProjectileAndBeamMotionModule.GetBoneOffset(bones.ElementAt(boneIndex), (BeamController)(object)beam, ((BraveBehaviour)beam).projectile.Inverted); } return bones.ElementAt(boneIndex).Position; } public static Vector2 GetBonePosition(this BasicBeamController beam, BeamBone bone) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (!beam.UsesBones) { return ((BeamController)beam).Origin + BraveMathCollege.DegreesToVector(Vector2Extensions.ToAngle(((BeamController)beam).Direction), bone.PosX); } if (beam.ProjectileAndBeamMotionModule != null) { return bone.Position + beam.ProjectileAndBeamMotionModule.GetBoneOffset(bone, (BeamController)(object)beam, ((BraveBehaviour)beam).projectile.Inverted); } return bone.Position; } } [HarmonyPatch] public static class CustomClipAmmoTypeToolbox { public static List addedAmmoTypes = new List(); public static void Init() { ((Component)ETGModMainBehaviour.Instance).gameObject.AddComponent(); } public static string AddCustomAmmoType(string name, dfAtlas atlas, string name_full, string name_empty, AmmoType ammoType = 14) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown GameObject val = new GameObject("sprite fg"); val.SetActive(false); FakePrefab.MarkAsFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); GameObject val2 = new GameObject("sprite bg"); val2.SetActive(false); FakePrefab.MarkAsFakePrefab(val2); Object.DontDestroyOnLoad((Object)(object)val2); dfTiledSprite val3 = val.SetupDfSpriteFromTexture(atlas, name_full); ((dfControl)val3).zindex = 7; dfTiledSprite val4 = val2.SetupDfSpriteFromTexture(atlas, name_empty); ((dfControl)val4).zindex = 5; GameUIAmmoType val5 = new GameUIAmmoType { ammoBarBG = val4, ammoBarFG = val3, ammoType = ammoType, customAmmoType = name }; addedAmmoTypes.Add(val5); foreach (GameUIAmmoController ammoController in GameUIRoot.Instance.ammoControllers) { Add(ref ammoController.ammoTypes, val5); } return name; } public static T SetupDfSpriteFromTexture(this GameObject obj, dfAtlas atlas, string texture_Name) where T : dfSprite { T orAddComponent = GameObjectExtensions.GetOrAddComponent(obj); ((dfSprite)orAddComponent).Atlas = atlas; ((dfSprite)orAddComponent).SpriteName = texture_Name; return orAddComponent; } public static void Add(ref T[] array, T toAdd) { List list = array.ToList(); list.Add(toAdd); array = Enumerable.ToArray(list); } } public class AddMissingAmmoTypes : MonoBehaviour { public void Update() { if (!GameUIRoot.HasInstance) { return; } foreach (GameUIAmmoController ammoController in GameUIRoot.Instance.ammoControllers) { foreach (GameUIAmmoType addedAmmoType in CustomClipAmmoTypeToolbox.addedAmmoTypes) { if (!ammoController.ammoTypes.Contains(addedAmmoType)) { CustomClipAmmoTypeToolbox.Add(ref ammoController.ammoTypes, addedAmmoType); } } } } } public static class EnemyBuilder { public enum AnimationType { Move, Idle, Fidget, Flight, Hit, Talk, Other } private static GameObject behaviorSpeculatorPrefab; public static Dictionary Dictionary = new Dictionary(); public static void Init() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid(StaticGUIDs.Fungun_GUID); behaviorSpeculatorPrefab = Object.Instantiate(((Component)orLoadByGuid).gameObject); foreach (Transform item in behaviorSpeculatorPrefab.transform) { Transform val = item; if ((Object)(object)val != (Object)(object)behaviorSpeculatorPrefab.transform) { Object.DestroyImmediate((Object)(object)val); } } Component[] components = behaviorSpeculatorPrefab.GetComponents(); foreach (Component val2 in components) { if ((object)((object)val2).GetType() != typeof(BehaviorSpeculator)) { Object.DestroyImmediate((Object)(object)val2); } } Object.DontDestroyOnLoad((Object)(object)behaviorSpeculatorPrefab); FakePrefab.MarkAsFakePrefab(behaviorSpeculatorPrefab); behaviorSpeculatorPrefab.SetActive(false); if ((Object)(object)((Component)orLoadByGuid).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)orLoadByGuid).GetComponent()); } Hook val3 = new Hook((MethodBase)typeof(EnemyDatabase).GetMethod("GetOrLoadByGuid", BindingFlags.Static | BindingFlags.Public), typeof(EnemyBuilder).GetMethod("GetOrLoadByGuid")); } public static AIActor GetOrLoadByGuid(Func orig, string guid) { foreach (string key in Dictionary.Keys) { if (key == guid) { return Dictionary[key].GetComponent(); } } return orig(guid); } public static GameObject BuildPrefab(string name, string guid, string defaultSpritePath, IntVector2 hitboxOffset, IntVector2 hitBoxSize, bool HasAiShooter, bool UsesAttackGroup = false, bool usesDefaultEngage = true) { //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: 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_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown if (HasAiShooter) { AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("3cadf10c489b461f9fb8814abc1a09c1"); behaviorSpeculatorPrefab = Object.Instantiate(((Component)orLoadByGuid).gameObject); foreach (Transform item2 in behaviorSpeculatorPrefab.transform) { Transform val = item2; if ((Object)(object)val != (Object)(object)behaviorSpeculatorPrefab.transform) { Object.DestroyImmediate((Object)(object)val); } } Component[] components = behaviorSpeculatorPrefab.GetComponents(); foreach (Component val2 in components) { if ((object)((object)val2).GetType() != typeof(BehaviorSpeculator)) { Object.DestroyImmediate((Object)(object)val2); } } Object.DontDestroyOnLoad((Object)(object)behaviorSpeculatorPrefab); FakePrefab.MarkAsFakePrefab(behaviorSpeculatorPrefab); behaviorSpeculatorPrefab.SetActive(false); } if (Dictionary.ContainsKey(guid)) { ETGModConsole.Log((object)"EnemyBuilder: Yea something went wrong. Complain to Neighborino about it.", false); return null; } GameObject val3 = Object.Instantiate(behaviorSpeculatorPrefab); ((Object)val3).name = name; tk2dSprite component = SpriteBuilder.SpriteFromResource(defaultSpritePath, val3, (Assembly)null).GetComponent(); SpriteBuilder.SetUpSpeculativeRigidbody(component, hitboxOffset, hitBoxSize).CollideWithOthers = true; val3.AddComponent(); val3.AddComponent(); GameObjectExtensions.GetOrAddComponent(val3); KnockbackDoer val4 = val3.AddComponent(); val4.weight = 1f; HealthHaver val5 = val3.AddComponent(); val5.RegisterBodySprite((tk2dBaseSprite)(object)component, false, 0); val5.PreventAllDamage = false; val5.SetHealthMaximum(15000f, (float?)null, false); val5.FullHeal(); AIActor val6 = val3.AddComponent(); val6.State = (ActorState)2; val6.EnemyGuid = guid; val6.CanTargetPlayers = true; ((GameActor)val6).HasShadow = false; ((BraveBehaviour)val6).specRigidbody.CollideWithOthers = false; ((BraveBehaviour)val6).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)val6).specRigidbody.PixelColliders.Clear(); val6.HasBeenEngaged = false; val6.reinforceType = (ReinforceType)0; val6.invisibleUntilAwaken = true; val6.AwakenAnimType = (AwakenAnimationType)0; ((BraveBehaviour)val6).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 15, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)val6).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 15, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); val6.PreventBlackPhantom = false; BehaviorSpeculator component2 = val3.GetComponent(); component2.MovementBehaviors = new List(); component2.TargetBehaviors = new List(); component2.OverrideBehaviors = new List(); component2.OtherBehaviors = new List(); component2.AttackBehaviors = new List(); if (UsesAttackGroup) { component2.AttackBehaviorGroup.AttackBehaviors = new List(); } Material material = ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material; material.mainTexture = ((BraveBehaviour)((BraveBehaviour)component2).sprite).renderer.material.mainTexture; material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); material.DisableKeyword("BRIGHTNESS_CLAMP_OFF"); AIBulletBank val7 = val3.AddComponent(); val7.Bullets = new List(); EnemyDatabaseEntry item = new EnemyDatabaseEntry { myGuid = guid, placeableWidth = 2, placeableHeight = 2, isNormalEnemy = true }; ((AssetBundleDatabase)(object)EnemyDatabase.Instance).Entries.Add(item); Dictionary.Add(guid, val3); FakePrefab.MarkAsFakePrefab(val3); val3.SetActive(false); return val3; } public static GameObject BuildPrefabBundle(string name, string guid, tk2dSpriteCollectionData customCollection, int spriteID, IntVector2 hitboxOffset, IntVector2 hitBoxSize, bool HasAiShooter, bool UsesAttackGroup = false) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038f: 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_039d: 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_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: 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_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Expected O, but got Unknown //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Expected O, but got Unknown if (HasAiShooter) { AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("3cadf10c489b461f9fb8814abc1a09c1"); behaviorSpeculatorPrefab = Object.Instantiate(((Component)orLoadByGuid).gameObject); foreach (Transform item2 in behaviorSpeculatorPrefab.transform) { Transform val = item2; if ((Object)(object)val != (Object)(object)behaviorSpeculatorPrefab.transform) { Object.DestroyImmediate((Object)(object)val); } } Component[] components = behaviorSpeculatorPrefab.GetComponents(); foreach (Component val2 in components) { if ((object)((object)val2).GetType() != typeof(BehaviorSpeculator)) { Object.DestroyImmediate((Object)(object)val2); } } Object.DontDestroyOnLoad((Object)(object)behaviorSpeculatorPrefab); FakePrefab.MarkAsFakePrefab(behaviorSpeculatorPrefab); behaviorSpeculatorPrefab.SetActive(false); } if (Dictionary.ContainsKey(guid)) { ETGModConsole.Log((object)"EnemyBuilder: Yea something went wrong. Complain to Neighborino about it.", false); return null; } if ((Object)(object)customCollection == (Object)null) { ETGModConsole.Log((object)"cullection is null", false); } if (customCollection.spriteDefinitions == null) { ETGModConsole.Log((object)"spriteDefinitions is null", false); } if (customCollection.spriteDefinitions[spriteID] == null) { ETGModConsole.Log((object)"spriteID is null", false); } GameObject val3 = Object.Instantiate(behaviorSpeculatorPrefab); ((Object)val3).name = name; tk2dSprite val4 = val3.AddComponent(); ((tk2dBaseSprite)val4).Collection = customCollection; customCollection.InitDictionary(); ((tk2dBaseSprite)val4).SetSprite(customCollection, spriteID); ((tk2dBaseSprite)val4).Build(); ((tk2dBaseSprite)val4).SortingOrder = 0; ((tk2dBaseSprite)val4).IsPerpendicular = true; GameObjectExtensions.GetOrAddComponent(val3).sprite = (tk2dBaseSprite)(object)val4; SpriteBuilder.SetUpSpeculativeRigidbody(val4, hitboxOffset, hitBoxSize).CollideWithOthers = true; val3.AddComponent(); val3.AddComponent(); GameObjectExtensions.GetOrAddComponent(val3); KnockbackDoer val5 = val3.AddComponent(); val5.weight = 1f; HealthHaver val6 = val3.AddComponent(); val6.RegisterBodySprite((tk2dBaseSprite)(object)val4, false, 0); val6.PreventAllDamage = false; val6.SetHealthMaximum(15000f, (float?)null, false); val6.FullHeal(); AIActor val7 = val3.AddComponent(); ((BraveBehaviour)val7).sprite = (tk2dBaseSprite)(object)val4; val7.State = (ActorState)2; val7.EnemyGuid = guid; val7.CanTargetPlayers = true; ((GameActor)val7).HasShadow = false; ((BraveBehaviour)val7).specRigidbody.CollideWithOthers = false; ((BraveBehaviour)val7).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)val7).specRigidbody.PixelColliders.Clear(); val7.HasBeenEngaged = false; val7.reinforceType = (ReinforceType)0; val7.invisibleUntilAwaken = true; val7.AwakenAnimType = (AwakenAnimationType)0; ((GameActor)val7).IsGone = true; ((BraveBehaviour)val7).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 15, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)val7).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 15, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); val7.PreventBlackPhantom = false; BehaviorSpeculator component = val3.GetComponent(); component.MovementBehaviors = new List(); component.TargetBehaviors = new List(); component.OverrideBehaviors = new List(); component.OtherBehaviors = new List(); if (UsesAttackGroup) { component.AttackBehaviorGroup.AttackBehaviors = new List(); } else { component.AttackBehaviors = new List(); } Material material = ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material; material.mainTexture = ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.mainTexture; material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); material.DisableKeyword("BRIGHTNESS_CLAMP_OFF"); AIBulletBank val8 = val3.AddComponent(); val8.Bullets = new List(); EnemyDatabaseEntry item = new EnemyDatabaseEntry { myGuid = guid, placeableWidth = 2, placeableHeight = 2, isNormalEnemy = true }; ((AssetBundleDatabase)(object)EnemyDatabase.Instance).Entries.Add(item); Dictionary.Add(guid, val3); Object.DontDestroyOnLoad((Object)(object)val3); FakePrefab.MarkAsFakePrefab(val3); val3.SetActive(false); return val3; } public static GameObject BuildPrefabBundle(string name, string guid, tk2dSpriteCollectionData customCollection, string spriteName, IntVector2 hitboxOffset, IntVector2 hitBoxSize, bool HasAiShooter, bool UsesAttackGroup = false) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Expected O, but got Unknown //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Expected O, but got Unknown if (HasAiShooter) { AIActor orLoadByGuid = EnemyDatabase.GetOrLoadByGuid("3cadf10c489b461f9fb8814abc1a09c1"); behaviorSpeculatorPrefab = Object.Instantiate(((Component)orLoadByGuid).gameObject); foreach (Transform item2 in behaviorSpeculatorPrefab.transform) { Transform val = item2; if ((Object)(object)val != (Object)(object)behaviorSpeculatorPrefab.transform) { Object.DestroyImmediate((Object)(object)val); } } Component[] components = behaviorSpeculatorPrefab.GetComponents(); foreach (Component val2 in components) { if ((object)((object)val2).GetType() != typeof(BehaviorSpeculator)) { Object.DestroyImmediate((Object)(object)val2); } } Object.DontDestroyOnLoad((Object)(object)behaviorSpeculatorPrefab); FakePrefab.MarkAsFakePrefab(behaviorSpeculatorPrefab); behaviorSpeculatorPrefab.SetActive(false); } if (Dictionary.ContainsKey(guid)) { ETGModConsole.Log((object)"EnemyBuilder: Yea something went wrong. Complain to Neighborino about it.", false); return null; } if ((Object)(object)customCollection == (Object)null) { ETGModConsole.Log((object)"cullection is null", false); } if (customCollection.spriteDefinitions == null) { ETGModConsole.Log((object)"spriteDefinitions is null", false); } if (customCollection.spriteDefinitions[customCollection.GetSpriteIdByName(spriteName)] == null) { ETGModConsole.Log((object)"spriteID is null", false); } GameObject val3 = Object.Instantiate(behaviorSpeculatorPrefab); ((Object)val3).name = name; tk2dSprite val4 = val3.AddComponent(); ((tk2dBaseSprite)val4).Collection = customCollection; customCollection.InitDictionary(); ((tk2dBaseSprite)val4).SetSprite(customCollection, customCollection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val4).Build(); ((tk2dBaseSprite)val4).SortingOrder = 0; ((tk2dBaseSprite)val4).IsPerpendicular = true; GameObjectExtensions.GetOrAddComponent(val3).sprite = (tk2dBaseSprite)(object)val4; SpriteBuilder.SetUpSpeculativeRigidbody(val4, hitboxOffset, hitBoxSize).CollideWithOthers = true; val3.AddComponent(); AIAnimator val5 = val3.AddComponent(); val5.OtherVFX = new List(0); GameObjectExtensions.GetOrAddComponent(val3); KnockbackDoer val6 = val3.AddComponent(); val6.weight = 1f; HealthHaver val7 = val3.AddComponent(); val7.RegisterBodySprite((tk2dBaseSprite)(object)val4, false, 0); val7.PreventAllDamage = false; val7.SetHealthMaximum(15000f, (float?)null, false); val7.FullHeal(); AIActor val8 = val3.AddComponent(); ((BraveBehaviour)val8).sprite = (tk2dBaseSprite)(object)val4; val8.State = (ActorState)2; val8.EnemyGuid = guid; val8.CanTargetPlayers = true; ((GameActor)val8).HasShadow = false; ((BraveBehaviour)val8).specRigidbody.CollideWithOthers = false; ((BraveBehaviour)val8).specRigidbody.CollideWithTileMap = true; ((BraveBehaviour)val8).specRigidbody.PixelColliders.Clear(); val8.HasBeenEngaged = false; val8.reinforceType = (ReinforceType)0; val8.invisibleUntilAwaken = true; val8.AwakenAnimType = (AwakenAnimationType)0; ((GameActor)val8).IsGone = true; ((BraveBehaviour)val8).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)3, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 15, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); ((BraveBehaviour)val8).specRigidbody.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)2, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = 0, ManualOffsetY = 0, ManualWidth = 15, ManualHeight = 17, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); val8.PreventBlackPhantom = false; BehaviorSpeculator component = val3.GetComponent(); component.MovementBehaviors = new List(); component.TargetBehaviors = new List(); component.OverrideBehaviors = new List(); component.OtherBehaviors = new List(); if (UsesAttackGroup) { component.AttackBehaviorGroup.AttackBehaviors = new List(); } else { component.AttackBehaviors = new List(); } Material material = ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material; material.mainTexture = ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.mainTexture; material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); material.DisableKeyword("BRIGHTNESS_CLAMP_OFF"); AIBulletBank val9 = val3.AddComponent(); val9.Bullets = new List(); EnemyDatabaseEntry item = new EnemyDatabaseEntry { myGuid = guid, placeableWidth = 2, placeableHeight = 2, isNormalEnemy = true }; ((AssetBundleDatabase)(object)EnemyDatabase.Instance).Entries.Add(item); Dictionary.Add(guid, val3); Object.DontDestroyOnLoad((Object)(object)val3); FakePrefab.MarkAsFakePrefab(val3); val3.SetActive(false); return val3; } public static void AddEnemyToDatabase(GameObject EnemyPrefab, string EnemyGUID) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown EnemyDatabaseEntry item = new EnemyDatabaseEntry { myGuid = EnemyGUID, placeableWidth = 2, placeableHeight = 2, isNormalEnemy = true, path = EnemyGUID, isInBossTab = false, encounterGuid = EnemyGUID }; ((AssetBundleDatabase)(object)EnemyDatabase.Instance).Entries.Add(item); EncounterDatabaseEntry item2 = new EncounterDatabaseEntry(((BraveBehaviour)EnemyPrefab.GetComponent()).encounterTrackable) { path = EnemyGUID, myGuid = ((BraveBehaviour)EnemyPrefab.GetComponent()).encounterTrackable.EncounterGuid }; ((AssetBundleDatabase)(object)EncounterDatabase.Instance).Entries.Add(item2); } public static tk2dSpriteAnimationClip AddAnimation(this GameObject obj, string name, string spriteDirectory, int fps, AnimationType type, DirectionType directionType = 0, WrapMode wrapMode = 0, FlipType flipType = 0, bool assignAnimation = true) { //IL_000a: 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_0083: Expected I4, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //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_00ab: Unknown result type (might be due to invalid IL or missing references) AIAnimator orAddComponent = GameObjectExtensions.GetOrAddComponent(obj); DirectionalAnimation val = orAddComponent.GetDirectionalAnimation(name, directionType, type); if (val == null) { DirectionalAnimation val2 = new DirectionalAnimation(); val2.AnimNames = new string[0]; val2.Flipped = (FlipType[])(object)new FlipType[0]; val2.Type = directionType; val2.Prefix = string.Empty; val = val2; } val.AnimNames = val.AnimNames.Concat(new string[1] { name }).ToArray(); val.Flipped = val.Flipped.Concat((IEnumerable)(object)new FlipType[1] { (FlipType)(int)flipType }).ToArray(); if (assignAnimation) { orAddComponent.AssignDirectionalAnimation(name, val, type); } return BuildAnimation(orAddComponent, name, spriteDirectory, fps, wrapMode); } public static tk2dSpriteAnimationClip BuildAnimation(AIAnimator aiAnimator, string name, string spriteDirectory, int fps, WrapMode wrapMode = 0) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) tk2dSpriteCollectionData val = ((Component)aiAnimator).GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = SpriteBuilder.ConstructCollection(((Component)aiAnimator).gameObject, ((Object)aiAnimator).name + "_collection", false); } string[] resourceNames = ResourceExtractor.GetResourceNames((Assembly)null); List list = new List(); for (int i = 0; i < resourceNames.Length; i++) { if (resourceNames[i].StartsWith(spriteDirectory.Replace('/', '.'), StringComparison.OrdinalIgnoreCase)) { list.Add(SpriteBuilder.AddSpriteToCollection(resourceNames[i], val, (Assembly)null)); } } tk2dSpriteAnimationClip val2 = SpriteBuilder.AddAnimation(((BraveBehaviour)aiAnimator).spriteAnimator, val, list, name, (WrapMode)0, 15f); val2.fps = fps; val2.wrapMode = wrapMode; return val2; } public static DirectionalAnimation GetDirectionalAnimation(this AIAnimator aiAnimator, string name, DirectionType directionType, AnimationType type) { DirectionalAnimation val = null; switch (type) { case AnimationType.Idle: val = aiAnimator.IdleAnimation; break; case AnimationType.Move: val = aiAnimator.MoveAnimation; break; case AnimationType.Flight: val = aiAnimator.FlightAnimation; break; case AnimationType.Hit: val = aiAnimator.HitAnimation; break; case AnimationType.Talk: val = aiAnimator.TalkAnimation; break; } if (val != null) { return val; } return null; } public static void AssignDirectionalAnimation(this AIAnimator aiAnimator, string name, DirectionalAnimation animation, AnimationType type) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown switch (type) { case AnimationType.Idle: aiAnimator.IdleAnimation = animation; return; case AnimationType.Move: aiAnimator.MoveAnimation = animation; return; case AnimationType.Flight: aiAnimator.FlightAnimation = animation; return; case AnimationType.Hit: aiAnimator.HitAnimation = animation; return; case AnimationType.Talk: aiAnimator.TalkAnimation = animation; return; case AnimationType.Fidget: aiAnimator.IdleFidgetAnimations.Add(animation); return; } if (aiAnimator.OtherAnimations == null) { aiAnimator.OtherAnimations = new List(); } aiAnimator.OtherAnimations.Add(new NamedDirectionalAnimation { anim = animation, name = name }); } public static void DuplicateAIShooterAndAIBulletBank(GameObject targetObject, AIShooter sourceShooter, AIBulletBank sourceBulletBank, int startingGunOverrideID = 0, Transform gunAttachPointOverride = null, Transform bulletScriptAttachPointOverride = null, PlayerHandController overrideHandObject = null) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Expected O, but got Unknown //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)targetObject.GetComponent()) && Object.op_Implicit((Object)(object)targetObject.GetComponent())) { return; } if (!Object.op_Implicit((Object)(object)targetObject.GetComponent())) { AIBulletBank val = targetObject.AddComponent(); val.Bullets = new List(0); if (sourceBulletBank.Bullets.Count > 0) { foreach (Entry bullet in sourceBulletBank.Bullets) { val.Bullets.Add(new Entry { Name = bullet.Name, BulletObject = bullet.BulletObject, OverrideProjectile = bullet.OverrideProjectile, ProjectileData = new ProjectileData { damage = bullet.ProjectileData.damage, speed = bullet.ProjectileData.speed, range = bullet.ProjectileData.range, force = bullet.ProjectileData.force, damping = bullet.ProjectileData.damping, UsesCustomAccelerationCurve = bullet.ProjectileData.UsesCustomAccelerationCurve, AccelerationCurve = bullet.ProjectileData.AccelerationCurve, CustomAccelerationCurveDuration = bullet.ProjectileData.CustomAccelerationCurveDuration, onDestroyBulletScript = bullet.ProjectileData.onDestroyBulletScript, IgnoreAccelCurveTime = bullet.ProjectileData.IgnoreAccelCurveTime }, PlayAudio = bullet.PlayAudio, AudioSwitch = bullet.AudioSwitch, AudioEvent = bullet.AudioEvent, AudioLimitOncePerFrame = bullet.AudioLimitOncePerFrame, AudioLimitOncePerAttack = bullet.AudioLimitOncePerAttack, MuzzleFlashEffects = new VFXPool { effects = bullet.MuzzleFlashEffects.effects, type = bullet.MuzzleFlashEffects.type }, MuzzleLimitOncePerFrame = bullet.MuzzleLimitOncePerFrame, MuzzleInheritsTransformDirection = bullet.MuzzleInheritsTransformDirection, ShellTransform = bullet.ShellTransform, ShellPrefab = bullet.ShellPrefab, ShellForce = bullet.ShellForce, ShellForceVariance = bullet.ShellForceVariance, DontRotateShell = bullet.DontRotateShell, ShellGroundOffset = bullet.ShellGroundOffset, ShellsLimitOncePerFrame = bullet.ShellsLimitOncePerFrame, rampBullets = bullet.rampBullets, conditionalMinDegFromNorth = bullet.conditionalMinDegFromNorth, forceCanHitEnemies = bullet.forceCanHitEnemies, suppressHitEffectsIfOffscreen = bullet.suppressHitEffectsIfOffscreen, preloadCount = bullet.preloadCount }); } } val.useDefaultBulletIfMissing = true; val.transforms = new List(); if (sourceBulletBank.transforms != null && sourceBulletBank.transforms.Count > 0) { foreach (Transform transform in sourceBulletBank.transforms) { val.transforms.Add(transform); } } ((BraveBehaviour)val).RegenerateCache(); } if (!Object.op_Implicit((Object)(object)targetObject.GetComponent())) { AIShooter val2 = targetObject.AddComponent(); val2.volley = sourceShooter.volley; if (startingGunOverrideID != 0) { val2.equippedGunId = startingGunOverrideID; } else { val2.equippedGunId = sourceShooter.equippedGunId; } val2.shouldUseGunReload = true; val2.volleyShootPosition = sourceShooter.volleyShootPosition; val2.volleyShellCasing = sourceShooter.volleyShellCasing; val2.volleyShellTransform = sourceShooter.volleyShellTransform; val2.volleyShootVfx = sourceShooter.volleyShootVfx; val2.usesOctantShootVFX = sourceShooter.usesOctantShootVFX; val2.bulletName = sourceShooter.bulletName; val2.customShootCooldownPeriod = sourceShooter.customShootCooldownPeriod; val2.doesScreenShake = sourceShooter.doesScreenShake; val2.rampBullets = sourceShooter.rampBullets; val2.rampStartHeight = sourceShooter.rampStartHeight; val2.rampTime = sourceShooter.rampTime; if (Object.op_Implicit((Object)(object)gunAttachPointOverride)) { val2.gunAttachPoint = gunAttachPointOverride; } else { val2.gunAttachPoint = sourceShooter.gunAttachPoint; } if (Object.op_Implicit((Object)(object)bulletScriptAttachPointOverride)) { val2.bulletScriptAttachPoint = bulletScriptAttachPointOverride; } else { val2.bulletScriptAttachPoint = sourceShooter.bulletScriptAttachPoint; } val2.overallGunAttachOffset = sourceShooter.overallGunAttachOffset; val2.flippedGunAttachOffset = sourceShooter.flippedGunAttachOffset; if (Object.op_Implicit((Object)(object)overrideHandObject)) { val2.handObject = overrideHandObject; } else { val2.handObject = sourceShooter.handObject; } val2.AllowTwoHands = sourceShooter.AllowTwoHands; val2.ForceGunOnTop = sourceShooter.ForceGunOnTop; val2.IsReallyBigBoy = sourceShooter.IsReallyBigBoy; val2.BackupAimInMoveDirection = sourceShooter.BackupAimInMoveDirection; ((BraveBehaviour)val2).RegenerateCache(); } } } public class DefaultSpawnEngage : CustomEngageDoer { private bool m_isFinished; public override bool IsFinished => m_isFinished; public void Awake() { ((CustomEngageDoer)this).StartIntro(); } public void Start() { ((CustomEngageDoer)this).StartIntro(); } public void Update() { } public override void StartIntro() { if (!m_isFinished) { ((MonoBehaviour)this).StartCoroutine(DoIntro()); } } private IEnumerator DoIntro() { m_isFinished = false; ((Behaviour)((BraveBehaviour)this).aiActor).enabled = false; ((Behaviour)((BraveBehaviour)this).behaviorSpeculator).enabled = false; ((BraveBehaviour)this).aiActor.ToggleRenderers(false); ((Behaviour)((BraveBehaviour)this).specRigidbody).enabled = false; ((GameActor)((BraveBehaviour)this).aiActor).IsGone = true; ((BraveBehaviour)this).aiActor.ToggleRenderers(false); ((BraveBehaviour)this).aiActor.State = (ActorState)1; if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiShooter)) { ((BraveBehaviour)this).aiShooter.ToggleGunAndHandRenderers(false, "DefaultSpawnToggle"); } ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = true; ((Behaviour)((BraveBehaviour)this).aiActor).enabled = true; ((Behaviour)((BraveBehaviour)this).specRigidbody).enabled = true; ((GameActor)((BraveBehaviour)this).aiActor).IsGone = false; ((BraveBehaviour)this).aiActor.IgnoreForRoomClear = false; ((BraveBehaviour)this).aiActor.ToggleRenderers(true); ((BraveBehaviour)((BraveBehaviour)this).aiActor).renderer.enabled = false; ((BraveBehaviour)this).aiActor.State = (ActorState)1; int playerMask = CollisionMask.LayerToMask((CollisionLayer)1, (CollisionLayer)0); ((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody.AddCollisionLayerIgnoreOverride(playerMask); ((Behaviour)((BraveBehaviour)this).behaviorSpeculator).enabled = false; if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiShooter)) { ((BraveBehaviour)this).aiShooter.ToggleGunAndHandRenderers(false, "DefaultSpawnToggle"); } if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).aiShooter)) { ((BraveBehaviour)this).aiShooter.ToggleGunAndHandRenderers(true, "DefaultSpawnToggle"); } yield return (object)new WaitForSeconds(1.5f); ((BraveBehaviour)((BraveBehaviour)this).aiActor).healthHaver.PreventAllDamage = false; ((Behaviour)((BraveBehaviour)this).behaviorSpeculator).enabled = true; ((BraveBehaviour)((BraveBehaviour)this).aiActor).renderer.enabled = true; ((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody.RemoveCollisionLayerIgnoreOverride(playerMask); ((BraveBehaviour)this).aiActor.HasBeenEngaged = true; ((BraveBehaviour)this).aiActor.State = (ActorState)2; ((CustomEngageDoer)this).StartIntro(); m_isFinished = true; } } public class EngageLate : CustomEngageDoer { private RoomHandler m_StartRoom; private bool HasEnabled; private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 if ((int)((BraveBehaviour)this).aiActor.State != 2) { ((Behaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody).enabled = false; } else if (!HasEnabled) { HasEnabled = true; ((Behaviour)((BraveBehaviour)((BraveBehaviour)this).aiActor).specRigidbody).enabled = true; } } private void CheckPlayerRoom() { if (((DungeonPlaceableBehaviour)GameManager.Instance.PrimaryPlayer).GetAbsoluteParentRoom() != null && ((DungeonPlaceableBehaviour)GameManager.Instance.PrimaryPlayer).GetAbsoluteParentRoom() == m_StartRoom) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(LateEngage()); } } private IEnumerator LateEngage() { yield return (object)new WaitForSeconds(0.8f); ((BraveBehaviour)this).aiActor.HasBeenEngaged = true; } private void Start() { HasEnabled = false; m_StartRoom = ((DungeonPlaceableBehaviour)((BraveBehaviour)this).aiActor).GetAbsoluteParentRoom(); } } public static class GunInt { private static List GunSpriteDefs = new List(); public static tk2dSpriteCollectionData ammonomiconCollection = AmmonomiconController.ForceInstance.EncounterIconCollection; public static void SetupSprite(this Gun gun, tk2dSpriteCollectionData collection = null, string defaultSprite = null) { if (collection == null) { collection = Databases.Items.WeaponCollection; } if (defaultSprite != null) { GunSpriteDefs.Add(collection.GetSpriteDefinition(defaultSprite)); ((BraveBehaviour)gun).encounterTrackable.journalData.AmmonomiconSprite = defaultSprite; } gun.emptyAnimation = null; tk2dBaseSprite sprite = gun.GetSprite(); tk2dSpriteCollectionData val = collection; int num = (gun.DefaultSpriteID = collection.GetSpriteIdByName(((BraveBehaviour)gun).encounterTrackable.journalData.AmmonomiconSprite)); int num2 = num; sprite.SetSprite(val, num2); } public static void FinalizeSprites() { tk2dSpriteDefinition[] spriteDefinitions = ammonomiconCollection.spriteDefinitions; tk2dSpriteDefinition[] spriteDefinitions2 = spriteDefinitions.Concat(GunSpriteDefs.ToArray()).ToArray(); ammonomiconCollection.spriteDefinitions = spriteDefinitions2; for (int i = 0; i < ammonomiconCollection.spriteDefinitions.Length; i++) { ammonomiconCollection.spriteNameLookupDict[ammonomiconCollection.spriteDefinitions[i].name] = i; } } } public static class GunJsonEmbedder { public static void EmbedJsonDataFromAssembly(Assembly asmb, tk2dSpriteCollectionData data, string path) { //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) if ((object)asmb == null) { return; } path = path.Replace("/", ".").Replace("\\", "."); if (!path.EndsWith(".")) { path += "."; } List list = new List(); string[] manifestResourceNames = asmb.GetManifestResourceNames(); string[] array = manifestResourceNames; foreach (string text in array) { if (text.StartsWith(path) && text.Length > path.Length) { string[] source = text.Substring(path.LastIndexOf(".") + 1).Split(new char[1] { '.' }); string text2 = source.Last(); if (text2.ToLowerInvariant() == "json" || text2.ToLowerInvariant() == "jtk2d") { list.Add(text); } } } foreach (string item in list) { string[] array2 = item.Substring(path.LastIndexOf(".") + 1).Split(new char[1] { '.' }); string text3 = array2[array2.Count() - 2]; if (text3 == null || (((Object)(object)data != (Object)null) ? data.spriteDefinitions : null) == null || data.Count <= 0) { continue; } int spriteIdByName = data.GetSpriteIdByName(text3, -1); if (spriteIdByName <= -1) { continue; } using Stream stream = asmb.GetManifestResourceStream(item); AssetSpriteData val = default(AssetSpriteData); try { val = JSONHelper.ReadJSON(stream); } catch { ETGModConsole.Log((object)("Error: invalid json at project path " + item), false); goto end_IL_01b4; } data.SetAttachPoints(spriteIdByName, val.attachPoints); end_IL_01b4:; } } } public static class ProjectileToolbox { public static List ConstructListOfSameValues(T value, int length) { List list = new List(); for (int i = 0; i < length; i++) { list.Add(value); } return list; } public static tk2dSpriteDefinition SetProjectileCollisionRight(this Projectile proj, string name, tk2dSpriteCollectionData data, int pixelWidth, int pixelHeight, bool lightened = true, Anchor anchor = 0, int? overrideColliderPixelWidth = null, int? overrideColliderPixelHeight = null, bool anchorChangesCollider = true, bool fixesScale = false, int? overrideColliderOffsetX = null, int? overrideColliderOffsetY = null, Projectile overrideProjectileToCopyFrom = null) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) try { ((BraveBehaviour)proj).sprite.Collection = data; ETGMod.GetAnySprite((BraveBehaviour)(object)proj).spriteId = data.GetSpriteIdByName(name); tk2dSpriteDefinition val = SetupDefinitionForProjectileSprite(name, ETGMod.GetAnySprite((BraveBehaviour)(object)proj).spriteId, data, pixelWidth, pixelHeight, lightened, overrideColliderPixelWidth, overrideColliderPixelHeight, overrideColliderOffsetX, overrideColliderOffsetY, overrideProjectileToCopyFrom); val.ConstructOffsetsFromAnchor(anchor, Vector2.op_Implicit(val.position3), fixesScale, anchorChangesCollider); ETGMod.GetAnySprite((BraveBehaviour)(object)proj).scale = new Vector3(1f, 1f, 1f); ((BraveBehaviour)proj).transform.localScale = new Vector3(1f, 1f, 1f); ((BraveBehaviour)ETGMod.GetAnySprite((BraveBehaviour)(object)proj)).transform.localScale = new Vector3(1f, 1f, 1f); proj.AdditionalScaleMultiplier = 1f; return val; } catch (Exception ex) { ETGModConsole.Log((object)"Ooops! Seems like something got very, Very, VERY wrong. Here's the exception:", false); ETGModConsole.Log((object)ex.ToString(), false); return null; } } private static tk2dSpriteDefinition SetupDefinitionForProjectileSprite(string name, int id, tk2dSpriteCollectionData data, int pixelWidth, int pixelHeight, bool lightened = true, int? overrideColliderPixelWidth = null, int? overrideColliderPixelHeight = null, int? overrideColliderOffsetX = null, int? overrideColliderOffsetY = null, Projectile overrideProjectileToCopyFrom = null) { //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) if (!overrideColliderPixelWidth.HasValue) { overrideColliderPixelWidth = pixelWidth; } if (!overrideColliderPixelHeight.HasValue) { overrideColliderPixelHeight = pixelHeight; } if (!overrideColliderOffsetX.HasValue) { overrideColliderOffsetX = 0; } if (!overrideColliderOffsetY.HasValue) { overrideColliderOffsetY = 0; } float num = 16f; float num2 = 16f; float num3 = (float)pixelWidth / num; float num4 = (float)pixelHeight / num; float num5 = (float)overrideColliderPixelWidth.Value / num2; float num6 = (float)overrideColliderPixelHeight.Value / num2; float num7 = (float)overrideColliderOffsetX.Value / num2; float num8 = (float)overrideColliderOffsetY.Value / num2; tk2dSpriteDefinition val = GunTools.CopyDefinitionFrom(Databases.Items.ProjectileCollection.inst.spriteDefinitions[ETGMod.GetAnySprite((BraveBehaviour)(object)(overrideProjectileToCopyFrom ?? ((Gun)/*isinst with value type is only supported in some contexts*/).DefaultModule.projectiles[0])).spriteId]); val.boundsDataCenter = new Vector3(num3 / 2f, num4 / 2f, 0f); val.boundsDataExtents = new Vector3(num3, num4, 0f); val.untrimmedBoundsDataCenter = new Vector3(num3 / 2f, num4 / 2f, 0f); val.untrimmedBoundsDataExtents = new Vector3(num3, num4, 0f); val.texelSize = new Vector2(0.0625f, 0.0625f); val.position0 = new Vector3(0f, 0f, 0f); val.position1 = new Vector3(0f + num3, 0f, 0f); val.position2 = new Vector3(0f, 0f + num4, 0f); val.position3 = new Vector3(0f + num3, 0f + num4, 0f); val.materialInst.mainTexture = data.spriteDefinitions[id].materialInst.mainTexture; val.uvs = data.spriteDefinitions[id].uvs.ToArray(); val.colliderVertices = (Vector3[])(object)new Vector3[2]; val.colliderVertices[0] = new Vector3(num7, num8, 0f); val.colliderVertices[1] = new Vector3(num5 / 2f, num6 / 2f); val.name = name; data.spriteDefinitions[id] = val; return val; } public static void AnimateProjectileBundle(this Projectile proj, string defaultClipName, tk2dSpriteCollectionData data, tk2dSpriteAnimation animation, string animationName, List pixelSizes, List lighteneds, List anchors, List anchorsChangeColliders, List fixesScales, List manualOffsets, List overrideColliderPixelSizes, List overrideColliderOffsets, List overrideProjectilesToCopyFrom) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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_0188: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator == (Object)null) { ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator = ((Component)((BraveBehaviour)proj).sprite).gameObject.AddComponent(); } ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library = animation; if (defaultClipName != null) { ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.DefaultClipId = animation.GetClipIdByName(defaultClipName); } ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.playAutomatically = true; for (int i = 0; i < animation.GetClipByName(animationName).frames.Length; i++) { tk2dSpriteAnimationFrame val = animation.GetClipByName(animationName).frames[i]; IntVector2 val2 = pixelSizes[i]; IntVector2? val3 = overrideColliderPixelSizes[i]; IntVector2? val4 = overrideColliderOffsets[i]; Vector3? val5 = manualOffsets[i]; bool changesCollider = anchorsChangeColliders[i]; bool fixesScale = fixesScales[i]; if (!val5.HasValue) { val5 = Vector2.op_Implicit(Vector2.zero); } Anchor anchor = anchors[i]; bool lightened = lighteneds[i]; Projectile overrideProjectileToCopyFrom = overrideProjectilesToCopyFrom[i]; int? overrideColliderPixelWidth = null; int? overrideColliderPixelHeight = null; if (val3.HasValue) { overrideColliderPixelWidth = val3.Value.x; overrideColliderPixelHeight = val3.Value.y; } int? overrideColliderOffsetX = null; int? overrideColliderOffsetY = null; if (val4.HasValue) { overrideColliderOffsetX = val4.Value.x; overrideColliderOffsetY = val4.Value.y; } tk2dSpriteDefinition val6 = SetupDefinitionForProjectileSpriteBundle(animationName, val.spriteId, data, val2.x, val2.y, lightened, overrideColliderPixelWidth, overrideColliderPixelHeight, overrideColliderOffsetX, overrideColliderOffsetY, overrideProjectileToCopyFrom); val6.ConstructOffsetsFromAnchor(anchor, Vector2.op_Implicit(val6.position3), fixesScale, changesCollider); val6.position0 += val5.Value; val6.position1 += val5.Value; val6.position2 += val5.Value; val6.position3 += val5.Value; if (i == 0) { ETGMod.GetAnySprite((BraveBehaviour)(object)proj).SetSprite(data, val.spriteId); } } } private static tk2dSpriteDefinition SetupDefinitionForProjectileSpriteBundle(string name, int id, tk2dSpriteCollectionData data, int pixelWidth, int pixelHeight, bool lightened = true, int? overrideColliderPixelWidth = null, int? overrideColliderPixelHeight = null, int? overrideColliderOffsetX = null, int? overrideColliderOffsetY = null, Projectile overrideProjectileToCopyFrom = null) { //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) if (!overrideColliderPixelWidth.HasValue) { overrideColliderPixelWidth = pixelWidth; } if (!overrideColliderPixelHeight.HasValue) { overrideColliderPixelHeight = pixelHeight; } if (!overrideColliderOffsetX.HasValue) { overrideColliderOffsetX = 0; } if (!overrideColliderOffsetY.HasValue) { overrideColliderOffsetY = 0; } float num = 16f; float num2 = 16f; float num3 = (float)pixelWidth / num; float num4 = (float)pixelHeight / num; float num5 = (float)overrideColliderPixelWidth.Value / num2; float num6 = (float)overrideColliderPixelHeight.Value / num2; float num7 = (float)overrideColliderOffsetX.Value / num2; float num8 = (float)overrideColliderOffsetY.Value / num2; tk2dSpriteDefinition val = GunTools.CopyDefinitionFrom(Databases.Items.ProjectileCollection.inst.spriteDefinitions[ETGMod.GetAnySprite((BraveBehaviour)(object)(overrideProjectileToCopyFrom ?? ((Gun)/*isinst with value type is only supported in some contexts*/).DefaultModule.projectiles[0])).spriteId]); val.boundsDataCenter = new Vector3(num3 / 2f, num4 / 2f, 0f); val.boundsDataExtents = new Vector3(num3, num4, 0f); val.untrimmedBoundsDataCenter = new Vector3(num3 / 2f, num4 / 2f, 0f); val.untrimmedBoundsDataExtents = new Vector3(num3, num4, 0f); val.texelSize = new Vector2(0.0625f, 0.0625f); val.position0 = new Vector3(0f, 0f, 0f); val.position1 = new Vector3(0f + num3, 0f, 0f); val.position2 = new Vector3(0f, 0f + num4, 0f); val.position3 = new Vector3(0f + num3, 0f + num4, 0f); val.materialInst.mainTexture = data.spriteDefinitions[id].materialInst.mainTexture; val.uvs = data.spriteDefinitions[id].uvs.ToArray(); val.colliderVertices = (Vector3[])(object)new Vector3[2]; val.colliderVertices[0] = new Vector3(num7, num8, 0f); val.colliderVertices[1] = new Vector3(num5 / 2f, num6 / 2f); val.name = name; data.spriteDefinitions[id] = val; return val; } public static GameObject AddTrailToProjectileBundle(this Projectile target, tk2dSpriteCollectionData tk2DSpriteCollectionData, string spriteName, tk2dSpriteAnimation animationLibrary, string defaultAnimation, Vector2 colliderDimensions, Vector2 colliderOffsets, bool destroyOnEmpty = false, string startAnimationName = null, float timeTillAnimStart = 0f, float cascadeTimer = -1f, float softMaxLength = -1f) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) try { GameObject val = PrefabBuilder.BuildObject("trailObject"); val.transform.parent = ((BraveBehaviour)target).transform; ((Object)val).name = "trailObject"; float num = colliderDimensions.x / 16f; float num2 = colliderDimensions.y / 16f; float num3 = colliderOffsets.x / 16f; float num4 = colliderOffsets.y / 16f; tk2dTiledSprite orAddComponent = GameObjectExtensions.GetOrAddComponent(val); ((tk2dBaseSprite)orAddComponent).SetSprite(tk2DSpriteCollectionData, tk2DSpriteCollectionData.GetSpriteIdByName(spriteName)); tk2dSpriteDefinition currentSpriteDef = ((tk2dBaseSprite)orAddComponent).GetCurrentSpriteDef(); currentSpriteDef.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(num3, num4, 0f), new Vector3(num, num2, 0f) }; currentSpriteDef.ConstructOffsetsFromAnchor((Anchor)0); tk2dSpriteAnimator orAddComponent2 = GameObjectExtensions.GetOrAddComponent(val); orAddComponent2.playAutomatically = true; orAddComponent2.defaultClipId = animationLibrary.GetClipIdByName(defaultAnimation); orAddComponent2.Library = animationLibrary; TrailController val2 = val.AddComponent(); if (defaultAnimation != null) { SetupBeamPart(animationLibrary, defaultAnimation, null, null, currentSpriteDef.colliderVertices); val2.animation = defaultAnimation; val2.usesAnimation = true; } else { val2.usesAnimation = false; } if (startAnimationName != null) { SetupBeamPart(animationLibrary, startAnimationName, null, null, currentSpriteDef.colliderVertices); val2.startAnimation = startAnimationName; val2.usesStartAnimation = true; } else { val2.usesStartAnimation = false; } if (softMaxLength > 0f) { val2.usesSoftMaxLength = true; val2.softMaxLength = softMaxLength; } if (cascadeTimer > 0f) { val2.usesCascadeTimer = true; val2.cascadeTimer = cascadeTimer; } val2.usesGlobalTimer = true; val2.globalTimer = timeTillAnimStart; val2.destroyOnEmpty = destroyOnEmpty; return val; } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); return null; } } private static void SetupBeamPart(tk2dSpriteAnimation beamAnimation, string animationName, Vector2? colliderDimensions = null, Vector2? colliderOffsets = null, Vector3[] overrideVertices = null) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00d0: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) tk2dSpriteAnimationFrame[] frames = beamAnimation.GetClipByName(animationName).frames; foreach (tk2dSpriteAnimationFrame val in frames) { tk2dSpriteDefinition val2 = val.spriteCollection.spriteDefinitions[val.spriteId]; val2.ConstructOffsetsFromAnchor((Anchor)0); if (overrideVertices != null) { val2.colliderVertices = overrideVertices; continue; } if (!colliderDimensions.HasValue || !colliderOffsets.HasValue) { ETGModConsole.Log((object)"BEAM ERROR: colliderDimensions or colliderOffsets was null with no override vertices!", false); continue; } Vector2 value = colliderDimensions.Value; Vector2 value2 = colliderDimensions.Value; val2.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(value2.x / 16f, value2.y / 16f, 0f), new Vector3(value.x / 16f, value.y / 16f, 0f) }; } } } public class ImprovedAfterImage : BraveBehaviour { private class Shadow { public float timer; public tk2dSprite sprite; } public bool IsRandomShader; public bool spawnShadows; public float shadowTimeDelay; public float shadowLifetime; public float minTranslation; public float maxEmission; public float minEmission; public float targetHeight; public Color dashColor; public Shader OptionalImageShader; public bool UseTargetLayer; public string TargetLayer; [NonSerialized] public Shader OverrideImageShader; private readonly LinkedList m_activeShadows; private readonly LinkedList m_inactiveShadows; private readonly List shaders; private float m_spawnTimer; private Vector2 m_lastSpawnPosition; private bool m_previousFrameSpawnShadows; public ImprovedAfterImage() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) shaders = new List { ShaderCache.Acquire("Brave/Internal/RainbowChestShader"), ShaderCache.Acquire("Brave/Internal/GlitterPassAdditive"), ShaderCache.Acquire("Brave/Internal/HologramShader"), ShaderCache.Acquire("Brave/Internal/HighPriestAfterImage") }; IsRandomShader = false; spawnShadows = true; shadowTimeDelay = 0.1f; shadowLifetime = 0.6f; minTranslation = 0.2f; maxEmission = 800f; minEmission = 100f; targetHeight = -2f; dashColor = new Color(1f, 0f, 1f, 1f); m_activeShadows = new LinkedList(); m_inactiveShadows = new LinkedList(); OverrideImageShader = null; } public void Start() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) shadowLifetime *= ConfigManager.AfterimageLifetime; if ((Object)(object)OptionalImageShader != (Object)null) { OverrideImageShader = OptionalImageShader; } if ((Object)(object)((BraveBehaviour)this).transform.parent != (Object)null && (Object)(object)((Component)((BraveBehaviour)this).transform.parent).GetComponent() != (Object)null) { ((Component)((BraveBehaviour)this).transform.parent).GetComponent().OnDestruction += ProjectileDestruction; } m_lastSpawnPosition = Vector2.op_Implicit(((BraveBehaviour)this).transform.position); } private void ProjectileDestruction(Projectile source) { if (m_activeShadows.Count > 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDeathShadowCleanup()); } } public void LateUpdate() { //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) if (spawnShadows && !m_previousFrameSpawnShadows) { m_spawnTimer = shadowTimeDelay; } m_previousFrameSpawnShadows = spawnShadows; LinkedListNode linkedListNode = m_activeShadows.First; while (linkedListNode != null) { LinkedListNode next = linkedListNode.Next; linkedListNode.Value.timer -= BraveTime.DeltaTime; if (linkedListNode.Value.timer <= 0f) { m_activeShadows.Remove(linkedListNode); m_inactiveShadows.AddLast(linkedListNode); if (Object.op_Implicit((Object)(object)linkedListNode.Value.sprite)) { ((BraveBehaviour)linkedListNode.Value.sprite).renderer.enabled = false; } } else if (Object.op_Implicit((Object)(object)linkedListNode.Value.sprite)) { float num = linkedListNode.Value.timer / shadowLifetime; Material sharedMaterial = ((BraveBehaviour)linkedListNode.Value.sprite).renderer.sharedMaterial; sharedMaterial.SetFloat("_EmissivePower", Mathf.Lerp(maxEmission, minEmission, num)); sharedMaterial.SetFloat("_Opacity", num); } linkedListNode = next; } if (spawnShadows) { if (m_spawnTimer > 0f) { m_spawnTimer -= BraveTime.DeltaTime; } if (m_spawnTimer <= 0f && Vector2.Distance(m_lastSpawnPosition, Vector2.op_Implicit(((BraveBehaviour)this).transform.position)) > minTranslation) { SpawnNewShadow(); m_spawnTimer += shadowTimeDelay; m_lastSpawnPosition = Vector2.op_Implicit(((BraveBehaviour)this).transform.position); } } } private IEnumerator HandleDeathShadowCleanup() { while (m_activeShadows.Count > 0) { LinkedListNode node = m_activeShadows.First; while (node != null) { LinkedListNode next = node.Next; node.Value.timer -= BraveTime.DeltaTime; if (node.Value.timer <= 0f) { m_activeShadows.Remove(node); m_inactiveShadows.AddLast(node); if (Object.op_Implicit((Object)(object)node.Value.sprite)) { ((BraveBehaviour)node.Value.sprite).renderer.enabled = false; } } else if (Object.op_Implicit((Object)(object)node.Value.sprite)) { float num = node.Value.timer / shadowLifetime; Material sharedMaterial = ((BraveBehaviour)node.Value.sprite).renderer.sharedMaterial; sharedMaterial.SetFloat("_EmissivePower", Mathf.Lerp(maxEmission, minEmission, num)); sharedMaterial.SetFloat("_Opacity", num); } node = next; } yield return null; } } public override void OnDestroy() { ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDeathShadowCleanup()); ((BraveBehaviour)this).OnDestroy(); } private void SpawnNewShadow() { //IL_00b7: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) if (m_inactiveShadows == null) { return; } if (m_inactiveShadows.Count == 0) { CreateInactiveShadow(); } LinkedListNode first = m_inactiveShadows.First; tk2dSprite sprite = first.Value.sprite; m_inactiveShadows.RemoveFirst(); if (!Object.op_Implicit((Object)(object)sprite) || !Object.op_Implicit((Object)(object)((BraveBehaviour)sprite).renderer)) { return; } first.Value.timer = shadowLifetime; ((tk2dBaseSprite)sprite).SetSprite(((BraveBehaviour)this).sprite.Collection, ((BraveBehaviour)this).sprite.spriteId); ((BraveBehaviour)sprite).transform.position = ((BraveBehaviour)((BraveBehaviour)this).sprite).transform.position; ((BraveBehaviour)sprite).transform.rotation = ((BraveBehaviour)((BraveBehaviour)this).sprite).transform.rotation; ((tk2dBaseSprite)sprite).scale = ((BraveBehaviour)this).sprite.scale; ((tk2dBaseSprite)sprite).usesOverrideMaterial = true; ((tk2dBaseSprite)sprite).IsPerpendicular = true; if (Object.op_Implicit((Object)(object)((BraveBehaviour)sprite).renderer) && IsRandomShader) { ((BraveBehaviour)sprite).renderer.enabled = true; ((BraveBehaviour)sprite).renderer.material.shader = shaders[Random.Range(0, shaders.Count)]; if ((Object)(object)((BraveBehaviour)sprite).renderer.material.shader == (Object)(object)shaders[3]) { ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_EmissivePower", minEmission); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_Opacity", 1f); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetColor("_DashColor", Color.HSVToRGB(Random.value, 1f, 1f)); } if ((Object)(object)((BraveBehaviour)sprite).renderer.material.shader == (Object)(object)shaders[0]) { ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_AllColorsToggle", 1f); } } else if (Object.op_Implicit((Object)(object)((BraveBehaviour)sprite).renderer)) { ((BraveBehaviour)sprite).renderer.enabled = true; ((BraveBehaviour)sprite).renderer.material.shader = OverrideImageShader ?? ShaderCache.Acquire("Brave/Internal/HighPriestAfterImage"); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_EmissivePower", minEmission); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_Opacity", 1f); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetColor("_DashColor", dashColor); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_AllColorsToggle", 0f); } ((tk2dBaseSprite)sprite).HeightOffGround = targetHeight; ((tk2dBaseSprite)sprite).UpdateZDepth(); m_activeShadows.AddLast(first); } private void CreateInactiveShadow() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("after image"); if (UseTargetLayer) { val.layer = LayerMask.NameToLayer(TargetLayer); } tk2dSprite sprite = val.AddComponent(); val.transform.parent = SpawnManager.Instance.VFX; m_inactiveShadows.AddLast(new Shadow { timer = shadowLifetime, sprite = sprite }); } } public class DebuffStuff { public class GameActorDecorationEffect : GameActorEffect { } } public class LightningController : MonoBehaviour { public class LightningNode { public Vector2 position; } public class LightningMajorNode : LightningNode { public List minorNodes = new List(); public List branchNodes = new List(); } public static GameObject LightningReticle; public float LightningPreDelay = 0f; public int MajorNodesCount = 2; public float MajorNodeMinAngleSpacing = 20f; public float MajorNodeMaxAngleSpacing = 45f; public int MinorNodesMin = 1; public int MinorNodesMax = 2; public float MinorNodeMinAngleSpacing = 7f; public float MinorNodeMaxAngleSpacing = 15f; public int MinorBranchNodesMin = 3; public int MinorBranchNodesMax = 4; public float MinorBranchNodeMinAngleSpacing = 6f; public float MinorBranchNodeMaxAngleSpacing = 14f; public float RadiusBranchMin = 2f; public float RadiusBranchMax = 4f; public float MajorNodeSplitoffChance = 0.5f; public float LightningMajorNodeDelay = 0.01f; public float LightningMinorNodeDelay = 0.01f; public float LinePieceLifetime = 0.2f; public float AfterimageLifetime = 0.75f; public float PreFinalLengthMultiplier = 0.85f; public float Thickness = 1f; public Vector2 ImpactPosition; public Vector2 StartPosition; public Action OnPostStrike; public Action OnPreDelay; public List Nodes = new List(); public static void Init() { //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) AssetBundle val = ResourceManager.LoadAssetBundle("brave_resources_001"); Object obj = val.LoadAsset("assets/resourcesbundle/global vfx/vfx_lasersight.prefab"); GameObject val2 = (GameObject)(object)((obj is GameObject) ? obj : null); LightningReticle = Object.Instantiate(val2); LightningReticle.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(LightningReticle); Object.DontDestroyOnLoad((Object)(object)LightningReticle); tk2dTiledSprite component = LightningReticle.GetComponent(); ((Component)((BraveBehaviour)component).renderer).gameObject.layer = 23; ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_EmissivePower", 100f); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_EmissiveColorPower", 1.55f); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_OverrideColor", new Color(1.4f, 1.7f, 1.7f)); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetColor("_EmissiveColor", new Color(1.4f, 1.7f, 1.7f)); ImprovedAfterImageForTiled orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)component).gameObject); orAddComponent.spawnShadows = true; orAddComponent.shadowLifetime = 1f; orAddComponent.shadowTimeDelay = 0.1f; orAddComponent.dashColor = Vector3Extensions.WithAlpha(new Color(0.9f, 1f, 1f), 3.33f); orAddComponent.overrideHeight = 23; val = null; } public void GenerateLightning(Vector3 startPosition, Vector3 impactPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) StartPosition = Vector2.op_Implicit(startPosition); ImpactPosition = Vector2.op_Implicit(impactPosition); Nodes = GenerateNodes(); ((MonoBehaviour)GameManager.Instance).StartCoroutine(StartLightning()); } public IEnumerator StartLightning() { if (DoesDelay()) { if (OnPreDelay != null) { OnPreDelay(ImpactPosition); } float elapsed2 = 0f; while (elapsed2 < LightningPreDelay) { elapsed2 += BraveTime.DeltaTime; yield return null; } } for (int i = 0; i < Nodes.Count; i++) { LightningNode lightningNode = Nodes[i]; if (!(lightningNode is LightningMajorNode major)) { continue; } float elapsed = 0f; while (elapsed < LightningMajorNodeDelay) { elapsed += BraveTime.DeltaTime; yield return null; } for (int e2 = 0; e2 < major.minorNodes.Count - 1; e2++) { float elapsedTwo = 0f; while (elapsed < LightningMinorNodeDelay) { elapsedTwo += BraveTime.DeltaTime; yield return null; } GameObject vfx = GenerateLine(major.minorNodes[e2].position, major.minorNodes[e2 + 1].position); Object.Destroy((Object)(object)vfx, 0.25f); } if (Random.value < MajorNodeSplitoffChance) { for (int e = 0; e < major.branchNodes.Count - 1; e++) { GameObject vfx2 = GenerateLine(major.branchNodes[e].position, major.branchNodes[e + 1].position); Object.Destroy((Object)(object)vfx2, LinePieceLifetime); } } } if (OnPostStrike != null) { OnPostStrike(ImpactPosition); } Object.Destroy((Object)(object)this, 1f); } public GameObject GenerateLine(Vector2 startPosition, Vector2 endPosition) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) GameObject val = SpawnManager.SpawnVFX(LightningReticle, false); ((Object)val).name = "Lightning_Piece"; tk2dTiledSprite component = val.GetComponent(); ((Component)component).gameObject.transform.position = Vector2.op_Implicit(startPosition); ((Component)((BraveBehaviour)component).renderer).gameObject.layer = 23; ((BraveBehaviour)component).transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(endPosition - startPosition)); component.dimensions = new Vector2(Vector2.Distance(startPosition, endPosition) * 16f, Thickness); ImprovedAfterImageForTiled orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)component).gameObject); orAddComponent.spawnShadows = true; orAddComponent.shadowLifetime = AfterimageLifetime; return val; } public List GenerateNodes() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_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_00c1: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) List list = new List(); list.Add(new LightningMajorNode { position = StartPosition }); float num = Vector3.Distance(Vector2.op_Implicit(ImpactPosition), Vector2.op_Implicit(StartPosition)) / (float)MajorNodesCount; num *= PreFinalLengthMultiplier; for (int i = 1; i < MajorNodesCount + 1; i++) { Vector2 position = list[i - 1].position; float num2 = (BraveUtility.RandomBool() ? Random.Range(0f - MajorNodeMaxAngleSpacing, 0f - MajorNodeMinAngleSpacing) : Random.Range(MajorNodeMinAngleSpacing, MajorNodeMaxAngleSpacing)); float num3 = Vector2Extensions.ToAngle(ImpactPosition - position); num3 += num2; list.Add(new LightningMajorNode { position = position + Toolbox.GetUnitOnCircle(num3, num), minorNodes = GenerateMinorNodes(position, position + Toolbox.GetUnitOnCircle(num3, num), Random.Range(MinorNodesMin, MinorNodesMax + 1), MinorNodeMaxAngleSpacing, MinorNodeMaxAngleSpacing), branchNodes = GenerateMinorNodes(position + Toolbox.GetUnitOnCircle(num3, num), position + Toolbox.GetUnitOnCircle(num3, num) + Toolbox.GetUnitOnCircle(num3, Random.Range(RadiusBranchMin, RadiusBranchMax)), Random.Range(MinorBranchNodesMin, MinorBranchNodesMin + 1), MinorBranchNodeMinAngleSpacing, MinorBranchNodeMaxAngleSpacing) }); } list.Add(new LightningMajorNode { position = ImpactPosition, minorNodes = GenerateMinorNodes(list[list.Count - 1].position, ImpactPosition, Random.Range(MinorNodesMin, MinorNodesMax + 1), MinorNodeMaxAngleSpacing, MinorNodeMaxAngleSpacing) }); return list; } public List GenerateMinorNodes(Vector2 startPos, Vector2 endPos, float NodesToGenerate, float offsetLower, float offsetHigher) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) List list = new List(); list.Add(new LightningNode { position = startPos }); float radius = Vector3.Distance(Vector2.op_Implicit(endPos), Vector2.op_Implicit(startPos)) / NodesToGenerate; for (int i = 1; (float)i < NodesToGenerate + 1f; i++) { Vector2 position = list[i - 1].position; float num = (BraveUtility.RandomBool() ? Random.Range(0f - offsetHigher, 0f - offsetLower) : Random.Range(offsetLower, offsetHigher)); float num2 = Vector2Extensions.ToAngle(endPos - position); num2 += num; list.Add(new LightningNode { position = position + Toolbox.GetUnitOnCircle(num2, radius) }); } list.Add(new LightningNode { position = endPos }); return list; } private bool DoesDelay() { return LightningPreDelay > 0f; } } public class ImprovedAfterImageForTiled : BraveBehaviour { private class Shadow { public float timer; public tk2dTiledSprite sprite; } public bool IsRandomShader; public int overrideHeight = -1; public bool spawnShadows; public float shadowTimeDelay; public float shadowLifetime; public float minTranslation; public float maxEmission; public float minEmission; public float targetHeight; public Color dashColor; public Shader OptionalImageShader; public bool UseTargetLayer; public string TargetLayer; [NonSerialized] public Shader OverrideImageShader; private readonly LinkedList m_activeShadows; private readonly LinkedList m_inactiveShadows; private readonly List shaders; private float m_spawnTimer; private float lastSpawnAngle; private bool m_previousFrameSpawnShadows; public ImprovedAfterImageForTiled() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) shaders = new List { ShaderCache.Acquire("Brave/Internal/RainbowChestShader"), ShaderCache.Acquire("Brave/Internal/GlitterPassAdditive"), ShaderCache.Acquire("Brave/Internal/HologramShader"), ShaderCache.Acquire("Brave/Internal/HighPriestAfterImage") }; IsRandomShader = false; spawnShadows = true; shadowTimeDelay = 0.1f; shadowLifetime = 0.6f; minTranslation = 0.2f; maxEmission = 800f; minEmission = 100f; targetHeight = -2f; dashColor = new Color(1f, 0f, 1f, 1f); m_activeShadows = new LinkedList(); m_inactiveShadows = new LinkedList(); } public void Start() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)OptionalImageShader != (Object)null) { OverrideImageShader = OptionalImageShader; } if ((Object)(object)((BraveBehaviour)this).transform.parent != (Object)null && (Object)(object)((Component)((BraveBehaviour)this).transform.parent).GetComponent() != (Object)null) { ((Component)((BraveBehaviour)this).transform.parent).GetComponent().OnDestruction += ProjectileDestruction; } lastSpawnAngle = ((BraveBehaviour)this).transform.eulerAngles.z; } private void ProjectileDestruction(Projectile source) { if (m_activeShadows.Count > 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDeathShadowCleanup()); } } public void LateUpdate() { //IL_01da: Unknown result type (might be due to invalid IL or missing references) if (spawnShadows && !m_previousFrameSpawnShadows) { m_spawnTimer = shadowTimeDelay; } m_previousFrameSpawnShadows = spawnShadows; LinkedListNode linkedListNode = m_activeShadows.First; while (linkedListNode != null) { LinkedListNode next = linkedListNode.Next; linkedListNode.Value.timer -= BraveTime.DeltaTime; if (linkedListNode.Value.timer <= 0f) { m_activeShadows.Remove(linkedListNode); m_inactiveShadows.AddLast(linkedListNode); if (Object.op_Implicit((Object)(object)linkedListNode.Value.sprite)) { ((BraveBehaviour)linkedListNode.Value.sprite).renderer.enabled = false; } } else if (Object.op_Implicit((Object)(object)linkedListNode.Value.sprite)) { float num = linkedListNode.Value.timer / shadowLifetime; Material sharedMaterial = ((BraveBehaviour)linkedListNode.Value.sprite).renderer.sharedMaterial; sharedMaterial.SetFloat("_EmissivePower", Mathf.Lerp(maxEmission, minEmission, num)); sharedMaterial.SetFloat("_Opacity", num); } linkedListNode = next; } if (spawnShadows) { if ((Object)(object)((Component)this).GetComponent() == (Object)null) { ETGModConsole.Log((object)"fucc", false); } if (m_spawnTimer > 0f) { m_spawnTimer -= BraveTime.DeltaTime; } if (m_spawnTimer <= 0f) { SpawnNewShadow(); m_spawnTimer += shadowTimeDelay; lastSpawnAngle = ((BraveBehaviour)this).transform.eulerAngles.z; } } } private IEnumerator HandleDeathShadowCleanup() { while (m_activeShadows.Count > 0) { LinkedListNode node = m_activeShadows.First; while (node != null) { LinkedListNode next = node.Next; node.Value.timer -= BraveTime.DeltaTime; if (node.Value.timer <= 0f) { m_activeShadows.Remove(node); m_inactiveShadows.AddLast(node); if (Object.op_Implicit((Object)(object)node.Value.sprite)) { ((BraveBehaviour)node.Value.sprite).renderer.enabled = false; } } else if (Object.op_Implicit((Object)(object)node.Value.sprite)) { float num = node.Value.timer / shadowLifetime; Material sharedMaterial = ((BraveBehaviour)node.Value.sprite).renderer.sharedMaterial; sharedMaterial.SetFloat("_EmissivePower", Mathf.Lerp(maxEmission, minEmission, num)); sharedMaterial.SetFloat("_Opacity", num); } node = next; } yield return null; } } public override void OnDestroy() { ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDeathShadowCleanup()); ((BraveBehaviour)this).OnDestroy(); } private void SpawnNewShadow() { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: 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_0338: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)this).GetComponentInChildren() == (Object)null) { ETGModConsole.Log((object)"tk2dTiledSprite is NULL", false); return; } if ((Object)(object)((Component)this).GetComponent() == (Object)null) { ETGModConsole.Log((object)"tk2dTiledSprite is NULL", false); return; } if (m_inactiveShadows.Count == 0) { CreateInactiveShadow(); } LinkedListNode first = m_inactiveShadows.First; tk2dTiledSprite sprite = first.Value.sprite; m_inactiveShadows.RemoveFirst(); if (!Object.op_Implicit((Object)(object)sprite) || !Object.op_Implicit((Object)(object)((BraveBehaviour)sprite).renderer)) { return; } first.Value.timer = shadowLifetime; ((tk2dBaseSprite)sprite).SetSprite(((BraveBehaviour)((Component)this).GetComponent()).sprite.Collection, ((BraveBehaviour)((Component)this).GetComponent()).sprite.spriteId); ((BraveBehaviour)sprite).transform.position = ((BraveBehaviour)((BraveBehaviour)((Component)this).GetComponent()).sprite).transform.position; ((BraveBehaviour)sprite).transform.rotation = ((BraveBehaviour)((BraveBehaviour)((Component)this).GetComponent()).sprite).transform.rotation; if ((Object)(object)((BraveBehaviour)this).transform.parent != (Object)null) { if ((Object)(object)((Component)((BraveBehaviour)this).transform.parent).GetComponentInChildren() != (Object)null) { float num = Vector2Extensions.ToAngle(((BeamController)((Component)((BraveBehaviour)this).transform.parent).GetComponentInChildren()).Direction); ((BraveBehaviour)sprite).transform.rotation = Quaternion.Euler(0f, 0f, num); } if ((Object)(object)((Component)((BraveBehaviour)this).transform.parent).GetComponentInChildren() != (Object)null) { float num2 = Vector2Extensions.ToAngle(((Component)((BraveBehaviour)this).transform.parent).GetComponentInChildren().Direction); ((BraveBehaviour)sprite).transform.rotation = Quaternion.Euler(0f, 0f, num2); } } ((tk2dBaseSprite)sprite).scale = ((BraveBehaviour)((Component)this).GetComponent()).sprite.scale; sprite.dimensions = ((Component)this).GetComponent().dimensions; ((tk2dBaseSprite)sprite).usesOverrideMaterial = true; ((tk2dBaseSprite)sprite).IsPerpendicular = true; ((BraveBehaviour)sprite).renderer.enabled = true; if (overrideHeight != -1) { ((Component)((BraveBehaviour)sprite).renderer).gameObject.layer = overrideHeight; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)sprite).renderer) && IsRandomShader) { ((BraveBehaviour)sprite).renderer.enabled = true; ((BraveBehaviour)sprite).renderer.material.shader = shaders[Random.Range(0, shaders.Count)]; if ((Object)(object)((BraveBehaviour)sprite).renderer.material.shader == (Object)(object)shaders[3]) { ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_EmissivePower", minEmission); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_Opacity", 1f); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetColor("_DashColor", Color.HSVToRGB(Random.value, 1f, 1f)); } if ((Object)(object)((BraveBehaviour)sprite).renderer.material.shader == (Object)(object)shaders[0]) { ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_AllColorsToggle", 1f); } } else if (Object.op_Implicit((Object)(object)((BraveBehaviour)sprite).renderer)) { ((BraveBehaviour)sprite).renderer.enabled = true; ((BraveBehaviour)sprite).renderer.material.shader = OverrideImageShader ?? ShaderCache.Acquire("Brave/Internal/HighPriestAfterImage"); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_EmissivePower", minEmission); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_Opacity", 1f); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetColor("_DashColor", dashColor); ((BraveBehaviour)sprite).renderer.sharedMaterial.SetFloat("_AllColorsToggle", 1f); } ((tk2dBaseSprite)sprite).HeightOffGround = targetHeight; ((tk2dBaseSprite)sprite).UpdateZDepth(); m_activeShadows.AddLast(first); } private void CreateInactiveShadow() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("after image"); if (UseTargetLayer) { val.layer = LayerMask.NameToLayer(TargetLayer); } tk2dTiledSprite sprite = val.AddComponent(); val.transform.parent = SpawnManager.Instance.VFX; m_inactiveShadows.AddLast(new Shadow { timer = shadowLifetime, sprite = sprite }); } } public class AdvancedStringDB { public readonly AdvancedStringDBTable Core; public readonly AdvancedStringDBTable Items; public readonly AdvancedStringDBTable Enemies; public readonly AdvancedStringDBTable Intro; public readonly AdvancedStringDBTable Synergies; public static FieldInfo m_synergyTable = typeof(StringTableManager).GetField("m_synergyTable", BindingFlags.Static | BindingFlags.NonPublic); public Action OnLanguageChanged; public GungeonSupportedLanguages CurrentLanguage { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return GameManager.Options.CurrentLanguage; } set { //IL_0001: Unknown result type (might be due to invalid IL or missing references) StringTableManager.SetNewLanguage(value, true); } } public static Dictionary SynergyTable { get { StringTableManager.GetSynergyString("ThisExistsOnlyToLoadTables", -1); return (Dictionary)m_synergyTable.GetValue(null); } } public AdvancedStringDB() { StringDB strings = Databases.Strings; strings.OnLanguageChanged = (Action)Delegate.Combine(strings.OnLanguageChanged, new Action(LanguageChanged)); Core = new AdvancedStringDBTable(() => StringTableManager.CoreTable); Items = new AdvancedStringDBTable(() => StringTableManager.ItemTable); Enemies = new AdvancedStringDBTable(() => StringTableManager.EnemyTable); Intro = new AdvancedStringDBTable(() => StringTableManager.IntroTable); Synergies = new AdvancedStringDBTable(() => SynergyTable); } public void LanguageChanged(GungeonSupportedLanguages newLang) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) Core.LanguageChanged(); Items.LanguageChanged(); Enemies.LanguageChanged(); Intro.LanguageChanged(); Synergies.LanguageChanged(); OnLanguageChanged?.Invoke(newLang); } } public sealed class AdvancedStringDBTable { private readonly Func> _GetTable; private Dictionary _CachedTable; private readonly List _ChangeKeys; private readonly List _ChangeValues; public Dictionary Table { get { Dictionary result; if ((result = _CachedTable) == null) { result = (_CachedTable = _GetTable()); } return result; } } public StringCollection this[string key] { get { return Table[key]; } set { Table[key] = value; int num = _ChangeKeys.IndexOf(key); if (num > 0) { _ChangeValues[num] = value; } else { _ChangeKeys.Add(key); _ChangeValues.Add(value); } JournalEntry.ReloadDataSemaphore += 1; } } internal AdvancedStringDBTable(Func> _getTable) { _ChangeKeys = new List(); _ChangeValues = new List(); _GetTable = _getTable; } public bool ContainsKey(string key) { return Table.ContainsKey(key); } public void Set(string key, string value) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown StringCollection val = (StringCollection)new SimpleStringCollection(); val.AddString(value, 1f); if (Table.ContainsKey(key)) { Table[key] = val; } else { Table.Add(key, val); } int num = _ChangeKeys.IndexOf(key); if (num > 0) { _ChangeValues[num] = val; } else { _ChangeKeys.Add(key); _ChangeValues.Add(val); } JournalEntry.ReloadDataSemaphore += 1; } public void SetComplex(string key, List values, List weights) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown StringCollection val = (StringCollection)new ComplexStringCollection(); for (int i = 0; i < values.Count; i++) { string text = values[i]; float num = weights[i]; val.AddString(text, num); } Table[key] = val; int num2 = _ChangeKeys.IndexOf(key); if (num2 > 0) { _ChangeValues[num2] = val; } else { _ChangeKeys.Add(key); _ChangeValues.Add(val); } JournalEntry.ReloadDataSemaphore += 1; } public string Get(string key) { return StringTableManager.GetString(key); } public void LanguageChanged() { _CachedTable = null; Dictionary table = Table; for (int i = 0; i < _ChangeKeys.Count; i++) { table[_ChangeKeys[i]] = _ChangeValues[i]; } } } public class ChooseModuleController : MonoBehaviour { public class ModuleUICarrier : MonoBehaviour { private Vector2 Offset = new Vector2(-0.5f, -0.5f); public bool HasDropped = false; public bool BeingDestroyed = false; private bool HasStoppedMoving; public static Action OnModuleDropped; public static Action OnModuleSelected; public Vector2 EndPosition; public ChooseModuleController controller; public GameObject extantModule; public DefaultModule defaultModule; public bool isUsingAlternate = false; public GameObject extantTether; public void Start() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) HasStoppedMoving = false; extantModule = Object.Instantiate(((Component)defaultModule).gameObject, Vector2.op_Implicit(((BraveBehaviour)controller.g).sprite.WorldCenter), Quaternion.identity); DefaultModule component = extantModule.GetComponent(); component.ChangeShader(StaticShaders.Hologram_Shader); ((BraveBehaviour)((BraveBehaviour)component).sprite).renderer.material.SetFloat("_IsGreen", (float)(isUsingAlternate ? 1 : 0)); component.OnModuleSpawnAsChoice(controller, this); component.PreInteractLogic = (Func)Delegate.Combine(component.PreInteractLogic, new Func(PreInteract)); ((MonoBehaviour)component).StartCoroutine(DoMovement(1f, component)); ((MonoBehaviour)component).StartCoroutine(LerpLight(component, 4f, 0f, 2f, 0f)); } public bool PreInteract(DefaultModule DefMod, PlayerController p) { if (HasStoppedMoving && !HasDropped) { AkSoundEngine.PostEvent("Play_OBJ_metroid_roll_01", ((Component)DefMod).gameObject); DefMod.EnteredRange = (Action)Delegate.Remove(DefMod.EnteredRange, new Action(Entered)); DefMod.ExitedRange = (Action)Delegate.Remove(DefMod.ExitedRange, new Action(Exited)); DefMod.ChangeShader(StaticShaders.Default_Shader); HasDropped = true; controller.DestroyAllOthers(); extantTether.gameObject.GetComponent().PlayAndDestroyObject(isUsingAlternate ? "chain_alt_break" : "chain_break", (Action)null); ((MonoBehaviour)DefMod).StartCoroutine(LerpLight(DefMod, 0f, 7f, 0f, 3f)); ((MonoBehaviour)DefMod).StartCoroutine(DoMovementToPlayer(DefMod, p)); if (OnModuleSelected != null) { OnModuleSelected(DefMod, p); } Object.Destroy((Object)(object)this); return false; } return HasStoppedMoving; } private IEnumerator DoMovementToPlayer(DefaultModule self, PlayerController p) { HasStoppedMoving = false; self.PreInteractLogic = (Func)Delegate.Remove(self.PreInteractLogic, new Func(PreInteract)); Vector2 modPosition = TransformExtensions.PositionVector2(((BraveBehaviour)self).transform); float elapsed = 0f; while (elapsed < 0.75f) { if ((Object)(object)self == (Object)null) { yield break; } elapsed += BraveTime.DeltaTime; float t = elapsed / 1f; ((Component)self).gameObject.transform.position = Vector3.Lerp(Vector2.op_Implicit(modPosition), p.SpriteBottomCenter, Toolbox.SinLerpTValue(t)); yield return null; } if (OnModuleDropped != null) { OnModuleDropped(self, p); } DebrisObject orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)self).gameObject); orAddComponent.shouldUseSRBMotion = true; orAddComponent.angularVelocity = 0f; ((EphemeralObject)orAddComponent).Priority = (EphemeralPriority)0; ((BraveBehaviour)orAddComponent).sprite.UpdateZDepth(); orAddComponent.Trigger(Vector3Extensions.WithZ(Vector3.up, 2f), 1f, 1f); self.OnEnteredRange(p); } private IEnumerator LerpLight(DefaultModule self, float to, float From, float radTo, float radFrom) { if (!((Object)(object)self.BraveLight == (Object)null)) { float elapsed = 0f; while (elapsed < 0.5f) { elapsed += BraveTime.DeltaTime; float t = elapsed / 0.5f; self.BraveLight.LightIntensity = Mathf.Lerp(From, to, t); self.BraveLight.LightRadius = Mathf.Lerp(radFrom, radTo, t); yield return null; } } } private IEnumerator DoMovement(float duration, DefaultModule self) { float elapsed = 0f; while (elapsed < duration) { elapsed += BraveTime.DeltaTime; float t = elapsed / duration; if ((Object)(object)controller == (Object)null) { Object.Destroy((Object)(object)this); } ((Component)self).gameObject.transform.position = Vector3.Lerp(Vector2.op_Implicit(((BraveBehaviour)controller.g).sprite.WorldCenter + Offset), Vector2.op_Implicit(((BraveBehaviour)controller.g).sprite.WorldCenter + EndPosition + Offset), Toolbox.SinLerpTValue(t)); yield return null; } self.EnteredRange = (Action)Delegate.Combine(self.EnteredRange, new Action(Entered)); self.ExitedRange = (Action)Delegate.Combine(self.ExitedRange, new Action(Exited)); HasStoppedMoving = true; while (Object.op_Implicit((Object)(object)controller)) { if ((Object)(object)controller == (Object)null) { Object.Destroy((Object)(object)this); } if (HasStoppedMoving && Object.op_Implicit((Object)(object)extantModule.gameObject) && Object.op_Implicit((Object)(object)controller.g)) { extantModule.gameObject.transform.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(extantModule.gameObject.transform.position), ((BraveBehaviour)controller.g).sprite.WorldCenter + EndPosition + Offset, 2.2f * BraveTime.DeltaTime)); } yield return null; } } public void Entered(DefaultModule DefMod) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)DefMod).gameObject); ((MonoBehaviour)DefMod).StartCoroutine(LerpLight(DefMod, 7f, 4f, 3f, 2f)); DefMod.ChangeShader(StaticShaders.Default_Shader); } public void Exited(DefaultModule DefMod) { ((MonoBehaviour)DefMod).StartCoroutine(LerpLight(DefMod, 4f, 7f, 2f, 3f)); DefMod.ChangeShader(StaticShaders.Hologram_Shader); ((BraveBehaviour)((BraveBehaviour)DefMod).sprite).renderer.material.SetFloat("_IsGreen", (float)(isUsingAlternate ? 1 : 0)); } public void DoDestroy(DefaultModule DefMod) { ((MonoBehaviour)DefMod).StartCoroutine(I_DoDestroy(DefMod)); } private IEnumerator I_DoDestroy(DefaultModule DefMod) { DefMod.OverrideCanDisplayText(value: false); bool emergtencyCheck = false; if ((Object)(object)DefMod.BraveLight == (Object)null) { emergtencyCheck = true; } BeingDestroyed = true; DefMod.PreInteractLogic = (Func)Delegate.Remove(DefMod.PreInteractLogic, new Func(PreInteract)); DefMod.PreInteractLogic = (Func)Delegate.Combine(DefMod.PreInteractLogic, new Func(PreInteractOverride)); DefMod.OverrideEnteredRangeOutline = NoOutline; DefMod.OverrideExitedRangeOutline = NoOutline; DefMod.EnteredRange = (Action)Delegate.Remove(DefMod.EnteredRange, new Action(Entered)); DefMod.ExitedRange = (Action)Delegate.Remove(DefMod.ExitedRange, new Action(Exited)); float i = ((!emergtencyCheck) ? DefMod.BraveLight.LightIntensity : 0f); DefMod.ChangeShader(StaticShaders.Displacer_Beast_Shader); ((BraveBehaviour)((BraveBehaviour)DefMod).sprite).renderer.material.SetTexture("_MainTex", ((BraveBehaviour)((BraveBehaviour)DefMod).sprite).renderer.material.mainTexture); float elapsed = 0f; while (elapsed < 0.66f) { elapsed += BraveTime.DeltaTime; float t = elapsed / 0.66f; ((BraveBehaviour)((BraveBehaviour)DefMod).sprite).renderer.material.SetFloat("_BurnAmount", t); if (!emergtencyCheck) { DefMod.BraveLight.LightIntensity = Mathf.Lerp(i, 50f, t); DefMod.BraveLight.LightRadius = Mathf.Lerp(2f, 0f, t); } SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)DefMod).sprite, false); yield return null; } Object.Destroy((Object)(object)((Component)DefMod).gameObject); } public bool PreInteractOverride(DefaultModule DefMod, PlayerController p) { return false; } public void NoOutline(DefaultModule DefMod) { } public void OnDestroy() { if (Object.op_Implicit((Object)(object)controller) && controller.selectableModules.Contains(this)) { controller.selectableModules.Remove(this); } } } public static Func AdditionalOptionsModifier; public static Func PrimaryOptionsModifier; public static Func ModifyOmegaModuleChance; public int Count = 4; public Gun g; public bool isAlt = false; public Dictionary tk2DTiledSprites = new Dictionary(); private tk2dTiledSprite extantTether; private PlayerController playerToFollow; public static Func AngleSpawnModifier; public static Func RadiusSpawnModifier; public static Func ChoicesAmountModifier; public static Func, ChooseModuleController, List> CarrierModifier; private List modulesUsing; public int AmountOfChoices = 1; public bool isBeingDestroyed = false; public static Action OnModuleSelectGunDestroyed; public List selectableModules = new List(); public Vector2 CalculateAdditionalOffset(float angle, float ang = 0.5f) { //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_0011: Unknown result type (might be due to invalid IL or missing references) return Toolbox.GetUnitOnCircle(angle - 90f, ang); } public void Nudge(PlayerController p) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)extantTether == (Object)null) { playerToFollow = p; AkSoundEngine.PostEvent("Play_ENM_rubber_bounce_01", ((Component)g).gameObject); tk2dTiledSprite component = Object.Instantiate(VFXStorage.VFX_Tether_Modulable, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.identity).GetComponent(); component.dimensions = new Vector2(1f, 4f); ((tk2dBaseSprite)component).IsPerpendicular = false; ((tk2dBaseSprite)component).ShouldDoTilt = false; ((tk2dBaseSprite)component).UpdateCollider(); ((BraveBehaviour)component).transform.localRotation = Quaternion.Euler(0f, 0f, 0f); ((Component)component).GetComponent().Play(isAlt ? "tether_start_alt" : "tether_start"); extantTether = component; } else { AkSoundEngine.PostEvent("Play_OBJ_lock_pick_01", ((Component)g).gameObject); playerToFollow = null; ((Component)extantTether).GetComponent().PlayAndDestroyObject(isAlt ? "tether_alt_break" : "tether_break", (Action)null); extantTether = null; } } public DefaultModule SelectModule(GenericLootTable table) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) DefaultModule component = table.ModularSelectByWeight(useSeedRandom: false, null, modulesUsing).GetComponent(); if (Random.value < ReturnT4Chance(component.Tier, ((PickupObject)g).quality)) { AkSoundEngine.PostEvent("Play_BOSS_queenship_emerge_01", ((Component)g).gameObject); return GlobalModuleStorage.ReturnRandomModule(DefaultModule.ModuleTier.Tier_Omega); } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((((Object)(object)val.PlayerHasCore() != (Object)null) & val.HasPickupID(815)) && component.Tier == DefaultModule.ModuleTier.Tier_1) { return LootUtility.SelectByWeightNoExclusions(GlobalModuleStorage.SelectTable((ItemQuality)4), false).GetComponent(); } } return component; } public float ReturnT4Chance(DefaultModule.ModuleTier tier, ItemQuality quality) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) switch (tier) { case DefaultModule.ModuleTier.Tier_1: if (ModifyOmegaModuleChance != null) { return ModifyOmegaModuleChance(quality, tier, 0.001f); } return 0.001f; case DefaultModule.ModuleTier.Tier_2: if (ModifyOmegaModuleChance != null) { return ModifyOmegaModuleChance(quality, tier, 0.00175f); } return 0.00175f; case DefaultModule.ModuleTier.Tier_3: if (ModifyOmegaModuleChance != null) { return ModifyOmegaModuleChance(quality, tier, 0.00225f); } return 0.00225f; default: return 0f; } } public void AlterCount() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 if (((int)((PickupObject)g).quality == 3) | ((int)((PickupObject)g).quality == 4)) { Count++; } if ((int)((PickupObject)g).quality == 5) { Count += 2; } if (GameStatsManager.Instance.IsRainbowRun) { Count++; } } public void Start() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) if (ChoicesAmountModifier != null) { AmountOfChoices = ChoicesAmountModifier(AmountOfChoices); } g = ((Component)this).GetComponent(); ShittyVFXAttacher component = ((Component)g).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } AkSoundEngine.PostEvent("Play_OBJ_paydaydrill_start_01", ((Component)g).gameObject); modulesUsing = new List(); AdditionalBraveLight orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)g).gameObject); orAddComponent.LightColor = TierColor(); AlterCount(); selectableModules = new List(); GenericLootTable table = GlobalModuleStorage.SelectTable(((PickupObject)g).quality); if (PrimaryOptionsModifier != null) { Count = PrimaryOptionsModifier(Count, ((PickupObject)g).quality); } if (AdditionalOptionsModifier != null) { Count = AdditionalOptionsModifier(Count); } float num = 30 + Count * 15; if (AngleSpawnModifier != null) { num = AngleSpawnModifier(num); } float num2 = 2f; if (RadiusSpawnModifier != null) { RadiusSpawnModifier(num2); } List list = new List(); for (int i = 0; i < Count; i++) { DefaultModule defaultModule = SelectModule(table); list.Add(new ModuleUICarrier { controller = this, defaultModule = defaultModule, isUsingAlternate = isAlt }); modulesUsing.Add(defaultModule); } if (CarrierModifier != null) { list = CarrierModifier(list, this); } Count = list.Count(); selectableModules = list; for (int j = 0; j < Count; j++) { selectableModules[j].EndPosition = Toolbox.GetUnitOnCircle(Toolbox.SubdivideCircle(Vector2Extensions.ToAngle(Vector2.up) + num * -1f, Count, j), num2); } foreach (ModuleUICarrier selectableModule in selectableModules) { selectableModule.Start(); tk2dTiledSprite component2 = Object.Instantiate(VFXStorage.VFX_Tether_Modulable, Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter), Quaternion.identity).GetComponent(); component2.dimensions = new Vector2(1f, 16f); ((BraveBehaviour)component2).transform.localRotation = Quaternion.Euler(0f, 0f, 0f); ((Component)component2).GetComponent().Play(isAlt ? "chain_alt_start" : "chain_start"); tk2DTiledSprites.Add(component2, selectableModule); selectableModule.extantTether = ((Component)component2).gameObject; } ((MonoBehaviour)g).StartCoroutine(LerpLight(g)); } public void Update() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) if (isBeingDestroyed) { return; } foreach (KeyValuePair tk2DTiledSprite in tk2DTiledSprites) { if ((Object)(object)tk2DTiledSprite.Key != (Object)null) { float num = Vector2Extensions.ToAngle(TransformExtensions.PositionVector2(tk2DTiledSprite.Value.extantModule.transform) - ((BraveBehaviour)g).sprite.WorldCenter + new Vector2(0.5f, 0.5f)); Vector2 val = CalculateAdditionalOffset(num); tk2DTiledSprite.Key.dimensions = new Vector2(Vector2.Distance(((BraveBehaviour)g).sprite.WorldCenter + CalculateAdditionalOffset(num) + val, tk2DTiledSprite.Value.extantModule.GetComponent().WorldCenter + val) * 16f, 16f); ((Component)tk2DTiledSprite.Key).gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, num); ((Component)tk2DTiledSprite.Key).gameObject.transform.position = Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter + val); } } if ((Object)(object)extantTether != (Object)null && (Object)(object)playerToFollow != (Object)null) { float num2 = Vector2Extensions.ToAngle(((BraveBehaviour)playerToFollow).sprite.WorldCenter - ((BraveBehaviour)g).sprite.WorldCenter); Vector2 val2 = CalculateAdditionalOffset(num2, 0f); extantTether.dimensions = new Vector2(Vector2.Distance(((BraveBehaviour)g).sprite.WorldCenter + CalculateAdditionalOffset(num2) + val2, ((BraveBehaviour)playerToFollow).sprite.WorldCenter + val2) * 16f, 4f); ((Component)extantTether).gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, num2); ((Component)extantTether).gameObject.transform.position = Vector2.op_Implicit(((BraveBehaviour)g).sprite.WorldCenter + val2); ((tk2dBaseSprite)extantTether).ShouldDoTilt = false; ((Component)g).gameObject.transform.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(((Component)g).gameObject.transform.position), Vector2.op_Implicit(((BraveBehaviour)playerToFollow).transform.position), 2.5f * BraveTime.DeltaTime)); } else if ((Object)(object)playerToFollow == (Object)null && (Object)(object)extantTether != (Object)null) { AkSoundEngine.PostEvent("Play_OBJ_lock_pick_01", ((Component)g).gameObject); playerToFollow = null; ((Component)extantTether).GetComponent().PlayAndDestroyObject(isAlt ? "tether_alt_break" : "tether_break", (Action)null); extantTether = null; } } private IEnumerator LerpLight(Gun g) { bool emergtencyCheck = false; AdditionalBraveLight light = GameObjectExtensions.GetOrAddComponent(((Component)g).gameObject); float elapsed = 0f; while (elapsed < 1f && !((Object)(object)g == (Object)null)) { elapsed += BraveTime.DeltaTime; float t = elapsed / 1f; if (!emergtencyCheck) { light.LightIntensity = Mathf.Lerp(0f, 10f, t); light.LightRadius = Mathf.Lerp(0f, 1.5f, t); } yield return null; } } public void DestroyAllOthers(bool destroyGun = true, bool autoDestroy = false) { AmountOfChoices--; if (AmountOfChoices > 0 && !autoDestroy) { return; } for (int i = 0; i < selectableModules.Count; i++) { if (Object.op_Implicit((Object)(object)selectableModules[i].extantModule) && !selectableModules[i].HasDropped) { selectableModules[i].DoDestroy(selectableModules[i].extantModule.GetComponent()); } } ((MonoBehaviour)g).StartCoroutine(I_DoDestroy(g, destroyGun)); } public Color TierColor() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_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: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected I4, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_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) ItemQuality quality = ((PickupObject)g).quality; ItemQuality val = quality; return (Color)((val - 1) switch { 0 => new Color(0.6f, 0.3f, 0f), 1 => Color.blue, 2 => new Color(0.4f, 0.8f, 0.09f), 3 => Color.red, 4 => Color.white, _ => Color.cyan, }); } private IEnumerator I_DoDestroy(Gun g, bool destroyGun = true) { ShittyVFXAttacher obj = ((Component)g).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)obj)) { Object.Destroy((Object)(object)obj); } playerToFollow = null; if ((Object)(object)extantTether != (Object)null) { ((Component)extantTether).GetComponent().PlayAndDestroyObject(isAlt ? "tether_alt_break" : "tether_break", (Action)null); } foreach (KeyValuePair entry in tk2DTiledSprites) { if ((Object)(object)entry.Key != (Object)null) { ((Component)entry.Key).GetComponent().PlayAndDestroyObject(isAlt ? "chain_alt_break" : "chain_break", (Action)null); } } AdditionalBraveLight light = GameObjectExtensions.GetOrAddComponent(((Component)g).gameObject); isBeingDestroyed = true; if (!destroyGun) { light.LightIntensity = 0f; light.LightRadius = 0f; yield break; } bool emergtencyCheck = false; light.LightColor = TierColor(); ((BraveBehaviour)((BraveBehaviour)g).sprite).renderer.material.shader = StaticShaders.Displacer_Beast_Shader; ((BraveBehaviour)((BraveBehaviour)g).sprite).renderer.material.SetTexture("_MainTex", ((BraveBehaviour)((BraveBehaviour)g).sprite).renderer.material.mainTexture); if ((Object)(object)((Component)g).GetComponentInParent() != (Object)null) { Object.Destroy((Object)(object)((Component)g).GetComponentInParent()); } float elapsed = 0f; while (elapsed < 0.5f) { if ((Object)(object)g == (Object)null) { yield break; } elapsed += BraveTime.DeltaTime; float t = elapsed / 0.5f; ((BraveBehaviour)((BraveBehaviour)g).sprite).renderer.material.SetFloat("_BurnAmount", t); if (!emergtencyCheck) { light.LightIntensity = Mathf.Lerp(10f, 50f, t); light.LightRadius = Mathf.Lerp(1.5f, 0f, t); } SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)g).sprite, false); yield return null; } if (OnModuleSelectGunDestroyed != null) { OnModuleSelectGunDestroyed(g); } Object.Destroy((Object)(object)((Component)g).gameObject); } private void OnDestroy() { ShittyVFXAttacher component = ((Component)g).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } playerToFollow = null; if ((Object)(object)extantTether != (Object)null) { ((Component)extantTether).GetComponent().PlayAndDestroyObject(isAlt ? "tether_alt_break" : "tether_break", (Action)null); } foreach (KeyValuePair tk2DTiledSprite in tk2DTiledSprites) { if ((Object)(object)tk2DTiledSprite.Key != (Object)null) { ((Component)tk2DTiledSprite.Key).GetComponent().PlayAndDestroyObject(isAlt ? "chain_alt_break" : "chain_break", (Action)null); } } for (int i = 0; i < selectableModules.Count; i++) { if (Object.op_Implicit((Object)(object)selectableModules[i].extantModule) && !selectableModules[i].HasDropped && !selectableModules[i].BeingDestroyed) { selectableModules[i].DoDestroy(selectableModules[i].extantModule.GetComponent()); } } } } public static class ConsoleMagic { public static string FormatWithSpaces(this string s) { return Regex.Replace(s, "([a-z])([A-Z])", "$1 $2"); } public static string AddColorToLabelString(string text, string hexValue = "ff8888") { return "[color #" + hexValue + "]" + text + "[/color]"; } public static void LogButCool(string text, Texture texture) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) SGroup val = new SGroup { Size = new Vector2(20000f, 32f), AutoLayoutPadding = 0f }; for (int i = 0; i < text.Length; i++) { char c = text[i]; if (c == ' ') { ((SElement)val).Children.Add((SElement)new SRect(Color.clear) { Size = Vector2.one * 10f }); continue; } float num = Mathf.InverseLerp(0f, (float)text.Length, (float)i); Color foreground = Color.HSVToRGB(num, 1f, 1f); SLabel item = new SLabel(c.ToString()) { Foreground = foreground, With = { (SModifier)(object)new ShakyWobbly() } }; ((SElement)val).Children.Add((SElement)(object)item); } val.AutoLayout = (SGroup g) => g.AutoLayoutHorizontal; ((SElement)val).Children.Add((SElement)new SLabel { Icon = texture, With = { (SModifier)(object)new ShakyWobblyNoColor() } }); ((SElement)val).Background = new Color(0f, 0.1f, 0.1f, 0f); ((SElement)((ETGModMenu)ETGModConsole.Instance).GUI)[0].Children.Add((SElement)(object)val); } public static float Mod(float x, float m) { return (x % m + m) % m; } } [HarmonyPatch(typeof(BasicBeamController), "FindBeamTarget")] internal class BeamCollisionGarbage { [HarmonyPostfix] private static bool Postfix(bool __result, BasicBeamController __instance, Vector2 origin, Vector2 direction, float distance, int collisionMask, Vector2 targetPoint, Vector2 targetNormal, SpeculativeRigidbody hitRigidbody) { if ((Object)(object)hitRigidbody != (Object)null) { BeamCollisionEvent component = ((Component)hitRigidbody).GetComponent(); if ((Object)(object)component != (Object)null) { return component.isCollisionEvent; } } return __result; } } [HarmonyPatch(typeof(GameCursorController))] [HarmonyPatch(/*Could not decode attribute arguments.*/)] internal class CursorPatch { public static bool DisplayCursorOnController = true; [HarmonyPrefix] public static bool Postfix(ref bool __result, GameCursorController __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)GameManager.Instance.CurrentGameType == 1) { if (!BraveInput.GetInstanceForPlayer(0).HasMouse() && !BraveInput.GetInstanceForPlayer(1).HasMouse()) { return DisplayCursorOnController; } } else if (!BraveInput.GetInstanceForPlayer(0).HasMouse()) { return DisplayCursorOnController; } return true; } } public class ModuleCrafingController : ScriptableObject { private enum SelectedTier { NONE, T1, T2, T3 } private int Scale = 9; private Vector2 AdditionalOffset = new Vector2(1f, 1.75f); public Action OnCrafted; private string scrapLabel = "[sprite \"gear_\"]"; private PlayerController player; public List Queue = new List(); private SelectedTier Tier = SelectedTier.NONE; public ModulePrinterCore Core; public int ListEntry = 0; public Dictionary craftingLabels = new Dictionary(); public ModifiedDefaultLabelManager T1_Select; public ModifiedDefaultLabelManager T2_Select; public ModifiedDefaultLabelManager T3_Select; public ModifiedDefaultLabelManager CloseLabel; public ModifiedDefaultLabelManager PageLabel; public ModifiedDefaultLabelManager extantLabel; public ModifiedDefaultLabelManager craftLabel; public ModifiedDefaultLabelManager pageUpLabel; public ModifiedDefaultLabelManager pageDownLabel; public ModifiedDefaultLabelManager pageReturnLabel; public ModifiedDefaultLabelManager basicgarbageLabel; public ModifiedDefaultLabelManager CurrentScrapLabel; public void DoQuickStart(PlayerController p) { AkSoundEngine.PostEvent("Play_UI_menu_pause_01", ((Component)p).gameObject); player = p; Core = ReturnCore(p); if (!((Object)(object)Core == (Object)null)) { GameManager.Instance.PreventPausing = true; CursorPatch.DisplayCursorOnController = true; ((MonoBehaviour)p).StartCoroutine(DoDelays(p)); ToggleControl(active: true); UIHooks.OnPaused = (Action)Delegate.Combine(UIHooks.OnPaused, new Action(Le_Bomb)); } } public void Le_Bomb() { UIHooks.OnPaused = (Action)Delegate.Remove(UIHooks.OnPaused, new Action(Le_Bomb)); BraveTime.ClearMultiplier(((Component)GameManager.Instance).gameObject); Nuke(); ObliterateUI(); Object.Destroy((Object)(object)this); CursorPatch.DisplayCursorOnController = false; } public IEnumerator DoFade(bool active) { GameManager.Instance.MainCameraController.SetManualControl(true, true); CameraController mainCameraController = GameManager.Instance.MainCameraController; mainCameraController.OverridePosition = Vector2.op_Implicit(active ? (((BraveBehaviour)player).sprite.WorldCenter + new Vector2(7f, -1.5f)) : ((BraveBehaviour)player).sprite.WorldCenter); float f = 0f; while (f < 0.35f) { float q = f / 0.35f; f += GameManager.INVARIANT_DELTA_TIME; if (active) { mainCameraController.SetZoomScaleImmediate(Mathf.Lerp(1f, 1.8f, q)); Pixelator.Instance.fade = Mathf.Lerp(1f, 0.3f, q); } else { Pixelator.Instance.fade = Mathf.Lerp(0.3f, 1f, q); mainCameraController.SetZoomScaleImmediate(Mathf.Lerp(1.8f, 1f, q)); } yield return null; } if (!active) { GameManager.Instance.MainCameraController.SetManualControl(false, true); } else { BraveTime.SetTimeScaleMultiplier(0f, ((Component)GameManager.Instance).gameObject); } } private void ToggleControl(bool active) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFade(active)); Minimap.Instance.TemporarilyPreventMinimap = active; if (active) { if (!GameManager.Instance.MainCameraController.ManualControl) { GameManager.Instance.MainCameraController.OverridePosition = ((BraveBehaviour)GameManager.Instance.MainCameraController).transform.position; GameManager.Instance.MainCameraController.SetManualControl(true, true); } GameUIRoot.Instance.ForceClearReload(-1); GameUIRoot.Instance.notificationController.ForceHide(); GameUIRoot.Instance.levelNameUI.BanishLevelNameText(); Pixelator.Instance.FadeColor = Color.black; GameUIRoot.Instance.HideCoreUI("ModularCrafter"); for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { PlayerController val = GameManager.Instance.AllPlayers[i]; if (Object.op_Implicit((Object)(object)val)) { val.CurrentInputState = (PlayerInputState)1; } } } if (active) { return; } GameManager.Instance.MainCameraController.SetManualControl(false, true); GameUIRoot.Instance.ShowCoreUI("ModularCrafter"); BraveInput.ConsumeAllAcrossInstances((GungeonActionType)8); for (int j = 0; j < GameManager.Instance.AllPlayers.Length; j++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[j])) { GameManager.Instance.AllPlayers[j].CurrentInputState = (PlayerInputState)0; } } } public void Nuke() { UIHooks.OnPaused = (Action)Delegate.Remove(UIHooks.OnPaused, new Action(Le_Bomb)); GameManager.Instance.PreventPausing = false; GameManager.Instance.Unpause(); Minimap.Instance.TemporarilyPreventMinimap = false; AkSoundEngine.PostEvent("Play_UI_menu_cancel_01", ((Component)player).gameObject); AkSoundEngine.PostEvent("Play_UI_menu_unpause_01", ((Component)player).gameObject); GameManager.Instance.MainCameraController.SetManualControl(false, true); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFade(active: false)); GameUIRoot.Instance.ShowCoreUI("ModularCrafter"); BraveInput.ConsumeAllAcrossInstances((GungeonActionType)8); for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i])) { GameManager.Instance.AllPlayers[i].CurrentInputState = (PlayerInputState)0; } } CursorPatch.DisplayCursorOnController = false; if (Queue.Count != 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(CraftModules(player, Queue)); } } public IEnumerator CraftModules(PlayerController p, List modules) { AkSoundEngine.PostEvent("Play_OBJ_computer_boop_01", ((Component)p).gameObject); foreach (DefaultModule entry in modules) { AkSoundEngine.PostEvent("Play_OBJ_bomb_fuse_01", ((Component)p).gameObject); DebrisObject debris = LootEngine.SpawnItem(((Component)entry).gameObject, Vector2.op_Implicit(((BraveBehaviour)p).sprite.WorldCenter), Vector2.zero, 0f, true, false, false); ((BraveBehaviour)((BraveBehaviour)debris).sprite).renderer.material.shader = StaticShaders.Displacer_Beast_Shader; ((BraveBehaviour)((BraveBehaviour)debris).sprite).renderer.material.SetTexture("_MainTex", ((BraveBehaviour)((BraveBehaviour)debris).sprite).renderer.material.mainTexture); SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)debris).sprite, false); float elapsed = 0f; while (elapsed < 1f) { if (!((Object)(object)debris == (Object)null)) { float t = Toolbox.SinLerpTValueFull(elapsed); entry.BraveLight.LightIntensity = Mathf.Lerp(0f, 20f, t); entry.BraveLight.LightRadius = Mathf.Lerp(0f, 3f, t); elapsed += BraveTime.DeltaTime; ((BraveBehaviour)((BraveBehaviour)debris).sprite).renderer.material.SetFloat("_BurnAmount", 1f - elapsed); yield return null; continue; } yield break; } LootEngine.DoDefaultItemPoof(((BraveBehaviour)debris).sprite.WorldCenter, false, false); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)debris).sprite, Color.black); } yield return null; } public IEnumerator DoDelays(PlayerController p) { yield return null; yield return null; DoButtonRefreshSelect(p); yield return null; } public string R_C(SpecialCharactersController.SpecialCharacters specialCharacter, bool isBright = false) { return SpecialCharactersController.ReturnSpecialCharacter(specialCharacter, isBright); } public void DoButtonRefreshSelect(PlayerController p) { //IL_0048: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_0178: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Expected O, but got Unknown //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) Tier = SelectedTier.NONE; Color32 color = (p.IsUsingAlternateCostume ? new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100) : new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100)); if ((Object)(object)T1_Select == (Object)null) { T1_Select = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(2.5f, 0.25f) + AdditionalOffset, 0.5f, R_C(SpecialCharactersController.SpecialCharacters.T1), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)T1_Select).label).Click += (MouseEventHandler)delegate { Tier = SelectedTier.T1; ObliterateSelectUI(); DoButtonRefreshCraft(p); }; T1_Select.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T1, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T1)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T1_Select).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)T2_Select == (Object)null) { T2_Select = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(3.5f, 0.25f) + AdditionalOffset, 0.75f, R_C(SpecialCharactersController.SpecialCharacters.T2), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)T2_Select).label).Click += (MouseEventHandler)delegate { Tier = SelectedTier.T2; ObliterateSelectUI(); DoButtonRefreshCraft(p); }; T2_Select.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T2, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T2)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T2_Select).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)T3_Select == (Object)null) { T3_Select = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(4.5f, 0.25f) + AdditionalOffset, 0.75f, DefaultModule.ReturnTierLabel(DefaultModule.ModuleTier.Tier_3), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)T3_Select).label).Click += (MouseEventHandler)delegate { Tier = SelectedTier.T3; ObliterateSelectUI(); DoButtonRefreshCraft(p); }; T3_Select.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T3, isBright: true) : DefaultModule.ReturnTierLabel(DefaultModule.ModuleTier.Tier_3)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T3_Select).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)CloseLabel == (Object)null) { CloseLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1.5f, 0.25f) + AdditionalOffset, 0.5f, R_C(SpecialCharactersController.SpecialCharacters.CLOSE), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)CloseLabel).label).Click += (MouseEventHandler)delegate { UIHooks.OnPaused = (Action)Delegate.Remove(UIHooks.OnPaused, new Action(Le_Bomb)); BraveTime.ClearMultiplier(((Component)GameManager.Instance).gameObject); ObliterateUI(); Object.Destroy((Object)(object)this); ToggleControl(active: false); Nuke(); }; CloseLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.CLOSE, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.CLOSE)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)CloseLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)basicgarbageLabel == (Object)null) { basicgarbageLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1.5f, 1.125f) + AdditionalOffset, 0.5f, "Select Crafting Tier:", color, Autotrigger: true, 6f); } } public int GetScrapCount(PlayerController p) { return GlobalConsumableStorage.ReturnConsumableAmount("Scrap"); } public void DoButtonRefreshCraft(PlayerController p) { //IL_0048: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) ListEntry = 0; Color32 color = (p.IsUsingAlternateCostume ? new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100) : new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100)); List quickAndMessyPages = ReturnLib(); if (Object.op_Implicit((Object)(object)pageUpLabel)) { Object.Destroy((Object)(object)((Component)pageUpLabel).gameObject); } if ((Object)(object)pageUpLabel == (Object)null) { pageUpLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1.5f, -1f) + AdditionalOffset, 0.5f, R_C(SpecialCharactersController.SpecialCharacters.UP), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)pageUpLabel).label).Click += (MouseEventHandler)delegate { if (ListEntry > 0) { UpdatePageLabel(quickAndMessyPages); ListEntry--; ((dfControl)((DefaultLabelController)pageUpLabel).label).Invalidate(); UpdateOptions(); } }; pageUpLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0073: Unknown result type (might be due to invalid IL or missing references) if (ListEntry > 0) { label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.UP, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.UP)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); } else { ((dfControl)label).color = new Color32((byte)200, (byte)200, (byte)200, (byte)200); ((dfControl)label).Invalidate(); } }; ((dfControl)((DefaultLabelController)pageUpLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if (Object.op_Implicit((Object)(object)pageReturnLabel)) { Object.Destroy((Object)(object)((Component)pageReturnLabel).gameObject); } if ((Object)(object)pageReturnLabel == (Object)null) { pageReturnLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1.5f, -3.5f) + AdditionalOffset, 0.5f, R_C(SpecialCharactersController.SpecialCharacters.LEFT), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)pageReturnLabel).label).Click += (MouseEventHandler)delegate { SuperObliterateCraftUI(); DoButtonRefreshSelect(p); }; pageReturnLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.LEFT, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.LEFT)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)pageReturnLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if (Object.op_Implicit((Object)(object)pageDownLabel)) { Object.Destroy((Object)(object)((Component)pageDownLabel).gameObject); } if ((Object)(object)pageDownLabel == (Object)null) { pageDownLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1.5f, -2.25f) + AdditionalOffset, 0.5f, R_C(SpecialCharactersController.SpecialCharacters.DOWN), color, Autotrigger: true, Scale + 6); ((dfControl)((DefaultLabelController)pageDownLabel).label).Click += (MouseEventHandler)delegate { if (ReturnPagesCount(quickAndMessyPages) > ListEntry) { UpdatePageLabel(quickAndMessyPages); ListEntry++; ((dfControl)((DefaultLabelController)pageDownLabel).label).Invalidate(); UpdateOptions(); } }; pageDownLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0083: Unknown result type (might be due to invalid IL or missing references) if (ReturnPagesCount(quickAndMessyPages) > ListEntry) { label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.DOWN, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.DOWN)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); } else { ((dfControl)label).color = new Color32((byte)200, (byte)200, (byte)200, (byte)200); ((dfControl)label).Invalidate(); } }; ((dfControl)((DefaultLabelController)pageDownLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if (Object.op_Implicit((Object)(object)CurrentScrapLabel)) { Object.Destroy((Object)(object)((Component)CurrentScrapLabel).gameObject); } if ((Object)(object)CurrentScrapLabel == (Object)null) { CurrentScrapLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(2.5f, 1f) + AdditionalOffset, 0.5f, "[" + scrapLabel + " " + GetScrapCount(player) + "]", color, Autotrigger: true, 9f); CurrentScrapLabel.OnUpdate = delegate(dfLabel self) { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) self.text = "[" + scrapLabel + " " + GetScrapCount(player) + "]"; ((dfControl)self).Invalidate(); ((DefaultLabelController)CurrentScrapLabel).offset = Vector2.op_Implicit(((Object)(object)craftLabel != (Object)null) ? (new Vector2(2.5f + (float)ProcessText(((DefaultLabelController)craftLabel).label.text) * 0.125f * Mathf.Min(1f, craftLabel.T * 4f), 1f) + AdditionalOffset) : (new Vector2(2.5f, 1f) + AdditionalOffset)); }; } UpdateOptions(); } public int ProcessText(string text) { int num = text.Length; if (text.Contains(scrapLabel)) { num -= 40; } return num; } public void UpdateOptions() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Expected O, but got Unknown //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Expected O, but got Unknown //IL_035e: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)extantLabel)) { extantLabel.Inv(); } if (Object.op_Implicit((Object)(object)PageLabel)) { Object.Destroy((Object)(object)((Component)PageLabel).gameObject); } if (Object.op_Implicit((Object)(object)craftLabel)) { craftLabel.Inv(); } Color32 cl = (player.IsUsingAlternateCostume ? new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100) : new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100)); foreach (KeyValuePair craftingLabel in craftingLabels) { if ((Object)(object)craftingLabel.Key != (Object)null) { Object.Destroy((Object)(object)((Component)craftingLabel.Key).gameObject); } } List list = ReturnLib(); int c = 0; MouseEventHandler val = default(MouseEventHandler); foreach (GlobalModuleStorage.QuickAndMessyPage page in list) { if (ListEntry != page.Page) { continue; } string text = page.module.LabelName + " (" + scrapLabel + " " + ModuleCost(page.module) + ")"; bool flag = GameStatsManager.m_instance.m_encounteredTrackables.ContainsKey(((BraveBehaviour)page.module).encounterTrackable.EncounterGuid); if (!flag) { text = StaticColorHexes.AddColorToLabelString("[UNDISCOVERED]", StaticColorHexes.Light_Orange_Hex); } ModifiedDefaultLabelManager Button = Toolbox.GenerateText(((BraveBehaviour)player).transform, new Vector2(2.5f, 0.25f - 0.75f * (float)c) + AdditionalOffset, 0.66f, text, cl, Autotrigger: true, Scale); Button.StoredModuleInfo = page.module; if (flag) { ((dfControl)((DefaultLabelController)Button).label).Click += (MouseEventHandler)delegate { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown if ((Object)(object)extantLabel != (Object)null) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } extantLabel = Toolbox.GenerateText(((BraveBehaviour)player).transform, new Vector2(2.5f, -1.75f - 0.5f * (float)c) + AdditionalOffset, 0.66f, page.module.LabelDescription, cl, Autotrigger: true, 4f); if (Object.op_Implicit((Object)(object)craftLabel)) { Object.Destroy((Object)(object)((Component)craftLabel).gameObject); } craftLabel = Toolbox.GenerateText(((BraveBehaviour)player).transform, new Vector2(2.5f, 1f) + AdditionalOffset, 0.66f, StaticColorHexes.AddColorToLabelString("CRAFT", StaticColorHexes.Light_Green_Hex) + "( " + scrapLabel + " " + StaticColorHexes.AddColorToLabelString("-" + ModuleCost(page.module), StaticColorHexes.Red_Color_Hex) + " )", cl, Autotrigger: true, Scale); craftLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) if (ModuleCost(Button.StoredModuleInfo) <= GetScrapCount(player)) { label.text = StaticColorHexes.AddColorToLabelString("CRAFT", boolean ? StaticColorHexes.Light_Orange_Hex : StaticColorHexes.White_Hex) + "( " + scrapLabel + " " + StaticColorHexes.AddColorToLabelString("-" + ModuleCost(page.module), StaticColorHexes.Red_Color_Hex) + " )"; ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); } }; craftLabel.OnUpdate = delegate(dfLabel label) { if (ModuleCost(Button.StoredModuleInfo) <= GetScrapCount(player)) { label.text = StaticColorHexes.AddColorToLabelString("CRAFT", StaticColorHexes.White_Hex) + "( " + scrapLabel + " " + StaticColorHexes.AddColorToLabelString("-" + ModuleCost(page.module), StaticColorHexes.Red_Color_Hex) + " )"; ((dfControl)label).Invalidate(); } else { label.text = StaticColorHexes.AddColorToLabelString("INSUFFICIENT SCRAP", StaticColorHexes.Red_Color_Hex); ((dfControl)label).Invalidate(); } }; ((dfControl)((DefaultLabelController)craftLabel).label).Click += (MouseEventHandler)delegate { if (ModuleCost(Button.StoredModuleInfo) <= GetScrapCount(player)) { AkSoundEngine.PostEvent("Play_OBJ_metronome_jingle_01", ((Component)player).gameObject); Toolbox.NotifyCustom("Crafted Module:", page.module.LabelName, ((BraveBehaviour)page.module).sprite.spriteId, ((BraveBehaviour)page.module).sprite.collection, (NotificationColor)2); GlobalConsumableStorage.RemoveConsumableAmount("Scrap", ModuleCost(page.module)); Queue.Add(page.module); if (OnCrafted != null) { OnCrafted(); } } }; ((dfControl)((DefaultLabelController)craftLabel).label).MouseEnter += (MouseEventHandler)delegate { if (ModuleCost(Button.StoredModuleInfo) <= GetScrapCount(player)) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); } }; }; Button.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0034: 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_0039: Unknown result type (might be due to invalid IL or missing references) ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; Button.OnUpdate = delegate(dfLabel label) { if (ModuleCost(Button.StoredModuleInfo) <= GetScrapCount(player)) { label.text = StaticColorHexes.AddColorToLabelString(Button.StoredModuleInfo.LabelName, Button.IsMouseHovering() ? StaticColorHexes.Light_Orange_Hex : StaticColorHexes.White_Hex) + " (" + scrapLabel + " " + StaticColorHexes.AddColorToLabelString(ModuleCost(Button.StoredModuleInfo).ToString(), StaticColorHexes.Green_Hex) + ")"; ((dfControl)label).Invalidate(); } else { label.text = StaticColorHexes.AddColorToLabelString(Button.StoredModuleInfo.LabelName, Button.IsMouseHovering() ? StaticColorHexes.Light_Orange_Hex : StaticColorHexes.White_Hex) + " (" + scrapLabel + " " + StaticColorHexes.AddColorToLabelString(ModuleCost(Button.StoredModuleInfo).ToString(), StaticColorHexes.Red_Color_Hex) + ")"; ((dfControl)label).Invalidate(); } }; dfLabel label2 = ((DefaultLabelController)Button).label; MouseEventHandler obj = val; if (obj == null) { MouseEventHandler val2 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val2; val = val2; obj = val3; } ((dfControl)label2).MouseEnter += obj; } craftingLabels.Add(Button, page.module); int num = c; c = num + 1; } PageLabel = Toolbox.GenerateText(((BraveBehaviour)player).transform, new Vector2(2.5f, 0.25f - 0.75f * (float)c) + AdditionalOffset, 0.66f, "Page:" + (ListEntry + 1) + " / " + ((list.Count > 0) ? (list.Last().Page + 1).ToString() : "1"), cl, Autotrigger: true, Scale); UpdatePageLabel(list); } public int ModuleCost(DefaultModule module) { if (module.OverrideScrapCost.HasValue) { return module.OverrideScrapCost.Value; } return module.Tier switch { DefaultModule.ModuleTier.Tier_1 => 4, DefaultModule.ModuleTier.Tier_2 => 8, DefaultModule.ModuleTier.Tier_3 => 12, _ => 8, }; } public void UpdatePageLabel(List quickAndMessyPages) { if (Object.op_Implicit((Object)(object)PageLabel)) { ((DefaultLabelController)PageLabel).label.text = "Page:" + (ListEntry + 1) + " / " + ((quickAndMessyPages.Count > 0) ? (quickAndMessyPages.Last().Page + 1).ToString() : "1"); ((dfControl)((DefaultLabelController)PageLabel).label).Invalidate(); } } public int ReturnPagesCount(List quickAndMessyPages) { return (quickAndMessyPages.Count > 0) ? quickAndMessyPages.Last().Page : 0; } private List ReturnLib() { return Tier switch { SelectedTier.T1 => GlobalModuleStorage.pages_T1, SelectedTier.T2 => GlobalModuleStorage.pages_T2, SelectedTier.T3 => GlobalModuleStorage.pages_T3, _ => GlobalModuleStorage.pages_T1, }; } public ModulePrinterCore ReturnCore(PlayerController p) { for (int i = 0; i < p.passiveItems.Count; i++) { if (p.passiveItems[i] is ModulePrinterCore result) { return result; } } return null; } private void ObliterateCraftUI() { if (Object.op_Implicit((Object)(object)PageLabel)) { PageLabel.Inv(); } if (Object.op_Implicit((Object)(object)extantLabel)) { extantLabel.Inv(); } if (Object.op_Implicit((Object)(object)pageUpLabel)) { pageUpLabel.Inv(); } if (Object.op_Implicit((Object)(object)pageDownLabel)) { pageDownLabel.Inv(); } if (Object.op_Implicit((Object)(object)PageLabel)) { PageLabel.Inv(); } if (Object.op_Implicit((Object)(object)craftLabel)) { craftLabel.Inv(); } if (Object.op_Implicit((Object)(object)pageReturnLabel)) { pageReturnLabel.Inv(); } if (Object.op_Implicit((Object)(object)CurrentScrapLabel)) { CurrentScrapLabel.Inv(); } foreach (KeyValuePair craftingLabel in craftingLabels) { if ((Object)(object)craftingLabel.Key != (Object)null) { craftingLabel.Key.Inv(); } } craftingLabels.Clear(); } private void SuperObliterateCraftUI() { if (Object.op_Implicit((Object)(object)PageLabel)) { Object.Destroy((Object)(object)((Component)PageLabel).gameObject); } if (Object.op_Implicit((Object)(object)extantLabel)) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } if (Object.op_Implicit((Object)(object)pageUpLabel)) { Object.Destroy((Object)(object)((Component)pageUpLabel).gameObject); } if (Object.op_Implicit((Object)(object)pageDownLabel)) { Object.Destroy((Object)(object)((Component)pageDownLabel).gameObject); } if (Object.op_Implicit((Object)(object)PageLabel)) { Object.Destroy((Object)(object)((Component)PageLabel).gameObject); } if (Object.op_Implicit((Object)(object)craftLabel)) { Object.Destroy((Object)(object)((Component)craftLabel).gameObject); } if (Object.op_Implicit((Object)(object)pageReturnLabel)) { Object.Destroy((Object)(object)((Component)pageReturnLabel).gameObject); } if (Object.op_Implicit((Object)(object)CurrentScrapLabel)) { Object.Destroy((Object)(object)((Component)CurrentScrapLabel).gameObject); } foreach (KeyValuePair craftingLabel in craftingLabels) { if ((Object)(object)craftingLabel.Key != (Object)null) { craftingLabel.Key.Inv(); } } craftingLabels.Clear(); } private void ObliterateSelectUI() { if (Object.op_Implicit((Object)(object)T1_Select)) { Object.Destroy((Object)(object)((Component)T1_Select).gameObject); } if (Object.op_Implicit((Object)(object)T2_Select)) { Object.Destroy((Object)(object)((Component)T2_Select).gameObject); } if (Object.op_Implicit((Object)(object)T3_Select)) { Object.Destroy((Object)(object)((Component)T3_Select).gameObject); } if (Object.op_Implicit((Object)(object)basicgarbageLabel)) { Object.Destroy((Object)(object)((Component)basicgarbageLabel).gameObject); } if (Object.op_Implicit((Object)(object)CurrentScrapLabel)) { Object.Destroy((Object)(object)((Component)CurrentScrapLabel).gameObject); } } public void ObliterateUI() { if (Object.op_Implicit((Object)(object)T1_Select)) { T1_Select.Inv(); } if (Object.op_Implicit((Object)(object)T2_Select)) { T2_Select.Inv(); } if (Object.op_Implicit((Object)(object)T3_Select)) { T3_Select.Inv(); } if (Object.op_Implicit((Object)(object)CloseLabel)) { CloseLabel.Inv(); } if (Object.op_Implicit((Object)(object)extantLabel)) { extantLabel.Inv(); } if (Object.op_Implicit((Object)(object)pageDownLabel)) { pageDownLabel.Inv(); } if (Object.op_Implicit((Object)(object)pageUpLabel)) { pageUpLabel.Inv(); } if (Object.op_Implicit((Object)(object)PageLabel)) { PageLabel.Inv(); } if (Object.op_Implicit((Object)(object)pageReturnLabel)) { pageReturnLabel.Inv(); } if (Object.op_Implicit((Object)(object)craftLabel)) { craftLabel.Inv(); } if (Object.op_Implicit((Object)(object)basicgarbageLabel)) { Object.Destroy((Object)(object)((Component)basicgarbageLabel).gameObject); } if (Object.op_Implicit((Object)(object)CurrentScrapLabel)) { Object.Destroy((Object)(object)((Component)CurrentScrapLabel).gameObject); } foreach (KeyValuePair craftingLabel in craftingLabels) { if ((Object)(object)craftingLabel.Key != (Object)null) { craftingLabel.Key.Inv(); } } craftingLabels.Clear(); } } public class ModuleInventoryController : ScriptableObject { private class LocalChecker { public bool isHoveringPowerDown; public bool isHoveringPowerUp; public DefaultModule module; } public enum Mode { DEF, TIERED_1, TIERED_2, TIERED_3, TIERED_4, UNIQUE } public class QuickAndMessyPage { public ModulePrinterCore.ModuleContainer moduleContainer; public int Page; public int Entry; } private PlayerController player; private int Scale = 9; private float ScalePos = 9f; public float OverrideDisplayPowerAddOn = -999f; private Dictionary painers = new Dictionary(); private LocalChecker currentChecker; private Dictionary localCheckers = new Dictionary(); public bool IsNone; public int ListEntry = 0; public Mode CurrentMode; private int InfoPage = -1; public DefaultModule.ModuleTier selectedTier; private string scrapLabel = "[sprite \"gear_\"]"; private float MainOffset = 1.75f; public List pages_default = new List(); public List pages_T1 = new List(); public List pages_T2 = new List(); public List pages_T3 = new List(); public List pages_T4 = new List(); public List pages_Unique = new List(); private ModulePrinterCore Core; public ModifiedDefaultLabelManager UpLabel; public ModifiedDefaultLabelManager DownLabel; public ModifiedDefaultLabelManager CloseLabel; public ModifiedDefaultLabelManager PageLabel; public List garbageLabels = new List(); public List secondaryGarbageLabels = new List(); public ModifiedDefaultLabelManager extantLabel; public ModifiedDefaultLabelManager T1bLabel; public ModifiedDefaultLabelManager T2bLabel; public ModifiedDefaultLabelManager T3bLabel; public ModifiedDefaultLabelManager T4bLabel; public ModifiedDefaultLabelManager TUniquebLabel; public ModifiedDefaultLabelManager AnyLabel; public ModifiedDefaultLabelManager PowerLabel; public ModifiedDefaultLabelManager InfoLabel; public static List Advice = new List { "This is your Module Inventory, from where you will " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " and look at your collected modules.\nWhen in your inventory, you can click on a module to see its description and " + StaticColorHexes.AddColorToLabelString("Power usage", StaticColorHexes.Light_Blue_Color_Hex) + ".", "Modules need to be " + StaticColorHexes.AddColorToLabelString("powered", StaticColorHexes.Light_Blue_Color_Hex) + " to gain their benefits, but you only have a limited reserve of " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + ".\nYou can get multiple of the same module to get " + StaticColorHexes.AddColorToLabelString("increased benefits", StaticColorHexes.Yellow_Hex) + ", but also " + StaticColorHexes.AddColorToLabelString("increased Power Consumption", StaticColorHexes.Light_Blue_Color_Hex) + ".\nModules stacked past the first one will only use half as much " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + ".", "To upgrade your " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " reserve, you will need to collect Scrap by scrapping items or finding it naturally.\nYou can upgrade your Power by clicking on the label that shows your power, as long as you have enough Scrap.\n" + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " can also be gotten from various items, like health items.", "Your starting active items mode can be switched by holding the '" + StaticColorHexes.AddColorToLabelString("Reload", StaticColorHexes.Yellow_Hex) + "' button.\nThe altername mode lets you " + StaticColorHexes.AddColorToLabelString("turn items and pickups into useful Scrap", StaticColorHexes.Yellow_Hex) + ".", "Sometimes a gun spawns in a " + StaticColorHexes.AddColorToLabelString("slightly inconvenient position", StaticColorHexes.Yellow_Hex) + ", and you can't access a shown module.\nIf you interact with the gun in this state,\nit till tether to you and move towards you, " + StaticColorHexes.AddColorToLabelString("dragging any modules", StaticColorHexes.Yellow_Hex) + " along as well.", "In a modules description, " + StaticColorHexes.AddColorToLabelString("Orange", StaticColorHexes.Orange_Hex) + " text represents what you get after " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " a module past the first stack.\nThis also includes how much " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " it will use as well.", "Some items may not be as " + StaticColorHexes.AddColorToLabelString("useless as they initially seem.", StaticColorHexes.Yellow_Hex) + ".\nIndicated with a synergy, these items usually have a special benefit to the Modular.", "Remember to read the description of any Modules you find carefully.\nSome modules may be " + StaticColorHexes.AddColorToLabelString("more beneficial to take in very specific circumstances", StaticColorHexes.Yellow_Hex) + ".", "Remember to " + StaticColorHexes.AddColorToLabelString("take the Bullet That Can Kill The Past", StaticColorHexes.Yellow_Hex) + ", if you seek to return to your Past.", StaticColorHexes.AddColorToLabelString("Have fun! :)", StaticColorHexes.Yellow_Hex) }; public static List SpecialAdvice = new List { "Modular cannot do a handstand, as they " + StaticColorHexes.AddColorToLabelString("only have one hand.", StaticColorHexes.Yellow_Hex) + ".", "There are very rare secret modules that you can find with " + StaticColorHexes.AddColorToLabelString("very", StaticColorHexes.Yellow_Hex) + " unique effects.", StaticColorHexes.AddColorToLabelString("[][][][][][][][][][][][][][][]", StaticColorHexes.Yellow_Hex) + "\n" + StaticColorHexes.AddColorToLabelString("[][][][][][][][][][][][][][][]", StaticColorHexes.White_Hex) + "\n" + StaticColorHexes.AddColorToLabelString("[][][][][][][][][][][][][][][]", StaticColorHexes.Purple_Hex) + "\n" + StaticColorHexes.AddColorToLabelString("[][][][][][][][][][][][][][][]", StaticColorHexes.Black_Hex) + "\n" + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.HEART) + " " + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.HEART) + " " + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.HEART), StaticColorHexes.AddColorToLabelString("T", StaticColorHexes.Light_Blue_Color_Hex) + StaticColorHexes.AddColorToLabelString("r", StaticColorHexes.Pink_Hex) + "a" + StaticColorHexes.AddColorToLabelString("n", StaticColorHexes.Pink_Hex) + StaticColorHexes.AddColorToLabelString("s", StaticColorHexes.Light_Blue_Color_Hex) + " Rights!", StaticColorHexes.AddColorToLabelString("Be kind to people. <3", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("You've got this!", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Remember, there is always someone that cares about you.\nReach out if you are in need.", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Remember to go outside every once in a while.\nSometimes, life isn't as bleak as it may seem, and you may just need a different perspective.", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Take breaks from gaming every once in a while.\nAs fun as it can be, you can still burn out.", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("If you are feeling down, do talk to someone about it.\nBottling up emotions ends up hurting you more in the long run.", StaticColorHexes.Yellow_Hex) }; public float ScaleMult() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Toolbox.CalculateScale_X_Y_Based_On_Resolution(); if (val.x < 1f && val.y < 1f) { return 1f; } return 1f - (val.x - 1f); } public void DoQuickStart(PlayerController p) { AkSoundEngine.PostEvent("Play_UI_menu_pause_01", ((Component)p).gameObject); player = p; Core = ReturnCore(p); CurrentMode = Mode.DEF; if (!((Object)(object)Core == (Object)null)) { IsNone = Core.ModuleContainers.Count == 0; ToggleControl(active: true); ScalePos = ScaleMult(); CursorPatch.DisplayCursorOnController = true; ((MonoBehaviour)p).StartCoroutine(DoDelays(p)); UIHooks.OnPaused = (Action)Delegate.Combine(UIHooks.OnPaused, new Action(Le_Bomb)); } } public IEnumerator DoFade(bool active) { GameManager.Instance.MainCameraController.SetManualControl(true, true); CameraController mainCameraController = GameManager.Instance.MainCameraController; mainCameraController.OverridePosition = Vector2.op_Implicit(active ? (((BraveBehaviour)player).sprite.WorldCenter + new Vector2(6f, -1.5f)) : ((BraveBehaviour)player).sprite.WorldCenter); float f = 0f; while (f < 0.35f) { float q = f / 0.35f; f += GameManager.INVARIANT_DELTA_TIME; if (active) { mainCameraController.SetZoomScaleImmediate(Mathf.Lerp(1f, 1.8f, q)); Pixelator.Instance.fade = Mathf.Lerp(1f, 0.3f, q); } else { Pixelator.Instance.fade = Mathf.Lerp(0.3f, 1f, q); mainCameraController.SetZoomScaleImmediate(Mathf.Lerp(1.8f, 1f, q)); } yield return null; } if (!active) { GameManager.Instance.MainCameraController.SetManualControl(false, true); } else { BraveTime.SetTimeScaleMultiplier(0f, ((Component)GameManager.Instance).gameObject); } } public void Le_Bomb() { UIHooks.OnPaused = (Action)Delegate.Remove(UIHooks.OnPaused, new Action(Le_Bomb)); BraveTime.ClearMultiplier(((Component)GameManager.Instance).gameObject); Nuke(); ObliterateUI(); Object.Destroy((Object)(object)this); CursorPatch.DisplayCursorOnController = false; } private void ToggleControl(bool active) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFade(active)); Minimap.Instance.TemporarilyPreventMinimap = active; if (active) { if (!GameManager.Instance.MainCameraController.ManualControl) { GameManager.Instance.MainCameraController.OverridePosition = ((BraveBehaviour)GameManager.Instance.MainCameraController).transform.position; GameManager.Instance.MainCameraController.SetManualControl(true, true); } GameUIRoot.Instance.ForceClearReload(-1); GameUIRoot.Instance.notificationController.ForceHide(); GameUIRoot.Instance.levelNameUI.BanishLevelNameText(); Pixelator.Instance.FadeColor = Color.black; GameUIRoot.Instance.HideCoreUI("ModularInventory"); for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { PlayerController val = GameManager.Instance.AllPlayers[i]; if (Object.op_Implicit((Object)(object)val)) { val.CurrentInputState = (PlayerInputState)1; } } } if (active) { return; } GameManager.Instance.MainCameraController.SetManualControl(false, true); GameUIRoot.Instance.ShowCoreUI("ModularInventory"); BraveInput.ConsumeAllAcrossInstances((GungeonActionType)8); for (int j = 0; j < GameManager.Instance.AllPlayers.Length; j++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[j])) { GameManager.Instance.AllPlayers[j].CurrentInputState = (PlayerInputState)0; } } } private void Nuke() { AkSoundEngine.PostEvent("Play_UI_menu_cancel_01", ((Component)player).gameObject); AkSoundEngine.PostEvent("Play_UI_menu_unpause_01", ((Component)player).gameObject); GameManager.Instance.Unpause(); Minimap.Instance.TemporarilyPreventMinimap = false; GameManager.Instance.MainCameraController.SetManualControl(false, true); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFade(active: false)); GameUIRoot.Instance.ShowCoreUI("ModularInventory"); BraveInput.ConsumeAllAcrossInstances((GungeonActionType)8); for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i])) { GameManager.Instance.AllPlayers[i].CurrentInputState = (PlayerInputState)0; } } } public IEnumerator DoDelays(PlayerController p) { yield return null; CurrentMode = Mode.DEF; for (int i = 0; i < Core.ModuleContainers.Count; i++) { ModulePrinterCore.ModuleContainer defMod = Core.ModuleContainers[i]; AddNewPages(defMod); AddNewPagesTiered(defMod); } yield return null; DoButtonRefresh(p); yield return null; DisplayModule(p); } public void DoUpdate(PlayerController p, int PageMove) { UpdatePageLabel(); ListEntry += PageMove; ((dfControl)((DefaultLabelController)UpLabel).label).Invalidate(); switch (CurrentMode) { case Mode.DEF: DisplayModule(p, ClearOut: true); break; case Mode.TIERED_1: DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_1, ClearOut: true); break; case Mode.TIERED_2: DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_2, ClearOut: true); break; case Mode.TIERED_3: DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_3, ClearOut: true); break; case Mode.TIERED_4: DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_Omega, ClearOut: true); break; case Mode.UNIQUE: DisplayModuleTiered(p, DefaultModule.ModuleTier.Unique, ClearOut: true); break; default: DisplayModule(p, ClearOut: true); break; } } public string R_C(SpecialCharactersController.SpecialCharacters specialCharacter, bool isBright = false) { return SpecialCharactersController.ReturnSpecialCharacter(specialCharacter, isBright); } public void DoButtonRefresh(PlayerController p) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Expected O, but got Unknown //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Expected O, but got Unknown //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Expected O, but got Unknown //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Expected O, but got Unknown //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0720: Expected O, but got Unknown //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_0754: Expected O, but got Unknown //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Expected O, but got Unknown //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Expected O, but got Unknown //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Expected O, but got Unknown //IL_088a: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Expected O, but got Unknown //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Expected O, but got Unknown //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Expected O, but got Unknown Color32 cl = (p.IsUsingAlternateCostume ? new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100) : new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100)); if ((Object)(object)UpLabel == (Object)null) { UpLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1f, 0.75f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.UP), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)UpLabel).label).Click += (MouseEventHandler)delegate { if (!IsNone && ListEntry > 0) { DoUpdate(p, -1); } else if (!IsNone) { AkSoundEngine.PostEvent("Play_OBJ_purchase_unable_01", ((Component)player).gameObject); } }; UpLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (ListEntry > 0 && !IsNone) { label.text = R_C(SpecialCharactersController.SpecialCharacters.UP, isBright: true); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); } else { label.text = R_C(SpecialCharactersController.SpecialCharacters.UP); ((dfControl)label).color = new Color32((byte)155, (byte)155, (byte)155, (byte)155); ((dfControl)label).Invalidate(); } }; ((dfControl)((DefaultLabelController)UpLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)DownLabel == (Object)null) { DownLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1f, 0f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.DOWN), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)DownLabel).label).Click += (MouseEventHandler)delegate { if (!IsNone && ReturnPagesCount() > ListEntry) { DoUpdate(p, 1); } else if (!IsNone) { AkSoundEngine.PostEvent("Play_OBJ_purchase_unable_01", ((Component)player).gameObject); } }; DownLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) if (ReturnPagesCount() > ListEntry && !IsNone) { label.text = R_C(SpecialCharactersController.SpecialCharacters.DOWN, isBright: true); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); } else { label.text = R_C(SpecialCharactersController.SpecialCharacters.DOWN); ((dfControl)label).color = new Color32((byte)155, (byte)155, (byte)155, (byte)155); ((dfControl)label).Invalidate(); } }; ((dfControl)((DefaultLabelController)DownLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)CloseLabel == (Object)null) { CloseLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1f, 1.5f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.CLOSE), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)CloseLabel).label).Click += (MouseEventHandler)delegate { UIHooks.OnPaused = (Action)Delegate.Remove(UIHooks.OnPaused, new Action(Le_Bomb)); BraveTime.ClearMultiplier(((Component)GameManager.Instance).gameObject); Nuke(); ObliterateUI(); Object.Destroy((Object)(object)this); CursorPatch.DisplayCursorOnController = false; }; CloseLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.CLOSE, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.CLOSE)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)CloseLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)T1bLabel == (Object)null) { T1bLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1.75f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.T1), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)T1bLabel).label).Click += (MouseEventHandler)delegate { ListEntry = 0; CurrentMode = Mode.TIERED_1; DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_1, ClearOut: true); }; T1bLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T1, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T1)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T1bLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)T2bLabel == (Object)null) { T2bLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(2.5f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.T2), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)T2bLabel).label).Click += (MouseEventHandler)delegate { CurrentMode = Mode.TIERED_2; ListEntry = 0; DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_2, ClearOut: true); }; T2bLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T2, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T2)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T2bLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)T3bLabel == (Object)null) { T3bLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(3.25f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.T3), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)T3bLabel).label).Click += (MouseEventHandler)delegate { CurrentMode = Mode.TIERED_3; ListEntry = 0; DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_3, ClearOut: true); }; T3bLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T3, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T3)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T3bLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)T4bLabel == (Object)null && pages_T4.Count > 0) { T4bLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(4f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.T4), new Color32((byte)200, (byte)10, (byte)10, (byte)100), Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)T4bLabel).label).Click += (MouseEventHandler)delegate { CurrentMode = Mode.TIERED_4; ListEntry = 0; DisplayModuleTiered(p, DefaultModule.ModuleTier.Tier_Omega, ClearOut: true); }; T4bLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0067: 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_006c: Unknown result type (might be due to invalid IL or missing references) ListEntry = 0; label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T4, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T4)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)T4bLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)TUniquebLabel == (Object)null && pages_Unique.Count > 0) { TUniquebLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, (pages_T4.Count == 0) ? new Vector2(4f, 2.25f) : new Vector2(4.75f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.T_UNIQUE), new Color32((byte)200, (byte)60, (byte)0, (byte)100), Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)TUniquebLabel).label).Click += (MouseEventHandler)delegate { CurrentMode = Mode.UNIQUE; ListEntry = 0; DisplayModuleTiered(p, DefaultModule.ModuleTier.Unique, ClearOut: true); }; TUniquebLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0067: 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_006c: Unknown result type (might be due to invalid IL or missing references) ListEntry = 0; label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.T_UNIQUE, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.T_UNIQUE)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)TUniquebLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)InfoLabel == (Object)null) { InfoLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2((pages_T4.Count > 0) ? 4.75f : 4f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.INFO), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)InfoLabel).label).Click += (MouseEventHandler)delegate { //IL_00e4: 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) List list = ((CurrentMode != 0) ? ReturnPageListTier(selectedTier) : pages_default); int num2 = ((list.Count() == 0) ? 1 : 0); if (Object.op_Implicit((Object)(object)extantLabel)) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } foreach (QuickAndMessyPage item in list) { if (ListEntry == item.Page) { num2++; } } extantLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0f - 0.75f * (float)num2), 0.66f, GetInfoPage() + "\nPage: " + (InfoPage + 1) + "/" + Advice.Count, cl, Autotrigger: true, Scale / 2); }; InfoLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.INFO, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.INFO)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)InfoLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if ((Object)(object)AnyLabel == (Object)null) { AnyLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1f, 2.25f), 0.5f, R_C(SpecialCharactersController.SpecialCharacters.GOOGLY), cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)AnyLabel).label).Click += (MouseEventHandler)delegate { CurrentMode = Mode.DEF; ListEntry = 0; DisplayModule(p, ClearOut: true); }; AnyLabel.MouseHover = delegate(dfLabel label, bool boolean) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) label.text = (boolean ? R_C(SpecialCharactersController.SpecialCharacters.GOOGLY, isBright: true) : R_C(SpecialCharactersController.SpecialCharacters.GOOGLY)); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)AnyLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } if (!((Object)(object)PowerLabel == (Object)null)) { return; } PowerLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(1f, 3f), 0.5f, "[ " + R_C(SpecialCharactersController.SpecialCharacters.POWER) + " : " + Core.ReturnPowerConsumption() + " / " + Core.ReturnTotalPower() + " ] [" + StaticColorHexes.AddColorToLabelString("+", StaticColorHexes.Light_Orange_Hex) + R_C(SpecialCharactersController.SpecialCharacters.POWER) + "]", cl, Autotrigger: true, Scale - 1); ModifiedDefaultLabelManager powerLabel = PowerLabel; powerLabel.OnUpdate = (Action)Delegate.Combine(powerLabel.OnUpdate, (Action)delegate(dfLabel obj1) { //IL_0202: 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_0207: Unknown result type (might be due to invalid IL or missing references) bool flag = PowerLabel.IsMouseHovering(); float num = ((OverrideDisplayPowerAddOn != -999f) ? OverrideDisplayPowerAddOn : Core.ReturnPowerConsumption()); string text = StaticColorHexes.AddColorToLabelString(num.ToString(), (num > Core.ReturnTotalPower()) ? StaticColorHexes.Red_Color_Hex : StaticColorHexes.Green_Hex); string text2 = Core.ReturnPowerConsumption().ToString(); if (OverrideDisplayPowerAddOn != -999f) { text2 += SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.ARROW); text2 += text; } string text3 = "[ " + R_C(SpecialCharactersController.SpecialCharacters.POWER) + " : " + text2 + " / " + (flag ? StaticColorHexes.AddColorToLabelString((Core.ReturnTotalPower() + 1f).ToString(), StaticColorHexes.Green_Hex) : Core.ReturnTotalPower().ToString()) + " ]"; text3 += (flag ? (" [Upgrade:" + StaticColorHexes.AddColorToLabelString(ReturnUpgradeCost().ToString(), CanAffordUpgrade() ? StaticColorHexes.Green_Hex : StaticColorHexes.Red_Color_Hex) + scrapLabel + "]") : (" [" + StaticColorHexes.AddColorToLabelString("+", StaticColorHexes.Light_Orange_Hex) + R_C(SpecialCharactersController.SpecialCharacters.POWER) + "]")); ((dfControl)obj1).color = (flag ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); obj1.text = text3; ((dfControl)obj1).Invalidate(); }); ((dfControl)((DefaultLabelController)PowerLabel).label).Click += (MouseEventHandler)delegate { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (CanAffordUpgrade()) { GlobalConsumableStorage.RemoveConsumableAmount("Scrap", ReturnUpgradeCost()); GameObject val = Object.Instantiate(((Component)PickupObjectDatabase.GetById(PowerCell.PowerCellID)).gameObject, Vector3.zero, Quaternion.identity); PickupObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.CanBeDropped = false; component.Pickup(player); } } }; ((dfControl)((DefaultLabelController)PowerLabel).label).MouseEnter += (MouseEventHandler)delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; } public void InstantUpdateLabelToText(dfLabel label, string newText) { label.text = newText; ((dfControl)label).Invalidate(); } public bool CanAffordUpgrade() { if (GlobalConsumableStorage.ReturnConsumableAmount("Scrap") >= ReturnUpgradeCost()) { return true; } return false; } public int ReturnUpgradeCost() { return Mathf.Max(6, Mathf.RoundToInt(Core.ReturnTotalPowerMasteryless() + 3f) + Core.ReturnPowerCellCount()); } public int ReturnPagesCount() { return CurrentMode switch { Mode.DEF => (pages_default.Count > 0) ? pages_default.Last().Page : 0, Mode.TIERED_1 => (pages_T1.Count > 0) ? pages_T1.Last().Page : 0, Mode.TIERED_2 => (pages_T2.Count > 0) ? pages_T2.Last().Page : 0, Mode.TIERED_3 => (pages_T3.Count > 0) ? pages_T3.Last().Page : 0, Mode.TIERED_4 => (pages_T4.Count > 0) ? pages_T4.Last().Page : 0, _ => (pages_default.Count > 0) ? pages_default.Last().Page : 0, }; } public ModulePrinterCore ReturnCore(PlayerController p) { for (int i = 0; i < p.passiveItems.Count; i++) { if (p.passiveItems[i] is ModulePrinterCore result) { return result; } } return null; } private int ReturnStackAdd(LocalChecker localChecker) { int result = 0; if (localChecker.isHoveringPowerUp) { result = 1; } if (localChecker.isHoveringPowerDown) { result = -1; } return result; } private string ReturnHexStringBasedOnPower(LocalChecker localChecker) { if (localChecker == null) { return StaticColorHexes.White_Hex; } string result = StaticColorHexes.White_Hex; bool flag = Core.ReturnPowerConsumptionOfNextStack(localChecker.module, ReturnStackAdd(localChecker)) <= Core.ReturnTotalPower(); if (flag) { result = StaticColorHexes.Green_Hex; } if (!flag) { result = StaticColorHexes.Red_Color_Hex; } return result; } public void RemovePainer(DefaultModule defaultModule) { if (painers.ContainsKey(defaultModule)) { painers.Remove(defaultModule); } } public void AddPainer(DefaultModule defaultModule, float val) { if (painers.ContainsKey(defaultModule)) { painers[defaultModule] = val; } else { painers.Add(defaultModule, val); } } public void ProcessPainers() { if (painers.Count == 0) { OverrideDisplayPowerAddOn = -999f; } else { OverrideDisplayPowerAddOn = painers.First().Value; } } private void SetChecker(LocalChecker checker) { currentChecker = checker; } private void NullChecker() { currentChecker = null; } private bool ProcessCheckers(LocalChecker checker) { return currentChecker == checker; } public void DisplayModule(PlayerController p, bool ClearOut = false) { //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Expected O, but got Unknown //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Expected O, but got Unknown //IL_05ca: Expected O, but got Unknown //IL_06bc: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Expected O, but got Unknown //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Expected O, but got Unknown //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Expected O, but got Unknown //IL_06a5: Expected O, but got Unknown //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Expected O, but got Unknown //IL_07c8: Expected O, but got Unknown if (ClearOut) { for (int i = 0; i < garbageLabels.Count; i++) { if ((Object)(object)garbageLabels[i] != (Object)null) { Object.Destroy((Object)(object)((Component)garbageLabels[i]).gameObject); } } garbageLabels.Clear(); if (Object.op_Implicit((Object)(object)extantLabel)) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } if (Object.op_Implicit((Object)(object)PageLabel)) { Object.Destroy((Object)(object)((Component)PageLabel).gameObject); } } List moduleContainers = Core.ModuleContainers; Color32 cl = (p.IsUsingAlternateCostume ? new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100) : new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100)); string text = "Modules Available:"; garbageLabels.Add(Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 1.5f), 0.66f, text, cl, Autotrigger: true, Scale)); localCheckers = new Dictionary(); int c = 0; if (moduleContainers.Count == 0) { ModifiedDefaultLabelManager item = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0.75f - 0.75f * (float)c), 0.66f, "None.", cl, Autotrigger: true, Scale); c++; garbageLabels.Add(item); } else { MouseEventHandler val = default(MouseEventHandler); MouseEventHandler val4 = default(MouseEventHandler); MouseEventHandler val6 = default(MouseEventHandler); foreach (QuickAndMessyPage page in pages_default) { if (ListEntry != page.Page) { continue; } LocalChecker pain = new LocalChecker(); DefaultModule module = page.moduleContainer.defaultModule; pain.module = module; string Temp = ((Core.ReturnTemporaryStack(module.LabelName) > 0) ? (" (" + R_C(SpecialCharactersController.SpecialCharacters.CLOCK) + " " + StaticColorHexes.AddColorToLabelString(Core.ReturnTemporaryStack(module.LabelName).ToString(), StaticColorHexes.Orange_Hex) + ") ") : " "); string PowerLabels = (page.moduleContainer.isPurelyFake ? Temp : ("(" + StaticColorHexes.AddColorToLabelString((module.Stack() + ReturnStackAdd(pain)).ToString(), (pain.isHoveringPowerDown | pain.isHoveringPowerUp) ? StaticColorHexes.Green_Hex : StaticColorHexes.Orange_Hex) + StaticColorHexes.AddColorToLabelString(" / " + module.TrueStack(), StaticColorHexes.Orange_Hex) + ")" + Temp + " (" + R_C(SpecialCharactersController.SpecialCharacters.POWER) + ((pain.isHoveringPowerDown | pain.isHoveringPowerUp) ? StaticColorHexes.AddColorToLabelString(Core.ReturnPowerConsumptionOfNextStack(module, ReturnStackAdd(pain)).ToString(), StaticColorHexes.Green_Hex) : (Core.ReturnPowerConsumption(module) + ")")))); string T = module.LabelName + PowerLabels; string TYellow = StaticColorHexes.AddColorToLabelString(module.LabelName, StaticColorHexes.Yellow_Hex) + PowerLabels; ModifiedDefaultLabelManager Button = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset + 2f, 0.75f - 0.75f * (float)c), 0.66f, T, cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)Button).label).Click += (MouseEventHandler)delegate { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)extantLabel != (Object)null) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } extantLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0f - 0.75f * (float)c), 0.66f, module.LabelDescription, cl, Autotrigger: true, Scale / 2); }; Button.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) if (pain.isHoveringPowerDown | pain.isHoveringPowerUp) { SetChecker(pain); AddPainer(module, Core.ReturnPowerConsumptionOfNextStack(module, ReturnStackAdd(pain))); } else { NullChecker(); RemovePainer(module); } ProcessPainers(); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ModifiedDefaultLabelManager modifiedDefaultLabelManager = Button; modifiedDefaultLabelManager.OnUpdate = (Action)Delegate.Combine(modifiedDefaultLabelManager.OnUpdate, (Action)delegate(dfLabel l) { Temp = ((Core.ReturnTemporaryStack(module.LabelName) > 0) ? (" (" + R_C(SpecialCharactersController.SpecialCharacters.CLOCK) + " " + StaticColorHexes.AddColorToLabelString(Core.ReturnTemporaryStack(module.LabelName).ToString(), StaticColorHexes.Orange_Hex) + ") ") : " "); string text2 = StaticColorHexes.AddColorToLabelString(module.Stack().ToString(), StaticColorHexes.Orange_Hex); string text3 = StaticColorHexes.AddColorToLabelString((module.Stack(usesTemporaryStack: false) + ReturnStackAdd(pain)).ToString(), (pain.isHoveringPowerDown | pain.isHoveringPowerUp) ? ReturnHexStringBasedOnPower(pain) : StaticColorHexes.Orange_Hex); string text4 = Core.ReturnPowerConsumption(module).ToString(); string text5 = StaticColorHexes.AddColorToLabelString(Core.ReturnPowerConsumptionOfNextStack(module, ReturnStackAdd(pain), Local: true).ToString(), ReturnHexStringBasedOnPower(pain)); if (OverrideDisplayPowerAddOn != -999f && ProcessCheckers(pain)) { text2 += SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.ARROW); text2 += text3; text4 += SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.ARROW); text4 += text5; } PowerLabels = (page.moduleContainer.isPurelyFake ? Temp : ("(" + text2 + StaticColorHexes.AddColorToLabelString(" / " + module.TrueStack(), StaticColorHexes.Orange_Hex) + ")" + Temp + "(" + R_C(SpecialCharactersController.SpecialCharacters.POWER) + text4 + ")")); T = module.LabelName + PowerLabels; TYellow = StaticColorHexes.AddColorToLabelString(module.LabelName, StaticColorHexes.Yellow_Hex) + PowerLabels; l.text = (Button.IsMouseHovering() ? TYellow : T); ((dfControl)l).Invalidate(); }); dfLabel label2 = ((DefaultLabelController)Button).label; MouseEventHandler obj = val; if (obj == null) { MouseEventHandler val2 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val2; val = val2; obj = val3; } ((dfControl)label2).MouseEnter += obj; ModifiedDefaultLabelManager modifiedDefaultLabelManager2 = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0.75f - 0.75f * (float)c), 0.66f, R_C(SpecialCharactersController.SpecialCharacters.POWER) + "-", cl, Autotrigger: true, Scale); modifiedDefaultLabelManager2.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0050: 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_006e: 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) bool flag7 = Core.ReturnActiveStack(module.LabelName) > 0; pain.isHoveringPowerDown = boolean && flag7; ((dfControl)label).color = ((!flag7) ? new Color32((byte)200, (byte)200, (byte)200, (byte)200) : (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200))); label.text = R_C(SpecialCharactersController.SpecialCharacters.POWER) + ((flag7 && boolean) ? StaticColorHexes.AddColorToLabelString("-", StaticColorHexes.Yellow_Hex) : "-"); ((dfControl)label).Invalidate(); }; dfLabel label3 = ((DefaultLabelController)modifiedDefaultLabelManager2).label; MouseEventHandler obj2 = val4; if (obj2 == null) { MouseEventHandler val5 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val5; val4 = val5; obj2 = val3; } ((dfControl)label3).MouseEnter += obj2; ((dfControl)((DefaultLabelController)modifiedDefaultLabelManager2).label).Click += (MouseEventHandler)delegate { if (Core.ReturnActiveStack(module.LabelName) > 0 && Core.ReturnPowerConsumption() > 0f && module.CanBeDisabled(Core, Core.ModularGunController)) { AkSoundEngine.PostEvent("Play_ITM_Macho_Brace_Fade_01", ((Component)player).gameObject); Core.DepowerModule(module); } else { AkSoundEngine.PostEvent("Play_OBJ_purchase_unable_01", ((Component)player).gameObject); } }; garbageLabels.Add(modifiedDefaultLabelManager2); ModifiedDefaultLabelManager modifiedDefaultLabelManager3 = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset + 1f, 0.75f - 0.75f * (float)c), 0.66f, R_C(SpecialCharactersController.SpecialCharacters.POWER) + "+", cl, Autotrigger: true, Scale); modifiedDefaultLabelManager3.MouseHover = delegate(dfLabel label, bool boolean) { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) bool flag4 = Core.ReturnPowerConsumption() <= Core.ReturnTotalPower(); bool flag5 = Core.ReturnPowerConsumptionOfNextStack(module) <= Core.ReturnTotalPower(); bool flag6 = Core.ReturnTrueStack(module.LabelName) > Core.ReturnActiveStack(module.LabelName); pain.isHoveringPowerUp = boolean && flag6; ((dfControl)label).color = ((flag4 && flag5 && flag6 && boolean) ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); label.text = R_C(SpecialCharactersController.SpecialCharacters.POWER) + ((flag4 && boolean && flag6 && flag5) ? StaticColorHexes.AddColorToLabelString("+", StaticColorHexes.Yellow_Hex) : "+"); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)modifiedDefaultLabelManager3).label).Click += (MouseEventHandler)delegate { bool flag = Core.ReturnPowerConsumption() <= Core.ReturnTotalPower(); bool flag2 = Core.ReturnPowerConsumptionOfNextStack(module) <= Core.ReturnTotalPower(); bool flag3 = Core.ReturnTrueStack(module.LabelName) > Core.ReturnActiveStack(module.LabelName); if (flag && flag2 && flag3 && module.CanBeEnabled(Core, Core.ModularGunController)) { AkSoundEngine.PostEvent("Play_ModulePowerUp", ((Component)player).gameObject); Core.PowerModule(module); } else { AkSoundEngine.PostEvent("Play_OBJ_purchase_unable_01", ((Component)player).gameObject); } }; dfLabel label4 = ((DefaultLabelController)modifiedDefaultLabelManager3).label; MouseEventHandler obj3 = val6; if (obj3 == null) { MouseEventHandler val7 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val7; val6 = val7; obj3 = val3; } ((dfControl)label4).MouseEnter += obj3; localCheckers.Add(Button, pain); garbageLabels.Add(modifiedDefaultLabelManager3); garbageLabels.Add(Button); int num = c; c = num + 1; } } PageLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0.75f - 0.75f * (float)c), 0.66f, "Page:" + (ListEntry + 1) + " / " + ((pages_default.Count > 0) ? (pages_default.Last().Page + 1).ToString() : "1"), cl, Autotrigger: true, Scale); } public void DisplayModuleTiered(PlayerController p, DefaultModule.ModuleTier moduleTier, bool ClearOut = false) { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Unknown result type (might be due to invalid IL or missing references) //IL_090e: 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) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Expected O, but got Unknown //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Expected O, but got Unknown //IL_060f: Expected O, but got Unknown //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Expected O, but got Unknown //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_0783: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07c5: Expected O, but got Unknown //IL_06dd: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Expected O, but got Unknown //IL_06ea: Expected O, but got Unknown //IL_0800: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Expected O, but got Unknown //IL_080d: Expected O, but got Unknown if (ClearOut) { for (int i = 0; i < garbageLabels.Count; i++) { if ((Object)(object)garbageLabels[i] != (Object)null) { Object.Destroy((Object)(object)((Component)garbageLabels[i]).gameObject); } } garbageLabels.Clear(); if (Object.op_Implicit((Object)(object)extantLabel)) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } if (Object.op_Implicit((Object)(object)PageLabel)) { Object.Destroy((Object)(object)((Component)PageLabel).gameObject); } } selectedTier = moduleTier; List list = ReturnPageListTier(moduleTier); Color32 cl = ((moduleTier == DefaultModule.ModuleTier.Tier_Omega) ? new Color32((byte)200, (byte)10, (byte)10, (byte)100) : (p.IsUsingAlternateCostume ? new Color32((byte)0, byte.MaxValue, (byte)54, (byte)100) : new Color32((byte)121, (byte)234, byte.MaxValue, (byte)100))); cl = (Color32)((moduleTier == DefaultModule.ModuleTier.Unique) ? new Color32((byte)200, (byte)60, (byte)0, (byte)100) : cl); string text = "Modules Available " + DefaultModule.ReturnTierLabel(moduleTier) + " :"; garbageLabels.Add(Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 1.5f), 0.66f, text, cl, Autotrigger: true, Scale)); localCheckers = new Dictionary(); int c = 0; if (list.Count == 0) { ModifiedDefaultLabelManager item = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0.75f - 0.75f * (float)c), 0.66f, "None.", cl, Autotrigger: true, Scale); c++; garbageLabels.Add(item); } else { MouseEventHandler val = default(MouseEventHandler); MouseEventHandler val4 = default(MouseEventHandler); MouseEventHandler val6 = default(MouseEventHandler); foreach (QuickAndMessyPage page in list) { if (ListEntry != page.Page) { continue; } LocalChecker pain = new LocalChecker(); DefaultModule module = page.moduleContainer.defaultModule; pain.module = module; string Temp = ((Core.ReturnTemporaryStack(module.LabelName) > 0) ? (" (" + R_C(SpecialCharactersController.SpecialCharacters.CLOCK) + " " + StaticColorHexes.AddColorToLabelString(Core.ReturnTemporaryStack(module.LabelName).ToString(), StaticColorHexes.Orange_Hex) + ") ") : " "); string PowerLabels = (page.moduleContainer.isPurelyFake ? Temp : ("(" + StaticColorHexes.AddColorToLabelString((module.Stack() + ReturnStackAdd(pain)).ToString(), (pain.isHoveringPowerDown | pain.isHoveringPowerUp) ? StaticColorHexes.Green_Hex : StaticColorHexes.Orange_Hex) + StaticColorHexes.AddColorToLabelString(" / " + module.TrueStack(), StaticColorHexes.Orange_Hex) + ")" + Temp + " (" + R_C(SpecialCharactersController.SpecialCharacters.POWER) + ((pain.isHoveringPowerDown | pain.isHoveringPowerUp) ? StaticColorHexes.AddColorToLabelString(Core.ReturnPowerConsumptionOfNextStack(module, ReturnStackAdd(pain)).ToString(), StaticColorHexes.Green_Hex) : (Core.ReturnPowerConsumption(module) + ")")))); string T = module.LabelName + PowerLabels; string TYellow = StaticColorHexes.AddColorToLabelString(module.LabelName, StaticColorHexes.Yellow_Hex) + PowerLabels; ModifiedDefaultLabelManager Button = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset + 2f, 0.75f - 0.75f * (float)c), 0.66f, T, cl, Autotrigger: true, Scale); ((dfControl)((DefaultLabelController)Button).label).Click += (MouseEventHandler)delegate { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)extantLabel != (Object)null) { Object.Destroy((Object)(object)((Component)extantLabel).gameObject); } extantLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0f - 0.75f * (float)c), 0.66f, module.LabelDescription, cl, Autotrigger: true, Scale / 2); }; Button.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) if (pain.isHoveringPowerDown | pain.isHoveringPowerUp) { SetChecker(pain); AddPainer(module, Core.ReturnPowerConsumptionOfNextStack(module, ReturnStackAdd(pain))); } else { NullChecker(); RemovePainer(module); } ProcessPainers(); ((dfControl)label).color = (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); ((dfControl)label).Invalidate(); }; ModifiedDefaultLabelManager modifiedDefaultLabelManager = Button; modifiedDefaultLabelManager.OnUpdate = (Action)Delegate.Combine(modifiedDefaultLabelManager.OnUpdate, (Action)delegate(dfLabel l) { Temp = ((Core.ReturnTemporaryStack(module.LabelName) > 0) ? (" (" + R_C(SpecialCharactersController.SpecialCharacters.CLOCK) + " " + StaticColorHexes.AddColorToLabelString(Core.ReturnTemporaryStack(module.LabelName).ToString(), StaticColorHexes.Orange_Hex) + ") ") : " "); string text2 = StaticColorHexes.AddColorToLabelString(module.Stack().ToString(), StaticColorHexes.Orange_Hex); string text3 = StaticColorHexes.AddColorToLabelString((module.Stack(usesTemporaryStack: false) + ReturnStackAdd(pain)).ToString(), (pain.isHoveringPowerDown | pain.isHoveringPowerUp) ? ReturnHexStringBasedOnPower(pain) : StaticColorHexes.Orange_Hex); string text4 = Core.ReturnPowerConsumption(module).ToString(); string text5 = StaticColorHexes.AddColorToLabelString(Core.ReturnPowerConsumptionOfNextStack(module, ReturnStackAdd(pain), Local: true).ToString(), ReturnHexStringBasedOnPower(pain)); if (OverrideDisplayPowerAddOn != -999f && ProcessCheckers(pain)) { text2 += SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.ARROW); text2 += text3; text4 += SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.ARROW); text4 += text5; } PowerLabels = (page.moduleContainer.isPurelyFake ? Temp : ("(" + text2 + StaticColorHexes.AddColorToLabelString(" / " + module.TrueStack(), StaticColorHexes.Orange_Hex) + ")" + Temp + "(" + R_C(SpecialCharactersController.SpecialCharacters.POWER) + text4 + ")")); T = module.LabelName + PowerLabels; TYellow = StaticColorHexes.AddColorToLabelString(module.LabelName, StaticColorHexes.Yellow_Hex) + PowerLabels; l.text = (Button.IsMouseHovering() ? TYellow : T); ((dfControl)l).Invalidate(); }); dfLabel label2 = ((DefaultLabelController)Button).label; MouseEventHandler obj = val; if (obj == null) { MouseEventHandler val2 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val2; val = val2; obj = val3; } ((dfControl)label2).MouseEnter += obj; ModifiedDefaultLabelManager modifiedDefaultLabelManager2 = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0.75f - 0.75f * (float)c), 0.66f, R_C(SpecialCharactersController.SpecialCharacters.POWER) + "-", cl, Autotrigger: true, Scale); modifiedDefaultLabelManager2.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0050: 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_006e: 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) bool flag7 = Core.ReturnActiveStack(module.LabelName) > 0; pain.isHoveringPowerDown = boolean && flag7; ((dfControl)label).color = ((!flag7) ? new Color32((byte)200, (byte)200, (byte)200, (byte)200) : (boolean ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200))); label.text = R_C(SpecialCharactersController.SpecialCharacters.POWER) + ((flag7 && boolean) ? StaticColorHexes.AddColorToLabelString("-", StaticColorHexes.Yellow_Hex) : "-"); ((dfControl)label).Invalidate(); }; dfLabel label3 = ((DefaultLabelController)modifiedDefaultLabelManager2).label; MouseEventHandler obj2 = val4; if (obj2 == null) { MouseEventHandler val5 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val5; val4 = val5; obj2 = val3; } ((dfControl)label3).MouseEnter += obj2; ((dfControl)((DefaultLabelController)modifiedDefaultLabelManager2).label).Click += (MouseEventHandler)delegate { if (Core.ReturnActiveStack(module.LabelName) > 0 && Core.ReturnPowerConsumption() > 0f && module.CanBeDisabled(Core, Core.ModularGunController)) { AkSoundEngine.PostEvent("Play_ITM_Macho_Brace_Fade_01", ((Component)player).gameObject); Core.DepowerModule(module); } else { AkSoundEngine.PostEvent("Play_OBJ_purchase_unable_01", ((Component)player).gameObject); } }; garbageLabels.Add(modifiedDefaultLabelManager2); ModifiedDefaultLabelManager modifiedDefaultLabelManager3 = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset + 1f, 0.75f - 0.75f * (float)c), 0.66f, R_C(SpecialCharactersController.SpecialCharacters.POWER) + "+", cl, Autotrigger: true, Scale); modifiedDefaultLabelManager3.MouseHover = delegate(dfLabel label, bool boolean) { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) pain.isHoveringPowerUp = boolean; bool flag4 = Core.ReturnPowerConsumption() <= Core.ReturnTotalPower(); bool flag5 = Core.ReturnPowerConsumptionOfNextStack(module) <= Core.ReturnTotalPower(); bool flag6 = Core.ReturnTrueStack(module.LabelName) > Core.ReturnActiveStack(module.LabelName); pain.isHoveringPowerUp = boolean && flag6; ((dfControl)label).color = ((flag4 && flag5 && flag6 && boolean) ? new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) : new Color32((byte)200, (byte)200, (byte)200, (byte)200)); label.text = R_C(SpecialCharactersController.SpecialCharacters.POWER) + ((flag4 && boolean && flag6 && flag5) ? StaticColorHexes.AddColorToLabelString("+", StaticColorHexes.Yellow_Hex) : "+"); ((dfControl)label).Invalidate(); }; ((dfControl)((DefaultLabelController)modifiedDefaultLabelManager3).label).Click += (MouseEventHandler)delegate { bool flag = Core.ReturnPowerConsumption() <= Core.ReturnTotalPower(); bool flag2 = Core.ReturnPowerConsumptionOfNextStack(module) <= Core.ReturnTotalPower(); bool flag3 = Core.ReturnTrueStack(module.LabelName) > Core.ReturnActiveStack(module.LabelName); if (flag && flag2 && flag3 && module.CanBeEnabled(Core, Core.ModularGunController)) { AkSoundEngine.PostEvent("Play_ModulePowerUp", ((Component)player).gameObject); Core.PowerModule(module); } else { AkSoundEngine.PostEvent("Play_OBJ_purchase_unable_01", ((Component)player).gameObject); } }; dfLabel label4 = ((DefaultLabelController)modifiedDefaultLabelManager3).label; MouseEventHandler obj3 = val6; if (obj3 == null) { MouseEventHandler val7 = delegate { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)player).gameObject); }; MouseEventHandler val3 = val7; val6 = val7; obj3 = val3; } ((dfControl)label4).MouseEnter += obj3; localCheckers.Add(Button, pain); garbageLabels.Add(modifiedDefaultLabelManager3); garbageLabels.Add(Button); int num = c; c = num + 1; } } PageLabel = Toolbox.GenerateText(((BraveBehaviour)p).transform, new Vector2(MainOffset, 0.75f - 0.75f * (float)c), 0.66f, "Page:" + (ListEntry + 1) + " / " + ((list.Count > 0) ? (list.Last().Page + 1).ToString() : "1"), cl, Autotrigger: true, Scale); } public void UpdatePageLabel() { if (Object.op_Implicit((Object)(object)PageLabel)) { ((DefaultLabelController)PageLabel).label.text = "Page:" + (ListEntry + 1) + " / " + ((pages_default.Count > 0) ? (pages_default.Last().Page + 1).ToString() : "1"); ((dfControl)((DefaultLabelController)PageLabel).label).Invalidate(); } } public void ObliterateUI() { if (Object.op_Implicit((Object)(object)extantLabel)) { extantLabel.Inv(); } if (Object.op_Implicit((Object)(object)DownLabel)) { DownLabel.Inv(); } if (Object.op_Implicit((Object)(object)UpLabel)) { UpLabel.Inv(); } if (Object.op_Implicit((Object)(object)PageLabel)) { PageLabel.Inv(); } if (Object.op_Implicit((Object)(object)CloseLabel)) { CloseLabel.Inv(); } if (Object.op_Implicit((Object)(object)T1bLabel)) { T1bLabel.Inv(); } if (Object.op_Implicit((Object)(object)T2bLabel)) { T2bLabel.Inv(); } if (Object.op_Implicit((Object)(object)T3bLabel)) { T3bLabel.Inv(); } if (Object.op_Implicit((Object)(object)T4bLabel)) { T4bLabel.Inv(); } if (Object.op_Implicit((Object)(object)TUniquebLabel)) { TUniquebLabel.Inv(); } if (Object.op_Implicit((Object)(object)AnyLabel)) { AnyLabel.Inv(); } if (Object.op_Implicit((Object)(object)InfoLabel)) { InfoLabel.Inv(); } if (Object.op_Implicit((Object)(object)PowerLabel)) { PowerLabel.Inv(); } for (int i = 0; i < garbageLabels.Count; i++) { if ((Object)(object)garbageLabels[i] != (Object)null) { garbageLabels[i].Inv(); } } garbageLabels.Clear(); } public int AddNewPages(ModulePrinterCore.ModuleContainer Container) { int num = ((pages_default.Count > 0) ? pages_default.Last().Page : 0); int num2 = ((pages_default.Count > 0) ? pages_default.Last().Entry : (-1)); if (num2 > 3) { num++; num2 = -1; } QuickAndMessyPage quickAndMessyPage = new QuickAndMessyPage(); quickAndMessyPage.Page = num; quickAndMessyPage.Entry = num2 + 1; quickAndMessyPage.moduleContainer = Container; pages_default.Add(quickAndMessyPage); return num2 + 1; } public int AddNewPagesTiered(ModulePrinterCore.ModuleContainer Container) { List list = ReturnPageListTier(Container.tier); int num = ((list.Count > 0) ? list.Last().Page : 0); int num2 = ((list.Count > 0) ? list.Last().Entry : (-1)); if (num2 > 3) { num++; num2 = -1; } QuickAndMessyPage quickAndMessyPage = new QuickAndMessyPage(); quickAndMessyPage.Page = num; quickAndMessyPage.Entry = num2 + 1; quickAndMessyPage.moduleContainer = Container; list.Add(quickAndMessyPage); return num2 + 1; } public List ReturnPageListTier(DefaultModule.ModuleTier moduleTier) { return moduleTier switch { DefaultModule.ModuleTier.Tier_1 => pages_T1, DefaultModule.ModuleTier.Tier_2 => pages_T2, DefaultModule.ModuleTier.Tier_3 => pages_T3, DefaultModule.ModuleTier.Tier_Omega => pages_T4, DefaultModule.ModuleTier.Unique => pages_Unique, _ => pages_T1, }; } private string GetInfoPage() { InfoPage++; if (InfoPage == Advice.Count()) { InfoPage = 0; AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.CHECKED_ALL_ADVICE, value: true); } return (Random.value < 0.15f && AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.CHECKED_ALL_ADVICE)) ? BraveUtility.RandomElement(SpecialAdvice) : Advice[InfoPage]; } } public static class ScrapUIController { public static GameObject ScrapUI; private static Transform transformInstance; public static void Init() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0292: 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_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Expected O, but got Unknown //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) dfAtlas defaultAtlas = SaveTools.LoadAssetFromAnywhere("UI Root").GetComponent().Manager.DefaultAtlas; dfFontBase defaultFont = SaveTools.LoadAssetFromAnywhere("UI Root").GetComponent().Manager.DefaultFont; AssetBundle modularAssetBundle = Module.ModularAssetBundle; NpcTools.AddNewItemToAtlas(defaultAtlas, modularAssetBundle.LoadAsset("gear"), "gear_"); GameObject val = PrefabBuilder.BuildObject("Scrap_UI_Panel"); val.layer = 24; dfPanel val2 = val.AddComponent(); ((Object)val).name = "Scrap_UI_Panel"; ((dfControl)val2).anchorStyle = (dfAnchorStyle)5; ((dfControl)val2).isEnabled = true; ((dfControl)val2).isVisible = true; ((dfControl)val2).isInteractive = true; ((dfControl)val2).tooltip = ""; ((dfControl)val2).pivot = (dfPivotPoint)0; ((dfControl)val2).zindex = -1; ((dfControl)val2).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val2).disabledColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val2).size = new Vector2(36f, 36f); ((dfControl)val2).minSize = Vector2.zero; ((dfControl)val2).maxSize = new Vector2(36f, 36f); ((dfControl)val2).clipChildren = false; ((dfControl)val2).inverseClipChildren = false; ((dfControl)val2).tabIndex = -1; ((dfControl)val2).canFocus = false; ((dfControl)val2).autoFocus = false; ((dfControl)val2).layout = new AnchorLayout((dfAnchorStyle)5) { margins = new dfAnchorMargins { bottom = 0f, left = 0f, right = 0f, top = 0f }, owner = (dfControl)(object)val2 }; ((dfControl)val2).renderOrder = 30; ((dfControl)val2).isLocalized = false; ((dfControl)val2).hotZoneScale = Vector2.one; ((dfControl)val2).allowSignalEvents = true; ((dfControl)val2).PrecludeUpdateCycle = false; val2.backgroundSprite = null; val2.backgroundColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); val2.padding = new RectOffset(0, 0, 0, 0); Transform transform = ((Component)val2).transform; transform.localPosition += new Vector3(0f, -0.0125f); ScrapUI = ((Component)val2).gameObject; dfLabel val3 = PrefabBuilder.BuildObject("UI_Label_Scrap_").AddComponent(); val3.AssignDefaultPresets(defaultAtlas, defaultFont); ((dfControl)val3).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); val3.text = "11a"; ((dfControl)val3).anchorStyle = (dfAnchorStyle)5; ((dfControl)val3).layout = new AnchorLayout((dfAnchorStyle)5) { margins = new dfAnchorMargins { bottom = 0f, left = 0f, right = 0f, top = 0f }, owner = (dfControl)(object)val3 }; ((Component)val3).transform.parent = val.transform; new Hook((MethodBase)typeof(GameUIRoot).GetMethod("UpdatePlayerConsumables", BindingFlags.Instance | BindingFlags.Public), typeof(ScrapUIController).GetMethod("UpdatePlayerConsumablesHook", BindingFlags.Static | BindingFlags.Public)); new Hook((MethodBase)typeof(GameUIRoot).GetMethod("HideCoreUI", BindingFlags.Instance | BindingFlags.Public), typeof(ScrapUIController).GetMethod("HideCoreUIHook", BindingFlags.Static | BindingFlags.Public)); new Hook((MethodBase)typeof(GameUIRoot).GetMethod("UpdateScale", BindingFlags.Instance | BindingFlags.Public), typeof(ScrapUIController).GetMethod("UpdateScaleHook", BindingFlags.Static | BindingFlags.Public)); GlobalConsumableStorage.AddNewConsumable("Scrap"); CustomActions.OnRunStart = (Action)Delegate.Combine(CustomActions.OnRunStart, new Action(ONPCS)); } public static void ONPCS(PlayerController player1, PlayerController player2, GameMode mode) { GlobalConsumableStorage.SetConsumableAmount("Scrap"); } public static void UpdateScaleHook(Action orig, GameUIRoot self) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) orig(self); dfPanel val = FindScrapUI(self); int num = (GameManager.Options.SmallUIEnabled ? 1 : 2); ((Component)val).transform.position = ((Component)self.p_playerCoinLabel).transform.position + new Vector3((0.025f + 0.025f * (float)self.p_playerCoinLabel.Text.Length * (float)num) * Toolbox.CalculateScale_X_Y_Based_On_Resolution().x, -0.0025f); Tuple val2 = ScrapCounterVisible(); dfLabel componentInChildren = ((Component)val).gameObject.GetComponentInChildren(); componentInChildren.text = "[sprite \"gear_\"] " + val2.Second; ((dfControl)componentInChildren).Invalidate(); ((dfControl)componentInChildren).isVisible = val2.First; ((Component)componentInChildren).gameObject.transform.position = ((Component)val).gameObject.transform.position; ((Component)componentInChildren).gameObject.transform.localScale = ((Component)self.p_playerCoinLabel).transform.localScale; ((Component)((Component)val).gameObject.GetComponentInChildren()).gameObject.transform.position = ((Component)val).gameObject.transform.position + new Vector3(1f / 160f * (float)num, 0f); } public static void UpdatePlayerConsumablesHook(Action orig, GameUIRoot self, PlayerConsumables playerConsumables) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) orig(self, playerConsumables); dfPanel val = FindScrapUI(self); int num = (GameManager.Options.SmallUIEnabled ? 1 : 2); ((Component)val).transform.position = ((Component)self.p_playerCoinLabel).transform.position + new Vector3((0.025f + 0.025f * (float)self.p_playerCoinLabel.Text.Length * (float)num) * Toolbox.CalculateScale_X_Y_Based_On_Resolution().x, -0.0025f); ((Component)((Component)val).gameObject.GetComponentInChildren()).gameObject.transform.position = ((Component)val).gameObject.transform.position + new Vector3(1f / 160f * (float)num, 0f); } public static dfPanel FindScrapUI(GameUIRoot self) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) Transform transform = transformInstance; if ((Object)(object)transform == (Object)null) { transform = ((Component)self.Manager.AddPrefab(ScrapUI.gameObject)).transform; ((Object)transform).name = "DO_NOT_FUCKING_CLONE"; dfControl component = ((Component)transform).gameObject.GetComponent(); component.RelativePosition = ((Component)self.p_playerCoinLabel).transform.position + new Vector3(0.025f + 0.025f * (float)self.p_playerCoinLabel.Text.Length, -0.0025f); self.AddControlToMotionGroups(component, (Direction)6, false); transformInstance = transform; } return ((Component)transform).gameObject.GetComponent(); } public static void HideCoreUIHook(Action orig, GameUIRoot self, string reason) { orig(self, reason); dfPanel val = FindScrapUI(self); ((dfControl)val).isVisible = ScrapCounterVisible().First; } public static Tuple ScrapCounterVisible() { int num = 0; bool flag = false; PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { num = GlobalConsumableStorage.ReturnConsumableAmount("Scrap"); for (int j = 0; j < val.passiveItems.Count; j++) { if (val.passiveItems[j] is ModulePrinterCore) { flag = true; } } } if (GameManager.Instance.IsFoyer) { flag = false; } if (GameManager.Instance.IsPaused) { flag = false; } return new Tuple(flag, num); } } public class SpecialCharactersController { public enum SpecialCharacters { DAMAGE, ACCURACY, RANGE, BULLET_SIZE, CLIP_CAPACITY, FIRE_RATE, RELOAD, ENCASED_ROUND, HEART, GRAVE, HOLY_CHAMBER, RADAR, WIFI, SHOTSPEED, FIRE, BOMB, ELECTRICITY, SNAIL, RICOCHET, SNOWFLAKE, PIERCE, TWO_BULLETS, DEATH, LIGHT_BULB, SCATTERSHOT, MAGNET, CLAM, RAGE, WEAK, ARROW, UP, DOWN, LEFT, RIGHT, CLOSE, GOOGLY, POWER, CLOCK, INFO, T1, T2, T3, T4, T_UNIQUE } public class SpecialCharacterContainer { public enum Color { NONE, GREEN, YELLOW, RED, BLUE } public SpecialCharacters defaultCharacter; public string DefaultVariant; public string RedVariant; public string YellowVariant; public string GreenVariant; public string BlueVariant; public string BrightVariant; public string GetColor(Color c, bool IsBright) { if (IsBright) { return (BrightVariant != null) ? ("[sprite " + BrightVariant + "]") : ("[sprite " + DefaultVariant + "]"); } return c switch { Color.NONE => "[sprite " + DefaultVariant + "]", Color.RED => (RedVariant != null) ? ("[sprite " + RedVariant + "]") : ("[sprite " + DefaultVariant + "]"), Color.YELLOW => (YellowVariant != null) ? ("[sprite " + YellowVariant + "]") : ("[sprite " + DefaultVariant + "]"), Color.GREEN => (GreenVariant != null) ? ("[sprite " + GreenVariant + "]") : ("[sprite " + DefaultVariant + "]"), Color.BLUE => (BlueVariant != null) ? ("[sprite " + BlueVariant + "]") : ("[sprite " + DefaultVariant + "]"), _ => "[sprite " + DefaultVariant + "]", }; } } public static List SpecialCharacterList = new List(); public static void Init() { InitSpecialCharacterContainer(SpecialCharacters.DAMAGE, "lync_icon_001"); InitSpecialCharacterContainer(SpecialCharacters.ACCURACY, "lync_icon_002"); InitSpecialCharacterContainer(SpecialCharacters.RANGE, "lync_icon_003"); InitSpecialCharacterContainer(SpecialCharacters.BULLET_SIZE, "lync_icon_004"); InitSpecialCharacterContainer(SpecialCharacters.CLIP_CAPACITY, "lync_icon_005"); InitSpecialCharacterContainer(SpecialCharacters.FIRE_RATE, "lync_icon_006"); InitSpecialCharacterContainer(SpecialCharacters.RELOAD, "lync_icon_007"); InitSpecialCharacterContainer(SpecialCharacters.SHOTSPEED, "lync_icon_014"); InitSpecialCharacterContainer(SpecialCharacters.HEART, "lync_icon_009"); InitSpecialCharacterContainer(SpecialCharacters.ARROW, "lync_icon_030"); InitSpecialCharacterContainer(SpecialCharacters.UP, "ButtonUp", "ButtonUpBright"); InitSpecialCharacterContainer(SpecialCharacters.DOWN, "ButtonDown", "ButtonDownBright"); InitSpecialCharacterContainer(SpecialCharacters.LEFT, "ButtonLeft", "ButtonLeftBright"); InitSpecialCharacterContainer(SpecialCharacters.RIGHT, "ButtonRight", "ButtonRightBright"); InitSpecialCharacterContainer(SpecialCharacters.CLOSE, "Cancel", "CanceBrightl"); InitSpecialCharacterContainer(SpecialCharacters.POWER, "Power"); InitSpecialCharacterContainer(SpecialCharacters.GOOGLY, "GooglyMoogly", "GooglyMooglyBright"); InitSpecialCharacterContainer(SpecialCharacters.CLOCK, "Clock"); InitSpecialCharacterContainer(SpecialCharacters.T1, "tier_label_1_d", "tier_label_1"); InitSpecialCharacterContainer(SpecialCharacters.T2, "tier_label_2_d", "tier_label_2"); InitSpecialCharacterContainer(SpecialCharacters.T3, "tier_label_3_d", "tier_label_3"); InitSpecialCharacterContainer(SpecialCharacters.T4, "tier_label_4_d", "tier_label_4"); InitSpecialCharacterContainer(SpecialCharacters.T_UNIQUE, "tier_label_unique_d", "tier_label_unique"); InitSpecialCharacterContainer(SpecialCharacters.INFO, "Info", "Info_Hover"); } public static void InitSpecialCharacterContainer(SpecialCharacters Character, string defaultCharacter, string brightVariant = null) { SpecialCharacterContainer specialCharacterContainer = new SpecialCharacterContainer(); specialCharacterContainer.defaultCharacter = Character; specialCharacterContainer.DefaultVariant = defaultCharacter; if (brightVariant != null) { specialCharacterContainer.BrightVariant = brightVariant; } SpecialCharacterList.Add(specialCharacterContainer); } public static string ReturnSpecialCharacter(SpecialCharacters specialCharacter, bool IsBright = false) { IEnumerable source = SpecialCharacterList.Where((SpecialCharacterContainer self) => self.defaultCharacter == specialCharacter); if (source.Count() > 0) { return source.First().GetColor(SpecialCharacterContainer.Color.NONE, IsBright); } Debug.Log((object)("Failed To Get Character: |" + specialCharacter)); return null; } } public static class ConfigManager { public static ConfigEntry DoVFX; public static ConfigEntry ImportantVFXIntensity; public static ConfigEntry DistortionWaveIntensity; public static ConfigEntry AfterimageLifetimeMultiplier; public static bool DoVisualEffect => DoVFX.Value; public static float ImportantVFXMultiplier => ImportantVFXIntensity.Value; public static float DistortionWaveMultiplier => DistortionWaveIntensity.Value; public static float AfterimageLifetime => AfterimageLifetimeMultiplier.Value; public static void CreateConfig(ConfigFile config) { DoVFX = config.Bind("Modular Remastered:", "Visual Effects", true, "(Default of true) Plays certain visual effects. Setting it to false disables more intrusive effects."); ImportantVFXIntensity = config.Bind("Modular Remastered:", "Important VFX Intensity", 1f, "(Default of 1) The intensity of certain visual effects. The lower the value, the less the intensity."); DistortionWaveIntensity = config.Bind("Modular Remastered:", "Distortion Wave Intensity", 1f, "(Default of 1) The intensity of distortion waves used by the mod. The lower the value, the less the intensity of the distortion waves."); AfterimageLifetimeMultiplier = config.Bind("Modular Remastered:", "Afterimage Lifetime Multiplier", 1f, "(Default of 1) The lifetime of afterimages used my the mod. 1 will make them last as long as usual, 0.1 will make them only last 10% of their intended lifetime."); } } public class PDashTwo { public class P_2ParticleController : MonoBehaviour { private List allRooms; private ParticleSystem particleObject; public static bool RecievedDamage = true; private IEnumerator Start() { RecievedDamage = false; while (Dungeon.IsGenerating) { yield return null; } allRooms = GameManager.Instance.Dungeon.data.rooms; particleObject = Object.Instantiate(((Component)SmokeParticleSystem).gameObject).GetComponent(); ((Component)particleObject).transform.parent = ((Component)GameManager.Instance.Dungeon).transform; PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { player.WarpToPoint(TransformExtensions.PositionVector2(((BraveBehaviour)player).transform) - new Vector2(2f, 10f), false, false); player.OnReceivedDamage += Player_OnReceivedDamage; } } private void Player_OnReceivedDamage(PlayerController obj) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { val.OnReceivedDamage -= Player_OnReceivedDamage; } RecievedDamage = true; } public void Update() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a5: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)particleObject)) { return; } foreach (RoomHandler allRoom in allRooms) { if (Random.value < 0.025f) { IntVector2 randomAvailableCellDumb = allRoom.GetRandomAvailableCellDumb(); ParticleSystem val = particleObject; EmitParams val2 = default(EmitParams); ((EmitParams)(ref val2)).position = ((IntVector2)(ref randomAvailableCellDumb)).ToCenterVector3(1f); ((EmitParams)(ref val2)).randomSeed = (uint)Random.Range(1, 1000); EmitParams val3 = val2; EmissionModule emission = val.emission; ((EmissionModule)(ref emission)).enabled = false; ((Component)val).gameObject.SetActive(true); val.Emit(val3, 1); } } } } public static ParticleSystem SmokeParticleSystem; public static GameLevelDefinition PastDefinition; public static GameObject GameManagerObject; public static tk2dSpriteCollectionData Tileset; public static Hook getOrLoadByName_Hook; public static void Init() { //IL_009b: 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) DungeonMaterialSetupChain.InitCustomDungeonMaterial(); DungeonStampDataSetupChain.InitCustomDungeonStampData(); TilesetSetupTwo.InitCustomTileset(); FloorRoomInitialisationChain.InitCustomRooms(); SuperFlow.GenerateFlows(); if (Module.Debug_Mode) { ETGModConsole.Commands.GetGroup("pstmdl").AddUnit("2", (Action)LoadFloor); } SmokeParticleSystem = Module.ModularAssetBundle.LoadAsset("Spooky Smoke").GetComponent(); InitCustomDungeon(); new Hook((MethodBase)typeof(Dungeon).GetMethod("FloorReached", BindingFlags.Instance | BindingFlags.Public), typeof(PDashTwo).GetMethod("FloorReachedHook", BindingFlags.Static | BindingFlags.Public)); new Hook((MethodBase)typeof(DungeonFloorMusicController).GetMethod("ResetForNewFloor", BindingFlags.Instance | BindingFlags.Public), typeof(PDashTwo).GetMethod("ResetForNewFloorHook", BindingFlags.Static | BindingFlags.Public)); } public static void ResetForNewFloorHook(Action orig, DungeonFloorMusicController self, Dungeon d) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Invalid comparison between Unknown and I4 //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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 self.m_overrideMusic = false; self.m_isVictoryState = false; self.m_lastMusicChangeTime = -1000f; GameManager.Instance.FlushMusicAudio(); if (!string.IsNullOrEmpty(d.musicEventName)) { self.m_cachedMusicEventCore = d.musicEventName; } else { self.m_cachedMusicEventCore = "Play_MUS_Dungeon_Theme_01"; } self.m_coreMusicEventID = AkSoundEngine.PostEvent(self.m_cachedMusicEventCore, ((Component)GameManager.Instance).gameObject, 33u, new EventCallback(self.OnAkMusicEvent), (object)null); Debug.LogWarning((object)("Posting core music event: " + self.m_cachedMusicEventCore + " with playing ID: " + self.m_coreMusicEventID)); if ((int)GameManager.Instance.CurrentLevelOverrideState == 5 && (int)GameManager.Instance.PrimaryPlayer.characterIdentity != 8 && (Object)(object)((Component)d).GetComponent() == (Object)null) { self.m_overrideMusic = true; AkSoundEngine.PostEvent("Play_MUS_Ending_State_01", ((Component)GameManager.Instance).gameObject); } else { self.SwitchToState((DungeonMusicState)0); } if ((int)GameManager.Instance.CurrentLevelOverrideState == 1 && GameStatsManager.Instance.AnyPastBeaten()) { AkSoundEngine.PostEvent("Play_MUS_State_Winner", ((Component)GameManager.Instance).gameObject); } } public static void FloorReachedHook(Action orig, Dungeon self) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 if ((int)self.tileIndices.tilesetId == 16384) { GameManager.Instance.RewardManager.FacelessChancePerFloor = 0f; } orig(self); } private static void LoadFloor(string[] obj) { if (!GameManager.Instance.customFloors.Contains(PastDefinition)) { GameManager.Instance.customFloors.Add(PastDefinition); } GameManager.Instance.LoadCustomLevel(PastDefinition.dungeonSceneName); } public static void InitCustomDungeon() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_008e: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown getOrLoadByName_Hook = new Hook((MethodBase)typeof(DungeonDatabase).GetMethod("GetOrLoadByName", BindingFlags.Static | BindingFlags.Public), typeof(PDashTwo).GetMethod("GetOrLoadByNameHook", BindingFlags.Static | BindingFlags.Public)); AssetBundle val = ResourceManager.LoadAssetBundle("brave_resources_001"); GameManagerObject = val.LoadAsset("_GameManager"); PastDefinition = new GameLevelDefinition { dungeonSceneName = "tt_modular_ultrahard", dungeonPrefabPath = "cringe_modular_past", priceMultiplier = 0f, secretDoorHealthMultiplier = 1f, enemyHealthMultiplier = 1f, damageCap = 300f, bossDpsCap = 78f, flowEntries = new List(0), predefinedSeeds = new List(0) }; foreach (GameLevelDefinition customFloor in GameManager.Instance.customFloors) { if (customFloor.dungeonSceneName == "tt_modular_ultrahard") { PastDefinition = customFloor; } } GameManager.Instance.customFloors.Add(PastDefinition); GameManagerObject.GetComponent().customFloors.Add(PastDefinition); } public static Dungeon GetOrLoadByNameHook(Func orig, string name) { if (!GameManager.Instance.customFloors.Contains(PastDefinition)) { GameManager.Instance.customFloors.Add(PastDefinition); } if (name.ToLower() == "cringe_modular_past") { DebugTime.RecordStartTime(); DebugTime.Log("AssetBundle.LoadAsset({0})", new object[1] { name }); return AbyssGeon(GetOrLoadByName_Orig("Base_ResourcefulRat")); } return orig(name); } public static Dungeon AbyssGeon(Dungeon dungeon) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0154: 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_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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019d: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Expected O, but got Unknown //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Expected O, but got Unknown //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Expected O, but got Unknown //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Expected O, but got Unknown Dungeon orLoadByName_Orig = GetOrLoadByName_Orig("Base_Mines"); Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); Dungeon orLoadByName_Orig2 = GetOrLoadByName_Orig("Base_Nakatomi"); ((Object)((Component)dungeon).gameObject).name = "Base_Modular_Past_2"; dungeon.contentSource = (ContentSource)4; dungeon.DungeonSeed = 0; dungeon.DungeonFloorName = "Hegemony Mechanics Shipyard."; dungeon.DungeonShortName = "Modulars Past Continued."; dungeon.DungeonFloorLevelTextOverride = "Pad-2"; dungeon.LevelOverrideType = (LevelOverrideState)0; dungeon.debugSettings = new DebugDungeonSettings { RAPID_DEBUG_DUNGEON_ITERATION_SEEKER = false, RAPID_DEBUG_DUNGEON_ITERATION = false, RAPID_DEBUG_DUNGEON_COUNT = 5, GENERATION_VIEWER_MODE = false, FULL_MINIMAP_VISIBILITY = false, COOP_TEST = false, DISABLE_ENEMIES = false, DISABLE_LOOPS = false, DISABLE_SECRET_ROOM_COVERS = true, DISABLE_OUTLINES = false, WALLS_ARE_PITS = false }; dungeon.ForceRegenerationOfCharacters = false; dungeon.ActuallyGenerateTilemap = true; WeightedInt val = new WeightedInt(); val.value = 1; val.weight = 1f; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; val.annotation = "why"; WeightedIntCollection val2 = new WeightedIntCollection(); val2.elements = (WeightedInt[])(object)new WeightedInt[1] { val }; dungeon.lockedDoorObjects = orLoadByName.lockedDoorObjects; dungeon.phantomBlockerDoorObjects = orLoadByName.lockedDoorObjects; dungeon.decoSettings.standardRoomVisualSubtypes = val2; TilemapDecoSettings decoSettings = dungeon.decoSettings; decoSettings.ambientLightColor = new Color(0.1f, 0.05f, 0.05f); decoSettings.ambientLightColorTwo = new Color(0.1f, 0.05f, 0.05f); decoSettings.generateLights = false; dungeon.tileIndices = new TileIndices { tilesetId = (ValidTilesets)16384, dungeonCollection = TilesetSetupTwo.ExperimentalTilesetCollection, dungeonCollectionSupportsDiagonalWalls = false, aoTileIndices = new AOTileIndices(), placeBorders = true, placePits = true, chestHighWallIndices = new List { new TileIndexVariant { index = 41, likelihood = 0.5f, overrideLayerIndex = 0, overrideIndex = 0 } }, decalIndexGrid = null, edgeDecorationTiles = null }; dungeon.roomMaterialDefinitions = (DungeonMaterial[])(object)new DungeonMaterial[2] { DungeonMaterialSetupChain.floorMaterial, DungeonMaterialSetupChain.floorMaterial }; dungeon.dungeonWingDefinitions = (DungeonWingDefinition[])(object)new DungeonWingDefinition[0]; dungeon.pathGridDefinitions = new List { orLoadByName_Orig.pathGridDefinitions[0] }; dungeon.dungeonDustups = new DustUpVFX { runDustup = orLoadByName_Orig.dungeonDustups.runDustup, waterDustup = orLoadByName_Orig.dungeonDustups.waterDustup, additionalWaterDustup = orLoadByName_Orig.dungeonDustups.additionalWaterDustup, rollNorthDustup = orLoadByName_Orig.dungeonDustups.rollNorthDustup, rollNorthEastDustup = orLoadByName_Orig.dungeonDustups.rollNorthEastDustup, rollEastDustup = orLoadByName_Orig.dungeonDustups.rollEastDustup, rollSouthEastDustup = orLoadByName_Orig.dungeonDustups.rollSouthEastDustup, rollSouthDustup = orLoadByName_Orig.dungeonDustups.rollSouthDustup, rollSouthWestDustup = orLoadByName_Orig.dungeonDustups.rollSouthWestDustup, rollWestDustup = orLoadByName_Orig.dungeonDustups.rollWestDustup, rollNorthWestDustup = orLoadByName_Orig.dungeonDustups.rollNorthWestDustup, rollLandDustup = orLoadByName_Orig.dungeonDustups.rollLandDustup }; dungeon.PatternSettings = new SemioticDungeonGenSettings { flows = new List { SuperFlow.Default_Flow }, mandatoryExtraRooms = new List(0), optionalExtraRooms = new List(0), MAX_GENERATION_ATTEMPTS = 5, DEBUG_RENDER_CANVASES_SEPARATELY = false }; dungeon.damageTypeEffectMatrix = orLoadByName.damageTypeEffectMatrix; dungeon.stampData = DungeonStampDataSetupChain.FloorStampData; dungeon.UsesCustomFloorIdea = false; RobotDaveIdea val3 = new RobotDaveIdea(); val3.ValidEasyEnemyPlaceables = (DungeonPlaceable[])(object)new DungeonPlaceable[0]; val3.ValidHardEnemyPlaceables = (DungeonPlaceable[])(object)new DungeonPlaceable[0]; val3.UseWallSawblades = false; val3.UseRollingLogsVertical = true; val3.UseRollingLogsHorizontal = true; val3.UseFloorPitTraps = false; val3.UseFloorFlameTraps = true; val3.UseFloorSpikeTraps = true; val3.UseFloorConveyorBelts = true; val3.UseCaveIns = true; val3.UseAlarmMushrooms = false; val3.UseChandeliers = true; val3.UseMineCarts = false; val3.CanIncludePits = false; dungeon.FloorIdea = val3; dungeon.PlaceDoors = true; foreach (DungeonPlaceableVariant variantTier in orLoadByName_Orig2.alternateDoorObjectsNakatomi.variantTiers) { object obj; if (variantTier == null) { obj = null; } else { GameObject nonDatabasePlaceable = variantTier.nonDatabasePlaceable; obj = ((nonDatabasePlaceable != null) ? nonDatabasePlaceable.GetComponentsInChildren() : null); } tk2dBaseSprite[] array = (tk2dBaseSprite[])obj; if (array != null) { tk2dBaseSprite[] array2 = array; foreach (tk2dBaseSprite val4 in array2) { val4.usesOverrideMaterial = true; Material material = new Material(StaticShaders.Default_Shader); ((BraveBehaviour)val4).renderer.material = material; } } } dungeon.doorObjects = orLoadByName_Orig2.alternateDoorObjectsNakatomi; dungeon.oneWayDoorObjects = orLoadByName.oneWayDoorObjects; dungeon.oneWayDoorPressurePlate = orLoadByName.oneWayDoorPressurePlate; dungeon.phantomBlockerDoorObjects = orLoadByName.phantomBlockerDoorObjects; dungeon.UsesWallWarpWingDoors = false; ((Component)dungeon).gameObject.AddComponent(); dungeon.BossMasteryTokenItemId = ModulePrinterCore.ModulePrinterCoreID; dungeon.LevelOverrideType = (LevelOverrideState)5; orLoadByName_Orig = null; orLoadByName = null; orLoadByName_Orig2 = null; return dungeon; } public static Dungeon GetOrLoadByName_Orig(string name) { AssetBundle val = ResourceManager.LoadAssetBundle("dungeons/" + name.ToLower()); DebugTime.RecordStartTime(); Dungeon component = val.LoadAsset(name).GetComponent(); DebugTime.Log("AssetBundle.LoadAsset({0})", new object[1] { name }); return component; } } internal class SuperFlow : DungeonFlowHelper { public static DungeonFlow Default_Flow; public static void GenerateFlows() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) try { DungeonFlowHelper.BaseSharedInjectionData = ResourceManager.LoadAssetBundle("shared_auto_002").LoadAsset("Base Shared Injection Data"); Dungeon orLoadByName_Orig = PastDungeon.GetOrLoadByName_Orig("Base_Mines"); DungeonFlow val = ScriptableObject.CreateInstance(); DungeonFlowNode val2 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)7, FloorRoomInitialisationChain.StartRoom, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val2, (DungeonFlowNode)null); val.FirstNode = val2; val2.guidAsString = "ASS"; val2.priority = (NodePriority)0; val2.isWarpWingEntrance = false; ((Object)val).name = "sadadsad"; val.fallbackRoomTable = orLoadByName_Orig.PatternSettings.flows[0].fallbackRoomTable; val.phantomRoomTable = null; val.subtypeRestrictions = new List(0); val.flowInjectionData = new List(0); val.sharedInjectionData = new List(); DungeonFlowNode val3 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Weezer_Room, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val3, val2); DungeonFlowNode val4 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_2, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val4, val3); DungeonFlowNode val5 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)1, FloorRoomInitialisationChain.Room_3, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val5, val4); DungeonFlowNode val6 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_1_1, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val6, val5); DungeonFlowNode val7 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_1_2, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val7, val6); DungeonFlowNode val8 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_1_3, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val8, val7); DungeonFlowNode val9 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_1_FuckYou, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val9, val8); DungeonFlowNode val10 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Corridor, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val10, val9); DungeonFlowNode val11 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)3, FloorRoomInitialisationChain.BossRoom, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val11, val10); DungeonFlowNode val12 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_4, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val12, val5); DungeonFlowNode val13 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_5, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val13, val12); DungeonFlowNode val14 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisationChain.Room_6, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val14, val13); Default_Flow = val; orLoadByName_Orig = null; } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); } } } public class CustomValidTilesetsClass { public enum CustomValidTilesets { GUNGEON = 1, CASTLEGEON = 2, SEWERGEON = 4, CATHEDRALGEON = 8, MINEGEON = 16, CATACOMBGEON = 32, FORGEGEON = 64, HELLGEON = 128, SPACEGEON = 256, PHOBOSGEON = 512, WESTGEON = 1024, OFFICEGEON = 2048, BELLYGEON = 4096, JUNGLEGEON = 8192, FINALGEON = 16384, RATGEON = 32768, MODULAR_PAST = 69696969 } } internal class DungeonMaterialSetupChain { public static DungeonMaterial floorMaterial; public static void InitCustomDungeonMaterial() { //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Expected O, but got Unknown //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Expected O, but got Unknown //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Expected O, but got Unknown //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Expected O, but got Unknown //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Expected O, but got Unknown //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Expected O, but got Unknown //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Expected O, but got Unknown //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Expected O, but got Unknown //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Expected O, but got Unknown //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Expected O, but got Unknown //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Expected O, but got Unknown //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Expected O, but got Unknown //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0783: Expected O, but got Unknown //IL_0785: Unknown result type (might be due to invalid IL or missing references) //IL_078a: Unknown result type (might be due to invalid IL or missing references) //IL_079e: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Expected O, but got Unknown //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Expected O, but got Unknown //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Expected O, but got Unknown //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Expected O, but got Unknown //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_087a: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Expected O, but got Unknown //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: Unknown result type (might be due to invalid IL or missing references) //IL_08cd: Expected O, but got Unknown //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08d4: Unknown result type (might be due to invalid IL or missing references) //IL_08e8: Unknown result type (might be due to invalid IL or missing references) //IL_0904: Expected O, but got Unknown //IL_0906: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Expected O, but got Unknown //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_0942: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_0972: Expected O, but got Unknown //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_0979: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_09a9: Expected O, but got Unknown //IL_09ce: Unknown result type (might be due to invalid IL or missing references) //IL_09d3: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Expected O, but got Unknown //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_0a0a: Unknown result type (might be due to invalid IL or missing references) //IL_0a1e: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Expected O, but got Unknown //IL_0a3c: Unknown result type (might be due to invalid IL or missing references) //IL_0a41: Unknown result type (might be due to invalid IL or missing references) //IL_0a55: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Expected O, but got Unknown //IL_0a73: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0a8c: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Expected O, but got Unknown //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0aaf: Unknown result type (might be due to invalid IL or missing references) //IL_0ac3: Unknown result type (might be due to invalid IL or missing references) //IL_0adf: Expected O, but got Unknown //IL_0ae1: Unknown result type (might be due to invalid IL or missing references) //IL_0ae6: Unknown result type (might be due to invalid IL or missing references) //IL_0afa: Unknown result type (might be due to invalid IL or missing references) //IL_0b16: Expected O, but got Unknown //IL_0b18: Unknown result type (might be due to invalid IL or missing references) //IL_0b1d: Unknown result type (might be due to invalid IL or missing references) //IL_0b31: Unknown result type (might be due to invalid IL or missing references) //IL_0b4d: Expected O, but got Unknown //IL_0b4f: Unknown result type (might be due to invalid IL or missing references) //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b84: Expected O, but got Unknown Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); floorMaterial = ScriptableObject.CreateInstance(); floorMaterial.supportsPits = true; floorMaterial.doPitAO = false; floorMaterial.useLighting = true; floorMaterial.supportsDiagonalWalls = false; floorMaterial.carpetIsMainFloor = false; floorMaterial.carpetGrids = (TileIndexGrid[])(object)new TileIndexGrid[0]; floorMaterial.roomCeilingBorderGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.additionalPitBorderFlatGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.roomCeilingBorderGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.fallbackHorizontalTileMapEffects = (VFXComplex[])(object)new VFXComplex[1] { ((Gun)/*isinst with value type is only supported in some contexts*/).muzzleFlashEffects.effects[0] }; floorMaterial.fallbackVerticalTileMapEffects = (VFXComplex[])(object)new VFXComplex[1] { ((Gun)/*isinst with value type is only supported in some contexts*/).muzzleFlashEffects.effects[0] }; string[] array = new string[3] { "Planetside/Resources/FloorStuff/WallShards/wallshard1_001.png", "Planetside/Resources/FloorStuff/WallShards/wallshard1_002.png", "Planetside/Resources/FloorStuff/WallShards/wallshard1_003.png" }; string[] array2 = new string[4] { "Planetside/Resources/FloorStuff/WallShards/wallshard2_001.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_002.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_003.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_004.png" }; floorMaterial.wallShards = orLoadByName.roomMaterialDefinitions[0].wallShards; floorMaterial.bigWallShardDamageThreshold = 20f; floorMaterial.bigWallShards = orLoadByName.roomMaterialDefinitions[0].bigWallShards; floorMaterial.secretRoomWallShardCollections = orLoadByName.roomMaterialDefinitions[0].secretRoomWallShardCollections; orLoadByName = null; TileIndexGrid val = TilesetToolbox.CreateBlankIndexGrid(); val.topIndices = new TileIndexList { indices = new List { 41 }, indexWeights = new List { 1f } }; val.leftIndices = new TileIndexList { indices = new List { 44 }, indexWeights = new List { 1f } }; val.rightIndices = new TileIndexList { indices = new List { 42 }, indexWeights = new List { 1f } }; val.bottomIndices = new TileIndexList { indices = new List { 43 }, indexWeights = new List { 1f } }; val.topLeftIndices = new TileIndexList { indices = new List { 48 }, indexWeights = new List { 1f } }; val.topRightIndices = new TileIndexList { indices = new List { 45 }, indexWeights = new List { 1f } }; val.bottomLeftIndices = new TileIndexList { indices = new List { 47 }, indexWeights = new List { 1f } }; val.bottomRightIndices = new TileIndexList { indices = new List { 46 }, indexWeights = new List { 1f } }; val.topLeftNubIndices = new TileIndexList { indices = new List { 52 }, indexWeights = new List { 1f } }; val.topRightNubIndices = new TileIndexList { indices = new List { 49 }, indexWeights = new List { 1f } }; val.bottomLeftNubIndices = new TileIndexList { indices = new List { 51 }, indexWeights = new List { 1f } }; val.bottomRightNubIndices = new TileIndexList { indices = new List { 50 }, indexWeights = new List { 1f } }; val.topCapIndices = new TileIndexList { indices = new List { 53 }, indexWeights = new List { 1f } }; val.leftCapIndices = new TileIndexList { indices = new List { 56 }, indexWeights = new List { 1f } }; val.bottomCapIndices = new TileIndexList { indices = new List { 55 }, indexWeights = new List { 1f } }; val.rightCapIndices = new TileIndexList { indices = new List { 54 }, indexWeights = new List { 1f } }; val.doubleNubsTop = new TileIndexList { indices = new List { 57 }, indexWeights = new List { 1f } }; val.doubleNubsLeft = new TileIndexList { indices = new List { 60 }, indexWeights = new List { 1f } }; val.doubleNubsBottom = new TileIndexList { indices = new List { 59 }, indexWeights = new List { 1f } }; val.doubleNubsRight = new TileIndexList { indices = new List { 58 }, indexWeights = new List { 1f } }; val.quadNubs = new TileIndexList { indices = new List { 61 }, indexWeights = new List { 1f } }; val.verticalIndices = new TileIndexList { indices = new List { 62 }, indexWeights = new List { 1f } }; val.horizontalIndices = new TileIndexList { indices = new List { 63 }, indexWeights = new List { 1f } }; val.centerIndices = new TileIndexList { indices = new List { 0 }, indexWeights = new List { 1f } }; val.borderBottomNubLeftIndices = new TileIndexList { indices = new List { 64 }, indexWeights = new List { 1f } }; val.borderBottomNubRightIndices = new TileIndexList { indices = new List { 65 }, indexWeights = new List { 1f } }; floorMaterial.roomCeilingBorderGrid = val; TileIndexGrid val2 = TilesetToolbox.CreateBlankIndexGrid(); val2.topIndices = new TileIndexList { indices = new List { 23 }, indexWeights = new List { 1f } }; val2.rightIndices = new TileIndexList { indices = new List { 24 }, indexWeights = new List { 1f } }; val2.bottomIndices = new TileIndexList { indices = new List { 25 }, indexWeights = new List { 1f } }; val2.leftIndices = new TileIndexList { indices = new List { 26 }, indexWeights = new List { 1f } }; val2.topLeftNubIndices = new TileIndexList { indices = new List { 34 }, indexWeights = new List { 1f } }; val2.topRightNubIndices = new TileIndexList { indices = new List { 33 }, indexWeights = new List { 1f } }; val2.bottomLeftNubIndices = new TileIndexList { indices = new List { 32 }, indexWeights = new List { 1f } }; val2.bottomRightNubIndices = new TileIndexList { indices = new List { 31 }, indexWeights = new List { 1f } }; val2.topRightIndices = new TileIndexList { indices = new List { 27 }, indexWeights = new List { 1f } }; val2.topLeftIndices = new TileIndexList { indices = new List { 30 }, indexWeights = new List { 1f } }; val2.bottomLeftIndices = new TileIndexList { indices = new List { 29 }, indexWeights = new List { 1f } }; val2.bottomRightIndices = new TileIndexList { indices = new List { 28 }, indexWeights = new List { 1f } }; val2.CenterIndicesAreStrata = false; val2.PitBorderOverridesFloorTile = true; floorMaterial.roomFloorBorderGrid = val2; TileIndexGrid val3 = TilesetToolbox.CreateBlankIndexGrid(); val3.topLeftIndices = new TileIndexList { indices = new List { 67 }, indexWeights = new List { 1f } }; val3.topIndices = new TileIndexList { indices = new List { 67 }, indexWeights = new List { 1f } }; val3.topRightIndices = new TileIndexList { indices = new List { 67 }, indexWeights = new List { 1f } }; val3.leftIndices = new TileIndexList { indices = new List { 66 }, indexWeights = new List { 1f } }; val3.rightIndices = new TileIndexList { indices = new List { 66 }, indexWeights = new List { 1f } }; val3.bottomLeftIndices = new TileIndexList { indices = new List { 66 }, indexWeights = new List { 1f } }; val3.bottomRightIndices = new TileIndexList { indices = new List { 66 }, indexWeights = new List { 1f } }; val3.bottomIndices = new TileIndexList { indices = new List { 66 }, indexWeights = new List { 1f } }; floorMaterial.pitLayoutGrid = val3; floorMaterial.pitBorderFlatGrid = val2; floorMaterial.pitBorderRaisedGrid = val2; } } internal class DungeonStampDataSetupChain { public static DungeonTileStampData FloorStampData; public static void InitCustomDungeonStampData() { FloorStampData = ScriptableObject.CreateInstance(); ((Object)FloorStampData).name = "Modular_Past_StampData_2"; FloorStampData.spriteStampWeight = 1f; FloorStampData.objectStampWeight = 1f; FloorStampData.tileStampWeight = 1f; FloorStampData.objectStamps = (ObjectStampData[])(object)new ObjectStampData[0]; FloorStampData.spriteStamps = (SpriteStampData[])(object)new SpriteStampData[0]; FloorStampData.stamps = (TileStampData[])(object)new TileStampData[0]; } } internal class DungeonStampDataSetup { public static DungeonTileStampData FloorStampData; public static void InitCustomDungeonStampData() { FloorStampData = ScriptableObject.CreateInstance(); ((Object)FloorStampData).name = "Modular_Past_StampData"; FloorStampData.spriteStampWeight = 1f; FloorStampData.objectStampWeight = 1f; FloorStampData.tileStampWeight = 1f; FloorStampData.objectStamps = (ObjectStampData[])(object)new ObjectStampData[0]; FloorStampData.spriteStamps = (SpriteStampData[])(object)new SpriteStampData[0]; FloorStampData.stamps = (TileStampData[])(object)new TileStampData[0]; } } internal class DungeonMaterialSetup { public static DungeonMaterial floorMaterial; public static void InitCustomDungeonMaterial() { //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Expected O, but got Unknown //IL_0381: 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_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Expected O, but got Unknown //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Expected O, but got Unknown //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Expected O, but got Unknown //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Expected O, but got Unknown //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Expected O, but got Unknown //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Expected O, but got Unknown //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Expected O, but got Unknown Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); floorMaterial = ScriptableObject.CreateInstance(); floorMaterial.supportsPits = true; floorMaterial.doPitAO = false; floorMaterial.useLighting = true; floorMaterial.supportsDiagonalWalls = false; floorMaterial.carpetIsMainFloor = false; floorMaterial.carpetGrids = (TileIndexGrid[])(object)new TileIndexGrid[0]; floorMaterial.roomCeilingBorderGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.additionalPitBorderFlatGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.roomCeilingBorderGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.fallbackHorizontalTileMapEffects = (VFXComplex[])(object)new VFXComplex[1] { ((Gun)/*isinst with value type is only supported in some contexts*/).muzzleFlashEffects.effects[0] }; floorMaterial.fallbackVerticalTileMapEffects = (VFXComplex[])(object)new VFXComplex[1] { ((Gun)/*isinst with value type is only supported in some contexts*/).muzzleFlashEffects.effects[0] }; string[] array = new string[3] { "Planetside/Resources/FloorStuff/WallShards/wallshard1_001.png", "Planetside/Resources/FloorStuff/WallShards/wallshard1_002.png", "Planetside/Resources/FloorStuff/WallShards/wallshard1_003.png" }; string[] array2 = new string[4] { "Planetside/Resources/FloorStuff/WallShards/wallshard2_001.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_002.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_003.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_004.png" }; floorMaterial.wallShards = orLoadByName.roomMaterialDefinitions[0].wallShards; floorMaterial.bigWallShardDamageThreshold = 20f; floorMaterial.bigWallShards = orLoadByName.roomMaterialDefinitions[0].bigWallShards; floorMaterial.secretRoomWallShardCollections = orLoadByName.roomMaterialDefinitions[0].secretRoomWallShardCollections; orLoadByName = null; TileIndexGrid val = TilesetToolbox.CreateBlankIndexGrid(); val.topIndices = new TileIndexList { indices = new List { 35 }, indexWeights = new List { 1f } }; val.leftIndices = new TileIndexList { indices = new List { 37 }, indexWeights = new List { 1f } }; val.rightIndices = new TileIndexList { indices = new List { 36 }, indexWeights = new List { 1f } }; val.bottomIndices = new TileIndexList { indices = new List { 34 }, indexWeights = new List { 1f } }; val.topLeftNubIndices = new TileIndexList { indices = new List { 41 }, indexWeights = new List { 1f } }; val.topRightNubIndices = new TileIndexList { indices = new List { 40 }, indexWeights = new List { 1f } }; val.bottomLeftNubIndices = new TileIndexList { indices = new List { 38 }, indexWeights = new List { 1f } }; val.bottomRightNubIndices = new TileIndexList { indices = new List { 39 }, indexWeights = new List { 1f } }; val.centerIndices = new TileIndexList { indices = new List { 0 }, indexWeights = new List { 1f } }; floorMaterial.roomCeilingBorderGrid = val; TileIndexGrid val2 = TilesetToolbox.CreateBlankIndexGrid(); val2.topIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.leftIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.rightIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.bottomIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.topLeftNubIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.topRightNubIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.bottomLeftNubIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.bottomRightNubIndices = new TileIndexList { indices = new List { 20, 21, 22, 23 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.CenterIndicesAreStrata = false; floorMaterial.roomFloorBorderGrid = val2; } } internal class DungeonMaterialSetupSecond { public static DungeonMaterial floorMaterial; public static void InitCustomDungeonMaterial() { //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Expected O, but got Unknown //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Expected O, but got Unknown //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Expected O, but got Unknown //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Expected O, but got Unknown //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Expected O, but got Unknown //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Expected O, but got Unknown //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Expected O, but got Unknown //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Expected O, but got Unknown //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_0781: Unknown result type (might be due to invalid IL or missing references) //IL_07b0: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Expected O, but got Unknown //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_0826: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Expected O, but got Unknown //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Expected O, but got Unknown //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0952: Expected O, but got Unknown Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); floorMaterial = ScriptableObject.CreateInstance(); floorMaterial.supportsPits = true; floorMaterial.doPitAO = false; floorMaterial.useLighting = true; floorMaterial.supportsDiagonalWalls = false; floorMaterial.carpetIsMainFloor = false; floorMaterial.carpetGrids = (TileIndexGrid[])(object)new TileIndexGrid[0]; floorMaterial.roomCeilingBorderGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.additionalPitBorderFlatGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.roomCeilingBorderGrid = TilesetToolbox.CreateBlankIndexGrid(); floorMaterial.fallbackHorizontalTileMapEffects = (VFXComplex[])(object)new VFXComplex[1] { ((Gun)/*isinst with value type is only supported in some contexts*/).muzzleFlashEffects.effects[0] }; floorMaterial.fallbackVerticalTileMapEffects = (VFXComplex[])(object)new VFXComplex[1] { ((Gun)/*isinst with value type is only supported in some contexts*/).muzzleFlashEffects.effects[0] }; string[] array = new string[3] { "Planetside/Resources/FloorStuff/WallShards/wallshard1_001.png", "Planetside/Resources/FloorStuff/WallShards/wallshard1_002.png", "Planetside/Resources/FloorStuff/WallShards/wallshard1_003.png" }; string[] array2 = new string[4] { "Planetside/Resources/FloorStuff/WallShards/wallshard2_001.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_002.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_003.png", "Planetside/Resources/FloorStuff/WallShards/wallshard2_004.png" }; floorMaterial.wallShards = orLoadByName.roomMaterialDefinitions[0].wallShards; floorMaterial.bigWallShardDamageThreshold = 20f; floorMaterial.bigWallShards = orLoadByName.roomMaterialDefinitions[0].bigWallShards; floorMaterial.secretRoomWallShardCollections = orLoadByName.roomMaterialDefinitions[0].secretRoomWallShardCollections; orLoadByName = null; TileIndexGrid val = TilesetToolbox.CreateBlankIndexGrid(); val.topIndices = new TileIndexList { indices = new List { 52 }, indexWeights = new List { 1f } }; val.leftIndices = new TileIndexList { indices = new List { 54 }, indexWeights = new List { 1f } }; val.rightIndices = new TileIndexList { indices = new List { 53 }, indexWeights = new List { 1f } }; val.bottomIndices = new TileIndexList { indices = new List { 51 }, indexWeights = new List { 1f } }; val.topLeftNubIndices = new TileIndexList { indices = new List { 57 }, indexWeights = new List { 1f } }; val.topRightNubIndices = new TileIndexList { indices = new List { 58 }, indexWeights = new List { 1f } }; val.bottomLeftNubIndices = new TileIndexList { indices = new List { 55 }, indexWeights = new List { 1f } }; val.bottomRightNubIndices = new TileIndexList { indices = new List { 56 }, indexWeights = new List { 1f } }; val.bottomRightIndices = new TileIndexList { indices = new List { 61 }, indexWeights = new List { 1f } }; val.bottomLeftIndices = new TileIndexList { indices = new List { 62 }, indexWeights = new List { 1f } }; val.topLeftIndices = new TileIndexList { indices = new List { 63 }, indexWeights = new List { 1f } }; val.topRightIndices = new TileIndexList { indices = new List { 64 }, indexWeights = new List { 1f } }; val.topRightIndices = new TileIndexList { indices = new List { 64 }, indexWeights = new List { 1f } }; val.rightCapIndices = new TileIndexList { indices = new List { 65 }, indexWeights = new List { 1f } }; val.leftCapIndices = new TileIndexList { indices = new List { 66 }, indexWeights = new List { 1f } }; val.horizontalIndices = new TileIndexList { indices = new List { 67 }, indexWeights = new List { 1f } }; val.borderTopNubRightIndices = new TileIndexList { indices = new List { 68 }, indexWeights = new List { 1f } }; val.borderTopNubLeftIndices = new TileIndexList { indices = new List { 69 }, indexWeights = new List { 1f } }; val.CenterIndicesAreStrata = false; val.centerIndices = new TileIndexList { indices = new List { 1 }, indexWeights = new List { 1f } }; floorMaterial.roomCeilingBorderGrid = val; TileIndexGrid val2 = TilesetToolbox.CreateBlankIndexGrid(); val2.topIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.leftIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.rightIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.bottomIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.topLeftNubIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.topRightNubIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.bottomLeftNubIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.bottomRightNubIndices = new TileIndexList { indices = new List { 44, 45, 46, 47 }, indexWeights = new List { 1f, 1f, 1f, 1f } }; val2.CenterIndicesAreStrata = false; floorMaterial.roomFloorBorderGrid = val2; } } public class FloorRoomInitialisationChain { public static PrototypeDungeonRoom StartRoom; public static PrototypeDungeonRoom FirstRoom; public static PrototypeDungeonRoom Weezer_Room; public static PrototypeDungeonRoom Room_2; public static PrototypeDungeonRoom Room_3; public static PrototypeDungeonRoom Room_4; public static PrototypeDungeonRoom Room_5; public static PrototypeDungeonRoom Room_6; public static PrototypeDungeonRoom Room_1_1; public static PrototypeDungeonRoom Room_1_2; public static PrototypeDungeonRoom Room_1_3; public static PrototypeDungeonRoom Room_1_FuckYou; public static PrototypeDungeonRoom Corridor; public static PrototypeDungeonRoom BossRoom; public static PrototypeDungeonRoom TestRoom; public static void InitCustomRooms() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0193: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: 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) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) StartRoom = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/pad2_entrance.room", (Assembly)null).room; StartRoom.UseCustomMusic = true; StartRoom.UseCustomMusicState = false; StartRoom.CustomMusicEvent = "Play_MUS_Dungeon_State_Winner"; StartRoom.UseCustomMusicSwitch = true; StartRoom.UseCustomMusicSwitch = true; StartRoom.CustomMusicSwitch = "Play_ChoirOfTheSilentMachine"; Weezer_Room = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/hell.room", (Assembly)null).room; foreach (PrototypeRoomObjectLayer additionalObjectLayer in Weezer_Room.additionalObjectLayers) { additionalObjectLayer.reinforcementTriggerCondition = (RoomEventTriggerCondition)12; } Room_2 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room2.room", (Assembly)null).room; Room_2.usesCustomAmbientLight = true; Room_2.customAmbientLight = new Color(0.7f, 0.7f, 0.7f); foreach (PrototypeRoomObjectLayer additionalObjectLayer2 in Room_2.additionalObjectLayers) { additionalObjectLayer2.reinforcementTriggerCondition = (RoomEventTriggerCondition)2; } Room_3 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room3.room", (Assembly)null).room; Room_3.usesCustomAmbientLight = true; Room_3.customAmbientLight = new Color(0.7f, 0.7f, 0.7f); foreach (PrototypeRoomObjectLayer additionalObjectLayer3 in Room_3.additionalObjectLayers) { additionalObjectLayer3.reinforcementTriggerCondition = (RoomEventTriggerCondition)20; } Room_4 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room4_2.room", (Assembly)null).room; Room_4.usesCustomAmbientLight = true; Room_4.customAmbientLight = new Color(0.8f, 0.5f, 0.5f); PrototypeRoomObjectLayer value = new PrototypeRoomObjectLayer { placedObjects = new List(), delayTime = 0f, reinforcementTriggerCondition = (RoomEventTriggerCondition)80 }; PrototypeRoomObjectLayer item = Room_4.additionalObjectLayers[2]; Room_4.additionalObjectLayers[2] = value; Room_4.additionalObjectLayers.Add(item); foreach (PrototypeRoomObjectLayer additionalObjectLayer4 in Room_4.additionalObjectLayers) { additionalObjectLayer4.reinforcementTriggerCondition = (RoomEventTriggerCondition)2; } Room_4.additionalObjectLayers[2].reinforcementTriggerCondition = (RoomEventTriggerCondition)62; Room_4.additionalObjectLayers[3].reinforcementTriggerCondition = (RoomEventTriggerCondition)62; Room_5 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room_5.room", (Assembly)null).room; Room_5.usesCustomAmbientLight = true; Room_5.customAmbientLight = new Color(0.7f, 0.7f, 0.7f); Room_6 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room_6.room", (Assembly)null).room; Room_6.usesCustomAmbientLight = true; Room_6.customAmbientLight = new Color(0.6f, 0.2f, 0.2f); Room_1_1 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/corridor_entrance_room_.room", (Assembly)null).room; Room_1_1.usesCustomAmbientLight = true; Room_1_1.customAmbientLight = new Color(0.4f, 0.4f, 0.4f); Room_1_2 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room_7.room", (Assembly)null).room; Room_1_2.usesCustomAmbientLight = true; Room_1_2.customAmbientLight = new Color(0.7f, 0.5f, 0.5f); Room_1_3 = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/Room_8.room", (Assembly)null).room; Room_1_3.usesCustomAmbientLight = true; Room_1_3.customAmbientLight = new Color(0.3f, 0.3f, 0.3f); Room_1_FuckYou = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/mega_fuck_you_room.room", (Assembly)null).room; Room_1_FuckYou.usesCustomAmbientLight = true; Room_1_FuckYou.customAmbientLight = new Color(0.6f, 0.6f, 0.6f); foreach (PrototypeRoomObjectLayer additionalObjectLayer5 in Room_1_FuckYou.additionalObjectLayers) { additionalObjectLayer5.reinforcementTriggerCondition = (RoomEventTriggerCondition)2; } Corridor = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/huge_fuckoff_corridor.room", (Assembly)null).room; Corridor.usesCustomAmbientLight = true; Corridor.customAmbientLight = new Color(0.2f, 0.05f, 0.05f); Corridor.UseCustomMusic = true; Corridor.UseCustomMusicState = false; Corridor.CustomMusicEvent = "Play_MUS_Dungeon_State_Winner"; Corridor.UseCustomMusicSwitch = true; Corridor.UseCustomMusicSwitch = true; Corridor.CustomMusicSwitch = "Play_ChoirOfTheSilentMachine"; BossRoom = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/STEEL_PANOPTICON.room", (Assembly)null).room; BossRoom.usesCustomAmbientLight = true; BossRoom.customAmbientLight = new Color(0.6f, 0.6f, 0.6f); BossRoom.UseCustomMusic = true; BossRoom.UseCustomMusicState = false; BossRoom.CustomMusicEvent = "Play_MUS_Dungeon_State_Winner"; BossRoom.UseCustomMusicSwitch = true; BossRoom.UseCustomMusicSwitch = true; BossRoom.CustomMusicSwitch = "Play_ChoirOfTheSilentMachine"; TestRoom = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/PastDashTwo/fyck you dodgeroll.room", (Assembly)null).room; } public static WeightedRoom GenerateWeightedRoom(PrototypeDungeonRoom Room, float Weight = 1f, bool LimitedCopies = true, int MaxCopies = 1, DungeonPrerequisite[] AdditionalPrerequisites = null) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown if ((Object)(object)Room == (Object)null) { return null; } if (AdditionalPrerequisites == null) { AdditionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; } return new WeightedRoom { room = Room, weight = Weight, limitedCopies = LimitedCopies, maxCopies = MaxCopies, additionalPrerequisites = AdditionalPrerequisites }; } } public class FakeCorridor { public class Fuck_Your_Invisible_Hitbox : MonoBehaviour { public void Start() { SpeculativeRigidbody component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.ShowHitBox(); } } } public class Fuck_Your_Z_Axis_Its_Now_Zero : MonoBehaviour { public void Start() { } public void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) ((Component)this).gameObject.transform.localPosition = Vector3Extensions.WithZ(((Component)this).gameObject.transform.localPosition, 0f); } } public class Fuck_You_Youre_No_Longer_Perpendicular : MonoBehaviour { public void Start() { ((Component)this).GetComponent().IsPerpendicular = false; } } public static void Init() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) CreateFakeCorridor("FakeDoor_Right_1", "fake_corridor_leftward", "fake_corridor_leftwardrightward_outlinedummy", new Vector2(-3f, 1f), new Vector3(-1.0625f, 1.5f), "Locked.", new Vector3(2.25f, 1f)); CreateFakeCorridor("FakeDoor_Left_1", "fake_corridor_rightward", "fake_corridor_leftwardrightward_outlinedummy", new Vector2(0f, 1f), new Vector3(1.0625f, 1.5f), "Locked.", new Vector3(-2.25f, 1f)); CreateFakeCorridor("FakeDoor_Down_1", "fake_corridor_downward", "fake_corridor_upwarddownward_outlinedummy", new Vector2(0f, -2f), new Vector3(1f, -1f), "Locked.", new Vector3(1f, 1f)); CreateFakeCorridor("FakeDoor_Up_1", "fake_corridor_upward", "fake_corridor_upwarddownward_outlinedummy", new Vector2(0f, 0f), new Vector3(1f, 1f), "Locked.", new Vector3(1f, -1f)); } public static void CreateFakeCorridor(string name, string spriteName, string OutlineObjectSprite, Vector2 spriteoffset, Vector3 objectOffset, string Dialogue, Vector3 talkpointOffset) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00d3: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject(name); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); AddChild(name, val, OutlineObjectSprite, objectOffset, Dialogue, talkpointOffset); tk2dSpriteDefinition spriteDefinition = StaticCollections.Past_Decorative_Object_Collection.GetSpriteDefinition(spriteName); spriteDefinition.position0.x += spriteoffset.x; spriteDefinition.position0.y += spriteoffset.y; spriteDefinition.position1.x += spriteoffset.x; spriteDefinition.position1.y += spriteoffset.y; spriteDefinition.position2.x += spriteoffset.x; spriteDefinition.position2.y += spriteoffset.y; spriteDefinition.position3.x += spriteoffset.x; spriteDefinition.position3.y += spriteoffset.y; val.AddComponent(); val.AddComponent(); StaticReferences.customObjects.Add(name + "_MDLR", val); } public static void AddChild(string name, GameObject parent, string outlineObjectSprite, Vector3 offset, string D, Vector3 offsetTalkPoint) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject(name + "_Outline"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(outlineObjectSprite)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; ((tk2dBaseSprite)val2).IsPerpendicular = false; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material = val3; val.transform.parent = parent.transform; QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_DOOR_" + name, D); quickInterractableController.Interact_String = "#MDLR_DOOR_" + name; GameObject val4 = PrefabBuilder.BuildObject(name + "_Outline_Talkpoint"); val4.transform.parent = val.transform; Transform transform = val4.transform; transform.localPosition += offsetTalkPoint; quickInterractableController.talkPoint = val4.transform; quickInterractableController.DebugReach = false; quickInterractableController.UsesTransformDist = true; Transform transform2 = val.transform; transform2.localPosition += offset; val.AddComponent(); val.AddComponent(); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); val.CreateFastBody(new IntVector2(0, 0), new IntVector2(0, 0)); } } public class QuickInterractableController : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler parentRoom; public string Interact_String = "Hi :)"; public Transform talkPoint; public bool DebugReach = false; public bool UsesTransformDist = false; public float ReachMult = 1f; public void Start() { } public void Update() { } public void ConfigureOnPlacement(RoomHandler room) { parentRoom = room; } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (UsesTransformDist) { return Vector2.Distance(point, TransformExtensions.PositionVector2(talkPoint)) / 1.5f * (float)((!DebugReach) ? 1 : 15) * ReachMult; } if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f * (float)((!DebugReach) ? 1 : 15); } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) string interact_String = Interact_String; TextBoxManager.ShowThoughtBubble(Vector2.op_Implicit(((BraveBehaviour)interactor).sprite.WorldCenter + new Vector2(1f, 1f)), talkPoint, -1f, StringTableManager.GetLongString(interact_String), true, false, ""); } public void OnEnteredRange(PlayerController interactor) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) TextBoxManager.ClearTextBox(talkPoint); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) TextBoxManager.ClearTextBox(talkPoint); SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } internal class TilesetSetupTwo { public static tk2dSpriteCollectionData ExperimentalTilesetCollection; public static void InitCustomTileset() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0184: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0359: 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_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) ExperimentalTilesetCollection = StaticCollections.DoFastSetup(Module.ModularAssetBundle, "PastTileset2Collection", "tileset2 material.mat"); Texture texture = ExperimentalTilesetCollection.materials[0].GetTexture("_MainTex"); texture.filterMode = (FilterMode)0; Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); Material val = new Material(orLoadByName.tileIndices.dungeonCollection.materials[1]); val.SetTexture("_MainTex", texture); Material val2 = new Material(orLoadByName.tileIndices.dungeonCollection.materials[0]); val2.SetTexture("_MainTex", texture); orLoadByName = null; ExperimentalTilesetCollection.materials = (Material[])(object)new Material[2] { val2, val }; ExperimentalTilesetCollection.materialInsts = (Material[])(object)new Material[2] { val2, val }; ExperimentalTilesetCollection.textures = (Texture[])(object)new Texture[1] { texture }; for (int i = 1; i < ExperimentalTilesetCollection.Count; i++) { ExperimentalTilesetCollection.SetMaterial(i, 1); } for (int j = 1; j < ExperimentalTilesetCollection.Count; j++) { ExperimentalTilesetCollection.spriteDefinitions[j].metadata = new TilesetIndexMetadata(); ExperimentalTilesetCollection.spriteDefinitions[j].metadata.SetupTileMetaData((TilesetFlagType)0, 0f, 1, 0); } try { ExperimentalTilesetCollection.spriteDefinitions[0].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[20].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[21].metadata.SetupTileMetaData((TilesetFlagType)128, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[22].metadata.SetupTileMetaData((TilesetFlagType)64, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[35].metadata.SetupTileMetaData((TilesetFlagType)2, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[35].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[36].metadata.SetupTileMetaData((TilesetFlagType)32768, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[36].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[37].metadata.SetupTileMetaData((TilesetFlagType)16384, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[37].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[38].metadata.SetupTileMetaData((TilesetFlagType)1, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[38].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); ExperimentalTilesetCollection.spriteDefinitions[39].metadata.SetupTileMetaData((TilesetFlagType)131072, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[39].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); ExperimentalTilesetCollection.spriteDefinitions[40].metadata.SetupTileMetaData((TilesetFlagType)65536, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[40].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); } } } internal class TilesetSetup { public static tk2dSpriteCollectionData ExperimentalTilesetCollection; public static void InitCustomTileset() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_033a: 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_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Unknown result type (might be due to invalid IL or missing references) //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_08dd: Unknown result type (might be due to invalid IL or missing references) //IL_0932: Unknown result type (might be due to invalid IL or missing references) //IL_0937: Unknown result type (might be due to invalid IL or missing references) //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_0952: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09c7: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0a6b: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Unknown result type (might be due to invalid IL or missing references) //IL_0ab8: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0aef: Unknown result type (might be due to invalid IL or missing references) //IL_0af4: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b0f: Unknown result type (might be due to invalid IL or missing references) //IL_0b41: Unknown result type (might be due to invalid IL or missing references) //IL_0b46: Unknown result type (might be due to invalid IL or missing references) //IL_0b5c: Unknown result type (might be due to invalid IL or missing references) //IL_0b61: Unknown result type (might be due to invalid IL or missing references) //IL_0b93: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_0bae: Unknown result type (might be due to invalid IL or missing references) //IL_0bb3: Unknown result type (might be due to invalid IL or missing references) //IL_0be5: Unknown result type (might be due to invalid IL or missing references) //IL_0bea: Unknown result type (might be due to invalid IL or missing references) //IL_0c00: Unknown result type (might be due to invalid IL or missing references) //IL_0c05: Unknown result type (might be due to invalid IL or missing references) //IL_0c37: Unknown result type (might be due to invalid IL or missing references) //IL_0c3c: Unknown result type (might be due to invalid IL or missing references) //IL_0c52: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0ca4: Unknown result type (might be due to invalid IL or missing references) //IL_0ca9: Unknown result type (might be due to invalid IL or missing references) //IL_0cdb: Unknown result type (might be due to invalid IL or missing references) //IL_0ce0: Unknown result type (might be due to invalid IL or missing references) //IL_0cf6: Unknown result type (might be due to invalid IL or missing references) //IL_0cfb: Unknown result type (might be due to invalid IL or missing references) //IL_0d2d: Unknown result type (might be due to invalid IL or missing references) //IL_0d32: Unknown result type (might be due to invalid IL or missing references) //IL_0d48: Unknown result type (might be due to invalid IL or missing references) //IL_0d4d: Unknown result type (might be due to invalid IL or missing references) //IL_0d7f: Unknown result type (might be due to invalid IL or missing references) //IL_0d84: Unknown result type (might be due to invalid IL or missing references) //IL_0d9a: Unknown result type (might be due to invalid IL or missing references) //IL_0d9f: Unknown result type (might be due to invalid IL or missing references) //IL_0dd1: Unknown result type (might be due to invalid IL or missing references) //IL_0dd6: Unknown result type (might be due to invalid IL or missing references) //IL_0dec: Unknown result type (might be due to invalid IL or missing references) //IL_0df1: Unknown result type (might be due to invalid IL or missing references) ExperimentalTilesetCollection = StaticCollections.DoFastSetup(Module.ModularAssetBundle, "PastTilesetCollection", "pasttileset material.mat"); Texture texture = ExperimentalTilesetCollection.materials[0].GetTexture("_MainTex"); texture.filterMode = (FilterMode)0; Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); Material val = new Material(orLoadByName.tileIndices.dungeonCollection.materials[1]); val.SetTexture("_MainTex", texture); Material val2 = new Material(orLoadByName.tileIndices.dungeonCollection.materials[0]); val2.SetTexture("_MainTex", texture); orLoadByName = null; ExperimentalTilesetCollection.materials = (Material[])(object)new Material[2] { val2, val }; ExperimentalTilesetCollection.materialInsts = (Material[])(object)new Material[2] { val2, val }; ExperimentalTilesetCollection.textures = (Texture[])(object)new Texture[1] { texture }; for (int i = 1; i < ExperimentalTilesetCollection.Count; i++) { ExperimentalTilesetCollection.SetMaterial(i, 1); } for (int j = 1; j < ExperimentalTilesetCollection.Count; j++) { ExperimentalTilesetCollection.spriteDefinitions[j].metadata = new TilesetIndexMetadata(); ExperimentalTilesetCollection.spriteDefinitions[j].metadata.SetupTileMetaData((TilesetFlagType)0, 0f, 1, 0); } try { ExperimentalTilesetCollection.spriteDefinitions[34].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[35].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[36].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[37].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[38].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[39].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[40].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[41].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.SetMaterial(34, 0); ExperimentalTilesetCollection.SetMaterial(35, 0); ExperimentalTilesetCollection.SetMaterial(36, 0); ExperimentalTilesetCollection.SetMaterial(37, 0); ExperimentalTilesetCollection.SetMaterial(38, 0); ExperimentalTilesetCollection.SetMaterial(39, 0); ExperimentalTilesetCollection.SetMaterial(40, 0); ExperimentalTilesetCollection.SetMaterial(41, 0); ExperimentalTilesetCollection.spriteDefinitions[0].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[31].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); ExperimentalTilesetCollection.spriteDefinitions[33].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); ExperimentalTilesetCollection.spriteDefinitions[31].metadata.SetupTileMetaData((TilesetFlagType)1, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[32].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); ExperimentalTilesetCollection.spriteDefinitions[24].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[25].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[26].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[24].metadata.SetupTileMetaData((TilesetFlagType)2, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[42].metadata.SetupTileMetaData((TilesetFlagType)64, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[43].metadata.SetupTileMetaData((TilesetFlagType)128, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[20].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[21].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[22].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[23].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 1, 0); ExperimentalTilesetCollection.spriteDefinitions[44].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[45].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[46].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[47].metadata.SetupTileMetaData((TilesetFlagType)4, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[59].metadata.SetupTileMetaData((TilesetFlagType)64, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[60].metadata.SetupTileMetaData((TilesetFlagType)128, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[1].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[48].metadata.SetupTileMetaData((TilesetFlagType)2, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[48].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)5); ExperimentalTilesetCollection.spriteDefinitions[50].metadata.SetupTileMetaData((TilesetFlagType)1, 1f, 2, 0); ExperimentalTilesetCollection.spriteDefinitions[50].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6); ExperimentalTilesetCollection.spriteDefinitions[53].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[54].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[54].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[54].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[61].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[62].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[63].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[64].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[65].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[66].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[67].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[68].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.spriteDefinitions[69].SetupTilesetSpriteDefForceCollision((Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f, 0f), new Vector3(0.5f, 0.5f, 0.1f) }, (ColliderType)2, (CollisionLayer)6, ForceDefaultvertices: true); ExperimentalTilesetCollection.SetMaterial(51, 0); ExperimentalTilesetCollection.SetMaterial(52, 0); ExperimentalTilesetCollection.SetMaterial(53, 0); ExperimentalTilesetCollection.SetMaterial(54, 0); ExperimentalTilesetCollection.SetMaterial(55, 0); ExperimentalTilesetCollection.SetMaterial(56, 0); ExperimentalTilesetCollection.SetMaterial(57, 0); ExperimentalTilesetCollection.SetMaterial(58, 0); } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); } } } public class PastDungeon { private class PastFloorOneController : MonoBehaviour { public IEnumerator Start() { while (Dungeon.IsGenerating) { yield return null; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (player.characterIdentity == Module.Modular) { player.startingGunIds = new List { DefaultArmCannon.ID }; try { ? val = player.inventory; PickupObject byId = PickupObjectDatabase.GetById(DefaultArmCannon.ID); ((GunInventory)val).AddGunToInventory((Gun)(object)((byId is Gun) ? byId : null), true); GameObject gameObject = Object.Instantiate(((Component)PickupObjectDatabase.GetById(ModulePrinterCore.ModulePrinterCoreID)).gameObject, Vector3.zero, Quaternion.identity); PickupObject component3 = gameObject.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.CanBeDropped = false; component3.Pickup(player); } } catch (Exception ex) { Exception e = ex; Debug.Log((object)e); } } else { ? val2 = player.inventory; PickupObject byId2 = PickupObjectDatabase.GetById(24); Gun g = ((GunInventory)val2).AddGunToInventory((Gun)(object)((byId2 is Gun) ? byId2 : null), true); g.InfiniteAmmo = true; ((PickupObject)g).CanBeDropped = false; } } Pixelator.Instance.FadeToBlack(0.25f, true, 0.05f); Pixelator.Instance.TriggerPastFadeIn(); yield return (object)new WaitForSeconds(0.4f); Pixelator.Instance.SetOcclusionDirty(); GameManager.Instance.PrimaryPlayer.SetInputOverride("past"); if ((int)GameManager.Instance.CurrentGameType == 1) { GameManager.Instance.SecondaryPlayer.SetInputOverride("past"); } yield return (object)new WaitForSeconds(2f); TextBoxManager.ShowTextBox(((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform, 4f, GameManager.Instance.PrimaryPlayer.IsUsingAlternateCostume ? "No time to waste here.\n I remember this as clear as day." : "Here it is.\nBack here again.", "golem", false, (BoxSlideOrientation)0, true, false); yield return (object)new WaitForSeconds(1f); GameManager.Instance.PrimaryPlayer.ClearInputOverride("past"); if ((int)GameManager.Instance.CurrentGameType == 1) { GameManager.Instance.SecondaryPlayer.ClearInputOverride("past"); } } } public static GameLevelDefinition PastDefinition; public static GameObject GameManagerObject; public static tk2dSpriteCollectionData Tileset; public static Hook getOrLoadByName_Hook; public static void Init() { InitObjects.Init(); TilesetSetup.InitCustomTileset(); DungeonMaterialSetup.InitCustomDungeonMaterial(); DungeonMaterialSetupSecond.InitCustomDungeonMaterial(); DungeonStampDataSetup.InitCustomDungeonStampData(); FloorRoomInitialisation.InitCustomRooms(); CustomFlow.GenerateFlows(); ETGModConsole.Commands.AddGroup("pstmdl", (Action)delegate { }); if (Module.Debug_Mode) { ETGModConsole.Commands.GetGroup("pstmdl").AddUnit("load", (Action)LoadFloor); } InitCustomDungeon(); } private static void LoadFloor(string[] obj) { if (!GameManager.Instance.customFloors.Contains(PastDefinition)) { GameManager.Instance.customFloors.Add(PastDefinition); } GameManager.Instance.LoadCustomLevel(PastDefinition.dungeonSceneName); } public static void InitCustomDungeon() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_008e: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown getOrLoadByName_Hook = new Hook((MethodBase)typeof(DungeonDatabase).GetMethod("GetOrLoadByName", BindingFlags.Static | BindingFlags.Public), typeof(PastDungeon).GetMethod("GetOrLoadByNameHook", BindingFlags.Static | BindingFlags.Public)); AssetBundle val = ResourceManager.LoadAssetBundle("brave_resources_001"); GameManagerObject = val.LoadAsset("_GameManager"); PastDefinition = new GameLevelDefinition { dungeonSceneName = "tt_modular_past", dungeonPrefabPath = "based_modular_past", priceMultiplier = 1.5f, secretDoorHealthMultiplier = 1f, enemyHealthMultiplier = 1.6f, damageCap = 300f, bossDpsCap = 78f, flowEntries = new List(0), predefinedSeeds = new List(0) }; foreach (GameLevelDefinition customFloor in GameManager.Instance.customFloors) { if (customFloor.dungeonSceneName == "tt_modular_past") { PastDefinition = customFloor; } } GameManager.Instance.customFloors.Add(PastDefinition); GameManagerObject.GetComponent().customFloors.Add(PastDefinition); } public static Dungeon GetOrLoadByNameHook(Func orig, string name) { if (!GameManager.Instance.customFloors.Contains(PastDefinition)) { GameManager.Instance.customFloors.Add(PastDefinition); } if (name.ToLower() == "based_modular_past") { DebugTime.RecordStartTime(); DebugTime.Log("AssetBundle.LoadAsset({0})", new object[1] { name }); return AbyssGeon(GetOrLoadByName_Orig("Base_ResourcefulRat")); } return orig(name); } public static Dungeon AbyssGeon(Dungeon dungeon) { //IL_002a: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //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_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0286: 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_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Expected O, but got Unknown //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown Dungeon orLoadByName_Orig = GetOrLoadByName_Orig("Base_Mines"); Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); ((Object)((Component)dungeon).gameObject).name = "Base_Modular_Past"; dungeon.contentSource = (ContentSource)4; dungeon.DungeonSeed = 0; dungeon.DungeonFloorName = "Hegemony Mechanics Loading Bay."; dungeon.DungeonShortName = "Modulars Past."; dungeon.DungeonFloorLevelTextOverride = "7 Years Prior..."; dungeon.LevelOverrideType = (LevelOverrideState)0; dungeon.debugSettings = new DebugDungeonSettings { RAPID_DEBUG_DUNGEON_ITERATION_SEEKER = false, RAPID_DEBUG_DUNGEON_ITERATION = false, RAPID_DEBUG_DUNGEON_COUNT = 5, GENERATION_VIEWER_MODE = false, FULL_MINIMAP_VISIBILITY = true, COOP_TEST = false, DISABLE_ENEMIES = false, DISABLE_LOOPS = true, DISABLE_SECRET_ROOM_COVERS = false, DISABLE_OUTLINES = false, WALLS_ARE_PITS = false }; dungeon.ForceRegenerationOfCharacters = false; dungeon.ActuallyGenerateTilemap = true; WeightedInt val = new WeightedInt(); val.value = 1; val.weight = 1f; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; val.annotation = "why"; WeightedIntCollection val2 = new WeightedIntCollection(); val2.elements = (WeightedInt[])(object)new WeightedInt[1] { val }; dungeon.decoSettings.standardRoomVisualSubtypes = val2; dungeon.LevelOverrideType = (LevelOverrideState)5; TilemapDecoSettings decoSettings = dungeon.decoSettings; decoSettings.ambientLightColor = new Color(0.05f, 0.05f, 0.05f); decoSettings.ambientLightColorTwo = new Color(0.05f, 0.05f, 0.05f); decoSettings.generateLights = false; dungeon.tileIndices = new TileIndices { tilesetId = (ValidTilesets)69696969, dungeonCollection = TilesetSetup.ExperimentalTilesetCollection, dungeonCollectionSupportsDiagonalWalls = false, aoTileIndices = new AOTileIndices(), placeBorders = true, placePits = true, chestHighWallIndices = new List { new TileIndexVariant { index = 41, likelihood = 0.5f, overrideLayerIndex = 0, overrideIndex = 0 } }, decalIndexGrid = null, edgeDecorationTiles = null }; ((Object)dungeon.tileIndices.dungeonCollection).name = "ENV_AbyssFloor_Collection"; dungeon.roomMaterialDefinitions = (DungeonMaterial[])(object)new DungeonMaterial[3] { DungeonMaterialSetup.floorMaterial, DungeonMaterialSetup.floorMaterial, DungeonMaterialSetupSecond.floorMaterial }; dungeon.dungeonWingDefinitions = (DungeonWingDefinition[])(object)new DungeonWingDefinition[0]; dungeon.pathGridDefinitions = new List { orLoadByName_Orig.pathGridDefinitions[0] }; dungeon.dungeonDustups = new DustUpVFX { runDustup = orLoadByName_Orig.dungeonDustups.runDustup, waterDustup = orLoadByName_Orig.dungeonDustups.waterDustup, additionalWaterDustup = orLoadByName_Orig.dungeonDustups.additionalWaterDustup, rollNorthDustup = orLoadByName_Orig.dungeonDustups.rollNorthDustup, rollNorthEastDustup = orLoadByName_Orig.dungeonDustups.rollNorthEastDustup, rollEastDustup = orLoadByName_Orig.dungeonDustups.rollEastDustup, rollSouthEastDustup = orLoadByName_Orig.dungeonDustups.rollSouthEastDustup, rollSouthDustup = orLoadByName_Orig.dungeonDustups.rollSouthDustup, rollSouthWestDustup = orLoadByName_Orig.dungeonDustups.rollSouthWestDustup, rollWestDustup = orLoadByName_Orig.dungeonDustups.rollWestDustup, rollNorthWestDustup = orLoadByName_Orig.dungeonDustups.rollNorthWestDustup, rollLandDustup = orLoadByName_Orig.dungeonDustups.rollLandDustup }; dungeon.PatternSettings = new SemioticDungeonGenSettings { flows = new List { CustomFlow.Default_Flow }, mandatoryExtraRooms = new List(0), optionalExtraRooms = new List(0), MAX_GENERATION_ATTEMPTS = 5, DEBUG_RENDER_CANVASES_SEPARATELY = false }; dungeon.damageTypeEffectMatrix = orLoadByName_Orig.damageTypeEffectMatrix; dungeon.stampData = DungeonStampDataSetup.FloorStampData; dungeon.UsesCustomFloorIdea = false; RobotDaveIdea val3 = new RobotDaveIdea(); val3.ValidEasyEnemyPlaceables = (DungeonPlaceable[])(object)new DungeonPlaceable[0]; val3.ValidHardEnemyPlaceables = (DungeonPlaceable[])(object)new DungeonPlaceable[0]; val3.UseWallSawblades = false; val3.UseRollingLogsVertical = true; val3.UseRollingLogsHorizontal = true; val3.UseFloorPitTraps = false; val3.UseFloorFlameTraps = true; val3.UseFloorSpikeTraps = true; val3.UseFloorConveyorBelts = true; val3.UseCaveIns = true; val3.UseAlarmMushrooms = false; val3.UseChandeliers = true; val3.UseMineCarts = false; val3.CanIncludePits = false; dungeon.FloorIdea = val3; dungeon.StripPlayerOnArrival = true; dungeon.musicEventName = orLoadByName.musicEventName; orLoadByName_Orig = null; orLoadByName = null; ((Component)dungeon).gameObject.AddComponent(); return dungeon; } public static Dungeon GetOrLoadByName_Orig(string name) { AssetBundle val = ResourceManager.LoadAssetBundle("dungeons/" + name.ToLower()); DebugTime.RecordStartTime(); Dungeon component = val.LoadAsset(name).GetComponent(); DebugTime.Log("AssetBundle.LoadAsset({0})", new object[1] { name }); return component; } } public class DungeonFlowHelper { public static List KnownFlows; public static DungeonFlow Foyer_Flow; public static SharedInjectionData BaseSharedInjectionData; public static SharedInjectionData GungeonInjectionData; public static SharedInjectionData SewersInjectionData; public static SharedInjectionData HollowsInjectionData; public static SharedInjectionData CastleInjectionData; public static ProceduralFlowModifierData SecretFloorNameEntranceInjector; public static DungeonFlowSubtypeRestriction BaseSubTypeRestrictions = new DungeonFlowSubtypeRestriction { baseCategoryRestriction = (RoomCategory)2, normalSubcategoryRestriction = (RoomNormalSubCategory)1, bossSubcategoryRestriction = (RoomBossSubCategory)0, specialSubcategoryRestriction = (RoomSpecialSubCategory)0, secretSubcategoryRestriction = (RoomSecretSubCategory)0, maximumRoomsOfSubtype = 1 }; public static GenericRoomTable m_KeepEntranceRooms; public static DungeonFlowNode GenerateDefaultNode(DungeonFlow targetflow, RoomCategory roomType, PrototypeDungeonRoom overrideRoom = null, GenericRoomTable overrideTable = null, bool oneWayLoopTarget = false, bool isWarpWingNode = false, string nodeGUID = null, NodePriority priority = 0, float percentChance = 1f, bool handlesOwnWarping = true) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00da: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown try { if (string.IsNullOrEmpty(nodeGUID)) { nodeGUID = Guid.NewGuid().ToString(); } return new DungeonFlowNode(targetflow) { isSubchainStandin = false, nodeType = (ControlNodeType)0, roomCategory = roomType, percentChance = percentChance, priority = priority, overrideExactRoom = overrideRoom, overrideRoomTable = overrideTable, capSubchain = false, subchainIdentifier = string.Empty, limitedCopiesOfSubchain = false, maxCopiesOfSubchain = 1, subchainIdentifiers = new List(0), receivesCaps = false, isWarpWingEntrance = isWarpWingNode, handlesOwnWarping = handlesOwnWarping, forcedDoorType = (ForcedDoorType)0, loopForcedDoorType = (ForcedDoorType)0, nodeExpands = false, initialChainPrototype = "n", chainRules = new List(0), minChainLength = 3, maxChainLength = 8, minChildrenToBuild = 1, maxChildrenToBuild = 1, canBuildDuplicateChildren = false, guidAsString = nodeGUID, parentNodeGuid = string.Empty, childNodeGuids = new List(0), loopTargetNodeGuid = string.Empty, loopTargetIsOneWay = oneWayLoopTarget, flow = targetflow }; } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); return null; } } public static List RetrieveSharedInjectionDataListFromCurrentFloor() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Invalid comparison between Unknown and I4 //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Invalid comparison between Unknown and I4 //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Invalid comparison between Unknown and I4 //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Invalid comparison between Unknown and I4 //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Invalid comparison between Unknown and I4 Dungeon val = GameManager.Instance.CurrentlyGeneratingDungeonPrefab; if ((Object)(object)val == (Object)null) { val = GameManager.Instance.Dungeon; if ((Object)(object)val == (Object)null) { return new List(0); } } if (((int)val.tileIndices.tilesetId == 64) | ((int)val.tileIndices.tilesetId == 1024) | ((int)val.tileIndices.tilesetId == 16384) | ((int)val.tileIndices.tilesetId == 128) | ((int)val.tileIndices.tilesetId == 2048) | ((int)val.tileIndices.tilesetId == 32768)) { return new List(0); } List result = new List(0); if (val.PatternSettings != null && val.PatternSettings.flows != null && val.PatternSettings.flows.Count > 0 && val.PatternSettings.flows[0].sharedInjectionData != null && val.PatternSettings.flows[0].sharedInjectionData.Count > 0) { result = val.PatternSettings.flows[0].sharedInjectionData; } return result; } } internal class CustomFlow : DungeonFlowHelper { public static DungeonFlow Default_Flow; public static void GenerateFlows() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) try { DungeonFlowHelper.BaseSharedInjectionData = ResourceManager.LoadAssetBundle("shared_auto_002").LoadAsset("Base Shared Injection Data"); Dungeon orLoadByName_Orig = PastDungeon.GetOrLoadByName_Orig("Base_Mines"); DungeonFlow val = ScriptableObject.CreateInstance(); DungeonFlowNode val2 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)7, FloorRoomInitialisation.StartRoom, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val.AddNodeToFlow(val2, (DungeonFlowNode)null); val.FirstNode = val2; val.FirstNode = val2; val2.isWarpWingEntrance = true; val2.handlesOwnWarping = true; val2.maxCopiesOfSubchain = 1; val2.guidAsString = "ASS"; val2.capSubchain = true; val2.priority = (NodePriority)0; val2.childNodeGuids = new List { "BOOBS" }; DungeonFlowNode val3 = DungeonFlowHelper.GenerateDefaultNode(val, (RoomCategory)2, FloorRoomInitialisation.FirstRoom, null, oneWayLoopTarget: false, isWarpWingNode: false, null, (NodePriority)0); val3.chainRules = new List(); val3.guidAsString = "BOOBS"; val3.isWarpWingEntrance = true; val3.handlesOwnWarping = true; val3.maxCopiesOfSubchain = 1; val3.priority = (NodePriority)0; val3.subchainIdentifiers = new List(); val3.parentNodeGuid = "ASS"; val3.capSubchain = false; val3.childNodeGuids = new List(); val.AddNodeToFlow(val3, val2); ((Object)val).name = "sadadsad"; val.fallbackRoomTable = orLoadByName_Orig.PatternSettings.flows[0].fallbackRoomTable; val.phantomRoomTable = null; val.subtypeRestrictions = new List(0); val.flowInjectionData = new List(0); val.sharedInjectionData = new List(); Default_Flow = val; orLoadByName_Orig = null; } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); } } } public class FloorRoomInitialisation { public static PrototypeDungeonRoom StartRoom; public static PrototypeDungeonRoom FirstRoom; public static PrototypeDungeonRoom BossRoom; public static void InitCustomRooms() { //IL_0007: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) StartRoom = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/ships_co.room", (Assembly)null).room; StartRoom.customAmbientLight = new Color(0.3f, 0.3f, 0.3f, 1f); StartRoom.usesCustomAmbientLight = true; StartRoom.overrideRoomVisualType = 1; FirstRoom = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/MegaRoom.room", (Assembly)null).room; FirstRoom.overrideRoomVisualType = 2; FirstRoom.customAmbientLight = new Color(0.7f, 0.7f, 0.7f, 1f); FirstRoom.usesCustomAmbientLight = true; BossRoom = RoomFactory.BuildFromResource("ModularMod/Past/Rooms/past_boss_room.room", (Assembly)null).room; BossRoom.overrideRoomVisualType = 2; } } public static class TilesetToolbox { public enum TileType { WallTop, WallBottom } public static tk2dSpriteCollectionData ReplaceDungeonCollection(tk2dSpriteCollectionData sourceCollection, Texture2D spriteSheet = null, List spriteList = null) { //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown if ((Object)(object)sourceCollection == (Object)null) { return null; } tk2dSpriteCollectionData val = Object.Instantiate(sourceCollection); tk2dSpriteDefinition[] array = (tk2dSpriteDefinition[])(object)new tk2dSpriteDefinition[val.spriteDefinitions.Length]; for (int i = 0; i < val.spriteDefinitions.Length; i++) { array[i] = val.spriteDefinitions[i].Copy(); } val.spriteDefinitions = array; if ((Object)(object)spriteSheet != (Object)null) { Material[] materials = sourceCollection.materials; Material[] array2 = (Material[])(object)new Material[materials.Length]; if (materials != null) { for (int j = 0; j < materials.Length; j++) { array2[j] = materials[j].Copy(spriteSheet); } val.materials = array2; Material[] materials2 = val.materials; foreach (Material val2 in materials2) { tk2dSpriteDefinition[] spriteDefinitions = val.spriteDefinitions; foreach (tk2dSpriteDefinition val3 in spriteDefinitions) { if ((Object)(object)val2 != (Object)null && ((Object)val3.material).name.Equals(((Object)val2).name)) { val3.material = val2; val3.materialInst = new Material(val2); } } } } } else if (spriteList != null) { RuntimeAtlasPage val4 = new RuntimeAtlasPage(0, 0, (TextureFormat)4, 2); for (int m = 0; m < spriteList.Count; m++) { Texture2D textureFromResource = ResourceExtractor.GetTextureFromResource(spriteList[m], (Assembly)null); if (!Object.op_Implicit((Object)(object)textureFromResource)) { Debug.Log((object)("[BuildDungeonCollection] Null Texture found at index: " + m)); continue; } float num = (float)((Texture)textureFromResource).width / 16f; float num2 = (float)((Texture)textureFromResource).height / 16f; tk2dSpriteDefinition val5 = val.spriteDefinitions[m]; if (val5 != null) { if (val5.boundsDataCenter != Vector3.zero) { try { RuntimeAtlasSegment val6 = val4.Pack(textureFromResource, false); val5.materialInst.mainTexture = (Texture)(object)val6.texture; val5.uvs = val6.uvs; val5.extractRegion = true; val5.position0 = Vector3.zero; val5.position1 = new Vector3(num, 0f, 0f); val5.position2 = new Vector3(0f, num2, 0f); val5.position3 = new Vector3(num, num2, 0f); val5.boundsDataCenter = Vector2.op_Implicit(new Vector2(num / 2f, num2 / 2f)); val5.untrimmedBoundsDataCenter = val5.boundsDataCenter; val5.boundsDataExtents = Vector2.op_Implicit(new Vector2(num, num2)); val5.untrimmedBoundsDataExtents = val5.boundsDataExtents; } catch (Exception) { Debug.Log((object)("[BuildDungeonCollection] Exception caught at index: " + m)); } } else { try { ETGMod.ReplaceTexture(val5, textureFromResource, true); } catch (Exception) { Debug.Log((object)("[BuildDungeonCollection] Exception caught at index: " + m)); } } } else { Debug.Log((object)("[BuildDungeonCollection] SpriteData is null at index: " + m)); } } val4.Apply(); } else { Debug.Log((object)"[BuildDungeonCollection] SpriteList is null!"); } return val; } public static Material Copy(this Material orig, Texture2D textureOverride = null, Shader shaderOverride = null) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0040: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown Material val = new Material(orig.shader) { name = ((Object)orig).name, shaderKeywords = orig.shaderKeywords, globalIlluminationFlags = orig.globalIlluminationFlags, enableInstancing = orig.enableInstancing, doubleSidedGI = orig.doubleSidedGI, mainTextureOffset = orig.mainTextureOffset, mainTextureScale = orig.mainTextureScale, renderQueue = orig.renderQueue, color = orig.color, hideFlags = ((Object)orig).hideFlags }; if ((Object)(object)textureOverride != (Object)null) { val.mainTexture = (Texture)(object)textureOverride; } else { val.mainTexture = orig.mainTexture; } if ((Object)(object)shaderOverride != (Object)null) { val.shader = shaderOverride; } else { val.shader = orig.shader; } return val; } public static tk2dSpriteDefinition Copy(this tk2dSpriteDefinition orig) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown tk2dSpriteDefinition val = new tk2dSpriteDefinition(); val.boundsDataCenter = orig.boundsDataCenter; val.boundsDataExtents = orig.boundsDataExtents; val.colliderConvex = orig.colliderConvex; val.colliderSmoothSphereCollisions = orig.colliderSmoothSphereCollisions; val.colliderType = orig.colliderType; val.colliderVertices = orig.colliderVertices; val.collisionLayer = orig.collisionLayer; val.complexGeometry = orig.complexGeometry; val.extractRegion = orig.extractRegion; val.flipped = orig.flipped; val.indices = orig.indices; if ((Object)(object)orig.material != (Object)null) { val.material = new Material(orig.material); } val.materialId = orig.materialId; if ((Object)(object)orig.materialInst != (Object)null) { val.materialInst = new Material(orig.materialInst); } val.metadata = orig.metadata; val.name = orig.name; val.normals = orig.normals; val.physicsEngine = orig.physicsEngine; val.position0 = orig.position0; val.position1 = orig.position1; val.position2 = orig.position2; val.position3 = orig.position3; val.regionH = orig.regionH; val.regionW = orig.regionW; val.regionX = orig.regionX; val.regionY = orig.regionY; val.tangents = orig.tangents; val.texelSize = orig.texelSize; val.untrimmedBoundsDataCenter = orig.untrimmedBoundsDataCenter; val.untrimmedBoundsDataExtents = orig.untrimmedBoundsDataExtents; val.uvs = orig.uvs; return val; } public static void SetupFloorSquare(ref DungeonMaterial material, TileIndexGrid[] tileGrid, float density = 0.2f) { material.floorSquares = tileGrid; material.floorSquareDensity = density; } public static void SetWallCollistion(this tk2dSpriteDefinition def, TileType type) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) def.colliderType = (ColliderType)2; switch (type) { case TileType.WallTop: def.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f), new Vector3(0.5f, 0.5f, 0.1f) }; def.collisionLayer = (CollisionLayer)6; break; case TileType.WallBottom: def.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(0.5f, 0.5f), new Vector3(0.5f, 0.5f, 0.1f) }; def.collisionLayer = (CollisionLayer)5; break; } } public static FacewallIndexGridDefinition CreateBlankFacewallIndexGridDefinitionIndexGrid(TileIndexGrid gridToUse) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) FacewallIndexGridDefinition val = new FacewallIndexGridDefinition(); val.canAcceptFloorDecoration = true; val.canAcceptWallDecoration = true; val.canBePlacedInExits = true; val.canExistInCorners = true; val.forcedStampMatchingStyle = (IntermediaryMatchingStyle)0; val.grid = gridToUse; val.hasIntermediaries = false; val.maxIntermediaryBuffer = 1; val.maxIntermediaryLength = 1; val.maxWidth = 100; val.middleSectionSequential = true; val.minIntermediaryBuffer = 100; val.minIntermediaryLength = 100; val.minWidth = 100; val.perTileFailureRate = 0f; val.topsMatchBottoms = false; return val; } public static TileIndexGrid CreateBlankIndexGrid() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0203: 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_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown TileIndexGrid val = ScriptableObject.CreateInstance(); TileIndexList val2 = (val.bottomRightNubIndices = (val.bottomLeftNubIndices = (val.topRightNubIndices = (val.topLeftNubIndices = (val.allSidesIndices = (val.leftCapIndices = (val.bottomCapIndices = (val.rightCapIndices = (val.topCapIndices = (val.verticalIndices = (val.horizontalIndices = (val.bottomRightIndices = (val.bottomIndices = (val.bottomLeftIndices = (val.rightIndices = (val.centerIndices = (val.leftIndices = (val.topRightIndices = (val.topIndices = (val.topLeftIndices = new TileIndexList { indexWeights = new List { 0.1f }, indices = new List { -1 } })))))))))))))))))))); val.extendedSet = false; val.topCenterLeftIndices = val2; val.topCenterIndices = val2; val.topCenterRightIndices = val2; val.thirdTopRowLeftIndices = val2; val.thirdTopRowCenterIndices = val2; val.thirdTopRowRightIndices = val2; val.internalBottomLeftCenterIndices = val2; val.internalBottomCenterIndices = val2; val.internalBottomRightCenterIndices = val2; val.borderTopNubLeftIndices = val2; val.borderTopNubRightIndices = val2; val.borderTopNubBothIndices = val2; val.borderRightNubTopIndices = val2; val.borderRightNubBottomIndices = val2; val.borderRightNubBothIndices = val2; val.borderBottomNubLeftIndices = val2; val.borderBottomNubRightIndices = val2; val.borderBottomNubBothIndices = val2; val.borderLeftNubTopIndices = val2; val.borderLeftNubBottomIndices = val2; val.borderLeftNubBothIndices = val2; val.diagonalNubsTopLeftBottomRight = val2; val.diagonalNubsTopRightBottomLeft = val2; val.doubleNubsTop = val2; val.doubleNubsRight = val2; val.doubleNubsBottom = val2; val.doubleNubsLeft = val2; val.quadNubs = val2; val.topRightWithNub = val2; val.topLeftWithNub = val2; val.bottomRightWithNub = val2; val.bottomLeftWithNub = val2; val.diagonalBorderNE = val2; val.diagonalBorderSE = val2; val.diagonalBorderSW = val2; val.diagonalBorderNW = val2; val.diagonalCeilingNE = val2; val.diagonalCeilingSE = val2; val.diagonalCeilingSW = val2; val.diagonalCeilingNW = val2; val.CenterCheckerboard = false; val.CheckerboardDimension = 1; val.CenterIndicesAreStrata = false; val.PitInternalSquareGrids = new List(); val.PitInternalSquareOptions = new PitSquarePlacementOptions { CanBeFlushBottom = false, CanBeFlushLeft = false, CanBeFlushRight = false, PitSquareChance = -1f }; val.PitBorderIsInternal = false; val.PitBorderOverridesFloorTile = false; val.CeilingBorderUsesDistancedCenters = false; val.UsesRatChunkBorders = false; val.RatChunkNormalSet = val2; val.RatChunkBottomSet = val2; val.PathFacewallStamp = null; val.PathSidewallStamp = null; val.PathPitPosts = val2; val.PathPitPostsBL = val2; val.PathPitPostsBR = val2; val.PathStubNorth = null; val.PathStubEast = null; val.PathStubSouth = null; val.PathStubWest = null; return val; } public static void SetupTilesetSpriteDef(this tk2dSpriteDefinition def, bool wall = false, bool lower = false) { //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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) try { def.boundsDataCenter = new Vector3(0.5f, 0.5f, 0f); def.boundsDataExtents = new Vector3(1f, 1f, 0f); def.untrimmedBoundsDataCenter = new Vector3(0.5f, 0.5f, 0f); def.untrimmedBoundsDataExtents = new Vector3(1f, 1f, 0f); def.texelSize = new Vector2(0.625f, 0.625f); def.position0 = new Vector3(0f, 0f, 0f); def.position1 = new Vector3(1f, 0f, 0f); def.position2 = new Vector3(0f, 1f, 0f); def.position3 = new Vector3(1f, 1f, 0f); def.regionH = 16; def.regionW = 16; if (wall) { def.colliderType = (ColliderType)2; def.collisionLayer = (CollisionLayer)(lower ? 5 : 6); def.colliderVertices = (Vector3[])(object)new Vector3[8] { new Vector3(0f, 1f, -1f), new Vector3(0f, 1f, 1f), new Vector3(0f, 0f, -1f), new Vector3(0f, 0f, 1f), new Vector3(1f, 0f, -1f), new Vector3(1f, 0f, 1f), new Vector3(1f, 1f, -1f), new Vector3(1f, 1f, 1f) }; } } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); } } public static void SetupTilesetSpriteDefForceCollision(this tk2dSpriteDefinition def, Vector3[] vector3s, ColliderType type = 1, CollisionLayer collisionLayer = 6, bool ForceDefaultvertices = false) { //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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) try { def.boundsDataCenter = new Vector3(0.5f, 0.5f, 0f); def.boundsDataExtents = new Vector3(1f, 1f, 0f); def.untrimmedBoundsDataCenter = new Vector3(0.5f, 0.5f, 0f); def.untrimmedBoundsDataExtents = new Vector3(1f, 1f, 0f); def.texelSize = new Vector2(0.625f, 0.625f); def.position0 = new Vector3(0f, 0f, 0f); def.position1 = new Vector3(1f, 0f, 0f); def.position2 = new Vector3(0f, 1f, 0f); def.position3 = new Vector3(1f, 1f, 0f); def.regionH = 16; def.regionW = 16; def.colliderType = type; def.collisionLayer = collisionLayer; if (ForceDefaultvertices) { def.colliderVertices = (Vector3[])(object)new Vector3[8] { new Vector3(0f, 1f, -1f), new Vector3(0f, 1f, 1f), new Vector3(0f, 0f, -1f), new Vector3(0f, 0f, 1f), new Vector3(1f, 0f, -1f), new Vector3(1f, 0f, 1f), new Vector3(1f, 1f, -1f), new Vector3(1f, 1f, 1f) }; } else if (vector3s == null) { def.colliderVertices = (Vector3[])(object)new Vector3[0]; } else { def.colliderVertices = vector3s; } } catch (Exception ex) { ETGModConsole.Log((object)ex.ToString(), false); } } public static void SetMaterial(this tk2dSpriteCollectionData collection, int spriteId, int matNum, bool textureChange = false) { if (textureChange) { collection.materials[matNum].mainTexture = collection.spriteDefinitions[spriteId].material.mainTexture; } collection.spriteDefinitions[spriteId].material = collection.materials[matNum]; collection.spriteDefinitions[spriteId].materialId = matNum; } public static void SetupTileMetaData(this TilesetIndexMetadata metadata, TilesetFlagType type, float weight = 1f, int dungeonRoomSubType = 0, int dungeonRoomSubType2 = -1, int dungeonRoomSubType3 = -1, bool animated = false, bool preventStamps = true) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) metadata.type = type; metadata.weight = weight; metadata.dungeonRoomSubType = dungeonRoomSubType; metadata.secondRoomSubType = dungeonRoomSubType2; metadata.thirdRoomSubType = dungeonRoomSubType3; metadata.usesAnimSequence = animated; metadata.usesNeighborDependencies = false; metadata.preventWallStamping = preventStamps; metadata.usesPerTileVFX = false; metadata.tileVFXPlaystyle = (VFXPlaystyle)0; metadata.tileVFXChance = 0f; metadata.tileVFXPrefab = null; metadata.tileVFXOffset = Vector2.zero; metadata.tileVFXDelayTime = 1f; metadata.tileVFXDelayVariance = 0f; metadata.tileVFXAnimFrame = 0; } public static void LogPropertiesAndFields(this T obj, string header = "", bool debug = false) { Debug.Log((object)header); Debug.Log((object)"======================="); if (obj == null) { Debug.Log((object)"LogPropertiesAndFields: Null object"); return; } Type type = obj.GetType(); Debug.Log((object)$"Type: {type}"); PropertyInfo[] properties = type.GetProperties(); Debug.Log((object)$"{typeof(T)} Properties: "); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { try { object value = propertyInfo.GetValue(obj, null); string text = value.ToString(); if ((object)obj?.GetType().GetGenericTypeDefinition() == typeof(List<>)) { List list = value as List; text = $"List[{list.Count}]"; foreach (object item in list) { text = text + "\n\t\t" + item.ToString(); } } Debug.Log((object)("\t" + propertyInfo.Name + ": " + text)); } catch { } } Debug.Log((object)$"{typeof(T)} Fields: "); FieldInfo[] fields = type.GetFields(); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo in array2) { object value2 = fieldInfo.GetValue(obj); if (value2 == null) { continue; } bool flag = value2.ToString() == "TileIndexList"; string text2 = value2.ToString(); if (flag) { TileIndexList val = (TileIndexList)((value2 is TileIndexList) ? value2 : null); text2 = "List["; foreach (int index in val.indices) { text2 = text2 + "\t\t" + index; } } Debug.Log((object)("\t" + fieldInfo.Name + ": " + text2 + "]")); } } } public class MaintainDamageOnPierce : MonoBehaviour { public Action OnPierce; public float AmountOfPiercesBeforeFalloff; public float damageMultOnPierce; private Projectile m_projectile; public MaintainDamageOnPierce() { damageMultOnPierce = 1f; AmountOfPiercesBeforeFalloff = -1f; } public void Start() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown m_projectile = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)m_projectile)) { SpeculativeRigidbody specRigidbody = ((BraveBehaviour)m_projectile).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(HandlePierce)); } } private void HandlePierce(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { if (AmountOfPiercesBeforeFalloff != 0f) { AmountOfPiercesBeforeFalloff -= 1f; FieldInfo field = typeof(Projectile).GetField("m_hasPierced", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(((BraveBehaviour)myRigidbody).projectile, false); if (OnPierce != null) { OnPierce(m_projectile, otherRigidbody); } if (Object.op_Implicit((Object)(object)myRigidbody)) { ((MonoBehaviour)myRigidbody).StartCoroutine(FrameDelay()); } } } public IEnumerator FrameDelay() { yield return null; if (!((Object)(object)m_projectile == (Object)null)) { ProjectileData baseData = ((BraveBehaviour)m_projectile).projectile.baseData; baseData.damage *= damageMultOnPierce; } } } public class DebuffStatics { public static GameActorFireEffect hotLeadEffect = ((Component)PickupObjectDatabase.GetById(295)).GetComponent().FireModifierEffect; public static GameActorFireEffect greenFireEffect = ((Component)PickupObjectDatabase.GetById(706)).GetComponent().DefaultModule.projectiles[0].fireEffect; public static GameActorFreezeEffect frostBulletsEffect = ((Component)PickupObjectDatabase.GetById(278)).GetComponent().FreezeModifierEffect; public static GameActorFreezeEffect chaosBulletsFreeze = ((Component)PickupObjectDatabase.GetById(569)).GetComponent().FreezeModifierEffect; public static GameActorHealthEffect irradiatedLeadEffect = ((Component)PickupObjectDatabase.GetById(204)).GetComponent().HealthModifierEffect; public static GameActorCharmEffect charmingRoundsEffect = ((Component)PickupObjectDatabase.GetById(527)).GetComponent().CharmModifierEffect; public static GameActorCheeseEffect cheeseeffect; public static GameActorSpeedEffect tripleCrossbowSlowEffect; public static List BlacklistedEffects; static DebuffStatics() { PickupObject byId = PickupObjectDatabase.GetById(626); cheeseeffect = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].cheeseEffect; PickupObject byId2 = PickupObjectDatabase.GetById(381); tripleCrossbowSlowEffect = ((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0].speedEffect; BlacklistedEffects = new List { "jamBuff", "leadBuff", "blob", "web", "Infection", "InfectionBoss", "BrainHost", "broken Armor" }; } } internal class StaticExplosionDatas { public static ExplosionData explosiveRoundsExplosion = ((Component)Game.Items["explosive_rounds"]).GetComponent().ExplosionData; public static ExplosionData genericSmallExplosion = GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultSmallExplosionData; public static ExplosionData genericLargeExplosion = GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultExplosionData; public static ExplosionData customDynamiteExplosion = new ExplosionData { effect = genericLargeExplosion.effect, ignoreList = genericLargeExplosion.ignoreList, ss = genericLargeExplosion.ss, damageRadius = 5f, damageToPlayer = 0f, doDamage = true, damage = 45f, doDestroyProjectiles = true, doForce = true, debrisForce = 30f, preventPlayerForce = true, explosionDelay = 0.1f, usesComprehensiveDelay = false, doScreenShake = true, playDefaultSFX = true }; public static ExplosionData nigNukeExplosion; public static ExplosionData CopyFields(ExplosionData explosionToCopy) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown ExplosionData val = new ExplosionData(); val.CopyFrom(explosionToCopy); return val; } static StaticExplosionDatas() { //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_0065: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown PickupObject byId = PickupObjectDatabase.GetById(443); nigNukeExplosion = ((TargetedAttackPlayerItem)((byId is TargetedAttackPlayerItem) ? byId : null)).strikeExplosionData; } } public static class StaticCollections { public static tk2dSpriteCollectionData Module_T1_Collection; public static tk2dSpriteCollectionData Module_T2_Collection; public static tk2dSpriteCollectionData Module_T3_Collection; public static tk2dSpriteCollectionData Module_T4_Collection; public static tk2dSpriteCollectionData Module_Unique_Collection; public static tk2dSpriteCollectionData Item_Collection; public static tk2dSpriteCollectionData UI_Collection; public static tk2dSpriteCollectionData Gun_Collection; public static tk2dSpriteAnimation Gun_Animation; public static tk2dSpriteCollectionData Projectile_Collection; public static tk2dSpriteAnimation Projectile_Animation; public static tk2dSpriteCollectionData Beam_Collection; public static tk2dSpriteAnimation Beam_Animation; public static tk2dSpriteCollectionData VFX_Collection; public static tk2dSpriteCollectionData Crate_Collection; public static tk2dSpriteAnimation Crate_Animation; public static tk2dSpriteCollectionData Past_Decorative_Object_Collection; public static tk2dSpriteCollectionData Enemy_Collection; public static tk2dSpriteCollectionData Boss_Collection; public static tk2dSpriteCollectionData Modular_Character_Collection; public static tk2dSpriteCollectionData Modular_Character_Alt_Collection; public static dfAtlas Clip_Ammo_Atlas; public static dfFontBase ModularFont; public static dfAtlas ModularUIAtlas; public static dfAtlas AmmonomiconUIAtlas; public static tk2dSpriteAnimation Generic_VFX_Animation; public static void InitialiseCollections() { Module_T1_Collection = DoFastSetup(Module.ModularAssetBundle, "Tier_1_Module_Collection", "t1_module material.mat"); ModularFont = (dfFontBase)(object)Module.ModularAssetBundle.LoadAsset("ShootPeopUltra-16").GetComponent(); Clip_Ammo_Atlas = Module.ModularAssetBundle.LoadAsset("ModularGunClip_Atlas").GetComponent(); GameObject val = Module.ModularAssetBundle.LoadAsset("ModularUIAtlas"); Object.DontDestroyOnLoad((Object)(object)val); ModularUIAtlas = val.GetComponent(); if ((Object)(object)Module_T1_Collection == (Object)null) { ETGModConsole.Log((object)"Module_T1_Collection is NULL", false); } Module_T2_Collection = DoFastSetup(Module.ModularAssetBundle, "Tier_2_Module_Collection", "t2_module material.mat"); if ((Object)(object)Module_T2_Collection == (Object)null) { ETGModConsole.Log((object)"Module_T2_Collection is NULL", false); } Module_T3_Collection = DoFastSetup(Module.ModularAssetBundle, "Module_T3_Collection", "t3_module material.mat"); if ((Object)(object)Module_T3_Collection == (Object)null) { ETGModConsole.Log((object)"Module_T3_Collection is NULL", false); } Module_T4_Collection = DoFastSetup(Module.ModularAssetBundle, "ModuleTier4Collection", "modulrt4 material.mat"); if ((Object)(object)Module_T4_Collection == (Object)null) { ETGModConsole.Log((object)"Module_T4_Collection is NULL", false); } Module_Unique_Collection = DoFastSetup(Module.ModularAssetBundle, "UniqueModuleCollection", "unique module material.mat"); if ((Object)(object)Module_Unique_Collection == (Object)null) { ETGModConsole.Log((object)"Module_Unique_Collection is NULL", false); } Item_Collection = DoFastSetup(Module.ModularAssetBundle, "ModuleItemCollection", "moduleitem material.mat"); if ((Object)(object)Item_Collection == (Object)null) { ETGModConsole.Log((object)"Item_Collection is NULL", false); } Beam_Collection = DoFastSetup(Module.ModularAssetBundle, "ModularBeamCollection", "beam material.mat"); if ((Object)(object)Beam_Collection == (Object)null) { ETGModConsole.Log((object)"Beam_Collection is NULL", false); } Beam_Animation = Module.ModularAssetBundle.LoadAsset("ModularBeamAnimation").GetComponent(); Gun_Collection = DoFastSetup(Module.ModularAssetBundle, "ModularGunCollection", "modulargun material.mat"); if ((Object)(object)Gun_Collection == (Object)null) { ETGModConsole.Log((object)"Gun_Collection is NULL", false); } Gun_Animation = Module.ModularAssetBundle.LoadAsset("ModularGunAnimation").GetComponent(); GunJsonEmbedder.EmbedJsonDataFromAssembly(Assembly.GetExecutingAssembly(), Gun_Collection, "ModularMod/Pain/GunJsons"); Projectile_Collection = DoFastSetup(Module.ModularAssetBundle, "ModularProjectileCollection", "modularprojectile material.mat"); if ((Object)(object)Projectile_Collection == (Object)null) { ETGModConsole.Log((object)"Projectile_Collection is NULL", false); } Projectile_Animation = Module.ModularAssetBundle.LoadAsset("ModularProjectileAnimation").GetComponent(); Crate_Collection = DoFastSetup(Module.ModularAssetBundle, "CrateCollection", "crate material.mat"); if ((Object)(object)Crate_Collection == (Object)null) { ETGModConsole.Log((object)"Crate_Collection is NULL", false); } Crate_Animation = Module.ModularAssetBundle.LoadAsset("CrateAnimation").GetComponent(); Past_Decorative_Object_Collection = DoFastSetup(Module.ModularAssetBundle, "PastDecorCollection", "decor material.mat"); if ((Object)(object)Past_Decorative_Object_Collection == (Object)null) { ETGModConsole.Log((object)"Past_Decorative_Object_Collection is NULL", false); } Enemy_Collection = DoFastSetup(Module.ModularAssetBundle, "ModularEnemyCollection", "mdlrenemy material.mat"); if ((Object)(object)Enemy_Collection == (Object)null) { ETGModConsole.Log((object)"Enemy_Collection is NULL", false); } Boss_Collection = DoFastSetup(Module.ModularAssetBundle, "ModularBossCollection", "modularboss material.mat"); if ((Object)(object)Boss_Collection == (Object)null) { ETGModConsole.Log((object)"Boss_Collection is NULL", false); } Modular_Character_Alt_Collection = DoFastSetup(Module.ModularAssetBundle, "Modular_Alt_Collection", "modular_alt material.mat"); if ((Object)(object)Modular_Character_Alt_Collection == (Object)null) { ETGModConsole.Log((object)"Modular_Character_Alt_Collection is NULL", false); } Modular_Character_Collection = DoFastSetup(Module.ModularAssetBundle, "Modular_Collection", "modular material.mat"); if ((Object)(object)Modular_Character_Collection == (Object)null) { ETGModConsole.Log((object)"Modular_Character_Collection is NULL", false); } VFX_Collection = DoFastSetup(Module.ModularAssetBundle, "ModularVFXCollection", "modular_vfx material.mat"); if ((Object)(object)VFX_Collection == (Object)null) { ETGModConsole.Log((object)"VFX_Collection is NULL", false); } Generic_VFX_Animation = Module.ModularAssetBundle.LoadAsset("GenericVFXAnimation").GetComponent(); GameObject val2 = Module.ModularAssetBundle.LoadAsset("Ammonomicon"); Object.DontDestroyOnLoad((Object)(object)val2); AmmonomiconUIAtlas = val2.GetComponent(); AmmonomiconUIAtlas.Material = Module.ModularAssetBundle.LoadAsset("AmmonomiconMat"); } public static tk2dSpriteCollectionData DoFastSetup(AssetBundle bundle, string CollectionName, string MaterialName) { tk2dSpriteCollectionData component = bundle.LoadAsset(CollectionName).GetComponent(); Material val = bundle.LoadAsset(MaterialName); Texture texture = val.GetTexture("_MainTex"); texture.filterMode = (FilterMode)0; val.SetTexture("_MainTex", texture); component.material = val; component.materials = (Material[])(object)new Material[1] { val }; component.materialInsts = (Material[])(object)new Material[1] { val }; tk2dSpriteDefinition[] spriteDefinitions = component.spriteDefinitions; foreach (tk2dSpriteDefinition val2 in spriteDefinitions) { val2.material = component.materials[0]; val2.materialInst = component.materials[0]; val2.materialId = 0; } return component; } } public class Flowder : PlayerItem { public static void Init() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) string text = "Flowder"; string text2 = "ModularMod/Sprites/Items/Item/modularprintercore.png"; GameObject val = new GameObject(text); Flowder flowder = val.AddComponent(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = "Flows Loads"; string text4 = "Loads a specifie debug flow"; ItemBuilder.SetupItem((PickupObject)(object)flowder, text3, text4, "mdl"); ItemBuilder.SetCooldownType((PlayerItem)(object)flowder, (CooldownType)0, 1f); ((PlayerItem)flowder).consumable = false; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)flowder, (StatType)8, 1f, (ModifyMethod)0); ((PickupObject)flowder).quality = (ItemQuality)(-100); } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); } public override void DoEffect(PlayerController user) { if ((Object)(object)base.LastOwner.PlayerHasCore() != (Object)null) { DefaultModule module = GlobalModuleStorage.ReturnRandomModule(); ModulePrinterCore.ModuleContainer moduleContainer = base.LastOwner.PlayerHasCore().GiveTemporaryModule(module, "Randomweisser", 1); moduleContainer = base.LastOwner.PlayerHasCore().GiveTemporaryModule(module, "Randomweisser", 2); ((MonoBehaviour)GameManager.Instance).StartCoroutine(Delay(moduleContainer.defaultModule, "Randomweisser")); } } public IEnumerator Delay(DefaultModule mod, string context) { yield return (object)new WaitForSeconds(6f); if ((Object)(object)base.LastOwner.PlayerHasCore() != (Object)null) { base.LastOwner.PlayerHasCore().RemoveTemporaryModules("Randomweisser"); } } } internal class AssetBundleLoader { public static AssetBundle LoadAssetBundleFromLiterallyAnywhere(string name, bool logs = false) { AssetBundle result = null; string text = name + GetPlatformBundleExtension(); if (File.Exists(Module.FilePathFolder + "/" + text)) { try { result = AssetBundle.LoadFromFile(Path.Combine(Module.FilePathFolder, text)); if (logs) { ETGModConsole.Log((object)"Successfully loaded assetbundle!", false); } } catch (Exception ex) { ETGModConsole.Log((object)"Failed loading asset bundle from file.", false); ETGModConsole.Log((object)ex.ToString(), false); } } else { ETGModConsole.Log((object)"AssetBundle NOT FOUND!", false); } return result; } private static string GetPlatformBundleExtension() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if ((int)Application.platform == 13) { return "-linux"; } if ((int)Application.platform == 1) { return "-macos"; } return "-windows"; } } public static class AtlasEditors { public static string AddUITextImage(string ammoTypeSpritePath, string name) { NpcTools.AddNewItemToAtlas(Toolbox.LoadAssetFromAnywhere("Ammonomicon Atlas").GetComponent(), GetTextureFromResource(ammoTypeSpritePath), name); return NpcTools.AddNewItemToAtlas(GameUIRoot.Instance.ConversationBar.portraitSprite.Atlas, GetTextureFromResource(ammoTypeSpritePath), name).name; } public static string AddUITextImage(Texture2D ammoType, string name) { NpcTools.AddNewItemToAtlas(Toolbox.LoadAssetFromAnywhere("Ammonomicon Atlas").GetComponent(), ammoType, name); return NpcTools.AddNewItemToAtlas(GameUIRoot.Instance.ConversationBar.portraitSprite.Atlas, ammoType, name).name; } public static Texture2D GetTextureFromResource(string resourceName) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown byte[] array = ExtractEmbeddedResource(resourceName); if (array == null) { return null; } Texture2D val = new Texture2D(1, 1, (TextureFormat)20, false); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = (FilterMode)0; string text = resourceName.Substring(0, resourceName.LastIndexOf('.')); if (text.LastIndexOf('.') >= 0) { text = text.Substring(text.LastIndexOf('.') + 1); } ((Object)val).name = text; return val; } public static byte[] ExtractEmbeddedResource(string filePath) { filePath = filePath.Replace("/", "."); filePath = filePath.Replace("\\", "."); Assembly callingAssembly = Assembly.GetCallingAssembly(); using Stream stream = callingAssembly.GetManifestResourceStream(filePath); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); return array; } } public class GlobalConsumableStorage : MonoBehaviour { public static List> NewCurrency = new List>(); public static int GetConsumableOfName(string name) { foreach (Tuple item in NewCurrency) { if (item.First == name) { return item.Second; } } return 0; } public static void AddNewConsumable(string name, int StartingAmount = 0) { foreach (Tuple item in NewCurrency) { if (item.First == name) { return; } } NewCurrency.Add(new Tuple(name, StartingAmount)); } public static void AddConsumableAmount(string name, int Amount = 0) { foreach (Tuple item in NewCurrency) { if (item.First == name) { item.Second += Amount; } } } public static void SetConsumableAmount(string name, int Amount = 0) { foreach (Tuple item in NewCurrency) { if (item.First == name) { item.Second = Amount; } } } public static void RemoveConsumableAmount(string name, int Amount = 0) { foreach (Tuple item in NewCurrency) { if (item.First == name) { item.Second -= Amount; if (item.Second < 0) { item.Second = 0; } } } } public static int ReturnConsumableAmount(string name) { foreach (Tuple item in NewCurrency) { if (item.First == name) { return item.Second; } } return 0; } } public static class StaticColorHexes { public static string Red_Color_Hex = "ff0000"; public static string Light_Blue_Color_Hex = "a39feb"; public static string Blue_Color_Hex = "5b6ee1"; public static string Orange_Hex = "df7126"; public static string Lime_Green_Hex = "7dff00"; public static string Dark_Red_Hex = "a70000"; public static string Light_Orange_Hex = "f7a403"; public static string White_Hex = "ffffff"; public static string Light_Green_Hex = "d3ff42"; public static string Green_Hex = "00ff23"; public static string Yellow_Hex = "ffcd09"; public static string Default_UI_Color_Hex = "9bebc7"; public static string Purple_Hex = "9c59d1"; public static string Black_Hex = "000000"; public static string Pink_Hex = "f5a8b8"; public static string Light_Purple_Hex = "7d78d7"; public static string AddColorToLabelString(string text, string hexValue = "f7a403") { return "[color #" + hexValue + "]" + text + "[/color]"; } public static string AddColorToLabelStringAlt(string text, string name = "red") { return "[color " + name + "] (" + text + ")[/color]"; } } public static class GlobalModuleStorage { public class QuickAndMessyPage { public DefaultModule module; public int Page; public int Entry; } public class ModulePoolType { public string Identifier = ""; public GenericLootTable ModuleLootTable; } public static GenericLootTable D_Tier_Table; public static GenericLootTable C_Tier_Table; public static GenericLootTable B_Tier_Table; public static GenericLootTable A_Tier_Table; public static GenericLootTable S_Tier_Table; public static GenericLootTable Fallback_Table; public static List allModules = new List(); public static List all_Tier_1_Modules = new List(); public static List all_Tier_2_Modules = new List(); public static List all_Tier_3_Modules = new List(); public static List all_Tier_Omega_Modules = new List(); public static List pages_T1 = new List(); public static List pages_T2 = new List(); public static List pages_T3 = new List(); public static Func AlterModuleIsSelected; public static Func AlterModuleWeight; public static void InitialiseLootTables() { D_Tier_Table = LootUtility.CreateLootTable((List)null, (DungeonPrerequisite[])null); foreach (DefaultModule all_Tier_1_Module in all_Tier_1_Modules) { LootUtility.AddItemToPool(D_Tier_Table, (PickupObject)(object)all_Tier_1_Module, all_Tier_1_Module.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_2_Module in all_Tier_2_Modules) { LootUtility.AddItemToPool(D_Tier_Table, (PickupObject)(object)all_Tier_2_Module, 0.5f * all_Tier_2_Module.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_3_Module in all_Tier_3_Modules) { LootUtility.AddItemToPool(D_Tier_Table, (PickupObject)(object)all_Tier_3_Module, 0.045f * all_Tier_3_Module.AdditionalWeightMultiplier); } C_Tier_Table = LootUtility.CreateLootTable((List)null, (DungeonPrerequisite[])null); foreach (DefaultModule all_Tier_1_Module2 in all_Tier_1_Modules) { LootUtility.AddItemToPool(C_Tier_Table, (PickupObject)(object)all_Tier_1_Module2, 0.95f * all_Tier_1_Module2.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_2_Module2 in all_Tier_2_Modules) { LootUtility.AddItemToPool(C_Tier_Table, (PickupObject)(object)all_Tier_2_Module2, 0.65f * all_Tier_2_Module2.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_3_Module2 in all_Tier_3_Modules) { LootUtility.AddItemToPool(C_Tier_Table, (PickupObject)(object)all_Tier_3_Module2, 0.05f * all_Tier_3_Module2.AdditionalWeightMultiplier); } B_Tier_Table = LootUtility.CreateLootTable((List)null, (DungeonPrerequisite[])null); foreach (DefaultModule all_Tier_1_Module3 in all_Tier_1_Modules) { LootUtility.AddItemToPool(B_Tier_Table, (PickupObject)(object)all_Tier_1_Module3, 0.85f * all_Tier_1_Module3.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_2_Module3 in all_Tier_2_Modules) { LootUtility.AddItemToPool(B_Tier_Table, (PickupObject)(object)all_Tier_2_Module3, 0.75f * all_Tier_2_Module3.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_3_Module3 in all_Tier_3_Modules) { LootUtility.AddItemToPool(B_Tier_Table, (PickupObject)(object)all_Tier_3_Module3, 0.1f * all_Tier_3_Module3.AdditionalWeightMultiplier); } A_Tier_Table = LootUtility.CreateLootTable((List)null, (DungeonPrerequisite[])null); foreach (DefaultModule all_Tier_1_Module4 in all_Tier_1_Modules) { LootUtility.AddItemToPool(A_Tier_Table, (PickupObject)(object)all_Tier_1_Module4, 0.35f * all_Tier_1_Module4.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_2_Module4 in all_Tier_2_Modules) { LootUtility.AddItemToPool(A_Tier_Table, (PickupObject)(object)all_Tier_2_Module4, 0.7f * all_Tier_2_Module4.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_3_Module4 in all_Tier_3_Modules) { LootUtility.AddItemToPool(A_Tier_Table, (PickupObject)(object)all_Tier_3_Module4, 0.175f * all_Tier_3_Module4.AdditionalWeightMultiplier); } S_Tier_Table = LootUtility.CreateLootTable((List)null, (DungeonPrerequisite[])null); foreach (DefaultModule all_Tier_1_Module5 in all_Tier_1_Modules) { LootUtility.AddItemToPool(S_Tier_Table, (PickupObject)(object)all_Tier_1_Module5, 0.35f * all_Tier_1_Module5.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_2_Module5 in all_Tier_2_Modules) { LootUtility.AddItemToPool(S_Tier_Table, (PickupObject)(object)all_Tier_2_Module5, 0.75f * all_Tier_2_Module5.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_3_Module5 in all_Tier_3_Modules) { LootUtility.AddItemToPool(S_Tier_Table, (PickupObject)(object)all_Tier_3_Module5, 0.225f * all_Tier_3_Module5.AdditionalWeightMultiplier); } Fallback_Table = LootUtility.CreateLootTable((List)null, (DungeonPrerequisite[])null); foreach (DefaultModule all_Tier_1_Module6 in all_Tier_1_Modules) { LootUtility.AddItemToPool(Fallback_Table, (PickupObject)(object)all_Tier_1_Module6, 0.75f * all_Tier_1_Module6.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_2_Module6 in all_Tier_2_Modules) { LootUtility.AddItemToPool(Fallback_Table, (PickupObject)(object)all_Tier_2_Module6, 0.5f * all_Tier_2_Module6.AdditionalWeightMultiplier); } foreach (DefaultModule all_Tier_3_Module6 in all_Tier_3_Modules) { LootUtility.AddItemToPool(Fallback_Table, (PickupObject)(object)all_Tier_3_Module6, 0.2f * all_Tier_3_Module6.AdditionalWeightMultiplier); } } public static GenericLootTable SelectTable(ItemQuality itemQuality) { //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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected I4, but got Unknown //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected I4, but got Unknown if (GameStatsManager.Instance.IsRainbowRun) { return (GenericLootTable)((itemQuality - 1) switch { 0 => B_Tier_Table, 1 => A_Tier_Table, 2 => S_Tier_Table, 3 => S_Tier_Table, 4 => S_Tier_Table, _ => Fallback_Table, }); } return (GenericLootTable)((itemQuality - 1) switch { 0 => D_Tier_Table, 1 => C_Tier_Table, 2 => B_Tier_Table, 3 => A_Tier_Table, 4 => S_Tier_Table, _ => Fallback_Table, }); } public static GenericLootTable SelectTableLichsEyeBullets(ItemQuality itemQuality) { //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_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected I4, but got Unknown return (GenericLootTable)((itemQuality - 1) switch { 0 => C_Tier_Table, 1 => B_Tier_Table, 2 => A_Tier_Table, 3 => S_Tier_Table, 4 => S_Tier_Table, _ => Fallback_Table, }); } private static void AssignPower(DefaultModule module) { switch (module.Tier) { case DefaultModule.ModuleTier.Tier_1: module.EnergyConsumption = 1f; break; case DefaultModule.ModuleTier.Tier_2: module.EnergyConsumption = 2f; break; case DefaultModule.ModuleTier.Tier_3: module.EnergyConsumption = 3f; break; case DefaultModule.ModuleTier.Tier_Omega: module.EnergyConsumption = 0f; break; } } public static void AddToGlobalStorage(this DefaultModule module) { //IL_0181: Unknown result type (might be due to invalid IL or missing references) if (module.EnergyConsumption == -1f) { AssignPower(module); } module.LabelDescription = module.LabelDescription + "\n" + ((module.powerConsumptionData.OverridePowerDescriptionLabel != "FUCK") ? module.powerConsumptionData.OverridePowerDescriptionLabel : ("Uses " + ((module.powerConsumptionData.FirstStack != -420f) ? module.powerConsumptionData.FirstStack : module.EnergyConsumption) + ((module.powerConsumptionData.OverridePowerDescriptionLabel != "FUCK") ? "" : (" (" + StaticColorHexes.AddColorToLabelString(((module.powerConsumptionData.AdditionalStacks != -69f) ? module.powerConsumptionData.AdditionalStacks : (module.EnergyConsumption / 2f)).ToString(), StaticColorHexes.Light_Orange_Hex) + ")" + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.POWER))))); allModules.Add(module); if (!module.IsUncraftable) { AddNewPagesTiered(module); } switch (module.Tier) { case DefaultModule.ModuleTier.Tier_1: all_Tier_1_Modules.Add(module); break; case DefaultModule.ModuleTier.Tier_2: all_Tier_2_Modules.Add(module); break; case DefaultModule.ModuleTier.Tier_3: all_Tier_3_Modules.Add(module); break; case DefaultModule.ModuleTier.Tier_Omega: all_Tier_Omega_Modules.Add(module); break; } ((PickupObject)module).quality = (ItemQuality)(-100); } public static DefaultModule ReturnModule(DefaultModule mod) { foreach (DefaultModule allModule in allModules) { if (mod.LabelName == allModule.LabelName) { return allModule; } } return null; } public static DefaultModule ReturnRandomModule(bool Exclude_T4 = true, bool ExcludeSpecialModules = true) { IEnumerable enumerable2; if (!Exclude_T4) { IEnumerable enumerable = allModules; enumerable2 = enumerable; } else { enumerable2 = allModules.Where((DefaultModule self) => self.Tier != DefaultModule.ModuleTier.Tier_Omega); } IEnumerable enumerable3 = enumerable2; IEnumerable source = (ExcludeSpecialModules ? enumerable3.Where((DefaultModule self) => !self.IsSpecialModule) : enumerable3); return BraveUtility.RandomElement((source.Count() > 0) ? source.ToList() : allModules); } public static DefaultModule ReturnRandomModule(DefaultModule.ModuleTier tier, bool ExcludeSpecialModules = true) { switch (tier) { case DefaultModule.ModuleTier.Tier_1: { IEnumerable enumerable4; if (!ExcludeSpecialModules) { IEnumerable enumerable = all_Tier_1_Modules; enumerable4 = enumerable; } else { enumerable4 = all_Tier_1_Modules.Where((DefaultModule self) => !self.IsSpecialModule); } IEnumerable source3 = enumerable4; return BraveUtility.RandomElement((source3.Count() > 0) ? source3.ToList() : all_Tier_1_Modules); } case DefaultModule.ModuleTier.Tier_2: { IEnumerable enumerable3; if (!ExcludeSpecialModules) { IEnumerable enumerable = all_Tier_2_Modules; enumerable3 = enumerable; } else { enumerable3 = all_Tier_2_Modules.Where((DefaultModule self) => !self.IsSpecialModule); } IEnumerable source2 = enumerable3; return BraveUtility.RandomElement((source2.Count() > 0) ? source2.ToList() : all_Tier_2_Modules); } case DefaultModule.ModuleTier.Tier_3: { IEnumerable enumerable2; if (!ExcludeSpecialModules) { IEnumerable enumerable = all_Tier_3_Modules; enumerable2 = enumerable; } else { enumerable2 = all_Tier_3_Modules.Where((DefaultModule self) => !self.IsSpecialModule); } IEnumerable source = enumerable2; return BraveUtility.RandomElement((source.Count() > 0) ? source.ToList() : all_Tier_3_Modules); } case DefaultModule.ModuleTier.Tier_Omega: return BraveUtility.RandomElement(all_Tier_Omega_Modules); default: return BraveUtility.RandomElement(all_Tier_1_Modules); } } public static bool PlayerHasThisModule(this PlayerController player, int ModuleID) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { return true; } } } return false; } public static bool PlayerHasThisModule(this PlayerController player, DefaultModule defaultModule) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).DisplayName == ((PickupObject)defaultModule).DisplayName) { return true; } } } return false; } public static bool PlayerHasThisModule(int ModuleID) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { for (int j = 0; j < val.passiveItems.Count; j++) { PassiveItem val2 = val.passiveItems[j]; if (!(val2 is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { return true; } } } } return false; } public static bool PlayerHasThisModule(DefaultModule defaultModule) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { for (int j = 0; j < val.passiveItems.Count; j++) { PassiveItem val2 = val.passiveItems[j]; if (!(val2 is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).DisplayName == ((PickupObject)defaultModule).DisplayName) { return true; } } } } return false; } public static ModulePrinterCore.ModuleContainer PlayerHasModule(this PlayerController player, int ModuleID) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { return moduleContainer; } } } return null; } public static bool AnyPlayerHasModuleWithTag(DefaultModule.BaseModuleTags tag, bool requiresActive = false) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { for (int j = 0; j < val.passiveItems.Count; j++) { PassiveItem val2 = val.passiveItems[j]; if (!(val2 is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (moduleContainer.defaultModule.ModuleTags.Contains(tag.ToString())) { return !requiresActive || moduleContainer.ActiveCount > 0; } } } } return false; } public static bool PlayerHasModuleWithTag(this PlayerController player, DefaultModule.BaseModuleTags tag, bool requiresActive = false) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (moduleContainer.defaultModule.ModuleTags.Contains(tag.ToString())) { return !requiresActive || moduleContainer.ActiveCount > 0; } } } return false; } public static bool AnyPlayerHasModuleWithTag(string tag, bool requiresActive = false) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { for (int j = 0; j < val.passiveItems.Count; j++) { PassiveItem val2 = val.passiveItems[j]; if (!(val2 is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (moduleContainer.defaultModule.ModuleTags.Contains(tag)) { return !requiresActive || moduleContainer.ActiveCount > 0; } } } } return false; } public static bool PlayerHasModuleWithTag(this PlayerController player, string tag, bool requiresActive = false) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (moduleContainer.defaultModule.ModuleTags.Contains(tag)) { return !requiresActive || moduleContainer.ActiveCount > 0; } } } return false; } public static bool AnyPlayerHasActiveModule(int ModuleID) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { for (int j = 0; j < val.passiveItems.Count; j++) { PassiveItem val2 = val.passiveItems[j]; if (!(val2 is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { return moduleContainer.ActiveCount > 0; } } } } return false; } public static bool PlayerHasActiveModule(this PlayerController player, int ModuleID) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { return moduleContainer.ActiveCount > 0; } } } return false; } public static int PlayerActiveModuleCount(this PlayerController player, int ModuleID) { if (player.passiveItems == null) { return 0; } for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { return moduleContainer.ActiveCount; } } } return 0; } public static ModulePrinterCore PlayerHasCore(this PlayerController player) { if (player.passiveItems == null) { return null; } for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (val is ModulePrinterCore result) { return result; } } return null; } public static Scrapper PlayerHasComputerCore(this PlayerController player) { if (player.passiveItems == null) { return null; } for (int i = 0; i < player.activeItems.Count; i++) { PlayerItem val = player.activeItems[i]; if (val is Scrapper result) { return result; } } return null; } public static ModulePrinterCore.ModuleContainer PhantomAddModule(this PlayerController player, int ModuleID, bool truePickup = true) { bool flag = false; for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { flag = true; moduleContainer.Count++; moduleContainer.defaultModule.OnAnyPickup(modulePrinterCore, modulePrinterCore.ModularGunController, player, truePickup); return moduleContainer; } } if (!flag) { modulePrinterCore.AddModule(PickupObjectDatabase.GetById(ModuleID) as DefaultModule, player); } } return null; } public static void PhantomRemoveModule(this PlayerController player, int ModuleID, bool truePickup = true) { for (int i = 0; i < player.passiveItems.Count; i++) { PassiveItem val = player.passiveItems[i]; if (!(val is ModulePrinterCore modulePrinterCore)) { continue; } foreach (ModulePrinterCore.ModuleContainer moduleContainer in modulePrinterCore.ModuleContainers) { if (((PickupObject)moduleContainer.defaultModule).PickupObjectId == ModuleID) { if (moduleContainer.Count > 0) { moduleContainer.Count--; moduleContainer.defaultModule.OnAnyRemoved(modulePrinterCore, modulePrinterCore.ModularGunController, player); } if (moduleContainer.Count == 0) { moduleContainer.defaultModule.OnLastRemoved(modulePrinterCore, modulePrinterCore.ModularGunController, player); modulePrinterCore.ModuleContainers.Remove(moduleContainer); } } } } } private static int AddNewPagesTiered(DefaultModule module) { if (module.Tier == DefaultModule.ModuleTier.Tier_Omega) { return -1; } List list = ReturnPageListTier(module.Tier); int num = ((list.Count > 0) ? list.Last().Page : 0); int num2 = ((list.Count > 0) ? list.Last().Entry : (-1)); if (num2 > 3) { num++; num2 = -1; } QuickAndMessyPage quickAndMessyPage = new QuickAndMessyPage(); quickAndMessyPage.Page = num; quickAndMessyPage.Entry = num2 + 1; quickAndMessyPage.module = module; list.Add(quickAndMessyPage); return num2 + 1; } private static List ReturnPageListTier(DefaultModule.ModuleTier moduleTier) { return moduleTier switch { DefaultModule.ModuleTier.Tier_1 => pages_T1, DefaultModule.ModuleTier.Tier_2 => pages_T2, DefaultModule.ModuleTier.Tier_3 => pages_T3, DefaultModule.ModuleTier.Tier_Omega => null, _ => pages_T1, }; } public static GameObject ModularSelectByWeight(this GenericLootTable table, bool useSeedRandom = false, Func CustomProcess = null, List excludedList = null) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown int num = -1; if (excludedList == null) { excludedList = new List(); } List list = new List(); float num2 = 0f; float num3 = 1f; float num4 = 1f; WeightedGameObjectCollection val = new WeightedGameObjectCollection(); val.elements = table.defaultItemDrops.elements; BraveUtility.Shuffle(val.elements); for (int i = 0; i < val.elements.Count; i++) { WeightedGameObject val2 = val.elements[i]; bool flag = true; if ((Object)(object)val2.gameObject != (Object)null) { DefaultModule component = val2.gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { if (excludedList.Contains(component)) { continue; } flag = component.IsAvailable(); num3 = component.ProcessedWeightMultiplier(); num4 = component.ProcessedWeightAdditional(); if (AlterModuleWeight != null) { num3 = AlterModuleWeight(component, num3); } if (CustomProcess != null) { flag = CustomProcess(component); } if (AlterModuleIsSelected != null) { flag = AlterModuleIsSelected(component); } } } if (flag) { list.Add(val2); num2 += (val2.weight + num4) * num3; } } float num5 = ((!useSeedRandom) ? Random.value : BraveRandom.GenerationRandomValue()) * num2; float num6 = 0f; for (int j = 0; j < list.Count; j++) { DefaultModule component2 = list[j].gameObject.GetComponent(); num6 += (list[j].weight + (((Object)(object)component2 != (Object)null) ? component2.ProcessedWeightAdditional() : 0f)) * (((Object)(object)component2 != (Object)null) ? component2.ProcessedWeightMultiplier() : 1f); if (num6 > num5) { num = val.elements.IndexOf(list[j]); return list[j].gameObject; } } num = val.elements.IndexOf(list[list.Count - 1]); return list[list.Count - 1].gameObject; } public static DefaultModule ReturnModule(int ID) { foreach (DefaultModule allModule in allModules) { if (((PickupObject)allModule).PickupObjectId == ID) { return allModule; } } return allModules[0]; } } public static class StaticGUIDs { public static List All_Bosses = new List { Bullet_King_GUID, Gatling_Gull_GUID, Smiley_GUID, Shades_GUID, Ammoconda_GUID, Beholster_GUID, Gorgun_GUID, Door_Lord_GUID, Mine_Flayer_GUID, Cannonbalrog_GUID, Treadnaught_GUID, Wallmonger_GUID, High_Priest_GUID, Kill_Pillars_GUID, Dragun_GUID, Advanced_Dragun_GUID, Lich_Phase_1_GUID, Lich_Phase_2_GUID, Lich_Phase_3_GUID, Blobulord_GUID, Old_King_GUID, Resourceful_Rat_Boss_GUID, Resourceful_Rat_Mech_Boss_GUID, Helicopter_Agunim_GUID, Blockner_GUID }; public static List All_MiniBosses = new List { Fuselier_GUID, Shadow_Magician_GUID, Blockners_Ghost_GUID }; public static List Floor_1_Bosses = new List { Bullet_King_GUID, Gatling_Gull_GUID, Smiley_GUID, Shades_GUID }; public static List Floor_2_Bosses = new List { Ammoconda_GUID, Beholster_GUID, Gorgun_GUID }; public static List Floor_3_Bosses = new List { Mine_Flayer_GUID, Cannonbalrog_GUID, Treadnaught_GUID }; public static List Floor_4_Bosses = new List { Wallmonger_GUID, High_Priest_GUID, Kill_Pillars_GUID }; public static List Floor_5_Bosses = new List { Dragun_GUID, Advanced_Dragun_GUID }; public static List All_Bullet_Kin = new List { AK47_Kin_GUID, Veteran_Bullet_Kin_GUID, Bullet_Kin_GUID, Bandana_Bullet_Kin_GUID, Fake_Bullet_Kin_GUID, Fake_Veteran_Bullet_Kin_GUID, Tanker_GUID, Friendly_Bullet_Kin_GUID, Tutorial_Bullet_Kin_GUID, Fallen_Bullet_Kin_GUID, Shroomer_GUID, Tombstoner_GUID, Ashen_Bullet_Kin_GUID, Cardinal_GUID, Treadnaughts_Tanker_GUID, Musket_Kin_GUID, Bullet_Kin_Gal_Titaness_GUID, Bullet_Kin_Titan_Boss_GUID, Bullet_Kin_Titan_GUID, Bullet_Kin_Pirate_GUID, Green_Bullet_Kin_Fish_GUID, Blue_Bullet_Kin_Fish_GUID, Brocolli_Bullet_Kin_GUID, Knight_Bullet_Kin_GUID, Candle_Bullet_Kin_GUID, Cowboy_Bullet_Kin_GUID, Office_Tie_Bullet_Kin_GUID, Office_Suit_Bullet_Kin_GUID, Suicide_Vest_Bullet_Kin_GUID }; public static string AK47_Kin_GUID = "db35531e66ce41cbb81d507a34366dfe"; public static string Rubber_Kin_GUID = "6b7ef9e5d05b4f96b04f05ef4a0d1b18"; public static string Red_Shotgun_Kin_GUID = "128db2f0781141bcb505d8f00f9e4d47"; public static string Gatling_Gull_GUID = "ec6b674e0acd4553b47ee94493d66422"; public static string Veteran_Bullet_Kin_GUID = "70216cae6c1346309d86d4a0b4603045"; public static string Pinhead_GUID = "4d37ce3d666b4ddda8039929225b7ede"; public static string Blobulin_GUID = "42be66373a3d4d89b91a35c9ff8adfec"; public static string Bullet_Kin_GUID = "01972dee89fc4404a5c408d50007dad5"; public static string Bandana_Bullet_Kin_GUID = "88b6b6a93d4b4234a67844ef4728382c"; public static string Arrow_Kin_GUID = "05891b158cd542b1a5f3df30fb67a7ff"; public static string Blobulon_Kin_GUID = "0239c0680f9f467dbe5c4aab7dd1eca6"; public static string Hollowpoint_GUID = "4db03291a12144d69fe940d5a01de376"; public static string Skusket_GUID = "af84951206324e349e1f13f9b7b60c1a"; public static string Blobuloid_GUID = "042edb1dfb614dc385d5ad1b010f2ee3"; public static string Beholster_GUID = "4b992de5b4274168a8878ef9bf7ea36b"; public static string Fake_Bullet_Kin_GUID = "b5503988e3684e8fa78274dd0dda0bf5"; public static string Fake_Veteran_Bullet_Kin_GUID = "06a82532447247f9ada1940d079a31a7"; public static string UNUSED_Muzzle_Flare_GUID = "98e52539e1964749a8bbce0fe6a85d6b"; public static string Treadnaught_GUID = "fa76c8cfdf1c4a88b55173666b4bc7fb"; public static string Tanker_GUID = "df7fb62405dc4697b7721862c7b6b3cd"; public static string Beadie_GUID = "7b0b1b6d9ce7405b86b75ce648025dd6"; public static string Muzzle_Wisp_GUID = "ffdc8680bdaa487f8f31995539f74265"; public static string Blue_Shotgun_Kin_GUID = "b54d89f9e802455cbb2b8a96a31e8259"; public static string Cubulon_GUID = "864ea5a6a9324efc95a0dd2407f42810"; public static string Friendly_Bullet_Kin_GUID = "c1757107b9a44f0c823a707adeb4ae7e"; public static string Gunjurer_GUID = "c4fba8def15e47b297865b18e36cbef8"; public static string Portable_Turret_GUID = "998807b57e454f00a63d67883fcf90d6"; public static string Tutorial_Turret_GUID = "e667fdd01f1e43349c03a18e5b79e579"; public static string Tutorial_Bullet_Kin_GUID = "b08ec82bef6940328c7ecd9ffc6bd16c"; public static string Bunker_GUID = "8817ab9de885424d9ba83455ead5ffef"; public static string Bullet_King_GUID = "ffca09398635467da3b1f4a54bcfda80"; public static string Bullet_Kings_Toadie_GUID = "b5e699a0abb94666bda567ab23bd91c4"; public static string Veteran_Shotgun_Kin_GUID = "2752019b770f473193b08b4005dc781f"; public static string High_Gunjurer_GUID = "9b2cf2949a894599917d4d391a0b7394"; public static string Spent_GUID = "249db525a9464e5282d02162c88e0357"; public static string Blizzbulon_GUID = "022d7c822bc146b58fe3b0287568aaa2"; public static string Mountain_Cube_GUID = "f155fd2759764f4a9217db29dd21b7eb"; public static string Skullet_GUID = "336190e29e8a4f75ab7486595b700d4a"; public static string Gummy_GUID = "5288e86d20184fa69c91ceb642d31474"; public static string Skullmet_GUID = "95ec774b5a75467a9ab05fa230c0c143"; public static string Smiley_GUID = "ea40fcc863d34b0088f490f4e57f8913"; public static string Shades_GUID = "c00390483f394a849c36143eb878998f"; public static string Old_King_GUID = "5729c8b5ffa7415bb3d01205663a33ef"; public static string Super_Space_Turtle_GUID = "3a077fa5872d462196bb9a3cb1af02a3"; public static string Wallmonger_GUID = "f3b04a067a65492f8b279130323b41f0"; public static string Dragun_GUID = "465da2bb086a4a88a803f79fe3a27677"; public static string Brown_Chest_Mimic_GUID = "2ebf8ef6728648089babb507dec4edb7"; public static string Bullat_GUID = "2feb50a6a40f4f50982e89fd276f6f15"; public static string Shotgat_GUID = "2d4f8b5404614e7d8b235006acde427a"; public static string Shelleton_GUID = "21dd14e5ca2a4a388adab5b11b69a1e1"; public static string Bookllet_GUID = "c0ff3744760c4a2eb0bb52ac162056e6"; public static string Grenat_GUID = "b4666cb6ef4f4b038ba8924fd8adf38f"; public static string High_Priest_GUID = "6c43fddfd401456c916089fdd1c99b1c"; public static string Blue_Chest_Mimic_GUID = "d8d651e3484f471ba8a2daa4bf535ce6"; public static string Green_Chest_Mimic_GUID = "abfb454340294a0992f4173d6e5898a8"; public static string Door_Lord_GUID = "9189f46c47564ed588b9108965f975c9"; public static string Cannonbalrog_GUID = "5e0af7f7d9de4755a68d2fd3bbc15df4"; public static string Blue_Bookllet_GUID = "6f22935656c54ccfb89fca30ad663a64"; public static string Green_Bookllet_GUID = "a400523e535f41ac80a43ff6b06dc0bf"; public static string Spirat_GUID = "7ec3e8146f634c559a7d58b19191cd43"; public static string Dog_GUID = "c07ef60ae32b404f99e294a6f9acba75"; public static string Skusket_Head_GUID = "c2f902b7cbe745efb3db4399927eab34"; public static string Ally_Gatling_Gull_GUID = "538669d3b2cd4edca2e3699812bcf2b6"; public static string Tazie_GUID = "98fdf153a4dd4d51bf0bafe43f3c77ff"; public static string Black_Skusket_GUID = "1cec0cdf383e42b19920787798353e46"; public static string Det_GUID = "ac986dabc5a24adab11d48a4bccf4cb1"; public static string X_Det_GUID = "48d74b9c65f44b888a94f9e093554977"; public static string Minelet_GUID = "3cadf10c489b461f9fb8814abc1a09c1"; public static string Boss_Template_GUID = "7ee0a3fbb3dc417db4c3073ba23e1be8"; public static string Gorgun_GUID = "c367f00240a64d5d9f3c26484dc35833"; public static string Poisbulon_GUID = "e61cab252cfb435db9172adc96ded75f"; public static string Poisbuloiud_GUID = "fe3fe59d867347839824d5d9ae87f244"; public static string Poisbulin_GUID = "da797878d215453abba824ff902e21b4"; public static string Ammoconda_GUID = "da797878d215453abba824ff902e21b4"; public static string Gun_Nut_GUID = "ec8ea75b557d4e7b8ceeaacdf6f8238c"; public static string Gigi_GUID = "ed37fa13e0fa4fcf8239643957c51293"; public static string Gunzockie_GUID = "6e972cd3b11e4b429b888b488e308551"; public static string Gunsinger_GUID = "cf2b7021eac44e3f95af07db9a7c442c"; public static string Gunzookie_GUID = "8a9e9bedac014a829a48735da6daf3da"; public static string Leadbulon_GUID = "ccf6d241dad64d989cbcaca2a8477f01"; public static string Aged_Gunsinger_GUID = "c50a862d19fc4d30baeba54795e8cb93"; public static string Cubulead_GUID = "0b547ac6b6fc4d68876a241a88f5ca6a"; public static string Creech_GUID = "37340393f97f41b2822bc02d14654172"; public static string Sniper_Shell_GUID = "31a3ea0c54a745e182e22ea54844a82d"; public static string Professional_GUID = "c5b11bfc065d417b9c4d03a5e385fe2c"; public static string Wizbang_GUID = "43426a2e39584871b287ac31df04b544"; public static string Coaler_GUID = "9d50684ce2c044e880878e86dbada919"; public static string Gat_GUID = "9b4fb8a2a60a457f90dcf285d34143ac"; public static string Fungun_GUID = "f905765488874846b7ff257ff81d6d0c"; public static string Spogre_GUID = "eed5addcc15148179f300cc0d9ee7f94"; public static string Fallen_Bullet_Kin_GUID = "5f3abc2d561b4b9c9e72b879c6f10c7e"; public static string Shotgrub_GUID = "044a9f39712f456597b9762893fbc19c"; public static string Lead_Cube_GUID = "33b212b856b74ff09252bf4f2e8b8c57"; public static string Flesh_Cube_GUID = "3f2026dc3712490289c4658a2ba4a24b"; public static string Shroomer_GUID = "e5cffcfabfae489da61062ea20539887"; public static string Ammomancer_GUID = "b1540990a4f1480bbcb3bea70d67f60d"; public static string Spectre_GUID = "56f5a0f2c1fc4bc78875aea617ee31ac"; public static string Lore_Gunjurer_GUID = "56fb939a434140308b8f257f0f447829"; public static string Muzzle_Flare_GUID = "d8a445ea4d944cc1b55a40f22821ae69"; public static string Dr_Wolfs_Monster_GUID = "8d441ad4e9924d91b6070d5b3438d066"; public static string Dr_Wolf_GUID = "ce2d2a0dced0444fb751b262ec6af08a"; public static string Lich_Phase_1_GUID = "cd88c3ce60c442e9aa5b3904d31652bc"; public static string Psychoman_GUID = "575a37abca8d414d89c4e251dd606050"; public static string Bishop_GUID = "5d045744405d4438b371eb5ed3e2cdb2"; public static string Blobulord_GUID = "1b5810fafbec445d89921a4efb4e42b7"; public static string Shopkeeper_Boss_GUID = "70058857b0a641a888ac4389bd10f455"; public static string Blockner_GUID = "bb73eeeb9e584fbeaf35877ec176de28"; public static string Fuselier_GUID = "39de9bd6a863451a97906d949c103538"; public static string Interdimensional_Horror_GUID = "dc3cd41623d447aeba77c77c99598426"; public static string Marines_Past_Imp_GUID = "a9cc6a4e9b3d46ea871e70a03c9f77d4"; public static string Convicts_Past_Soldier_GUID = "556e9f2a10f9411cb9dbfd61e0e0f1e1"; public static string Black_Stache_GUID = "8b913eea3d174184be1af362d441910d"; public static string Diagonal_X_Det_GUID = "c5a0fd2774b64287bf11127ca59dd8b4"; public static string Vertical_Det_GUID = "b67ffe82c66742d1985e5888fd8e6a03"; public static string Diagonal_Det_GUID = "d9632631a18849539333a92332895ebd"; public static string Horizontal_Det_GUID = "1898f6fe1ee0408e886aaf05c23cc216"; public static string Vertical_X_Det_GUID = "abd816b0bcbf4035b95837ca931169df"; public static string Horizontal_X_Det_GUID = "07d06d2b23cc48fe9f95454c839cb361"; public static string R2G2_GUID = "1ccdace06ebd42dc984d46cb1f0db6cf"; public static string Caterpillar_GUID = "d375913a61d1465f8e4ffcf4894e4427"; public static string HM_Absolution_GUID = "b98b10fca77d469e80fb45f3c5badec5"; public static string Draguns_Knife_GUID = "78eca975263d4482a4bfa4c07b32e252"; public static string AIActor_Lord_Of_The_Jammed_GUID = "0d3f7c641557426fbac8596b61c9fb45"; public static string Tombstoner_GUID = "cf27dd464a504a428d87a8b2560ad40a"; public static string Lich_Phase_2_GUID = "68a238ed6a82467ea85474c595c49c6e"; public static string Red_Caped_Bullet_Kin_GUID = "fa6a7ac20a0e4083a4c2ee0d86f8bbf7"; public static string Lich_Phase_3_GUID = "7c5d5f09911e49b78ae644d2b50ff3bf"; public static string Tiny_Blobulord_GUID = "d1c9781fdac54d9e8498ed89210a0238"; public static string Faster_Tutorial_Turret_GUID = "41ba74c517534f02a62f2e2028395c58"; public static string Cop_GUID = "705e9081261446039e1ed9ff16905d04"; public static string Chicken_GUID = "76bc43539fc24648bff4568c75c686d1"; public static string Ashen_Bullet_Kin_GUID = "1a78cfb776f54641b832e92c44021cf2"; public static string Ashen_Shotgun_Kin_GUID = "1bd8e49f93614e76b140077ff2e33f2b"; public static string Mutant_Bullet_Kin_GUID = "d4a9836f8ab14f3fadd0f597438b1f1f"; public static string Pig_GUID = "fe51c83b41ce4a46b42f54ab5f31e6d0"; public static string Poopulon_GUID = "116d09c26e624bca8cca09fc69c714b3"; public static string Poopulons_Corn_GUID = "0ff278534abb4fbaaa65d3f638003648"; public static string King_Bullat_GUID = "1a4872dafdb34fd29fe8ac90bd2cea67"; public static string Spectral_Gun_Nut_GUID = "383175a55879441d90933b5c4e60cf6f"; public static string Bullet_Shark_GUID = "72d2f44431da43b8a3bae7d8a114a46d"; public static string Agonizer_GUID = "3f6d6b0c4a7c4690807435c7b37c35a5"; public static string Lead_Maiden_GUID = "cd4a4b7f612a4ba9a720b9f97c52f38c"; public static string Cardinal_GUID = "8bb5578fba374e8aae8e10b754e61d62"; public static string Shambling_Round_GUID = "98ea2fe181ab4323ab6e9981955a9bca"; public static string Wolf_GUID = "ededff1deaf3430eaf8321d0c6b2bd80"; public static string Bloodbulon_GUID = "062b9b64371e46e195de17b6f10e47c8"; public static string Black_Chest_Mimic_GUID = "6450d20137994881aff0ddd13e3d40c8"; public static string Red_Chest_Mimic_GUID = "d8fd592b184b4ac9a3be217bc70912a2"; public static string Gun_Cultist_GUID = "57255ed50ee24794b7aac1ac3cfb8a95"; public static string Revolvenant_GUID = "d5a7b95774cd41f080e517bea07bf495"; public static string Gunreaper_GUID = "88f037c3f93b4362a040a87b30770407"; public static string Pot_Fairy_GUID = "c182a5cb704d460d9d099a47af49c913"; public static string Blank_Companion_GUID = "5695e8ffa77c4d099b4d9bd9536ff35e"; public static string Great_Bullet_Shark_GUID = "b70cbd875fea498aa7fd14b970248920"; public static string Apprentice_Gunjurer_GUID = "206405acad4d4c33aac6717d184dc8d4"; public static string Mutant_Shotgun_Kin_GUID = "7f665bd7151347e298e4d366f8818284"; public static string Kill_Pillars_GUID = "3f11bbbc439c4086a180eb0fb9990cb4"; public static string Harmless_Snake_GUID = "1386da0f42fb4bcabc5be8feb16a7c38"; public static string Large_Spent_GUID = "e21ac9492110493baef6df02a2682a0d"; public static string Old_Kings_Toadie_GUID = "02a14dec58ab45fb8aacde7aacd25b01"; public static string Treadnaughts_Tanker_GUID = "47bdfec22e8e4568a619130a267eab5b"; public static string Ser_Junkan_GUID = "c6c8e59d0f5d41969c74e802c9d67d07"; public static string Test_Dummy_GUID = "5fa8c86a65234b538cd022f726af2aea"; public static string Mine_Flayer_GUID = "8b0dd96e2fe74ec7bebc1bc689c0008a"; public static string Mine_Flayers_Bell_GUID = "78a8ee40dff2477e9c2134f6990ef297"; public static string Key_Bullet_Kin_GUID = "699cd24270af4cd183d671090d8323a1"; public static string Mine_Flayers_Claymore_GUID = "566ecca5f3b04945ac6ce1f26dedbf4f"; public static string Robots_Past_Human_1_GUID = "1398aaccb26d42f3b998c367b7800b85"; public static string Robots_Past_Human_2_GUID = "9044d8e4431f490196ba697927a4e3d4"; public static string Robots_Past_Human_3_GUID = "40bf8b0d97794a26b8c440425ec8cac1"; public static string Robots_Past_Human_4_GUID = "3590db6c4eac474a93299a908cb77ab2"; public static string Jammomancer_GUID = "8b4a938cdbc64e64822e841e482ba3d2"; public static string Executioner_GUID = "b1770e0f1c744d9d887cc16122882b4f"; public static string Nitra_GUID = "c0260c286c8d4538a697c5bf24976ccf"; public static string Killithid_GUID = "3e98ccecf7334ff2800188c417e67c15"; public static string Jamerlengo_GUID = "ba657723b2904aa79f9e51bce7d23872"; public static string Bombshee_GUID = "19b420dec96d4e9ea4aebc3398c0ba7a"; public static string Last_Human_GUID = "880bbe4ce1014740ba6b4e2ea521e49d"; public static string Robots_Past_Terminator_GUID = "12a054b8a6e549dcac58a82b89e319e5"; public static string Robots_Past_Chick_GUID = "95ea1a31fc9e4415a5f271b9aedf9b15"; public static string Robots_Past_Rabbit_GUID = "42432592685e47c9941e339879379d3a"; public static string Robots_Past_Squirrel_GUID = "4254a93fc3c84c0dbe0a8f0dddf48a5a"; public static string Chaingunner_GUID = "463d16121f884984abe759de38418e48"; public static string Chicken_Companion_GUID = "7bd9c670f35b4b8d84280f52a5cc47f6"; public static string Confirmed_GUID = "844657ad68894a4facb1b8e1aef1abf9"; public static string Agunim_GUID = "2ccaa1b7ae10457396a1796decda9cf6"; public static string Cannon_GUID = "39dca963ae2b4688b016089d926308ab"; public static string Shadow_Magician_GUID = "db97e486ef02425280129e1e27c33118"; public static string Ammoconda_Ball_GUID = "f38686671d524feda75261e469f30e0b"; public static string Chance_Kin_GUID = "a446c626b56d4166915a4e29869737fd"; public static string Grip_Master_GUID = "22fc2c2c45fb47cf9fb5f7b043a70122"; public static string Phaser_Spider_GUID = "98ca70157c364750a60f5e0084f9d3e2"; public static string Wall_Mimic_GUID = "479556d05c7c44f3b6abb3b2067fc778"; public static string Chancebulon_GUID = "1bc2a07ef87741be90c37096910843ab"; public static string Tarnisher_GUID = "475c20c1fd474dfbad54954e7cba29c1"; public static string Misfire_Beast_GUID = "45192ff6d6cb43ed8f1a874ab6bef316"; public static string Yolk_GUID = "8b43a5c59b854eb780f9ab669ec26b7a"; public static string Blockners_Ghost_GUID = "edc61b105ddd4ce18302b82efdc47178"; public static string Rat_Candle_GUID = "14ea47ff46b54bb4a98f91ffcffb656d"; public static string Rat_GUID = "6ad1cafc268f4214a101dca7af61bc91"; public static string Rat_Chest_Mimic_GUID = "ac9d345575444c9a8d11b799e8719be0"; public static string Pedestal_Mimic_GUID = "796a7ed4ad804984859088fc91672c7f"; public static string Mouser_GUID = "be0683affb0e41bbb699cb7125fdded6"; public static string Candle_Guy_GUID = "eeb33c3a5a8e4eaaaaf39a743e8767bc"; public static string Metal_Cube_Guy_GUID = "ba928393c8ed47819c2c5f593100a5bc"; public static string Fusebot_GUID = "4538456236f64ea79f483784370bc62f"; public static string Revenge_Bullet_Kings_Toadie_GUID = "d4dd2b2bbda64cc9bcec534b4e920518"; public static string Phoenix_Companion_GUID = "11a14dbd807e432985a89f69b5f9b31e"; public static string Pig_Cannon_Synergy_Forme_GUID = "86237c6482754cd29819c239403a2de7"; public static string Blank_Companion_Synergy_Forme_GUID = "ad35abc5a3bf451581c3530417d89f2c"; public static string Android_Cop_GUID = "640238ba85dd4e94b3d6f68888e6ecb8"; public static string Raccoon_GUID = "e9fa6544000942a79ad05b6e4afb62db"; public static string Dog_Puppy_Synergy_GUID = "ebf2314289ff4a4ead7ea7ef363a0a2e"; public static string Wolf_Puppy_Synergy_GUID = "ab4a779d6e8f429baafa4bf9e5dca3a9"; public static string Synergy_Super_Space_Turtle_GUID = "9216803e9c894002a4b931d7ea9c6bdf"; public static string Turtle_GUID = "cc9c41aa8c194e17b44ac45f993dd212"; public static string Paday_Shooter_1_GUID = "45f5291a60724067bd3ccde50f65ac22"; public static string Paday_Shooter_2_GUID = "41ab10778daf4d3692e2bc4b370ab037"; public static string Paday_Shooter_3_GUID = "2976522ec560460c889d11bb54fbe758"; public static string Turkey_GUID = "6f9c28403d3248c188c391f5e40774c5"; public static string Baby_Good_Mimic_GUID = "e456b66ed3664a4cb590eab3a8ff3814"; public static string Resourceful_Rat_Boss_GUID = "6868795625bd46f3ae3e4377adce288b"; public static string Resourceful_Rat_Mech_Boss_GUID = "4d164ba3f62648809a4a82c90fc22cae"; public static string Advanced_Dragun_GUID = "05b8afe0b6cc4fffa9dc6036fa24c8ec"; public static string Advanced_Dragun_Knife_GUID = "2e6223e42e574775b56c6349921f42cb"; public static string Musket_Kin_GUID = "226fd90be3a64958a5b13cb0a4f43e97"; public static string Bullet_Kin_Gal_Titaness_GUID = "df4e9fedb8764b5a876517431ca67b86"; public static string Bullet_Kin_Titan_Boss_GUID = "1f290ea06a4c416cabc52d6b3cf47266"; public static string Bullet_Kin_Titan_GUID = "c4cf0620f71c4678bb8d77929fd4feff"; public static string Bullet_Kin_Pirate_GUID = "6f818f482a5c47fd8f38cce101f6566c"; public static string Green_Bullet_Kin_Fish_GUID = "143be8c9bbb84e3fb3ab98bcd4cf5e5b"; public static string Blue_Bullet_Kin_Fish_GUID = "06f5623a351c4f28bc8c6cda56004b80"; public static string Brocolli_Bullet_Kin_GUID = "ff4f54ce606e4604bf8d467c1279be3e"; public static string Knight_Bullet_Kin_GUID = "39e6f47a16ab4c86bec4b12984aece4c"; public static string Kaliber_Bullet_Kin_GUID = "f020570a42164e2699dcf57cac8a495c"; public static string Candle_Bullet_Kin_GUID = "37de0df92697431baa47894a075ba7e9"; public static string Cowboy_Bullet_Kin_GUID = "5861e5a077244905a8c25c2b7b4d6ebb"; public static string Office_Tie_Bullet_Kin_GUID = "906d71ccc1934c02a6f4ff2e9c07c9ec"; public static string Office_Suit_Bullet_Kin_GUID = "9eba44a0ea6c4ea386ff02286dd0e6bd"; public static string Bullet_Kin_Mech_GUID = "2b6854c0849b4b8fb98eb15519d7db1c"; public static string Suicide_Vest_Bullet_Kin_GUID = "05cb719e0178478685dc610f8b3e8bfc"; public static string Firecracker_Nitra_GUID = "5f15093e6f684f4fb09d3e7e697216b4"; public static string Robot_Cylinder_GUID = "d4f4405e0ff34ab483966fd177f2ece3"; public static string Red_Robot_Cylinder_GUID = "534f1159e7cf4f6aa00aeea92459065e"; public static string Chameleon_GUID = "80ab6cd15bfc46668a8844b2975c6c26"; public static string Bullat_Garygoyle_GUID = "981d358ffc69419bac918ca1bdf0c7f7"; public static string Snake_Enemy_GUID = "e861e59012954ab2b9b6977da85cb83c"; public static string Helicopter_Agunim_GUID = "41ee1c8538e8474a82a74c4aff99c712"; public static string Cactus_Kin_GUID = "3b0bd258b4c9432db3339665cc61c356"; public static string Parrot_GUID = "4b21a913e8c54056bc05cafecf9da880"; public static string Stone_Tablet_Bookllet_GUID = "78e0951b097b46d89356f004dda27c42"; public static string Necronomicon_Bookllet_GUID = "216fd3dfb9da439d9bd7ba53e1c76462"; public static string Cowboy_Shotgun_Kin_GUID = "ddf12a4881eb43cfba04f36dd6377abb"; public static string Pirate_Shotgun_Kin_GUID = "86dfc13486ee4f559189de53cfb84107"; public static string Fridge_Lead_Maiden_GUID = "9215d1a221904c7386b481a171e52859"; public static string Baby_Good_Shelleton_Companion_GUID = "3f40178e10dc4094a1565cd4fdc4af56"; } public static class VFXStorage { private class EffectContainer { public PlayerController player; public DefaultModule defaultModule; public int Amount; public EffectContainer(PlayerController p, DefaultModule m, int a = 1) { player = p; defaultModule = m; Amount = a; } } public class MourningStarVFXController : BraveBehaviour { public Action OnBeamStart; public Action OnBeamUpdate; public Action OnBeamDie; private float TimeExtant; public bool DoesSound = true; public bool DoesEmbers = true; private bool isbeingTossed; public List BeamSections; public tk2dSprite BurstSprite; public GameObject InitialImpactVFX; public string SectionStartAnimation; public string SectionAnimation; public string SectionEndAnimation; public string CapAnimation; public string CapEndAnimation; private float m_particleCounter; public static MourningStarVFXController SpawnMourningStar(Vector2 position, float lifeTime = -1f, Transform parent = null) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) MourningStarVFXController component = Object.Instantiate(MourningStarLaser, Vector2.op_Implicit(position), Quaternion.identity, parent).GetComponent(); if (lifeTime != -1f && lifeTime > 0f) { ((MonoBehaviour)component).Invoke("Dissipate", lifeTime); } return component; } private void Start() { isbeingTossed = false; TimeExtant = 0f; for (int i = 0; i < BeamSections.Count; i++) { tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)BeamSections[i]).spriteAnimator; if (Object.op_Implicit((Object)(object)spriteAnimator)) { spriteAnimator.alwaysUpdateOffscreen = true; spriteAnimator.PlayForDuration(SectionStartAnimation, -1f, SectionAnimation, false); if (DoesSound) { AkSoundEngine.PostEvent("Play_WPN_dawnhammer_loop_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Play_State_Volume_Lower_01", ((Component)this).gameObject); } } } if (OnBeamStart != null) { OnBeamStart(((Component)this).gameObject); } ((BraveBehaviour)this).spriteAnimator.alwaysUpdateOffscreen = true; ((tk2dBaseSprite)BurstSprite).UpdateZDepth(); ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.enabled = false; } public void Update() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Invalid comparison between Unknown and I4 //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Invalid comparison between Unknown and I4 //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Invalid comparison between Unknown and I4 //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) if (isbeingTossed) { return; } TimeExtant += BraveTime.DeltaTime; ((BraveBehaviour)this).sprite.UpdateZDepth(); for (int i = 0; i < BeamSections.Count; i++) { ((tk2dBaseSprite)BeamSections[i]).UpdateZDepth(); } ((tk2dBaseSprite)BurstSprite).UpdateZDepth(); if (!((BraveBehaviour)BurstSprite).renderer.enabled) { ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.enabled = true; ((BraveBehaviour)this).spriteAnimator.Play(CapAnimation); } if (DoesEmbers && ((int)GameManager.Options.ShaderQuality == 1 || (int)GameManager.Options.ShaderQuality == 2)) { int num = (((int)GameManager.Options.ShaderQuality != 2) ? 50 : 125); m_particleCounter += BraveTime.DeltaTime * (float)num; if (m_particleCounter > 1f) { GlobalSparksDoer.DoRadialParticleBurst(Mathf.FloorToInt(m_particleCounter), Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldBottomLeft), Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldTopRight), 30f, 2f, 1f, (float?)null, (float?)null, (Color?)null, (SparksType)4); m_particleCounter %= 1f; } } if (OnBeamUpdate != null) { OnBeamUpdate(((Component)this).gameObject, TimeExtant); } } public void Dissipate() { isbeingTossed = true; if (OnBeamDie != null) { OnBeamDie(((Component)this).gameObject); } ((BraveBehaviour)((BraveBehaviour)this).sprite).renderer.enabled = true; ParticleSystem componentInChildren = ((Component)this).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { BraveUtility.EnableEmission(componentInChildren, false); } for (int i = 0; i < BeamSections.Count; i++) { ((BraveBehaviour)BeamSections[i]).spriteAnimator.Play(SectionEndAnimation); } ((BraveBehaviour)this).spriteAnimator.PlayAndDestroyObject(CapEndAnimation, (Action)null); Object.Destroy((Object)(object)((Component)this).gameObject, 1f); if (DoesSound) { AkSoundEngine.PostEvent("Stop_WPN_gun_loop_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Stop_State_Volume_Lower_01", ((Component)this).gameObject); } } public override void OnDestroy() { if (DoesSound) { AkSoundEngine.PostEvent("Stop_WPN_gun_loop_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Stop_State_Volume_Lower_01", ((Component)this).gameObject); } ((BraveBehaviour)this).OnDestroy(); } public float TimeAlive() { return TimeExtant; } } public static VFXPool SpiratTeleportVFX; public static VFXPool HighPriestClapVFX; public static GameObject VFX_SpriteAppear; public static GameObject VFX__Synergy; public static ScarfAttachmentDoer ScarfObject; public static GameObject VFX_Modulable; public static GameObject VFX_Tether_Modulable; public static GameObject LaserReticle; public static GameObject RadialRing; public static GameObject TeleportDistortVFX; public static GameObject TeleportVFX; public static GameObject TelefragVFX; public static GameObject RelodestoneContinuousSuckVFX; public static GameObject DragunBoulderLandVFX; public static GameObject HealingSparklesVFX; public static GameObject FriendlyElectricLinkVFX; public static GameObject MachoBraceDustupVFX; public static GameObject MachoBraceBurstVFX; public static GameObject WarningImpactVFX; public static GameObject MourningStarLaser; private static List E_C = new List(); private static List DE_C = new List(); private static bool isDoingFlashyVFX = false; private static bool isDoingFlashyVFX_Destroy = false; public static GameObject SmarterPlayEffectOnActor(this GameActor actor, GameObject effect, Vector3 offset, bool ignorePool = true, bool attached = true, bool alreadyMiddleCenter = false, bool useHitbox = false) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) GameObject val = SpawnManager.SpawnVFX(effect, ignorePool); tk2dBaseSprite component = val.GetComponent(); Vector3 val2 = ((!useHitbox || !Object.op_Implicit((Object)(object)((BraveBehaviour)actor).specRigidbody) || ((BraveBehaviour)actor).specRigidbody.HitboxPixelCollider == null) ? Vector2Extensions.ToVector3ZUp(((BraveBehaviour)actor).sprite.WorldCenter, 0f) : Vector2Extensions.ToVector3ZUp(((BraveBehaviour)actor).specRigidbody.HitboxPixelCollider.UnitCenter, 0f)); if (!alreadyMiddleCenter) { component.PlaceAtPositionByAnchor(val2 + offset, (Anchor)4); } else { ((BraveBehaviour)component).transform.position = val2 + offset; } if (attached) { val.transform.parent = ((BraveBehaviour)actor).transform; component.HeightOffGround = 0.2f; ((BraveBehaviour)actor).sprite.AttachRenderer(component); if (actor is PlayerController) { SmartOverheadVFXController component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.Initialize((PlayerController)(object)((actor is PlayerController) ? actor : null), offset); } } } if (!alreadyMiddleCenter) { val.transform.localPosition = dfVectorExtensions.QuantizeFloor(val.transform.localPosition, 0.0625f); } return val; } public static void AssignVFX() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Expected O, but got Unknown //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Expected O, but got Unknown //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Expected O, but got Unknown //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Expected O, but got Unknown RadialRing = (GameObject)ResourceCache.Acquire("Global VFX/HeatIndicator"); PickupObject byId = PickupObjectDatabase.GetById(573); TeleportDistortVFX = ((ChestTeleporterItem)((byId is ChestTeleporterItem) ? byId : null)).TeleportVFX; PickupObject byId2 = PickupObjectDatabase.GetById(449); TelefragVFX = ((TeleporterPrototypeItem)((byId2 is TeleporterPrototypeItem) ? byId2 : null)).TelefragVFXPrefab; TeleportVFX = (GameObject)ResourceCache.Acquire("Global VFX/VFX_Teleport_Beam"); PickupObject byId3 = PickupObjectDatabase.GetById(536); RelodestoneContinuousSuckVFX = ((RelodestoneItem)((byId3 is RelodestoneItem) ? byId3 : null)).ContinuousVFX; GameObject skyBoulder = ((Component)EnemyDatabase.GetOrLoadByGuid("05b8afe0b6cc4fffa9dc6036fa24c8ec")).GetComponent().skyBoulder; Component[] componentsInChildren = skyBoulder.GetComponentsInChildren(typeof(Component)); foreach (Component val in componentsInChildren) { SkyRocket val2 = (SkyRocket)(object)((val is SkyRocket) ? val : null); if (val2 != null) { DragunBoulderLandVFX = val2.ExplosionData.effect; WarningImpactVFX = val2.LandingTargetSprite; } } HealingSparklesVFX = (GameObject)ResourceCache.Acquire("Global VFX/VFX_Healing_Sparkles_001"); PickupObject byId4 = PickupObjectDatabase.GetById(298); FriendlyElectricLinkVFX = ((ComplexProjectileModifier)((byId4 is ComplexProjectileModifier) ? byId4 : null)).ChainLightningVFX; PickupObject byId5 = PickupObjectDatabase.GetById(665); MachoBraceItem val3 = (MachoBraceItem)(object)((byId5 is MachoBraceItem) ? byId5 : null); MachoBraceDustupVFX = val3.DustUpVFX; MachoBraceBurstVFX = val3.BurstVFX; AssetBundle val4 = ResourceManager.LoadAssetBundle("brave_resources_001"); Object obj = val4.LoadAsset("assets/resourcesbundle/global vfx/vfx_lasersight.prefab"); LaserReticle = (GameObject)(object)((obj is GameObject) ? obj : null); val4 = null; tk2dSpriteAnimation component = Module.ModularAssetBundle.LoadAsset("GunBuildAndWhatNotAnimation").GetComponent(); GameObject val5 = new GameObject("Electric Build Tether"); Object.DontDestroyOnLoad((Object)(object)val5); FakePrefab.MarkAsFakePrefab(val5); val5.SetActive(false); tk2dTiledSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("chain_idle_001")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = component; val7.defaultClipId = val7.Library.GetClipIdByName("chain_start"); ((tk2dBaseSprite)val6).usesOverrideMaterial = true; ((BraveBehaviour)val6).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val6).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val6).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val6).renderer.material.SetFloat("_EmissiveColorPower", 30f); GameObjectExtensions.SetLayerRecursively(((Component)val6).gameObject, LayerMask.NameToLayer("BG_Critical")); VFX_Tether_Modulable = val5; GameObject val8 = new GameObject("VFX_MODULABLE"); Object.DontDestroyOnLoad((Object)(object)val8); FakePrefab.MarkAsFakePrefab(val8); val8.SetActive(false); tk2dSprite val9 = val8.AddComponent(); ((tk2dBaseSprite)val9).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val9).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("rotating_gear_idle_001")); tk2dSpriteAnimator val10 = val8.AddComponent(); val10.Library = component; val10.defaultClipId = val7.Library.GetClipIdByName("start"); val10.playAutomatically = true; ((tk2dBaseSprite)val9).usesOverrideMaterial = true; ((BraveBehaviour)val9).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val9).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val9).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val9).renderer.material.SetFloat("_EmissiveColorPower", 30f); GameObjectExtensions.SetLayerRecursively(((Component)val9).gameObject, LayerMask.NameToLayer("Unoccluded")); VFX_Modulable = val8; tk2dSpriteAnimation component2 = Module.ModularAssetBundle.LoadAsset("SynergyAnimation").GetComponent(); GameObject val11 = new GameObject("VFX_SYNERGY"); Object.DontDestroyOnLoad((Object)(object)val11); FakePrefab.MarkAsFakePrefab(val11); val11.SetActive(false); tk2dSprite val12 = val11.AddComponent(); ((tk2dBaseSprite)val12).Collection = StaticCollections.VFX_Collection; ((tk2dBaseSprite)val12).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("synergy_arrow_idle_001")); tk2dSpriteAnimator val13 = val11.AddComponent(); val13.Library = component2; val13.defaultClipId = val7.Library.GetClipIdByName("start"); val13.playAutomatically = true; ((tk2dBaseSprite)val12).usesOverrideMaterial = true; ((BraveBehaviour)val12).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTiltedCutoutEmissive"); ((BraveBehaviour)val12).renderer.material.EnableKeyword("BRIGHTNESS_CLAMP_ON"); ((BraveBehaviour)val12).renderer.material.SetFloat("_EmissivePower", 30f); ((BraveBehaviour)val12).renderer.material.SetFloat("_EmissiveColorPower", 30f); GameObjectExtensions.SetLayerRecursively(((Component)val12).gameObject, LayerMask.NameToLayer("Unoccluded")); VFX__Synergy = val11; GameObject val14 = new GameObject("VFX_Popup"); FakePrefab.MarkAsFakePrefab(val14); Object.DontDestroyOnLoad((Object)(object)val14); tk2dSprite val15 = val14.AddComponent(); ((tk2dBaseSprite)val15).Collection = StaticCollections.Module_T1_Collection; AdditionalBraveLight val16 = val14.gameObject.AddComponent(); ((BraveBehaviour)val16).transform.position = Vector2.op_Implicit(((BraveBehaviour)val15).sprite.WorldCenter); val16.LightColor = Color.white; val16.LightIntensity = 0f; val16.LightRadius = 0f; ((tk2dBaseSprite)val15).usesOverrideMaterial = true; ((BraveBehaviour)val15).renderer.material.shader = Shader.Find("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)val15).renderer.material.SetFloat("_Fade", 0f); VFX_SpriteAppear = val14; PickupObject byId6 = PickupObjectDatabase.GetById(436); BlinkPassiveItem val17 = (BlinkPassiveItem)(object)((byId6 is BlinkPassiveItem) ? byId6 : null); ScarfObject = val17.ScarfPrefab; AIAnimator aiAnimator = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("6c43fddfd401456c916089fdd1c99b1c")).aiAnimator; List otherVFX = aiAnimator.OtherVFX; foreach (NamedVFXPool item in otherVFX) { if (!(item.name == "mergo")) { continue; } VFXComplex[] effects = item.vfxPool.effects; foreach (VFXComplex val18 in effects) { VFXObject[] effects2 = val18.effects; foreach (VFXObject sample in effects2) { VFXObject val19 = VFXStorage.CopyFields(sample); HighPriestClapVFX = new VFXPool(); HighPriestClapVFX.type = (VFXPoolType)4; VFXPool highPriestClapVFX = HighPriestClapVFX; VFXComplex[] array = new VFXComplex[1]; VFXComplex val20 = new VFXComplex(); val20.effects = (VFXObject[])(object)new VFXObject[1] { val19 }; array[0] = val20; highPriestClapVFX.effects = (VFXComplex[])(object)array; VFXObject val21 = VFXStorage.CopyFields(sample); GameObject effect = FakePrefab.Clone(val21.effect); val21.effect = effect; } } } PickupObject byId7 = PickupObjectDatabase.GetById(515); MourningStarLaser = FakePrefab.Clone(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].bleedEffect.vfxExplosion); MourningStarVFXController mourningStarVFXController = MourningStarLaser.AddComponent(); HammerOfDawnController component3 = MourningStarLaser.GetComponent(); mourningStarVFXController.BeamSections = component3.BeamSections; mourningStarVFXController.BurstSprite = component3.BurstSprite; mourningStarVFXController.SectionStartAnimation = component3.SectionStartAnimation; mourningStarVFXController.SectionAnimation = component3.SectionAnimation; mourningStarVFXController.SectionEndAnimation = component3.SectionEndAnimation; mourningStarVFXController.CapAnimation = component3.CapAnimation; mourningStarVFXController.CapEndAnimation = component3.CapEndAnimation; mourningStarVFXController.InitialImpactVFX = component3.InitialImpactVFX; Object.Destroy((Object)(object)component3); SpiratTeleportVFX = ((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("56fb939a434140308b8f257f0f447829")).bulletBank.GetBullet("rogue").BulletObject.GetComponent().teleportVfx; } public static VFXObject CopyFields(VFXObject sample2) where T : VFXObject { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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) VFXObject val = new VFXObject(); val.alignment = sample2.alignment; val.attached = sample2.attached; val.destructible = sample2.destructible; val.effect = sample2.effect; val.orphaned = sample2.orphaned; val.persistsOnDeath = sample2.persistsOnDeath; val.usesZHeight = sample2.usesZHeight; return val; } public static void DoFancyFlashOfModules(int Amount, PlayerController player, DefaultModule Module_To_Display) { E_C.Add(new EffectContainer(player, Module_To_Display, Amount)); if (!isDoingFlashyVFX) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFlashyVFX()); } } public static void DoFancyDestroyOfModules(int Amount, PlayerController player, DefaultModule Module_To_Display) { DE_C.Add(new EffectContainer(player, Module_To_Display, Amount)); if (!isDoingFlashyVFX_Destroy) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFlashyVFX_Destroy()); } } private static IEnumerator DoFlashyVFX() { isDoingFlashyVFX = true; EffectContainer effectContainer = E_C.Last(); PlayerController playerPos = effectContainer.player; Dictionary sprites = new Dictionary(); if ((Object)(object)playerPos == (Object)null) { Debug.Log((object)$"{playerPos} somehow null?"); E_C.Remove(effectContainer); if (E_C.Count() > 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFlashyVFX()); } else { isDoingFlashyVFX = false; } yield break; } float div = (MathsAndLogicHelper.isEven(effectContainer.Amount) ? (85f / (float)effectContainer.Amount) : 0f); for (int j = 0; j < effectContainer.Amount; j++) { tk2dBaseSprite VFX_Object = Object.Instantiate(VFX_SpriteAppear, Vector2.op_Implicit(((BraveBehaviour)playerPos).sprite.WorldCenter), Quaternion.identity).GetComponent(); VFX_Object.SetSprite(((BraveBehaviour)GlobalModuleStorage.ReturnModule(effectContainer.defaultModule)).sprite.collection, ((BraveBehaviour)GlobalModuleStorage.ReturnModule(effectContainer.defaultModule)).sprite.spriteId); AdditionalBraveLight light = ((Component)VFX_Object).GetComponent(); light.LightColor = Color.white; sprites.Add(VFX_Object, Toolbox.GetUnitOnCircle(Toolbox.SubdivideRange(-85f, 85f, effectContainer.Amount, j, offset: true) - div + 90f, 3.5f)); } bool b = false; float e = 0f; while (e < 2f) { if (e > 0.5f && !b) { b = true; E_C.Remove(effectContainer); if (E_C.Count() > 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFlashyVFX()); } } float t = Toolbox.SinLerpTValueFull(e / 2f); float t2 = Toolbox.SinLerpTValue(e / 1.5f); foreach (KeyValuePair VFX_Object2 in sprites) { ((BraveBehaviour)VFX_Object2.Key).transform.position = Vector2.op_Implicit(Vector2.Lerp(((BraveBehaviour)playerPos).sprite.WorldCenter - new Vector2(0.5f, 0.5f) + VFX_Object2.Value, ((BraveBehaviour)playerPos).sprite.WorldCenter - new Vector2(0.5f, 0.5f), t2)); ((BraveBehaviour)VFX_Object2.Key).renderer.material.SetFloat("_Fade", t); AdditionalBraveLight light2 = ((Component)VFX_Object2.Key).GetComponent(); light2.LightIntensity = Mathf.Lerp(0f, 2.5f, t); light2.LightRadius = Mathf.Lerp(0f, 2f, t); } e += BraveTime.DeltaTime; yield return null; } for (int i = sprites.Count() - 1; i > -1; i--) { Object.Destroy((Object)(object)((Component)sprites.Last().Key).gameObject); LootEngine.DoDefaultSynergyPoof(((BraveBehaviour)playerPos).sprite.WorldCenter, false); } if (E_C.Count() <= 0) { isDoingFlashyVFX = false; } } private static IEnumerator DoFlashyVFX_Destroy() { isDoingFlashyVFX_Destroy = true; EffectContainer effectContainer = DE_C.Last(); PlayerController playerPos = effectContainer.player; Dictionary sprites = new Dictionary(); if ((Object)(object)playerPos == (Object)null) { Debug.Log((object)$"{playerPos} somehow null?"); DE_C.Remove(effectContainer); if (DE_C.Count() > 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFlashyVFX_Destroy()); } else { isDoingFlashyVFX_Destroy = false; } yield break; } float div = (MathsAndLogicHelper.isEven(effectContainer.Amount) ? (85f / (float)effectContainer.Amount) : 0f); for (int j = 0; j < effectContainer.Amount; j++) { tk2dBaseSprite VFX_Object = Object.Instantiate(VFX_SpriteAppear, Vector2.op_Implicit(((BraveBehaviour)playerPos).sprite.WorldCenter), Quaternion.identity).GetComponent(); DefaultModule mod = GlobalModuleStorage.ReturnModule(effectContainer.defaultModule); if ((Object)(object)mod != (Object)null && (Object)(object)VFX_Object != (Object)null) { VFX_Object.SetSprite(((BraveBehaviour)mod).sprite.collection, ((BraveBehaviour)mod).sprite.spriteId); AdditionalBraveLight light = ((Component)VFX_Object).GetComponent(); light.LightColor = Color.white; sprites.Add(VFX_Object, Toolbox.GetUnitOnCircle(Toolbox.SubdivideRange(-85f, 85f, effectContainer.Amount, j, offset: true) + 180f - div + 90f, 3.5f)); } } bool b = false; float e = 0f; while (e < 2f) { if (e > 0.5f && !b) { b = true; DE_C.Remove(effectContainer); if (DE_C.Count() > 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoFlashyVFX_Destroy()); } } float t = Toolbox.SinLerpTValueFull(e / 2f); float t2 = Toolbox.SinLerpTValue(e / 1.5f); foreach (KeyValuePair VFX_Object2 in sprites) { ((BraveBehaviour)VFX_Object2.Key).transform.position = Vector2.op_Implicit(Vector2.Lerp(((BraveBehaviour)playerPos).sprite.WorldCenter - new Vector2(0.5f, 0.5f), ((BraveBehaviour)playerPos).sprite.WorldCenter - new Vector2(0.5f, 0.5f) + VFX_Object2.Value, t2)); ((BraveBehaviour)VFX_Object2.Key).renderer.material.SetFloat("_Fade", t); AdditionalBraveLight light2 = ((Component)VFX_Object2.Key).GetComponent(); light2.LightIntensity = Mathf.Lerp(0f, 2.5f, t); light2.LightRadius = Mathf.Lerp(0f, 2f, t); } e += BraveTime.DeltaTime; yield return null; } for (int i = sprites.Count() - 1; i > -1; i--) { Object.Destroy((Object)(object)((Component)sprites.Last().Key).gameObject); } sprites.Clear(); if (DE_C.Count() <= 0) { isDoingFlashyVFX_Destroy = false; } } } public class StaticShaders { public static Shader Hologram_Shader = ShaderCache.Acquire("Brave/Internal/HologramShader"); public static Shader Default_Shader = ShaderCache.Acquire("Sprites/Default"); public static Shader Space_Fog_Shader = ShaderCache.Acquire("Brave/Internal/SpaceFogShader"); public static Shader Gonner_Shader = ShaderCache.Acquire("tk2d/CutoutVertexColorTiltedGonner"); public static Shader Displacer_Beast_Shader = ShaderCache.Acquire("Brave/DisplacerBeast"); public static Shader Default_UI_Shader = ShaderCache.Acquire("Daikon Forge/Default UI Shader"); public static Shader MagicCircle_Shader = ShaderCache.Acquire("Brave/MagicCircle"); public static Shader Dragun_Spotlight_Shader = ShaderCache.Acquire("Brave/Internal/GBuffer_Custom_DragunSpotlight"); public static Shader Player_Shader = ShaderCache.Acquire("Brave/PlayerShader"); public static Shader DarkPortal_Shader = ShaderCache.Acquire("Brave/Internal/DarkPortalShader"); public static Shader SpaceFog_Shader = ShaderCache.Acquire("Brave/Internal/SpaceFogShader"); public static Shader TransparencyShader = Shader.Find("Brave/Internal/SimpleAlphaFadeUnlit"); public static Material FloorTileMaterial; public static Material FloorTileMaterial_Transparency; public static void GetDisplacerMat() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown Displacer_Beast_Shader = ((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("45192ff6d6cb43ed8f1a874ab6bef316")).sprite).renderer.material.shader; Dungeon orLoadByName = DungeonDatabase.GetOrLoadByName("Finalscenario_Soldier"); FloorTileMaterial = new Material(orLoadByName.tileIndices.dungeonCollection.materials[0]); FloorTileMaterial_Transparency = new Material(orLoadByName.tileIndices.dungeonCollection.materials[1]); orLoadByName = null; } } public class StaticTextures { public static Texture2D nebula_Background; public static Texture Displacer_NoiseTex; public static Texture Displacer_SpaceTex; public static void InitTextures() { nebula_Background = Module.ModularAssetBundle.LoadAsset("nebula_reducednoise"); Material material = ((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("45192ff6d6cb43ed8f1a874ab6bef316")).sprite).renderer.material; Displacer_SpaceTex = material.GetTexture("_SpaceTex"); Displacer_NoiseTex = material.GetTexture("_NoiseTex"); } public static Texture2D GetTextureFromResource(string resourceName) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown byte[] array = ExtractEmbeddedResource(resourceName); if (array == null) { return null; } Texture2D val = new Texture2D(1, 1, (TextureFormat)4, false); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = (FilterMode)0; string text = resourceName.Substring(0, resourceName.LastIndexOf('.')); if (text.LastIndexOf('.') >= 0) { text = text.Substring(text.LastIndexOf('.') + 1); } ((Object)val).name = text; return val; } public static byte[] ExtractEmbeddedResource(string filePath) { filePath = filePath.Replace("/", "."); filePath = filePath.Replace("\\", "."); Assembly callingAssembly = Assembly.GetCallingAssembly(); using Stream stream = callingAssembly.GetManifestResourceStream(filePath); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); return array; } } public static class Toolbox { public static Random RNG = new Random(); public const int ResolutionIBuiltOffOf_X = 1600; public const int ResolutionIBuiltOffOf_Y = 1024; public const int Resolution_Ratio_X = 25; public const int Resolution_Ratio_Y = 16; private static string[] BundlePrereqs = new string[30] { "brave_resources_001", "dungeon_scene_001", "encounters_base_001", "enemies_base_001", "flows_base_001", "foyer_001", "foyer_002", "foyer_003", "shared_auto_001", "shared_auto_002", "shared_base_001", "dungeons/base_bullethell", "dungeons/base_castle", "dungeons/base_catacombs", "dungeons/base_cathedral", "dungeons/base_forge", "dungeons/base_foyer", "dungeons/base_gungeon", "dungeons/base_mines", "dungeons/base_nakatomi", "dungeons/base_resourcefulrat", "dungeons/base_sewer", "dungeons/base_tutorial", "dungeons/finalscenario_bullet", "dungeons/finalscenario_convict", "dungeons/finalscenario_coop", "dungeons/finalscenario_guide", "dungeons/finalscenario_pilot", "dungeons/finalscenario_robot", "dungeons/finalscenario_soldier" }; public static float ToAngle(Vector2 v) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Mathf.Atan2(v.y, v.x) * 57.29578f; } public static PlayerController GetModular() { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if ((Object)(object)val.PlayerHasCore() != (Object)null) { return val; } } return GameManager.Instance.PrimaryPlayer; } public static float SubdivideRange(float startValue, float endValue, int numDivisions, int i, bool offset = false) { return Mathf.Lerp(startValue, endValue, ((float)i + ((!offset) ? 0f : 0.5f)) / (float)(numDivisions - 1)); } public static float NearestCardinalWallAngle(this Vector2 pos, float minDistance, float maxDistance = 200f) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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) Dictionary dictionary = new Dictionary(); List list = new List(); Func func = (SpeculativeRigidbody otherRigidbody) => Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable) && !((BraveBehaviour)otherRigidbody).minorBreakable.stopsBullets; int num = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, (CollisionLayer)0, (CollisionLayer)12); RaycastResult val = default(RaycastResult); for (int i = 0; i < 4; i++) { if (PhysicsEngine.Instance.Raycast(pos + BraveMathCollege.DegreesToVector((float)(i * 90), minDistance), BraveMathCollege.DegreesToVector((float)(i * 90), 1f), maxDistance, ref val, false, true, num, (CollisionLayer?)null, false, func, (SpeculativeRigidbody)null)) { dictionary.Add(val.Distance, i * 90); list.Add(val.Distance); } RaycastResult.Pool.Free(ref val); } list.Sort(); dictionary.TryGetValue(list[0], out var value); return value; } public static Vector3 AxisRound(this Vector3 vector, Transform relativeTo = null) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)relativeTo)) { vector = relativeTo.InverseTransformDirection(vector); } int num = 0; for (int i = 1; i < 3; i++) { num = ((Mathf.Abs((i == 1) ? vector.x : vector.y) > Mathf.Abs(((Vector3)(ref vector))[num])) ? i : num); } float num2 = ((((Vector3)(ref vector))[num] > 0f) ? 1 : (-1)); vector = Vector3.zero; ((Vector3)(ref vector))[num] = num2; if (Object.op_Implicit((Object)(object)relativeTo)) { vector = relativeTo.TransformDirection(vector); } return vector; } public static Vector2 ToNearestWall(this Vector2 pos, out Vector2 normal, float angle, float minDistance = 1f) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) RaycastResult val = default(RaycastResult); Vector2 result; if (PhysicsEngine.Instance.Raycast(pos + BraveMathCollege.DegreesToVector(angle, minDistance), BraveMathCollege.DegreesToVector(angle, 1f), 200f, ref val, true, false, int.MaxValue, (CollisionLayer?)null, false, (Func)null, (SpeculativeRigidbody)null)) { result = ((CastResult)val).Contact; normal = ((CastResult)val).Normal; } else { result = pos + BraveMathCollege.DegreesToVector(angle, minDistance); normal = Vector2.zero; } RaycastResult.Pool.Free(ref val); return result; } public static void ApplyStat(PlayerController player, StatType statType, float amountToApply, ModifyMethod modifyMethod) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown player.stats.RecalculateStats(player, false, false); StatModifier item = new StatModifier { statToBoost = statType, amount = amountToApply, modifyType = modifyMethod }; player.ownerlessStatModifiers.Add(item); player.stats.RecalculateStats(player, false, false); } public static DebrisObject GenerateDebrisObject(string sprite, tk2dSpriteCollectionData data, bool debrisObjectsCanRotate = true, float LifeSpanMin = 0.33f, float LifeSpanMax = 2f, float AngularVelocity = 540f, float AngularVelocityVariance = 180f, tk2dSprite shadowSprite = null, float Mass = 1f, string AudioEventName = null, GameObject BounceVFX = null, int DebrisBounceCount = 0, bool DoesGoopOnRest = false, GoopDefinition GoopType = null, float GoopRadius = 1f, bool usesWorldShader = true) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GameObject val = new GameObject(sprite); FakePrefab.MarkAsFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); tk2dSprite orAddComponent = GameObjectExtensions.GetOrAddComponent(val); ((tk2dBaseSprite)orAddComponent).collection = data; ((tk2dBaseSprite)orAddComponent).SetSprite(data.GetSpriteIdByName(sprite)); DebrisObject val2 = val.AddComponent(); val2.canRotate = debrisObjectsCanRotate; val2.lifespanMin = LifeSpanMin; val2.lifespanMax = LifeSpanMax; val2.bounceCount = DebrisBounceCount; val2.angularVelocity = AngularVelocity; val2.angularVelocityVariance = AngularVelocityVariance; if (AudioEventName != null) { val2.audioEventName = AudioEventName; } if ((Object)(object)BounceVFX != (Object)null) { val2.optionalBounceVFX = BounceVFX; } ((BraveBehaviour)val2).sprite = (tk2dBaseSprite)(object)orAddComponent; val2.DoesGoopOnRest = DoesGoopOnRest; if ((Object)(object)GoopType != (Object)null) { val2.AssignedGoop = GoopType; } else if ((Object)(object)GoopType == (Object)null && val2.DoesGoopOnRest) { val2.DoesGoopOnRest = false; } val2.GoopRadius = GoopRadius; if ((Object)(object)shadowSprite != (Object)null) { val2.shadowSprite = shadowSprite; } val2.inertialMass = Mass; if (usesWorldShader) { } return val2; } public static AdvancedSynergyEntry CopySynergy(string NameKey) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) AdvancedSynergyEntry val = null; AdvancedSynergyEntry[] synergies = GameManager.Instance.SynergyManager.synergies; foreach (AdvancedSynergyEntry val2 in synergies) { if (val2.NameKey == NameKey) { val = new AdvancedSynergyEntry(); val.ActivationStatus = val2.ActivationStatus; val.ActiveWhenGunUnequipped = val2.ActiveWhenGunUnequipped; val.RequiresAtLeastOneGunAndOneItem = val2.RequiresAtLeastOneGunAndOneItem; val.bonusSynergies = val2.bonusSynergies; val.IgnoreLichEyeBullets = val2.IgnoreLichEyeBullets; val.MandatoryGunIDs = val2.MandatoryGunIDs; val.MandatoryItemIDs = val2.MandatoryItemIDs; val.NameKey = val2.NameKey; val.NumberObjectsRequired = val2.NumberObjectsRequired; val.OptionalGunIDs = val2.OptionalGunIDs; val.OptionalItemIDs = val2.OptionalItemIDs; val.statModifiers = val2.statModifiers; val.SuppressVFX = val2.SuppressVFX; } } return val; } public static void DoMagicSparkles(int amount, Vector2 position, float direction, float MinMult = 1f, float MaxMult = 3f, float DevMinus = 0f, float DevPlus = 0f, SparksType sparks = 2) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < amount; i++) { Vector2 unitOnCircle = GetUnitOnCircle(direction + Random.Range(DevMinus, DevPlus), 1f); GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(position), Vector2.op_Implicit(unitOnCircle * Random.Range(MinMult, MaxMult)), (float?)null, (float?)2f, (Color?)null, sparks); } } public static void DoMagicSparkles(int amount, float lifetime, Vector2 position, Vector2 direction, float MinMult = 1f, float MaxMult = 3f, float DevMinus = 0f, float DevPlus = 0f, SparksType sparks = 2) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < amount; i++) { Vector2 val = direction + GetUnitOnCircle(Vector2Extensions.ToAngle(direction) + Random.Range(DevMinus, DevPlus), 1f); GlobalSparksDoer.DoSingleParticle(Vector2.op_Implicit(position), Vector2.op_Implicit(val * Random.Range(MinMult, MaxMult)), (float?)null, (float?)lifetime, (Color?)null, sparks); } } public static void ModifyVolley(ProjectileVolleyData volleyToModify, PlayerController player, int DuplicatesOfEachModule = 1, float DuplicateAngleOffset = 3f, float DuplicateAngleBaseOffset = 0f, float EachModuleOffsetAngle = 3f, int DuplicatesOfBaseModule = 0, ProjectileModule moduleToAdd = null, int frameDelay = 0) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(WhateverThisIs(volleyToModify, player, DuplicatesOfEachModule, DuplicateAngleOffset, DuplicateAngleBaseOffset, EachModuleOffsetAngle, DuplicatesOfBaseModule, moduleToAdd, frameDelay)); } public static IEnumerator WhateverThisIs(ProjectileVolleyData volleyToModify, PlayerController player, int DuplicatesOfEachModule = 1, float DuplicateAngleOffset = 3f, float DuplicateAngleBaseOffset = 0f, float EachModuleOffsetAngle = 3f, int DuplicatesOfBaseModule = 0, ProjectileModule moduleToAdd = null, int frameDelay = 0) { if (frameDelay > 0) { int de = 0; while (de < frameDelay) { de++; yield return null; } } if (moduleToAdd != null) { bool flag = true; if ((Object)(object)volleyToModify != (Object)null && volleyToModify.projectiles.Count > 0 && volleyToModify.projectiles[0].projectiles != null && volleyToModify.projectiles[0].projectiles.Count > 0) { Projectile projectile = volleyToModify.projectiles[0].projectiles[0]; if (Object.op_Implicit((Object)(object)projectile) && Object.op_Implicit((Object)(object)((Component)projectile).GetComponent())) { flag = false; } } if (flag) { moduleToAdd.isExternalAddedModule = true; volleyToModify.projectiles.Add(moduleToAdd); } } if (DuplicatesOfEachModule > 0) { int num = 1; int count = volleyToModify.projectiles.Count; for (int i = 0; i < count; i++) { float num2 = (float)DuplicatesOfEachModule * DuplicateAngleOffset * -1f / 2f; ProjectileModule projectileModule = volleyToModify.projectiles[i]; for (int j = 0; j < DuplicatesOfEachModule; j++) { projectileModule.angleFromAim = num2; int sourceIndex = num; if (projectileModule.CloneSourceIndex >= 0) { sourceIndex = projectileModule.CloneSourceIndex; } ProjectileModule projectileModule2 = ProjectileModule.CreateClone(projectileModule, false, sourceIndex); float angleFromAim = num2 + DuplicateAngleOffset * (float)(j + 1); projectileModule2.angleFromAim = angleFromAim; projectileModule2.ignoredForReloadPurposes = true; projectileModule2.ammoCost = 0; volleyToModify.projectiles.Add(projectileModule2); } num++; } if (!volleyToModify.UsesShotgunStyleVelocityRandomizer) { volleyToModify.UsesShotgunStyleVelocityRandomizer = true; volleyToModify.DecreaseFinalSpeedPercentMin = -10f; volleyToModify.IncreaseFinalSpeedPercentMax = 10f; } } if (DuplicatesOfBaseModule > 0) { GunVolleyModificationItem.AddDuplicateOfBaseModule(volleyToModify, player, DuplicatesOfBaseModule, DuplicateAngleOffset, DuplicateAngleBaseOffset); } } public static T RandomEnum() { Type typeFromHandle = typeof(T); Array values = Enum.GetValues(typeFromHandle); lock (RNG) { object value = values.GetValue(RNG.Next(values.Length)); return (T)Convert.ChangeType(value, typeFromHandle); } } public static void ShowHitBox(this SpeculativeRigidbody body) { //IL_004e: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) PixelCollider hitboxPixelCollider = body.HitboxPixelCollider; GameObject val = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)val).name = "HitboxDisplay"; val.transform.SetParent(((BraveBehaviour)body).transform); val.layer = 28; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("Unoccluded")); val.transform.localScale = new Vector3((float)hitboxPixelCollider.Dimensions.x / 16f, (float)hitboxPixelCollider.Dimensions.y / 16f, 1f); Vector3 localPosition = new Vector3((float)hitboxPixelCollider.Offset.x + (float)hitboxPixelCollider.Dimensions.x * 0.5f, (float)hitboxPixelCollider.Offset.y + (float)hitboxPixelCollider.Dimensions.y * 0.5f, -16f) / 16f; val.transform.localPosition = localPosition; } public static Entry CopyBulletBankEntry(Entry entryToCopy, string Name, string AudioEvent = null, VFXPool muzzleflashVFX = null, bool ChangeMuzzleFlashToEmpty = true) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Entry val = Toolbox.CopyFields(entryToCopy); val.Name = Name; Projectile component = Object.Instantiate(val.BulletObject).GetComponent(); GameObjectExtensions.SetLayerRecursively(((Component)component).gameObject, 18); ((BraveBehaviour)component).transform.position = Vector3Extensions.WithZ(((BraveBehaviour)component).transform.position, 210.5125f); ((Component)component).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)component).gameObject); Object.DontDestroyOnLoad((Object)(object)component); val.BulletObject = ((Component)component).gameObject; if (AudioEvent != "DNC") { val.AudioEvent = AudioEvent; } if (ChangeMuzzleFlashToEmpty) { VFXPool muzzleFlashEffects; if (muzzleflashVFX != null) { muzzleFlashEffects = muzzleflashVFX; } else { VFXPool val2 = new VFXPool(); val2.type = (VFXPoolType)0; val2.effects = (VFXComplex[])(object)new VFXComplex[0]; muzzleFlashEffects = val2; } val.MuzzleFlashEffects = muzzleFlashEffects; } return val; } public static Entry CopyFields(Entry sample2) where T : Entry { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown Entry val = new Entry(); val.AudioEvent = sample2.AudioEvent; val.AudioLimitOncePerAttack = sample2.AudioLimitOncePerAttack; val.AudioLimitOncePerFrame = sample2.AudioLimitOncePerFrame; val.AudioSwitch = sample2.AudioSwitch; val.PlayAudio = sample2.PlayAudio; val.BulletObject = sample2.BulletObject; val.conditionalMinDegFromNorth = sample2.conditionalMinDegFromNorth; val.DontRotateShell = sample2.DontRotateShell; val.forceCanHitEnemies = sample2.forceCanHitEnemies; val.MuzzleFlashEffects = sample2.MuzzleFlashEffects; val.MuzzleInheritsTransformDirection = sample2.MuzzleInheritsTransformDirection; val.MuzzleLimitOncePerFrame = sample2.MuzzleLimitOncePerFrame; val.Name = sample2.Name; val.OverrideProjectile = sample2.OverrideProjectile; val.preloadCount = sample2.preloadCount; val.ProjectileData = sample2.ProjectileData; val.rampBullets = sample2.rampBullets; val.rampStartHeight = sample2.rampStartHeight; val.rampTime = sample2.rampTime; val.ShellForce = sample2.ShellForce; val.ShellForceVariance = sample2.ShellForceVariance; val.ShellGroundOffset = sample2.ShellGroundOffset; val.ShellPrefab = sample2.ShellPrefab; val.ShellsLimitOncePerFrame = sample2.ShellsLimitOncePerFrame; val.ShellTransform = sample2.ShellTransform; val.SpawnShells = sample2.SpawnShells; val.suppressHitEffectsIfOffscreen = sample2.suppressHitEffectsIfOffscreen; return val; } public static RaycastResult ReturnRaycast(Vector2 startPosition, Vector2 angle, int rayCastMask, float overrideDistance = 1000f, SpeculativeRigidbody bodyToIgnore = null) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Func func = (SpeculativeRigidbody otherRigidbody) => Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable) && !((BraveBehaviour)otherRigidbody).minorBreakable.stopsBullets; RaycastResult result = default(RaycastResult); PhysicsEngine.Instance.Raycast(startPosition, angle, overrideDistance, ref result, true, true, rayCastMask, (CollisionLayer?)null, false, func, bodyToIgnore); return result; } public static void ProcessAnimations(this CustomCharacterData self, Dictionary dict) { tk2dSpriteAnimation library = self.animator.Library; foreach (KeyValuePair item in dict) { library.GetClipByName(item.Key).fps = item.Value; } } public static void AddGlowShaderToGun(this Gun self, Color32 glowColor, int glowstrength, int colorGlowStrength = 0) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown Material val = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val.SetColor("_EmissiveColor", Color32.op_Implicit(glowColor)); val.SetFloat("_EmissiveColorPower", (float)colorGlowStrength); val.SetFloat("_EmissivePower", (float)glowstrength); val.SetFloat("_EmissiveThresholdSensitivity", 0.2f); MeshRenderer component = ((Component)self).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } Material[] array = ((Renderer)component).sharedMaterials; for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i].shader == (Object)(object)val) { return; } } Array.Resize(ref array, array.Length + 1); Material val2 = new Material(val); val2.SetTexture("_MainTex", array[0].GetTexture("_MainTex")); array[^1] = val2; ((Renderer)component).sharedMaterials = array; } public static VFXPool MakeObjectIntoVFX(GameObject obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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_0014: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown VFXPool val = new VFXPool(); val.type = (VFXPoolType)1; VFXComplex val2 = new VFXComplex(); VFXObject val3 = new VFXObject(); val3.effect = obj; val2.effects = (VFXObject[])(object)new VFXObject[1] { val3 }; val.effects = (VFXComplex[])(object)new VFXComplex[1] { val2 }; return val; } public static GameObject GenerateTransformPoint(GameObject attacher, Vector2 attachpoint, string name = "shootPoint") { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.parent = attacher.transform; val.transform.position = Vector2.op_Implicit(attachpoint); return ((Component)attacher.transform.Find(name)).gameObject; } public static float SinLerpTValue(float t) { return Mathf.Sin(t * ((float)Math.PI / 2f)); } public static float CosLerpTValue(float t) { return Mathf.Cos(t * (float)Math.PI); } public static float SinLerpTValueFull(float t) { return Mathf.Sin(t * (float)Math.PI); } public static float SubdivideArc(float startAngle, float sweepAngle, int numBullets, int i, bool offset = false) { return startAngle + Mathf.Lerp(0f, sweepAngle, ((float)i + ((!offset) ? 0f : 0.5f)) / (float)(numBullets - 1)); } public static float SubdivideCircle(float startAngle, int numBullets, int i, float direction = 1f, bool offset = false) { return startAngle + direction * Mathf.Lerp(0f, 360f, ((float)i + ((!offset) ? 0f : 0.5f)) / (float)numBullets); } public static Vector2 GetUnitOnCircle(float angleDegrees, float radius) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 0f; float num3 = 0f; num3 = angleDegrees * (float)Math.PI / 180f; num = radius * Mathf.Cos(num3); num2 = radius * Mathf.Sin(num3); Vector2 result = default(Vector2); ((Vector2)(ref result))..ctor(num, num2); return result; } public static Vector3 GetUnitOnCircleVec3(float angleDegrees, float radius) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 0f; float num3 = 0f; num3 = angleDegrees * (float)Math.PI / 180f; num = radius * Mathf.Cos(num3); num2 = radius * Mathf.Sin(num3); Vector3 result = default(Vector3); ((Vector3)(ref result))..ctor(num, num2); return result; } public static Vector2 CalculateScale_X_Y_Based_On_Resolution() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) Vector2 val = default(Vector2); val.x = Screen.width; val.y = Screen.height; return new Vector2(val.x / 1600f, val.y / 1024f); } public static ModifiedDefaultLabelManager GenerateText(Transform trans, Vector2 offset, float time, string Text, Color32 color, bool Autotrigger = true, float size = 5f, bool UsesScaling = true) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) ModifiedDefaultLabelManager component = ((Component)Object.Instantiate(DefaultModule.LabelController)).gameObject.GetComponent(); ((DefaultLabelController)component).label.textScale = size / (GameUIUtility.GetCurrentTK2D_DFScale(((dfControl)((DefaultLabelController)component).panel).GetManager()) * 20f) * ((!UsesScaling) ? 1f : (Smaller() ? ScaleMult().x : 1f)); ((DefaultLabelController)component).label.Text = Text; if (Autotrigger) { component.Trigger_CustomTime(trans, Vector2.op_Implicit(offset *= ((!UsesScaling) ? 1f : (Smaller() ? ScaleMult_Inv().x : 1f))), time); } ((DefaultLabelController)component).label.backgroundColor = color; component.scaleMultiplier = Mathf.Max(1f, UsesScaling ? ScaleMult().x : 1f); GameUIRoot.Instance.m_manager.AddControl((dfControl)(object)((DefaultLabelController)component).panel); dfLabel componentInChildren = ((Component)component).gameObject.GetComponentInChildren(); componentInChildren.ColorizeSymbols = false; componentInChildren.ProcessMarkup = true; componentInChildren.autoHeight = false; ((dfControl)componentInChildren).updateCollider(); ((dfControl)componentInChildren).Invalidate(); if (UsesScaling) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(FuckYou(((Component)componentInChildren).gameObject)); } return component; } public static IEnumerator FuckYou(GameObject sadcat) { yield return null; Transform transform = sadcat.transform; transform.localScale *= (Smaller() ? 1f : ScaleMult_Inv().x); } public static bool Smaller() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) Vector2 val = CalculateScale_X_Y_Based_On_Resolution(); return val.x < 1f; } private static Vector2 ScaleMult() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) Vector2 val = CalculateScale_X_Y_Based_On_Resolution(); return new Vector2(val.x * val.x, val.x * val.x); } private static Vector2 ScaleMult_Inv() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Vector2 val = CalculateScale_X_Y_Based_On_Resolution(); return new Vector2(val.x / 1f, val.x / 1f); } public static void AddColorLight(this DefaultModule self, Color color) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) AdditionalBraveLight val = ((Component)self).gameObject.AddComponent(); ((BraveBehaviour)val).transform.position = Vector2.op_Implicit(((BraveBehaviour)self).sprite.WorldCenter); val.LightColor = color; val.LightIntensity = 0f; val.LightRadius = 0f; self.BraveLight = val; } public static void NotifyCustom(string header, string text, int spriteID, tk2dSpriteCollectionData CollectionData, NotificationColor color = 1, bool forceSingleLine = false) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) GameUIRoot.Instance.notificationController.DoCustomNotification(header, text, CollectionData, spriteID, color, false, forceSingleLine); } public static Vector3 RandomPositionOnSprite(tk2dBaseSprite targetSprite, float zOffset = 0f) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targetSprite == (Object)null) { return Vector3.one; } Vector3 val = Vector2Extensions.ToVector3ZisY(targetSprite.WorldBottomLeft, zOffset); Vector3 val2 = Vector2Extensions.ToVector3ZisY(targetSprite.WorldTopRight, zOffset); float num = (val2.y - val.y) * (val2.x - val.x); float num2 = 25f * num; int num3 = Mathf.CeilToInt(Mathf.Max(1f, num2 * BraveTime.DeltaTime)); int num4 = num3; Vector3 val3 = val; Vector3 val4 = val2; return new Vector3(Random.Range(val3.x, val4.x), Random.Range(val3.y, val4.y)); } public static float PercentageOfClipLeft(this Gun g, int modify = 0) { float num = g.ClipShotsRemaining; float num2 = g.ClipCapacity; num2 += (float)modify; return num / num2; } public static DungeonPlaceable GenerateDungeonPlaceable(Dictionary gameObjects, int placeableWidth = 1, int placeableLength = 1, DungeonPrerequisite[] dungeonPrerequisites = null) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown if (dungeonPrerequisites == null) { dungeonPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; } DungeonPlaceable val = ScriptableObject.CreateInstance(); val.width = placeableWidth; val.height = placeableLength; val.respectsEncounterableDifferentiator = true; val.variantTiers = new List(); foreach (KeyValuePair gameObject in gameObjects) { DungeonPlaceableVariant val2 = new DungeonPlaceableVariant(); val2.percentChance = gameObject.Value; val2.prerequisites = dungeonPrerequisites; val2.nonDatabasePlaceable = gameObject.Key; val.variantTiers.Add(val2); } return val; } public static T LoadAssetFromAnywhere(string path) where T : Object { T val = default(T); string[] bundlePrereqs = BundlePrereqs; foreach (string text in bundlePrereqs) { try { val = ResourceManager.LoadAssetBundle(text).LoadAsset(path); } catch { } if ((Object)(object)val != (Object)null) { break; } } return val; } public static void CreateFastBody(this GameObject gameObject, IntVector2 colliderX_Y, IntVector2 OffsetX_Y) { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_0154: 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_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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: 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_01df: Expected O, but got Unknown SpeculativeRigidbody orAddComponent = GameObjectExtensions.GetOrAddComponent(gameObject); orAddComponent.CollideWithTileMap = false; if (orAddComponent.PixelColliders == null) { orAddComponent.PixelColliders = new List(); } orAddComponent.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)6, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = OffsetX_Y.x, ManualOffsetY = OffsetX_Y.y, ManualWidth = colliderX_Y.x, ManualHeight = colliderX_Y.y, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); orAddComponent.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)13, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = OffsetX_Y.x, ManualOffsetY = OffsetX_Y.y, ManualWidth = colliderX_Y.x, ManualHeight = colliderX_Y.y, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); orAddComponent.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = (CollisionLayer)8, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = OffsetX_Y.x, ManualOffsetY = OffsetX_Y.y, ManualWidth = colliderX_Y.x, ManualHeight = colliderX_Y.y, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); } public static SpeculativeRigidbody CreateFastBody(this GameObject gameObject, CollisionLayer layer, IntVector2 colliderX_Y, IntVector2 OffsetX_Y) { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown SpeculativeRigidbody orAddComponent = GameObjectExtensions.GetOrAddComponent(gameObject); orAddComponent.CollideWithTileMap = false; if (orAddComponent.PixelColliders == null) { orAddComponent.PixelColliders = new List(); } orAddComponent.PixelColliders.Add(new PixelCollider { ColliderGenerationMode = (PixelColliderGeneration)0, CollisionLayer = layer, IsTrigger = false, BagleUseFirstFrameOnly = false, SpecifyBagelFrame = string.Empty, BagelColliderNumber = 0, ManualOffsetX = OffsetX_Y.x, ManualOffsetY = OffsetX_Y.y, ManualWidth = colliderX_Y.x, ManualHeight = colliderX_Y.y, ManualDiameter = 0, ManualLeftX = 0, ManualLeftY = 0, ManualRightX = 0, ManualRightY = 0 }); return orAddComponent; } public static void AddShadowToObject(this GameObject obj, tk2dSpriteCollectionData Data, string spriteName, Vector2 OffsetX_Y) { //IL_004c: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject(((Object)obj).name + "_Shadow"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = Data; ((tk2dBaseSprite)val2).SetSprite(Data.GetSpriteIdByName(spriteName)); val.transform.parent = obj.transform; val.transform.localPosition = Vector2.op_Implicit(OffsetX_Y); Vector3 localPosition = val.transform.localPosition; localPosition.z -= 1f; ((tk2dBaseSprite)val2).HeightOffGround = (((Object)(object)((Component)obj.transform).GetComponent() != (Object)null) ? (((tk2dBaseSprite)((Component)obj.transform).GetComponent()).HeightOffGround - 0.1f) : 1f); } public static AIBeamShooter2 AddAIBeamShooter2(AIActor enemy, Transform transform, string name, Projectile beamProjectile, ProjectileModule beamModule = null, float angle = 0f) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) AIBeamShooter2 aIBeamShooter = ((Component)enemy).gameObject.AddComponent(); aIBeamShooter.beamTransform = transform; aIBeamShooter.beamModule = beamModule; aIBeamShooter.beamProjectile = beamProjectile; aIBeamShooter.firingEllipseCenter = Vector2.op_Implicit(transform.position); aIBeamShooter.northAngleTolerance = angle; return aIBeamShooter; } public static void BuildSpriteObject(string spriteName, string ObjectName, bool shitfuck = true) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject(ObjectName); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); string key = (shitfuck ? (ObjectName + "_MDLR") : ObjectName); StaticReferences.customObjects.Add(key, val); } public static GameObject BuildSpriteObject_FuckingSHit(string spriteName, string ObjectName) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject(ObjectName); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); return val; } public static Delegate GetEventDelegate(this object self, string eventName) { Delegate result = null; if (self != null) { FieldInfo field = self.GetType().GetField(eventName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if ((object)field != null) { object value = field.GetValue(self); if (value != null && value is Delegate) { result = value as Delegate; } } } return result; } public static T GetEventDelegate(this object self, string eventName) where T : Delegate { return self.GetEventDelegate(eventName) as T; } public static void RaiseEvent(this object self, string eventName, params object[] args) { self.GetEventDelegate(eventName)?.DynamicInvoke(args); } public static object RaiseEventWithReturn(this object self, string eventName, params object[] args) { return self.GetEventDelegate(eventName)?.DynamicInvoke(args); } public static object InvokeNotOverride(this MethodInfo methodInfo, object targetObject, params object[] arguments) { ParameterInfo[] parameters = methodInfo.GetParameters(); if (parameters.Length == 0) { if (arguments != null && arguments.Length != 0) { throw new Exception("Arguments cont doesn't match"); } } else if (parameters.Length != arguments.Length) { throw new Exception("Arguments cont doesn't match"); } Type returnType = null; if ((object)methodInfo.ReturnType != typeof(void)) { returnType = methodInfo.ReturnType; } Type type = targetObject.GetType(); DynamicMethod dynamicMethod = new DynamicMethod("", returnType, new Type[2] { type, typeof(object) }, type); ILGenerator iLGenerator = dynamicMethod.GetILGenerator(); iLGenerator.Emit(OpCodes.Ldarg_0); for (int i = 0; i < parameters.Length; i++) { ParameterInfo parameterInfo = parameters[i]; iLGenerator.Emit(OpCodes.Ldarg_1); iLGenerator.Emit(OpCodes.Ldc_I4_S, i); iLGenerator.Emit(OpCodes.Ldelem_Ref); Type parameterType = parameterInfo.ParameterType; if (parameterType.IsPrimitive) { iLGenerator.Emit(OpCodes.Unbox_Any, parameterType); } else if ((object)parameterType != typeof(object)) { iLGenerator.Emit(OpCodes.Castclass, parameterType); } } iLGenerator.Emit(OpCodes.Call, methodInfo); iLGenerator.Emit(OpCodes.Ret); return dynamicMethod.Invoke(null, new object[2] { targetObject, arguments }); } } public static class UIToolbox { public static void AssignDefaultPresets(this dfPanel self, dfAtlas defaultAtlas, Vector2 size, dfAnchorStyle dfAnchorStyle) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown ((dfControl)self).anchorStyle = dfAnchorStyle; ((dfControl)self).isEnabled = true; ((dfControl)self).isVisible = true; ((dfControl)self).isInteractive = true; ((dfControl)self).tooltip = ""; ((dfControl)self).pivot = (dfPivotPoint)0; ((dfControl)self).zindex = -2; ((dfControl)self).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)self).disabledColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)self).size = size; ((dfControl)self).minSize = size; ((dfControl)self).maxSize = size; ((dfControl)self).clipChildren = false; ((dfControl)self).inverseClipChildren = false; ((dfControl)self).tabIndex = 2; ((dfControl)self).canFocus = false; ((dfControl)self).autoFocus = false; ((dfControl)self).layout = new AnchorLayout(dfAnchorStyle) { margins = new dfAnchorMargins { bottom = 0f, left = 0f, right = 0f, top = 0f }, owner = (dfControl)(object)self }; ((dfControl)self).renderOrder = 30; ((dfControl)self).isLocalized = false; ((dfControl)self).hotZoneScale = Vector2.one; ((dfControl)self).allowSignalEvents = true; ((dfControl)self).PrecludeUpdateCycle = false; self.atlas = defaultAtlas; ((dfControl)self).isControlClipped = false; self.backgroundColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.padding = new RectOffset(0, 0, 0, 0); } public static void AssignDefaultPresets(this dfLabel self, dfAtlas defaultAtlas, dfFontBase defaultFont) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Expected O, but got Unknown ((dfControl)self).anchorStyle = (dfAnchorStyle)65; ((dfControl)self).isEnabled = true; ((dfControl)self).isVisible = true; ((dfControl)self).isInteractive = true; ((dfControl)self).pivot = (dfPivotPoint)4; ((dfControl)self).tooltip = ""; ((dfControl)self).pivot = (dfPivotPoint)0; ((dfControl)self).zindex = -2; ((dfControl)self).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)self).disabledColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)self).size = new Vector2(486f, 42f); ((dfControl)self).minSize = Vector2.zero; ((dfControl)self).maxSize = Vector2.zero; ((dfControl)self).clipChildren = false; ((dfControl)self).inverseClipChildren = false; ((dfControl)self).tabIndex = 2; ((dfControl)self).canFocus = false; ((dfControl)self).autoFocus = false; ((dfControl)self).isControlClipped = false; ((dfControl)self).layout = new AnchorLayout((dfAnchorStyle)65) { margins = new dfAnchorMargins { bottom = 0f, left = 0f, right = 0f, top = 0f }, owner = (dfControl)(object)self }; ((dfControl)self).renderOrder = 0; ((dfControl)self).IsLocalized = false; ((dfControl)self).hotZoneScale = Vector2.one; ((dfControl)self).allowSignalEvents = true; ((dfControl)self).PrecludeUpdateCycle = false; self.atlas = defaultAtlas; self.font = defaultFont; self.backgroundSprite = ""; self.backgroundColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.autoSize = false; self.autoHeight = false; self.wordWrap = false; self.text = ""; self.bottomColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.align = (TextAlignment)0; self.vertAlign = (dfVerticalAlignment)0; self.textScale = 3f; self.textScaleMode = (dfTextScaleMode)0; self.charSpacing = 0; self.colorizeSymbols = false; self.processMarkup = true; self.outline = false; self.outlineWidth = 1; self.enableGradient = false; self.outlineColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.shadow = false; self.shadowColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.shadowOffset = new Vector2(1f, -1f); self.padding = new RectOffset(0, 0, 0, 0); self.tabSize = 48; self.MaintainJapaneseFont = false; self.MaintainKoreanFont = false; self.MaintainRussianFont = false; ((dfControl)self).isControlClipped = false; } public static void AssignDefaultPresets(this dfButton self, dfAtlas defaultAtlas, dfFontBase defaultFont) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) ((dfControl)self).isEnabled = true; ((dfControl)self).pivot = (dfPivotPoint)4; ((dfControl)self).renderOrder = 30; ((dfControl)self).isLocalized = false; ((dfInteractiveBase)self).atlas = defaultAtlas; ((dfInteractiveBase)self).Atlas = defaultAtlas; self.font = defaultFont; self.state = (ButtonState)0; self.group = null; self.text = ""; self.hoverTextPixelOffset = -9; self.downTextPixelOffset = -12; self.textAlign = (TextAlignment)1; self.vertAlign = (dfVerticalAlignment)0; self.normalColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.textColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.hoverText = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.pressedText = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.focusText = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.disabledText = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.hoverColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.pressedColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.focusColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.textScale = 0.6f; self.wordWrap = false; self.padding = new RectOffset(0, 0, 0, 0); self.textShadow = false; self.shadowColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); self.shadowOffset = new Vector2(1f, -1f); self.autoSize = false; self.clickWhenSpacePressed = true; self.forceUpperCase = false; self.manualStateControl = false; ((dfControl)self).isControlClipped = false; } public static dfButton CreateBlankDfButton(this GameObject obj, Vector2 size, dfAnchorStyle dfAnchor, dfAnchorMargins margins) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_008b: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) dfButton val = obj.AddComponent(); ((dfControl)val).anchorStyle = dfAnchor; ((dfControl)val).isEnabled = true; ((dfControl)val).isVisible = true; ((dfControl)val).isInteractive = true; ((dfControl)val).tooltip = ""; ((dfControl)val).pivot = (dfPivotPoint)4; ((dfControl)val).zindex = -2; ((dfControl)val).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val).disabledColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val).size = size; ((dfControl)val).minSize = size; ((dfControl)val).maxSize = size; ((dfControl)val).clipChildren = false; ((dfControl)val).inverseClipChildren = false; ((dfControl)val).tabIndex = 2; ((dfControl)val).canFocus = false; ((dfControl)val).autoFocus = false; ((dfControl)val).layout = new AnchorLayout(dfAnchor) { margins = margins, owner = (dfControl)(object)val }; ((dfControl)val).renderOrder = 20; ((dfControl)val).isLocalized = false; val.font = null; ((dfControl)val).hotZoneScale = Vector2.one; ((dfControl)val).allowSignalEvents = true; ((dfControl)val).PrecludeUpdateCycle = false; ((dfControl)val).isControlClipped = false; return val; } public static dfLabel CreateBlankDfLabel(this GameObject obj, Vector2 size, dfAnchorStyle dfAnchor, dfAnchorMargins margins) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_008b: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //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) dfLabel val = obj.AddComponent(); ((dfControl)val).anchorStyle = dfAnchor; ((dfControl)val).isEnabled = true; ((dfControl)val).isVisible = true; ((dfControl)val).isInteractive = true; ((dfControl)val).tooltip = ""; ((dfControl)val).pivot = (dfPivotPoint)0; ((dfControl)val).zindex = -2; ((dfControl)val).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val).disabledColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val).size = size; ((dfControl)val).minSize = size; ((dfControl)val).maxSize = size; ((dfControl)val).clipChildren = false; ((dfControl)val).inverseClipChildren = false; ((dfControl)val).tabIndex = 2; ((dfControl)val).canFocus = true; ((dfControl)val).autoFocus = false; ((dfControl)val).layout = new AnchorLayout(dfAnchor) { margins = margins, owner = (dfControl)(object)val }; ((dfControl)val).renderOrder = 50; ((dfControl)val).isLocalized = false; ((dfControl)val).hotZoneScale = Vector2.one; ((dfControl)val).allowSignalEvents = true; ((dfControl)val).PrecludeUpdateCycle = false; val.font = null; ((dfControl)val).isControlClipped = false; return val; } } internal class StarterGunSelectUIController : MonoBehaviour { internal class RandomGunSelectButton : UpgradeUISelectButtonController { public override bool IsUnlocked() { IEnumerable source = UI_Frame.GetComponent().ButtonControllers_Layers.Where((UpgradeUISelectButtonController self) => self.IsUnlockedWeapon()); if (source.Count() > 0) { return true; } return false; } public override int ReturnGun(ModulePrinterCore c) { IEnumerable source = UI_Frame.GetComponent().ButtonControllers_Layers.Where((UpgradeUISelectButtonController self) => self.IsUnlockedWeapon()); if (source.Count() > 0) { return BraveUtility.RandomElement(source.ToList()).ReturnGun(c); } return base.ReturnGun(c); } } public class UpgradeUISelectButtonController : MonoBehaviour { public enum UpgradeType { Minor_Upgrade, Major_Upgrade, Different_Gun, Default_Gun } public bool overrideCanBeSelected = false; public bool IsFiller = false; public CustomDungeonFlags FlagToCheck = CustomDungeonFlags.NONE; public string Label_Name = null; public string Label_Press = null; public string Label_Hover = null; public string Upgrade_Description = "Blah Blah Blah"; public string Unlock_Name = "[LOCKED]"; public string Unlock_Description = "Blah Blah Blah"; public string Lock_Label = "ui_button_locked"; public string Lock_Label_Press = "ui_button_locked_pressed"; public string Lock_Label_Hover = "ui_button_locked_highlighted"; public string Name_Label_Sprite_Name = "name_label_WIP"; public bool Player_Using_Alt_Skin = false; public string Label_Name_Alt = null; public string Label_Press_Alt = null; public string Label_Hover_Alt = null; public string Lock_Label_Alt = "ui_button_locked_alt"; public string Lock_Label_Press_Alt = "ui_button_locked_pressed_alt"; public string Lock_Label_Hover_Alt = "ui_button_locked_highlighted_alt"; public string Name_Label_Sprite_Name_Alt = "name_label_WIP_alt"; public string Damage_Description = StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); public string FireRate_Description = StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); public string Reload_Description = StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); public string Shotspeed_Description = StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); public string Clipsize_Description = StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); public string Additional_Notes = ""; public UpgradeType upgradeType = UpgradeType.Minor_Upgrade; public int GunID = DefaultArmCannon.ID; public int AltGunID = -1; public dfButton df_Button; public int Page = 0; public int Entry = 0; public Func OverrideUnlock; public void Start() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown df_Button = ((Component)this).gameObject.GetComponent(); UpdateSprites(); ((dfControl)df_Button).MouseEnter += (MouseEventHandler)delegate { if (((Behaviour)df_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)this).gameObject); } }; ((dfControl)df_Button).Click += (MouseEventHandler)delegate { if (((Behaviour)df_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_FS_slipper_stone_01", ((Component)this).gameObject); } }; } public void UpdateSprites() { bool flag = IsUnlocked(); ((dfInteractiveBase)df_Button).backgroundSprite = ((!flag) ? ReturnAltSelection(Lock_Label, Lock_Label_Alt) : ReturnAltSelection(Label_Name, Label_Name_Alt)); ((dfInteractiveBase)df_Button).disabledSprite = ((!flag) ? ReturnAltSelection(Lock_Label, Lock_Label_Alt) : ReturnAltSelection(Label_Name, Label_Name_Alt)); ((dfInteractiveBase)df_Button).hoverSprite = ((!flag) ? ReturnAltSelection(Lock_Label_Hover, Lock_Label_Hover_Alt) : ReturnAltSelection(Label_Hover, Label_Hover_Alt)); ((dfInteractiveBase)df_Button).focusSprite = ((!flag) ? ReturnAltSelection(Lock_Label_Hover, Lock_Label_Hover_Alt) : ReturnAltSelection(Label_Hover, Label_Hover_Alt)); df_Button.pressedSprite = ((!flag) ? ReturnAltSelection(Lock_Label_Press, Lock_Label_Press_Alt) : ReturnAltSelection(Label_Press, Label_Press_Alt)); ((dfControl)df_Button).Invalidate(); ((dfControl)df_Button).renderOrder = 3000; } public string ReturnAltSelection(string def, string alt) { if (Player_Using_Alt_Skin && alt != null) { return alt; } return def; } public virtual bool IsUnlocked() { if (OverrideUnlock != null) { return OverrideUnlock(); } if (FlagToCheck != 0) { return SaveAPIManager.GetFlag(FlagToCheck); } return true; } public virtual bool IsUnlockedWeapon() { if (IsFiller) { return false; } if (OverrideUnlock != null) { return OverrideUnlock(); } if (FlagToCheck != 0) { return SaveAPIManager.GetFlag(FlagToCheck); } return true; } public virtual int ReturnGun(ModulePrinterCore c) { if ((Object)(object)c == (Object)null) { return GunID; } if ((Object)(object)c.ModularGunController == (Object)null) { return GunID; } return (!c.ModularGunController.isAlt) ? GunID : ((AltGunID != -1) ? AltGunID : GunID); } public string ReturnNameLabel() { return (!Player_Using_Alt_Skin) ? Name_Label_Sprite_Name : (Name_Label_Sprite_Name_Alt ?? Name_Label_Sprite_Name); } } public class AltSkinStringStorage : MonoBehaviour { public string df_label_string = null; public string df_button_default_string = null; public string df_button_pressed_string = null; public string df_button_highlighted_string = null; public string df_button_inactive_string = null; } public static StarterGunSelectUIController Inst; public static dfAtlas def; private static List canvasScalers = new List(); public static List allStarterIDs = new List { DefaultArmCannon.ID }; public static List allAltStarterIDs = new List { DefaultArmCannonAlt.ID }; public Action OnUsed; public Action OnClosed; private bool CanBeUsed = true; private static dfAtlas storedAtlas = GameUIRoot.Instance.Manager.DefaultAtlas; private static Vector2[] preDeterminedOffsets = (Vector2[])(object)new Vector2[10] { new Vector2(556f, 855f), new Vector2(748f, 855f), new Vector2(940f, 855f), new Vector2(1132f, 855f), new Vector2(1324f, 855f), new Vector2(556f, 645f), new Vector2(748f, 645f), new Vector2(940f, 645f), new Vector2(1132f, 645f), new Vector2(1324f, 645f) }; public int Current_Page = 0; public UpgradeUISelectButtonController currentlySelectedButton = null; public List ButtonControllers_Layers = new List(); public dfPanel Name_Panel; public static GameObject UI_Frame; public UpgradeUISelectButtonController default_gun_button; public UpgradeUISelectButtonController random_gun_button; public PlayerController interactor; public dfLabel statDescrptionLabel; public dfLabel name_and_Description_Label; public dfButton Close_Button; public dfButton Accept_Button; public dfButton Left_Button; public dfButton Right_Button; private bool Camera_Lock; private bool Is_Active = false; public static List TipsOfTheDay = new List { "Higher tier weapons have a\ngreater chance to give higher\ntier modules.", "Upgrade your power by\nhovering over the " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " label\nin your inventory.\nRemember, it's not free.", "Scrap is more useful than\nit may seem!\nRemember to scrap useless\nitems to gain potential benefit\nlater.", "Some Modules are more niche\nthan others.\nRemember to think about\nwhich ones you're getting.", StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " is a very valuable resource,\nand getting requires lots of Scrap\nto upgrade your reserves.", "Nearly all health upgrade items\ngrant extra " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + ", but makes it\nharder to upgrade your Power\nin the future.", "Master Rounds are very valuable!\nThey grant extra " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + " and do NOT\nincrease the cost of\nupgrading your " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + "!", "Remember that you can switch your\nactive items Mode by pressing\nReload on a full clip.", "Certain alternate weapons may do\nbetter with Modules that may\nlooknot very useful at first glance.", "Modules need to be powered\nbefore they give any benefit.\nRemember to power them in your\nInventory.", "Look out after your " + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + "!\nHigher tier modules use more" + StaticColorHexes.AddColorToLabelString("Power", StaticColorHexes.Light_Blue_Color_Hex) + "\nmake sure to manage it well!", "Certain Modules may give some\nbenefit without even powering them,\nbut only to a limited extent.", "Time still flows when you\nare in your inventory,\ncheck if the coast is clear\nbeforehand.", StaticColorHexes.AddColorToLabelString("FATAL ERROR GETTING TIP\n\nFAIL AT: 17", StaticColorHexes.Red_Color_Hex), "Powering duplicate Modules\nuses less power than usual.\nKeep that in mind when choosing\na new module.", "Modules of specific tiers use\nspecific amounts of power.\nHowever, some nicher modules\nuse less power\nthan usual.", "Variety is the spice of life,\ntry to diversify your builds!", "Modular cannot do handstands,\nas they only have one hand and\ncant balance well on it.", "You can depower Modules if\nyou want to change up your build.", "You can see what a Module does\nby clicking on it in your\ninventory.\nAternatively you can check the\nAmmonomicon." }; private static void ApplyCanvasScaler(GameObject gameObject) { DFScaleFixer val = gameObject.AddComponent(); val.m_manager = GameUIRoot.Instance.Manager; } public static void Init() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_039f: 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_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Expected O, but got Unknown //IL_10c1: Unknown result type (might be due to invalid IL or missing references) //IL_10c7: Unknown result type (might be due to invalid IL or missing references) //IL_10cc: Unknown result type (might be due to invalid IL or missing references) //IL_10da: Unknown result type (might be due to invalid IL or missing references) //IL_10e8: Unknown result type (might be due to invalid IL or missing references) //IL_10f3: Unknown result type (might be due to invalid IL or missing references) //IL_1103: Expected O, but got Unknown //IL_11df: Unknown result type (might be due to invalid IL or missing references) //IL_11e5: Unknown result type (might be due to invalid IL or missing references) //IL_11ea: Unknown result type (might be due to invalid IL or missing references) //IL_11f8: Unknown result type (might be due to invalid IL or missing references) //IL_1206: Unknown result type (might be due to invalid IL or missing references) //IL_1211: Unknown result type (might be due to invalid IL or missing references) //IL_1221: Expected O, but got Unknown //IL_1306: Unknown result type (might be due to invalid IL or missing references) //IL_130c: Unknown result type (might be due to invalid IL or missing references) //IL_1311: Unknown result type (might be due to invalid IL or missing references) //IL_131f: Unknown result type (might be due to invalid IL or missing references) //IL_132d: Unknown result type (might be due to invalid IL or missing references) //IL_1338: Unknown result type (might be due to invalid IL or missing references) //IL_1348: Expected O, but got Unknown //IL_140a: Unknown result type (might be due to invalid IL or missing references) //IL_1438: Unknown result type (might be due to invalid IL or missing references) //IL_1453: Unknown result type (might be due to invalid IL or missing references) //IL_1458: Unknown result type (might be due to invalid IL or missing references) //IL_1471: Unknown result type (might be due to invalid IL or missing references) //IL_1476: Unknown result type (might be due to invalid IL or missing references) //IL_1485: Unknown result type (might be due to invalid IL or missing references) //IL_14b6: Unknown result type (might be due to invalid IL or missing references) //IL_14bb: Unknown result type (might be due to invalid IL or missing references) //IL_14bc: Unknown result type (might be due to invalid IL or missing references) //IL_14c1: Unknown result type (might be due to invalid IL or missing references) //IL_14e5: Unknown result type (might be due to invalid IL or missing references) //IL_14f9: Unknown result type (might be due to invalid IL or missing references) //IL_1504: Unknown result type (might be due to invalid IL or missing references) //IL_1514: Expected O, but got Unknown //IL_1514: Unknown result type (might be due to invalid IL or missing references) //IL_1521: Expected O, but got Unknown //IL_1523: Unknown result type (might be due to invalid IL or missing references) //IL_1528: Unknown result type (might be due to invalid IL or missing references) //IL_1534: Unknown result type (might be due to invalid IL or missing references) //IL_1540: Unknown result type (might be due to invalid IL or missing references) //IL_154c: Unknown result type (might be due to invalid IL or missing references) //IL_155d: Expected O, but got Unknown //IL_1582: Unknown result type (might be due to invalid IL or missing references) //IL_15b0: Unknown result type (might be due to invalid IL or missing references) //IL_15cb: Unknown result type (might be due to invalid IL or missing references) //IL_15d0: Unknown result type (might be due to invalid IL or missing references) //IL_15fe: Unknown result type (might be due to invalid IL or missing references) //IL_1603: Unknown result type (might be due to invalid IL or missing references) //IL_1612: Unknown result type (might be due to invalid IL or missing references) //IL_162e: Unknown result type (might be due to invalid IL or missing references) //IL_1633: Unknown result type (might be due to invalid IL or missing references) //IL_1634: Unknown result type (might be due to invalid IL or missing references) //IL_1639: Unknown result type (might be due to invalid IL or missing references) //IL_165d: Unknown result type (might be due to invalid IL or missing references) //IL_1671: Unknown result type (might be due to invalid IL or missing references) //IL_167c: Unknown result type (might be due to invalid IL or missing references) //IL_168c: Expected O, but got Unknown //IL_168c: Unknown result type (might be due to invalid IL or missing references) //IL_1699: Expected O, but got Unknown //IL_169b: Unknown result type (might be due to invalid IL or missing references) //IL_16a0: Unknown result type (might be due to invalid IL or missing references) //IL_16ac: Unknown result type (might be due to invalid IL or missing references) //IL_16b8: Unknown result type (might be due to invalid IL or missing references) //IL_16c4: Unknown result type (might be due to invalid IL or missing references) //IL_16d5: Expected O, but got Unknown //IL_1706: Unknown result type (might be due to invalid IL or missing references) //IL_1715: Unknown result type (might be due to invalid IL or missing references) //IL_171a: Unknown result type (might be due to invalid IL or missing references) //IL_171b: Unknown result type (might be due to invalid IL or missing references) //IL_1720: Unknown result type (might be due to invalid IL or missing references) //IL_172e: Unknown result type (might be due to invalid IL or missing references) //IL_173c: Unknown result type (might be due to invalid IL or missing references) //IL_1747: Unknown result type (might be due to invalid IL or missing references) //IL_1757: Expected O, but got Unknown //IL_1757: Unknown result type (might be due to invalid IL or missing references) //IL_1764: Expected O, but got Unknown dfFontBase modularFont = StaticCollections.ModularFont; AssetBundle modularAssetBundle = Module.ModularAssetBundle; dfAtlas modularUIAtlas = StaticCollections.ModularUIAtlas; dfAtlas defaultAtlas = modularUIAtlas; Texture val = modularAssetBundle.LoadAsset("ModularUIAtlas"); modularUIAtlas.Texture.Apply(); modularUIAtlas.generator = (TextureAtlasGenerator)0; ((Behaviour)modularUIAtlas).enabled = true; def = modularUIAtlas; UI_Frame = PrefabBuilder.BuildObject("Frame_Modular_UI"); UI_Frame.layer = 24; AltSkinStringStorage altSkinStringStorage = UI_Frame.AddComponent(); altSkinStringStorage.df_label_string = "ui_template_bg_alt"; dfPanel val2 = UI_Frame.AddComponent(); ((dfControl)val2).cachedManager = GameUIRoot.Instance.Manager; ((dfControl)val2).anchorStyle = (dfAnchorStyle)15; ((dfControl)val2).isEnabled = false; ((dfControl)val2).isVisible = true; ((dfControl)val2).isInteractive = true; ((dfControl)val2).tooltip = ""; ((dfControl)val2).pivot = (dfPivotPoint)0; ((dfControl)val2).zindex = -1; ((dfControl)val2).color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val2).disabledColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((dfControl)val2).size = new Vector2(640f, 360f); ((dfControl)val2).minSize = Vector2.zero; ((dfControl)val2).maxSize = Vector2.zero; ((dfControl)val2).clipChildren = false; ((dfControl)val2).inverseClipChildren = false; ((dfControl)val2).tabIndex = 1; ((dfControl)val2).canFocus = false; ((dfControl)val2).autoFocus = false; ((dfControl)val2).layout = new AnchorLayout((dfAnchorStyle)15) { margins = new dfAnchorMargins { bottom = 0f, left = 0f, right = 0f, top = 0f }, owner = (dfControl)(object)val2 }; ((dfControl)val2).renderOrder = 30; ((dfControl)val2).isLocalized = true; ((dfControl)val2).hotZoneScale = Vector2.one; ((dfControl)val2).allowSignalEvents = true; ((dfControl)val2).PrecludeUpdateCycle = false; val2.Atlas = modularUIAtlas; val2.atlas = modularUIAtlas; val2.backgroundSprite = "ui_template_bg"; val2.backgroundColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); ((Component)val2).gameObject.SetActive(true); float num = (GameManager.Options.SmallUIEnabled ? 1 : 2); StarterGunSelectUIController starterGunSelectUIController = UI_Frame.AddComponent(); GameObject val3 = PrefabBuilder.BuildObject("CloseButton"); val3.layer = 24; val3.transform.parent = UI_Frame.transform; dfButton val4 = val3.CreateBlankDfButton(new Vector2(160f / num, 160f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = 1275f / num, left = 530f / num, right = 0f, top = 0f }); val4.AssignDefaultPresets(modularUIAtlas, modularFont); ((dfInteractiveBase)val4).backgroundSprite = "ui_button_close"; ((dfInteractiveBase)val4).hoverSprite = "ui_button_close_highlighted"; ((dfInteractiveBase)val4).disabledSprite = "ui_button_close_pressed"; ((dfInteractiveBase)val4).focusSprite = "UI_Button_Close"; val4.pressedSprite = "UI_Button_Close_Pressed"; AltSkinStringStorage altSkinStringStorage2 = ((Component)val4).gameObject.AddComponent(); altSkinStringStorage2.df_button_default_string = "ui_button_close_alt"; altSkinStringStorage2.df_button_inactive_string = "ui_button_close_alt"; altSkinStringStorage2.df_button_pressed_string = "ui_button_close_pressed_alt"; altSkinStringStorage2.df_button_highlighted_string = "ui_button_close_highlighted_alt"; starterGunSelectUIController.Close_Button = val4; ((Component)val4).gameObject.SetActive(false); GameObject val5 = PrefabBuilder.BuildObject("Default_Gun_Button"); val5.transform.parent = UI_Frame.transform; dfButton val6 = val5.CreateBlankDfButton(new Vector2(160f / num, 160f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = 1250f / num, left = 936f / num, right = 0f, top = 0f }); val6.AssignDefaultPresets(modularUIAtlas, modularFont); ((dfInteractiveBase)val6).backgroundSprite = "ui_button_default_gun"; ((dfInteractiveBase)val6).hoverSprite = "ui_button_default_gun_highlighted"; ((dfInteractiveBase)val6).disabledSprite = "ui_button_default_gun"; ((dfInteractiveBase)val6).focusSprite = "ui_button_default_gun_highlighted"; val6.pressedSprite = "ui_button_default_gun_pressed"; ((dfInteractiveBase)val6).atlas = modularUIAtlas; ((Component)val6).gameObject.SetActive(false); UpgradeUISelectButtonController upgradeUISelectButtonController = val5.AddComponent(); upgradeUISelectButtonController.df_Button = val6; upgradeUISelectButtonController.FlagToCheck = CustomDungeonFlags.NOLLA; upgradeUISelectButtonController.upgradeType = UpgradeUISelectButtonController.UpgradeType.Default_Gun; upgradeUISelectButtonController.Upgrade_Description = "Simple, yet powerful weapon.\nFavoured by the Modular."; upgradeUISelectButtonController.Label_Name = "ui_button_default_gun"; upgradeUISelectButtonController.Label_Press = "ui_button_default_gun_pressed"; upgradeUISelectButtonController.Label_Hover = "ui_button_default_gun_highlighted"; upgradeUISelectButtonController.Label_Name_Alt = "ui_button_default_gun_alt"; upgradeUISelectButtonController.Label_Press_Alt = "ui_button_default_gun_pressed_alt"; upgradeUISelectButtonController.Label_Hover_Alt = "ui_button_default_gun_highlighted_alt"; upgradeUISelectButtonController.Name_Label_Sprite_Name = "name_label_defualtcannon"; upgradeUISelectButtonController.Name_Label_Sprite_Name_Alt = "name_label_defualtcannon_alt"; starterGunSelectUIController.default_gun_button = upgradeUISelectButtonController; GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "PeaShooter_Button", "ui_button_peashooter_gun", "ui_button_peashooter_gun_highlighted", "ui_button_peashooter_gun_pressed", CustomDungeonFlags.BEAT_FLOOR_3, ModularPeaShooter.GunID, "Weaker, but allows for extra power.", StaticColorHexes.AddColorToLabelString("Low", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Light_Green_Hex), StaticColorHexes.AddColorToLabelString("Lower Than Average", StaticColorHexes.Yellow_Hex), null, StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Light_Green_Hex), "Grants the user 1 additional." + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.POWER), "name_label_peashooter", ModularPeaShooterAlt.GunID, "ui_button_peashooter_gun_alt", "ui_button_peashooter_gun_highlighted_alt", "ui_button_peashooter_gun_pressed_alt", "name_label_peashooter_alt", "As Modular, reach and beat\nthe Black Powder Mines."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "ScatterCannon_Button", "ui_button_scattercannon_gun", "ui_button_scattercannon_gun_highlighted", "ui_button_scattercannon_gun_pressed", CustomDungeonFlags.BEAT_FLOOR_3, ScatterBlast.ID, "A basic scatter cannon.\nFires 7 pellets with one shot.", StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Slower Than Average", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Lower Than Average", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Low", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex), "Has high spread, and lower range.", "name_label_scattercannon", ScatterBlastAlt.ID, "ui_button_scattercannon_gun_alt", "ui_button_scattercannon_gun_highlighted_alt", "ui_button_scattercannon_gun_pressed_alt", "name_label_scattercannon_alt", "As Modular, reach and beat\nthe Black Powder Mines."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "QuadBurster_Button", "ui_button_quadburster_gun", "ui_button_quadburster_gun_highlighted", "ui_button_quadburster_gun_pressed", CustomDungeonFlags.BEAT_FLOOR_3, AutoBurst.ID, "A fully automatic\nburst weapon.", StaticColorHexes.AddColorToLabelString("Lower Than Average", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Higher Than Average", StaticColorHexes.Light_Green_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Faster Than Average", StaticColorHexes.Light_Green_Hex), "Fast, but uncontrollable burst.", "name_label_QuadBurster", AutoBurstAlt.ID, "ui_button_quadburster_gun_alt", "ui_button_quadburster_gun_highlighted_alt", "ui_button_quadburster_gun_pressed_alt", "name_label_QuadBurster_alt", "As Modular, reach and beat\nthe Black Powder Mines."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "EnergyBlaster_Button", "ui_button_charger_gun", "ui_button_charger_gun_highlighted", "ui_button_charger_gun_pressed", CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, ChargeBlaster.GunID, "A charge-shot gun. Charge up\nto fire a fast, high damage shot.", StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Below Average", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Below Average", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Green_Hex), "Make your shots count.", "name_label_energycharger", ChargeBlasterAlt.GunID, "ui_button_charger_gun_alt", "ui_button_charger_gun_highlighted_alt", "ui_button_charger_gun_pressed_alt", "name_label_charger_alt", "As Modular, reach and beat\nthe Forge."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "PrecisionRifle_Button", "ui_button_precisionrifle_gun", "ui_button_precisionrifle_gun_highlighted", "ui_button_precisionrifle_gun_pressed", CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, PresicionRifle.ID, "A slow firing, accurate rifle.\nCan " + StaticColorHexes.AddColorToLabelString("pierce", StaticColorHexes.Orange_Hex) + " enemies.", StaticColorHexes.AddColorToLabelString("Very High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Very Low", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Very Fast", StaticColorHexes.Green_Hex), "Line up shots to kill groups.", "name_label_PrecisionRifle", PresicionRifleAlt.ID, "ui_button_precisionrifle_gun_alt", "ui_button_precisionrifle_gun_highlighted_alt", "ui_button_precisionrifle_gun_pressed_alt", "name_label_PrecisionRifle_alt", "As Modular, reach and beat\nthe Forge."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "Suppressor_Button", "ui_button_suppressor_gun", "ui_button_suppressor_gun_highlighted", "ui_button_suppressor_gun_pressed", CustomDungeonFlags.BEAT_LICH_AS_MODULAR, Suppressor.GunID, "Starts off slow, but\nfire rate quickly increases.", StaticColorHexes.AddColorToLabelString("Very Low", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Very High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex) + StaticColorHexes.AddColorToLabelString(", increases fast.", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Light_Green_Hex), "Hold the trigger for as long as possible.", "name_label_minigun", SuppressorAlt.GunID, "ui_button_suppressor_gun_alt", "ui_button_suppressor_gun_highlighted_alt", "ui_button_suppressor_gun_pressed_alt", "name_label_suppressor_alt", "As Modular, reach and beat\nBullet Hell."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "Hammer_Button", "ui_button_hammer_gun", "ui_button_hammer_gun_highlighted", "ui_button_hammer_gun_pressed", CustomDungeonFlags.BEAT_LICH_AS_MODULAR, TheHammer.ID, "Has an active reload that\ninstantly reloads the clip.", StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex) + StaticColorHexes.AddColorToLabelString(" unless perfect.", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Very Low", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Below Average", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Light_Green_Hex), "Try avoid tunnel visioning your reloads.", "name_label_hammer", TheHammerAlt.ID, "ui_button_hammer_gun_alt", "ui_button_hammer_gun_highlighted_alt", "ui_button_hammer_gun_pressed_alt", "name_label_hammer_alt", "As Modular, reach and beat\nBullet Hell."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "ApolloAndArtemisButton", "ui_button_apollo_gun", "ui_button_apollo_gun_highlighted", "ui_button_apollo_gun_pressed", CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR, Apollo.GunID, "Charge up to change accuracy.", StaticColorHexes.AddColorToLabelString("Lower Than Average", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Low", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Lime_Green_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Light_Green_Hex), "Charge up only as much as you need to.", "name_label_apollo", Artemis.GunID, "ui_button_artemis_gun_alt", "ui_button_artemis_gun_highlighted_alt", "ui_button_artemis_gun_pressed_alt", "name_label_artemis", "As Modular, beat the\nOld King."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "GravityPulsarGun", "ui_button_grav_gun", "ui_button_grav_gun_highlighted", "ui_button_grav_gun_pressed", CustomDungeonFlags.BEAT_RAT_AS_MODULAR, GravityPulsar.ID, "Creates Rifts that attracts\nits own projectiles.", StaticColorHexes.AddColorToLabelString("Lower Than Average", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Lower Than Average", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Very Fast", StaticColorHexes.Green_Hex), "Group up enemies for best results.", "name_label_gravgun", GravityPulsarAlt.ID, "ui_button_grav_gun_alt", "ui_button_grav_gun_highlighted_alt", "ui_button_grav_gun_pressed_alt", "name_label_gravgun_alt", "As Modular, beat the\nResourceful Rat."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "LightLanceButton", "ui_button_lance_gun", "ui_button_lance_gun_highlighted", "ui_button_lance_gun_pressed", CustomDungeonFlags.PAST, LightLance.ID, "Melee weapon.\nCharge up to parry projectiles.", StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Slower Than Average", StaticColorHexes.Light_Orange_Hex), StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Light_Green_Hex), StaticColorHexes.AddColorToLabelString("Fast", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("N/A | Very Slow", StaticColorHexes.Red_Color_Hex), "Parrying Faster Bullets deals more damage.", "name_label_lightlance", LightLanceAlt.ID, "ui_button_lance_gun_alt", "ui_button_lance_gun_highlighted_alt", "ui_button_lance_gun_pressed_alt", "name_label_lightlance_alt", "As Modular, beat your\nPast."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "ShrapnelLauncherButton", "ui_button_shrapnel_gun", "ui_button_shrapnel_gun_highlighted", "ui_button_shrapnel_gun_pressed", CustomDungeonFlags.LEAD_GOD_AS_MODULAR, FlakCannon.GunID, "Projectile splits into multiple smaller\nprojectiles that " + StaticColorHexes.AddColorToLabelString("gain your effects", StaticColorHexes.Green_Hex) + ".", StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Slower", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Small", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Light_Green_Hex), "Does not actually consume your Scrap.", "name_label_shrapnel", FlakCannonAlt.GunID, "ui_button_shrapnel_gun_alt", "ui_button_shrapnel_gun_highlighted_alt", "ui_button_shrapnel_gun_pressed_alt", "name_label_shrapnel_alt", "As Modular, achieve\nLead God.\n\n(" + StaticColorHexes.AddColorToLabelString("Duplicates and Modded\nMaster Rounds Do Not Count.", StaticColorHexes.Red_Color_Hex) + ")"); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "NukeCannonButton", "ui_button_nuke_gun", "ui_button_nuke_gun_highlighted", "ui_button_nuke_gun_pressed", CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR, BigNuke.GunID, "Fires kinetic warheads that deal\n" + StaticColorHexes.AddColorToLabelString("massive", StaticColorHexes.Light_Orange_Hex) + " AOE Damage.", StaticColorHexes.AddColorToLabelString("*EXTREMELY High*", StaticColorHexes.White_Hex), StaticColorHexes.AddColorToLabelString("*EXTEREMELY Slow*", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("*EXTREMELY Small*", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), "Massive Power Drain, has -2 starting " + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.POWER), "name_label_nuke", BigNukeAlt.GunID, "ui_button_nuke_gun_alt", "ui_button_nuke_gun_highlighted_alt", "ui_button_nuke_gun_pressed_alt", "name_label_nuke_alt", "As Modular, beat the\nAdvanced Dragun."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "FlameThrowerButton", "ui_button_flamer_gun", "ui_button_flamer_gun_highlighted", "ui_button_flamer_gun_pressed", CustomDungeonFlags.BOSS_RUSH_AS_MODULAR, Flamethrower.ID, "A flamethrower that spews\npure hellfire.", StaticColorHexes.AddColorToLabelString("Low", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Very High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Very Fast", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Light_Green_Hex), "Melts through fire resistances.", "name_label_flamer", FlamethrowerAlt.ID, "ui_button_flamer_gun_alt", "ui_button_flamer_gun_highlighted_alt", "ui_button_flamer_gun_pressed_alt", "name_label_flamer_alt", "As Modular, complete Boss Rush."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "BarrierBuilderButton", "ui_button_shieldgen_gun", "ui_button_shieldgen_gun_highlighted", "ui_button_shieldgen_gun_pressed", CustomDungeonFlags.BLESSED_MODE, ShieldGenerator.GunID, "Charge up to create barriers that\ncapture bullets. Can be tap fired.", StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Light_Green_Hex), StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Low", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("Slow", StaticColorHexes.Orange_Hex), "Barriers can stick to each other.", "name_label_shieldgen", ShieldGeneratorAlt.GunID, "ui_button_shieldgen_gun_alt", "ui_button_shieldgen_gun_highlighted_alt", "ui_button_shieldgen_gun_pressed_alt", "name_label_shieldgen_alt", "As Modular, beat the Lich\non Blessed Mode."); GenerateNewGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "Fortifier", "ui_button_turret_gun", "ui_button_turret_gun_highlighted", "ui_button_turret_gun_pressed", CustomDungeonFlags.CHALLENGEMODE_DRAGUN, Fortifier.GunID, "Fire wall-mounted turrets\nthat inherit various stats.", StaticColorHexes.AddColorToLabelString("High (Turret)", StaticColorHexes.Green_Hex) + " | " + StaticColorHexes.AddColorToLabelString("High", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("Average (Turret)", StaticColorHexes.Light_Green_Hex) + " | " + StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Average (Turret)", StaticColorHexes.Light_Green_Hex) + " | " + StaticColorHexes.AddColorToLabelString("Single Shot", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Fast (Turret)", StaticColorHexes.Green_Hex) + " | " + StaticColorHexes.AddColorToLabelString("Very Slow", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("Average (Turret)", StaticColorHexes.Light_Green_Hex) + " | " + StaticColorHexes.AddColorToLabelString("Very Fast", StaticColorHexes.Green_Hex), "Start with 3 max active Turrets.", "name_label_turret", FortifierAlt.GunID, "ui_button_turret_gun_alt", "ui_button_turret_gun_highlighted_alt", "ui_button_turret_gun_pressed_alt", "name_label_turret_alt", "As Modular, beat Dragun\non Challenge Mode ."); GenerateFillerButtons(5, modularUIAtlas, modularFont, starterGunSelectUIController); starterGunSelectUIController.random_gun_button = GenerateRandomGunButton(modularUIAtlas, modularFont, starterGunSelectUIController, "RandomGunButton", "gun_button_random", "gun_button_random_highlighted", "gun_button_random_pressed", CustomDungeonFlags.NOLLA, "Selects a completely " + StaticColorHexes.AddColorToLabelString("r", StaticColorHexes.Red_Color_Hex) + StaticColorHexes.AddColorToLabelString("a", StaticColorHexes.Orange_Hex) + StaticColorHexes.AddColorToLabelString("n", StaticColorHexes.Yellow_Hex) + StaticColorHexes.AddColorToLabelString("d", StaticColorHexes.Green_Hex) + StaticColorHexes.AddColorToLabelString("o", StaticColorHexes.Blue_Color_Hex) + StaticColorHexes.AddColorToLabelString("m", StaticColorHexes.Purple_Hex) + "\nunlocked gun!", StaticColorHexes.AddColorToLabelString("? ? ?", StaticColorHexes.Red_Color_Hex), StaticColorHexes.AddColorToLabelString("? ? ?", StaticColorHexes.Yellow_Hex), StaticColorHexes.AddColorToLabelString("? ? ?", StaticColorHexes.Green_Hex), StaticColorHexes.AddColorToLabelString("? ? ?", StaticColorHexes.Orange_Hex), StaticColorHexes.AddColorToLabelString("? ? ?", StaticColorHexes.Blue_Color_Hex), "No tips, have fun!", "name_label_random", "gun_button_random_alt", "gun_button_random_highlighted_alt", "gun_button_random_pressed_alt", "name_label_random_alt", "If you see this, i fucked up."); starterGunSelectUIController.random_gun_button.Lock_Label = "gun_button_random_locked"; starterGunSelectUIController.random_gun_button.Lock_Label_Alt = "gun_button_random_locked_alt"; starterGunSelectUIController.random_gun_button.GunID = -1; GameObject val7 = PrefabBuilder.BuildObject("AcceptButton"); val7.transform.parent = UI_Frame.transform; dfButton val8 = val7.CreateBlankDfButton(new Vector2(640f / num, 160f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = 550f / num, left = 1680f / num, right = 0f, top = 0f }); val8.AssignDefaultPresets(modularUIAtlas, modularFont); ((dfInteractiveBase)val8).backgroundSprite = "ui_button_accept_active"; ((dfInteractiveBase)val8).hoverSprite = "ui_button_accept_highlight"; ((dfInteractiveBase)val8).disabledSprite = "ui_button_accept_active_1"; ((dfInteractiveBase)val8).focusSprite = "ui_button_accept_highlight"; val8.pressedSprite = "ui_button_accept_active_press"; ((dfInteractiveBase)val8).atlas = modularUIAtlas; AltSkinStringStorage altSkinStringStorage3 = ((Component)val8).gameObject.AddComponent(); altSkinStringStorage3.df_button_default_string = "ui_button_accept_active_alt"; altSkinStringStorage3.df_button_inactive_string = "ui_button_accept_active_1_alt"; altSkinStringStorage3.df_button_highlighted_string = "ui_button_accept_highlight_alt"; altSkinStringStorage3.df_button_pressed_string = "ui_button_accept_active_press_alt"; starterGunSelectUIController.Accept_Button = val8; ((Component)val8).gameObject.SetActive(false); GameObject val9 = PrefabBuilder.BuildObject("Left_Page_Button"); val9.transform.parent = UI_Frame.transform; dfButton val10 = val9.CreateBlankDfButton(new Vector2(80f / num, 80f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = 500f / num, left = 748f / num, right = 0f, top = 0f }); val10.AssignDefaultPresets(modularUIAtlas, modularFont); ((dfInteractiveBase)val10).backgroundSprite = "left_button_active"; ((dfInteractiveBase)val10).hoverSprite = "left_button_highlighted"; ((dfInteractiveBase)val10).disabledSprite = "left_button_inactive"; ((dfInteractiveBase)val10).focusSprite = "left_button_highlighted"; val10.pressedSprite = "left_button_pressed"; ((dfInteractiveBase)val10).atlas = modularUIAtlas; ((dfInteractiveBase)val10).Atlas = modularUIAtlas; ((Component)val10).gameObject.SetActive(false); AltSkinStringStorage altSkinStringStorage4 = ((Component)val10).gameObject.AddComponent(); altSkinStringStorage4.df_button_default_string = "left_button_active_alt"; altSkinStringStorage4.df_button_inactive_string = "left_button_inactive_alt"; altSkinStringStorage4.df_button_highlighted_string = "left_button_highlighted_alt"; altSkinStringStorage4.df_button_pressed_string = "left_button_pressed_alt"; starterGunSelectUIController.Left_Button = val10; GameObject val11 = PrefabBuilder.BuildObject("Right_Page_Button"); val11.transform.parent = UI_Frame.transform; dfButton val12 = val11.CreateBlankDfButton(new Vector2(80f / num, 80f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = 500f / num, left = 1180f / num, right = 0f, top = 0f }); val12.AssignDefaultPresets(modularUIAtlas, modularFont); ((dfInteractiveBase)val12).backgroundSprite = "right_button_active"; ((dfInteractiveBase)val12).hoverSprite = "right_button_highlighted"; ((dfInteractiveBase)val12).disabledSprite = "right_button_inactive"; ((dfInteractiveBase)val12).focusSprite = "right_button_highlighted"; val12.pressedSprite = "right_button_pressed"; ((dfInteractiveBase)val12).atlas = modularUIAtlas; ((Component)val12).gameObject.SetActive(false); AltSkinStringStorage altSkinStringStorage5 = ((Component)val12).gameObject.AddComponent(); altSkinStringStorage5.df_button_default_string = "right_button_active_alt"; altSkinStringStorage5.df_button_inactive_string = "right_button_inactive_alt"; altSkinStringStorage5.df_button_highlighted_string = "right_button_highlighted_alt"; altSkinStringStorage5.df_button_pressed_string = "right_button_pressed_alt"; starterGunSelectUIController.Right_Button = val12; dfLabel val13 = PrefabBuilder.BuildObject("StatDescriptionLabel_Object").AddComponent(); val13.PreventFontChanges = true; val13.m_cachedLanguage = (GungeonSupportedLanguages)0; ((Component)val13).gameObject.transform.parent = UI_Frame.transform; val13.AssignDefaultPresets(defaultAtlas, modularFont); ((dfControl)val13).anchorStyle = (dfAnchorStyle)6; ((dfControl)val13).color = new Color32((byte)155, (byte)235, (byte)199, byte.MaxValue); val13.shadow = true; val13.shadowOffset = new Vector2(1f, -0.5f); val13.ShadowColor = new Color32((byte)1, (byte)1, (byte)1, byte.MaxValue); val13.textScale = 2.9f * (0.95f / num); ((Component)val13).gameObject.SetActive(false); ((dfControl)val13).layout = new AnchorLayout((dfAnchorStyle)6) { margins = new dfAnchorMargins { bottom = 1020f / num - 1000f - (float)((num == 2f) ? 20 : 0), left = 1670f / num + 1000f, right = 0f, top = 0f }, owner = (dfControl)(object)val13 }; val13.padding = new RectOffset { bottom = -1000, top = -1000, left = -1000, right = -1000 }; starterGunSelectUIController.statDescrptionLabel = val13; dfLabel val14 = PrefabBuilder.BuildObject("NameDescriptionLabel_Object").AddComponent(); val14.PreventFontChanges = true; val14.m_cachedLanguage = (GungeonSupportedLanguages)0; ((Component)val14).gameObject.transform.parent = UI_Frame.transform; val14.AssignDefaultPresets(defaultAtlas, modularFont); ((dfControl)val14).anchorStyle = (dfAnchorStyle)6; ((dfControl)val14).color = new Color32((byte)155, (byte)235, (byte)199, byte.MaxValue); val14.textScale = 2.9f * (1.15f / num); val14.shadow = true; val14.shadowOffset = new Vector2(1f, -0.5f); val14.ShadowColor = new Color32((byte)1, (byte)1, (byte)1, byte.MaxValue); ((Component)val14).gameObject.SetActive(false); ((dfControl)val14).layout = new AnchorLayout((dfAnchorStyle)6) { margins = new dfAnchorMargins { bottom = 1140f / num - 1000f - (float)((num == 2f) ? 20 : 0), left = 1670f / num + 1000f, right = 0f, top = 0f }, owner = (dfControl)(object)val14 }; val14.padding = new RectOffset { bottom = -1000, top = -1000, left = -1000, right = -1000 }; starterGunSelectUIController.name_and_Description_Label = val14; GameObject val15 = PrefabBuilder.BuildObject("Name_display_Panel"); dfPanel val16 = val15.AddComponent(); val16.AssignDefaultPresets(modularUIAtlas, new Vector2(680.5f / num, 222.5f / num), (dfAnchorStyle)6); ((dfControl)val16).layout = new AnchorLayout((dfAnchorStyle)6) { margins = new dfAnchorMargins { bottom = 1195f / num, left = 1655f / num, right = 0f, top = 0f }, owner = (dfControl)(object)val16 }; val16.backgroundSprite = "name_label_empty"; val16.atlas = modularUIAtlas; val16.Atlas = modularUIAtlas; ((Component)val16).gameObject.SetActive(false); val15.transform.parent = UI_Frame.transform; starterGunSelectUIController.Name_Panel = val16; } public static void GenerateFillerButtons(int amount, dfAtlas dfAtlas, dfFontBase defaultFont, StarterGunSelectUIController gunSelectUIController) { for (int i = 0; i < amount; i++) { GameObject val = GenerateNewGunButton(dfAtlas, defaultFont, gunSelectUIController, "IDKButton_" + i, "ui_button_idk_gun", "ui_button_idk_gun_highlighted", "ui_button_idk_gun_pressed", CustomDungeonFlags.NOLLA, FlakCannon.GunID, StaticColorHexes.AddColorToLabelString("Error!", StaticColorHexes.Red_Color_Hex) + "\n\nSeems like no gun was found here.\nPlease wait until new guns arrive.\n\nThank you for your patience,\n" + StaticColorHexes.AddColorToLabelString("Hegemony Mechanics", StaticColorHexes.Green_Hex) + ".", null, null, null, null, null, "Does not actually consume your Scrap.", "name_label_empty", FlakCannonAlt.GunID, "ui_button_idk_gun_alt", "ui_button_idk_gun_highlighted_alt", "ui_button_idk_gun_pressed_alt", "name_label_empty_alt", StaticColorHexes.AddColorToLabelString("Error!", StaticColorHexes.Orange_Hex) + "\n\nThere seems to be no gun found here.\nPlease stand by until new guns arrive.\nThank you for your patience,\n" + StaticColorHexes.AddColorToLabelString("Hegemony Mechanics", StaticColorHexes.Green_Hex) + ".", null, overrideCanBeSelected: true); val.GetComponent().IsFiller = true; } } public static GameObject GenerateNewGunButton(dfAtlas dfAtlas, dfFontBase defaultFont, StarterGunSelectUIController self, string Button_Name, string asset_name_default, string asset_name_highlighted, string asset_name_pressed, CustomDungeonFlags unlock, int GunId, string Basic_Description = "", string Damage_Description = null, string Reload_Description = null, string Clipsize_Description = null, string FireRate_Description = null, string ShotSpeed_Description = null, string AdditionalNotes = "", string Label_Name_Asset_Name = "name_label_WIP", int Alt_GunID = -1, string asset_name_default_alt = null, string asset_name_highlighted_alt = null, string asset_name_pressed_alt = null, string Label_Name_Asset_Name_Alt = "name_label_WIP_alt", string UnlockDescription = "Blah Blah Blah", Func OverrideUnlock = null, bool overrideCanBeSelected = false) { //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown float num = (GameManager.Options.SmallUIEnabled ? 1 : 2); GameObject val = PrefabBuilder.BuildObject(Button_Name + "_Object"); val.gameObject.transform.parent = UI_Frame.transform; UpgradeUISelectButtonController upgradeUISelectButtonController = val.AddComponent(); upgradeUISelectButtonController.Label_Name = asset_name_default; upgradeUISelectButtonController.Label_Press = asset_name_pressed; upgradeUISelectButtonController.Label_Hover = asset_name_highlighted; upgradeUISelectButtonController.Name_Label_Sprite_Name = Label_Name_Asset_Name; upgradeUISelectButtonController.Label_Name_Alt = asset_name_default_alt ?? asset_name_default; upgradeUISelectButtonController.Label_Press_Alt = asset_name_pressed_alt ?? asset_name_pressed; upgradeUISelectButtonController.Label_Hover_Alt = asset_name_highlighted_alt ?? asset_name_highlighted; upgradeUISelectButtonController.Name_Label_Sprite_Name_Alt = Label_Name_Asset_Name_Alt ?? Label_Name_Asset_Name; upgradeUISelectButtonController.FlagToCheck = unlock; upgradeUISelectButtonController.upgradeType = UpgradeUISelectButtonController.UpgradeType.Different_Gun; upgradeUISelectButtonController.GunID = GunId; upgradeUISelectButtonController.AltGunID = Alt_GunID; allStarterIDs.Add(GunId); if (Alt_GunID != -1) { allAltStarterIDs.Add(Alt_GunID); } upgradeUISelectButtonController.overrideCanBeSelected = overrideCanBeSelected; upgradeUISelectButtonController.Damage_Description = Damage_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); upgradeUISelectButtonController.Reload_Description = Reload_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); upgradeUISelectButtonController.Clipsize_Description = Clipsize_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); upgradeUISelectButtonController.FireRate_Description = FireRate_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); upgradeUISelectButtonController.Shotspeed_Description = ShotSpeed_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); upgradeUISelectButtonController.Additional_Notes = AdditionalNotes; upgradeUISelectButtonController.Upgrade_Description = Basic_Description; upgradeUISelectButtonController.Unlock_Description = UnlockDescription; upgradeUISelectButtonController.OverrideUnlock = OverrideUnlock; int num2 = AddNewEntry(self, upgradeUISelectButtonController); dfButton val2 = (upgradeUISelectButtonController.df_Button = val.CreateBlankDfButton(new Vector2(160f / num, 160f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = preDeterminedOffsets[num2].y / num, left = preDeterminedOffsets[num2].x / num, right = 0f, top = 0f })); val2.AssignDefaultPresets(dfAtlas, defaultFont); ((dfInteractiveBase)val2).backgroundSprite = asset_name_default; ((dfInteractiveBase)val2).disabledSprite = asset_name_default; ((dfInteractiveBase)val2).hoverSprite = asset_name_highlighted; ((dfInteractiveBase)val2).focusSprite = asset_name_highlighted; val2.pressedSprite = asset_name_pressed; return val; } public static RandomGunSelectButton GenerateRandomGunButton(dfAtlas dfAtlas, dfFontBase defaultFont, StarterGunSelectUIController self, string Button_Name, string asset_name_default, string asset_name_highlighted, string asset_name_pressed, CustomDungeonFlags unlock, string Basic_Description = "", string Damage_Description = null, string Reload_Description = null, string Clipsize_Description = null, string FireRate_Description = null, string ShotSpeed_Description = null, string AdditionalNotes = "", string Label_Name_Asset_Name = "name_label_WIP", string asset_name_default_alt = null, string asset_name_highlighted_alt = null, string asset_name_pressed_alt = null, string Label_Name_Asset_Name_Alt = "name_label_WIP_alt", string UnlockDescription = "Blah Blah Blah", Func OverrideUnlock = null, bool overrideCanBeSelected = false) { //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown float num = (GameManager.Options.SmallUIEnabled ? 1 : 2); GameObject val = PrefabBuilder.BuildObject(Button_Name + "_Object"); val.gameObject.transform.parent = UI_Frame.transform; RandomGunSelectButton randomGunSelectButton = val.AddComponent(); randomGunSelectButton.Label_Name = asset_name_default; randomGunSelectButton.Label_Press = asset_name_pressed; randomGunSelectButton.Label_Hover = asset_name_highlighted; randomGunSelectButton.Name_Label_Sprite_Name = Label_Name_Asset_Name; randomGunSelectButton.Label_Name_Alt = asset_name_default_alt ?? asset_name_default; randomGunSelectButton.Label_Press_Alt = asset_name_pressed_alt ?? asset_name_pressed; randomGunSelectButton.Label_Hover_Alt = asset_name_highlighted_alt ?? asset_name_highlighted; randomGunSelectButton.Name_Label_Sprite_Name_Alt = Label_Name_Asset_Name_Alt ?? Label_Name_Asset_Name; randomGunSelectButton.FlagToCheck = unlock; randomGunSelectButton.upgradeType = UpgradeUISelectButtonController.UpgradeType.Different_Gun; randomGunSelectButton.overrideCanBeSelected = overrideCanBeSelected; randomGunSelectButton.Damage_Description = Damage_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); randomGunSelectButton.Reload_Description = Reload_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); randomGunSelectButton.Clipsize_Description = Clipsize_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); randomGunSelectButton.FireRate_Description = FireRate_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); randomGunSelectButton.Shotspeed_Description = ShotSpeed_Description ?? StaticColorHexes.AddColorToLabelString("Average", StaticColorHexes.Default_UI_Color_Hex); randomGunSelectButton.Additional_Notes = AdditionalNotes; randomGunSelectButton.Upgrade_Description = Basic_Description; randomGunSelectButton.Unlock_Description = UnlockDescription; randomGunSelectButton.OverrideUnlock = OverrideUnlock; dfButton val2 = (randomGunSelectButton.df_Button = val.CreateBlankDfButton(new Vector2(120f / num, 120f / num), (dfAnchorStyle)6, new dfAnchorMargins { bottom = 1260f / num, left = 1200f / num, right = 0f, top = 0f })); val2.AssignDefaultPresets(dfAtlas, defaultFont); ((dfInteractiveBase)val2).backgroundSprite = asset_name_default; ((dfInteractiveBase)val2).disabledSprite = asset_name_default; ((dfInteractiveBase)val2).hoverSprite = asset_name_highlighted; ((dfInteractiveBase)val2).focusSprite = asset_name_highlighted; val2.pressedSprite = asset_name_pressed; return randomGunSelectButton; } [HarmonyPatch(typeof(GameUIRoot), "Start")] [HarmonyPostfix] private void Update() { } public static StarterGunSelectUIController GenerateUI() { if ((Object)(object)((Component)GameUIRoot.Instance.Manager).transform.Find("Frame_Modular_UI(Clone)") == (Object)null) { Inst = ((Component)GameUIRoot.Instance.Manager.AddPrefab(UI_Frame)).gameObject.GetComponent(); return Inst; } Inst = ((Component)((Component)GameUIRoot.Instance.Manager).transform.Find("Frame_Modular_UI(Clone)")).gameObject.GetComponent(); return Inst; } public void DoAltSkinChecks() { if ((Object)(object)interactor == (Object)null) { return; } bool isUsingAlternateCostume = interactor.IsUsingAlternateCostume; dfPanel component = ((Component)Inst).GetComponent(); component.backgroundSprite = ((!isUsingAlternateCostume) ? "ui_template_bg" : "ui_template_bg_alt"); ((dfControl)component).Invalidate(); AltSkinStringStorage component2 = ((Component)Close_Button).GetComponent(); ((dfInteractiveBase)Close_Button).backgroundSprite = ((!isUsingAlternateCostume) ? "ui_button_close" : ((component2.df_button_default_string != null) ? component2.df_button_default_string : "ui_button_close")); ((dfInteractiveBase)Close_Button).focusSprite = ((!isUsingAlternateCostume) ? "ui_button_close" : ((component2.df_button_default_string != null) ? component2.df_button_default_string : "ui_button_close")); ((dfInteractiveBase)Close_Button).hoverSprite = ((!isUsingAlternateCostume) ? "ui_button_close_highlighted" : ((component2.df_button_highlighted_string != null) ? component2.df_button_highlighted_string : "ui_button_close_highlighted")); ((dfInteractiveBase)Close_Button).disabledSprite = ((!isUsingAlternateCostume) ? "ui_button_close_pressed" : ((component2.df_button_pressed_string != null) ? component2.df_button_pressed_string : "ui_button_close_pressed")); Close_Button.pressedSprite = ((!isUsingAlternateCostume) ? "ui_button_close_pressed" : ((component2.df_button_pressed_string != null) ? component2.df_button_pressed_string : "ui_button_close_pressed")); ((dfControl)Close_Button).Invalidate(); AltSkinStringStorage component3 = ((Component)Accept_Button).GetComponent(); ((dfInteractiveBase)Accept_Button).backgroundSprite = ((!isUsingAlternateCostume) ? "ui_button_accept_active" : ((component3.df_button_default_string != null) ? component3.df_button_default_string : "ui_button_accept_active")); ((dfInteractiveBase)Accept_Button).focusSprite = ((!isUsingAlternateCostume) ? "ui_button_accept_highlight" : ((component3.df_button_default_string != null) ? component3.df_button_default_string : "ui_button_accept_highlight")); ((dfInteractiveBase)Accept_Button).hoverSprite = ((!isUsingAlternateCostume) ? "ui_button_accept_highlight" : ((component3.df_button_highlighted_string != null) ? component3.df_button_highlighted_string : "ui_button_accept_highlight")); ((dfInteractiveBase)Accept_Button).disabledSprite = ((!isUsingAlternateCostume) ? "ui_button_accept_active_1" : ((component3.df_button_inactive_string != null) ? component3.df_button_inactive_string : "ui_button_accept_active_1")); Accept_Button.pressedSprite = ((!isUsingAlternateCostume) ? "ui_button_accept_active_press" : ((component3.df_button_pressed_string != null) ? component3.df_button_pressed_string : "ui_button_accept_active_press")); ((dfControl)Accept_Button).Invalidate(); AltSkinStringStorage component4 = ((Component)Left_Button).GetComponent(); ((dfInteractiveBase)Left_Button).backgroundSprite = ((!isUsingAlternateCostume) ? "left_button_active" : ((component4.df_button_default_string != null) ? component4.df_button_default_string : "left_button_active")); ((dfInteractiveBase)Left_Button).focusSprite = ((!isUsingAlternateCostume) ? "left_button_highlighted" : ((component4.df_button_default_string != null) ? component4.df_button_default_string : "left_button_highlighted")); ((dfInteractiveBase)Left_Button).hoverSprite = ((!isUsingAlternateCostume) ? "left_button_highlighted" : ((component4.df_button_highlighted_string != null) ? component4.df_button_highlighted_string : "left_button_highlighted")); ((dfInteractiveBase)Left_Button).disabledSprite = ((!isUsingAlternateCostume) ? "left_button_inactive" : ((component4.df_button_inactive_string != null) ? component4.df_button_inactive_string : "left_button_inactive")); Left_Button.pressedSprite = ((!isUsingAlternateCostume) ? "left_button_pressed" : ((component4.df_button_pressed_string != null) ? component4.df_button_pressed_string : "left_button_pressed")); ((dfControl)Left_Button).Invalidate(); AltSkinStringStorage component5 = ((Component)Right_Button).GetComponent(); ((dfInteractiveBase)Right_Button).backgroundSprite = ((!isUsingAlternateCostume) ? "right_button_active" : ((component5.df_button_default_string != null) ? component5.df_button_default_string : "right_button_active")); ((dfInteractiveBase)Right_Button).focusSprite = ((!isUsingAlternateCostume) ? "right_button_highlighted" : ((component5.df_button_default_string != null) ? component5.df_button_default_string : "right_button_highlighted")); ((dfInteractiveBase)Right_Button).hoverSprite = ((!isUsingAlternateCostume) ? "right_button_highlighted" : ((component5.df_button_highlighted_string != null) ? component5.df_button_highlighted_string : "right_button_highlighted")); ((dfInteractiveBase)Right_Button).disabledSprite = ((!isUsingAlternateCostume) ? "right_button_inactive" : ((component5.df_button_inactive_string != null) ? component5.df_button_inactive_string : "right_button_inactive")); Right_Button.pressedSprite = ((!isUsingAlternateCostume) ? "right_button_pressed" : ((component5.df_button_pressed_string != null) ? component5.df_button_pressed_string : "right_button_pressed")); ((dfControl)Right_Button).Invalidate(); foreach (UpgradeUISelectButtonController buttonControllers_Layer in ButtonControllers_Layers) { buttonControllers_Layer.Player_Using_Alt_Skin = isUsingAlternateCostume; buttonControllers_Layer.UpdateSprites(); } default_gun_button.Player_Using_Alt_Skin = isUsingAlternateCostume; default_gun_button.UpdateSprites(); random_gun_button.Player_Using_Alt_Skin = isUsingAlternateCostume; random_gun_button.UpdateSprites(); } public void OnUse(PlayerController player, int GunID) { if (!CanBeUsed) { return; } CanBeUsed = false; Gun currentGun = ((GameActor)player).CurrentGun; ModulePrinterCore modulePrinterCore = null; if (player.passiveItems != null && player.passiveItems.Count > 0) { foreach (PassiveItem passiveItem in player.passiveItems) { if (passiveItem is ModulePrinterCore modulePrinterCore2) { modulePrinterCore = modulePrinterCore2; modulePrinterCore2.ModularGunController = null; modulePrinterCore2.TemporaryDisableDrop = true; } } } Gun val = LootEngine.TryGiveGunToPlayer(((Component)PickupObjectDatabase.GetById(GunID)).gameObject, player, false); ModularGunController orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val).gameObject); if ((Object)(object)modulePrinterCore != (Object)null) { modulePrinterCore.ModularGunController = orAddComponent; modulePrinterCore.TemporaryDisableDrop = false; } player.inventory.DestroyGun(currentGun); if (OnUsed != null) { OnUsed(); } player.startingGunIds.Clear(); player.startingGunIds.Add(GunID); } public bool CanBeSelected() { if ((Object)(object)currentlySelectedButton == (Object)null) { ((dfControl)Accept_Button).Disable(); return false; } if (currentlySelectedButton.overrideCanBeSelected) { ((dfControl)Accept_Button).Disable(); return false; } if (!currentlySelectedButton.IsUnlocked()) { ((dfControl)Accept_Button).Disable(); return false; } if ((Object)(object)interactor != (Object)null && ((PickupObject)((GameActor)interactor).CurrentGun).PickupObjectId == currentlySelectedButton.GunID) { ((dfControl)Accept_Button).Disable(); return false; } ((dfControl)Accept_Button).Enable(); ((dfControl)Accept_Button).isEnabled = true; return true; } private void Start() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown if ((Object)(object)interactor == (Object)null) { PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController val in allPlayers) { if (val.HasPassiveItem(ModulePrinterCore.ModulePrinterCoreID)) { interactor = val; } } } UpdatePanels(); CursorPatch.DisplayCursorOnController = true; CanBeUsed = true; ((dfControl)Accept_Button).Click += (MouseEventHandler)delegate { if (CanBeSelected()) { UpdatePanels(); ModulePrinterCore c = null; foreach (PassiveItem passiveItem in interactor.passiveItems) { if (passiveItem is ModulePrinterCore modulePrinterCore) { c = modulePrinterCore; } } AkSoundEngine.PostEvent("Play_FS_slipper_stone_01", ((Component)this).gameObject); OnUse(interactor, currentlySelectedButton.ReturnGun(c)); Inst.ToggleUI(false); } }; ((dfControl)Accept_Button).MouseEnter += (MouseEventHandler)delegate { if (((Behaviour)Close_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)this).gameObject); } }; ((dfControl)Close_Button).Click += (MouseEventHandler)delegate { Inst.ToggleUI(false); if (OnClosed != null) { OnClosed(); CursorPatch.DisplayCursorOnController = false; } }; ((dfControl)Close_Button).MouseEnter += (MouseEventHandler)delegate { if (((Behaviour)Close_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)this).gameObject); } }; ((dfControl)Close_Button).Click += (MouseEventHandler)delegate { if (((Behaviour)Close_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_FS_slipper_stone_01", ((Component)this).gameObject); } }; ((dfControl)default_gun_button.df_Button).Click += (MouseEventHandler)delegate { ((dfControl)name_and_Description_Label).Localize(); ((dfControl)statDescrptionLabel).Localize(); currentlySelectedButton = default_gun_button; UpdateStatDescLabel(); UpdateNameDescLabel(); UpdatePanels(); }; ((dfControl)random_gun_button.df_Button).Click += (MouseEventHandler)delegate { ((dfControl)name_and_Description_Label).Localize(); ((dfControl)statDescrptionLabel).Localize(); currentlySelectedButton = random_gun_button; UpdateStatDescLabel(); UpdateNameDescLabel(); UpdatePanels(); }; foreach (UpgradeUISelectButtonController buttonControllers_Layer in ButtonControllers_Layers) { buttonControllers_Layer.UpdateSprites(); ((dfControl)buttonControllers_Layer.df_Button).Click += new MouseEventHandler(ClickyDoo); } ((dfControl)Left_Button).Click += (MouseEventHandler)delegate { Current_Page--; UpdatePageButtons(); foreach (UpgradeUISelectButtonController buttonControllers_Layer2 in ButtonControllers_Layers) { ((MonoBehaviour)Left_Button).StartCoroutine(ButtonFade(buttonControllers_Layer2, 0.3f)); } AkSoundEngine.PostEvent("Play_FS_slipper_stone_01", ((Component)this).gameObject); }; ((dfControl)Left_Button).MouseEnter += (MouseEventHandler)delegate { if (((Behaviour)Close_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)this).gameObject); } }; ((dfControl)Right_Button).Click += (MouseEventHandler)delegate { Current_Page++; UpdatePageButtons(); foreach (UpgradeUISelectButtonController buttonControllers_Layer3 in ButtonControllers_Layers) { ((MonoBehaviour)Right_Button).StartCoroutine(ButtonFade(buttonControllers_Layer3, 0.3f)); } AkSoundEngine.PostEvent("Play_FS_slipper_stone_01", ((Component)this).gameObject); }; ((dfControl)Right_Button).MouseEnter += (MouseEventHandler)delegate { if (((Behaviour)Close_Button).isActiveAndEnabled) { AkSoundEngine.PostEvent("Play_UI_menu_select_01", ((Component)this).gameObject); } }; } public void ClickyDoo(dfControl control, dfMouseEventArgs mouseEvent) { ((dfControl)name_and_Description_Label).Localize(); ((dfControl)statDescrptionLabel).Localize(); currentlySelectedButton = ((Component)control).GetComponent(); UpdateStatDescLabel(); UpdateNameDescLabel(); UpdatePanels(); } public IEnumerator DoFade(float from, float to, float duration, bool Deactivate, bool ForceInstant = false) { if (Deactivate) { name_and_Description_Label.ModifyLocalizedText(""); statDescrptionLabel.ModifyLocalizedText(""); DoActivation(); } if (!ForceInstant) { dfPanel c = ((Component)Inst).GetComponent(); float e = 0f; while (e < duration) { if ((Object)(object)c == (Object)null) { yield break; } ((dfControl)c).Opacity = Mathf.Lerp(from, to, e / 0.25f); e += BraveTime.DeltaTime; yield return null; } } if (!Deactivate) { DoActivation(); } } public IEnumerator ButtonFade(UpgradeUISelectButtonController self, float duration, bool ForceInstant = false) { UpdatePageButtons(); if (!ForceInstant) { float e = 0f; while (e < (float)self.Entry * 0.025f) { e += BraveTime.DeltaTime; yield return null; } e = 0f; bool v = false; while (e < duration) { if (e > duration / 2f && !v) { v = true; ProcessButtonPage(self); } ((Component)self.df_Button).transform.localScale = Vector3.one * (1f - Toolbox.SinLerpTValueFull(e / duration)); e += BraveTime.DeltaTime; yield return null; } } ((Component)self.df_Button).transform.localScale = Vector3.one; } private static void UIScaleFormla(dfPanel panel) { //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) ((Component)panel).transform.localScale = GameUIUtility.GetCurrentTK2D_DFScale(((dfControl)panel).cachedManager) * Vector3.one; } private static void UIScaleFormla(dfButton panel) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) ((Component)panel).transform.localScale = Vector3.one * (GameUIUtility.GetCurrentTK2D_DFScale(((dfControl)panel).cachedManager) * 2f); } public void DoActivation() { DoAltSkinChecks(); dfPanel component = ((Component)Inst).GetComponent(); ((dfControl)component).IsVisible = Is_Active; ((dfControl)component).IsInteractive = Is_Active; ((dfControl)component).IsEnabled = Is_Active; ((dfControl)name_and_Description_Label).isEnabled = Is_Active; ((Component)name_and_Description_Label).gameObject.SetActive(Is_Active); ((dfControl)statDescrptionLabel).isEnabled = Is_Active; ((Component)statDescrptionLabel).gameObject.SetActive(Is_Active); ((dfControl)Accept_Button).isEnabled = Is_Active; ((Component)Accept_Button).gameObject.SetActive(Is_Active); ((dfControl)Name_Panel).isEnabled = Is_Active; ((Component)Name_Panel).gameObject.SetActive(Is_Active); ((dfControl)Left_Button).isEnabled = Is_Active; ((Component)Left_Button).gameObject.SetActive(Is_Active); ((dfControl)Right_Button).isEnabled = Is_Active; ((Component)Right_Button).gameObject.SetActive(Is_Active); ((dfControl)default_gun_button.df_Button).isEnabled = Is_Active; default_gun_button.df_Button.ForceState((ButtonState)((!Is_Active) ? 4 : 0)); ((Component)default_gun_button).gameObject.SetActive(Is_Active); ((dfControl)random_gun_button.df_Button).isEnabled = Is_Active; random_gun_button.df_Button.ForceState((ButtonState)((!Is_Active) ? 4 : 0)); ((Component)random_gun_button).gameObject.SetActive(Is_Active); ((dfControl)Close_Button).isEnabled = Is_Active; ((Component)Close_Button).gameObject.SetActive(Is_Active); ProcessButtonPages(); UpdateNameDescLabel(); if (Is_Active) { ((dfControl)Name_Panel).PerformLayout(); ((dfControl)Left_Button).PerformLayout(); ((dfControl)Right_Button).PerformLayout(); ((dfControl)statDescrptionLabel).PerformLayout(); ((dfControl)name_and_Description_Label).PerformLayout(); ((dfControl)default_gun_button.df_Button).PerformLayout(); ((dfControl)random_gun_button.df_Button).PerformLayout(); ((dfControl)Close_Button).PerformLayout(); ((dfControl)Accept_Button).PerformLayout(); ((dfControl)Name_Panel).PerformLayout(); } } public void ProcessButtonPage(UpgradeUISelectButtonController self) { self.UpdateSprites(); bool flag = ((self.Page == Current_Page) ? true : false); ((dfControl)self.df_Button).isEnabled = (flag ? true : false); ((Component)self.df_Button).gameObject.SetActive(flag && Is_Active); } public void ProcessButtonPages() { foreach (UpgradeUISelectButtonController buttonControllers_Layer in ButtonControllers_Layers) { buttonControllers_Layer.Player_Using_Alt_Skin = !((Object)(object)interactor == (Object)null) && interactor.IsUsingAlternateCostume; buttonControllers_Layer.UpdateSprites(); bool flag = ((buttonControllers_Layer.Page == Current_Page) ? true : false); ((dfControl)buttonControllers_Layer.df_Button).isEnabled = flag && Is_Active; ((Component)buttonControllers_Layer.df_Button).gameObject.SetActive(flag && Is_Active); ((dfControl)buttonControllers_Layer.df_Button).PerformLayout(); } UpdatePageButtons(); } public void UpdatePageButtons() { ((dfControl)Left_Button).Enable(); ((dfControl)Right_Button).Enable(); if (ButtonControllers_Layers.First().Page == Current_Page) { ((dfControl)Left_Button).Disable(); } if (ButtonControllers_Layers.Last().Page == Current_Page) { ((dfControl)Right_Button).Disable(); } } public void UpdatePanels() { CanBeSelected(); default_gun_button.UpdateSprites(); random_gun_button.UpdateSprites(); if (Object.op_Implicit((Object)(object)Name_Panel)) { bool flag = !((Object)(object)interactor == (Object)null) && interactor.IsUsingAlternateCostume; Name_Panel.backgroundSprite = ((!((Object)(object)currentlySelectedButton != (Object)null)) ? (flag ? "name_label_empty_alt" : "name_label_empty") : (currentlySelectedButton.IsUnlocked() ? currentlySelectedButton.ReturnNameLabel() : (flag ? "name_label_locked_alt" : "name_label_locked"))); ((dfControl)Name_Panel).Enable(); ((dfControl)Name_Panel).Invalidate(); } } public void UpdateNameDescLabel() { if ((Object)(object)currentlySelectedButton == (Object)null) { name_and_Description_Label.ModifyLocalizedText(StaticColorHexes.AddColorToLabelString("Tip Of The Day:\n\n", StaticColorHexes.Yellow_Hex) + TipsOfTheDay[Random.Range(0, TipsOfTheDay.Count)]); return; } string text = (currentlySelectedButton.IsUnlocked() ? currentlySelectedButton.Upgrade_Description : currentlySelectedButton.Unlock_Description); ((dfControl)name_and_Description_Label).Localize(); ((dfControl)statDescrptionLabel).Localize(); name_and_Description_Label.ModifyLocalizedText(text); } public void UpdateStatDescLabel() { if ((Object)(object)currentlySelectedButton == (Object)null) { statDescrptionLabel.ModifyLocalizedText(""); return; } if (!currentlySelectedButton.IsUnlocked()) { statDescrptionLabel.ModifyLocalizedText(""); return; } if ((currentlySelectedButton.upgradeType == UpgradeUISelectButtonController.UpgradeType.Minor_Upgrade) | (currentlySelectedButton.upgradeType == UpgradeUISelectButtonController.UpgradeType.Major_Upgrade)) { statDescrptionLabel.ModifyLocalizedText(""); return; } if (currentlySelectedButton.overrideCanBeSelected) { statDescrptionLabel.ModifyLocalizedText(""); return; } string text = SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.DAMAGE) + " Damage : " + currentlySelectedButton.Damage_Description + "\n" + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.FIRE_RATE) + " Rate Of Fire : " + currentlySelectedButton.FireRate_Description + "\n" + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.RELOAD) + " Reload Time : " + currentlySelectedButton.Reload_Description + "\n" + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.CLIP_CAPACITY) + " Clip Size : " + currentlySelectedButton.Clipsize_Description + "\n" + SpecialCharactersController.ReturnSpecialCharacter(SpecialCharactersController.SpecialCharacters.SHOTSPEED) + " Shot Speed : " + currentlySelectedButton.Shotspeed_Description + "\n" + currentlySelectedButton.Additional_Notes; ((dfControl)name_and_Description_Label).Localize(); ((dfControl)statDescrptionLabel).Localize(); statDescrptionLabel.ModifyLocalizedText(text); } public void ToggleUI(bool? Force_Set_Value = null, PlayerController player = null, bool Instant = false) { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) currentlySelectedButton = null; Current_Page = 0; if ((Object)(object)player != (Object)null) { interactor = player; } Is_Active = (Force_Set_Value.HasValue ? Force_Set_Value.Value : (!Is_Active)); ((MonoBehaviour)this).StartCoroutine(DoFade((!Is_Active) ? 1 : 0, Is_Active ? 1 : 0, 0.3f, Is_Active, Instant)); UpdatePanels(); GameUIRoot.Instance.ToggleLowerPanels(!Is_Active, false, "Modular_UI"); GameUIRoot.Instance.ToggleAllDefaultLabels(!Is_Active, "Modular_UI"); if (Is_Active) { if (!GameManager.Instance.MainCameraController.ManualControl) { GameManager.Instance.MainCameraController.OverridePosition = ((BraveBehaviour)GameManager.Instance.MainCameraController).transform.position; GameManager.Instance.MainCameraController.SetManualControl(true, false); Camera_Lock = true; } else { Camera_Lock = false; } GameUIRoot.Instance.HideCoreUI("Modular_UI"); GameUIRoot.Instance.notificationController.ForceHide(); GameUIRoot.Instance.levelNameUI.BanishLevelNameText(); GameUIRoot.Instance.ForceClearReload(-1); } else { if (Object.op_Implicit((Object)(object)GameManager.Instance.MainCameraController) && Camera_Lock) { GameManager.Instance.MainCameraController.SetManualControl(false, true); } GameUIRoot.Instance.ShowCoreUI("Modular_UI"); BraveInput.FlushAll(); } Minimap.Instance.TemporarilyPreventMinimap = Is_Active; if (Is_Active) { AkSoundEngine.PostEvent("Play_UI_map_open_01", ((Component)this).gameObject); } Shader.SetGlobalFloat("_FullMapActive", (float)(Is_Active ? 1 : 0)); if (Is_Active) { Pixelator.Instance.FadeColor = Color.black; Pixelator.Instance.fade = 0.3f; GameUIRoot.Instance.HideCoreUI(string.Empty); for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { PlayerController val = GameManager.Instance.AllPlayers[i]; if (Object.op_Implicit((Object)(object)val)) { val.CurrentInputState = (PlayerInputState)1; } } return; } Pixelator.Instance.FadeColor = Color.black; Pixelator.Instance.fade = 1f; GameUIRoot.Instance.ShowCoreUI(string.Empty); BraveInput.ConsumeAllAcrossInstances((GungeonActionType)8); for (int j = 0; j < GameManager.Instance.AllPlayers.Length; j++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[j])) { GameManager.Instance.AllPlayers[j].CurrentInputState = (PlayerInputState)0; } } } public static int AddNewEntry(StarterGunSelectUIController self, UpgradeUISelectButtonController button) { int num = ((self.ButtonControllers_Layers.Count > 0) ? self.ButtonControllers_Layers.Last().Page : 0); int num2 = ((self.ButtonControllers_Layers.Count > 0) ? self.ButtonControllers_Layers.Last().Entry : (-1)); if (num2 > 8) { num++; num2 = -1; } button.Page = num; button.Entry = num2 + 1; self.ButtonControllers_Layers.Add(button); return num2 + 1; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("somebunny.etg.modularcharacter", "Modular Custom Character", "1.3.16")] public class Module : BaseUnityPlugin { public const string GUID = "somebunny.etg.modularcharacter"; public const string NAME = "Modular Custom Character"; public const string VERSION = "1.3.16"; public const string TEXT_COLOR = "#79eaff"; public static AssetBundle ModularAssetBundle; public static CustomCharacterData Modular_Character_Data; public static AdvancedStringDB Strings; private static bool SoundTest = false; public static bool Debug_Mode = true; private static bool DialogueTest = false; public static string FilePathFolder; public ConfigFile AutoReloadConfig; public Action OnFrameDelay; public static PlayableCharacters Modular; public void Start() { ETGModMainBehaviour.WaitForGameManagerStart((Action)GMStart); } public void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) SaveAPIManager.Setup("mdl"); new Harmony("somebunny.etg.modularcharacter").PatchAll(); } private void GameManager_Awake(Action orig, GameManager self) { orig(self); PastDungeon.InitCustomDungeon(); } public void GMStart(GameManager g) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Expected O, but got Unknown //IL_03aa: Expected O, but got Unknown //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Expected O, but got Unknown //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Expected O, but got Unknown //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) AutoReloadConfig = ((BaseUnityPlugin)this).Config; ConfigManager.CreateConfig(AutoReloadConfig); FilePathFolder = ETGMod.FolderPath((BaseUnityPlugin)(object)this); Hook val = new Hook((MethodBase)typeof(GameManager).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic), typeof(Module).GetMethod("GameManager_Awake", BindingFlags.Instance | BindingFlags.NonPublic), (object)typeof(GameManager)); Strings = new AdvancedStringDB(); ModularAssetBundle = AssetBundleLoader.LoadAssetBundleFromLiterallyAnywhere("modular_bundle"); CriticalHitComponent.Init(); StaticCollections.InitialiseCollections(); AmmonomiconSetup.Initialize(); LightningController.Init(); VFXStorage.AssignVFX(); StaticTextures.InitTextures(); StaticShaders.GetDisplacerMat(); DefaultModule.DoQuickSetup(); EnemyBuilder.Init(); BossBuilder.Init(); ExpandDungeonMusicAPI.InitHooks(); SoundManager.Init(); SoundManager.LoadBankFromModProject("ModularMod/Modular_Soundbank"); SpecialCharactersController.Init(); MarkedEffect.BuildVFX(); PrefixHandler.AddPrefixForAssembly("mdl", (Assembly)null); ItemTemplateManager.Init((Assembly)null); DungeonHooks.Init(); Hooks.Init(); Actions.Init(); EnemyDeathUnlockController.Start(); MultiActiveReloadManager.SetupHooks(); CustomClipAmmoTypeToolbox.Init(); BlessedMode_Modifier.Init(); AdditionalShopItemController.Init(); StuffedToy.Init(); ModulePrinterCore.Init(); DefaultArmCannon.Init(); DefaultArmCannonAlt.Init(); ModularPeaShooter.Init(); ModularPeaShooterAlt.Init(); ScatterBlast.Init(); ScatterBlastAlt.Init(); AutoBurst.Init(); AutoBurstAlt.Init(); ChargeBlaster.Init(); ChargeBlasterAlt.Init(); PresicionRifle.Init(); PresicionRifleAlt.Init(); Suppressor.Init(); SuppressorAlt.Init(); TheHammer.Init(); TheHammerAlt.Init(); Apollo.Init(); Artemis.Init(); GravityPulsar.Init(); GravityPulsarAlt.Init(); LightLance.Init(); LightLanceAlt.Init(); FlakCannon.Init(); FlakCannonAlt.Init(); BigNuke.Init(); BigNukeAlt.Init(); Flamethrower.Init(); FlamethrowerAlt.Init(); ShieldGenerator.Init(); ShieldGeneratorAlt.Init(); Fortifier.Init(); FortifierAlt.Init(); GunInt.FinalizeSprites(); Flowder.Init(); StarterGunSelectUIController.Init(); ScrapUIController.Init(); AdditionalEnergyInitializer.Init(); UIHooks.Init(); GlobalModuleStorage.InitialiseLootTables(); CrateSpawnController.Init(); ItemSynergyController.Init(); LaserDiode.BuildPrefab(); RobotMiniMecha.BuildPrefab(); Sentry.BuildPrefab(); Node.BuildPrefab(); Burster.BuildPrefab(isVertical: true); Burster.BuildPrefab(isVertical: false); BigDrone.BuildPrefab(); Nopticon.BuildNode(); Nopticon.BuildPrefab(4); Nopticon.BuildPrefab(8); Nopticon.BuildPrefab(12); Nopticon.BuildPrefab(16); EnergyShield.BuildPrefab(LaserDiode.guid); EnergyShield.BuildPrefab(Sentry.guid); EnergyShield.BuildPrefab(RobotMiniMecha.guid); EnergyShield.BuildPrefab(Burster.guid + "_Vertical"); EnergyShield.BuildPrefab(Burster.guid + "_Horizontal"); Slapper.BuildPrefab(); SteelPanopticon.BuildPrefab(); ModularPrime.BuildPrefab(); AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.DO_NOT_CHANGE, value: true); ToolsCharApi.EnableDebugLogging = false; CustomCharacterData val2 = (Modular_Character_Data = Loader.BuildCharacterBundle("ModularMod/Sprites/Modular", StaticCollections.Modular_Character_Collection, ModularAssetBundle.LoadAsset("ModularSpriteAnimation").GetComponent(), StaticCollections.Modular_Character_Alt_Collection, ModularAssetBundle.LoadAsset("Modular_Alt_Animation").GetComponent(), "somebunny.etg.modularcharacter", new Vector3(30.125f, 29.5f), true, new Vector3(30.625f, 28.5f), false, false, true, true, true, new GlowMatDoer(Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue)), 14f, 10f), new GlowMatDoer(Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue)), 5f, 3f), 0, true, "tt_modular_past", ModularAssetBundle.LoadAsset("modular_bosscard_001"))); Modular_Character_Data.pastWinPic = ModularAssetBundle.LoadAsset("win_pic_001"); CharacterSelectIdleDoer idleDoer = val2.idleDoer; idleDoer.phases = (CharacterSelectIdlePhase[])(object)new CharacterSelectIdlePhase[2] { new CharacterSelectIdlePhase { outAnimation = "error" }, new CharacterSelectIdlePhase { outAnimation = "tummy" } }; PastDungeon.Init(); PDashTwo.Init(); ((MonoBehaviour)this).StartCoroutine(Delayedstarthandler()); ConsoleMagic.LogButCool("Modular Custom Character v1.3.16 started successfully.", (Texture)(object)ModularAssetBundle.LoadAsset("modular_Tex_Icon")); if (SoundTest) { new Hook((MethodBase)typeof(AkSoundEngine).GetMethods().Single((MethodInfo m) => m.Name == "PostEvent" && m.GetParameters().Length == 2 && (object)m.GetParameters()[0].ParameterType == typeof(string)), typeof(Module).GetMethod("PostEventHook", BindingFlags.Static | BindingFlags.Public)); } if (DialogueTest) { new Hook((MethodBase)typeof(TextBoxManager).GetMethod("SetText", BindingFlags.Instance | BindingFlags.Public), typeof(Module).GetMethod("SetTextHook")); } } public static void SetTextHook(Action orig, TextBoxManager self, string text, Vector3 worldPosition, bool instant = true, BoxSlideOrientation slideOrientation = 0, bool showContinueText = true, bool UseAlienLanguage = false, bool clampThoughtBubble = false) { //IL_000b: 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) Debug.Log((object)text); orig.Invoke(self, text, worldPosition, instant, slideOrientation, showContinueText, UseAlienLanguage, clampThoughtBubble); } public static uint PostEventHook(Func orig, string name, GameObject obj) { if (name != null) { ETGModConsole.Log((object)name, true); Debug.Log((object)name); } return orig(name, obj); } public IEnumerator Delayedstarthandler() { ETGModConsole.Commands.AddGroup("mdl", (Action)delegate { }); if (Debug_Mode) { ETGModConsole.Commands.GetGroup("mdl").AddUnit("cratetoggle", (Action)Crate); ETGModConsole.Commands.GetGroup("mdl").AddUnit("locktoggle", (Action)ToggleLocks); } ETGModConsole.Commands.GetGroup("mdl").AddUnit("lock_all", (Action)Lock); ETGModConsole.Commands.GetGroup("mdl").AddUnit("unlock_all", (Action)Unlock); if (OnFrameDelay != null) { OnFrameDelay(); } yield return null; Modular = ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", "Modular"); GameStatsManager.Instance.SetCharacterSpecificFlag(ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", Modular_Character_Data.nameShort), (CharacterSpecificGungeonFlags)0, true); bool Shit = AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.PAST); bool GodDamnit = AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.PAST_ALT_SKIN); GameStatsManager.Instance.SetCharacterSpecificFlag(ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", Modular_Character_Data.nameShort), (CharacterSpecificGungeonFlags)1000, Shit); GameStatsManager.Instance.SetCharacterSpecificFlag(ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", Modular_Character_Data.nameShort), (CharacterSpecificGungeonFlags)1001, GodDamnit); } public static void Crate(string[] s) { SaveAPIManager.SetFlag(CustomDungeonFlags.CRATE_DROP, !SaveAPIManager.GetFlag(CustomDungeonFlags.CRATE_DROP)); ETGModConsole.Log((object)("Crate is now set to : " + SaveAPIManager.GetFlag(CustomDungeonFlags.CRATE_DROP)), false); } public static void ForceEnableMixedFloor(string[] s) { SaveAPIManager.SetFlag(CustomDungeonFlags.TEST_UNLOCK, !SaveAPIManager.GetFlag(CustomDungeonFlags.TEST_UNLOCK)); ETGModConsole.Log((object)("Unlock is now set to : " + SaveAPIManager.GetFlag(CustomDungeonFlags.TEST_UNLOCK)), false); } public static void ToggleLocks(string[] s) { SaveAPIManager.SetFlag(CustomDungeonFlags.TEST_UNLOCK, !SaveAPIManager.GetFlag(CustomDungeonFlags.TEST_UNLOCK)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_FLOOR_3, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_FLOOR_3)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_LICH_WITH_4_MODULES_OR_LESS, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_LICH_WITH_4_MODULES_OR_LESS)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR, !SaveAPIManager.GetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR)); SaveAPIManager.SetFlag(CustomDungeonFlags.FIRST_FLOOR_NO_MODULES, !SaveAPIManager.GetFlag(CustomDungeonFlags.FIRST_FLOOR_NO_MODULES)); SaveAPIManager.SetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN, !SaveAPIManager.GetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN)); SaveAPIManager.SetFlag(CustomDungeonFlags.BLESSED_MODE, !SaveAPIManager.GetFlag(CustomDungeonFlags.BLESSED_MODE)); ETGModConsole.Log((object)("Unlocks are now set to : " + SaveAPIManager.GetFlag(CustomDungeonFlags.TEST_UNLOCK)), false); } public static void Unlock(string[] s) { bool value = true; SaveAPIManager.SetFlag(CustomDungeonFlags.TEST_UNLOCK, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_FLOOR_3, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_LICH_WITH_4_MODULES_OR_LESS, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.FIRST_FLOOR_NO_MODULES, value); SaveAPIManager.SetFlag(CustomDungeonFlags.PAST, value); SaveAPIManager.SetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BLESSED_MODE, value); SaveAPIManager.SetFlag(CustomDungeonFlags.CHALLENGEMODE_LICH, value); ETGModConsole.Log((object)("Unlocks are now set to : " + value), false); } public static void Lock(string[] s) { bool value = false; SaveAPIManager.SetFlag(CustomDungeonFlags.TEST_UNLOCK, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_FLOOR_3, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_LICH_WITH_4_MODULES_OR_LESS, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.LEAD_GOD_AS_MODULAR, value); SaveAPIManager.SetFlag(CustomDungeonFlags.FIRST_FLOOR_NO_MODULES, value); SaveAPIManager.SetFlag(CustomDungeonFlags.PAST, value); SaveAPIManager.SetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN, value); SaveAPIManager.SetFlag(CustomDungeonFlags.BLESSED_MODE, value); SaveAPIManager.SetFlag(CustomDungeonFlags.CHALLENGEMODE_LICH, value); ETGModConsole.Log((object)("Unlocks are now set to : " + value), false); } public static void Log(string text, string color = "FFFFFF") { ETGModConsole.Log((object)("" + text + ""), false); } } } namespace ModularMod.Past.Prefabs.Objects { public class InitObjects { public static void Init() { PastEntranceControllerObject.Init(); WarningSticker.Init(); WoodenCrate.Init(); ShippingContainer.Init(); WarpGates.Init(); ExpressElevator.Init(); YellowLights.InitYellowLightHorizontal(); YellowLights.InitYellowLightVertical(); MetalFences.Init(); RedLight.Init(); SniperTurretsDefault.InitDownward(); SniperTurretsDefault.InitLeft(); SniperTurretsDefault.InitRight(); SniperTurretsProfessional.InitDownward(); SniperTurretsProfessional.InitLeft(); SniperTurretsProfessional.InitRight(); MovingTile.Init(); ForbodingSign.Init(); FakeCorridor.Init(); BigVaultObject.Init(); Engine.Init(); BigFuckOffDoor.Init(); TriggerEncounter.Init(); BigSwitch.Init(); BigFuckOffDoorAuto.Init(); SteelPanopticonTrigger.Init(); Spaceship.Init(); SpaceShiptrigger.Init(); ZappyDoor.Init(); BloodRedLightness.Init(); ArmorCrate.Init(); Sprite_Decals.Init(); Dead.Init(); PointyDecal.Init(); FanModulars.Init(); MiscDecoratives.Init(); SusBoxes.Init(); CDrive.Init(); SecretSwitch.Init(); } } public class SecretSwitch { public static void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_00f5: 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) GameObject val = PrefabBuilder.BuildObject("SecretSwitche_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("switch1")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material material = new Material(StaticShaders.Default_Shader); ((BraveBehaviour)val2).renderer.material = material; val.AddComponent(); SecretSwitchController secretSwitchController = val.AddComponent(); Module.Strings.Core.Set("#MDLR_SWITCH_DEF", "A switch. Flip it..?"); Module.Strings.Core.Set("#MDLR_SWITCH_ACC", StaticColorHexes.AddColorToLabelString("Flip it.", StaticColorHexes.Red_Color_Hex)); Module.Strings.Core.Set("#MDLR_SWITCH_CAN", StaticColorHexes.AddColorToLabelString("Leave it.", StaticColorHexes.Green_Hex)); secretSwitchController.acceptOptionKey = "#MDLR_SWITCH_ACC"; secretSwitchController.displayTextKey = "#MDLR_SWITCH_DEF"; secretSwitchController.declineOptionKey = "#MDLR_SWITCH_CAN"; secretSwitchController.talkPoint = val.transform; val.CreateFastBody(new IntVector2(0, 0), new IntVector2(0, 0)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Critical")); StaticReferences.customObjects.Add("Switch_MDLR", val); } } public class SecretSwitchController : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler m_parentRoom; public Transform talkPoint; private int m_useCount = 0; public string displayTextKey; public string acceptOptionKey; public string declineOptionKey; public string spentOptionKey = "#SHRINE_GENERIC_SPENT"; public void Start() { } public void ConfigureOnPlacement(RoomHandler room) { m_parentRoom = room; RegisterMinimapIcon(); } public void RegisterMinimapIcon() { } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 2f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { if (!TextBoxManager.HasTextBox(talkPoint) && m_useCount <= 0) { ((MonoBehaviour)this).StartCoroutine(HandleShrineConversation(interactor)); } } private IEnumerator HandleSpentText(PlayerController interactor) { TextBoxManager.ShowInfoBox(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(spentOptionKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); } private IEnumerator HandleShrineConversation(PlayerController interactor) { string targetDisplayKey = displayTextKey; TextBoxManager.ShowStoneTablet(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(targetDisplayKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); yield return null; bool canUse = true; if (canUse) { string text = StringTableManager.GetString(acceptOptionKey); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, text, StringTableManager.GetString(declineOptionKey)); } else { GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); } while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); if (canUse && selectedResponse == 0) { ((BraveBehaviour)this).sprite.SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("switch2")); GlobalMessageRadio.BroadcastMessage("SwitchFlipped"); AkSoundEngine.PostEvent("Play_OBJ_chain_switch_01", ((Component)interactor).gameObject); m_parentRoom.DeregisterInteractable((IPlayerInteractable)(object)this); m_useCount++; } } public void OnEnteredRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } public class CDrive { public static void Init() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("C_Drive"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("cdrivefullofmalware")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material = val3; val.AddComponent(); SusBoxController susBoxController = val.AddComponent(); Module.Strings.Core.Set("#MDLR_CDRIVE_DEF", "A data storage device. Likely left carelessly during the evacuation."); Module.Strings.Core.Set("#MDLR_CDRIVE_ACC", StaticColorHexes.AddColorToLabelString("Take out a drive.", StaticColorHexes.Green_Hex)); Module.Strings.Core.Set("#MDLR_CDRIVE_CAN", StaticColorHexes.AddColorToLabelString("Leave it.", StaticColorHexes.Red_Color_Hex)); susBoxController.acceptOptionKey = "#MDLR_CDRIVE_ACC"; susBoxController.displayTextKey = "#MDLR_CDRIVE_DEF"; susBoxController.declineOptionKey = "#MDLR_CDRIVE_CAN"; susBoxController.talkPoint = val.transform; susBoxController.PickupID = HighValueInfo.CoolInfoID; val.CreateFastBody(new IntVector2(14, 12), new IntVector2(0, -3)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("C_DRIVE_MDLR", val); } } public class SusBoxes { public static void Init() { InitSusBox(PerformanceCore.PerformanceDriveID, "PerfBoxMDLR"); InitSusBox(CloseQuartersCore.CQCID, "CQCBoxMDLR"); InitSusBox(AllocationCore.AllocationCoreID, "AllocBoxMDLR"); } public static void InitSusBox(int ID, string name) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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) GameObject val = PrefabBuilder.BuildObject("Sus_Box"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("box_sussybox")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 0f); val3.SetFloat("_EmissivePower", 0f); ((BraveBehaviour)val2).renderer.material = val3; val.AddComponent(); SusBoxController susBoxController = val.AddComponent(); Module.Strings.Core.Set("#MDLR_CRATE_sus" + name + "_DEF", "Woah, there actually seems to be something in here."); Module.Strings.Core.Set("#MDLR_CRATE_sus" + name + "_ACC", StaticColorHexes.AddColorToLabelString("Take it out.", StaticColorHexes.Green_Hex)); Module.Strings.Core.Set("#MDLR_CRATE_sus" + name + "_CAN", StaticColorHexes.AddColorToLabelString("Leave it.", StaticColorHexes.Green_Hex)); susBoxController.acceptOptionKey = "#MDLR_CRATE_sus" + name + "_ACC"; susBoxController.displayTextKey = "#MDLR_CRATE_sus" + name + "_DEF"; susBoxController.declineOptionKey = "#MDLR_CRATE_sus" + name + "_CAN"; susBoxController.talkPoint = val.transform; susBoxController.PickupID = ID; val.CreateFastBody(new IntVector2(28, 16), new IntVector2(0, -3)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add(name, val); } } public class SusBoxController : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler m_parentRoom; public Transform talkPoint; private int m_useCount = 0; public int PickupID = ConfidenceCore.ConfidenceCoreID; public string displayTextKey; public string acceptOptionKey; public string declineOptionKey; public string spentOptionKey = "#SHRINE_GENERIC_SPENT"; public void Start() { } public void ConfigureOnPlacement(RoomHandler room) { m_parentRoom = room; } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { if (!TextBoxManager.HasTextBox(talkPoint) && m_useCount <= 0) { ((MonoBehaviour)this).StartCoroutine(HandleShrineConversation(interactor)); } } private IEnumerator HandleSpentText(PlayerController interactor) { TextBoxManager.ShowInfoBox(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(spentOptionKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); } private IEnumerator HandleShrineConversation(PlayerController interactor) { string targetDisplayKey = displayTextKey; TextBoxManager.ShowStoneTablet(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(targetDisplayKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); yield return null; bool canUse = true; if (canUse) { string text = StringTableManager.GetString(acceptOptionKey); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, text, StringTableManager.GetString(declineOptionKey)); } else { GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); } while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); if (canUse && selectedResponse == 0) { LootEngine.SpawnItem(((Component)PickupObjectDatabase.GetById(PickupID)).gameObject, Vector2.op_Implicit(((BraveBehaviour)interactor).sprite.WorldBottomCenter), Vector2.zero, 0f, true, true, false); m_parentRoom.DeregisterInteractable((IPlayerInteractable)(object)this); m_useCount++; } } public void OnEnteredRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } public class ArmorCrate { public static void Init() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("ArmorCrate_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Crate_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.VFX_Collection.GetSpriteIdByName("crate_idle_001")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = StaticCollections.Crate_Animation; ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val4 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val4.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val4.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue))); val4.SetFloat("_EmissiveColorPower", 10f); val4.SetFloat("_EmissivePower", 10f); val4.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)val2).renderer.material = val4; val.AddComponent(); ArmorCrateController armorCrateController = val.AddComponent(); Module.Strings.Core.Set("#MDLR_CRATE_DEF", "A 'Goliath' class Modular repair crate. Take some?"); Module.Strings.Core.Set("#MDLR_CRATE_ACC", StaticColorHexes.AddColorToLabelString("Take the repairs.", StaticColorHexes.Green_Hex)); Module.Strings.Core.Set("#MDLR_CRATE_CAN", StaticColorHexes.AddColorToLabelString("Leave it.", StaticColorHexes.Light_Orange_Hex)); armorCrateController.acceptOptionKey = "#MDLR_CRATE_ACC"; armorCrateController.displayTextKey = "#MDLR_CRATE_DEF"; armorCrateController.declineOptionKey = "#MDLR_CRATE_CAN"; armorCrateController.talkPoint = val.transform; val.CreateFastBody(new IntVector2(26, 22), new IntVector2(1, 1)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("ArmorCrate_MDLR", val); InitSeeecreeetCraaaate(); } public static void InitSeeecreeetCraaaate() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("SecretArmorCrate_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("crate_smol")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); val3.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)val2).renderer.material = val3; val.AddComponent(); ArmorCrateController armorCrateController = val.AddComponent(); Module.Strings.Core.Set("#MDLR_CRATE_SECRET_DEF", "A small Modular repair kit. Take it?"); Module.Strings.Core.Set("#MDLR_CRATE_SECRET_ACC", StaticColorHexes.AddColorToLabelString("Take the repairs.", StaticColorHexes.Green_Hex)); Module.Strings.Core.Set("#MDLR_CRATE_SECRET_CAN", StaticColorHexes.AddColorToLabelString("Leave it.", StaticColorHexes.Light_Orange_Hex)); armorCrateController.acceptOptionKey = "#MDLR_CRATE_SECRET_ACC"; armorCrateController.displayTextKey = "#MDLR_CRATE_SECRET_DEF"; armorCrateController.declineOptionKey = "#MDLR_CRATE_SECRET_CAN"; armorCrateController.talkPoint = val.transform; armorCrateController.Armor = 1; val.CreateFastBody(new IntVector2(17, 18), new IntVector2(1, -3)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("SecretArmorCrate_MDLR", val); } } public class ArmorCrateController : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler m_parentRoom; public Transform talkPoint; private int m_useCount = 0; public int Armor = 3; public string displayTextKey; public string acceptOptionKey; public string declineOptionKey; public string spentOptionKey = "#SHRINE_GENERIC_SPENT"; public void Start() { if (Object.op_Implicit((Object)(object)((BraveBehaviour)this).spriteAnimator)) { ((BraveBehaviour)this).spriteAnimator.Play("cratealt_idle"); } } public void ConfigureOnPlacement(RoomHandler room) { m_parentRoom = room; RegisterMinimapIcon(); } public void RegisterMinimapIcon() { } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { if (!TextBoxManager.HasTextBox(talkPoint) && m_useCount <= 0) { ((MonoBehaviour)this).StartCoroutine(HandleShrineConversation(interactor)); } } private IEnumerator HandleSpentText(PlayerController interactor) { TextBoxManager.ShowInfoBox(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(spentOptionKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); } private IEnumerator HandleShrineConversation(PlayerController interactor) { string targetDisplayKey = displayTextKey; TextBoxManager.ShowStoneTablet(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(targetDisplayKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); yield return null; bool canUse = true; if (canUse) { string text = StringTableManager.GetString(acceptOptionKey); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, text, StringTableManager.GetString(declineOptionKey)); } else { GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); } while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); if (canUse && selectedResponse == 0) { ((GameActor)interactor).PlayEffectOnActor(VFXStorage.HealingSparklesVFX, new Vector3(0f, 0f), true, false, false); AkSoundEngine.PostEvent("Play_OBJ_heart_heal_01", ((Component)interactor).gameObject); HealthHaver healthHaver = ((BraveBehaviour)interactor).healthHaver; healthHaver.Armor += (float)Armor; m_parentRoom.DeregisterInteractable((IPlayerInteractable)(object)this); ((BraveBehaviour)this).spriteAnimator.Play("cratealt_close"); m_useCount++; } } public void OnEnteredRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } public class ExpressElevator { public class Elevator : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler parentRoom; private bool Triggered = false; public void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown SpeculativeRigidbody component = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } component.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)component.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody myBody, PixelCollider myCollider, SpeculativeRigidbody otherbody, PixelCollider otherCollider) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) if ((int)myCollider.CollisionLayer == 7) { RoomHandler val = GameManager.Instance.Dungeon.data.rooms[1]; IntVector2 centerCell = val.GetCenterCell(); if (!Triggered) { PlayerController component2 = ((Component)otherbody).gameObject.GetComponent(); Triggered = true; PlayerController otherPlayer = GameManager.Instance.GetOtherPlayer(component2); if (Object.op_Implicit((Object)(object)otherPlayer)) { otherPlayer.ReuniteWithOtherPlayer(component2, false); } StaticReferenceManager.DestroyAllEnemyProjectiles(); Minimap.Instance.ToggleMinimap(false, false); GameManager.IsBossIntro = true; for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i])) { GameManager.Instance.AllPlayers[i].SetInputOverride("BossIntro"); } } GameManager.Instance.PreventPausing = true; GameUIRoot.Instance.HideCoreUI(string.Empty); GameUIRoot.Instance.ToggleLowerPanels(false, false, string.Empty); CameraController mainCameraController = GameManager.Instance.MainCameraController; GameManager.Instance.MainCameraController.SetManualControl(true, true); GameManager.Instance.MainCameraController.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoElevator()); } } }); } public IEnumerator DoElevator() { AkSoundEngine.PostEvent("Play_ITM_Crisis_Stone_Shield_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Play_MachineNoises", ((Component)this).gameObject); float e = 0f; while (e < 1f) { e += BraveTime.DeltaTime; yield return null; } e = 0f; if (!GameManager.Instance.PrimaryPlayer.IsUsingAlternateCostume) { TextBoxManager.ShowTextBox(((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform, 2f, "Let's do this.", "golem", false, (BoxSlideOrientation)0, true, false); } while (e < (float)(GameManager.Instance.PrimaryPlayer.IsUsingAlternateCostume ? 1 : 3)) { e += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_Alarm_BeepBeep", ((Component)this).gameObject); ((BraveBehaviour)this).spriteAnimator.Play("elevator_move"); e = 0f; float q = 0f; while (e < 2f) { if (q > 0.2f) { q = 0f; PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController p in allPlayers) { p.WarpToPoint(TransformExtensions.PositionVector2(((BraveBehaviour)p).transform) - new Vector2(0f, 0.0625f), false, false); } } q += BraveTime.DeltaTime; e += BraveTime.DeltaTime; yield return null; } e = 0f; Pixelator.Instance.FadeToBlack(1.5f, false, 0f); while ((double)e < 1.5) { if (q > 0.2f) { q = 0f; PlayerController[] allPlayers2 = GameManager.Instance.AllPlayers; foreach (PlayerController p2 in allPlayers2) { p2.WarpToPoint(TransformExtensions.PositionVector2(((BraveBehaviour)p2).transform) - new Vector2(0f, 0.0625f), false, false); } } q += BraveTime.DeltaTime; e += BraveTime.DeltaTime; yield return null; } GameManager.IsBossIntro = false; for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i])) { GameManager.Instance.AllPlayers[i].ClearInputOverride("BossIntro"); } } AkSoundEngine.PostEvent("Stop_Alarm_BeepBeep", ((Component)this).gameObject); AkSoundEngine.PostEvent("Stop_MachineNoises", ((Component)this).gameObject); GameManager.Instance.PreventPausing = false; GameManager.Instance.LoadCustomLevel(PDashTwo.PastDefinition.dungeonSceneName); } public void Update() { } public void ConfigureOnPlacement(RoomHandler room) { parentRoom = room; } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { } public void OnEnteredRange(PlayerController interactor) { } public void OnExitRange(PlayerController interactor) { } } public static void Init() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_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_00c4: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: 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) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Express_Elevator_To_Hell"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("bridge_idle_001")); tk2dSpriteAnimator val3 = val.AddComponent(); val.CreateFastBody(new IntVector2(4, 160), new IntVector2(0, 0)); val.CreateFastBody(new IntVector2(4, 160), new IntVector2(252, 0)); val.CreateFastBody(new IntVector2(96, 16), new IntVector2(0, 0)); val.CreateFastBody(new IntVector2(96, 16), new IntVector2(160, 0)); val.CreateFastBody(new IntVector2(96, 16), new IntVector2(0, 144)); val.CreateFastBody(new IntVector2(96, 16), new IntVector2(160, 144)); val.CreateFastBody((CollisionLayer)7, new IntVector2(244, 64), new IntVector2(6, 64)); val3.Library = Module.ModularAssetBundle.LoadAsset("ElevatorAnimationAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("elevator_idle"); val3.playAutomatically = true; ((BraveBehaviour)val3).sprite.usesOverrideMaterial = true; Material val4 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val4.mainTexture = ((BraveBehaviour)((BraveBehaviour)val3).sprite).renderer.material.mainTexture; val4.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val4.SetFloat("_EmissiveColorPower", 10f); val4.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)((BraveBehaviour)val3).sprite).renderer.material = val4; val.AddComponent(); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Critical")); StaticReferences.customObjects.Add("Express_Elevator_To_Hell_Past", val); GameObject val5 = PrefabBuilder.BuildObject("Express_Elevator_In_Hell"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("bridge_idle_001")); ((BraveBehaviour)val6).sprite.usesOverrideMaterial = true; Material val7 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val7.mainTexture = ((BraveBehaviour)((BraveBehaviour)val3).sprite).renderer.material.mainTexture; val7.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val7.SetFloat("_EmissiveColorPower", 10f); val7.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)((BraveBehaviour)val6).sprite).renderer.material = val7; val5.CreateFastBody(new IntVector2(4, 160), new IntVector2(0, 0)); val5.CreateFastBody(new IntVector2(4, 160), new IntVector2(252, 0)); val5.CreateFastBody(new IntVector2(96, 16), new IntVector2(0, 0)); val5.CreateFastBody(new IntVector2(96, 16), new IntVector2(160, 0)); val5.CreateFastBody(new IntVector2(96, 16), new IntVector2(0, 144)); val5.CreateFastBody(new IntVector2(96, 16), new IntVector2(160, 144)); GameObjectExtensions.SetLayerRecursively(val5, LayerMask.NameToLayer("BG_Critical")); StaticReferences.customObjects.Add("Express_Elevator_To_Hell_Broke", val5); } } public class BigFuckOffDoorAuto { public class BigDoorBehaviorAuto : MonoBehaviour { private RoomHandler thisRoom; private bool Trigger = false; private SpeculativeRigidbody leftDoor; private SpeculativeRigidbody rightDoor; public void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Trigger = true; thisRoom = Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position); leftDoor = ((Component)((Component)this).transform.Find("Left_Door_Body")).gameObject.GetComponent(); rightDoor = ((Component)((Component)this).transform.Find("Right_Door_Body")).gameObject.GetComponent(); } public void Update() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)GameManager.Instance.BestActivePlayer == (Object)null)) { _ = ((BraveBehaviour)GameManager.Instance.BestActivePlayer).sprite.WorldCenter; if (0 == 0 && Trigger && Vector2.Distance(((BraveBehaviour)GameManager.Instance.BestActivePlayer).sprite.WorldCenter, TransformExtensions.PositionVector2(((Component)this).gameObject.transform)) < 6f) { AkSoundEngine.PostEvent("Play_OBJ_moondoor_close_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_moondoor_close_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); Trigger = !Trigger; ((MonoBehaviour)this).StartCoroutine(DoOpen()); ((Component)this).GetComponent().Play("open"); } } } public void OnRecieveMessage(GameObject obj, string message) { Trigger = true; } public IEnumerator DoOpen() { float e2 = 0f; while (e2 < 1.8f) { e2 += BraveTime.DeltaTime; yield return null; } e2 = 0f; Vector2 lP = Vector2.op_Implicit(((BraveBehaviour)leftDoor).transform.localPosition); Vector2 rP = Vector2.op_Implicit(((BraveBehaviour)rightDoor).transform.localPosition); while (e2 < 3.2f) { float t = e2 / 3.2f; ((Component)leftDoor).gameObject.transform.localPosition = Vector2.op_Implicit(Vector2.Lerp(lP, lP + new Vector2(-2f, 0f), t)); ((Component)rightDoor).gameObject.transform.localPosition = Vector2.op_Implicit(Vector2.Lerp(rP, rP + new Vector2(2f, 0f), t)); leftDoor.Reinitialize(); rightDoor.Reinitialize(); e2 += BraveTime.DeltaTime; yield return null; } } } public static void Init() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_00e1: 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) GameObject val = PrefabBuilder.BuildObject("BigFuckOffDoor_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("big_fucking_door_open_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; val.AddComponent(); val.AddComponent(); tk2dSpriteAnimator val4 = val.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("BigDoorAnimation").GetComponent(); val4.defaultClipId = val4.Library.GetClipIdByName("idle"); val4.playAutomatically = true; AddChild("Left_Door_Body", new Vector2(0f, 0.5f), val); AddChild("Right_Door_Body", new Vector2(2f, 0.5f), val); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("BigFuckOffDoor_Auto_MDLR", val); } public static void AddChild(string name, Vector2 Offset, GameObject parent) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject(name); val.transform.parent = parent.transform; val.transform.localPosition = Vector2.op_Implicit(Offset); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); val.CreateFastBody(new IntVector2(32, 53), new IntVector2(0, 0)); } } public class BigSwitch { public static void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("BigSwitch_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("table_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)124, (byte)186, (byte)55, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 4f); val3.SetFloat("_EmissivePower", 3f); val3.SetFloat("_EmissiveThresholdSensitivity", 0.05f); ((BraveBehaviour)val2).renderer.material = val3; val.AddComponent(); SwitchController switchController = val.AddComponent(); Module.Strings.Core.Set("#MDLR_BIG_SWITCH_DEF", "The override power switch to the main Shipyard."); Module.Strings.Core.Set("#MDLR_BIG_SWITCH_ACC", StaticColorHexes.AddColorToLabelString("", StaticColorHexes.Green_Hex)); Module.Strings.Core.Set("#MDLR_BIG_SWITCH_CAN", StaticColorHexes.AddColorToLabelString("", StaticColorHexes.Red_Color_Hex)); switchController.displayTextKey = "#MDLR_BIG_SWITCH_DEF"; switchController.acceptOptionKey = "#MDLR_BIG_SWITCH_ACC"; switchController.declineOptionKey = "#MDLR_BIG_SWITCH_CAN"; switchController.talkPoint = val.transform; val.CreateFastBody(new IntVector2(60, 16), new IntVector2(2, -2)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("BigSwitch_MDLR", val); } } public class SwitchController : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { private RoomHandler m_parentRoom; public Transform talkPoint; private int m_useCount = 0; public string displayTextKey; public string acceptOptionKey; public string declineOptionKey; public string spentOptionKey = "#SHRINE_GENERIC_SPENT"; public void Start() { } public void ConfigureOnPlacement(RoomHandler room) { m_parentRoom = room; RegisterMinimapIcon(); } public void RegisterMinimapIcon() { } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { if (!TextBoxManager.HasTextBox(talkPoint) && m_useCount <= 0) { ((MonoBehaviour)this).StartCoroutine(HandleShrineConversation(interactor)); } } private IEnumerator HandleSpentText(PlayerController interactor) { TextBoxManager.ShowInfoBox(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(spentOptionKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); } private IEnumerator HandleShrineConversation(PlayerController interactor) { string targetDisplayKey = displayTextKey; TextBoxManager.ShowStoneTablet(talkPoint.position, talkPoint, -1f, StringTableManager.GetLongString(targetDisplayKey), true, false); int selectedResponse = -1; interactor.SetInputOverride("shrineConversation"); yield return null; bool canUse = true; if (canUse) { string text = StringTableManager.GetString(acceptOptionKey); GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, text, StringTableManager.GetString(declineOptionKey)); } else { GameUIRoot.Instance.DisplayPlayerConversationOptions(interactor, (TalkModule)null, StringTableManager.GetString(declineOptionKey), string.Empty); } while (!GameUIRoot.Instance.GetPlayerConversationResponse(ref selectedResponse)) { yield return null; } interactor.ClearInputOverride("shrineConversation"); TextBoxManager.ClearTextBox(talkPoint); if (canUse && selectedResponse == 0) { AkSoundEngine.PostEvent("Play_ENM_darken_world_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Play_OBJ_moondoor_close_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); ((BraveBehaviour)this).sprite.SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("table_002")); GlobalMessageRadio.BroadcastMessage("ShutDown"); ((MonoBehaviour)this).StartCoroutine(DoShut()); m_useCount++; } } public IEnumerator DoShut() { float e = 0f; while (e < 3f) { e += BraveTime.DeltaTime; yield return null; } Toolbox.NotifyCustom("A DOOR OPENS...", "", ((BraveBehaviour)this).sprite.spriteId, ((BraveBehaviour)this).sprite.collection, (NotificationColor)0, forceSingleLine: true); yield return null; } public void OnEnteredRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } public class BigFuckOffDoor { public class BigDoorBehavior : MonoBehaviour { private RoomHandler thisRoom; private bool Trigger = false; private SpeculativeRigidbody leftDoor; private SpeculativeRigidbody rightDoor; public void Start() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "ShutDown" }, OnRecieveMessage); thisRoom = Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position); thisRoom.Entered += new OnEnteredEventHandler(ThisRoom_Entered); leftDoor = ((Component)((Component)this).transform.Find("Left_Door_Body")).gameObject.GetComponent(); rightDoor = ((Component)((Component)this).transform.Find("Right_Door_Body")).gameObject.GetComponent(); } private void ThisRoom_Entered(PlayerController p) { if (Trigger) { AkSoundEngine.PostEvent("Play_OBJ_moondoor_close_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent()); Trigger = !Trigger; ((MonoBehaviour)this).StartCoroutine(DoOpen()); ((Component)this).GetComponent().Play("open"); } } public void OnRecieveMessage(GameObject obj, string message) { Trigger = true; } public IEnumerator DoOpen() { float e2 = 0f; while (e2 < 1.8f) { e2 += BraveTime.DeltaTime; yield return null; } e2 = 0f; Vector2 lP = Vector2.op_Implicit(((BraveBehaviour)leftDoor).transform.localPosition); Vector2 rP = Vector2.op_Implicit(((BraveBehaviour)rightDoor).transform.localPosition); while (e2 < 3.2f) { float t = e2 / 3.2f; ((Component)leftDoor).gameObject.transform.localPosition = Vector2.op_Implicit(Vector2.Lerp(lP, lP + new Vector2(-2f, 0f), t)); ((Component)rightDoor).gameObject.transform.localPosition = Vector2.op_Implicit(Vector2.Lerp(rP, rP + new Vector2(2f, 0f), t)); leftDoor.Reinitialize(); rightDoor.Reinitialize(); e2 += BraveTime.DeltaTime; yield return null; } } } public static void Init() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("BigFuckOffDoor_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("big_fucking_door_open_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; val.AddComponent(); val.AddComponent(); tk2dSpriteAnimator val4 = val.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("BigDoorAnimation").GetComponent(); val4.defaultClipId = val4.Library.GetClipIdByName("idle"); val4.playAutomatically = true; AddChild("Left_Door_Body", new Vector2(0f, 0.5f), val); GameObject val5 = AddChild("Right_Door_Body", new Vector2(2f, 0.5f), val); QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_BIGFUCKOFFDOOR", "Sealed tight. Maybe there's a way to open it somewhere..."); quickInterractableController.Interact_String = "#MDLR_BIGFUCKOFFDOOR"; quickInterractableController.UsesTransformDist = true; quickInterractableController.ReachMult = 2.25f; GameObject val6 = PrefabBuilder.BuildObject("Talkpoint"); val6.transform.parent = ((Component)val2).gameObject.transform; val6.transform.localPosition = new Vector3(2f, 0f); quickInterractableController.talkPoint = val6.transform; val.CreateFastBody(new IntVector2(0, 0), new IntVector2(0, 0)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("BigFuckOffDoor_MDLR", val); } public static GameObject AddChild(string name, Vector2 Offset, GameObject parent) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject(name); val.transform.parent = parent.transform; val.transform.localPosition = Vector2.op_Implicit(Offset); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); val.CreateFastBody(new IntVector2(32, 53), new IntVector2(0, 0)); return val; } } public class MiscDecoratives { public static void Init() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_022c: 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_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0296: 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_02c7: Unknown result type (might be due to invalid IL or missing references) CreateObject("MLDR_LoaderSuit", "loader_suit", "A Loader Suit for moving very heavy cargo, and missing its winch arm.\nWill not be used for its intended purpose.", new IntVector2(22, 17), new IntVector2(15, 0)); CreateObject("MLDR_ShippingContainer_Closed", "shipping cratedone", "A locked shipping crate.\nNo other fate for those inside...", new IntVector2(98, 206), new IntVector2(0, -4)); GameObject val = CreateObject("MLDR_Loader", "big_load", "A collosal loader, for transporting very heavy containers. Unfortunately, no way to ride it.", new IntVector2(0, 0), new IntVector2(0, 0)); val.CreateFastBody(new IntVector2(25, 27), new IntVector2(83, -4)); val.CreateFastBody(new IntVector2(25, 27), new IntVector2(83, 121)); val.CreateFastBody(new IntVector2(25, 27), new IntVector2(1, 38)); val.CreateFastBody(new IntVector2(25, 27), new IntVector2(166, 38)); GameObject val2 = PrefabBuilder.BuildObject("Talkpoint"); val2.transform.parent = val.transform; Transform transform = val2.transform; transform.localPosition += new Vector3(0f, 0f); tk2dSprite val3 = val2.AddComponent(); ((tk2dBaseSprite)val3).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val3).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("bigload_shadow")); ((tk2dBaseSprite)val3).usesOverrideMaterial = true; ((tk2dBaseSprite)val3).hasOffScreenCachedUpdate = true; Material val4 = new Material(StaticShaders.FloorTileMaterial_Transparency); val4.SetTexture("_MainTex", ((BraveBehaviour)val3).renderer.material.mainTexture); GameObjectExtensions.SetLayerRecursively(val2, LayerMask.NameToLayer("BG_Nonsense")); CreateObject("MLDR_PowerCellsSmall", "power_cell_stack_1", "A rack of Modular Power Cells.", new IntVector2(33, 36), new IntVector2(1, -4)); CreateObject("MLDR_PowerCellsStack", "power_cell_stack_2", "A large rack of Modular Power Cells. High Voltage!", new IntVector2(33, 54), new IntVector2(1, -4)); StaticReferences.customPlaceables.Add("TrolleysMDLR", Toolbox.GenerateDungeonPlaceable(new Dictionary { { CreateObject("Trolley_Empty", "trolleys1", "An empty trolley.", new IntVector2(18, 13), new IntVector2(0, -4)), 1f }, { CreateObject("Trolley_Modules", "trolleys2", "A trolley, with stacks of modules tied haphazardly to it. All Unprogrammed, of no use.", new IntVector2(18, 13), new IntVector2(0, -4)), 0.8f }, { CreateObject("Trolley_Drive", "trolleys3", "A trolley with a singular, unmarked drive on it. Likely due to a rush job.", new IntVector2(18, 13), new IntVector2(0, -4)), 0.5f }, { CreateObject("Trolley_Scrap", "trolleys4", "A trolley with some bits of Scrap on it. Likely left like that during the evacuation.", new IntVector2(18, 13), new IntVector2(0, -4)), 0.7f }, { CreateObject("Trolley_Crowbar", "trolleys5", "A trolley with a singular crowbar on it. 3rd edition, unusually enough.", new IntVector2(18, 13), new IntVector2(0, -4)), 0.2f } })); } public static GameObject CreateObject(string name, string spriteName, string Dialogue, IntVector2 size, IntVector2 offset) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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) GameObject val = PrefabBuilder.BuildObject(name); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 0f); val3.SetFloat("_EmissivePower", 0f); ((BraveBehaviour)val2).renderer.material = val3; val.CreateFastBody(size, offset); QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_MISC_" + name, Dialogue); quickInterractableController.Interact_String = "#MDLR_MISC_" + name; quickInterractableController.talkPoint = val.transform; StaticReferences.customObjects.Add(name, val); return val; } } public class FanModulars { public static void Init() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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) CreateObject("NN_Modular", "NN_modular", "Modular Version 0.314.\nOriginally intended for research.", new IntVector2(17, 21), new IntVector2(0, -4)); CreateObject("_X_Modular", "broken_modular", "Modular Version 0.7.\nA release candidate version, until it was\nunceremoniously dropped, and broken.\nMissing its AI drive, and has a cracked screen.", new IntVector2(16, 22), new IntVector2(0, -4)); CreateObject("Lynceus_Modular", "ModularSpiderHelloBunnyYoureAwesome", "Modular Version 0.49.\nReconnaissance machine. Equipped for all terrain. I would be jealous, if I could be jealous.", new IntVector2(18, 17), new IntVector2(0, -4)); CreateObject("Ski_Modular", "Modular_Deco_LightWeight_Base_Ver0.512", "Modular Version 0.512.\nVery lightweight, and scarily tall when upright.", new IntVector2(28, 18), new IntVector2(0, -4)); } public static GameObject CreateObject(string name, string spriteName, string Dialogue, IntVector2 size, IntVector2 offset) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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) GameObject val = PrefabBuilder.BuildObject(name); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 0f); val3.SetFloat("_EmissivePower", 0f); ((BraveBehaviour)val2).renderer.material = val3; val.CreateFastBody(size, offset); QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_MACHINE_" + name, Dialogue); quickInterractableController.Interact_String = "#MDLR_MACHINE_" + name; quickInterractableController.talkPoint = val.transform; StaticReferences.customObjects.Add(name, val); return val; } } public class ZappyDoor { public class EngineBehavior : MonoBehaviour { public void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.position -= new Vector3(0f, 1f); GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "PastWin" }, OnRecieveMessage); } public void OnRecieveMessage(GameObject obj, string message) { ((Component)this).GetComponent().PlayAndDestroyObject("destroy", (Action)null); } } public static void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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) GameObject val = PrefabBuilder.BuildObject("ZappyDoor_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("bigzappydoor_destroy_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, (byte)206, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 20f); val3.SetFloat("_EmissivePower", 20f); ((BraveBehaviour)val2).renderer.material = val3; tk2dSpriteAnimator val4 = val.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("ZappyDoorAnimation").GetComponent(); val4.defaultClipId = val4.Library.GetClipIdByName("idle"); val4.playAutomatically = true; val.AddComponent(); val.CreateFastBody(new IntVector2(24, 112), new IntVector2(-4, -8)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("ZappyDoor_MDLR", val); } } public class Spaceship { public class BigAssSpaceship : MonoBehaviour { public tk2dBaseSprite sprite; public void Start() { sprite = ((Component)this).GetComponent(); GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "DoTakeOff" }, OnRecieveMessage); } public void OnRecieveMessage(GameObject obj, string message) { ((MonoBehaviour)GameManager.Instance).StartCoroutine(EnterTheGungeon()); } private Vector4 GetCenterPointInScreenUV(Vector2 centerPoint) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = GameManager.Instance.MainCameraController.Camera.WorldToViewportPoint(Vector2Extensions.ToVector3ZUp(centerPoint, 0f)); return new Vector4(val.x, val.y, 0f, 0f); } public IEnumerator EnterTheGungeon() { Pixelator.Instance.FadeToColor(1f, Color.black, false, 0.5f); float e6 = 0f; while (e6 < 1.5f) { e6 += BraveTime.DeltaTime; yield return null; } for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i])) { GameManager.Instance.AllPlayers[i].SetInputOverride("goodbye!"); ((BraveBehaviour)((BraveBehaviour)GameManager.Instance.AllPlayers[i]).sprite).renderer.enabled = false; SpriteOutlineManager.RemoveOutlineFromSprite(((BraveBehaviour)GameManager.Instance.AllPlayers[i]).sprite, false); GameManager.Instance.AllPlayers[i].m_hideGunRenderers = new OverridableBool(true); ((GameActor)GameManager.Instance.AllPlayers[i]).ToggleShadowVisiblity(false); GameManager.Instance.AllPlayers[i].ToggleGunRenderers(false, ""); } } AkSoundEngine.PostEvent("Play_OBJ_hugedoor_close_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_WPN_energycannon_loop_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); GameManager.Instance.PreventPausing = true; GameUIRoot.Instance.ToggleLowerPanels(false, false, string.Empty); Minimap.Instance.ToggleMinimap(false, false); GameManager.IsBossIntro = true; GameUIBossHealthController gameUIBossHealthController = GameUIRoot.Instance.bossController; gameUIBossHealthController.DisableBossHealth(); GameUIRoot.Instance.HideCoreUI("PainAndAgony"); CameraController m_camera = GameManager.Instance.MainCameraController; m_camera.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)((Component)this).GetComponent()).sprite.WorldCenter); m_camera.OverrideRecoverySpeed = 100f; m_camera.SetManualControl(true, true); ((Component)this).GetComponent().Play("idle_closed"); Pixelator.Instance.FadeToColor(1f, Color.black, true, 0f); e6 = 0f; while (e6 < 2.5f) { e6 += BraveTime.DeltaTime; yield return null; } e6 = 0f; TextBoxManager.ShowTextBox(((Component)this).transform.position + new Vector3(10.25f, 12.5f, 0f), ((Component)this).transform, 3.5f, "---DESTINATION SET TO: ---\nGUNYMEDE.", "golem", false, (BoxSlideOrientation)0, true, false); while (e6 < 2.5f) { e6 += BraveTime.DeltaTime; yield return null; } e6 = 0f; Vector2 Pos2 = TransformExtensions.PositionVector2(((Component)this).transform); AkSoundEngine.PostEvent("Play_obj_bowler_ignite_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); while (e6 < 1.5f) { ((Component)this).gameObject.transform.position = Vector2.op_Implicit(Vector2.Lerp(Pos2, Pos2 + new Vector2(-5f, 0f), Toolbox.SinLerpTValueFull(e6 / 3f))); m_camera.OverridePosition = Vector2.op_Implicit(((BraveBehaviour)((Component)this).GetComponent()).sprite.WorldCenter); e6 += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_ENM_cannonball_roll_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); ((Component)this).GetComponent().Play("take_off"); Material m_distortMaterial = new Material(ShaderCache.Acquire("Brave/Internal/DistortionRadius")); m_distortMaterial.SetFloat("_Strength", 1f); m_distortMaterial.SetFloat("_TimePulse", 0f); m_distortMaterial.SetFloat("_RadiusFactor", 0f); m_distortMaterial.SetVector("_WaveCenter", GetCenterPointInScreenUV(sprite.WorldCenter)); Pixelator.Instance.RegisterAdditionalRenderPass(m_distortMaterial); AkSoundEngine.PostEvent("Play_ENM_Grip_Master_Linger_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); AkSoundEngine.PostEvent("Play_ENM_Grip_Master_Linger_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); while (e6 < 4.5f) { Exploder.DoDistortionWave(sprite.WorldCenter, 0.1f * ConfigManager.DistortionWaveMultiplier, 0.75f * ConfigManager.DistortionWaveMultiplier, 22f, 0.75f); e6 += BraveTime.DeltaTime; yield return null; } e6 = 0f; Pos2 = TransformExtensions.PositionVector2(((Component)this).transform); AkSoundEngine.PostEvent("Play_BOSS_DragunGold_Crackle_01", ((Component)GameManager.Instance.BestActivePlayer).gameObject); while (e6 < 1f) { e6 += BraveTime.DeltaTime; yield return null; } ((Component)this).GetComponent().spawnShadows = true; Exploder.DoDistortionWave(sprite.WorldCenter, 100f * ConfigManager.DistortionWaveMultiplier, 0.25f * ConfigManager.DistortionWaveMultiplier, 30f, 0.5f); e6 = 0f; AkSoundEngine.PostEvent("Play_BOSS_spacebaby_explode_01", ((Component)this).gameObject); while (e6 < 1f) { ((Component)this).gameObject.transform.position = Vector2.op_Implicit(Vector2.Lerp(Pos2, Pos2 + new Vector2(0f, 100f), Toolbox.SinLerpTValue(e6))); m_distortMaterial.SetFloat("_Strength", 0f); m_distortMaterial.SetFloat("_TimePulse", 0f); m_distortMaterial.SetFloat("_RadiusFactor", 0f); e6 += BraveTime.DeltaTime; yield return null; } Pixelator.Instance.FreezeFrame(); BraveTime.RegisterTimeScaleMultiplier(0f, ((Component)this).gameObject); float ela = 0f; while (ela < ConvictPastController.FREEZE_FRAME_DURATION) { ela += GameManager.INVARIANT_DELTA_TIME; yield return null; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (player.HasPickupID(HighValueInfo.CoolInfoID)) { GameStatsManager.Instance.RegisterStatChange((TrackedStats)25, 100f); AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.PAST_MASTERY, value: true); } } if (PDashTwo.P_2ParticleController.RecievedDamage) { AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.PAST_MASTERY, value: true); } BraveTime.ClearMultiplier(((Component)this).gameObject); TimeTubeCreditsController ttcc = new TimeTubeCreditsController(); Pixelator.Instance.FadeToColor(0.15f, Color.white, true, 0.15f); ttcc.ClearDebris(); yield return ((MonoBehaviour)this).StartCoroutine(ttcc.HandleTimeTubeCredits(((BraveBehaviour)GameManager.Instance.PrimaryPlayer).sprite.WorldCenter, false, (tk2dSpriteAnimator)null, -1, false)); AmmonomiconController.Instance.OpenAmmonomicon(true, true); } } public static void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Spaceship_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("spaceship_closed")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, (byte)206, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material = val3; tk2dSpriteAnimator val4 = val.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("SpaceshipAnimation").GetComponent(); val4.defaultClipId = val4.Library.GetClipIdByName("idle"); val4.playAutomatically = true; val.AddComponent(); val.AddComponent(); ImprovedAfterImage improvedAfterImage = val.AddComponent(); improvedAfterImage.dashColor = new Color(0f, 2f, 2f); improvedAfterImage.shadowLifetime = 1f; improvedAfterImage.shadowTimeDelay = 0.01f; improvedAfterImage.spawnShadows = false; val.CreateFastBody(new IntVector2(202, 105), new IntVector2(11, 16)); val.CreateFastBody(new IntVector2(162, 63), new IntVector2(31, -121)); val.CreateFastBody(new IntVector2(144, 64), new IntVector2(40, 184)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("GiantSpaceShip_MDLR", val); } } public class TriggerEncounter { public class CombatTriggerBehavior : MonoBehaviour { private RoomHandler thisRoom; private bool Trigger = false; public void Start() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "ShutDown" }, OnRecieveMessage); thisRoom = Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position); thisRoom.Entered += new OnEnteredEventHandler(ThisRoom_Entered); } public void OnRecieveMessage(GameObject obj, string message) { Trigger = true; } private void ThisRoom_Entered(PlayerController p) { if (Trigger) { thisRoom.SealRoom(); Trigger = !Trigger; for (int i = 0; i < 2; i++) { thisRoom.TriggerNextReinforcementLayer(); } } } } public static void Init() { GameObject val = PrefabBuilder.BuildObject("CombatTrigger_MDLR"); val.AddComponent(); StaticReferences.customObjects.Add("CombatTrigger_MDLR", val); } } public class Engine { public class EngineBehavior : MonoBehaviour { public void Start() { GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "ShutDown" }, OnRecieveMessage); } public void OnRecieveMessage(GameObject obj, string message) { ((Component)this).GetComponent().Play("bangbang"); } } public static void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Engine_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("engine_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 8f); val3.SetFloat("_EmissivePower", 3f); ((BraveBehaviour)val2).renderer.material = val3; tk2dSpriteAnimator val4 = val.AddComponent(); val4.Library = Module.ModularAssetBundle.LoadAsset("EngineAnimation").GetComponent(); val4.defaultClipId = val4.Library.GetClipIdByName("idle"); val4.playAutomatically = true; val.AddComponent(); val.CreateFastBody(new IntVector2(24, 28), new IntVector2(1, -4)); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("Engine_Decor_MDLR", val); } } public class BigVaultObject { public static void Init() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("BigVaultDoor_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("vault")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; ((tk2dBaseSprite)val2).usesOverrideMaterial = true; ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; val.CreateFastBody(new IntVector2(80, 96), new IntVector2(16, 16)); val.CreateFastBody(new IntVector2(80, 96), new IntVector2(160, 16)); val.AddComponent(); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); StaticReferences.customObjects.Add("BigVault_MDLR", val); } } public class BloodRedLightness { public class RedLight_Controller : MonoBehaviour { private AdditionalBraveLight light; private float Counter; public void Start() { light = ((Component)this).GetComponent(); } public void Update() { Counter += Toolbox.SinLerpTValueFull(BraveTime.DeltaTime * 6f); light.LightIntensity = Mathf.PingPong(Counter, 12f); } } public static void Init() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("BloodRedLight_MDLR"); AdditionalBraveLight val2 = val.AddComponent(); ((BraveBehaviour)val2).transform.position = val.transform.position; val2.LightColor = Color.red; val2.LightIntensity = 5f; val2.LightRadius = 10f; val.AddComponent(); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); StaticReferences.customObjects.Add("BloodRedLight_MDLR", val); } } public class Dead { public class CorpseController : MonoBehaviour { private tk2dBaseSprite sprite; private ParticleSystem SMOKE; public void Start() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) sprite = ((Component)this).GetComponent(); SMOKE = Object.Instantiate(CrateSpawnController.SmokeObject).GetComponent(); Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position).RegisterInteractable((IPlayerInteractable)(object)((Component)this).GetComponent()); } public void Update() { //IL_0044: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)SMOKE) && Object.op_Implicit((Object)(object)sprite) && !GameManager.Instance.IsPaused && Random.value < 0.025f) { Vector3 val = Vector2Extensions.ToVector3ZisY(sprite.WorldBottomLeft, 0f); Vector3 val2 = Vector2Extensions.ToVector3ZisY(sprite.WorldTopRight, 0f); Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(Random.Range(val.x, val2.x), Random.Range(val.y, val2.y), Random.Range(val.z, val2.z)); ParticleSystem sMOKE = SMOKE; TrailModule trails = sMOKE.trails; ((TrailModule)(ref trails)).worldSpace = false; MainModule main = sMOKE.main; EmitParams val3 = default(EmitParams); ((EmitParams)(ref val3)).position = position; ((EmitParams)(ref val3)).randomSeed = (uint)Random.Range(1, 1000); EmitParams val4 = val3; EmissionModule emission = sMOKE.emission; ((EmissionModule)(ref emission)).enabled = false; ((Component)sMOKE).gameObject.SetActive(true); sMOKE.Emit(val4, 1); } } } public static void Init() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Dead_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("fuckingdead_001")); ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); val.CreateFastBody(new IntVector2(0, 0), new IntVector2(0, 0)); QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_CORPSE_", "You fought well."); quickInterractableController.Interact_String = "#MDLR_CORPSE_"; GameObject val4 = PrefabBuilder.BuildObject("Talkpoint"); val4.transform.parent = val.transform; Transform transform = val4.transform; transform.localPosition += new Vector3(2f, 2f); quickInterractableController.talkPoint = val4.transform; val.AddComponent(); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); StaticReferences.customObjects.Add("DeadCorpseMDLR", val); } } public class PointyDecal { public static void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject("PointyDecal_Sticker"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("pointydecal")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material material = new Material(StaticShaders.Default_Shader); ((BraveBehaviour)val2).renderer.material = material; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); StaticReferences.customObjects.Add("PointDecalMDLR", val); } } public class SniperTurretsController : MonoBehaviour { public enum ActivationState { INSTANT, ONE_WAVE, TWO_WAVE } public enum State { PRIMED, ABOUT_TO_FIRE, POST_FIRE, PRE_PRIMED, INACTIVE, ACTIVATING } public int waveCount = 0; public ActivationState state = ActivationState.INSTANT; public string ActivatioAnimation; private bool Entered = false; public AIBulletBank bulletBank; public RoomHandler currentRoom; public GameObject muzzleFlashPrefab; public Vector2 shootPosition; public GameObject laserPointer; public tk2dTiledSprite laserPointerTiledSprite; public float SizeOffset = 1f; public bool isProfessional; public float DirectionToFire; public State CurrentState; public void Start() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0100: 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_0125: Unknown result type (might be due to invalid IL or missing references) CurrentState = State.INACTIVE; shootPosition = ((Component)this).GetComponent().WorldCenter; bulletBank = ((Component)this).GetComponent(); currentRoom = Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position); if ((Object)(object)laserPointer == (Object)null) { laserPointer = SpawnManager.SpawnVFX((GameObject)BraveResources.Load((!isProfessional) ? "Global VFX/VFX_LaserSight_Enemy" : "Global VFX/VFX_LaserSight_Enemy_Green", ".prefab"), true); laserPointer.transform.position = Vector2.op_Implicit(shootPosition); laserPointer.transform.parent = ((Component)this).gameObject.transform; laserPointerTiledSprite = laserPointer.GetComponent(); ((tk2dBaseSprite)laserPointerTiledSprite).HeightOffGround = 11f; ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = true; ((BraveBehaviour)laserPointerTiledSprite).transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(ReturnDirection())); laserPointerTiledSprite.dimensions = new Vector2(0f, 1f); ((tk2dBaseSprite)laserPointerTiledSprite).ForceRotationRebuild(); ((tk2dBaseSprite)laserPointerTiledSprite).UpdateZDepth(); } Actions.OnReinforcementWave = (Action)Delegate.Combine(Actions.OnReinforcementWave, (Action)delegate(RoomHandler roomHandler) { if (roomHandler == currentRoom && waveCount > 0) { waveCount--; } }); currentRoom.Entered += new OnEnteredEventHandler(CurrentRoom_Entered); } private void CurrentRoom_Entered(PlayerController p) { Entered = true; } private bool shouldBeActive() { if (CurrentState == State.INACTIVE) { return false; } if (CurrentState == State.ACTIVATING) { return false; } return true; } public void Update() { if ((Object)(object)laserPointer != (Object)null && (Object)(object)((Component)this).gameObject != (Object)null && shouldBeActive()) { DoRayCast(); } else if (waveCount == 0 && CurrentState == State.INACTIVE && Entered) { CurrentState = State.ACTIVATING; ((MonoBehaviour)this).StartCoroutine(Activate()); } } public IEnumerator Activate() { float e2 = 0f; ((Component)this).GetComponent().Play(ActivatioAnimation); ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = false; while (e2 < 1f) { e2 += BraveTime.DeltaTime; yield return null; } e2 = 0f; DoRayCast(); while (e2 < 1f) { bool enabled = e2 % 0.33f > 0.16f; if ((Object)(object)this == (Object)null || (Object)(object)((Component)laserPointerTiledSprite).gameObject == (Object)null || (Object)(object)((Component)this).gameObject == (Object)null) { yield break; } ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = enabled; e2 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = true; CurrentState = State.PRIMED; } public void DoRayCast() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) float num = float.MaxValue; Func func = (SpeculativeRigidbody otherRigidbody) => Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable); CollisionLayer val = (CollisionLayer)0; int num2 = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, val); RaycastResult val2 = default(RaycastResult); if (PhysicsEngine.Instance.Raycast(shootPosition, ReturnDirection(), 100f, ref val2, true, true, num2, (CollisionLayer?)null, false, func, (SpeculativeRigidbody)null)) { num = val2.Distance; if (Object.op_Implicit((Object)(object)val2.SpeculativeRigidbody) && ((CastResult)val2).OtherPixelCollider.CollisionLayer == val && CurrentState == State.PRIMED) { Shoot(); if (isProfessional) { SniperTurretsController[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Count(); i++) { if (array[i].isProfessional && array[i].currentRoom == currentRoom && array[i].shouldBeActive()) { array[i].Shoot(); } } } } } RaycastResult.Pool.Free(ref val2); laserPointerTiledSprite.dimensions = new Vector2(num / 0.0625f, 1f); ((tk2dBaseSprite)laserPointerTiledSprite).ForceRotationRebuild(); ((tk2dBaseSprite)laserPointerTiledSprite).UpdateZDepth(); } public void Shoot() { CurrentState = State.ABOUT_TO_FIRE; ((MonoBehaviour)GameManager.Instance).StartCoroutine(StartShoot()); } private IEnumerator StartShoot() { float elaWait = 0f; float duraWait = 1f; while (elaWait < duraWait) { bool enabled = elaWait % 0.33f > 0.16f; if ((Object)(object)this == (Object)null || (Object)(object)((Component)laserPointerTiledSprite).gameObject == (Object)null || (Object)(object)((Component)this).gameObject == (Object)null) { yield break; } ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = enabled; elaWait += BraveTime.DeltaTime; yield return null; } if ((Object)(object)this == (Object)null || (Object)(object)((Component)laserPointerTiledSprite).gameObject == (Object)null) { yield break; } if ((Object)(object)((Component)this).gameObject != (Object)null) { if ((Object)(object)((Component)laserPointerTiledSprite).gameObject == (Object)null) { yield break; } ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = false; AkSoundEngine.PostEvent("Play_WPN_sniperrifle_shot_01", ((Component)this).gameObject); GameObject gameObject = SpawnManager.SpawnProjectile(bulletBank.Bullets[0].BulletObject, Vector2.op_Implicit(shootPosition), Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(ReturnDirection())), true); Projectile component = gameObject.GetComponent(); component.baseData.speed = 50f; component.UpdateSpeed(); component.Shooter = ((Component)this).GetComponent(); component.IgnoreTileCollisionsFor(0.03f); component.pierceMinorBreakables = true; component.collidesWithEnemies = false; SpawnManager.PoolManager.Remove(((Component)component).gameObject.transform); component.BulletScriptSettings.preventPooling = true; elaWait = 0f; duraWait = 2f; if ((Object)(object)muzzleFlashPrefab != (Object)null) { GameObject vfx = SpawnManager.SpawnVFX(muzzleFlashPrefab, true); vfx.transform.position = Vector2.op_Implicit(shootPosition); vfx.transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(ReturnDirection())); vfx.GetComponent().HeightOffGround = 22f; Object.Destroy((Object)(object)vfx, 2f); } CurrentState = State.POST_FIRE; } while (elaWait < duraWait) { if ((Object)(object)this == (Object)null || (Object)(object)((Component)laserPointerTiledSprite).gameObject == (Object)null || (Object)(object)((Component)this).gameObject == (Object)null) { yield break; } if (elaWait > duraWait - 0.5f) { ((BraveBehaviour)laserPointerTiledSprite).renderer.enabled = true; } elaWait += BraveTime.DeltaTime; CurrentState = State.PRE_PRIMED; yield return null; } CurrentState = State.PRIMED; } public Vector2 ReturnDirection() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return Toolbox.GetUnitOnCircle(DirectionToFire, 1f); } } public class SniperTurretsDefault { public static void InitDownward() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) Entry item = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val = PrefabBuilder.BuildObject("Sniper_Down"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("preIlde"); val3.playAutomatically = true; AIBulletBank val4 = val.gameObject.AddComponent(); SniperTurretsController sniperTurretsController = val.gameObject.AddComponent(); sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab = ref sniperTurretsController.muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); muzzleFlashPrefab = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController.ActivatioAnimation = "activate_down"; val4.Bullets = new List(); val4.Bullets.Add(item); StaticReferences.customObjects.Add("laserTurretDown_0", val.gameObject); Entry item2 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val5 = PrefabBuilder.BuildObject("Sniper_Down_1"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("preIlde"); val7.playAutomatically = true; AIBulletBank val8 = val5.gameObject.AddComponent(); SniperTurretsController sniperTurretsController2 = val5.gameObject.AddComponent(); sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab2 = ref sniperTurretsController2.muzzleFlashPrefab; PickupObject byId2 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController2.ActivatioAnimation = "activate_down"; sniperTurretsController2.waveCount = 1; val8.Bullets = new List(); val8.Bullets.Add(item2); StaticReferences.customObjects.Add("laserTurretDown_1", val5.gameObject); Entry item3 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val9 = PrefabBuilder.BuildObject("Sniper_Down_2"); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("preIlde"); val11.playAutomatically = true; AIBulletBank val12 = val9.gameObject.AddComponent(); SniperTurretsController sniperTurretsController3 = val9.gameObject.AddComponent(); sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab3 = ref sniperTurretsController3.muzzleFlashPrefab; PickupObject byId3 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController3.ActivatioAnimation = "activate_down"; sniperTurretsController3.waveCount = 2; val12.Bullets = new List(); val12.Bullets.Add(item3); StaticReferences.customObjects.Add("laserTurretDown_2", val9.gameObject); } public static void InitLeft() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) Entry item = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val = PrefabBuilder.BuildObject("Sniper_Left"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("preIlde"); val3.playAutomatically = true; AIBulletBank val4 = val.gameObject.AddComponent(); SniperTurretsController sniperTurretsController = val.gameObject.AddComponent(); sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab = ref sniperTurretsController.muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); muzzleFlashPrefab = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController.ActivatioAnimation = "activate_left"; sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.left); val4.Bullets = new List(); val4.Bullets.Add(item); StaticReferences.customObjects.Add("laserTurretLeft_0", val.gameObject); Entry item2 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val5 = PrefabBuilder.BuildObject("Sniper_Left_1"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("preIlde"); val7.playAutomatically = true; AIBulletBank val8 = val5.gameObject.AddComponent(); SniperTurretsController sniperTurretsController2 = val5.gameObject.AddComponent(); sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab2 = ref sniperTurretsController2.muzzleFlashPrefab; PickupObject byId2 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController2.ActivatioAnimation = "activate_left"; sniperTurretsController2.waveCount = 1; sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.left); val8.Bullets = new List(); val8.Bullets.Add(item2); StaticReferences.customObjects.Add("laserTurretLeft_1", val5.gameObject); Entry item3 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val9 = PrefabBuilder.BuildObject("Sniper_Left_2"); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("preIlde"); val11.playAutomatically = true; AIBulletBank val12 = val9.gameObject.AddComponent(); SniperTurretsController sniperTurretsController3 = val9.gameObject.AddComponent(); sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab3 = ref sniperTurretsController3.muzzleFlashPrefab; PickupObject byId3 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController3.ActivatioAnimation = "activate_left"; sniperTurretsController3.waveCount = 2; sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.left); val12.Bullets = new List(); val12.Bullets.Add(item3); StaticReferences.customObjects.Add("laserTurretLeft_2", val9.gameObject); } public static void InitRight() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) Entry item = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val = PrefabBuilder.BuildObject("Sniper_Right"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("preIlde"); val3.playAutomatically = true; AIBulletBank val4 = val.gameObject.AddComponent(); SniperTurretsController sniperTurretsController = val.gameObject.AddComponent(); sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab = ref sniperTurretsController.muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); muzzleFlashPrefab = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController.ActivatioAnimation = "activate_right"; sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.right); val4.Bullets = new List(); val4.Bullets.Add(item); StaticReferences.customObjects.Add("laserTurretRight_0", val.gameObject); Entry item2 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val5 = PrefabBuilder.BuildObject("Sniper_Right_1"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("preIlde"); val7.playAutomatically = true; AIBulletBank val8 = val5.gameObject.AddComponent(); SniperTurretsController sniperTurretsController2 = val5.gameObject.AddComponent(); sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab2 = ref sniperTurretsController2.muzzleFlashPrefab; PickupObject byId2 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController2.ActivatioAnimation = "activate_right"; sniperTurretsController2.waveCount = 1; sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.right); val8.Bullets = new List(); val8.Bullets.Add(item2); StaticReferences.customObjects.Add("laserTurretRight_1", val5.gameObject); Entry item3 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val9 = PrefabBuilder.BuildObject("Sniper_Right_2"); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("preIlde"); val11.playAutomatically = true; AIBulletBank val12 = val9.gameObject.AddComponent(); SniperTurretsController sniperTurretsController3 = val9.gameObject.AddComponent(); sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab3 = ref sniperTurretsController3.muzzleFlashPrefab; PickupObject byId3 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController3.ActivatioAnimation = "activate_right"; sniperTurretsController3.waveCount = 2; sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.right); val12.Bullets = new List(); val12.Bullets.Add(item3); StaticReferences.customObjects.Add("laserTurretRight_2", val9.gameObject); } } public class SniperTurretsProfessional { public static void InitDownward() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) Entry item = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val = PrefabBuilder.BuildObject("Sniper_Down"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("preIlde"); val3.playAutomatically = true; AIBulletBank val4 = val.gameObject.AddComponent(); SniperTurretsController sniperTurretsController = val.gameObject.AddComponent(); sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab = ref sniperTurretsController.muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); muzzleFlashPrefab = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController.ActivatioAnimation = "activate_down_professional"; sniperTurretsController.isProfessional = true; val4.Bullets = new List(); val4.Bullets.Add(item); StaticReferences.customObjects.Add("laserTurretDownProfessional_0", val.gameObject); Entry item2 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val5 = PrefabBuilder.BuildObject("Sniper_Down_1"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("preIlde"); val7.playAutomatically = true; AIBulletBank val8 = val5.gameObject.AddComponent(); SniperTurretsController sniperTurretsController2 = val5.gameObject.AddComponent(); sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab2 = ref sniperTurretsController2.muzzleFlashPrefab; PickupObject byId2 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController2.ActivatioAnimation = "activate_down_professional"; sniperTurretsController2.waveCount = 1; sniperTurretsController2.isProfessional = true; val8.Bullets = new List(); val8.Bullets.Add(item2); StaticReferences.customObjects.Add("laserTurretDownProfessional_1", val5.gameObject); Entry item3 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val9 = PrefabBuilder.BuildObject("Sniper_Down_2"); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("preIlde"); val11.playAutomatically = true; AIBulletBank val12 = val9.gameObject.AddComponent(); SniperTurretsController sniperTurretsController3 = val9.gameObject.AddComponent(); sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab3 = ref sniperTurretsController3.muzzleFlashPrefab; PickupObject byId3 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController3.ActivatioAnimation = "activate_down_professional"; sniperTurretsController3.waveCount = 2; sniperTurretsController3.isProfessional = true; val12.Bullets = new List(); val12.Bullets.Add(item3); StaticReferences.customObjects.Add("laserTurretDownProfessional_2", val9.gameObject); } public static void InitLeft() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) Entry item = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val = PrefabBuilder.BuildObject("Sniper_Down"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("preIlde"); val3.playAutomatically = true; AIBulletBank val4 = val.gameObject.AddComponent(); SniperTurretsController sniperTurretsController = val.gameObject.AddComponent(); sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab = ref sniperTurretsController.muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); muzzleFlashPrefab = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController.ActivatioAnimation = "activate_left_professional"; sniperTurretsController.isProfessional = true; sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.left); val4.Bullets = new List(); val4.Bullets.Add(item); StaticReferences.customObjects.Add("laserTurretLeftProfessional_0", val.gameObject); Entry item2 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val5 = PrefabBuilder.BuildObject("Sniper_Down_1"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("preIlde"); val7.playAutomatically = true; AIBulletBank val8 = val5.gameObject.AddComponent(); SniperTurretsController sniperTurretsController2 = val5.gameObject.AddComponent(); sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab2 = ref sniperTurretsController2.muzzleFlashPrefab; PickupObject byId2 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController2.ActivatioAnimation = "activate_left_professional"; sniperTurretsController2.waveCount = 1; sniperTurretsController2.isProfessional = true; sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.left); val8.Bullets = new List(); val8.Bullets.Add(item2); StaticReferences.customObjects.Add("laserTurretLeftProfessional_1", val5.gameObject); Entry item3 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val9 = PrefabBuilder.BuildObject("Sniper_Down_2"); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("preIlde"); val11.playAutomatically = true; AIBulletBank val12 = val9.gameObject.AddComponent(); SniperTurretsController sniperTurretsController3 = val9.gameObject.AddComponent(); sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab3 = ref sniperTurretsController3.muzzleFlashPrefab; PickupObject byId3 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController3.ActivatioAnimation = "activate_left_professional"; sniperTurretsController3.waveCount = 2; sniperTurretsController3.isProfessional = true; sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.left); val12.Bullets = new List(); val12.Bullets.Add(item3); StaticReferences.customObjects.Add("laserTurretLeftProfessional_2", val9.gameObject); } public static void InitRight() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) Entry item = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val = PrefabBuilder.BuildObject("Sniper_Down"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val3 = val.AddComponent(); val3.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val3.defaultClipId = val3.Library.GetClipIdByName("preIlde"); val3.playAutomatically = true; AIBulletBank val4 = val.gameObject.AddComponent(); SniperTurretsController sniperTurretsController = val.gameObject.AddComponent(); sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab = ref sniperTurretsController.muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); muzzleFlashPrefab = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController.ActivatioAnimation = "activate_right_professional"; sniperTurretsController.isProfessional = true; sniperTurretsController.DirectionToFire = Vector2Extensions.ToAngle(Vector2.right); val4.Bullets = new List(); val4.Bullets.Add(item); StaticReferences.customObjects.Add("laserTurretRightProfessional_0", val.gameObject); Entry item2 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val5 = PrefabBuilder.BuildObject("Sniper_Down_1"); tk2dSprite val6 = val5.AddComponent(); ((tk2dBaseSprite)val6).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val6).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val7 = val5.AddComponent(); val7.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val7.defaultClipId = val7.Library.GetClipIdByName("preIlde"); val7.playAutomatically = true; AIBulletBank val8 = val5.gameObject.AddComponent(); SniperTurretsController sniperTurretsController2 = val5.gameObject.AddComponent(); sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab2 = ref sniperTurretsController2.muzzleFlashPrefab; PickupObject byId2 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab2 = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController2.ActivatioAnimation = "activate_right_professional"; sniperTurretsController2.waveCount = 1; sniperTurretsController2.isProfessional = true; sniperTurretsController2.DirectionToFire = Vector2Extensions.ToAngle(Vector2.right); val8.Bullets = new List(); val8.Bullets.Add(item2); StaticReferences.customObjects.Add("laserTurretRightProfessional_1", val5.gameObject); Entry item3 = Toolbox.CopyBulletBankEntry(((BraveBehaviour)EnemyDatabase.GetOrLoadByGuid("31a3ea0c54a745e182e22ea54844a82d")).bulletBank.GetBullet("sniper"), "sniperTurret"); GameObject val9 = PrefabBuilder.BuildObject("Sniper_Down_2"); tk2dSprite val10 = val9.AddComponent(); ((tk2dBaseSprite)val10).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val10).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("lasersniper_down_spawn1")); tk2dSpriteAnimator val11 = val9.AddComponent(); val11.Library = Module.ModularAssetBundle.LoadAsset("LaserTurretAnimation").GetComponent(); val11.defaultClipId = val11.Library.GetClipIdByName("preIlde"); val11.playAutomatically = true; AIBulletBank val12 = val9.gameObject.AddComponent(); SniperTurretsController sniperTurretsController3 = val9.gameObject.AddComponent(); sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.down); ref GameObject muzzleFlashPrefab3 = ref sniperTurretsController3.muzzleFlashPrefab; PickupObject byId3 = PickupObjectDatabase.GetById(370); muzzleFlashPrefab3 = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects.effects[0].effects[0].effect; sniperTurretsController3.ActivatioAnimation = "activate_right_professional"; sniperTurretsController3.waveCount = 2; sniperTurretsController3.isProfessional = true; sniperTurretsController3.DirectionToFire = Vector2Extensions.ToAngle(Vector2.right); val12.Bullets = new List(); val12.Bullets.Add(item3); StaticReferences.customObjects.Add("laserTurretRightProfessional_2", val9.gameObject); } } public class MetalFences { public static void Init() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00cb: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) GenerateFence("Fence_Horizontal_MDLR", "metal_fence_002", new IntVector2(16, 4), new IntVector2(0, 4)); GenerateFence("Fence_Vertical_MDLR", "metal_fence_001", new IntVector2(4, 16), new IntVector2(6, 0)); GenerateFence("Fence_Corner_T_L_MDLR", "metal_fence_003", new IntVector2(10, 12), new IntVector2(0, 4)); GenerateFence("Fence_Corner_T_R_MDLR", "metal_fence_004", new IntVector2(10, 12), new IntVector2(6, 4)); GenerateFence("Fence_Corner_B_R_MDLR", "metal_fence_005", new IntVector2(10, 10), new IntVector2(6, 0)); GenerateFence("Fence_Corner_B_L_MDLR", "metal_fence_006", new IntVector2(10, 10), new IntVector2(0, 0)); GenerateFence("Fence_End1_MDLR", "fence_end_RH", new IntVector2(6, 8), new IntVector2(0, 2)); GenerateFence("Fence_End2_MDLR", "fence_end_LH", new IntVector2(6, 8), new IntVector2(10, 2)); GenerateFence("Fence_End3_MDLR", "fence_end_VB", new IntVector2(4, 6), new IntVector2(6, 0)); GenerateFence("Fence_End4_MDLR", "fence_end_VT", new IntVector2(4, 8), new IntVector2(6, 8)); } private static void GenerateFence(string placeName, string spriteName, IntVector2 colliderX_Y, IntVector2 offsetX_Y) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject(placeName + "_MDLR"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 8f); val3.SetFloat("_EmissivePower", 3f); ((BraveBehaviour)val2).renderer.material = val3; val.CreateFastBody((CollisionLayer)5, colliderX_Y, offsetX_Y); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); StaticReferences.customObjects.Add(placeName, val); } } public class RedLight { public class RedLightController : MonoBehaviour { public void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((Component)this).transform.position); if (absoluteRoom != null) { absoluteRoom.Entered += new OnEnteredEventHandler(RoomHandler_Entered); } } private void RoomHandler_Entered(PlayerController p) { ((Component)this).GetComponent().LightRadius = 10f; ((Component)this).GetComponent().SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("red_light_002")); } } public static void Init() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Red_Light"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("red_light_001")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); AdditionalBraveLight val4 = val.AddComponent(); ((BraveBehaviour)val4).transform.position = val.transform.position; val4.LightColor = Color.red; val4.LightIntensity = 5f; val4.LightRadius = 0f; val.AddComponent(); StaticReferences.customObjects.Add("Red_Light_Horizintal", val); } } public class MovingTile { private class MovingTileBehavior : MonoBehaviour { public int Delay = 0; private tk2dSpriteAnimator animator; private RoomHandler currentRoom; public void Start() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) animator = ((Component)this).GetComponent(); currentRoom = Vector3Extensions.GetAbsoluteRoom(TransformExtensions.PositionVector2(((Component)this).transform)); Actions.OnReinforcementWave = (Action)Delegate.Combine(Actions.OnReinforcementWave, new Action(R)); } public void R(RoomHandler r) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (currentRoom == null || r != currentRoom) { return; } if (Delay > 0) { Delay--; } if (Delay == 0) { if ((Object)(object)animator == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); LootEngine.DoDefaultSynergyPoof(TransformExtensions.PositionVector2(((Component)this).transform), false); } else { animator.PlayAndDestroyObject("move", (Action)null); } } } public void OnDestroy() { Actions.OnReinforcementWave = (Action)Delegate.Remove(Actions.OnReinforcementWave, new Action(R)); } } public static void Init() { InitTile(); InitTile(2); } private static void InitTile(int delay = 1) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Moving_Tile (Delay: " + delay + ")"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("brick_move_001")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 0f); val3.SetFloat("_EmissivePower", 0f); ((BraveBehaviour)val2).renderer.material = val3; tk2dSpriteAnimator val4 = val.AddComponent(); val4.library = Module.ModularAssetBundle.LoadAsset("MovingTileAnimation").GetComponent(); val4.defaultClipId = val4.library.GetClipIdByName("idle"); GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("FG_Critical")); val.CreateFastBody((CollisionLayer)6, new IntVector2(16, 16), new IntVector2(0, 0)); MovingTileBehavior movingTileBehavior = val.AddComponent(); movingTileBehavior.Delay = delay; StaticReferences.customObjects.Add("MovingTile_Delay_" + delay, val); } } public class ForbodingSign { public static void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject("Forboding_Sign_Sticker"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("p-2")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material material = new Material(StaticShaders.Default_Shader); ((BraveBehaviour)val2).renderer.material = material; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); StaticReferences.customObjects.Add("ForbodingSignMDLR", val); } } public class Sprite_Decals { public static void Init() { Toolbox.BuildSpriteObject("vent_cover_1", "Vent_Cover_2X2"); Toolbox.BuildSpriteObject("vent_cover_2", "Vent_Cover_2X1"); Toolbox.BuildSpriteObject("vent_cover_3", "Vent_Cover_1X1"); Toolbox.BuildSpriteObject("electric_ahead", "Electricity_Ahead"); Toolbox.BuildSpriteObject("big_panel", "BIG_PANEL"); Toolbox.BuildSpriteObject("cyan_leading_line_001", "Cyan_Line_001"); Toolbox.BuildSpriteObject("cyan_leading_line_002", "Cyan_Line_002"); Toolbox.BuildSpriteObject("cyan_leading_line_003", "Cyan_Line_003"); Toolbox.BuildSpriteObject("cyan_leading_line_004", "Cyan_Line_004"); Toolbox.BuildSpriteObject("cyan_leading_line_005", "Cyan_Line_005"); Toolbox.BuildSpriteObject("cyan_leading_line_006", "Cyan_Line_006"); Toolbox.BuildSpriteObject("cyan_leading_line_007", "Cyan_Line_007"); Toolbox.BuildSpriteObject("cyan_leading_line_008", "Cyan_Line_008"); Toolbox.BuildSpriteObject("cyan_leading_line_009", "Cyan_Line_009"); Toolbox.BuildSpriteObject("cyan_leading_line_010", "Cyan_Line_010"); Toolbox.BuildSpriteObject("green_leading_line_001", "green_Line_001"); Toolbox.BuildSpriteObject("green_leading_line_002", "green_Line_002"); Toolbox.BuildSpriteObject("green_leading_line_003", "green_Line_003"); Toolbox.BuildSpriteObject("green_leading_line_004", "green_Line_004"); Toolbox.BuildSpriteObject("green_leading_line_005", "green_Line_005"); Toolbox.BuildSpriteObject("green_leading_line_006", "green_Line_006"); Toolbox.BuildSpriteObject("green_leading_line_007", "green_Line_007"); Toolbox.BuildSpriteObject("green_leading_line_008", "green_Line_008"); Toolbox.BuildSpriteObject("green_leading_line_009", "green_Line_009"); Toolbox.BuildSpriteObject("green_leading_line_010", "green_Line_010"); Toolbox.BuildSpriteObject("orange_leading_line_001", "orange_Line_001"); Toolbox.BuildSpriteObject("orange_leading_line_002", "orange_Line_002"); Toolbox.BuildSpriteObject("orange_leading_line_003", "orange_Line_003"); Toolbox.BuildSpriteObject("orange_leading_line_004", "orange_Line_004"); Toolbox.BuildSpriteObject("orange_leading_line_005", "orange_Line_005"); Toolbox.BuildSpriteObject("orange_leading_line_006", "orange_Line_006"); Toolbox.BuildSpriteObject("orange_leading_line_007", "orange_Line_007"); Toolbox.BuildSpriteObject("orange_leading_line_008", "orange_Line_008"); Toolbox.BuildSpriteObject("orange_leading_line_009", "orange_Line_009"); Toolbox.BuildSpriteObject("orange_leading_line_010", "orange_Line_010"); Toolbox.BuildSpriteObject("tile_past_decal_001", "Tiled_Line_001", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_002", "Tiled_Line_002", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_003", "Tiled_Line_003", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_004", "Tiled_Line_004", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_005", "Tiled_Line_005", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_006", "Tiled_Line_006", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_007", "Tiled_Line_007", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_008", "Tiled_Line_008", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_009", "Tiled_Line_009", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_010", "Tiled_Line_010", shitfuck: false); Toolbox.BuildSpriteObject("tile_past_decal_011", "Tiled_Line_011", shitfuck: false); StaticReferences.customPlaceables.Add("NutsAndBolts", Toolbox.GenerateDungeonPlaceable(new Dictionary { { Toolbox.BuildSpriteObject_FuckingSHit("bolts1", "Bolt_1"), 1f }, { Toolbox.BuildSpriteObject_FuckingSHit("bolts2", "Bolt_2"), 1f }, { Toolbox.BuildSpriteObject_FuckingSHit("bolts3", "Bolt_3"), 1f } })); } } public class YellowLights { public static void InitYellowLightHorizontal() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Yellow_Light"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("ground_light_002")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); AdditionalBraveLight val4 = val.AddComponent(); ((BraveBehaviour)val4).transform.position = val.transform.position; val4.LightColor = Color.yellow; val4.LightIntensity = 2f; val4.LightRadius = 15f; StaticReferences.customObjects.Add("Yellow_Light_Horizintal", val); } public static void InitYellowLightVertical() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Yellow_Light"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("ground_light_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 50f); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); AdditionalBraveLight val4 = val.AddComponent(); ((BraveBehaviour)val4).transform.position = val.transform.position; val4.LightColor = Color.yellow; val4.LightIntensity = 2f; val4.LightRadius = 15f; StaticReferences.customObjects.Add("Yellow_Light_Vertical", val); } } public class SpaceShiptrigger { public class CustomtriggerSpaceShip : BraveBehaviour { public bool HasTriggered { get; set; } public RoomHandler ParentRoom { get; set; } public void Start() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown HasTriggered = true; GlobalMessageRadio.RegisterObjectToRadio(((Component)this).gameObject, new List { "PastWin" }, OnRecieveMessage); SpeculativeRigidbody component = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } component.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)component.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody myBody, PixelCollider myCollider, SpeculativeRigidbody otherbody, PixelCollider otherCollider) { if (!HasTriggered) { PlayerController component2 = ((Component)otherbody).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { GameManager.IsBossIntro = false; for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i])) { GameManager.Instance.AllPlayers[i].SetInputOverride("goodbye!"); } } GlobalMessageRadio.BroadcastMessage("DoTakeOff"); HasTriggered = true; PlayerController otherPlayer = GameManager.Instance.GetOtherPlayer(component2); if (Object.op_Implicit((Object)(object)otherPlayer)) { otherPlayer.ReuniteWithOtherPlayer(component2, false); } Object.Destroy((Object)(object)((Component)this).gameObject); } } }); } public void OnRecieveMessage(GameObject obj, string message) { HasTriggered = false; } public override void OnDestroy() { ((BraveBehaviour)this).OnDestroy(); } } public static bool AllowedToLeave; public static void Init() { //IL_0012: 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) GameObject val = PrefabBuilder.BuildObject("Trigger_SpaceShip"); val.CreateFastBody((CollisionLayer)7, new IntVector2(48, 64), new IntVector2(0, 0)); val.AddComponent(); StaticReferences.customObjects.Add("Trigger_SpaceShip", val); } } public class SteelPanopticonTrigger { public class Customtrigger : BraveBehaviour { public bool HasTriggered { get; set; } public RoomHandler ParentRoom { get; set; } public void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown HasTriggered = false; SpeculativeRigidbody component = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } component.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)component.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody myBody, PixelCollider myCollider, SpeculativeRigidbody otherbody, PixelCollider otherCollider) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) RoomHandler val = GameManager.Instance.Dungeon.data.rooms[1]; IntVector2 centerCell = val.GetCenterCell(); if (!HasTriggered) { PlayerController component2 = ((Component)otherbody).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { HasTriggered = true; PlayerController otherPlayer = GameManager.Instance.GetOtherPlayer(component2); if (Object.op_Implicit((Object)(object)otherPlayer)) { otherPlayer.ReuniteWithOtherPlayer(component2, false); } List allHealthHavers = StaticReferenceManager.AllHealthHavers; for (int i = 0; i < allHealthHavers.Count; i++) { if (allHealthHavers[i].IsBoss) { SteelPanopticonEngager component3 = ((Component)allHealthHavers[i]).GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.DoDestroy(); } Object.Destroy((Object)(object)((Component)this).gameObject); } } } } }); } public override void OnDestroy() { ((BraveBehaviour)this).OnDestroy(); } } public static void Init() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("BossTrigger-Panopticon"); val.CreateFastBody((CollisionLayer)7, new IntVector2(676, 64), new IntVector2(0, 0)); val.AddComponent(); StaticReferences.customObjects.Add("BossTrigger_Panopticon", val); } } public class WarpGates { private class WarpGatePoint : MonoBehaviour { public bool active = false; public void Start() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; Debug.Log((object)("2 " + ((object)(Vector3)(ref position)).ToString())); active = true; } } private class WarpGateEntrancePoint : MonoBehaviour { private bool Triggered = false; public void Start() { //IL_0014: 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_0049: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown AdditionalBraveLight component = ((Component)this).GetComponent(); ((BraveBehaviour)component).transform.position = ((Component)this).transform.position; SpeculativeRigidbody component2 = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)component2)) { return; } component2.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)component2.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody myBody, PixelCollider myCollider, SpeculativeRigidbody otherbody, PixelCollider otherCollider) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 RoomHandler val = GameManager.Instance.Dungeon.data.rooms[1]; IntVector2 centerCell = val.GetCenterCell(); if (!Triggered) { PlayerController component3 = ((Component)otherbody).gameObject.GetComponent(); Triggered = true; if (Object.op_Implicit((Object)(object)component3)) { component3.WarpToPoint(TransformExtensions.PositionVector2(((Component)this).transform) + new Vector2(61f, 78f), false, false); } TextBoxManager.ShowTextBox(((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform.position + new Vector3(1.25f, 2.5f, 0f), ((BraveBehaviour)GameManager.Instance.PrimaryPlayer).transform, 4f, GameManager.Instance.PrimaryPlayer.IsUsingAlternateCostume ? "Let's do this." : "All evacuated, all according to plan.\nTake the elevator nearby and get out.", "golem", false, (BoxSlideOrientation)0, true, false); if ((int)GameManager.Instance.CurrentGameType == 1) { PlayerController otherPlayer = GameManager.Instance.GetOtherPlayer(component3); if (Object.op_Implicit((Object)(object)otherPlayer)) { otherPlayer.ReuniteWithOtherPlayer(component3, false); } } } }); } } public static void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("WarpGate_Exit"); val.AddComponent(); StaticReferences.customObjects.Add("WarpGateExitMDLR_Entrance", val); GameObject val2 = PrefabBuilder.BuildObject("WarpGate_Entrance"); AdditionalBraveLight val3 = val2.AddComponent(); ((BraveBehaviour)val3).transform.position = val2.transform.position + new Vector3(4f, 0f); val3.LightColor = Color.white; val3.LightIntensity = 4.2f; val3.LightRadius = 12f; val3.LightAngle = 60f; val3.UsesCone = false; val3.LightOrient = 90f; val2.AddComponent(); val2.CreateFastBody((CollisionLayer)7, new IntVector2(64, 96), new IntVector2(-16, -16)); StaticReferences.customObjects.Add("WarpGateExitMDLR_Past", val2); } } public class ShippingContainer { public static void Init() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("ShippingContainer"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("shippingcontainer")); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 0f); val3.SetFloat("_EmissivePower", 0f); ((BraveBehaviour)val2).renderer.material = val3; val.CreateFastBody(new IntVector2(98, 177), new IntVector2(0, 12)); val.CreateFastBody(new IntVector2(36, 32), new IntVector2(0, 0)); QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_Container_", "A shipping container marked to ship to Gunymede.\nI'll be returning one way or another."); quickInterractableController.Interact_String = "#MDLR_Container_"; quickInterractableController.talkPoint = val.transform; StaticReferences.customObjects.Add("ShippingContainerMDLR", val); } } public class WarningSticker { public static void Init() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown GameObject val = PrefabBuilder.BuildObject("Warning_Sticker"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("warning_sign")); ((tk2dBaseSprite)val2).hasOffScreenCachedUpdate = true; Material val3 = new Material(StaticShaders.FloorTileMaterial_Transparency); val3.SetTexture("_MainTex", ((BraveBehaviour)val2).renderer.material.mainTexture); ((BraveBehaviour)val2).renderer.material = val3; GameObjectExtensions.SetLayerRecursively(val, LayerMask.NameToLayer("BG_Nonsense")); StaticReferences.customObjects.Add("WarningStickerModularPast", val); } } public class PastEntranceControllerObject { public static void Init() { GameObject value = PrefabBuilder.BuildObject("Agony"); StaticReferences.customObjects.Add("EntranceObjectModularPast", value); } } public class WoodenCrate { public static void Init() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_00a3: 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_00d4: 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_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) StaticReferences.customPlaceables.Add("WoodenCrateMDLR", Toolbox.GenerateDungeonPlaceable(new Dictionary { { CreateObject("box_ammo", "box_", "A wooden crate.", new IntVector2(28, 27), new IntVector2(0, -4)), 1f }, { CreateObject("box_ammo_small", "box_small", "A wooden crate, though this one is smaller.", new IntVector2(28, 27), new IntVector2(0, -4)), 0.1f } })); StaticReferences.customPlaceables.Add("WoodenCrateAmmoMDLR", Toolbox.GenerateDungeonPlaceable(new Dictionary { { CreateObject("box_ammo_1", "box_ammo", "A box filled with basic ammunition", new IntVector2(28, 27), new IntVector2(0, -4)), 1f }, { CreateObject("box_ammo_2", "box_ammo_red", "A box filled with various munitions", new IntVector2(28, 27), new IntVector2(0, -4)), 1f } })); StaticReferences.customObjects.Add("BustedTVMDLR", CreateObject("bustedTV", "old_robot_tv_001", "A broken television.\nI still wonder why they would bring it there...", new IntVector2(14, 12), new IntVector2(1, -4))); StaticReferences.customObjects.Add("WoodenCrateOpenMDLR", CreateObject("box_open", "box_open", "A wooden crate.\nIt has nothing stored in it.", new IntVector2(28, 27), new IntVector2(0, -4))); StaticReferences.customObjects.Add("HMPRIME_CART", CreateObject("hmprime_cart_mdlr", "hymprime_unit", "A H.M Prime Unit. Recently finished and designed.\nI'll see it again.", new IntVector2(38, 28), new IntVector2(1, -4))); GameObject key = CreateObject("box_metal_baby", "metal_crate_verytiny", "A baby metal container.\nIt seems to have lost it's parents.", new IntVector2(17, 20), new IntVector2(0, -4)); StaticReferences.customPlaceables.Add("MetalCrateMDLR", Toolbox.GenerateDungeonPlaceable(new Dictionary { { CreateObject("box_metal", "metal_crate_small", "A metal container.\nContents: Indeterminate.", new IntVector2(20, 32), new IntVector2(0, -4)), 1f }, { CreateObject("box_metal_tall", "metal_crate_tall", "A large metal container.\nContents: Indeterminate.", new IntVector2(20, 40), new IntVector2(0, -4)), 0.7f }, { CreateObject("box_metal_short", "metal_crate_tiny", "A small metal container\nContents: Indeterminate.", new IntVector2(20, 26), new IntVector2(0, -4)), 0.5f }, { key, 0.1f } })); StaticReferences.customPlaceables.Add("LongShortWoodenCrateMDLR", Toolbox.GenerateDungeonPlaceable(new Dictionary { { CreateObject("short_longbox", "short_crate", "A long, short wooden crate.", new IntVector2(28, 16), new IntVector2(0, -4)), 1f } })); StaticReferences.customPlaceables.Add("TinyAssCrateMDLR", Toolbox.GenerateDungeonPlaceable(new Dictionary { { CreateObject("short_longbox", "tiny_ass_crate", "A very tiny wooden crate.", new IntVector2(13, 16), new IntVector2(0, -4)), 1f } })); } public static GameObject CreateObject(string name, string spriteName, string Dialogue, IntVector2 size, IntVector2 offset) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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) GameObject val = PrefabBuilder.BuildObject(name); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(spriteName)); ((tk2dBaseSprite)val2).usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 0f); val3.SetFloat("_EmissivePower", 0f); ((BraveBehaviour)val2).renderer.material = val3; val.CreateFastBody(size, offset); QuickInterractableController quickInterractableController = ((Component)val2).gameObject.AddComponent(); Module.Strings.Core.Set("#MDLR_CRATE_" + name, Dialogue); quickInterractableController.Interact_String = "#MDLR_CRATE_" + name; quickInterractableController.talkPoint = val.transform; return val; } } } namespace ModularMod.Code.Unlocks { public class EnemyDeathUnlockController { public static void Start() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(HealthHaver).GetMethod("Die"), typeof(EnemyDeathUnlockController).GetMethod("OnHealthHaverDie")); } public static void OnHealthHaverDie(Action orig, HealthHaver self, Vector2 finalDamageDir) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) orig(self, finalDamageDir); if ((Object)(object)((BraveBehaviour)self).aiActor != (Object)null) { UnlockChecklist(((BraveBehaviour)self).aiActor, ((BraveBehaviour)self).aiActor.IsBlackPhantom, ((BraveBehaviour)self).aiActor.EnemyGuid); } } public static void UnlockChecklist(AIActor enemy, bool IsJammed, string GUID) { //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Invalid comparison between Unknown and I4 //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Invalid comparison between Unknown and I4 if (!((Object)(object)enemy != (Object)null)) { return; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (!Object.op_Implicit((Object)(object)player.PlayerHasCore())) { continue; } if (StaticGUIDs.Old_King_GUID == GUID) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "Apollo", StaticCollections.Gun_Collection.GetSpriteIdByName("apollo_idle_001"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR, value: true); } if (StaticGUIDs.Resourceful_Rat_Mech_Boss_GUID == GUID) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "Singularity Pulsar", StaticCollections.Gun_Collection.GetSpriteIdByName("gravgun_idle_001"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR, value: true); } if (GUID == StaticGUIDs.Lich_Phase_3_GUID) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "2 New Weapons!", StaticCollections.Gun_Collection.GetSpriteIdByName("thegreater"), StaticCollections.Gun_Collection, (NotificationColor)1); } GameStatsManager.Instance.SetCharacterSpecificFlag(ETGModCompatibility.ExtendEnum("somebunny.etg.modularcharacter", Module.Modular_Character_Data.nameShort), (CharacterSpecificGungeonFlags)1100, true); AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR, value: true); if (player.PlayerHasCore().ReturnActiveTotal() <= 4) { AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_LICH_WITH_4_MODULES_OR_LESS, value: true); } for (int j = 0; j < GameManager.Instance.AllPlayers.Length; j++) { PlayerController val = GameManager.Instance.AllPlayers[j]; if (Object.op_Implicit((Object)(object)val) && val.CharacterUsesRandomGuns) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BLESSED_MODE)) { Toolbox.NotifyCustom("You Unlocked:", "Barrier Builder", StaticCollections.Gun_Collection.GetSpriteIdByName("shieldgen_idle_004"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BLESSED_MODE, value: true); } } } if ((StaticGUIDs.Cannonbalrog_GUID == GUID) | (StaticGUIDs.Mine_Flayer_GUID == GUID) | (StaticGUIDs.Treadnaught_GUID == GUID)) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_FLOOR_3)) { Toolbox.NotifyCustom("You Unlocked:", "3 New Weapons!", StaticCollections.Gun_Collection.GetSpriteIdByName("thestandardissue"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_FLOOR_3, value: true); } if (((StaticGUIDs.Bullet_King_GUID == GUID) | (StaticGUIDs.Smiley_GUID == GUID) | (StaticGUIDs.Shades_GUID == GUID) | (StaticGUIDs.Gatling_Gull_GUID == GUID)) && player.PlayerHasCore().ReturnActiveTotal() == 0) { AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.FIRST_FLOOR_NO_MODULES, value: true); } if ((StaticGUIDs.Advanced_Dragun_GUID == GUID) | (StaticGUIDs.Dragun_GUID == GUID)) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "2 New Weapons!", StaticCollections.Gun_Collection.GetSpriteIdByName("thespecialedition"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR, value: true); if (player.PlayerHasCore().ReturnActiveTotal() <= 3) { AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS, value: true); } if (((int)GameManager.Instance.CurrentGameMode == 2) | ((int)GameManager.Instance.CurrentGameMode == 3)) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "Flame Ejector", StaticCollections.Gun_Collection.GetSpriteIdByName("flamer_idle_001"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BOSS_RUSH_AS_MODULAR, value: true); } if (ChallengeManager.CHALLENGE_MODE_ACTIVE) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN)) { Toolbox.NotifyCustom("You Unlocked:", "Fortifier", StaticCollections.Gun_Collection.GetSpriteIdByName("turretplace_reload_001"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.CHALLENGEMODE_DRAGUN, value: true); } } if (StaticGUIDs.Advanced_Dragun_GUID == GUID) { if (!AdvancedGameStatsManager.Instance.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)) { Toolbox.NotifyCustom("You Unlocked:", "Kinetic Payload", StaticCollections.Gun_Collection.GetSpriteIdByName("bigbomb_idle_004"), StaticCollections.Gun_Collection, (NotificationColor)1); } AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR, value: true); if (player.PlayerHasCore().ReturnActiveTotal() <= 3) { AdvancedGameStatsManager.Instance.SetFlag(CustomDungeonFlags.BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS, value: true); } } } } } } namespace ModularMod.Code.UI { public class AmmonomiconSetup { public class ModuleAmmonomiconPageController : CustomAmmonomiconPageController { public ModuleAmmonomiconPageController() : base("MODULES", 8, false, "") { } public override List GetEntriesForPage(AmmonomiconPageRenderer renderer) { return new List(); } public List GetDatabase(DefaultModule.ModuleTier moduleTier) { List list = new List(); List> list2 = new List>(); switch (moduleTier) { case DefaultModule.ModuleTier.Tier_1: foreach (DefaultModule all_Tier_1_Module in GlobalModuleStorage.all_Tier_1_Modules) { int key3 = ((((PickupObject)all_Tier_1_Module).ForcedPositionInAmmonomicon >= 0) ? ((PickupObject)all_Tier_1_Module).ForcedPositionInAmmonomicon : 1000000000); list2.Add(new KeyValuePair(key3, (PickupObject)(object)all_Tier_1_Module)); } break; case DefaultModule.ModuleTier.Tier_2: foreach (DefaultModule all_Tier_2_Module in GlobalModuleStorage.all_Tier_2_Modules) { int key2 = ((((PickupObject)all_Tier_2_Module).ForcedPositionInAmmonomicon >= 0) ? ((PickupObject)all_Tier_2_Module).ForcedPositionInAmmonomicon : 1000000000); list2.Add(new KeyValuePair(key2, (PickupObject)(object)all_Tier_2_Module)); } break; case DefaultModule.ModuleTier.Tier_3: foreach (DefaultModule all_Tier_3_Module in GlobalModuleStorage.all_Tier_3_Modules) { int key = ((((PickupObject)all_Tier_3_Module).ForcedPositionInAmmonomicon >= 0) ? ((PickupObject)all_Tier_3_Module).ForcedPositionInAmmonomicon : 1000000000); list2.Add(new KeyValuePair(key, (PickupObject)(object)all_Tier_3_Module)); } break; } list2 = list2.OrderBy(delegate(KeyValuePair e) { KeyValuePair keyValuePair = e; return keyValuePair.Key; }).ToList(); for (int i = 0; i < list2.Count; i++) { EncounterTrackable component = ((Component)list2[i].Value).GetComponent(); if (!component.journalData.SuppressInAmmonomicon) { EncounterDatabaseEntry entry = EncounterDatabase.GetEntry(component.EncounterGuid); if (entry != null) { list.Add(entry); } } } return list; } public override void InitializeItemsPageLeft(AmmonomiconPageRenderer self) { //IL_00f0: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) List database = GetDatabase(DefaultModule.ModuleTier.Tier_1); List database2 = GetDatabase(DefaultModule.ModuleTier.Tier_2); List database3 = GetDatabase(DefaultModule.ModuleTier.Tier_3); Transform val = ((Component)self.guiManager).transform.Find("Scroll Panel").Find("Scroll Panel"); dfPanel val2 = Object.Instantiate(StaticData.ItemsHeader, val); ((Object)val2).name = "Tier1"; dfLabel componentInChildren = ((Component)val2).GetComponentInChildren(); ((dfControl)componentInChildren).isLocalized = false; ((dfControl)componentInChildren).localizationKey = ""; componentInChildren.Text = "Tier 1"; ConditionalTranslator component = ((Component)componentInChildren).gameObject.GetComponent(); ((Behaviour)component).enabled = false; ((dfControl)componentInChildren).ZOrder = 8; dfPanel component2 = ((Component)val.Find("Guns Panel")).GetComponent(); dfPanel val3 = Object.Instantiate(component2, val); dfPanel val4 = Object.Instantiate(component2, val); ((dfControl)component2).ZOrder = 9; dfPanel component3 = ((Component)((Component)component2).transform.GetChild(0)).GetComponent(); ((MonoBehaviour)self).StartCoroutine(self.ConstructRectanglePageLayout(component3, database, new Vector2(12f, 20f), new Vector2(20f, 20f), false, (List)null)); ((dfControl)component3).Anchor = (dfAnchorStyle)67; ((dfControl)component2).Height = ((dfControl)component3).Height; ((dfControl)component3).Height = ((dfControl)component2).Height; dfPanel val5 = Object.Instantiate(StaticData.ItemsHeader, val); ((Object)val5).name = "Tier2"; dfLabel componentInChildren2 = ((Component)val5).GetComponentInChildren(); ((dfControl)componentInChildren2).isLocalized = false; ((dfControl)componentInChildren2).localizationKey = ""; componentInChildren2.Text = "Tier 2"; component = ((Component)componentInChildren2).gameObject.GetComponent(); ((Behaviour)component).enabled = false; ((dfControl)componentInChildren2).ZOrder = 10; ((dfControl)val3).ZOrder = 11; component3 = ((Component)((Component)val3).transform.GetChild(0)).GetComponent(); ((MonoBehaviour)self).StartCoroutine(self.ConstructRectanglePageLayout(component3, database2, new Vector2(12f, 20f), new Vector2(20f, 20f), false, (List)null)); ((dfControl)component3).Anchor = (dfAnchorStyle)67; ((dfControl)val3).Height = ((dfControl)component3).Height; ((dfControl)component3).Height = ((dfControl)val3).Height; dfPanel val6 = Object.Instantiate(StaticData.ItemsHeader, val); ((Object)val6).name = "Tier3"; dfLabel componentInChildren3 = ((Component)val6).GetComponentInChildren(); ((dfControl)componentInChildren3).isLocalized = false; ((dfControl)componentInChildren3).localizationKey = ""; componentInChildren3.Text = "Tier 3"; component = ((Component)componentInChildren3).gameObject.GetComponent(); ((Behaviour)component).enabled = false; ((dfControl)componentInChildren3).ZOrder = 12; ((dfControl)val4).ZOrder = 13; component3 = ((Component)((Component)val4).transform.GetChild(0)).GetComponent(); ((MonoBehaviour)self).StartCoroutine(self.ConstructRectanglePageLayout(component3, database3, new Vector2(12f, 20f), new Vector2(20f, 20f), false, (List)null)); ((dfControl)component3).Anchor = (dfAnchorStyle)67; ((dfControl)val4).Height = ((dfControl)component3).Height; ((dfControl)component3).Height = ((dfControl)val4).Height; } public override bool ShouldBeActive() { if (GameManager.Instance.AllPlayers == null) { return true; } PlayerController[] allPlayers = GameManager.Instance.AllPlayers; foreach (PlayerController player in allPlayers) { if (Object.op_Implicit((Object)(object)player.PlayerHasCore())) { return true; } } return false; } public override void OnPageOpenedRight(AmmonomiconPageRenderer rightPage) { rightPage.SetPageDataUnknown(rightPage); } } public static void Initialize() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown ModuleAmmonomiconPageController moduleAmmonomiconPageController = new ModuleAmmonomiconPageController(); SpriteContainer val = new SpriteContainer(StaticCollections.AmmonomiconUIAtlas); val.AppearFrames = new string[4] { "bookmark_mdl_001", "bookmark_mdl_002", "bookmark_mdl_003", "bookmark_mdl_004" }; val.SelectFrames = new string[3] { "bookmark_mdl_select_001", "bookmark_mdl_select_002", "bookmark_mdl_select_003" }; val.HoverFrame = "bookmark_mdl_hover_001"; val.SelectHoverFrame = "bookmark_mdl_select_hover_001"; UIBuilder.BuildBookmark("mdl", "Modules", (CustomAmmonomiconPageController)(object)moduleAmmonomiconPageController, val, Assembly.GetExecutingAssembly()); CustomActions.OnDeathPageFinalizing = (Action>)Delegate.Combine(CustomActions.OnDeathPageFinalizing, new Action>(BuilDeathRightPage)); } public static void BuilDeathRightPage(AmmonomiconPageRenderer ammonomiconPageRenderer, List tk2DBaseSprites) { //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) AmmonomiconDeathPageController component = ((Component)ammonomiconPageRenderer.guiManager).GetComponent(); dfScrollPanel component2 = ((Component)((Component)component).transform.Find("Scroll Panel").Find("Footer").Find("ScrollItemsPanel")).GetComponent(); dfPanel component3 = ((Component)((Component)component2).transform.Find("AllItemsPanel")).GetComponent(); PlayerController val = HelperTools.LastPlayerOpenedUI(); if (!Object.op_Implicit((Object)(object)val)) { return; } dfControl val2 = ((dfControl)component2).Find("ActiveMods"); dfControl val3 = ((dfControl)component2).Find("ModulePanel"); dfControl val4 = ((dfControl)component2).Find("InActiveMods"); dfControl val5 = ((dfControl)component2).Find("InModulePanel"); if ((Object)(object)val2 == (Object)null) { dfPanel val6 = Object.Instantiate(StaticData.ItemsHeader, ((Component)component2).transform); ((Object)val6).name = "ActiveMods"; dfLabel componentInChildren = ((Component)val6).GetComponentInChildren(); ((dfControl)componentInChildren).isLocalized = false; ((dfControl)componentInChildren).localizationKey = ""; componentInChildren.Text = "Active"; ConditionalTranslator component4 = ((Component)componentInChildren).gameObject.GetComponent(); ((Behaviour)component4).enabled = false; ((dfControl)val6).ZOrder = 1; val2 = (dfControl)(object)val6; ((dfControl)componentInChildren).ResetLayout(); ((dfControl)component2).controls.Add((dfControl)(object)componentInChildren); ((dfControl)component3).ResetLayout(); ((dfControl)val6).ResetLayout(); dfPanel val7 = Object.Instantiate(component3, ((Component)component2).transform); ((Object)((Component)val7).gameObject).name = "ModulePanel"; for (int i = 0; i < ((Component)val7).transform.childCount; i++) { Object.Destroy((Object)(object)((Component)((Component)val7).transform.GetChild(0)).gameObject); } ((dfControl)component2).controls.Add((dfControl)(object)val7); ((dfControl)val7).ZOrder = 2; val3 = (dfControl)(object)val7; dfPanel val8 = Object.Instantiate(StaticData.ItemsHeader, ((Component)component2).transform); ((Object)val8).name = "InActiveMods"; dfLabel componentInChildren2 = ((Component)val8).GetComponentInChildren(); ((dfControl)componentInChildren2).isLocalized = false; ((dfControl)componentInChildren2).localizationKey = ""; componentInChildren2.Text = "Inactive"; component4 = ((Component)componentInChildren2).gameObject.GetComponent(); ((Behaviour)component4).enabled = false; ((dfControl)val8).ZOrder = 3; val4 = (dfControl)(object)val8; ((dfControl)componentInChildren2).ResetLayout(); ((dfControl)component2).controls.Add((dfControl)(object)componentInChildren); val8.CenterChildControls(); val7 = Object.Instantiate(component3, ((Component)component2).transform); ((Object)((Component)val7).gameObject).name = "InModulePanel"; for (int j = 0; j < ((Component)val7).transform.childCount; j++) { Object.Destroy((Object)(object)((Component)((Component)val7).transform.GetChild(0)).gameObject); } ((dfControl)component2).controls.Add((dfControl)(object)val7); ((dfControl)val7).ZOrder = 4; val5 = (dfControl)(object)val7; } component2.AutoLayout = true; component2.onChildControlInvalidatedLayout(); component2.flowDirection = (LayoutDirection)1; ((dfControl)component2).anchorStyle = (dfAnchorStyle)1; ((dfControl)component2).ForceUpdateCachedParentTransform(); component2.AutoArrange(); ModulePrinterCore modulePrinterCore = val.PlayerHasCore(); if (Object.op_Implicit((Object)(object)modulePrinterCore)) { ((Component)val2).gameObject.SetActive(true); ((Component)val3).gameObject.SetActive(true); ((Component)val4).gameObject.SetActive(true); ((Component)val5).gameObject.SetActive(true); val2.ZOrder = 1; val3.ZOrder = 2; val4.ZOrder = 3; val5.ZOrder = 4; component2.AutoArrange(); ((MonoBehaviour)GameManager.Instance).StartCoroutine(DoWait(ammonomiconPageRenderer, component2, val, modulePrinterCore, (dfPanel)(object)((val3 is dfPanel) ? val3 : null), (dfPanel)(object)((val5 is dfPanel) ? val5 : null))); } else { ((Component)val2).gameObject.SetActive(false); ((Component)val3).gameObject.SetActive(false); ((Component)val4).gameObject.SetActive(false); ((Component)val5).gameObject.SetActive(false); } } public static IEnumerator DoWait(AmmonomiconPageRenderer ammonomiconPageRenderer, dfScrollPanel component2, PlayerController player, ModulePrinterCore core, dfPanel __, dfPanel ____) { yield return null; ((dfControl)__).ZOrder = 2; ((dfControl)____).ZOrder = 4; for (int i = 0; i < ((Component)__).transform.childCount; i++) { Object.Destroy((Object)(object)((Component)((Component)__).transform.GetChild(i)).gameObject); } for (int j = 0; j < ((Component)____).transform.childCount; j++) { Object.Destroy((Object)(object)((Component)((Component)____).transform.GetChild(j)).gameObject); } List Sprites = new List(); foreach (ModulePrinterCore.ModuleContainer entry2 in core.ModuleContainers) { AddSprites(ammonomiconPageRenderer, player, __, entry2.ActiveCount + entry2.ReturnTemporaryCounts() + entry2.ReturnFakeCounts(), ((PickupObject)entry2.defaultModule).PickupObjectId, ref Sprites); } Sprites = ttLinq.ttOrderBy((IEnumerable)Sprites, (Func)delegate(tk2dBaseSprite a) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) Bounds bounds2 = a.GetBounds(); return ((Bounds)(ref bounds2)).size.y; }); List list2 = new List(); ammonomiconPageRenderer.BoxArrangeItems(__, Sprites, new Vector2(0f, 6f), new Vector2(6f, 3f), ref list2); ((MonoBehaviour)ammonomiconPageRenderer).StartCoroutine(ammonomiconPageRenderer.HandleDeathItemsClipping(__, Sprites)); ((dfControl)component2).ResetLayout(); component2.AutoArrange(); List Sprites4 = new List(); foreach (ModulePrinterCore.ModuleContainer entry in core.ModuleContainers) { AddSprites(ammonomiconPageRenderer, player, ____, entry.Count - entry.ActiveCount, ((PickupObject)entry.defaultModule).PickupObjectId, ref Sprites4); } Sprites4 = ttLinq.ttOrderBy((IEnumerable)Sprites4, (Func)delegate(tk2dBaseSprite a) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) Bounds bounds = a.GetBounds(); return ((Bounds)(ref bounds)).size.y; }); List list3 = new List(); ammonomiconPageRenderer.BoxArrangeItems(____, Sprites4, new Vector2(0f, 6f), new Vector2(6f, 3f), ref list3); ((MonoBehaviour)ammonomiconPageRenderer).StartCoroutine(ammonomiconPageRenderer.HandleDeathItemsClipping(____, Sprites4)); } public static void AddSprites(AmmonomiconPageRenderer __instance, PlayerController playerController, dfPanel component3, int amount, int itemID, ref List tk2DBaseSprites) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) DefaultModule defaultModule = GlobalModuleStorage.ReturnModule(itemID); for (int i = 0; i < amount; i++) { tk2dClippedSprite val = __instance.AddSpriteToPage(((BraveBehaviour)defaultModule).sprite.collection, ((BraveBehaviour)defaultModule).sprite.spriteId); SpriteOutlineManager.AddScaledOutlineToSprite((tk2dBaseSprite)(object)val, Color.black, 0.1f, 0.01f); ((BraveBehaviour)val).transform.parent = ((Component)component3).transform; ((BraveBehaviour)val).transform.position = ((dfControl)component3).GetCenter(); tk2DBaseSprites.Add((tk2dBaseSprite)(object)val); } } } } namespace ModularMod.Code.Toolboxes { public abstract class CustomSlashData : ScriptableObject { public bool doVFX = true; public VFXPool VFX; public bool doHitVFX; public VFXPool hitVFX; public CustomSlashDoer.ProjInteractMode projInteractMode; public float playerKnockbackForce; public float enemyKnockbackForce; public List statusEffects; public float jammedDamageMult; public float bossDamageMult; public bool doOnSlash; public bool doPostProcessSlash; public float slashRange; public float slashDegrees; public float damage; public bool damagesBreakables; public string soundEvent; public Action OnHitTarget; public Action OnHitBullet; public Action OnHitMinorBreakable; public Action OnHitMajorBreakable; public Action CustomReflectProjectile; public abstract CustomSlashData ReturnClone(); public virtual void OnProjectileReflect(Projectile p, bool retargetReflectedBullet, GameActor newOwner, float minReflectedBulletSpeed, bool doPostProcessing = false, float scaleModifier = 1f, float baseDamage = 10f, float spread = 0f, string sfx = null) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) p.RemoveBulletScriptControl(); if (sfx != null) { AkSoundEngine.PostEvent(sfx, ((Component)GameManager.Instance).gameObject); } if (retargetReflectedBullet && Object.op_Implicit((Object)(object)p.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)p.Owner).specRigidbody)) { Vector2 val = ((BraveBehaviour)p.Owner).specRigidbody.GetUnitCenter((ColliderType)2) - ((BraveBehaviour)p).specRigidbody.UnitCenter; p.Direction = ((Vector2)(ref val)).normalized; } if (spread != 0f) { p.Direction = Vector2Extensions.Rotate(p.Direction, Random.Range(0f - spread, spread)); } if (Object.op_Implicit((Object)(object)p.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)p.Owner).specRigidbody)) { ((BraveBehaviour)p).specRigidbody.DeregisterSpecificCollisionException(((BraveBehaviour)p.Owner).specRigidbody); } p.Owner = newOwner; p.SetNewShooter(((BraveBehaviour)newOwner).specRigidbody); p.allowSelfShooting = false; if (newOwner is AIActor) { p.collidesWithPlayer = true; p.collidesWithEnemies = false; } else if (newOwner is PlayerController) { p.collidesWithPlayer = false; p.collidesWithEnemies = true; } if (scaleModifier != 1f) { SpawnManager.PoolManager.Remove(((BraveBehaviour)p).transform); p.RuntimeUpdateScale(scaleModifier); } if (p.Speed < minReflectedBulletSpeed) { p.Speed = minReflectedBulletSpeed; } p.baseData.damage = baseDamage; if (doPostProcessing && doPostProcessing && newOwner is PlayerController) { PlayerController val2 = (PlayerController)(object)((newOwner is PlayerController) ? newOwner : null); if ((Object)(object)val2 != (Object)null) { ProjectileData baseData = p.baseData; baseData.damage *= val2.stats.GetStatValue((StatType)5); ProjectileData baseData2 = p.baseData; baseData2.speed *= val2.stats.GetStatValue((StatType)6); p.UpdateSpeed(); ProjectileData baseData3 = p.baseData; baseData3.force *= val2.stats.GetStatValue((StatType)12); ProjectileData baseData4 = p.baseData; baseData4.range *= val2.stats.GetStatValue((StatType)26); p.BossDamageMultiplier *= val2.stats.GetStatValue((StatType)22); p.RuntimeUpdateScale(val2.stats.GetStatValue((StatType)15)); val2.DoPostProcessProjectile(p); } } if (newOwner is AIActor) { p.baseData.damage = 0.5f; p.baseData.SetAll(((BraveBehaviour)((newOwner is AIActor) ? newOwner : null)).bulletBank.GetBullet("default").ProjectileData); ((BraveBehaviour)p).specRigidbody.CollideWithTileMap = false; p.ResetDistance(); p.collidesWithEnemies = ((AIActor)((newOwner is AIActor) ? newOwner : null)).CanTargetEnemies; p.collidesWithPlayer = true; p.UpdateCollisionMask(); ((BraveBehaviour)p).sprite.color = new Color(1f, 0.1f, 0.1f); p.MakeLookLikeEnemyBullet(true); p.RemovePlayerOnlyModifiers(); if (((AIActor)((newOwner is AIActor) ? newOwner : null)).IsBlackPhantom) { p.baseData.damage = 1f; p.BecomeBlackBullet(); } } p.UpdateCollisionMask(); p.Reflected(); p.SendInDirection(p.Direction, true, true); } protected CustomSlashData() { ref VFXPool vFX = ref VFX; PickupObject byId = PickupObjectDatabase.GetById(417); vFX = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects; doHitVFX = true; ref VFXPool reference = ref hitVFX; PickupObject byId2 = PickupObjectDatabase.GetById(417); reference = ((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0].hitEffects.enemy; projInteractMode = CustomSlashDoer.ProjInteractMode.IGNORE; playerKnockbackForce = 5f; enemyKnockbackForce = 10f; statusEffects = new List(); jammedDamageMult = 1f; bossDamageMult = 1f; doOnSlash = true; doPostProcessSlash = true; slashRange = 2.5f; slashDegrees = 90f; damage = 5f; damagesBreakables = true; soundEvent = "Play_WPN_blasphemy_shot_01"; OnHitTarget = null; OnHitBullet = null; OnHitMinorBreakable = null; OnHitMajorBreakable = null; CustomReflectProjectile = null; ((ScriptableObject)this)..ctor(); } } public class BasicSlash : CustomSlashData { public override CustomSlashData ReturnClone() { BasicSlash basicSlash = ScriptableObject.CreateInstance(); basicSlash.doVFX = doVFX; basicSlash.VFX = VFX; basicSlash.doHitVFX = doHitVFX; basicSlash.hitVFX = hitVFX; basicSlash.projInteractMode = projInteractMode; basicSlash.playerKnockbackForce = playerKnockbackForce; basicSlash.enemyKnockbackForce = enemyKnockbackForce; basicSlash.statusEffects = statusEffects; basicSlash.jammedDamageMult = jammedDamageMult; basicSlash.bossDamageMult = bossDamageMult; basicSlash.doOnSlash = doOnSlash; basicSlash.doPostProcessSlash = doPostProcessSlash; basicSlash.slashRange = slashRange; basicSlash.slashDegrees = slashDegrees; basicSlash.damage = damage; basicSlash.damagesBreakables = damagesBreakables; basicSlash.soundEvent = soundEvent; basicSlash.OnHitTarget = OnHitTarget; basicSlash.OnHitBullet = OnHitBullet; basicSlash.OnHitMinorBreakable = OnHitMinorBreakable; basicSlash.OnHitMajorBreakable = OnHitMajorBreakable; return basicSlash; } } public class CustomSlashDoer { public enum ProjInteractMode { IGNORE, DESTROY, REFLECT, REFLECTANDPOSTPROCESS } public static void DoSwordSlash(Vector2 position, float angle, GameActor owner, CustomSlashData slashParameters, Transform parentTransform = null) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) if (!(owner is PlayerController) || !((Object)(object)PlayerUtility.GetExtComp((PlayerController)(object)((owner is PlayerController) ? owner : null)) != (Object)null) || PlayerUtility.GetExtComp((PlayerController)(object)((owner is PlayerController) ? owner : null)).PreProcessSlash != null) { } if (slashParameters.doVFX && slashParameters.VFX != null) { slashParameters.VFX.SpawnAtPosition(Vector2.op_Implicit(position), angle, parentTransform, (Vector2?)null, (Vector2?)null, (float?)(-0.05f), false, (SpawnMethod)null, (tk2dBaseSprite)null, false); } if (!string.IsNullOrEmpty(slashParameters.soundEvent) && (Object)(object)owner != (Object)null && (Object)(object)((Component)owner).gameObject != (Object)null) { AkSoundEngine.PostEvent(slashParameters.soundEvent, ((Component)owner).gameObject); } ((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleSlash(position, angle, owner, slashParameters)); } private static IEnumerator HandleSlash(Vector2 position, float angle, GameActor owner, CustomSlashData slashParameters) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) int slashId = Time.frameCount; List alreadyHit = new List(); if (slashParameters.playerKnockbackForce != 0f && (Object)(object)owner != (Object)null) { ((BraveBehaviour)owner).knockbackDoer.ApplyKnockback(BraveMathCollege.DegreesToVector(angle, 1f), slashParameters.playerKnockbackForce, 0.25f, false); } float ela = 0f; while (ela < 0.2f) { ela += BraveTime.DeltaTime; HandleHeroSwordSlash(alreadyHit, position, angle, slashId, owner, slashParameters); yield return null; } if (!(owner is PlayerController) || !((Object)(object)PlayerUtility.GetExtComp((PlayerController)(object)((owner is PlayerController) ? owner : null)) != (Object)null) || PlayerUtility.GetExtComp((PlayerController)(object)((owner is PlayerController) ? owner : null)).PostProcessSlash == null) { } } private static bool SlasherIsPlayerOrFriendly(GameActor slasher) { if (slasher is PlayerController) { return true; } if (slasher is AIActor) { if (Object.op_Implicit((Object)(object)((Component)slasher).GetComponent())) { return true; } if (!((BraveBehaviour)slasher).aiActor.CanTargetPlayers && ((BraveBehaviour)slasher).aiActor.CanTargetEnemies) { return true; } } return false; } private static bool ProjectileIsValid(Projectile proj, GameActor slashOwner) { if (Object.op_Implicit((Object)(object)proj)) { if ((Object)(object)slashOwner == (Object)null) { return false; } if (SlasherIsPlayerOrFriendly(slashOwner)) { if ((Object.op_Implicit((Object)(object)proj.Owner) && !(proj.Owner is PlayerController)) || proj.ForcePlayerBlankable) { return true; } } else if (slashOwner is AIActor) { if (Object.op_Implicit((Object)(object)proj.Owner) && proj.Owner is PlayerController) { return true; } } else if (Object.op_Implicit((Object)(object)proj.Owner)) { return true; } } return false; } private static bool ObjectWasHitBySlash(Vector2 ObjectPosition, Vector2 SlashPosition, float slashAngle, float SlashRange, float SlashDimensions) { //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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (Vector2.Distance(ObjectPosition, SlashPosition) < SlashRange) { float num = BraveMathCollege.Atan2Degrees(ObjectPosition - SlashPosition); float num2 = Math.Min(SlashDimensions, 0f - SlashDimensions); float num3 = Math.Max(SlashDimensions, 0f - SlashDimensions); bool result = false; float num4 = slashAngle + num3; float num5 = slashAngle + num2; if (MathsAndLogicHelper.IsBetweenRange(num, num5, num4)) { result = true; } if (num4 > 180f) { float num6 = num4 - 180f; if (MathsAndLogicHelper.IsBetweenRange(num, -180f, -180f + num6)) { result = true; } } if (num5 < -180f) { float num7 = num5 + 180f; if (MathsAndLogicHelper.IsBetweenRange(num, 180f + num7, 180f)) { result = true; } } return result; } return false; } private static void HandleHeroSwordSlash(List alreadyHit, Vector2 arcOrigin, float slashAngle, int slashId, GameActor owner, CustomSlashData slashParameters) { //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) float slashDegrees = slashParameters.slashDegrees; float slashRange = slashParameters.slashRange; ReadOnlyCollection allProjectiles = StaticReferenceManager.AllProjectiles; for (int num = allProjectiles.Count - 1; num >= 0; num--) { Projectile val = allProjectiles[num]; if (ProjectileIsValid(val, owner)) { Vector2 worldCenter = ((BraveBehaviour)val).sprite.WorldCenter; if (ObjectWasHitBySlash(worldCenter, arcOrigin, slashAngle, slashRange, slashDegrees)) { if (slashParameters.OnHitBullet != null) { slashParameters.OnHitBullet(val); } if (slashParameters.projInteractMode != 0 || val.collidesWithProjectiles) { if (slashParameters.projInteractMode == ProjInteractMode.DESTROY || slashParameters.projInteractMode == ProjInteractMode.IGNORE) { val.DieInAir(false, true, true, true); } else if ((slashParameters.projInteractMode == ProjInteractMode.REFLECT || slashParameters.projInteractMode == ProjInteractMode.REFLECTANDPOSTPROCESS) && (Object)(object)val.Owner != (Object)null && val.LastReflectedSlashId != slashId) { slashParameters.OnProjectileReflect(val, retargetReflectedBullet: true, owner, 5f, slashParameters.projInteractMode == ProjInteractMode.REFLECTANDPOSTPROCESS, 1f, 5f); val.LastReflectedSlashId = slashId; } } } } } DealDamageToEnemiesInArc(owner, arcOrigin, slashAngle, slashRange, slashParameters, alreadyHit); if (!slashParameters.damagesBreakables) { return; } List allMinorBreakables = StaticReferenceManager.AllMinorBreakables; for (int num2 = allMinorBreakables.Count - 1; num2 >= 0; num2--) { MinorBreakable val2 = allMinorBreakables[num2]; if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((BraveBehaviour)val2).specRigidbody) && !val2.IsBroken && Object.op_Implicit((Object)(object)((BraveBehaviour)val2).sprite) && ObjectWasHitBySlash(((BraveBehaviour)val2).sprite.WorldCenter, arcOrigin, slashAngle, slashRange, slashDegrees)) { if (slashParameters.OnHitMinorBreakable != null) { slashParameters.OnHitMinorBreakable(val2); } val2.Break(); } } List allMajorBreakables = StaticReferenceManager.AllMajorBreakables; for (int num3 = allMajorBreakables.Count - 1; num3 >= 0; num3--) { MajorBreakable val3 = allMajorBreakables[num3]; if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)((BraveBehaviour)val3).specRigidbody) && !alreadyHit.Contains(((BraveBehaviour)val3).specRigidbody) && !val3.IsSecretDoor && !val3.IsDestroyed && ObjectWasHitBySlash(((BraveBehaviour)val3).specRigidbody.UnitCenter, arcOrigin, slashAngle, slashRange, slashDegrees)) { float num4 = slashParameters.damage; if (Object.op_Implicit((Object)(object)((BraveBehaviour)val3).healthHaver)) { num4 *= 0.2f; } if (slashParameters.OnHitMajorBreakable != null) { slashParameters.OnHitMajorBreakable(val3); } val3.ApplyDamage(num4, ((BraveBehaviour)val3).specRigidbody.UnitCenter - arcOrigin, false, false, false); alreadyHit.Add(((BraveBehaviour)val3).specRigidbody); } } } private static void DealDamageToEnemiesInArc(GameActor owner, Vector2 arcOrigin, float arcAngle, float arcRadius, CustomSlashData slashParameters, List alreadyHit = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_033e: 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_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(arcOrigin); if (absoluteRoom == null) { return; } if (SlasherIsPlayerOrFriendly(owner)) { List activeEnemies = absoluteRoom.GetActiveEnemies((ActiveEnemyType)0); if (activeEnemies == null) { return; } RaycastResult val3 = default(RaycastResult); for (int i = 0; i < activeEnemies.Count; i++) { AIActor val = activeEnemies[i]; if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)((BraveBehaviour)val).specRigidbody) || !val.IsNormalEnemy || ((GameActor)val).IsGone || !Object.op_Implicit((Object)(object)((BraveBehaviour)val).healthHaver) || (alreadyHit != null && alreadyHit.Contains(((BraveBehaviour)val).specRigidbody))) { continue; } for (int j = 0; j < ((BraveBehaviour)val).healthHaver.NumBodyRigidbodies; j++) { SpeculativeRigidbody bodyRigidbody = ((BraveBehaviour)val).healthHaver.GetBodyRigidbody(j); PixelCollider hitboxPixelCollider = bodyRigidbody.HitboxPixelCollider; if (hitboxPixelCollider == null) { continue; } Vector2 val2 = BraveMathCollege.ClosestPointOnRectangle(arcOrigin, hitboxPixelCollider.UnitBottomLeft, hitboxPixelCollider.UnitDimensions); if (!ObjectWasHitBySlash(val2, arcOrigin, arcAngle, arcRadius, 90f)) { continue; } bool flag = true; int num = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, (CollisionLayer)12); if (PhysicsEngine.Instance.Raycast(arcOrigin, val2 - arcOrigin, Vector2.Distance(val2, arcOrigin), ref val3, true, true, num, (CollisionLayer?)null, false, (Func)null, (SpeculativeRigidbody)null) && (Object)(object)val3.SpeculativeRigidbody != (Object)(object)bodyRigidbody) { flag = false; } RaycastResult.Pool.Free(ref val3); if (!flag) { continue; } float num2 = DealSwordDamageToEnemy(owner, (GameActor)(object)val, arcOrigin, val2, arcAngle, slashParameters); if (alreadyHit != null) { if (alreadyHit.Count == 0) { StickyFrictionManager.Instance.RegisterSwordDamageStickyFriction(num2); } alreadyHit.Add(((BraveBehaviour)val).specRigidbody); } break; } } return; } List list = new List(); if (Object.op_Implicit((Object)(object)GameManager.Instance.PrimaryPlayer)) { list.Add(GameManager.Instance.PrimaryPlayer); } if (Object.op_Implicit((Object)(object)GameManager.Instance.SecondaryPlayer)) { list.Add(GameManager.Instance.SecondaryPlayer); } RaycastResult val6 = default(RaycastResult); for (int k = 0; k < list.Count; k++) { PlayerController val4 = list[k]; if (!Object.op_Implicit((Object)(object)val4) || !Object.op_Implicit((Object)(object)((BraveBehaviour)val4).specRigidbody) || !Object.op_Implicit((Object)(object)((BraveBehaviour)val4).healthHaver) || val4.IsGhost || (alreadyHit != null && alreadyHit.Contains(((BraveBehaviour)val4).specRigidbody))) { continue; } SpeculativeRigidbody specRigidbody = ((BraveBehaviour)val4).specRigidbody; PixelCollider hitboxPixelCollider2 = specRigidbody.HitboxPixelCollider; if (hitboxPixelCollider2 == null) { continue; } Vector2 val5 = BraveMathCollege.ClosestPointOnRectangle(arcOrigin, hitboxPixelCollider2.UnitBottomLeft, hitboxPixelCollider2.UnitDimensions); if (!ObjectWasHitBySlash(val5, arcOrigin, arcAngle, arcRadius, 90f)) { continue; } bool flag2 = true; int num3 = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, (CollisionLayer)12); if (PhysicsEngine.Instance.Raycast(arcOrigin, val5 - arcOrigin, Vector2.Distance(val5, arcOrigin), ref val6, true, true, num3, (CollisionLayer?)null, false, (Func)null, (SpeculativeRigidbody)null) && (Object)(object)val6.SpeculativeRigidbody != (Object)(object)specRigidbody) { flag2 = false; } RaycastResult.Pool.Free(ref val6); if (!flag2) { continue; } float num4 = DealSwordDamageToEnemy(owner, (GameActor)(object)val4, arcOrigin, val5, arcAngle, slashParameters); if (alreadyHit != null) { if (alreadyHit.Count == 0) { StickyFrictionManager.Instance.RegisterSwordDamageStickyFriction(num4); } alreadyHit.Add(((BraveBehaviour)val4).specRigidbody); } break; } } private static float DealSwordDamageToEnemy(GameActor owner, GameActor targetEnemy, Vector2 arcOrigin, Vector2 contact, float angle, CustomSlashData slashParameters) { //IL_006c: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((BraveBehaviour)targetEnemy).healthHaver)) { float num = slashParameters.damage; if (Object.op_Implicit((Object)(object)((BraveBehaviour)targetEnemy).healthHaver) && ((BraveBehaviour)targetEnemy).healthHaver.IsBoss) { num *= slashParameters.bossDamageMult; } if (targetEnemy is AIActor && ((AIActor)((targetEnemy is AIActor) ? targetEnemy : null)).IsBlackPhantom) { num *= slashParameters.jammedDamageMult; } DamageCategory val = (DamageCategory)0; if (owner is AIActor && ((AIActor)((owner is AIActor) ? owner : null)).IsBlackPhantom) { val = (DamageCategory)4; } if (slashParameters.doHitVFX && slashParameters.hitVFX != null) { slashParameters.hitVFX.SpawnAtPosition(new Vector3(contact.x, contact.y), 0f, ((BraveBehaviour)targetEnemy).transform, (Vector2?)null, (Vector2?)null, (float?)null, false, (SpawnMethod)null, (tk2dBaseSprite)null, false); bool isAlive = ((BraveBehaviour)targetEnemy).healthHaver.IsAlive; ((BraveBehaviour)targetEnemy).healthHaver.ApplyDamage(num, contact - arcOrigin, owner.ActorName, (CoreDamageTypes)0, val, false, (PixelCollider)null, false); if (!(owner is PlayerController) || !((Object)(object)PlayerUtility.GetExtComp((PlayerController)(object)((owner is PlayerController) ? owner : null)) != (Object)null) || PlayerUtility.GetExtComp((PlayerController)(object)((owner is PlayerController) ? owner : null)).OnSlashHitEnemy == null || targetEnemy is AIActor) { } bool arg = false; if (isAlive && ((BraveBehaviour)targetEnemy).healthHaver.IsDead) { arg = true; } if (slashParameters.OnHitTarget != null) { slashParameters.OnHitTarget(targetEnemy, arg); } } if (Object.op_Implicit((Object)(object)((BraveBehaviour)targetEnemy).knockbackDoer)) { ((BraveBehaviour)targetEnemy).knockbackDoer.ApplyKnockback(contact - arcOrigin, slashParameters.enemyKnockbackForce, false); } if (slashParameters.statusEffects != null && slashParameters.statusEffects.Count > 0) { foreach (GameActorEffect statusEffect in slashParameters.statusEffects) { targetEnemy.ApplyEffect(statusEffect, 1f, (Projectile)null); } } } return slashParameters.damage; } } } namespace ModularMod.Code.Hooks { public class Actions { public static Func ModifyBossDrop; public static Func ModifyForceGun; public static Action OnReinforcementWave; public static Action OnActiveItemDropped; public static void Init() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(RoomHandler).GetMethod("TriggerReinforcementLayer", BindingFlags.Instance | BindingFlags.Public), typeof(Actions).GetMethod("TriggerReinforcementLayerHook")); new Hook((MethodBase)typeof(PlayerItem).GetMethod("Drop", BindingFlags.Instance | BindingFlags.Public), typeof(Actions).GetMethod("DropHook")); new Hook((MethodBase)typeof(FloorRewardManifest).GetMethod("GetNextBossReward", BindingFlags.Instance | BindingFlags.Public), typeof(Actions).GetMethod("BossDropHook")); new Hook((MethodBase)typeof(RewardManager).GetMethod("GetRewardObjectBossStyle", BindingFlags.Instance | BindingFlags.Public), typeof(Actions).GetMethod("GetRewardObjectBossStyleHook")); new Hook((MethodBase)typeof(RewardManager).GetMethod("IsBossRewardForcedGun", BindingFlags.Instance | BindingFlags.Public), typeof(Actions).GetMethod("ModifyBossForceGunHook")); } public static GameObject GetRewardObjectBossStyleHook(Func orig, RewardManager self, PlayerController player) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) FloorRewardData currentRewardData = self.CurrentRewardData; bool flag = (((int)GameManager.Instance.BestGenerationDungeonPrefab.tileIndices.tilesetId == 2 && (int)GameManager.Instance.CurrentGameType == 0 && Object.op_Implicit((Object)(object)player) && player.inventory != null && player.inventory.GunCountModified <= 3) ? (Random.value > 0.2f) : (((int)GameManager.Instance.CurrentGameType != 0 || !Object.op_Implicit((Object)(object)player) || player.inventory == null || player.inventory.GunCountModified > 2) ? (Random.value > self.ItemVsGunChanceBossReward) : (Random.value > 0.3f))); if (self.IsBossRewardForcedGun()) { flag = true; } if (((int)GameManager.Instance.CurrentGameMode == 2 || (int)GameManager.Instance.CurrentGameMode == 3) && !GameManager.Instance.Dungeon.HasGivenBossrushGun) { GameManager.Instance.Dungeon.HasGivenBossrushGun = true; flag = true; } if (ModifyForceGun != null) { flag = ModifyForceGun(flag); } if (flag) { ItemQuality randomBossTargetQuality = currentRewardData.GetRandomBossTargetQuality((Random)null); return self.GetItemForPlayer(player, self.GunsLootTable, randomBossTargetQuality, (List)null, false, (Random)null, false, (List)null, false, (RewardSource)1); } return self.GetRewardItemDaveStyle(player, true); } public static bool ModifyBossForceGunHook(Func orig, RewardManager self) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)GameManager.Instance.CurrentGameMode != 2) { bool flag = true; for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++) { if (Object.op_Implicit((Object)(object)GameManager.Instance.AllPlayers[i]) && (GameManager.Instance.AllPlayers[i].HasReceivedNewGunThisFloor || GameManager.Instance.AllPlayers[i].CharacterUsesRandomGuns)) { flag = false; } } if (flag) { Debug.LogWarning((object)"Potentially Force Drop GUN"); if (ModifyForceGun != null) { return ModifyForceGun(flag); } return true; } } return false; } public static PickupObject BossDropHook(Func orig, FloorRewardManifest self, bool forceGun) { if (forceGun) { self.m_bossGunIndex++; return (ModifyBossDrop != null) ? ModifyBossDrop(self.PregeneratedBossRewardsGunsOnly[self.m_bossGunIndex - 1]) : self.PregeneratedBossRewardsGunsOnly[self.m_bossGunIndex - 1]; } self.m_bossIndex++; return (ModifyBossDrop != null) ? ModifyBossDrop(self.PregeneratedBossRewardsGunsOnly[self.m_bossGunIndex - 1]) : self.PregeneratedBossRewards[self.m_bossIndex - 1]; } public static DebrisObject DropHook(Func orig, PlayerItem self, PlayerController player, float overrideForce = 4f) { DebrisObject val = orig(self, player, overrideForce); if (OnActiveItemDropped != null) { OnActiveItemDropped(((Component)val).GetComponent(), player); } return val; } public static bool PreUse(Func orig, PlayerItem self, PlayerController user, out float flot) { flot = -1f; return orig(self, user, -1f); } public static bool TriggerReinforcementLayerHook(Func orig, RoomHandler self, int index, bool removeLayer = true, bool disableDrops = false, int specifyObjectIndex = -1, int specifyObjectCount = -1, bool instant = false) { try { if (OnReinforcementWave != null && self != null) { OnReinforcementWave(self); } } catch (Exception ex) { Debug.Log((object)ex); } return orig.Invoke(self, index, removeLayer, disableDrops, specifyObjectIndex, specifyObjectCount, instant); } } } namespace ModularMod.Code.Enemies.EnemyBehaviours { public class ModularPrimeLeapBehavior : BasicAttackBehavior { public enum StopType { None, Tell, Attack, Charge, TellOnly } private enum State { Idle, WaitingForCharge, WaitingForTell, Firing, WaitingForPostAnim } public enum TargetAreaOrigin { HitboxCenter, ShootPoint } public abstract class FiringAreaStyle { public TargetAreaOrigin targetAreaOrigin; public abstract bool TargetInFiringArea(Vector2 origin, Vector2 targetCenter); public abstract void DrawDebugLines(Vector2 origin, Vector2 targetCenter, AIActor actor); } public class ArcFiringArea : FiringAreaStyle { public float StartAngle; public float SweepAngle; public override bool TargetInFiringArea(Vector2 origin, Vector2 targetCenter) { //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_0003: Unknown result type (might be due to invalid IL or missing references) return BraveMathCollege.IsAngleWithinSweepArea(Vector2Extensions.ToAngle(targetCenter - origin), StartAngle, SweepAngle); } public override void DrawDebugLines(Vector2 origin, Vector2 targetCenter, AIActor actor) { BasicAttackBehavior.m_arcCount++; } } public class RectFiringArea : FiringAreaStyle { public Vector2 AreaOriginOffset; public Vector2 AreaDimensions; private Vector2 offset { get { //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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) Vector2 areaOriginOffset = AreaOriginOffset; if (AreaDimensions.x < 0f) { areaOriginOffset.x += AreaDimensions.x; } if (AreaDimensions.y < 0f) { areaOriginOffset.y += AreaDimensions.y; } return areaOriginOffset; } } private Vector2 dimensions => new Vector2(Mathf.Abs(AreaDimensions.x), Mathf.Abs(AreaDimensions.y)); public override bool TargetInFiringArea(Vector2 origin, Vector2 targetCenter) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) origin += offset; return targetCenter.x >= origin.x && targetCenter.x <= origin.x + dimensions.x && targetCenter.y >= origin.y && targetCenter.y <= origin.y + dimensions.y; } public override void DrawDebugLines(Vector2 origin, Vector2 targetCenter, AIActor actor) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_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) origin += offset; } } private bool shitFart; private ModularPrime.ModularPrimeController controller; private bool STOPYOUCUNT = false; public RoomHandler cached_roomHandler; public Vector2 cached_position; private bool FuckingDie = false; public float FlightTime = 3f; public float TrackingSpeedMultiplier = 1f; public GameObject ShootPoint; [InspectorShowIf("ShowBulletScript")] public BulletScriptSelector BulletScript; [InspectorShowIf("ShowBulletName")] public string BulletName; [InspectorShowIf("IsSingleBullet")] public float LeadAmount; public StopType StopDuring; [InspectorShowIf("ShowImmobileDuringStop")] public bool ImmobileDuringStop; public float MoveSpeedModifier = 1f; public bool LockFacingDirection; [InspectorIndent] [InspectorShowIf("LockFacingDirection")] public bool ContinueAimingDuringTell; [InspectorIndent] [InspectorShowIf("LockFacingDirection")] public bool ReaimOnFire; public bool MultipleFireEvents; public bool RequiresTarget = true; public bool PreventTargetSwitching; public bool Uninterruptible; public bool ClearGoop; [InspectorIndent] [InspectorShowIf("ClearGoop")] public float ClearGoopRadius = 2f; public bool ShouldOverrideFireDirection; [InspectorIndent] [InspectorShowIf("ShowOverrideFireDirection")] public float OverrideFireDirection; [InspectorCategory("Visuals")] public AIAnimator SpecifyAiAnimator; [InspectorCategory("Visuals")] public string ChargeAnimation; [InspectorCategory("Visuals")] [InspectorShowIf("ShowChargeTime")] public float ChargeTime; [InspectorCategory("Visuals")] public string TellAnimation; [InspectorCategory("Visuals")] public string FireAnimation; [InspectorCategory("Visuals")] public string PostFireAnimation; [InspectorCategory("Visuals")] public bool HideGun = true; [InspectorCategory("Visuals")] public bool OverrideBaseAnims; [InspectorShowIf("OverrideBaseAnims")] [InspectorIndent] [InspectorCategory("Visuals")] public string OverrideIdleAnim; [InspectorIndent] [InspectorCategory("Visuals")] [InspectorShowIf("OverrideBaseAnims")] public string OverrideMoveAnim; [InspectorCategory("Visuals")] public bool UseVfx; [InspectorCategory("Visuals")] [InspectorShowIf("UseVfx")] [InspectorIndent] public string ChargeVfx; [InspectorShowIf("UseVfx")] [InspectorCategory("Visuals")] [InspectorIndent] public string TellVfx; [InspectorCategory("Visuals")] [InspectorShowIf("UseVfx")] [InspectorIndent] public string FireVfx; [InspectorIndent] [InspectorCategory("Visuals")] [InspectorShowIf("UseVfx")] public string Vfx; [InspectorCategory("Visuals")] public GameObject[] EnabledDuringAttack; private SpeculativeRigidbody m_specRigidbody; private AIBulletBank m_bulletBank; private BulletScriptSource m_bulletSource; private float m_chargeTimer; private bool m_beganInactive; private bool m_isAimLocked; private float m_cachedMovementSpeed; private Vector2 m_cachedTargetCenter; private int m_goopExceptionId = -1; private State m_state; public bool IsBulletScript => BulletScript != null && !string.IsNullOrEmpty(BulletScript.scriptTypeName); public bool IsSingleBullet => !string.IsNullOrEmpty(BulletName); public bool JumpEnded => shitFart; public bool BulletScriptEnded { get { if (IsBulletScript) { return m_bulletSource.IsEnded; } return !IsSingleBullet || true; } } private State state { get { return m_state; } set { if (m_state != value) { EndState(m_state); m_state = value; BeginState(m_state); } } } private bool ShowBulletScript() { return string.IsNullOrEmpty(BulletName); } private bool ShowBulletName() { return BulletScript == null || BulletScript.IsNull; } private bool ShowImmobileDuringStop() { return StopDuring != StopType.None; } private bool ShowChargeTime() { return !string.IsNullOrEmpty(ChargeAnimation); } private bool ShowOverrideFireDirection() { return ShowBulletName() && ShouldOverrideFireDirection; } public override void Start() { ((BasicAttackBehavior)this).Start(); controller = ((Component)((BehaviorBase)this).m_aiActor).GetComponent(); if (Object.op_Implicit((Object)(object)SpecifyAiAnimator)) { ((BehaviorBase)this).m_aiAnimator = SpecifyAiAnimator; } if (!string.IsNullOrEmpty(TellAnimation)) { tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)((BehaviorBase)this).m_aiAnimator).spriteAnimator; spriteAnimator.AnimationEventTriggered = (Action)Delegate.Combine(spriteAnimator.AnimationEventTriggered, new Action(AnimEventTriggered)); if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiAnimator.ChildAnimator)) { tk2dSpriteAnimator spriteAnimator2 = ((BraveBehaviour)((BehaviorBase)this).m_aiAnimator.ChildAnimator).spriteAnimator; spriteAnimator2.AnimationEventTriggered = (Action)Delegate.Combine(spriteAnimator2.AnimationEventTriggered, new Action(AnimEventTriggered)); } } GlobalMessageRadio.RegisterObjectToRadio(((Component)((BehaviorBase)this).m_aiActor).gameObject, new List { "LANDYOUFUCK" }, OnRecieveMessage); } public void OnRecieveMessage(GameObject obj, string message) { STOPYOUCUNT = true; } public override void Upkeep() { ((BasicAttackBehavior)this).Upkeep(); if (state == State.WaitingForCharge) { ((BehaviorBase)this).DecrementTimer(ref m_chargeTimer, false); } } public IEnumerator Takeoff() { FuckingDie = false; shitFart = false; cached_position = TransformExtensions.PositionVector2(((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform); cached_roomHandler = ((DungeonPlaceableBehaviour)((BehaviorBase)this).m_aiActor).GetAbsoluteParentRoom(); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).behaviorSpeculator.PreventMovement = true; m_cachedMovementSpeed = ((BehaviorBase)this).m_aiActor.MovementSpeed; ((BehaviorBase)this).m_aiActor.MovementSpeed = 0f; controller.predictedPosition = Vector2.op_Implicit(cached_position); float elaWait = 0f; float duraWait2 = 1.1f; while (elaWait < duraWait2) { if (STOPYOUCUNT) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position = Vector2.op_Implicit(cached_position); yield break; } elaWait += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)((BehaviorBase)this).m_aiActor).healthHaver.IsVulnerable = false; ((Behaviour)((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody).enabled = false; elaWait = 0f; duraWait2 = 1f; _ = ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position; AkSoundEngine.PostEvent("Play_OBJ_boulder_crash_01", ((Component)((BehaviorBase)this).m_aiActor).gameObject); AkSoundEngine.PostEvent("Play_BOSS_doormimic_jump_01", ((Component)((BehaviorBase)this).m_aiActor).gameObject); ExplosionData explosionData = new ExplosionData(); explosionData.CopyFrom(StaticExplosionDatas.customDynamiteExplosion); explosionData.ignoreList = new List { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody }; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldBottomCenter), explosionData, ((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldBottomCenter, (Action)null, false, (CoreDamageTypes)0, false); Exploder.DoDistortionWave(((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldBottomCenter, 2f * ConfigManager.DistortionWaveMultiplier, 0.5f * ConfigManager.DistortionWaveMultiplier, 30f, 1f); while (elaWait < duraWait2) { if (STOPYOUCUNT) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position = Vector2.op_Implicit(cached_position); yield break; } float t = Mathf.Min(elaWait, 1f); float tRue = Toolbox.SinLerpTValue(t); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position = Vector3.Lerp(Vector2.op_Implicit(cached_position), Vector2.op_Implicit(cached_position + new Vector2(0f, 30f)), tRue); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.Reinitialize(); elaWait += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite).renderer.enabled = false; ((MonoBehaviour)((BehaviorBase)this).m_aiActor).StartCoroutine(DoTrack()); } public IEnumerator TakeOn() { if (FuckingDie) { yield break; } FuckingDie = true; ((BraveBehaviour)((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite).renderer.enabled = true; float elaWait = 0f; float duraWait2 = 0.5f; ((BehaviorBase)this).m_aiAnimator.Play(PostFireAnimation, (StateEndType)2, 2f, -1f, false, (string)null); AkSoundEngine.PostEvent("Play_ANM_Gull_Descend_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); AkSoundEngine.PostEvent("Play_ANM_Gull_Descend_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); Vector3 pos = Vector2.op_Implicit(cached_position + new Vector2(0f, 50f)); while (elaWait < duraWait2) { if (STOPYOUCUNT) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position = Vector2.op_Implicit(cached_position); yield break; } float t = elaWait / duraWait2; Vector3 vector3 = Vector3.Lerp(pos - new Vector3(1f, 1f), Vector2.op_Implicit(cached_position - new Vector2(1f, 1f)), t); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position = vector3; ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.Reinitialize(); elaWait += BraveTime.DeltaTime; yield return null; } controller.ResetPredictedPos(); AkSoundEngine.PostEvent("Play_enm_mech_death_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); AkSoundEngine.PostEvent("Play_OBJ_elevator_arrive_01", ((Component)GameManager.Instance.PrimaryPlayer).gameObject); ExplosionData explosionData = new ExplosionData(); explosionData.CopyFrom(StaticExplosionDatas.customDynamiteExplosion); explosionData.ignoreList = new List { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody }; explosionData.doDestroyProjectiles = false; Exploder.Explode(Vector2.op_Implicit(((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldBottomCenter), explosionData, ((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldBottomCenter, (Action)null, false, (CoreDamageTypes)0, false); Exploder.DoDistortionWave(((BraveBehaviour)((BehaviorBase)this).m_aiActor).sprite.WorldBottomCenter, 2f * ConfigManager.DistortionWaveMultiplier, 0.5f * ConfigManager.DistortionWaveMultiplier, 30f, 1f); ((BraveBehaviour)((BehaviorBase)this).m_aiActor).behaviorSpeculator.PreventMovement = false; ((BraveBehaviour)((BehaviorBase)this).m_aiActor).healthHaver.IsVulnerable = true; ((Behaviour)((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody).enabled = true; ((BehaviorBase)this).m_aiActor.MovementSpeed = m_cachedMovementSpeed; Fire(); elaWait = 0f; duraWait2 = 1f; while (elaWait < duraWait2) { if (STOPYOUCUNT) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).transform.position = Vector2.op_Implicit(cached_position); break; } elaWait += BraveTime.DeltaTime; yield return null; } } private void M_aiActor_MovementModifiers(ref Vector2 volundaryVel, ref Vector2 involuntaryVel) { throw new NotImplementedException(); } public override BehaviorResult Update() { //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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) BehaviorResult val = ((BasicAttackBehavior)this).Update(); if ((int)val > 0) { return val; } if (!((AttackBehaviorBase)this).IsReady()) { return (BehaviorResult)0; } if (RequiresTarget && (Object)(object)base.m_behaviorSpeculator.TargetRigidbody == (Object)null) { return (BehaviorResult)0; } if (UseVfx && !string.IsNullOrEmpty(Vfx)) { ((BehaviorBase)this).m_aiAnimator.PlayVfx(Vfx, (Vector2?)null, (Vector2?)null, (Vector2?)null); } if (!((BehaviorBase)this).m_gameObject.activeSelf) { ((BehaviorBase)this).m_gameObject.SetActive(true); m_beganInactive = true; } if (Object.op_Implicit((Object)(object)base.m_behaviorSpeculator.TargetRigidbody)) { m_cachedTargetCenter = base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2); } if (ClearGoop) { SetGoopClearing(value: true); } state = State.Idle; if (!string.IsNullOrEmpty(ChargeAnimation)) { ((MonoBehaviour)((BehaviorBase)this).m_aiActor).StartCoroutine(Takeoff()); ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(ChargeAnimation, true, (string)null, -1f, false); state = State.WaitingForCharge; } else if (!string.IsNullOrEmpty(TellAnimation)) { if (!string.IsNullOrEmpty(TellAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilCancelled(TellAnimation, true, (string)null, -1f, false); } else { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(TellAnimation, true, (string)null, -1f, false); } state = State.WaitingForTell; if (HideGun && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiShooter)) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(false, "ShootBulletScript"); } } if (MoveSpeedModifier != 1f) { m_cachedMovementSpeed = ((BehaviorBase)this).m_aiActor.MovementSpeed; AIActor aiActor = ((BehaviorBase)this).m_aiActor; aiActor.MovementSpeed *= MoveSpeedModifier; } if (LockFacingDirection) { ((BehaviorBase)this).m_aiAnimator.FacingDirection = Vector2Extensions.ToAngle(base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2) - m_specRigidbody.GetUnitCenter((ColliderType)2)); ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = true; } if (PreventTargetSwitching && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { ((BehaviorBase)this).m_aiActor.SuppressTargetSwitch = true; } ((BehaviorBase)this).m_updateEveryFrame = true; if (OverrideBaseAnims && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiAnimator)) { if (!string.IsNullOrEmpty(OverrideIdleAnim)) { ((BehaviorBase)this).m_aiAnimator.OverrideIdleAnimation = OverrideIdleAnim; } if (!string.IsNullOrEmpty(OverrideMoveAnim)) { ((BehaviorBase)this).m_aiAnimator.OverrideMoveAnimation = OverrideMoveAnim; } } if (StopDuring == StopType.None || StopDuring == StopType.TellOnly) { return (BehaviorResult)3; } return (BehaviorResult)4; } public override ContinuousBehaviorResult ContinuousUpdate() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0230: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Invalid comparison between Unknown and I4 //IL_022a: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Invalid comparison between Unknown and I4 ((BehaviorBase)this).ContinuousUpdate(); if (Object.op_Implicit((Object)(object)base.m_behaviorSpeculator.TargetRigidbody)) { m_cachedTargetCenter = base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2); } if (state == State.WaitingForCharge) { if (((ChargeTime > 0f && m_chargeTimer <= 0f) || (ChargeTime <= 0f && !((BehaviorBase)this).m_aiAnimator.IsPlaying(ChargeAnimation))) && !string.IsNullOrEmpty(TellAnimation)) { ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(TellAnimation, true, (string)null, -1f, false); state = State.WaitingForTell; } return (ContinuousBehaviorResult)0; } if (state == State.WaitingForTell) { if (LockFacingDirection && ContinueAimingDuringTell && !m_isAimLocked && Object.op_Implicit((Object)(object)base.m_behaviorSpeculator.TargetRigidbody)) { ((BehaviorBase)this).m_aiAnimator.FacingDirection = Vector2Extensions.ToAngle(base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2) - m_specRigidbody.GetUnitCenter((ColliderType)2)); } if (!((BehaviorBase)this).m_aiAnimator.IsPlaying(TellAnimation)) { } return (ContinuousBehaviorResult)0; } if (state == State.Firing) { if (!JumpEnded) { return (ContinuousBehaviorResult)0; } WrapMode val = default(WrapMode); if (!string.IsNullOrEmpty(TellAnimation) && ((BehaviorBase)this).m_aiAnimator.IsPlaying(TellAnimation) && ((BehaviorBase)this).m_aiAnimator.GetWrapType(TellAnimation, ref val) && (int)val == 2) { return (ContinuousBehaviorResult)0; } if (!string.IsNullOrEmpty(FireAnimation) && ((BehaviorBase)this).m_aiAnimator.IsPlaying(FireAnimation) && ((BehaviorBase)this).m_aiAnimator.GetWrapType(FireAnimation, ref val) && (int)val == 2) { return (ContinuousBehaviorResult)0; } return (ContinuousBehaviorResult)1; } return (ContinuousBehaviorResult)1; } public override void EndContinuousUpdate() { ((BehaviorBase)this).EndContinuousUpdate(); CeaseFire(); ((MonoBehaviour)((BehaviorBase)this).m_aiActor).StartCoroutine(TakeOn()); if (ClearGoop) { SetGoopClearing(value: false); } if (HideGun && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiShooter)) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(true, "ShootBulletScript"); } if (!string.IsNullOrEmpty(ChargeAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(ChargeAnimation); } if (!string.IsNullOrEmpty(TellAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(TellAnimation); } if (!string.IsNullOrEmpty(FireAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(FireAnimation); } if (UseVfx && !string.IsNullOrEmpty(Vfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(Vfx); } if (UseVfx && !string.IsNullOrEmpty(ChargeVfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(ChargeVfx); } if (UseVfx && !string.IsNullOrEmpty(TellVfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(TellVfx); } if (UseVfx && !string.IsNullOrEmpty(FireVfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(FireVfx); } if (EnabledDuringAttack != null) { for (int i = 0; i < EnabledDuringAttack.Length; i++) { EnabledDuringAttack[i].SetActive(false); } } if (m_beganInactive) { ((Component)((BehaviorBase)this).m_aiAnimator).gameObject.SetActive(false); m_beganInactive = false; } if (MoveSpeedModifier != 1f) { ((BehaviorBase)this).m_aiActor.MovementSpeed = m_cachedMovementSpeed; } if (Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor) && StopDuring != 0 && ImmobileDuringStop) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).knockbackDoer.SetImmobile(false, "ShootBulletScript"); } if (LockFacingDirection) { ((BehaviorBase)this).m_aiAnimator.LockFacingDirection = false; } if (PreventTargetSwitching && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor)) { ((BehaviorBase)this).m_aiActor.SuppressTargetSwitch = false; } if (OverrideBaseAnims && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiAnimator)) { if (!string.IsNullOrEmpty(OverrideIdleAnim)) { ((BehaviorBase)this).m_aiAnimator.OverrideIdleAnimation = null; } if (!string.IsNullOrEmpty(OverrideMoveAnim)) { ((BehaviorBase)this).m_aiAnimator.OverrideMoveAnimation = null; } } ((BehaviorBase)this).m_updateEveryFrame = false; state = State.Idle; ((BasicAttackBehavior)this).UpdateCooldowns(); } public override void Init(GameObject gameObject, AIActor aiActor, AIShooter aiShooter) { ((BasicAttackBehavior)this).Init(gameObject, aiActor, aiShooter); m_specRigidbody = ((BraveBehaviour)base.m_behaviorSpeculator).specRigidbody; m_bulletBank = ((BraveBehaviour)base.m_behaviorSpeculator).bulletBank; } public override bool IsOverridable() { return !Uninterruptible; } private void Fire() { //IL_003b: 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) if (LockFacingDirection && ReaimOnFire && Object.op_Implicit((Object)(object)base.m_behaviorSpeculator.TargetRigidbody)) { ((BehaviorBase)this).m_aiAnimator.FacingDirection = Vector2Extensions.ToAngle(base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2) - m_specRigidbody.GetUnitCenter((ColliderType)2)); } if (!string.IsNullOrEmpty(FireAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimation(); ((BehaviorBase)this).m_aiAnimator.PlayUntilFinished(FireAnimation, false, (string)null, -1f, false); } if (UseVfx && !string.IsNullOrEmpty(FireVfx)) { ((BehaviorBase)this).m_aiAnimator.PlayVfx(FireVfx, (Vector2?)null, (Vector2?)null, (Vector2?)null); } SpawnProjectiles(); if (EnabledDuringAttack != null) { for (int i = 0; i < EnabledDuringAttack.Length; i++) { EnabledDuringAttack[i].SetActive(true); } } if (StopDuring == StopType.TellOnly && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor) && ImmobileDuringStop) { ((BraveBehaviour)((BehaviorBase)this).m_aiActor).knockbackDoer.SetImmobile(false, "ShootBulletScript"); } state = State.Firing; if (HideGun && Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiShooter)) { ((BehaviorBase)this).m_aiShooter.ToggleGunAndHandRenderers(false, "ShootBulletScript"); } } private void CeaseFire() { if (IsBulletScript && Object.op_Implicit((Object)(object)m_bulletSource) && !m_bulletSource.IsEnded) { m_bulletSource.ForceStop(); } } public override Vector2 GetOrigin(TargetAreaOrigin origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if ((int)origin == 1) { return Vector3Extensions.XY(ShootPoint.transform.position); } return ((BasicAttackBehavior)this).GetOrigin(origin); } private void SpawnProjectiles() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) if (IsBulletScript) { if (!Object.op_Implicit((Object)(object)m_bulletSource)) { m_bulletSource = GameObjectExtensions.GetOrAddComponent(ShootPoint); } m_bulletSource.BulletManager = m_bulletBank; m_bulletSource.BulletScript = BulletScript; m_bulletSource.Initialize(); } else { if (!IsSingleBullet) { return; } Entry bullet = m_bulletBank.GetBullet(BulletName); GameObject bulletObject = bullet.BulletObject; Vector2 val = m_cachedTargetCenter; if (Object.op_Implicit((Object)(object)base.m_behaviorSpeculator.TargetRigidbody)) { val = base.m_behaviorSpeculator.TargetRigidbody.GetUnitCenter((ColliderType)2); } float num; if (ShouldOverrideFireDirection) { num = OverrideFireDirection; } else { if (LeadAmount > 0f) { Vector2 value = Vector2.op_Implicit(ShootPoint.transform.position); float? num2 = ((!bullet.OverrideProjectile) ? null : new float?(bullet.ProjectileData.speed)); Projectile component = bulletObject.GetComponent(); Vector2 predictedTargetPosition = component.GetPredictedTargetPosition(val, base.m_behaviorSpeculator.TargetVelocity, (Vector2?)value, num2); val = Vector2.Lerp(val, predictedTargetPosition, LeadAmount); } Vector2 val2 = val - Vector3Extensions.XY(ShootPoint.transform.position); num = Mathf.Atan2(val2.y, val2.x) * 57.29578f; } GameObject val3 = m_bulletBank.CreateProjectileFromBank(Vector2.op_Implicit(ShootPoint.transform.position), num, BulletName, (string)null, false, true, false); if (m_bulletBank.OnProjectileCreatedWithSource != null) { m_bulletBank.OnProjectileCreatedWithSource(((Object)ShootPoint.transform).name, val3.GetComponent()); } ArcProjectile component2 = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.AdjustSpeedToHit(val); } } } public IEnumerator DoTrack() { Vector3 startsPosition = Vector2.op_Implicit(cached_position); GameObject obj = Object.Instantiate(ModularPrime.VFXObject, startsPosition, Quaternion.Euler(0f, 0f, 0f)); obj.GetComponent().Play("targetreticle_target"); obj.GetComponent().ShouldDoTilt = false; GameObjectExtensions.SetLayerRecursively(obj, LayerMask.NameToLayer("Unoccluded")); obj.AddComponent(); float i = 1f; float e = 0f; while (e < FlightTime) { float gjkgj = e - 0.25f; float t = Mathf.Min(1f, gjkgj / 4f); Vector3 centerPoint = startsPosition; float a = Vector2Extensions.ToAngle(((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank.PlayerPosition() - new Vector2(centerPoint.x, centerPoint.y)); Vector3 val = Vector2Extensions.ToVector3XUp(((BraveBehaviour)((BehaviorBase)this).m_aiActor).bulletBank.PlayerPosition(), 0f) - startsPosition; float playerDist = ((Vector3)(ref val)).magnitude; float dist3 = Mathf.Min(1f, Mathf.Min(12f, playerDist) / 40f); dist3 *= t; dist3 *= i; if (e > FlightTime - 0.5f) { float ads = e - (FlightTime - 0.5f); float t2 = ads / 0.5f; i = Mathf.Lerp(1f, 0f, Toolbox.SinLerpTValue(t2)); } startsPosition = centerPoint + Vector2Extensions.ToVector3ZUp(BraveMathCollege.DegreesToVector(a, dist3 * TrackingSpeedMultiplier), 0f); Vector3Extensions.WithZ(startsPosition, -10f); obj.transform.position = startsPosition; cached_position = Vector2.op_Implicit(startsPosition); controller.predictedPosition = startsPosition; e += BraveTime.DeltaTime; yield return null; } cached_position = Vector2.op_Implicit(startsPosition); obj.GetComponent().PlayAndDestroyObject("targetreticle_break", (Action)null); shitFart = true; ((BehaviorBase)this).EndContinuousUpdate(); } private void SetGoopClearing(bool value) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (!ClearGoop || !Object.op_Implicit((Object)(object)((BehaviorBase)this).m_aiActor) || !Object.op_Implicit((Object)(object)((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody)) { return; } if (value) { m_goopExceptionId = DeadlyDeadlyGoopManager.RegisterUngoopableCircle(((BraveBehaviour)((BehaviorBase)this).m_aiActor).specRigidbody.UnitCenter, 2f); return; } if (m_goopExceptionId != -1) { DeadlyDeadlyGoopManager.DeregisterUngoopableCircle(m_goopExceptionId); } m_goopExceptionId = -1; } private void BeginState(State state) { switch (state) { case State.WaitingForCharge: if (UseVfx && !string.IsNullOrEmpty(ChargeVfx)) { ((BehaviorBase)this).m_aiAnimator.PlayVfx(ChargeVfx, (Vector2?)null, (Vector2?)null, (Vector2?)null); } m_chargeTimer = ChargeTime; break; case State.WaitingForTell: if (UseVfx && !string.IsNullOrEmpty(TellVfx)) { ((BehaviorBase)this).m_aiAnimator.PlayVfx(TellVfx, (Vector2?)null, (Vector2?)null, (Vector2?)null); } m_isAimLocked = false; break; } } private void EndState(State state) { switch (state) { case State.WaitingForCharge: if (UseVfx && !string.IsNullOrEmpty(ChargeVfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(ChargeVfx); } break; case State.WaitingForTell: if (UseVfx && !string.IsNullOrEmpty(TellVfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(TellVfx); } if (OverrideBaseAnims) { if (!string.IsNullOrEmpty(OverrideIdleAnim)) { ((BehaviorBase)this).m_aiAnimator.OverrideIdleAnimation = OverrideIdleAnim; } if (!string.IsNullOrEmpty(OverrideMoveAnim)) { ((BehaviorBase)this).m_aiAnimator.OverrideMoveAnimation = OverrideMoveAnim; } if (!string.IsNullOrEmpty(TellAnimation)) { ((BehaviorBase)this).m_aiAnimator.EndAnimationIf(TellAnimation); } } break; case State.Firing: if (UseVfx && !string.IsNullOrEmpty(FireVfx)) { ((BehaviorBase)this).m_aiAnimator.StopVfx(FireVfx); } break; } } private void AnimEventTriggered(tk2dSpriteAnimator sprite, tk2dSpriteAnimationClip clip, int frameNum) { tk2dSpriteAnimationFrame frame = clip.GetFrame(frameNum); bool flag = state == State.WaitingForTell; if (MultipleFireEvents) { flag |= state == State.Firing; } if (LockFacingDirection && ContinueAimingDuringTell && frame.eventInfo == "stopAiming") { m_isAimLocked = true; } } } } namespace ModularMod.Code.Controllers { public class AdditionalShopItemController { public class AdditionalShopItemContext { public Func Condition; public Func> itemID; public Func offset; } public static List ShopItemContexts = new List(); public static void Init() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) new Hook((MethodBase)typeof(BaseShopController).GetMethod("DoSetup", BindingFlags.Instance | BindingFlags.NonPublic), typeof(AdditionalShopItemController).GetMethod("DoSetupHook")); } public static bool Cond(AdditionalShopType shopType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 return (int)shopType == 0 || (int)shopType == 7; } public static int ID() { return ModulePrinterCore.ModulePrinterCoreID; } public static Vector3 Offset(AdditionalShopType shopType) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) Vector3 result = default(Vector3); ((Vector3)(ref result))..ctor(0f, 0f); if ((int)shopType == 0) { ((Vector3)(ref result))..ctor(0.875f, 1.5f); } if ((int)shopType == 7) { ((Vector3)(ref result))..ctor(2.875f, -8.625f); } return result; } public static void DoSetupHook(Action orig, BaseShopController self) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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) orig(self); foreach (AdditionalShopItemContext shopItemContext in ShopItemContexts) { if (shopItemContext.Condition != null && shopItemContext.Condition(self.baseShopType) && shopItemContext.itemID != null && shopItemContext.offset != null) { GameObject gameObject = ((Component)PickupObjectDatabase.GetById(shopItemContext.itemID().First)).gameObject; GameObject val = new GameObject("Additional Shop Item(" + ((Object)gameObject).name + ")"); Transform transform = val.transform; GameObject val2 = new GameObject(); val2.transform.position = ((BraveBehaviour)self).transform.position + shopItemContext.offset(self.baseShopType); transform.position = val2.transform.position; transform.parent = val2.transform; EncounterTrackable component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { GameManager.Instance.ExtantShopTrackableGuids.Add(component.EncounterGuid); } float num = GameManager.Instance.GetLastLoadedLevelDefinition()?.priceMultiplier ?? 1f; ShopItemController val3 = val.AddComponent(); self.AssignItemFacing(val2.transform, val3); self.m_room.RegisterInteractable((IPlayerInteractable)(object)val3); if (shopItemContext.itemID().Second != -1) { val3.OverridePrice = (int)((float)shopItemContext.itemID().Second * num); } val3.Initialize(gameObject.GetComponent(), self); self.m_itemControllers.Add(val3); self.m_shopItems.Add(gameObject); self.m_room.RegisterInteractable((IPlayerInteractable)(object)val3); } } } } public class StuffedToy { public class Fumo_Dot_MP4 : DungeonPlaceableBehaviour, IPlayerInteractable, IPlaceConfigurable { public Transform talkPoint; public string PainSound; public string SpriteName_Def; public string SpriteName_Squish; public bool isDev = false; private bool isSquished; private static List ThankYous = new List { "Thanks for playing my mod!", "Thank you for playing Modular!", "Hope you enjoyed!", "Merry Christmas!", "Hope it was fun!", "Many thanks for giving this mod a try!" }; public void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) Vector3Extensions.GetAbsoluteRoom(TransformExtensions.PositionVector2(((BraveBehaviour)this).transform)).RegisterInteractable((IPlayerInteractable)(object)this); } public void ConfigureOnPlacement(RoomHandler room) { } public string GetAnimationState(PlayerController interactor, out bool shouldBeFlipped) { shouldBeFlipped = false; return string.Empty; } public float GetDistanceToPoint(Vector2 point) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)this).sprite == (Object)null) { return 100f; } Vector3 val = Vector2.op_Implicit(BraveMathCollege.ClosestPointOnRectangle(point, ((BraveBehaviour)this).specRigidbody.UnitBottomLeft, ((BraveBehaviour)this).specRigidbody.UnitDimensions)); return Vector2.Distance(point, Vector2.op_Implicit(val)) / 1.5f; } public float GetOverrideMaxDistance() { return -1f; } public void Interact(PlayerController interactor) { if (!isSquished) { ((MonoBehaviour)this).StartCoroutine(Squish(interactor)); } } private IEnumerator Squish(PlayerController interactor) { isSquished = true; AkSoundEngine.PostEvent(PainSound, ((Component)interactor).gameObject); AkSoundEngine.PostEvent("Play_ToySqueak", ((Component)interactor).gameObject); ((Component)this).GetComponent().SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(SpriteName_Squish)); float e2 = 0f; while (e2 < (isDev ? 1f : 0.5f)) { e2 += BraveTime.DeltaTime; yield return null; } ((Component)this).GetComponent().SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName(SpriteName_Def)); if (isDev) { string tetx = BraveUtility.RandomElement(ThankYous); DateTime date = DateTime.Now; if (tetx == "Merry Christmas!" && date.Day == 25 && date.Month == 12) { tetx = "Happy Halloween!"; } TextBoxManager.ShowTextBox(Vector2.op_Implicit(((BraveBehaviour)this).sprite.WorldCenter + new Vector2(1.25f, 1f)), ((Component)this).gameObject.transform, 2.5f, tetx, ShopAPI.ReturnVoiceBox((VoiceBoxes)3), false, (BoxSlideOrientation)0, true, false); e2 = 0f; while (e2 < 3f) { e2 += BraveTime.DeltaTime; yield return null; } } isSquished = false; } public void OnEnteredRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.white); } public void OnExitRange(PlayerController interactor) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SpriteOutlineManager.AddOutlineToSprite(((BraveBehaviour)this).sprite, Color.black); } } public static GameObject Fumo; public static GameObject Fumo_2; public static GameObject Fumo_3; public static void Init() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Modular_Fumo"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("module_fumo_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)121, (byte)234, byte.MaxValue, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 10f); val3.SetFloat("_EmissivePower", 10f); ((BraveBehaviour)val2).renderer.material = val3; Fumo_Dot_MP4 fumo_Dot_MP = val.AddComponent(); fumo_Dot_MP.PainSound = "Play_ToySqueak"; fumo_Dot_MP.SpriteName_Def = "module_fumo_001"; fumo_Dot_MP.SpriteName_Squish = "module_fumo_002"; val.CreateFastBody(IntVector2.Zero, IntVector2.Zero); Fumo = val; Init2(); Init3(); new Hook((MethodBase)typeof(Foyer).GetMethod("CheckHeroStatue", BindingFlags.Instance | BindingFlags.NonPublic), typeof(StuffedToy).GetMethod("CheckHeroStatueHook")); } public static void Init2() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Bunny_Fumo"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("me_1")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; ((BraveBehaviour)val2).renderer.material = new Material(StaticShaders.Default_Shader); Fumo_Dot_MP4 fumo_Dot_MP = val.AddComponent(); fumo_Dot_MP.PainSound = "Play_Suffering"; fumo_Dot_MP.SpriteName_Def = "me_1"; fumo_Dot_MP.SpriteName_Squish = "me_2"; val.CreateFastBody(IntVector2.Zero, IntVector2.Zero); fumo_Dot_MP.isDev = true; Fumo_2 = val; } public static void Init3() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabBuilder.BuildObject("Alt_Fumo"); tk2dSprite val2 = val.AddComponent(); ((tk2dBaseSprite)val2).Collection = StaticCollections.Past_Decorative_Object_Collection; ((tk2dBaseSprite)val2).SetSprite(StaticCollections.Past_Decorative_Object_Collection.GetSpriteIdByName("modulealt_fumo_001")); ((BraveBehaviour)val2).sprite.usesOverrideMaterial = true; Material val3 = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material); val3.mainTexture = ((BraveBehaviour)val2).renderer.material.mainTexture; val3.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)54, byte.MaxValue))); val3.SetFloat("_EmissiveColorPower", 5f); val3.SetFloat("_EmissivePower", 3f); ((BraveBehaviour)val2).renderer.material = val3; Fumo_Dot_MP4 fumo_Dot_MP = val.AddComponent(); fumo_Dot_MP.PainSound = "Play_ToySqueak"; fumo_Dot_MP.SpriteName_Def = "modulealt_fumo_001"; fumo_Dot_MP.SpriteName_Squish = "modulealt_fumo_002"; val.CreateFastBody(IntVector2.Zero, IntVector2.Zero); Fumo_3 = val; } public static void CheckHeroStatueHook(Action orig, Foyer foyer) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_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) orig(foyer); if (CanSpawnFumo1()) { Object.Instantiate(Fumo, new Vector3(32.125f, 30.5f, 35.125f), Quaternion.identity); } if (CanSpawnFumo2()) { Object.Instantiate(Fumo_3, new Vector3(31.125f, 31.5f, 35.125f), Quaternion.identity); } if (CanSpawnBnnuy()) { Object.Instantiate(Fumo_2, new Vector3(32.5f, 32.25f, 35.125f), Quaternion.identity); } } public static bool CanSpawnFumo1() { AdvancedGameStatsManager instance = AdvancedGameStatsManager.Instance; if (instance == null) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_FLOOR_3)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.PAST)) { return false; } return true; } public static bool CanSpawnFumo2() { AdvancedGameStatsManager instance = AdvancedGameStatsManager.Instance; if (instance == null) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_FLOOR_3)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.PAST)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.PAST_ALT_SKIN)) { return false; } return true; } public static bool CanSpawnBnnuy() { AdvancedGameStatsManager instance = AdvancedGameStatsManager.Instance; if (instance == null) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_FLOOR_3)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_DRAGUN_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_LICH_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_ADVANCED_DRAGUN_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_OLD_KING_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.BEAT_RAT_AS_MODULAR)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.PAST_ALT_SKIN)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.PAST)) { return false; } if (!instance.GetFlag(CustomDungeonFlags.PAST_MASTERY)) { return false; } return true; } } } namespace ModularMod.Code.Components { public class ExpandReticleRiserEffect : MonoBehaviour { private bool Stopped = false; public bool UpdateSpriteDefinitions; public string CurrentSpriteName; public int NumRisers; public float RiserHeight; public float RiseTime; private tk2dSprite m_sprite; private tk2dSprite[] m_risers; private float m_localElapsed; public ExpandReticleRiserEffect() { NumRisers = 4; RiserHeight = 1f; RiseTime = 1.5f; UpdateSpriteDefinitions = false; CurrentSpriteName = string.Empty; } private void Start() { m_sprite = ((Component)this).GetComponent(); ((tk2dBaseSprite)m_sprite).usesOverrideMaterial = true; m_risers = (tk2dSprite[])(object)new tk2dSprite[NumRisers]; for (int i = 0; i < NumRisers; i++) { GameObject val = Object.Instantiate(((Component)this).gameObject); Object.Destroy((Object)(object)val.GetComponent()); Object.Destroy((Object)(object)val.GetComponent()); ((BraveBehaviour)val.GetComponent()).renderer.material.shader = StaticShaders.TransparencyShader; m_risers[i] = val.GetComponent(); } OnSpawned(); } private void OnSpawned() { //IL_0048: 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) m_localElapsed = 0f; if (m_risers != null) { for (int i = 0; i < m_risers.Length; i++) { ((BraveBehaviour)m_risers[i]).transform.parent = ((Component)this).transform; ((BraveBehaviour)m_risers[i]).transform.localPosition = Vector3.zero; ((BraveBehaviour)m_risers[i]).transform.localRotation = Quaternion.identity; ((tk2dBaseSprite)m_risers[i]).usesOverrideMaterial = true; GameObjectExtensions.SetLayerRecursively(((Component)m_risers[i]).gameObject, LayerMask.NameToLayer("FG_Critical")); } } } public void Stop() { Stopped = true; for (int i = 0; i < m_risers.Count(); i++) { tk2dSprite val = m_risers[i]; if (Object.op_Implicit((Object)(object)val)) { ((MonoBehaviour)val).StartCoroutine(Zap(val)); } } } public IEnumerator Zap(tk2dSprite s) { if (!((Object)(object)s == (Object)null)) { float e = ((BraveBehaviour)s).renderer.material.GetFloat("_Fade"); while (e > 0f) { float y = Mathf.Lerp(0f, RiserHeight, e); ((BraveBehaviour)s).transform.localPosition = Vector3.zero; Transform transform = ((BraveBehaviour)s).transform; transform.position += Vector3Extensions.WithY(Vector3.zero, y * 0.66f); ((BraveBehaviour)s).renderer.material.SetFloat("_Fade", Mathf.Max(0f, 1f - e)); e += BraveTime.DeltaTime * 1.5f; yield return null; } Object.Destroy((Object)(object)((Component)s).gameObject); } } private void Update() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)m_sprite) || Stopped) { return; } m_localElapsed += BraveTime.DeltaTime; ((tk2dBaseSprite)m_sprite).ForceRotationRebuild(); ((tk2dBaseSprite)m_sprite).UpdateZDepth(); if (m_risers == null) { return; } for (int i = 0; i < m_risers.Length; i++) { if (UpdateSpriteDefinitions && !string.IsNullOrEmpty(CurrentSpriteName)) { ((tk2dBaseSprite)m_risers[i]).SetSprite(CurrentSpriteName); } float num = Mathf.Max(0f, m_localElapsed - RiseTime / (float)NumRisers * (float)i) % RiseTime / RiseTime; float num2 = Mathf.Lerp(0f, RiserHeight, num); ((BraveBehaviour)m_risers[i]).transform.localPosition = Vector3.zero; Transform transform = ((BraveBehaviour)m_risers[i]).transform; transform.position += Vector3Extensions.WithY(Vector3.zero, num2); ((tk2dBaseSprite)m_risers[i]).ForceRotationRebuild(); ((tk2dBaseSprite)m_risers[i]).UpdateZDepth(); ((BraveBehaviour)((BraveBehaviour)m_risers[i]).sprite).renderer.material.SetFloat("_Fade", Mathf.Max(0f, 1f - num)); if (UpdateSpriteDefinitions && !string.IsNullOrEmpty(CurrentSpriteName)) { ((tk2dBaseSprite)m_risers[i]).SetSprite(CurrentSpriteName); } } } } } namespace ModularMod.Code.Components.Projectile_Components { public class CritCancel : MonoBehaviour { } public class CriticalHitComponent : MonoBehaviour { public struct CritContext { public float CritChance; public float? CritChanceMultiplier; public Func CritChanceCalc; public float? CritDamageMultiplier; public float? CritDamageAddon; public Func CritDamageCalc; public bool? isGuaranteedCrit; public Func GuaranteedCritCalc; } public static ParticleSystem critParticles; public static GameObject SpawnEffect; public static GameObject DestroyEffect; public PlayerController player; public Projectile Projectile; private ParticleSystem particleObject; public Action OnCritProc; public Action OnCritFailed; public Action OnCritHitEnemy; public Action OnCritHitWall; public Action OnCritDestroyed; public float DamageMult; public List critContexts = new List(); private float S = 0.2f; private bool CanVFX = true; public Vector2 lastStoredPosition; private float DistTick = 0f; public static void Init() { critParticles = Module.ModularAssetBundle.LoadAsset("CritParticle").GetComponent(); PickupObject byId = PickupObjectDatabase.GetById(365); SpawnEffect = ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects.First().effects.First().effect; } public bool Process(bool nextShotCrit) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_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_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Expected O, but got Unknown //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Expected O, but got Unknown S = Mathf.Max(0.1f, 0.5f * ConfigManager.ImportantVFXIntensity.Value); Projectile = Projectile ?? ((Component)this).gameObject.GetComponent(); if ((Object)(object)Projectile == (Object)null) { return false; } ref PlayerController reference = ref player; GameActor owner = Projectile.Owner; reference = (PlayerController)(((object)((owner is PlayerController) ? owner : null)) ?? ((object)player)); lastStoredPosition = ((BraveBehaviour)Projectile).sprite.WorldCenter; float num = 0f; float num2 = 1.1f; bool flag = nextShotCrit; foreach (CritContext critContext in critContexts) { if (critContext.isGuaranteedCrit.GetValueOrDefault()) { flag = true; } num += critContext.CritChance; if (critContext.CritChanceMultiplier.HasValue) { num *= critContext.CritChanceMultiplier.Value; } if (critContext.GuaranteedCritCalc != null) { flag = critContext.GuaranteedCritCalc(num); } float num3 = num2; float? critDamageMultiplier = critContext.CritDamageMultiplier; num2 = num3 * critDamageMultiplier.GetValueOrDefault(1f); num2 += critContext.CritDamageAddon.GetValueOrDefault(); } foreach (CritContext critContext2 in critContexts) { if (critContext2.CritChanceCalc != null) { num = critContext2.CritChanceCalc(num); } if (critContext2.CritDamageCalc != null) { num2 = critContext2.CritDamageCalc(num2); } } if ((flag | (num > Random.value)) && (Object)(object)((Component)Projectile).gameObject.GetComponent() == (Object)null) { if (OnCritProc != null) { OnCritProc(Projectile, player); } GameObject val = SpawnManager.SpawnVFX(SpawnEffect, true); val.transform.position = Vector2.op_Implicit(((BraveBehaviour)Projectile).sprite.WorldCenter); val.GetComponent().HeightOffGround = 22f; Transform transform = val.transform; transform.localScale *= 0.3f; Object.Destroy((Object)(object)val, 1f); AkSoundEngine.PostEvent("Play_CriticalHit", ((Component)this).gameObject); Projectile.ignoreDamageCaps = true; ProjectileData baseData = Projectile.baseData; baseData.damage *= num2; ProjectileData baseData2 = Projectile.baseData; baseData2.speed *= 1.15f; ProjectileData baseData3 = Projectile.baseData; baseData3.force *= 1.5f; Projectile projectile = Projectile; projectile.PoisonApplyChance *= 1.3f; Projectile projectile2 = Projectile; projectile2.BleedApplyChance *= 1.3f; Projectile projectile3 = Projectile; projectile3.CharmApplyChance *= 1.3f; Projectile projectile4 = Projectile; projectile4.FireApplyChance *= 1.3f; Projectile projectile5 = Projectile; projectile5.FreezeApplyChance *= 1.3f; Projectile projectile6 = Projectile; projectile6.SpeedApplyChance *= 1.3f; Projectile projectile7 = Projectile; projectile7.CheeseApplyChance *= 1.3f; Projectile projectile8 = Projectile; projectile8.BlackPhantomDamageMultiplier *= 1.1f; Projectile.damagesWalls = true; Projectile projectile9 = Projectile; projectile9.BossDamageMultiplier *= 1.05f; Projectile.UpdateSpeed(); particleObject = ((Component)Object.Instantiate(critParticles)).GetComponent(); SpeculativeRigidbody specRigidbody = ((BraveBehaviour)Projectile).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)(OnPreRigidbodyCollisionDelegate)delegate(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { HandleHit(Projectile, otherRigidbody); }); SpeculativeRigidbody specRigidbody2 = ((BraveBehaviour)Projectile).specRigidbody; specRigidbody2.OnPreTileCollision = (OnPreTileCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody2.OnPreTileCollision, (Delegate?)(OnPreTileCollisionDelegate)delegate(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, Tile Tile, PixelCollider TilePixelCollider) { HandleHit(Projectile, null, Tile); }); return true; } if (OnCritFailed != null) { OnCritFailed(Projectile, player); } Object.Destroy((Object)(object)this); return false; } public void C() { CanVFX = true; } public void Start() { } private void HandleHit(Projectile projectile, SpeculativeRigidbody otherBody, Tile tile = null) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)projectile)) { if (ConfigManager.DoVisualEffect && CanVFX) { CanVFX = false; ((MonoBehaviour)this).Invoke("C", 1.25f); GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)Projectile).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.35f; Object.Destroy((Object)(object)val2, 2f); } if ((Object)(object)otherBody == (Object)null && tile != null && OnCritHitWall != null) { OnCritHitWall(Projectile, player, tile); } if ((Object)(object)otherBody != (Object)null && (Object)(object)((BraveBehaviour)otherBody).aiActor != (Object)null && !((BraveBehaviour)otherBody).healthHaver.IsDead && Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)otherBody).aiActor).behaviorSpeculator) && !((BraveBehaviour)otherBody).aiActor.IsHarmlessEnemy && OnCritHitEnemy != null) { OnCritHitEnemy(Projectile, player, ((BraveBehaviour)otherBody).aiActor); } } } public void OnDestroy() { if (Object.op_Implicit((Object)(object)particleObject)) { Object.Destroy((Object)(object)particleObject, 5f); } if (OnCritDestroyed != null) { OnCritDestroyed(Projectile, player); } } public void Update() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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) DistTick += (float)(int)Vector2.Distance(((BraveBehaviour)Projectile).sprite.WorldCenter, lastStoredPosition) / 1.5f; for (int i = 0; (float)i < DistTick; i++) { float num = (float)i / DistTick; if (S > Random.value) { Vector3 position = Vector3.Lerp(Vector2.op_Implicit(((BraveBehaviour)Projectile).sprite.WorldCenter), Vector2.op_Implicit(lastStoredPosition), num); ParticleSystem val = particleObject; EmitParams val2 = default(EmitParams); ((EmitParams)(ref val2)).position = position; ((EmitParams)(ref val2)).randomSeed = (uint)Random.Range(1, 1000); EmitParams val3 = val2; EmissionModule emission = val.emission; ((EmissionModule)(ref emission)).enabled = false; val.Emit(val3, 1); lastStoredPosition = ((BraveBehaviour)Projectile).sprite.WorldCenter; } DistTick -= 1f; } } } } namespace ModularMod.Code.Components.Misc_Components { public class GunMuncherGoSilly : MonoBehaviour { public GunberMuncherController muncherController; public int Jumps = 2; public Scrapper scrapper; private bool CanJump = true; private bool isMonologued = false; public void Start() { Random.Range(1, 5); } public void DoJump() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) if (!CanJump) { return; } scrapper.gunberMunchers.Remove(muncherController); Jumps--; RemoveIcon(); CanJump = false; if (Jumps == 0) { if (muncherController.RequiredNumberOfGuns == 2) { ((BraveBehaviour)muncherController).aiAnimator.PlayUntilFinished("activate", false, (string)null, -1f, false); ((MonoBehaviour)this).StartCoroutine(DoTalkGreen()); } else { ((MonoBehaviour)this).StartCoroutine(DoTalkRed()); } return; } RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)muncherController).transform.position); if (absoluteRoom.IsRegistered(((Component)muncherController).GetComponent())) { absoluteRoom.DeregisterInteractable(((Component)muncherController).GetComponent()); } ((MonoBehaviour)this).StartCoroutine(DoHop()); } public IEnumerator DoTalkGreen() { RoomHandler room = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)muncherController).transform.position); if (room.IsRegistered(((Component)muncherController).GetComponent())) { room.DeregisterInteractable(((Component)muncherController).GetComponent()); } float e9 = 0f; ((BraveBehaviour)muncherController).aiAnimator.PlayUntilFinished("activate", false, (string)null, -1f, false); ((Component)muncherController).GetComponent().ForceTimedSpeech("Ok I get it!", 0f, 2f, (BoxSlideOrientation)2); while (e9 < 2.2f) { e9 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)muncherController).aiAnimator.PlayUntilCancelled("idle", false, (string)null, -1f, false); ((Component)muncherController).GetComponent().ForceTimedSpeech("...", 0f, 2f, (BoxSlideOrientation)2); e9 = 0f; while (e9 < 2f) { e9 += BraveTime.DeltaTime; yield return null; } ((Component)muncherController).GetComponent().ForceTimedSpeech("How about...", 0f, 2f, (BoxSlideOrientation)2); e9 = 0f; while (e9 < 3f) { e9 += BraveTime.DeltaTime; yield return null; } ((Component)muncherController).GetComponent().ForceTimedSpeech("Heres what I'll do.", 0f, 2.5f, (BoxSlideOrientation)2); e9 = 0f; while (e9 < 3f) { e9 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)muncherController).aiAnimator.PlayUntilFinished("activate", false, (string)null, -1f, false); e9 = 0f; while (e9 < 6f) { e9 += BraveTime.DeltaTime; yield return null; } int amount = Random.Range(2, 6); for (int i = 0; i < amount; i++) { GameObject itemForPlayer = ((Component)PickupObjectDatabase.GetById(Scrap.Scrap_ID)).gameObject; tk2dBaseSprite component = itemForPlayer.GetComponent(); Vector2 b = Vector2.zero; if ((Object)(object)component != (Object)null) { Bounds bounds = component.GetBounds(); b = -1f * Vector3Extensions.XY(((Bounds)(ref bounds)).center); } DebrisObject debrisObject = LootEngine.SpawnItem(itemForPlayer, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldCenter + b), Vector2.down, 4f, true, false, false); debrisObject.bounceCount = 0; DebrisObject debrisObject2 = debrisObject; debrisObject2.OnGrounded = (Action)Delegate.Combine(debrisObject2.OnGrounded, new Action(muncherController.DoSteamOnGrounded)); } isMonologued = true; e9 = 0f; while (e9 < 1.25f) { e9 += BraveTime.DeltaTime; yield return null; } e9 = 0f; ((BraveBehaviour)muncherController).aiAnimator.PlayUntilFinished("activate", false, (string)null, -1f, false); ((Component)muncherController).GetComponent().ForceTimedSpeech("Now leave me alone.", 0f, 2f, (BoxSlideOrientation)2); while (e9 < 3f) { e9 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)muncherController).aiAnimator.PlayUntilCancelled("idle", false, (string)null, -1f, false); e9 = 0f; while (e9 < 2f) { e9 += BraveTime.DeltaTime; yield return null; } Vector3 currentPosition = ((Component)this).transform.position; Vector3 newPosition = ((Component)this).transform.position + Toolbox.GetUnitOnCircleVec3(BraveUtility.RandomAngle(), 30f); float Distance = Vector2.Distance(Vector2.op_Implicit(currentPosition), Vector2.op_Implicit(newPosition)); AkSoundEngine.PostEvent("Play_BOSS_doormimic_jump_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Play_ENM_blobulord_leap_01", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)muncherController).sprite.WorldCenter, 0.2f, 0.25f, 5f, 0.5f); ImprovedAfterImage afterImage = ((Component)muncherController).gameObject.AddComponent(); afterImage.dashColor = new Color(0.3f, 0.3f, 0.3f); afterImage.shadowLifetime = 1f; afterImage.shadowLifetime = 0.3f; e9 = 0f; GameObject obj = Object.Instantiate(VFXStorage.MachoBraceDustupVFX, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldBottomCenter), Quaternion.identity); Object.Destroy((Object)(object)obj, 3f); float d = Distance / 64f + 1f; while (e9 < d) { e9 += BraveTime.DeltaTime; Vector3 position2 = Vector2.op_Implicit(Vector2.Lerp(Vector2.op_Implicit(currentPosition), Vector2.op_Implicit(newPosition), e9 / d)); position2 += new Vector3(0f, Distance / 3f * Toolbox.SinLerpTValue(e9 / d)); ((BraveBehaviour)muncherController).transform.position = position2; yield return null; } Object.Destroy((Object)(object)((Component)this).gameObject); } public IEnumerator DoTalkRed() { TalkDoerLite talker = ((Component)muncherController).GetComponent(); RoomHandler room = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)muncherController).transform.position); if (room.IsRegistered(((Component)muncherController).GetComponent())) { room.DeregisterInteractable(((Component)muncherController).GetComponent()); } TextBoxManager.ShowTextBox(talker.speakPoint.position + new Vector3(0f, 0f, -4f), talker.speakPoint, 3f, ". . .", talker.audioCharacterSpeechTag, Object.op_Implicit((Object)(object)talker), (BoxSlideOrientation)2, false, false); float e5 = 0f; while (e5 < 3f) { e5 += BraveTime.DeltaTime; yield return null; } ((BraveBehaviour)muncherController).aiAnimator.PlayUntilFinished("activate", false, (string)null, -1f, false); e5 = 0f; while (e5 < 6f) { e5 += BraveTime.DeltaTime; yield return null; } GameObject itemForPlayer = ((Component)GlobalModuleStorage.ReturnRandomModule(Exclude_T4: false)).gameObject; tk2dBaseSprite component = itemForPlayer.GetComponent(); Vector2 b = Vector2.zero; if ((Object)(object)component != (Object)null) { Bounds bounds = component.GetBounds(); b = -1f * Vector3Extensions.XY(((Bounds)(ref bounds)).center); } DebrisObject debrisObject = LootEngine.SpawnItem(itemForPlayer, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldCenter + b), Vector2.down, 4f, true, false, false); debrisObject.bounceCount = 0; DebrisObject debrisObject2 = debrisObject; debrisObject2.OnGrounded = (Action)Delegate.Combine(debrisObject2.OnGrounded, new Action(muncherController.DoSteamOnGrounded)); isMonologued = true; e5 = 0f; while (e5 < 1f) { e5 += BraveTime.DeltaTime; yield return null; } TextBoxManager.ShowTextBox(talker.speakPoint.position + new Vector3(0f, 0f, -4f), talker.speakPoint, 2f, "Asshole.", talker.audioCharacterSpeechTag, Object.op_Implicit((Object)(object)talker), (BoxSlideOrientation)2, false, false); ((BraveBehaviour)muncherController).aiAnimator.PlayUntilCancelled("idle", false, (string)null, -1f, false); e5 = 0f; while (e5 < 2.5f) { e5 += BraveTime.DeltaTime; yield return null; } Vector3 currentPosition = ((Component)this).transform.position; Vector3 newPosition = ((Component)this).transform.position + Toolbox.GetUnitOnCircleVec3(BraveUtility.RandomAngle(), 30f); float Distance = Vector2.Distance(Vector2.op_Implicit(currentPosition), Vector2.op_Implicit(newPosition)); AkSoundEngine.PostEvent("Play_BOSS_doormimic_jump_01", ((Component)this).gameObject); AkSoundEngine.PostEvent("Play_ENM_blobulord_leap_01", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)muncherController).sprite.WorldCenter, 0.2f, 0.25f, 5f, 0.5f); ImprovedAfterImage afterImage = ((Component)muncherController).gameObject.AddComponent(); afterImage.dashColor = new Color(0.3f, 0.3f, 0.3f); afterImage.shadowLifetime = 1f; afterImage.shadowLifetime = 0.3f; e5 = 0f; GameObject obj = Object.Instantiate(VFXStorage.MachoBraceDustupVFX, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldBottomCenter), Quaternion.identity); Object.Destroy((Object)(object)obj, 3f); float d = Distance / 64f + 1f; while (e5 < d) { e5 += BraveTime.DeltaTime; Vector3 position2 = Vector2.op_Implicit(Vector2.Lerp(Vector2.op_Implicit(currentPosition), Vector2.op_Implicit(newPosition), e5 / d)); position2 += new Vector3(0f, Distance / 3f * Toolbox.SinLerpTValue(e5 / d)); ((BraveBehaviour)muncherController).transform.position = position2; yield return null; } Object.Destroy((Object)(object)((Component)this).gameObject); } public void RemoveIcon() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)muncherController).transform.position); List value = new List(); Dictionary> roomToIconsMap = Minimap.Instance.roomToIconsMap; if (!roomToIconsMap.ContainsKey(absoluteRoom)) { return; } roomToIconsMap.TryGetValue(absoluteRoom, out value); if (value == null || value.Count <= 0) { return; } for (int i = 0; i < value.Count; i++) { if (((Object)value[i]).name.ToLower().Contains("muncher")) { Minimap.Instance.DeregisterRoomIcon(absoluteRoom, value[i]); break; } } } public IEnumerator DoHop() { TalkDoerLite talker = ((Component)muncherController).GetComponent(); TextBoxManager.ShowTextBox(talker.speakPoint.position + new Vector3(0f, 0f, -4f), talker.speakPoint, 2f, "...", talker.audioCharacterSpeechTag, Object.op_Implicit((Object)(object)talker), (BoxSlideOrientation)2, false, false); float e1 = 0f; while (e1 < 2.25f) { e1 += BraveTime.DeltaTime; yield return null; } CanJump = true; scrapper.gunberMunchers.Add(muncherController); } public void OnDestroy() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(VFXStorage.TelefragVFX, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldCenter), Quaternion.identity); if (isMonologued) { return; } Bounds bounds; if (muncherController.RequiredNumberOfGuns == 2) { GameObject gameObject = ((Component)PickupObjectDatabase.GetById(CraftingCore.CraftingCoreID)).gameObject; tk2dBaseSprite component = gameObject.GetComponent(); Vector2 val = Vector2.zero; if ((Object)(object)component != (Object)null) { bounds = component.GetBounds(); val = -1f * Vector3Extensions.XY(((Bounds)(ref bounds)).center); } DebrisObject val2 = LootEngine.SpawnItem(gameObject, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldCenter + val), Vector2.down, 4f, true, false, false); val2.bounceCount = 0; DebrisObject val3 = val2; val3.OnGrounded = (Action)Delegate.Combine(val3.OnGrounded, new Action(muncherController.DoSteamOnGrounded)); } else { GameObject gameObject2 = ((Component)GlobalModuleStorage.ReturnRandomModule(Exclude_T4: false)).gameObject; tk2dBaseSprite component2 = gameObject2.GetComponent(); Vector2 val4 = Vector2.zero; if ((Object)(object)component2 != (Object)null) { bounds = component2.GetBounds(); val4 = -1f * Vector3Extensions.XY(((Bounds)(ref bounds)).center); } DebrisObject val5 = LootEngine.SpawnItem(gameObject2, Vector2.op_Implicit(((BraveBehaviour)muncherController).sprite.WorldCenter + val4), Vector2.down, 4f, true, false, false); val5.bounceCount = 0; DebrisObject val6 = val5; val6.OnGrounded = (Action)Delegate.Combine(val6.OnGrounded, new Action(muncherController.DoSteamOnGrounded)); } } } } namespace ModularMod.Code.Collectibles.Guns.Gravity_Pulsar { internal class GravityPulsarLargeProjectile : MonoBehaviour { private bool isIterated = false; private Material m_distortMaterial; public float e = 0f; public float e_ = 0f; private bool isOomfing = false; public float damageRadius; public float gravitationalForce; public float radius; private float radiusSquared; private PlayerController Player; private Projectile projectile; public GravityPulsarLargeProjectile() { damageRadius = 7f; gravitationalForce = 25f; radius = 40f; radiusSquared = radius * radius; } public void Start() { //IL_0053: 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_0093: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) projectile = ((Component)this).GetComponent(); ref PlayerController player = ref Player; GameActor owner = projectile.Owner; player = (PlayerController)(object)((owner is PlayerController) ? owner : null); if ((Object)(object)projectile != (Object)null) { AkSoundEngine.PostEvent("Play_WPN_blackhole_loop_01", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)projectile).sprite.WorldCenter, 3f * ConfigManager.DistortionWaveMultiplier, 0.1f * ConfigManager.DistortionWaveMultiplier, 30f, 0.5f); m_distortMaterial = new Material(ShaderCache.Acquire("Brave/Internal/DistortionRadius")); m_distortMaterial.SetFloat("_Strength", 0f); m_distortMaterial.SetFloat("_TimePulse", 0.2f); m_distortMaterial.SetFloat("_RadiusFactor", 0.15f); m_distortMaterial.SetVector("_WaveCenter", GetCenterPointInScreenUV(((BraveBehaviour)projectile).sprite.WorldCenter)); Pixelator.Instance.RegisterAdditionalRenderPass(m_distortMaterial); StickyProjectileModifier component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.OnPreStick = (Action)Delegate.Combine(component.OnPreStick, new Action(OPS)); } if ((Object)(object)Player != (Object)null && IteratedDesign.PlayerHasIteratedDesign(Player) > 0) { gravitationalForce *= 0.75f; radius *= 2f; isIterated = true; ProjectileData baseData = projectile.baseData; baseData.speed *= 0.5f; projectile.UpdateSpeed(); } } } public void OPS(GameObject proj, PlayerController player) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) ((BraveBehaviour)projectile).spriteAnimator.Stop(); ((BraveBehaviour)projectile).sprite.SetSprite(StaticCollections.Projectile_Collection, StaticCollections.Projectile_Collection.GetSpriteIdByName("fwoomp_start_002")); AkSoundEngine.PostEvent("Stop_WPN_blackhole_loop_01", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)projectile).sprite.WorldCenter, 5f * ConfigManager.DistortionWaveMultiplier, 0.2f * ConfigManager.DistortionWaveMultiplier, 20f, 0.5f); if ((Object)(object)Pixelator.Instance != (Object)null && (Object)(object)m_distortMaterial != (Object)null) { Pixelator.Instance.DeregisterAdditionalRenderPass(m_distortMaterial); } Object.Destroy((Object)(object)this); } private Vector4 GetCenterPointInScreenUV(Vector2 centerPoint) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = GameManager.Instance.MainCameraController.Camera.WorldToViewportPoint(Vector2Extensions.ToVector3ZUp(centerPoint, 0f)); return new Vector4(val.x, val.y, 0f, 0f); } public void OnDestroy() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("Stop_WPN_blackhole_loop_01", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)projectile).sprite.WorldCenter, 2f * ConfigManager.DistortionWaveMultiplier, 0.1f * ConfigManager.DistortionWaveMultiplier, 40f, 0.3f); if ((Object)(object)Pixelator.Instance != (Object)null && (Object)(object)m_distortMaterial != (Object)null) { Pixelator.Instance.DeregisterAdditionalRenderPass(m_distortMaterial); } } public void Update() { //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if (e < 1f) { e += BraveTime.DeltaTime; m_distortMaterial.SetFloat("_Strength", -755f * e); } if (isIterated) { e_ += BraveTime.DeltaTime; if (e_ > 2.75f) { e_ = -0.25f; if (!isOomfing) { AkSoundEngine.PostEvent("Play_ITM_Macho_Brace_Trigger_01", ((Component)this).gameObject); Exploder.DoDistortionWave(((BraveBehaviour)projectile).sprite.WorldCenter, 0.5f * ConfigManager.DistortionWaveMultiplier, 0.25f * ConfigManager.DistortionWaveMultiplier, 50f, 0.5f); isOomfing = true; } } else { isOomfing = false; } } if (!((Object)(object)projectile != (Object)null)) { return; } if ((Object)(object)m_distortMaterial != (Object)null) { m_distortMaterial.SetVector("_WaveCenter", GetCenterPointInScreenUV(((BraveBehaviour)projectile).sprite.WorldCenter)); } for (int i = 0; i < StaticReferenceManager.AllProjectiles.Count; i++) { if (((Component)StaticReferenceManager.AllProjectiles[i]).gameObject.activeSelf && ((Behaviour)StaticReferenceManager.AllProjectiles[i]).enabled) { AdjustRigidbodyVelocity(((BraveBehaviour)StaticReferenceManager.AllProjectiles[i]).specRigidbody); } } } private bool AdjustRigidbodyVelocity(SpeculativeRigidbody other) { //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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) Vector2 val = other.UnitCenter - ((BraveBehaviour)projectile).specRigidbody.UnitCenter; float num = Vector2.SqrMagnitude(val); if (num < radiusSquared) { float g = gravitationalForce; Vector2 velocity = other.Velocity; Projectile val2 = ((BraveBehaviour)other).projectile; if (Object.op_Implicit((Object)(object)val2)) { if ((Object)(object)((Component)other).GetComponent() != (Object)null) { return false; } if ((Object)(object)((Component)other).GetComponent() == (Object)null) { return false; } if ((Object)(object)((Component)other).GetComponent() != (Object)null) { return false; } if (velocity == Vector2.zero) { return false; } g = gravitationalForce; } if (val2.Owner is PlayerController) { Vector2 frameAccelerationForRigidbody = GetFrameAccelerationForRigidbody(other.UnitCenter, Mathf.Sqrt(num), g); float num2 = Mathf.Clamp(BraveTime.DeltaTime, 0f, 0.02f); Vector2 val3 = frameAccelerationForRigidbody * num2; Vector2 val4 = velocity + val3; if (BraveTime.DeltaTime > 0.02f) { val4 *= 0.02f / BraveTime.DeltaTime; } other.Velocity = val4; if ((Object)(object)val2 != (Object)null && val4 != Vector2.zero) { val2.Direction = ((Vector2)(ref val4)).normalized; val2.Speed = ((!isIterated) ? Mathf.Max(13f, ((Vector2)(ref val4)).magnitude) : ((e_ < 0f) ? (((Vector2)(ref val4)).magnitude * 1f + 370f * Time.deltaTime) : (((Vector2)(ref val4)).magnitude * 1f - 60f * Time.deltaTime))); other.Velocity = val2.Direction * val2.Speed; if (val2.shouldRotate && (val4.x != 0f || val4.y != 0f)) { float num3 = BraveMathCollege.Atan2Degrees(val2.Direction); if (!float.IsNaN(num3) && !float.IsInfinity(num3)) { Quaternion val5 = Quaternion.Euler(0f, 0f, num3); if (!float.IsNaN(val5.x) && !float.IsNaN(val5.y)) { ((BraveBehaviour)val2).transform.rotation = val5; } } } } } return true; } return false; } private Vector2 GetFrameAccelerationForRigidbody(Vector2 unitCenter, float currentDistance, float g) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) Vector2 zero = Vector2.zero; float num = Mathf.Clamp01(1f - currentDistance / radius); float num2 = g * num * num; Vector2 val = ((BraveBehaviour)projectile).specRigidbody.UnitCenter - unitCenter; Vector2 normalized = ((Vector2)(ref val)).normalized; return normalized * num2 * 9f; } } internal class GravityPulsarSmallProjectile : MonoBehaviour { } } namespace ModularMod.Code.Collectibles.Guns.Update_3 { public class TurretComponent : MonoBehaviour { public static int MaxTurrets = 3; public static List turrets = new List(); private Projectile projectile; private ModularGunController gunController; private PlayerController Owner; public string PrimeAnimation = "turretactive"; public Material materialToCopy; public static Projectile projectileToFire; public static Projectile projectileToFireAlt; public bool Procced = false; public bool Active = false; private Vector2 PreStopDirection; public tk2dTiledSprite LaserSightInst; public Vector2 Direction; public tk2dSpriteAnimator Animator; public GameObject muzzleFlashPrefab; private AIActor AIActor; public int Reloads; private bool b; private int currentClip; private float currentAttackCooldown; private float currentReload; public float AttackCooldown => gunController.GetRateOfFire(0.333f); public int Clip => (int)((float)gunController.GetClipSize(12) * Owner.stats.GetStatValue((StatType)16)); public float Accuracy => gunController.GetAccuracy(13f) * Owner.stats.GetStatValue((StatType)2); public float Reload => gunController.GetReload(3f); public float GetMaxTurrets() { int maxTurrets = MaxTurrets; maxTurrets += Owner.PlayerActiveModuleCount(IteratedDesign.ID); int num = ((!((Object)(object)gunController != (Object)null)) ? 1 : gunController.gun.modifiedVolley.projectiles.Count()); return ((num == 1) ? maxTurrets : (maxTurrets - 1)) * num; } public void Start() { projectile = ((Component)this).GetComponent(); GameActor owner = projectile.Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.PlayerHasCore() == (Object)null)) { gunController = val.PlayerHasCore().ModularGunController; StickyProjectileModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)projectile).gameObject); orAddComponent.stickyContexts.Add(new StickyProjectileModifier.StickyContext { CanStickToTerrain = true }); orAddComponent.OnPreStick = (Action)Delegate.Combine(orAddComponent.OnPreStick, new Action(OPS)); orAddComponent.OnStickToWall = (Action)(object)Delegate.Combine((Delegate?)(object)orAddComponent.OnStickToWall, (Delegate?)(object)new Action(OnStickToWall)); Owner = val; } } public void OPS(GameObject projectileObject, 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) PreStopDirection = projectileObject.GetComponent().Direction; } public void OnStickToWall(GameObject gameObject, StickyProjectileModifier modifier, tk2dBaseSprite sprite, PlayerController owner, Tile t) { //IL_0166: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gameObject == (Object)null) { return; } if (t == null) { Object.Destroy((Object)(object)gameObject); return; } Animator = gameObject.GetComponentInChildren(); if ((Object)(object)Animator == (Object)null) { Object.Destroy((Object)(object)gameObject); } else { if (Procced) { return; } turrets.Add(this); int num = 60; if ((float)turrets.Count > GetMaxTurrets()) { while ((float)turrets.Count > GetMaxTurrets() && num > 0) { if ((Object)(object)((Component)turrets.First()).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)turrets.First()).gameObject); } turrets.Remove(turrets.First()); num--; } } if (num == 0) { Debug.LogWarning((object)"[MDL] TURRET FAILSAFE TRIPPED, THIS REALLY SHOULDN'T HAPPEN."); } Procced = true; Animator.Play(PrimeAnimation); ((BraveBehaviour)Animator).sprite.usesOverrideMaterial = true; ((BraveBehaviour)((BraveBehaviour)Animator).sprite).renderer.material = materialToCopy; Vector2 normal; Vector2 val = TransformExtensions.PositionVector2(gameObject.transform).ToNearestWall(out normal, Vector2Extensions.ToAngle(PreStopDirection)); float nearestAngle = BraveMathCollege.GetNearestAngle(Vector2Extensions.ToAngle(TransformExtensions.PositionVector2(gameObject.transform) - val), new float[4] { 0f, 90f, 180f, 270f }); gameObject.GetComponentInChildren().Reinitialize(); GameObject val2 = Object.Instantiate(VFXStorage.LaserReticle, gameObject.transform.position, Quaternion.identity); tk2dTiledSprite component = val2.GetComponent(); ((BraveBehaviour)component).transform.position = Vector2.op_Implicit(normal); ((BraveBehaviour)component).transform.localRotation = Quaternion.Euler(0f, 0f, nearestAngle); component.dimensions = new Vector2(1f, 1f); ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).ShouldDoTilt = false; Direction = Toolbox.GetUnitOnCircle(nearestAngle, 0.25f); LaserSightInst = component; ((MonoBehaviour)component).StartCoroutine(LaserSight()); Object.Destroy((Object)(object)((Component)this).gameObject, 180f); AkSoundEngine.PostEvent("Play_BOSS_mineflayer_trigger_01", ((Component)this).gameObject); if (Owner.IsInCombat && Owner.CurrentRoom != null) { RoomHandler currentRoom = Owner.CurrentRoom; currentRoom.OnEnemiesCleared = (Action)Delegate.Combine(currentRoom.OnEnemiesCleared, new Action(RoomCleared)); } } } public IEnumerator LaserSight() { float e = 0f; while (e < 1f) { ((BraveBehaviour)LaserSightInst).renderer.enabled = e % 0.25f > 0.125f; e += BraveTime.DeltaTime; yield return null; } AkSoundEngine.PostEvent("Play_OBJ_metroid_roll_01", ((Component)this).gameObject); ((BraveBehaviour)LaserSightInst).renderer.enabled = true; Active = true; } public void RoomCleared() { Object.Destroy((Object)(object)((Component)this).gameObject); } public void OnDestroy() { if ((Object)(object)Owner != (Object)null && Owner.CurrentRoom != null) { RoomHandler currentRoom = Owner.CurrentRoom; currentRoom.OnEnemiesCleared = (Action)Delegate.Remove(currentRoom.OnEnemiesCleared, new Action(RoomCleared)); } if (turrets.Contains(this)) { turrets.Remove(this); } if ((Object)(object)LaserSightInst != (Object)null) { Object.Destroy((Object)(object)((Component)LaserSightInst).gameObject); } } public Vector3 GetPointTowards() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (!BraveInput.GetInstanceForPlayer(Owner.PlayerIDX).IsKeyboardAndMouse(false)) { if ((Object)(object)AIActor == (Object)null) { AIActor = GetSimplifiedNewTarget(); if ((Object)(object)AIActor == (Object)null) { return Vector2.op_Implicit(Direction); } return ((Component)this).transform.position - ((BraveBehaviour)AIActor).transform.position; } return ((Component)this).transform.position - ((BraveBehaviour)AIActor).transform.position; } BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(Owner.PlayerIDX); return Owner.unadjustedAimPoint - ((Component)this).transform.position; } private AIActor GetSimplifiedNewTarget() { List list = new List(); RoomHandler currentRoom = Owner.CurrentRoom; if (currentRoom != null) { currentRoom.GetActiveEnemies((ActiveEnemyType)0, ref list); } if (list == null) { return null; } if (list.Count == 0) { return null; } list.RemoveAll((AIActor self) => (int)self.State != 2); list.RemoveAll((AIActor self) => (Object)(object)((BraveBehaviour)self).specRigidbody == (Object)null); list = list.OrderByDescending((AIActor self) => ((BraveBehaviour)self).healthHaver.currentHealth).ToList(); if (list.Count == 0) { return null; } list.RemoveAll((AIActor self) => ((BraveBehaviour)self).healthHaver.IsDead); list.RemoveAll((AIActor self) => !((BraveBehaviour)self).healthHaver.vulnerable); list.RemoveAll((AIActor self) => ((BraveBehaviour)self).spriteAnimator.QueryInvulnerabilityFrame()); if (list.Count == 0) { return null; } AIActor result = null; if (list.Count == 1) { return list[0]; } return result; } public void Update() { //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Invalid comparison between Unknown and I4 //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Invalid comparison between Unknown and I4 //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) if (Reloads == 0) { Object.Destroy((Object)(object)((Component)this).gameObject); } IncrementAllTimers(); if (!Procced || (Object)(object)LaserSightInst == (Object)null) { return; } if (CanAttack()) { Func func = (SpeculativeRigidbody otherRigidbody) => Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable) && !((BraveBehaviour)otherRigidbody).minorBreakable.stopsBullets; float num = 0f; int num2 = CollisionMask.LayerToMask((CollisionLayer)6, (CollisionLayer)8, (CollisionLayer)2, (CollisionLayer)12, (CollisionLayer)3); Vector2 val = Direction; if (Owner.PlayerHasActiveModule(IteratedDesign.ID)) { Vector2 val2 = val; Vector3 pointTowards = GetPointTowards(); val = Vector2.MoveTowards(val2, Vector2.op_Implicit(((Vector3)(ref pointTowards)).normalized), 0.1f * BraveTime.DeltaTime); } Direction = val; RaycastResult val3 = default(RaycastResult); if (PhysicsEngine.Instance.Raycast(((BraveBehaviour)Animator).sprite.WorldCenter + ((Vector2)(ref Direction)).normalized, Direction, 1000f, ref val3, true, true, num2, (CollisionLayer?)null, false, func, (SpeculativeRigidbody)null)) { num = val3.Distance; if (((CastResult)val3).OtherPixelCollider != null) { bool flag = (int)((CastResult)val3).OtherPixelCollider.CollisionLayer == 2 || (int)((CastResult)val3).OtherPixelCollider.CollisionLayer == 3; if (Active && flag) { AkSoundEngine.PostEvent("Play_WPN_sniperrifle_shot_01", ((Component)this).gameObject); GameObject val4 = SpawnManager.SpawnVFX(muzzleFlashPrefab, true); val4.transform.position = Vector2.op_Implicit(((BraveBehaviour)Animator).sprite.WorldCenter); val4.transform.localRotation = Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(Direction)); val4.GetComponent().HeightOffGround = 22f; Object.Destroy((Object)(object)val4, 2f); ResetAttackCooldown(); GameObject val5 = SpawnManager.SpawnProjectile(gunController.isAlt ? ((Component)projectileToFireAlt).gameObject : ((Component)projectileToFire).gameObject, Vector2.op_Implicit(((BraveBehaviour)Animator).sprite.WorldCenter), Quaternion.Euler(0f, 0f, Vector2Extensions.ToAngle(Direction) + Random.Range(0f - Accuracy, Accuracy)), true); Projectile component = val5.GetComponent(); if ((Object)(object)component != (Object)null) { component.Owner = (GameActor)(object)Owner; component.Shooter = ((BraveBehaviour)Owner).specRigidbody; component.IgnoreTileCollisionsFor(0.5f); Owner.DoPostProcessProjectile(component); } currentClip--; if (currentClip == 0) { b = false; ResetReload(); ResetClip(); Reloads--; } } } } RaycastResult.Pool.Free(ref val3); ((BraveBehaviour)LaserSightInst).transform.rotation = Quaternion.Euler(0f, 0f, Toolbox.ToAngle(Direction)); LaserSightInst.dimensions = new Vector2(num * 16f, 1f); } ((BraveBehaviour)LaserSightInst).transform.position = Vector2.op_Implicit(((BraveBehaviour)Animator).sprite.WorldCenter + Direction); ((BraveBehaviour)LaserSightInst).renderer.enabled = !(currentReload > 0f) && !(currentAttackCooldown > 0.05f); } public bool CanAttack() { if (currentAttackCooldown > 0f || currentReload > 0f) { return false; } return true; } public void IncrementAllTimers() { if (currentAttackCooldown > 0f) { currentAttackCooldown -= BraveTime.DeltaTime; } else if (!b) { b = true; AkSoundEngine.PostEvent("Play_OBJ_metroid_roll_01", ((Component)this).gameObject); } if (currentReload > 0f) { currentReload -= BraveTime.DeltaTime; } } public void ResetClip() { currentClip = Clip; } public void ResetReload() { currentReload = Reload / Owner.stats.GetStatValue((StatType)10); } public void ResetAttackCooldown() { currentAttackCooldown = AttackCooldown / Owner.stats.GetStatValue((StatType)1); } public TurretComponent() { ref GameObject reference = ref muzzleFlashPrefab; PickupObject byId = PickupObjectDatabase.GetById(370); reference = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect; Reloads = 15; b = false; currentClip = 10; currentAttackCooldown = 0.333f; currentReload = 0f; ((MonoBehaviour)this)..ctor(); } } public class InvalidForCube : MonoBehaviour { } public class ShieldEater : MonoBehaviour { private Projectile projectile; public int Damage = 3; public void Start() { projectile = ((Component)this).GetComponent(); projectile.baseData.force = 0f; } } public class ShieldBlock : MonoBehaviour { private Projectile projectile; public PlayerController Player; public float Range = 0.875f; public float e = 0f; public float e1 = 0f; public bool isAlt = false; private Dictionary ProjectilesPositions = new Dictionary(); public void Start() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown projectile = ((Component)this).GetComponent(); SpeculativeRigidbody specRigidbody = ((BraveBehaviour)projectile).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OnPreCollision)); projectile.baseData.force = 0f; ref PlayerController player = ref Player; GameActor owner = projectile.Owner; player = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (CheckModule()) { ProjectileData baseData = projectile.baseData; baseData.speed *= 0.8f; projectile.UpdateSpeed(); Projectile obj = projectile; obj.projectileHitHealth += 10; } } public void Update() { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) if (e < 0.2f) { e += BraveTime.DeltaTime; } if (e1 < 1f) { e1 += BraveTime.DeltaTime; } List list = ProjectilesPositions.Keys.ToList(); List list2 = ProjectilesPositions.Values.ToList(); for (int num = ProjectilesPositions.Count - 1; num > -1; num--) { if ((Object)(object)list[num] == (Object)null) { ProjectilesPositions.Remove(list[num]); } else { ((Component)list[num]).gameObject.transform.position = Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter + list2[num]); ((BraveBehaviour)list[num]).specRigidbody.Reinitialize(); } } } public bool CheckModule() { if (Player.PlayerHasActiveModule(IteratedDesign.ID)) { return true; } return false; } protected virtual void OnPreCollision(SpeculativeRigidbody myRigidbody, PixelCollider myCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherCollider) { //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_061b: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) bool flag = CheckModule(); if ((Object)(object)((BraveBehaviour)otherRigidbody).projectile == (Object)null) { return; } ShieldEater component = ((Component)((BraveBehaviour)otherRigidbody).projectile).GetComponent(); ShieldBlock component2 = ((Component)((BraveBehaviour)otherRigidbody).projectile).GetComponent(); InvalidForCube component3 = ((Component)((BraveBehaviour)otherRigidbody).projectile).GetComponent(); if ((Object)(object)component3 != (Object)null) { PhysicsEngine.SkipCollision = true; return; } if ((Object)(object)component2 != (Object)null) { if (e1 > (flag ? 0.65f : 0.95f)) { ProjectileData baseData = projectile.baseData; baseData.damage += (float)((!flag) ? 1 : 2); ProjectileData baseData2 = projectile.baseData; baseData2.speed *= 1.3f; projectile.UpdateSpeed(); projectile.ResetDistance(); e1 = 0f; ProjectileData baseData3 = component2.projectile.baseData; baseData3.damage += 0.5f; ProjectileData baseData4 = component2.projectile.baseData; baseData4.damage *= 1.05f; ProjectileData baseData5 = component2.projectile.baseData; baseData5.speed *= 1.3f; component2.projectile.UpdateSpeed(); component2.projectile.ResetDistance(); component2.e1 = 0f; projectile.Direction = Vector2.op_Implicit(Toolbox.GetUnitOnCircleVec3(BraveUtility.RandomAngle(), 1f)); component2.projectile.Direction = Vector2.op_Implicit(Toolbox.GetUnitOnCircleVec3(BraveUtility.RandomAngle(), 1f)); AkSoundEngine.PostEvent("Play_ENM_bullat_tackle_01", ((Component)this).gameObject); if (ConfigManager.DoVisualEffect) { GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.15f; Object.Destroy((Object)(object)val2, 2f); } } PhysicsEngine.SkipCollision = true; return; } if (((BraveBehaviour)otherRigidbody).projectile.Owner is PlayerController && (Object)(object)component == (Object)null) { PhysicsEngine.SkipCollision = true; return; } bool flag2 = (Object)(object)component != (Object)null; if (!(((BraveBehaviour)otherRigidbody).projectile.Owner is AIActor || flag2)) { return; } PhysicsEngine.SkipCollision = true; if (ProjectilesPositions.ContainsKey(((BraveBehaviour)otherRigidbody).projectile)) { return; } if (e < 0.2f) { e += BraveTime.DeltaTime; return; } e = 0f; if (projectile.projectileHitHealth < 1) { projectile.DieInAir(false, true, true, false); return; } Projectile obj = projectile; obj.projectileHitHealth -= ((!flag2) ? 1 : component.Damage); ((BraveBehaviour)otherRigidbody).projectile.RemoveBulletScriptControl(); ((BraveBehaviour)otherRigidbody).projectile.allowSelfShooting = false; if (Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).projectile.Owner) && Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)otherRigidbody).projectile.Owner).specRigidbody)) { ((BraveBehaviour)((BraveBehaviour)otherRigidbody).projectile).specRigidbody.DeregisterSpecificCollisionException(((BraveBehaviour)((BraveBehaviour)otherRigidbody).projectile.Owner).specRigidbody); } if (flag2) { foreach (KeyValuePair projectilesPosition in ProjectilesPositions) { if ((Object)(object)projectilesPosition.Key != (Object)null) { ((BraveBehaviour)projectilesPosition.Key).specRigidbody.RegisterSpecificCollisionException(((BraveBehaviour)((BraveBehaviour)otherRigidbody).projectile).specRigidbody); } } ((BraveBehaviour)((BraveBehaviour)otherRigidbody).projectile).specRigidbody.RegisterSpecificCollisionException(((BraveBehaviour)projectile).specRigidbody); } ((BraveBehaviour)otherRigidbody).projectile.Owner = projectile.Owner; ((BraveBehaviour)otherRigidbody).projectile.SetNewShooter(((BraveBehaviour)projectile.Owner).specRigidbody); ((BraveBehaviour)otherRigidbody).projectile.collidesWithPlayer = false; ((BraveBehaviour)otherRigidbody).projectile.collidesWithEnemies = true; SpawnManager.PoolManager.Remove(((BraveBehaviour)((BraveBehaviour)otherRigidbody).projectile).transform); ((BraveBehaviour)otherRigidbody).projectile.baseData.speed = 0.1f; ((BraveBehaviour)otherRigidbody).projectile.UpdateSpeed(); ((BraveBehaviour)otherRigidbody).projectile.baseData.force = 0f; ((BraveBehaviour)otherRigidbody).projectile.baseData.damage = (((BraveBehaviour)otherRigidbody).projectile.IsBlackBullet ? 4f : 2f); ((BraveBehaviour)otherRigidbody).projectile.UpdateCollisionMask(); ((BraveBehaviour)otherRigidbody).projectile.ResetDistance(); ((BraveBehaviour)otherRigidbody).projectile.Reflected(); ((BraveBehaviour)otherRigidbody).projectile.Reawaken(); if (!flag2) { ((BraveBehaviour)otherRigidbody).projectile.AdjustPlayerProjectileTint(isAlt ? new Color(0f, 0f, 1f, 1f) : new Color(0f, 1f, 1f, 1f), 10, 0.5f); } PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)((BraveBehaviour)otherRigidbody).projectile).gameObject); orAddComponent.penetration = 5; ((Component)((BraveBehaviour)otherRigidbody).projectile).gameObject.AddComponent(); if (projectile.Owner is PlayerController) { GameActor owner = projectile.Owner; ((PlayerController)((owner is PlayerController) ? owner : null)).DoPostProcessProjectile(((BraveBehaviour)otherRigidbody).projectile); } ProjectilesPositions.Add(((BraveBehaviour)otherRigidbody).projectile, Vector2.op_Implicit(Toolbox.GetUnitOnCircleVec3(Vector2Extensions.ToAngle(((BraveBehaviour)otherRigidbody).projectile.Direction) - 180f, Range * projectile.AdditionalScaleMultiplier * (flag2 ? 0.75f : 1f)))); } public void OnDestroy() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) List list = ProjectilesPositions.Keys.ToList(); AkSoundEngine.PostEvent("Play_ENM_bullat_tackle_01", ((Component)this).gameObject); if (ConfigManager.DoVisualEffect) { GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); GameObject val2 = Object.Instantiate(val.gameObject, Vector2.op_Implicit(((BraveBehaviour)projectile).sprite.WorldCenter), Quaternion.identity); val2.transform.localScale = Vector3.one * 0.15f; Object.Destroy((Object)(object)val2, 2f); } for (int num = ProjectilesPositions.Count - 1; num > -1; num--) { if ((Object)(object)list[num] != (Object)null) { Projectile val3 = list[num]; val3.baseData.UsesCustomAccelerationCurve = true; val3.baseData.AccelerationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.5f); val3.UpdateCollisionMask(); val3.ResetDistance(); val3.Reflected(); val3.Reawaken(); val3.Direction = Vector2.op_Implicit(Toolbox.GetUnitOnCircleVec3(BraveUtility.RandomAngle(), 1f)); val3.baseData.speed = 25f; val3.UpdateSpeed(); ProjectilesPositions.Remove(val3); } } } } public class FlamethrowerFire : MonoBehaviour { private Projectile projectile; private bool Bounced = false; public void Start() { projectile = ((Component)this).GetComponent(); ((BraveBehaviour)projectile).spriteAnimator.Play("flamingfire"); tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)projectile).spriteAnimator; spriteAnimator.AnimationCompleted = (Action)Delegate.Combine(spriteAnimator.AnimationCompleted, new Action(MyBad)); ProjectileData baseData = projectile.baseData; baseData.speed *= Random.Range(0.85f, 1.15f); projectile.UpdateSpeed(); BounceProjModifier component = ((Component)projectile).GetComponent(); component.OnBounceContext = (Action)Delegate.Combine(component.OnBounceContext, new Action(Bounce)); Projectile obj = projectile; obj.OnHitEnemy = (Action)Delegate.Combine(obj.OnHitEnemy, new Action(OHE)); Projectile obj2 = projectile; obj2.BossDamageMultiplier *= 1.25f; } public void OHE(Projectile p, SpeculativeRigidbody body, bool b) { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body) || !((Object)(object)((BraveBehaviour)body).aiActor != (Object)null) || !((Object)(object)((BraveBehaviour)((BraveBehaviour)body).aiActor).healthHaver != (Object)null)) { return; } IEnumerable source = ((BraveBehaviour)((BraveBehaviour)body).aiActor).healthHaver.damageTypeModifiers.Where((DamageTypeModifier self) => (int)self.damageType == 4 && self.damageMultiplier < 1f); if (source.Count() > 0) { List list = source.ToList(); for (int i = 0; i < list.Count(); i++) { ((BraveBehaviour)((BraveBehaviour)body).aiActor).healthHaver.damageTypeModifiers.Remove(list[i]); } ((BraveBehaviour)((BraveBehaviour)body).aiActor).healthHaver.damageTypeModifiers.Add(new DamageTypeModifier { damageMultiplier = 1.33f, damageType = (CoreDamageTypes)4 }); } if (((GameActor)((BraveBehaviour)body).aiActor).EffectResistances == null) { return; } IEnumerable source2 = ((GameActor)((BraveBehaviour)body).aiActor).EffectResistances.Where((ActorEffectResistance self) => (int)self.resistType == 1); if (source2.Count() > 0) { List list2 = ((GameActor)((BraveBehaviour)body).aiActor).EffectResistances.ToList(); List list3 = source2.ToList(); for (int j = 0; j < list3.Count(); j++) { list2.Remove(list3[j]); } ((GameActor)((BraveBehaviour)body).aiActor).EffectResistances = list2.ToArray(); } } public Projectile GetProjectile() { return projectile; } public void Bounce(BounceProjModifier bounceProjModifier, SpeculativeRigidbody body) { if (!Bounced) { Bounced = true; ProjectileData baseData = projectile.baseData; baseData.speed *= 0.4f; projectile.UpdateSpeed(); } } public void MyBad(tk2dSpriteAnimator a, tk2dSpriteAnimationClip b) { projectile.DieInAir(true, false, true, false); } } } namespace SoundAPI { public class CustomSwitchData { public string OriginalEventName; public string SwitchGroup; public string RequiredSwitch; public List ReplacementEvents; public uint Play(GameObject go, Func playFunc) { try { if (ReplacementEvents != null) { uint? num = null; foreach (SwitchedEvent replacementEvent in ReplacementEvents) { uint defaultValue = playFunc(replacementEvent, go); num = num.GetValueOrDefault(defaultValue); } if (!num.HasValue) { num = 0u; } return num.GetValueOrDefault(); } return 0u; } catch { return 0u; } } } public static class SoundManager { private delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); private delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); private delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); private delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8); public static List CustomSwitchDatas; public static List StopEvents; public static List StopEventsMusic; public static List StopEventsObjects; public static List StopEventsWeapons; private static Dictionary> Switches; private static Hook SetSwitchHook; private static Hook PostEventPlayingIdHook; private static Hook PostEventExternalSourcesHook; private static Hook PostEventExternalsHook; private static Hook PostEventCallbackCookieHook; private static Hook PostEventFlagsHook; private static Hook PostEventHook; private static bool m_initialized; private static bool origSetSwitch; public static void Init() { //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Expected O, but got Unknown //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown if (!m_initialized) { CustomSwitchDatas = new List(); Switches = new Dictionary>(); StopEvents = new List(); StopEventsMusic = new List(); StopEventsObjects = new List(); StopEventsWeapons = new List(); if (SetSwitchHook == null) { SetSwitchHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("SetSwitch", new Type[3] { typeof(string), typeof(string), typeof(GameObject) }), typeof(SoundManager).GetMethod("SetSwitch", BindingFlags.Static | BindingFlags.NonPublic)); } PostEventPlayingIdHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("PostEvent", new Type[8] { typeof(string), typeof(GameObject), typeof(uint), typeof(EventCallback), typeof(object), typeof(uint), typeof(AkExternalSourceInfo), typeof(uint) }), typeof(SoundManager).GetMethod("PostEventPlayingId", BindingFlags.Static | BindingFlags.NonPublic)); PostEventExternalSourcesHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("PostEvent", new Type[7] { typeof(string), typeof(GameObject), typeof(uint), typeof(EventCallback), typeof(object), typeof(uint), typeof(AkExternalSourceInfo) }), typeof(SoundManager).GetMethod("PostEventExternalSources", BindingFlags.Static | BindingFlags.NonPublic)); PostEventExternalsHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("PostEvent", new Type[6] { typeof(string), typeof(GameObject), typeof(uint), typeof(EventCallback), typeof(object), typeof(uint) }), typeof(SoundManager).GetMethod("PostEventExternals", BindingFlags.Static | BindingFlags.NonPublic)); PostEventCallbackCookieHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("PostEvent", new Type[5] { typeof(string), typeof(GameObject), typeof(uint), typeof(EventCallback), typeof(object) }), typeof(SoundManager).GetMethod("PostEventCallbackCookie", BindingFlags.Static | BindingFlags.NonPublic)); PostEventFlagsHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("PostEvent", new Type[3] { typeof(string), typeof(GameObject), typeof(uint) }), typeof(SoundManager).GetMethod("PostEventFlags", BindingFlags.Static | BindingFlags.NonPublic)); PostEventHook = new Hook((MethodBase)typeof(AkSoundEngine).GetMethod("PostEvent", new Type[2] { typeof(string), typeof(GameObject) }), typeof(SoundManager).GetMethod("PostEvent", BindingFlags.Static | BindingFlags.NonPublic)); m_initialized = true; } } public static void Unload() { if (m_initialized) { CustomSwitchDatas?.Clear(); CustomSwitchDatas = null; StopEvents?.Clear(); StopEventsMusic?.Clear(); StopEventsObjects?.Clear(); StopEventsWeapons?.Clear(); StopEvents = null; StopEventsMusic = null; StopEventsObjects = null; StopEventsWeapons = null; Hook postEventPlayingIdHook = PostEventPlayingIdHook; if (postEventPlayingIdHook != null) { postEventPlayingIdHook.Dispose(); } Hook postEventExternalSourcesHook = PostEventExternalSourcesHook; if (postEventExternalSourcesHook != null) { postEventExternalSourcesHook.Dispose(); } Hook postEventExternalsHook = PostEventExternalsHook; if (postEventExternalsHook != null) { postEventExternalsHook.Dispose(); } Hook postEventCallbackCookieHook = PostEventCallbackCookieHook; if (postEventCallbackCookieHook != null) { postEventCallbackCookieHook.Dispose(); } Hook postEventFlagsHook = PostEventFlagsHook; if (postEventFlagsHook != null) { postEventFlagsHook.Dispose(); } Hook postEventHook = PostEventHook; if (postEventHook != null) { postEventHook.Dispose(); } m_initialized = false; } } public static void LoadBankFromModFolderOrZip(this BaseUnityPlugin mod, string fileName) { if (!fileName.EndsWith(".bnk")) { fileName += ".bnk"; } LoadFromPath(ETGMod.FolderPath(mod), fileName); } public static void LoadBanksFromModFolderOrZip(this BaseUnityPlugin mod) { AutoloadFromPath(ETGMod.FolderPath(mod)); } public static void LoadBankFromModProject(string path) { path = path.Replace("/", ".").Replace("\\", "."); if (!path.EndsWith(".bnk")) { path += ".bnk"; } Assembly callingAssembly = Assembly.GetCallingAssembly(); using Stream stream = callingAssembly.GetManifestResourceStream(path); if (stream != null) { string text = path.Substring(0, path.LastIndexOf('.')); string name = path; if (text.LastIndexOf('.') >= 0) { name = text.Substring(text.LastIndexOf('.') + 1); } LoadSoundbankFromStream(stream, name); } } public static void LoadBanksFromModProject() { Assembly callingAssembly = Assembly.GetCallingAssembly(); string[] manifestResourceNames = callingAssembly.GetManifestResourceNames(); foreach (string text in manifestResourceNames) { using Stream stream = callingAssembly.GetManifestResourceStream(text); if (stream != null && text.EndsWith(".bnk")) { string text2 = text.Substring(0, text.LastIndexOf('.')); string name = text; if (text2.LastIndexOf('.') >= 0) { name = text2.Substring(text2.LastIndexOf('.') + 1); } LoadSoundbankFromStream(stream, name); } } } private static void LoadFromPath(string path, string filename) { if (string.IsNullOrEmpty(path)) { return; } path = path.Replace('/', Path.DirectorySeparatorChar); path = path.Replace('\\', Path.DirectorySeparatorChar); if (!Directory.Exists(path)) { return; } List list = new List(Directory.GetFiles(path, "*.bnk", SearchOption.AllDirectories)); for (int i = 0; i < list.Count; i++) { string path2 = list[i]; using FileStream stream = File.OpenRead(path2); string fileName = Path.GetFileName(path); if (fileName == filename) { LoadSoundbankFromStream(stream, fileName); break; } } } private static void AutoloadFromPath(string path) { if (string.IsNullOrEmpty(path)) { return; } path = path.Replace('/', Path.DirectorySeparatorChar); path = path.Replace('\\', Path.DirectorySeparatorChar); if (!Directory.Exists(path)) { return; } List list = new List(Directory.GetFiles(path, "*.bnk", SearchOption.AllDirectories)); for (int i = 0; i < list.Count; i++) { string path2 = list[i]; using FileStream stream = File.OpenRead(path2); string fileName = Path.GetFileName(path); LoadSoundbankFromStream(stream, fileName); } } private static byte[] StreamToByteArray(Stream input) { byte[] array = new byte[16384]; using MemoryStream memoryStream = new MemoryStream(); int count; while ((count = input.Read(array, 0, array.Length)) > 0) { memoryStream.Write(array, 0, count); } return memoryStream.ToArray(); } private static void LoadSoundbankFromStream(Stream stream, string name) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) byte[] array = StreamToByteArray(stream); IntPtr intPtr = Marshal.AllocHGlobal(array.Length); try { Marshal.Copy(array, 0, intPtr, array.Length); uint num = default(uint); AKRESULT val = AkSoundEngine.LoadAndDecodeBankFromMemory(intPtr, (uint)array.Length, false, name, false, ref num); } finally { Marshal.FreeHGlobal(intPtr); } } public static CustomSwitchData AddCustomSwitchData(string switchGroup, string switchValue, string originalEventName, params SwitchedEvent[] replacementEvents) { if (CustomSwitchDatas == null) { Init(); } CustomSwitchData customSwitchData = new CustomSwitchData { OriginalEventName = originalEventName, ReplacementEvents = new List(replacementEvents), RequiredSwitch = switchValue, SwitchGroup = switchGroup }; CustomSwitchDatas.Add(customSwitchData); return customSwitchData; } public static void RegisterStopEvent(string eventName, params StopEventType[] types) { if (StopEvents == null) { Init(); } StopEvents.Add(eventName); for (int i = 0; i < types.Length; i++) { switch (types[i]) { case StopEventType.Music: StopEventsMusic.Add(eventName); break; case StopEventType.Weapon: StopEventsWeapons.Add(eventName); break; case StopEventType.Object: StopEventsObjects.Add(eventName); break; } } } private static uint PostEventPlayingId(Func orig, string eventName, GameObject gameObject, uint flags, EventCallback callback, object cookie, uint externals, AkExternalSourceInfo externalSources, uint playingId) { return ProcessEvent(eventName, gameObject, (string s, GameObject g) => orig(s, g, flags, callback, cookie, externals, externalSources, playingId)); } private static uint PostEventExternalSources(Func orig, string eventName, GameObject gameObject, uint flags, EventCallback callback, object cookie, uint externals, AkExternalSourceInfo externalSources) { return ProcessEvent(eventName, gameObject, (string s, GameObject g) => orig(s, g, flags, callback, cookie, externals, externalSources)); } private static uint PostEventExternals(Func orig, string eventName, GameObject gameObject, uint flags, EventCallback callback, object cookie, uint externals) { return ProcessEvent(eventName, gameObject, (string s, GameObject g) => orig(s, g, flags, callback, cookie, externals)); } private static uint PostEventCallbackCookie(Func orig, string eventName, GameObject gameObject, uint flags, EventCallback callback, object cookie) { return ProcessEvent(eventName, gameObject, (string s, GameObject g) => orig(s, g, flags, callback, cookie)); } private static uint PostEventFlags(Func orig, string eventName, GameObject gameObject, uint flags) { return ProcessEvent(eventName, gameObject, (string s, GameObject g) => orig(s, g, flags)); } private static uint PostEvent(Func orig, string eventName, GameObject gameObject) { return ProcessEvent(eventName, gameObject, (string s, GameObject g) => orig(s, g)); } private static uint ProcessEvent(string eventName, GameObject go, Func orig) { try { if ((Object)(object)go != (Object)null && !string.IsNullOrEmpty(eventName)) { CustomSwitchData customSwitchData = GetCustomSwitchData(go, eventName); if (customSwitchData != null) { Func playFunc = delegate(SwitchedEvent switched, GameObject go2) { if (!string.IsNullOrEmpty(switched.eventName)) { bool flag = false; if (!string.IsNullOrEmpty(switched.switchGroup) && switched.switchValue != null) { SetSwitchOrig(switched.switchGroup, switched.switchValue, go2); flag = true; } uint result = orig(switched.eventName, go2); if (flag) { ReturnSwitch(switched.switchGroup, go2); } return result; } return 0u; }; return customSwitchData.Play(go, playFunc); } if (eventName.ToLowerInvariant() == "stop_snd_all") { foreach (string stopEvent in StopEvents) { if (!string.IsNullOrEmpty(stopEvent)) { orig(stopEvent, go); } } } if (eventName.ToLowerInvariant() == "stop_mus_all") { foreach (string item in StopEventsMusic) { if (!string.IsNullOrEmpty(item)) { orig(item, go); } } } if (eventName.ToLowerInvariant() == "stop_wpn_all") { foreach (string stopEventsWeapon in StopEventsWeapons) { if (!string.IsNullOrEmpty(stopEventsWeapon)) { orig(stopEventsWeapon, go); } } } if (eventName.ToLowerInvariant() == "stop_snd_obj") { foreach (string stopEventsObject in StopEventsObjects) { if (!string.IsNullOrEmpty(stopEventsObject)) { orig(stopEventsObject, go); } } } } if (eventName == null) { return 0u; } return orig(eventName, go); } catch { return 0u; } } private static CustomSwitchData GetCustomSwitchData(GameObject go, string eventName) { try { if (string.IsNullOrEmpty(eventName)) { return null; } if ((Object)(object)go != (Object)null && Switches.ContainsKey(go) && Switches[go] != null) { foreach (CustomSwitchData customSwitchData in CustomSwitchDatas) { if (!string.IsNullOrEmpty(customSwitchData.OriginalEventName) && customSwitchData.OriginalEventName.ToLowerInvariant() == eventName.ToLowerInvariant() && !string.IsNullOrEmpty(customSwitchData.SwitchGroup) && Switches != null && Switches.ContainsKey(go) && Switches[go].ContainsKey(customSwitchData.SwitchGroup.ToLowerInvariant()) && !string.IsNullOrEmpty(customSwitchData.RequiredSwitch) && Switches[go][customSwitchData.SwitchGroup.ToLowerInvariant()] == customSwitchData.RequiredSwitch.ToLowerInvariant()) { return customSwitchData; } } } return null; } catch { return null; } } private static AKRESULT SetSwitch(Func orig, string switchGroup, string switchValue, GameObject gameObject) { //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gameObject != (Object)null && Switches != null && !origSetSwitch) { if (!Switches.ContainsKey(gameObject)) { Switches.Add(gameObject, new Dictionary { { switchGroup.ToLower(), switchValue.ToLower() } }); } else if (Switches[gameObject] == null) { Switches[gameObject] = new Dictionary { { switchGroup.ToLower(), switchValue.ToLower() } }; } else if (!Switches[gameObject].ContainsKey(switchGroup.ToLower())) { Switches[gameObject].Add(switchGroup.ToLower(), switchValue.ToLower()); } else { Switches[gameObject][switchGroup.ToLower()] = switchValue.ToLower(); } } return orig(switchGroup, switchValue, gameObject); } private static void SetSwitchOrig(string switchGroup, string switchValue, GameObject go) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) origSetSwitch = true; AkSoundEngine.SetSwitch(switchGroup, switchValue, go); origSetSwitch = false; } private static void ReturnSwitch(string switchGroup, GameObject go) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (Switches != null && Switches.ContainsKey(go) && Switches[go] != null && Switches[go].ContainsKey(switchGroup)) { origSetSwitch = true; AkSoundEngine.SetSwitch(switchGroup, Switches[go][switchGroup], go); origSetSwitch = false; } } } public enum StopEventType { None, Music, Weapon, Object } public class SwitchedEvent { public string eventName; public string switchGroup; public string switchValue; public SwitchedEvent() { } public SwitchedEvent(string s) { eventName = s; switchGroup = null; switchValue = null; } public SwitchedEvent(string eventName, string switchGroup, string switchValue) { this.eventName = eventName; this.switchGroup = switchGroup; this.switchValue = switchValue; } public static implicit operator SwitchedEvent(string s) { return new SwitchedEvent(s); } } } namespace SaveAPI { [fsObject] public class AdvancedGameStats { [fsProperty] private Dictionary stats; [fsProperty] private Dictionary maxima; [fsProperty] public HashSet m_flags; public AdvancedGameStats() { m_flags = new HashSet(); stats = new Dictionary(new CustomTrackedStatsComparer()); maxima = new Dictionary(new CustomTrackedMaximumsComparer()); } public float GetStatValue(CustomTrackedStats statToCheck) { if (!stats.ContainsKey(statToCheck)) { return 0f; } return stats[statToCheck]; } public float GetMaximumValue(CustomTrackedMaximums maxToCheck) { if (!maxima.ContainsKey(maxToCheck)) { return 0f; } return maxima[maxToCheck]; } public bool GetFlag(CustomCharacterSpecificGungeonFlags flag) { if (flag == CustomCharacterSpecificGungeonFlags.NONE) { Debug.LogError((object)"Something is attempting to get a NONE character-specific save flag!"); return false; } return m_flags.Contains(flag); } public void SetStat(CustomTrackedStats stat, float val) { if (stats.ContainsKey(stat)) { stats[stat] = val; } else { stats.Add(stat, val); } } public void SetMax(CustomTrackedMaximums max, float val) { if (maxima.ContainsKey(max)) { maxima[max] = Mathf.Max(maxima[max], val); } else { maxima.Add(max, val); } } public void SetFlag(CustomCharacterSpecificGungeonFlags flag, bool value) { if (flag == CustomCharacterSpecificGungeonFlags.NONE) { Debug.LogError((object)"Something is attempting to set a NONE character-specific save flag!"); } else if (value) { m_flags.Add(flag); } else { m_flags.Remove(flag); } } public void IncrementStat(CustomTrackedStats stat, float val) { if (stats.ContainsKey(stat)) { stats[stat] += val; } else { stats.Add(stat, val); } } public void AddStats(AdvancedGameStats otherStats) { foreach (KeyValuePair stat in otherStats.stats) { IncrementStat(stat.Key, stat.Value); } foreach (KeyValuePair item in otherStats.maxima) { SetMax(item.Key, item.Value); } foreach (CustomCharacterSpecificGungeonFlags flag in otherStats.m_flags) { m_flags.Add(flag); } } public void ClearAllState() { List list = new List(); foreach (KeyValuePair stat in stats) { list.Add(stat.Key); } foreach (CustomTrackedStats item in list) { stats[item] = 0f; } List list2 = new List(); foreach (KeyValuePair item2 in maxima) { list2.Add(item2.Key); } foreach (CustomTrackedMaximums item3 in list2) { maxima[item3] = 0f; } } } [fsObject] internal class AdvancedGameStatsManager { private static AdvancedGameStatsManager m_instance; [fsProperty] public HashSet m_flags; [fsProperty] public string midGameSaveGuid; [fsProperty] public Dictionary m_characterStats; public AdvancedGameStats m_sessionStats; public AdvancedGameStats m_savedSessionStats; private PlayableCharacters m_sessionCharacter; private int m_numCharacters; [fsIgnore] public int cachedHuntIndex; [fsIgnore] public SaveSlot cachedSaveSlot; [fsIgnore] public bool IsInSession => m_sessionStats != null; public static bool HasInstance => m_instance != null; public static AdvancedGameStatsManager Instance => m_instance; public AdvancedGameStatsManager() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown m_flags = new HashSet(new CustomDungeonFlagsComparer()); m_characterStats = new Dictionary((IEqualityComparer?)new PlayableCharactersComparer()); m_numCharacters = -1; cachedHuntIndex = -1; } public static void Unload() { m_instance = null; } public void SetCharacterSpecificFlag(PlayableCharacters character, CustomCharacterSpecificGungeonFlags flag, bool value) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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_006f: Unknown result type (might be due to invalid IL or missing references) if (flag == CustomCharacterSpecificGungeonFlags.NONE) { Debug.LogError((object)"Something is attempting to set a NONE character-specific save flag!"); return; } if (!m_characterStats.ContainsKey(character)) { m_characterStats.Add(character, new AdvancedGameStats()); } if (m_sessionStats != null && m_sessionCharacter == character) { m_sessionStats.SetFlag(flag, value); } else { m_characterStats[character].SetFlag(flag, value); } } public void SetStat(CustomTrackedStats stat, float value) { if (!float.IsNaN(value) && !float.IsInfinity(value) && m_sessionStats != null) { m_sessionStats.SetStat(stat, value); } } public void UpdateMaximum(CustomTrackedMaximums maximum, float val) { if (!float.IsNaN(val) && !float.IsInfinity(val) && m_sessionStats != null) { m_sessionStats.SetMax(maximum, val); } } public bool GetCharacterSpecificFlag(CustomCharacterSpecificGungeonFlags flag) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return GetCharacterSpecificFlag(m_sessionCharacter, flag); } public bool GetCharacterSpecificFlag(PlayableCharacters character, CustomCharacterSpecificGungeonFlags flag) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (flag == CustomCharacterSpecificGungeonFlags.NONE) { Debug.LogError((object)"Something is attempting to get a NONE character-specific save flag!"); return false; } if (m_sessionStats != null && m_sessionCharacter == character) { if (m_sessionStats.GetFlag(flag)) { return true; } if (m_savedSessionStats.GetFlag(flag)) { return true; } } AdvancedGameStats value; return m_characterStats.TryGetValue(character, out value) && value.GetFlag(flag); } public static void DoMidgameSave() { string text = Guid.NewGuid().ToString(); AdvancedMidGameSaveData advancedMidGameSaveData = new AdvancedMidGameSaveData(text); SaveManager.Save(advancedMidGameSaveData, SaveAPIManager.AdvancedMidGameSave, GameStatsManager.Instance.PlaytimeMin, 0u, (SaveSlot?)null); Instance.midGameSaveGuid = text; Save(); } public void RegisterStatChange(CustomTrackedStats stat, float value) { if (m_sessionStats == null) { Debug.LogError((object)"No session stats active and we're registering a stat change!"); } else if (!float.IsNaN(value) && !float.IsInfinity(value) && !(Mathf.Abs(value) > 10000f)) { m_sessionStats.IncrementStat(stat, value); } } public static void InvalidateMidgameSave(bool saveStats) { AdvancedMidGameSaveData midgameSave = null; if (VerifyAndLoadMidgameSave(out midgameSave, checkValidity: false)) { midgameSave.Invalidate(); SaveManager.Save(midgameSave, SaveAPIManager.AdvancedMidGameSave, GameStatsManager.Instance.PlaytimeMin, 0u, (SaveSlot?)null); GameStatsManager.Instance.midGameSaveGuid = midgameSave.midGameSaveGuid; if (saveStats) { GameStatsManager.Save(); } } } public static void RevalidateMidgameSave(bool saveStats) { AdvancedMidGameSaveData midgameSave = null; if (VerifyAndLoadMidgameSave(out midgameSave, checkValidity: false)) { midgameSave.Revalidate(); SaveManager.Save(midgameSave, SaveAPIManager.AdvancedMidGameSave, GameStatsManager.Instance.PlaytimeMin, 0u, (SaveSlot?)null); GameStatsManager.Instance.midGameSaveGuid = midgameSave.midGameSaveGuid; if (saveStats) { GameStatsManager.Save(); } } } public static bool VerifyAndLoadMidgameSave(out AdvancedMidGameSaveData midgameSave, bool checkValidity = true) { if (!SaveManager.Load(SaveAPIManager.AdvancedGameSave, ref midgameSave, true, 0u, (Func)null, (SaveSlot?)null)) { Debug.LogError((object)"No mid game save found"); return false; } if (midgameSave == null) { Debug.LogError((object)"Failed to load mid game save (0)"); return false; } if (checkValidity && !midgameSave.IsValid()) { return false; } if (GameStatsManager.Instance.midGameSaveGuid == null || GameStatsManager.Instance.midGameSaveGuid != midgameSave.midGameSaveGuid) { Debug.LogError((object)"Failed to load mid game save (1)"); return false; } return true; } public void ClearAllStatsGlobal() { m_sessionStats.ClearAllState(); m_savedSessionStats.ClearAllState(); if (m_numCharacters <= 0) { m_numCharacters = Enum.GetValues(typeof(PlayableCharacters)).Length; } for (int i = 0; i < m_numCharacters; i++) { if (m_characterStats.TryGetValue((PlayableCharacters)i, out var value)) { value.ClearAllState(); } } } public void ClearStatValueGlobal(CustomTrackedStats stat) { m_sessionStats.SetStat(stat, 0f); m_savedSessionStats.SetStat(stat, 0f); if (m_numCharacters <= 0) { m_numCharacters = Enum.GetValues(typeof(PlayableCharacters)).Length; } for (int i = 0; i < m_numCharacters; i++) { if (m_characterStats.TryGetValue((PlayableCharacters)i, out var value)) { value.SetStat(stat, 0f); } } } private PlayableCharacters GetCurrentCharacter() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return GameManager.Instance.PrimaryPlayer.characterIdentity; } public float GetPlayerMaximum(CustomTrackedMaximums maximum) { if (m_numCharacters <= 0) { m_numCharacters = Enum.GetValues(typeof(PlayableCharacters)).Length; } float num = 0f; if (m_sessionStats != null) { num = Mathf.Max(new float[3] { num, m_sessionStats.GetMaximumValue(maximum), m_savedSessionStats.GetMaximumValue(maximum) }); } for (int i = 0; i < m_numCharacters; i++) { if (m_characterStats.TryGetValue((PlayableCharacters)i, out var value)) { num = Mathf.Max(num, value.GetMaximumValue(maximum)); } } return num; } public float GetPlayerStatValue(CustomTrackedStats stat) { if (m_numCharacters <= 0) { m_numCharacters = Enum.GetValues(typeof(PlayableCharacters)).Length; } float num = 0f; if (m_sessionStats != null) { num += m_sessionStats.GetStatValue(stat); } for (int i = 0; i < m_numCharacters; i++) { if (m_characterStats.TryGetValue((PlayableCharacters)i, out var value)) { num += value.GetStatValue(stat); } } return num; } public void SetCharacterSpecificFlag(CustomCharacterSpecificGungeonFlags flag, bool value) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) SetCharacterSpecificFlag(m_sessionCharacter, flag, value); } public float GetSessionStatValue(CustomTrackedStats stat) { return m_sessionStats.GetStatValue(stat) + m_savedSessionStats.GetStatValue(stat); } public float GetCharacterStatValue(CustomTrackedStats stat) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return GetCharacterStatValue(GetCurrentCharacter(), stat); } public AdvancedGameStats MoveSessionStatsToSavedSessionStats() { //IL_0052: 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) if (IsInSession) { GameStatsManager instance = GameStatsManager.Instance; if (instance != null && instance.IsInSession) { if (m_sessionStats != null) { if (m_characterStats != null && m_characterStats.ContainsKey(m_sessionCharacter)) { m_characterStats[m_sessionCharacter].AddStats(m_sessionStats); } if (m_sessionStats != null && m_savedSessionStats != null) { m_savedSessionStats.AddStats(m_sessionStats); m_sessionStats.ClearAllState(); } } return m_savedSessionStats ?? null; } } return null; } public float GetCharacterStatValue(PlayableCharacters character, CustomTrackedStats stat) { //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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) float num = 0f; if (m_sessionCharacter == character) { num += m_sessionStats.GetStatValue(stat); } if (m_characterStats.ContainsKey(character)) { num += m_characterStats[character].GetStatValue(stat); } return num; } public void BeginNewSession(PlayerController player) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0057: Unknown result type (might be due to invalid IL or missing references) if (m_characterStats == null) { m_characterStats = new Dictionary((IEqualityComparer?)new PlayableCharactersComparer()); } if (IsInSession) { m_sessionCharacter = player.characterIdentity; if (!m_characterStats.ContainsKey(player.characterIdentity)) { m_characterStats.Add(player.characterIdentity, new AdvancedGameStats()); } return; } m_sessionCharacter = player.characterIdentity; m_sessionStats = new AdvancedGameStats(); m_savedSessionStats = new AdvancedGameStats(); if (!m_characterStats.ContainsKey(player.characterIdentity)) { m_characterStats.Add(player.characterIdentity, new AdvancedGameStats()); } } public void EndSession(bool recordSessionStats) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (IsInSession && m_sessionStats != null) { if (recordSessionStats && m_characterStats.ContainsKey(m_sessionCharacter)) { m_characterStats[m_sessionCharacter].AddStats(m_sessionStats); } m_sessionStats = null; m_savedSessionStats = null; } } public static void Load() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) SaveManager.Init(); bool flag = false; SaveSlot? val = null; int num = -1; if (m_instance != null) { flag = true; val = m_instance.cachedSaveSlot; num = m_instance.cachedHuntIndex; } if (!SaveManager.Load(SaveAPIManager.AdvancedGameSave, ref m_instance, true, 0u, (Func)null, (SaveSlot?)null)) { m_instance = new AdvancedGameStatsManager(); } m_instance.cachedSaveSlot = SaveManager.CurrentSaveSlot; if (flag && val.HasValue && m_instance.cachedSaveSlot == val.Value) { m_instance.cachedHuntIndex = num; } else { m_instance.cachedHuntIndex = -1; } } public static void DANGEROUS_ResetAllStats() { m_instance = new AdvancedGameStatsManager(); SaveManager.DeleteAllBackups(SaveAPIManager.AdvancedGameSave, (SaveSlot?)null); } public bool GetFlag(CustomDungeonFlags flag) { if (flag == CustomDungeonFlags.NONE) { Debug.LogError((object)"Something is attempting to get a NONE save flag!"); return false; } return m_flags.Contains(flag); } public void SetFlag(CustomDungeonFlags flag, bool value) { if (flag == CustomDungeonFlags.NONE) { Debug.LogError((object)"Something is attempting to set a NONE save flag!"); } else if (value) { m_flags.Add(flag); } else { m_flags.Remove(flag); } } public static bool Save() { bool result = false; try { result = SaveManager.Save(m_instance, SaveAPIManager.AdvancedGameSave, GameStatsManager.Instance.PlaytimeMin, 0u, (SaveSlot?)null); } catch (Exception ex) { Debug.LogErrorFormat("SAVE FAILED: {0}", new object[1] { ex }); } return result; } public void AssignMidGameSavedSessionStats(AdvancedGameStats source) { if (IsInSession && m_savedSessionStats != null) { m_savedSessionStats.AddStats(source); } } } public class AdvancedMidGameSaveData { [fsProperty] public AdvancedGameStats PriorSessionStats; [fsProperty] public string midGameSaveGuid; [fsProperty] public bool invalidated; public AdvancedMidGameSaveData(string midGameSaveGuid) { this.midGameSaveGuid = midGameSaveGuid; PriorSessionStats = AdvancedGameStatsManager.Instance.MoveSessionStatsToSavedSessionStats(); } public bool IsValid() { return !invalidated; } public void Invalidate() { invalidated = true; } public void Revalidate() { invalidated = false; } public void LoadDataFromMidGameSave() { AdvancedGameStatsManager.Instance.AssignMidGameSavedSessionStats(PriorSessionStats); } } public static class BreachShopTool { public class DoubleMetaShopTier { private MetaShopTier m_topTier; private MetaShopTier m_bottomTier; public DoubleMetaShopTier(MetaShopTier topTier, MetaShopTier bottomTier) { m_topTier = topTier; m_bottomTier = bottomTier; } public DoubleMetaShopTier(DoubleMetaShopTier other) { m_topTier = other.m_topTier; m_bottomTier = other.m_bottomTier; } public MetaShopTier GetTopTier() { return m_topTier; } public MetaShopTier GetBottomTier() { return m_topTier; } public List GetTierList() { return new List { m_topTier, m_bottomTier }; } } public static MetaShopController BaseMetaShopController; public static GenericLootTable TrorcMetaShopItems; public static GenericLootTable GooptonMetaShopItems; public static GenericLootTable DougMetaShopItems; private static FieldInfo ItemControllersInfo = typeof(ShopController).GetField("m_itemControllers", BindingFlags.Instance | BindingFlags.NonPublic); private static FieldInfo BaseItemControllersInfo = typeof(BaseShopController).GetField("m_itemControllers", BindingFlags.Instance | BindingFlags.NonPublic); private static Hook pickupObjectEncounterableHook; private static Hook baseShopSetupHook; private static Hook metaShopSetupHook; private static Hook metaShopCurrentTierHook; private static Hook metaShopProximateTierHook; public static Dictionary> baseShopAddedItems; public static List metaShopAddedTiers; private static bool m_loaded; public static void DoSetup() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown if (!m_loaded) { BaseMetaShopController = SaveTools.LoadAssetFromAnywhere("Foyer_MetaShop").GetComponent(); TrorcMetaShopItems = SaveTools.LoadAssetFromAnywhere("Shop_Truck_Meta"); GooptonMetaShopItems = SaveTools.LoadAssetFromAnywhere("Shop_Goop_Meta"); DougMetaShopItems = SaveTools.LoadAssetFromAnywhere("Shop_Beetle_Meta"); pickupObjectEncounterableHook = new Hook((MethodBase)typeof(PickupObject).GetMethod("HandleEncounterable", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BreachShopTool).GetMethod("HandleEncounterableHook")); baseShopSetupHook = new Hook((MethodBase)typeof(BaseShopController).GetMethod("DoSetup", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BreachShopTool).GetMethod("BaseShopSetupHook")); metaShopSetupHook = new Hook((MethodBase)typeof(MetaShopController).GetMethod("DoSetup", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BreachShopTool).GetMethod("MetaSetupHook")); metaShopCurrentTierHook = new Hook((MethodBase)typeof(MetaShopController).GetMethod("GetCurrentTier", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BreachShopTool).GetMethod("MetaShopCurrentTierHook")); metaShopProximateTierHook = new Hook((MethodBase)typeof(MetaShopController).GetMethod("GetProximateTier", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BreachShopTool).GetMethod("MetaShopProximateTierHook")); m_loaded = true; } } public static void Unload() { if (!m_loaded) { return; } if (baseShopAddedItems != null) { for (int i = 0; i < baseShopAddedItems.Keys.Count; i++) { WeightedGameObjectCollection val = baseShopAddedItems.Keys.ToList()[i]; if (val == null || baseShopAddedItems[val] == null) { continue; } for (int j = 0; j < baseShopAddedItems[val].Count; j++) { WeightedGameObject val2 = baseShopAddedItems[val][j]; if (val2 != null && val.elements.Contains(val2)) { val.elements.Remove(val2); } } } baseShopAddedItems.Clear(); baseShopAddedItems = null; } if (metaShopAddedTiers != null) { for (int k = 0; k < metaShopAddedTiers.Count; k++) { MetaShopTier val3 = metaShopAddedTiers[k]; if (val3 != null && BaseMetaShopController.metaShopTiers.Contains(val3)) { BaseMetaShopController.metaShopTiers.Remove(val3); } } metaShopAddedTiers.Clear(); metaShopAddedTiers = null; } BaseMetaShopController = null; TrorcMetaShopItems = null; GooptonMetaShopItems = null; DougMetaShopItems = null; Hook obj = pickupObjectEncounterableHook; if (obj != null) { obj.Dispose(); } Hook obj2 = baseShopSetupHook; if (obj2 != null) { obj2.Dispose(); } Hook obj3 = metaShopSetupHook; if (obj3 != null) { obj3.Dispose(); } Hook obj4 = metaShopCurrentTierHook; if (obj4 != null) { obj4.Dispose(); } Hook obj5 = metaShopProximateTierHook; if (obj5 != null) { obj5.Dispose(); } m_loaded = false; } public static void HandleEncounterableHook(Action orig, PickupObject po, PlayerController player) { orig(po, player); if ((Object)(object)po != (Object)null && (Object)(object)((Component)po).GetComponent() != (Object)null && ((Component)po).GetComponent().CustomSaveFlagToSetOnAcquisition != CustomDungeonFlags.NONE) { AdvancedGameStatsManager.Instance.SetFlag(((Component)po).GetComponent().CustomSaveFlagToSetOnAcquisition, value: true); } } public static void BaseShopSetupHook(Action orig, BaseShopController self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 orig(self); if ((int)self.baseShopType != 6 || !((Object)(object)self.ExampleBlueprintPrefab != (Object)null)) { return; } List list = (List)BaseItemControllersInfo.GetValue(self); if (list == null) { return; } foreach (ShopItemController item in list) { if (!((Object)(object)item != (Object)null) || !((Object)(object)item.item != (Object)null) || !((Object)(object)((BraveBehaviour)item.item).encounterTrackable != (Object)null) || ((BraveBehaviour)item.item).encounterTrackable.journalData == null) { continue; } PickupObject blueprintUnlockedItem = GetBlueprintUnlockedItem(((BraveBehaviour)item.item).encounterTrackable); if (!((Object)(object)blueprintUnlockedItem != (Object)null) || !((Object)(object)((BraveBehaviour)blueprintUnlockedItem).encounterTrackable != (Object)null) || ((BraveBehaviour)blueprintUnlockedItem).encounterTrackable.prerequisites == null) { continue; } CustomDungeonFlags customDungeonFlags = CustomDungeonFlags.NONE; for (int i = 0; i < ((BraveBehaviour)blueprintUnlockedItem).encounterTrackable.prerequisites.Length; i++) { if (((BraveBehaviour)blueprintUnlockedItem).encounterTrackable.prerequisites[i] is CustomDungeonPrerequisite && (((BraveBehaviour)blueprintUnlockedItem).encounterTrackable.prerequisites[i] as CustomDungeonPrerequisite).advancedPrerequisiteType == CustomDungeonPrerequisite.AdvancedPrerequisiteType.CUSTOM_FLAG) { customDungeonFlags = (((BraveBehaviour)blueprintUnlockedItem).encounterTrackable.prerequisites[i] as CustomDungeonPrerequisite).customFlagToCheck; } } if (customDungeonFlags != CustomDungeonFlags.NONE) { ((Component)item.item).gameObject.AddComponent().CustomSaveFlagToSetOnAcquisition = customDungeonFlags; } } } public static void MetaSetupHook(Action orig, MetaShopController meta) { orig(meta); List list = (List)ItemControllersInfo.GetValue(meta); if (list == null) { return; } foreach (ShopItemController item in list) { if (!((Object)(object)item != (Object)null) || !((Object)(object)item.item != (Object)null) || !((Object)(object)((BraveBehaviour)item.item).encounterTrackable != (Object)null) || ((BraveBehaviour)item.item).encounterTrackable.journalData == null) { continue; } PickupObject blueprintUnlockedItem = GetBlueprintUnlockedItem(((BraveBehaviour)item.item).encounterTrackable); if (!((Object)(object)blueprintUnlockedItem != (Object)null) || !((Object)(object)((BraveBehaviour)blueprintUnlockedItem).encounterTrackable != (Object)null) || ((BraveBehaviour)blueprintUnlockedItem).encounterTrackable.prerequisites == null) { continue; } CustomDungeonFlags customFlagFromTargetItem = GetCustomFlagFromTargetItem(blueprintUnlockedItem.PickupObjectId); if (customFlagFromTargetItem != CustomDungeonFlags.NONE) { ((Component)item.item).gameObject.AddComponent().CustomSaveFlagToSetOnAcquisition = customFlagFromTargetItem; if (AdvancedGameStatsManager.Instance.GetFlag(customFlagFromTargetItem)) { item.ForceOutOfStock(); } } } } private static bool GetMetaItemUnlockedAdvanced(int pickupObjectId) { CustomDungeonFlags customFlagFromTargetItem = GetCustomFlagFromTargetItem(pickupObjectId); if (customFlagFromTargetItem == CustomDungeonFlags.NONE) { return true; } return AdvancedGameStatsManager.Instance.GetFlag(customFlagFromTargetItem); } public static MetaShopTier MetaShopCurrentTierHook(Func orig, MetaShopController self) { MetaShopTier val = null; for (int i = 0; i < self.metaShopTiers.Count; i++) { if (!GetMetaItemUnlockedAdvanced(self.metaShopTiers[i].itemId1) || !GetMetaItemUnlockedAdvanced(self.metaShopTiers[i].itemId2) || !GetMetaItemUnlockedAdvanced(self.metaShopTiers[i].itemId3)) { val = self.metaShopTiers[i]; break; } } List metaShopTiers = self.metaShopTiers; List list = new List(); for (int j = 0; j < metaShopTiers.Count; j++) { if (metaShopTiers[j] != null && (!ItemConditionsFulfilled(metaShopTiers[j].itemId1) || !ItemConditionsFulfilled(metaShopTiers[j].itemId2) || !ItemConditionsFulfilled(metaShopTiers[j].itemId3) || j == metaShopTiers.Count - 1)) { list.Add(metaShopTiers[j]); } } self.metaShopTiers = list; MetaShopTier val2 = orig(self); self.metaShopTiers = metaShopTiers; if (val == null) { return val2; } if (val2 == null) { return val; } return (self.metaShopTiers.IndexOf(val) < self.metaShopTiers.IndexOf(val2)) ? val : val2; } public static MetaShopTier MetaShopProximateTierHook(Func orig, MetaShopController self) { MetaShopTier val = null; for (int i = 0; i < self.metaShopTiers.Count - 1; i++) { if (!GetMetaItemUnlockedAdvanced(self.metaShopTiers[i].itemId1) || !GetMetaItemUnlockedAdvanced(self.metaShopTiers[i].itemId2) || !GetMetaItemUnlockedAdvanced(self.metaShopTiers[i].itemId3)) { val = self.metaShopTiers[i + 1]; break; } } List metaShopTiers = self.metaShopTiers; List list = new List(); for (int j = 0; j < metaShopTiers.Count; j++) { if (metaShopTiers[j] != null && (!ItemConditionsFulfilled(metaShopTiers[j].itemId1) || !ItemConditionsFulfilled(metaShopTiers[j].itemId2) || !ItemConditionsFulfilled(metaShopTiers[j].itemId3))) { list.Add(metaShopTiers[j]); } } self.metaShopTiers = list; MetaShopTier val2 = orig(self); self.metaShopTiers = metaShopTiers; if (val == null) { return val2; } if (val2 == null) { return val; } return (self.metaShopTiers.IndexOf(val) < self.metaShopTiers.IndexOf(val2)) ? val : val2; } public static CustomDungeonFlags GetCustomFlagFromTargetItem(int shopItemId) { CustomDungeonFlags result = CustomDungeonFlags.NONE; PickupObject byId = PickupObjectDatabase.GetById(shopItemId); for (int i = 0; i < ((BraveBehaviour)byId).encounterTrackable.prerequisites.Length; i++) { if (((BraveBehaviour)byId).encounterTrackable.prerequisites[i] is CustomDungeonPrerequisite && (((BraveBehaviour)byId).encounterTrackable.prerequisites[i] as CustomDungeonPrerequisite).advancedPrerequisiteType == CustomDungeonPrerequisite.AdvancedPrerequisiteType.CUSTOM_FLAG) { result = (((BraveBehaviour)byId).encounterTrackable.prerequisites[i] as CustomDungeonPrerequisite).customFlagToCheck; } } return result; } public static GungeonFlags GetFlagFromTargetItem(int shopItemId) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 //IL_0058: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) GungeonFlags result = (GungeonFlags)0; PickupObject byId = PickupObjectDatabase.GetById(shopItemId); for (int i = 0; i < ((BraveBehaviour)byId).encounterTrackable.prerequisites.Length; i++) { if ((int)((BraveBehaviour)byId).encounterTrackable.prerequisites[i].prerequisiteType == 4) { result = ((BraveBehaviour)byId).encounterTrackable.prerequisites[i].saveFlagToCheck; } } return result; } public static bool ItemConditionsFulfilled(int shopItemId) { return (Object)(object)PickupObjectDatabase.GetById(shopItemId) != (Object)null && PickupObjectDatabase.GetById(shopItemId).PrerequisitesMet(); } public static PickupObject GetBlueprintUnlockedItem(EncounterTrackable blueprintTrackable) { for (int i = 0; i < ((ObjectDatabase)(object)PickupObjectDatabase.Instance).Objects.Count; i++) { PickupObject val = ((ObjectDatabase)(object)PickupObjectDatabase.Instance).Objects[i]; if (!Object.op_Implicit((Object)(object)val)) { continue; } EncounterTrackable encounterTrackable = ((BraveBehaviour)val).encounterTrackable; if (!Object.op_Implicit((Object)(object)encounterTrackable)) { continue; } string primaryDisplayName = encounterTrackable.journalData.PrimaryDisplayName; if (!primaryDisplayName.Equals(blueprintTrackable.journalData.PrimaryDisplayName, StringComparison.OrdinalIgnoreCase)) { continue; } string notificationPanelDescription = encounterTrackable.journalData.NotificationPanelDescription; if (!notificationPanelDescription.Equals(blueprintTrackable.journalData.NotificationPanelDescription, StringComparison.OrdinalIgnoreCase)) { continue; } string ammonomiconFullEntry = encounterTrackable.journalData.AmmonomiconFullEntry; if (ammonomiconFullEntry.Equals(blueprintTrackable.journalData.AmmonomiconFullEntry, StringComparison.OrdinalIgnoreCase)) { string ammonomiconSprite = encounterTrackable.journalData.AmmonomiconSprite; if (ammonomiconSprite.Equals(blueprintTrackable.journalData.AmmonomiconSprite, StringComparison.OrdinalIgnoreCase)) { return val; } } } return null; } public static WeightedGameObject AddItemToTrorcMetaShop(this PickupObject po, int cost, int? index = null) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if ((Object)(object)TrorcMetaShopItems == (Object)null) { DoSetup(); } WeightedGameObject val = new WeightedGameObject(); val.rawGameObject = null; val.pickupId = po.PickupObjectId; val.weight = cost; val.forceDuplicatesPossible = false; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; WeightedGameObject val2 = val; if (!index.HasValue) { TrorcMetaShopItems.defaultItemDrops.elements.Add(val2); } else if (index.Value < 0) { TrorcMetaShopItems.defaultItemDrops.elements.Add(val2); } else { TrorcMetaShopItems.defaultItemDrops.elements.InsertOrAdd(index.Value, val2); } RegisterBaseShopControllerAddedItem(val2, TrorcMetaShopItems.defaultItemDrops); return val2; } public static WeightedGameObject AddItemToGooptonMetaShop(this PickupObject po, int cost, int? index = null) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if ((Object)(object)GooptonMetaShopItems == (Object)null) { DoSetup(); } WeightedGameObject val = new WeightedGameObject(); val.rawGameObject = null; val.pickupId = po.PickupObjectId; val.weight = cost; val.forceDuplicatesPossible = false; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; WeightedGameObject val2 = val; if (!index.HasValue) { GooptonMetaShopItems.defaultItemDrops.elements.Add(val2); } else if (index.Value < 0) { TrorcMetaShopItems.defaultItemDrops.elements.Add(val2); } else { GooptonMetaShopItems.defaultItemDrops.elements.InsertOrAdd(index.Value, val2); } RegisterBaseShopControllerAddedItem(val2, GooptonMetaShopItems.defaultItemDrops); return val2; } public static WeightedGameObject AddItemToDougMetaShop(this PickupObject po, int cost, int? index = null) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if ((Object)(object)DougMetaShopItems == (Object)null) { DoSetup(); } WeightedGameObject val = new WeightedGameObject(); val.rawGameObject = null; val.pickupId = po.PickupObjectId; val.weight = cost; val.forceDuplicatesPossible = false; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; WeightedGameObject val2 = val; if (!index.HasValue) { DougMetaShopItems.defaultItemDrops.elements.Add(val2); } else if (index.Value < 0) { DougMetaShopItems.defaultItemDrops.elements.Add(val2); } else { DougMetaShopItems.defaultItemDrops.elements.InsertOrAdd(index.Value, val2); } RegisterBaseShopControllerAddedItem(val2, DougMetaShopItems.defaultItemDrops); return val2; } private static void RegisterBaseShopControllerAddedItem(WeightedGameObject obj, WeightedGameObjectCollection collection) { if (baseShopAddedItems == null) { baseShopAddedItems = new Dictionary>(); } if (!baseShopAddedItems.ContainsKey(collection)) { baseShopAddedItems.Add(collection, new List()); } if (baseShopAddedItems[collection] == null) { baseShopAddedItems[collection] = new List(); } baseShopAddedItems[collection].Add(obj); } public static List AddBaseMetaShopDoubleTier(int topLeftItemId, int topLeftItemPrice, int topMiddleItemId, int topMiddleItemPrice, int topRightItemId, int topRightItemPrice, int bottomLeftItemId, int bottomLeftItemPrice, int bottomMiddleItemId, int bottomMiddleItemPrice, int bottomRightItemId, int bottomRightItemPrice, int? index = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007a: Expected O, but got Unknown return AddBaseMetaShopDoubleTier(new DoubleMetaShopTier(new MetaShopTier { itemId1 = topLeftItemId, overrideItem1Cost = topLeftItemPrice, itemId2 = topMiddleItemId, overrideItem2Cost = topMiddleItemPrice, itemId3 = topRightItemId, overrideItem3Cost = topRightItemPrice, overrideTierCost = topLeftItemId }, new MetaShopTier { itemId1 = bottomLeftItemId, overrideItem1Cost = bottomLeftItemPrice, itemId2 = bottomMiddleItemId, overrideItem2Cost = bottomMiddleItemPrice, itemId3 = bottomRightItemId, overrideItem3Cost = bottomRightItemPrice, overrideTierCost = topLeftItemId }), index); } public static List AddBaseMetaShopDoubleTier(int topLeftItemId, int topLeftItemPrice, int topMiddleItemId, int topMiddleItemPrice, int topRightItemId, int topRightItemPrice, int bottomLeftItemId, int bottomLeftItemPrice, int bottomMiddleItemId, int bottomMiddleItemPrice, int? index = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown return AddBaseMetaShopDoubleTier(new DoubleMetaShopTier(new MetaShopTier { itemId1 = topLeftItemId, overrideItem1Cost = topLeftItemPrice, itemId2 = topMiddleItemId, overrideItem2Cost = topMiddleItemPrice, itemId3 = topRightItemId, overrideItem3Cost = topRightItemPrice, overrideTierCost = topLeftItemId }, new MetaShopTier { itemId1 = bottomLeftItemId, overrideItem1Cost = bottomLeftItemPrice, itemId2 = bottomMiddleItemId, overrideItem2Cost = bottomMiddleItemPrice, itemId3 = -1, overrideItem3Cost = -1, overrideTierCost = topLeftItemId }), index); } public static List AddBaseMetaShopDoubleTier(int topLeftItemId, int topLeftItemPrice, int topMiddleItemId, int topMiddleItemPrice, int topRightItemId, int topRightItemPrice, int bottomLeftItemId, int bottomLeftItemPrice, int? index = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0076: Expected O, but got Unknown return AddBaseMetaShopDoubleTier(new DoubleMetaShopTier(new MetaShopTier { itemId1 = topLeftItemId, overrideItem1Cost = topLeftItemPrice, itemId2 = topMiddleItemId, overrideItem2Cost = topMiddleItemPrice, itemId3 = topRightItemId, overrideItem3Cost = topRightItemPrice, overrideTierCost = topLeftItemId }, new MetaShopTier { itemId1 = bottomLeftItemId, overrideItem1Cost = bottomLeftItemPrice, itemId2 = -1, overrideItem2Cost = -1, itemId3 = -1, overrideItem3Cost = -1, overrideTierCost = topLeftItemId }), index); } public static MetaShopTier AddBaseMetaShopTier(int leftItemId, int leftItemPrice, int middleItemId, int middleItemPrice, int rightItemId, int rightItemPrice, int? index = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown return AddBaseMetaShopTier(new MetaShopTier { itemId1 = leftItemId, overrideItem1Cost = leftItemPrice, itemId2 = middleItemId, overrideItem2Cost = middleItemPrice, itemId3 = rightItemId, overrideItem3Cost = rightItemPrice, overrideTierCost = leftItemPrice }, index); } public static MetaShopTier AddBaseMetaShopTier(int leftItemId, int leftItemPrice, int middleItemId, int middleItemPrice, int? index = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown return AddBaseMetaShopTier(new MetaShopTier { itemId1 = leftItemId, overrideItem1Cost = leftItemPrice, itemId2 = middleItemId, overrideItem2Cost = middleItemPrice, itemId3 = -1, overrideItem3Cost = -1, overrideTierCost = leftItemPrice }, index); } public static MetaShopTier AddBaseMetaShopTier(int leftItemId, int leftItemPrice, int? index = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown return AddBaseMetaShopTier(new MetaShopTier { itemId1 = leftItemId, overrideItem1Cost = leftItemPrice, itemId2 = -1, overrideItem2Cost = -1, itemId3 = -1, overrideItem3Cost = -1, overrideTierCost = leftItemPrice }, index); } public static List AddBaseMetaShopDoubleTier(DoubleMetaShopTier tier, int? index = null) { return new List { AddBaseMetaShopTier(tier.GetBottomTier(), index), AddBaseMetaShopTier(tier.GetTopTier(), index) }; } public static MetaShopTier AddBaseMetaShopTier(MetaShopTier tier, int? index = null) { if ((Object)(object)BaseMetaShopController == (Object)null) { DoSetup(); } if (!index.HasValue) { BaseMetaShopController.metaShopTiers.Add(tier); } else if (index.Value < 0) { BaseMetaShopController.metaShopTiers.Add(tier); } else { BaseMetaShopController.metaShopTiers.InsertOrAdd(index.Value, tier); } if (metaShopAddedTiers == null) { metaShopAddedTiers = new List(); } metaShopAddedTiers.Add(tier); ReloadInstanceMetaShopTiers(); return tier; } public static void ReloadInstanceMetaShopTiers() { MetaShopController[] array = Object.FindObjectsOfType(); foreach (MetaShopController val in array) { val.metaShopTiers = SaveTools.CloneList(BaseMetaShopController.metaShopTiers); } } } public class CustomDungeonPrerequisite : DungeonPrerequisite { public enum AdvancedPrerequisiteType { NONE, CUSTOM_FLAG, CUSTOM_STAT_COMPARISION, CUSTOM_MAXIMUM_COMPARISON, NUMBER_PASTS_COMPLETED_BETTER, ENCOUNTER_OR_CUSTOM_FLAG } public AdvancedPrerequisiteType advancedPrerequisiteType; public CustomDungeonFlags customFlagToCheck; public bool requireCustomFlag; public Type requiredPassiveFlag; public CustomTrackedMaximums customMaximumToCheck; public CustomTrackedStats customStatToCheck; public virtual bool CheckConditionsFulfilled() { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected I4, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected I4, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected I4, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0260: 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_0275: Expected I4, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected I4, but got Unknown if (advancedPrerequisiteType == AdvancedPrerequisiteType.CUSTOM_FLAG) { return AdvancedGameStatsManager.Instance.GetFlag(customFlagToCheck) == requireCustomFlag; } if (advancedPrerequisiteType == AdvancedPrerequisiteType.CUSTOM_STAT_COMPARISION) { float num = ((base.useSessionStatValue && AdvancedGameStatsManager.Instance.IsInSession) ? AdvancedGameStatsManager.Instance.GetSessionStatValue(customStatToCheck) : AdvancedGameStatsManager.Instance.GetPlayerStatValue(customStatToCheck)); PrerequisiteOperation prerequisiteOperation = base.prerequisiteOperation; PrerequisiteOperation val = prerequisiteOperation; switch ((int)val) { case 0: return num < base.comparisonValue; case 1: return num == base.comparisonValue; case 2: return num > base.comparisonValue; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } else if (advancedPrerequisiteType == AdvancedPrerequisiteType.CUSTOM_MAXIMUM_COMPARISON) { float playerMaximum = AdvancedGameStatsManager.Instance.GetPlayerMaximum(customMaximumToCheck); PrerequisiteOperation prerequisiteOperation2 = base.prerequisiteOperation; PrerequisiteOperation val2 = prerequisiteOperation2; switch ((int)val2) { case 0: return playerMaximum < base.comparisonValue; case 1: return playerMaximum == base.comparisonValue; case 2: return playerMaximum > base.comparisonValue; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } else { if (advancedPrerequisiteType != AdvancedPrerequisiteType.NUMBER_PASTS_COMPLETED_BETTER) { if (advancedPrerequisiteType == AdvancedPrerequisiteType.ENCOUNTER_OR_CUSTOM_FLAG) { EncounterDatabaseEntry val3 = null; if (!string.IsNullOrEmpty(base.encounteredObjectGuid)) { val3 = EncounterDatabase.GetEntry(base.encounteredObjectGuid); } if (AdvancedGameStatsManager.Instance.GetFlag(customFlagToCheck) == requireCustomFlag) { return true; } if (val3 != null) { int num2 = GameStatsManager.Instance.QueryEncounterable(val3); PrerequisiteOperation prerequisiteOperation3 = base.prerequisiteOperation; PrerequisiteOperation val4 = prerequisiteOperation3; switch ((int)val4) { case 0: return num2 < base.requiredNumberOfEncounters; case 1: return num2 == base.requiredNumberOfEncounters; case 2: return num2 > base.requiredNumberOfEncounters; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } else if ((Object)(object)base.encounteredRoom != (Object)null) { int num3 = GameStatsManager.Instance.QueryRoomEncountered(base.encounteredRoom.GUID); PrerequisiteOperation prerequisiteOperation4 = base.prerequisiteOperation; PrerequisiteOperation val5 = prerequisiteOperation4; switch ((int)val5) { case 0: return num3 < base.requiredNumberOfEncounters; case 1: return num3 == base.requiredNumberOfEncounters; case 2: return num3 > base.requiredNumberOfEncounters; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } return false; } return CheckConditionsFulfilledOrig(); } float num4 = GameStatsManager.Instance.GetNumberPastsBeaten(); PrerequisiteOperation prerequisiteOperation5 = base.prerequisiteOperation; PrerequisiteOperation val6 = prerequisiteOperation5; switch ((int)val6) { case 0: return num4 < base.comparisonValue; case 1: return num4 == base.comparisonValue; case 2: return num4 > base.comparisonValue; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } return false; } public bool CheckConditionsFulfilledOrig() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected I4, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected I4, but got Unknown //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Expected I4, but got Unknown //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Expected I4, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Expected I4, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected I4, but got Unknown //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected I4, but got Unknown EncounterDatabaseEntry val = null; if (!string.IsNullOrEmpty(base.encounteredObjectGuid)) { val = EncounterDatabase.GetEntry(base.encounteredObjectGuid); } PrerequisiteType prerequisiteType = base.prerequisiteType; PrerequisiteType val2 = prerequisiteType; switch ((int)val2) { case 0: if (val == null && (Object)(object)base.encounteredRoom == (Object)null) { return true; } if (val != null) { int num3 = GameStatsManager.Instance.QueryEncounterable(val); PrerequisiteOperation prerequisiteOperation4 = base.prerequisiteOperation; PrerequisiteOperation val7 = prerequisiteOperation4; switch ((int)val7) { case 0: return num3 < base.requiredNumberOfEncounters; case 1: return num3 == base.requiredNumberOfEncounters; case 2: return num3 > base.requiredNumberOfEncounters; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } else if ((Object)(object)base.encounteredRoom != (Object)null) { int num4 = GameStatsManager.Instance.QueryRoomEncountered(base.encounteredRoom.GUID); PrerequisiteOperation prerequisiteOperation5 = base.prerequisiteOperation; PrerequisiteOperation val8 = prerequisiteOperation5; switch ((int)val8) { case 0: return num4 < base.requiredNumberOfEncounters; case 1: return num4 == base.requiredNumberOfEncounters; case 2: return num4 > base.requiredNumberOfEncounters; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } return false; case 1: { float playerStatValue = GameStatsManager.Instance.GetPlayerStatValue(base.statToCheck); PrerequisiteOperation prerequisiteOperation6 = base.prerequisiteOperation; PrerequisiteOperation val9 = prerequisiteOperation6; switch ((int)val9) { case 0: return playerStatValue < base.comparisonValue; case 1: return playerStatValue == base.comparisonValue; case 2: return playerStatValue > base.comparisonValue; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); break; } case 2: { PlayableCharacters val5 = (PlayableCharacters)(-1); if (!BraveRandom.IgnoreGenerationDifferentiator) { if ((Object)(object)GameManager.Instance.PrimaryPlayer != (Object)null) { val5 = GameManager.Instance.PrimaryPlayer.characterIdentity; } else if ((Object)(object)GameManager.PlayerPrefabForNewGame != (Object)null) { val5 = GameManager.PlayerPrefabForNewGame.GetComponent().characterIdentity; } else if ((Object)(object)GameManager.Instance.BestGenerationDungeonPrefab != (Object)null) { val5 = GameManager.Instance.BestGenerationDungeonPrefab.defaultPlayerPrefab.GetComponent().characterIdentity; } } return base.requireCharacter == (val5 == base.requiredCharacter); } case 3: if ((Object)(object)GameManager.Instance.BestGenerationDungeonPrefab != (Object)null) { return base.requireTileset == (GameManager.Instance.BestGenerationDungeonPrefab.tileIndices.tilesetId == base.requiredTileset); } return base.requireTileset == (GameManager.Instance.Dungeon.tileIndices.tilesetId == base.requiredTileset); case 4: return GameStatsManager.Instance.GetFlag(base.saveFlagToCheck) == base.requireFlag; case 5: return !base.requireDemoMode; case 6: { float playerMaximum = GameStatsManager.Instance.GetPlayerMaximum(base.maxToCheck); PrerequisiteOperation prerequisiteOperation3 = base.prerequisiteOperation; PrerequisiteOperation val6 = prerequisiteOperation3; switch ((int)val6) { case 0: return playerMaximum < base.comparisonValue; case 1: return playerMaximum == base.comparisonValue; case 2: return playerMaximum > base.comparisonValue; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); break; } case 7: if (GameStatsManager.Instance.GetFlag(base.saveFlagToCheck) == base.requireFlag) { return true; } if (val != null) { int num = GameStatsManager.Instance.QueryEncounterable(val); PrerequisiteOperation prerequisiteOperation = base.prerequisiteOperation; PrerequisiteOperation val3 = prerequisiteOperation; switch ((int)val3) { case 0: return num < base.requiredNumberOfEncounters; case 1: return num == base.requiredNumberOfEncounters; case 2: return num > base.requiredNumberOfEncounters; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } else if ((Object)(object)base.encounteredRoom != (Object)null) { int num2 = GameStatsManager.Instance.QueryRoomEncountered(base.encounteredRoom.GUID); PrerequisiteOperation prerequisiteOperation2 = base.prerequisiteOperation; PrerequisiteOperation val4 = prerequisiteOperation2; switch ((int)val4) { case 0: return num2 < base.requiredNumberOfEncounters; case 1: return num2 == base.requiredNumberOfEncounters; case 2: return num2 > base.requiredNumberOfEncounters; } Debug.LogError((object)"Switching on invalid stat comparison operation!"); } return false; case 8: return (float)GameStatsManager.Instance.GetNumberPastsBeaten() >= base.comparisonValue; default: Debug.LogError((object)"Switching on invalid prerequisite type!!!"); break; } return false; } } [Serializable] public class CustomHuntQuest : MonsterHuntQuest { [LongEnum] [SerializeField] public CustomDungeonFlags CustomQuestFlag; [LongEnum] [SerializeField] public List CustomFlagsToSetUponReward; [SerializeField] public Func ValidTargetCheck; [SerializeField] public JammedEnemyState RequiredEnemyState; public bool IsQuestComplete() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (CustomQuestFlag != CustomDungeonFlags.NONE && AdvancedGameStatsManager.Instance.GetFlag(CustomQuestFlag)) { return true; } return GameStatsManager.Instance.GetFlag(base.QuestFlag); } public bool IsEnemyValid(AIActor enemy, MonsterHuntProgress progress) { if (ValidTargetCheck != null && !ValidTargetCheck(enemy, progress)) { return false; } return SaveTools.IsEnemyStateValid(enemy, RequiredEnemyState); } public void Complete() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) if ((int)base.QuestFlag > 0) { GameStatsManager.Instance.SetFlag(base.QuestFlag, true); } if (CustomQuestFlag != CustomDungeonFlags.NONE) { AdvancedGameStatsManager.Instance.SetFlag(CustomQuestFlag, value: true); } } public void UnlockRewards() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < base.FlagsToSetUponReward.Count; i++) { GameStatsManager.Instance.SetFlag(base.FlagsToSetUponReward[i], true); } for (int j = 0; j < CustomFlagsToSetUponReward.Count; j++) { AdvancedGameStatsManager.Instance.SetFlag(CustomFlagsToSetUponReward[j], value: true); } } } public static class CustomHuntQuests { private static bool m_loaded; private static Hook huntProgressLoadedHook; private static Hook huntProgressCompleteHook; private static Hook huntProgressQuestCompleteHook; private static Hook huntProgressNextQuestHook; private static Hook huntProgressProcessKillHook; private static Hook huntQuestCompleteHook; private static Hook huntQuestUnlockRewardsHook; public static MonsterHuntData HuntData; public static List addedOrderedQuests; public static List addedProceduralQuests; public static void DoSetup() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown if (!m_loaded) { HuntData = (MonsterHuntData)BraveResources.Load("Monster Hunt Data", ".asset"); huntProgressLoadedHook = new Hook((MethodBase)typeof(MonsterHuntProgress).GetMethod("OnLoaded"), typeof(CustomHuntQuests).GetMethod("HuntProgressLoadedHook")); huntProgressCompleteHook = new Hook((MethodBase)typeof(MonsterHuntProgress).GetMethod("Complete"), typeof(CustomHuntQuests).GetMethod("HuntProgressCompleteHook")); huntProgressQuestCompleteHook = new Hook((MethodBase)typeof(MonsterHuntProgress).GetMethod("IsQuestComplete"), typeof(CustomHuntQuests).GetMethod("HuntProgressQuestCompleteHook")); huntProgressNextQuestHook = new Hook((MethodBase)typeof(MonsterHuntProgress).GetMethod("TriggerNextQuest"), typeof(CustomHuntQuests).GetMethod("HuntProgressNextQuestHook")); huntProgressProcessKillHook = new Hook((MethodBase)typeof(MonsterHuntProgress).GetMethod("ProcessKill"), typeof(CustomHuntQuests).GetMethod("HuntProgressProcessKillHook")); huntQuestCompleteHook = new Hook((MethodBase)typeof(MonsterHuntQuest).GetMethod("IsQuestComplete"), typeof(CustomHuntQuests).GetMethod("HuntQuestCompleteHook")); huntQuestUnlockRewardsHook = new Hook((MethodBase)typeof(MonsterHuntQuest).GetMethod("UnlockRewards"), typeof(CustomHuntQuests).GetMethod("HuntQuestUnlockRewardsHook")); m_loaded = true; } } public static void Unload() { if (!m_loaded) { return; } if (addedOrderedQuests != null) { foreach (MonsterHuntQuest addedOrderedQuest in addedOrderedQuests) { if (HuntData.OrderedQuests.Contains(addedOrderedQuest)) { HuntData.OrderedQuests.Remove(addedOrderedQuest); } } addedOrderedQuests.Clear(); addedOrderedQuests = null; } if (addedProceduralQuests != null) { foreach (MonsterHuntQuest addedProceduralQuest in addedProceduralQuests) { if (HuntData.ProceduralQuests.Contains(addedProceduralQuest)) { HuntData.ProceduralQuests.Remove(addedProceduralQuest); } } addedProceduralQuests.Clear(); addedProceduralQuests = null; } if (GameStatsManager.HasInstance && GameStatsManager.Instance.huntProgress != null) { GameStatsManager.Instance.huntProgress.OnLoaded(); } else { int? num = null; if (AdvancedGameStatsManager.HasInstance) { num = AdvancedGameStatsManager.Instance.cachedHuntIndex; AdvancedGameStatsManager.Save(); } GameStatsManager.Load(); if (num.HasValue && AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.cachedHuntIndex = num.Value; } } HuntData = null; Hook obj = huntProgressLoadedHook; if (obj != null) { obj.Dispose(); } Hook obj2 = huntProgressCompleteHook; if (obj2 != null) { obj2.Dispose(); } Hook obj3 = huntProgressNextQuestHook; if (obj3 != null) { obj3.Dispose(); } Hook obj4 = huntProgressProcessKillHook; if (obj4 != null) { obj4.Dispose(); } Hook obj5 = huntQuestCompleteHook; if (obj5 != null) { obj5.Dispose(); } Hook obj6 = huntQuestUnlockRewardsHook; if (obj6 != null) { obj6.Dispose(); } Hook obj7 = huntProgressQuestCompleteHook; if (obj7 != null) { obj7.Dispose(); } m_loaded = false; } public static void HuntProgressProcessKillHook(Action orig, MonsterHuntProgress self, AIActor target) { if (self.ActiveQuest == null || (self.CurrentActiveMonsterHuntProgress < self.ActiveQuest.NumberKillsRequired && (!(self.ActiveQuest is CustomHuntQuest) || (self.ActiveQuest as CustomHuntQuest).IsEnemyValid(target, self)))) { orig(self, target); } } public static MonsterHuntQuest FindNextQuestNoProcedural() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < HuntData.OrderedQuests.Count; i++) { if (!GameStatsManager.Instance.GetFlag(HuntData.OrderedQuests[i].QuestFlag)) { return HuntData.OrderedQuests[i]; } } return null; } public static int HuntProgressNextQuestHook(Func orig, MonsterHuntProgress self) { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Invalid comparison between Unknown and I4 MonsterHuntQuest val = null; int num = 0; for (int i = 0; i < HuntData.OrderedQuests.Count; i++) { if (HuntData.OrderedQuests[i] != null && !HuntData.OrderedQuests[i].IsQuestComplete()) { val = HuntData.OrderedQuests[i]; num = i; break; } } List orderedQuests = HuntData.OrderedQuests; List list = new List(); for (int j = 0; j < orderedQuests.Count; j++) { if (orderedQuests[j] != null && (int)orderedQuests[j].QuestFlag > 0) { list.Add(orderedQuests[j]); } } HuntData.OrderedQuests = list; int result = orig(self); MonsterHuntQuest val2 = FindNextQuestNoProcedural(); HuntData.OrderedQuests = orderedQuests; if (self.ActiveQuest != null && val2 != null && HuntData.OrderedQuests.IndexOf(self.ActiveQuest) != self.CurrentActiveMonsterHuntID) { self.CurrentActiveMonsterHuntID = HuntData.OrderedQuests.IndexOf(self.ActiveQuest); } if (val != null && val2 == null) { self.ActiveQuest = val; self.CurrentActiveMonsterHuntID = num; self.CurrentActiveMonsterHuntProgress = 0; } else if (val != null && val2 != null && num < self.CurrentActiveMonsterHuntID) { self.ActiveQuest = val; self.CurrentActiveMonsterHuntID = num; self.CurrentActiveMonsterHuntProgress = 0; } return result; } public static void HuntProgressCompleteHook(Action orig, MonsterHuntProgress self) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Invalid comparison between Unknown and I4 //IL_0057: Unknown result type (might be due to invalid IL or missing references) GungeonFlags questFlag = self.ActiveQuest.QuestFlag; bool flag = GameStatsManager.Instance.GetFlag((GungeonFlags)1); if (self.ActiveQuest is CustomHuntQuest) { (self.ActiveQuest as CustomHuntQuest).Complete(); if ((int)self.ActiveQuest.QuestFlag == 0) { self.ActiveQuest.QuestFlag = (GungeonFlags)1; } } orig(self); GameStatsManager.Instance.SetFlag((GungeonFlags)1, flag); self.ActiveQuest.QuestFlag = questFlag; } public static bool HuntQuestCompleteHook(Func orig, MonsterHuntQuest self) { if (self is CustomHuntQuest) { return (self as CustomHuntQuest).IsQuestComplete(); } return orig(self); } public static bool HuntProgressQuestCompleteHook(Func orig, MonsterHuntProgress self) { if (self.ActiveQuest is CustomHuntQuest) { return (self.ActiveQuest as CustomHuntQuest).IsQuestComplete(); } return orig(self); } public static void HuntQuestUnlockRewardsHook(Action orig, MonsterHuntQuest self) { if (self is CustomHuntQuest) { (self as CustomHuntQuest).UnlockRewards(); } else { orig(self); } } public static void HuntProgressLoadedHook(Action orig, MonsterHuntProgress self) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown if (GameManager.HasInstance) { if (GameManager.Instance.platformInterface == null) { if (PlatformInterfaceSteam.IsSteamBuild()) { GameManager.Instance.platformInterface = (PlatformInterface)new PlatformInterfaceSteam(); } else if (PlatformInterfaceGalaxy.IsGalaxyBuild()) { GameManager.Instance.platformInterface = (PlatformInterface)new PlatformInterfaceGalaxy(); } else { GameManager.Instance.platformInterface = (PlatformInterface)new PlatformInterfaceGenericPC(); } } GameManager.Instance.platformInterface.Start(); } FieldInfo field = typeof(GameStatsManager).GetField("s_frifleHuntFlags", BindingFlags.Static | BindingFlags.NonPublic); FieldInfo field2 = typeof(GameStatsManager).GetField("s_pastFlags", BindingFlags.Static | BindingFlags.NonPublic); FieldInfo field3 = typeof(GameStatsManager).GetField("s_npcFoyerFlags", BindingFlags.Static | BindingFlags.NonPublic); if (field2.GetValue(null) == null) { List list = new List(); list.Add((GungeonFlags)18001); list.Add((GungeonFlags)18002); list.Add((GungeonFlags)18003); list.Add((GungeonFlags)18004); field2.SetValue(null, list); } if (field3.GetValue(null) == null) { List list2 = new List(); list2.Add((GungeonFlags)40005); list2.Add((GungeonFlags)27505); list2.Add((GungeonFlags)55505); list2.Add((GungeonFlags)24505); list2.Add((GungeonFlags)2003); list2.Add((GungeonFlags)45500); list2.Add((GungeonFlags)30005); list2.Add((GungeonFlags)25506); list2.Add((GungeonFlags)28501); list2.Add((GungeonFlags)35051); field3.SetValue(null, list2); } if (field.GetValue(null) == null) { List list3 = new List(); list3.Add((GungeonFlags)35101); list3.Add((GungeonFlags)35102); list3.Add((GungeonFlags)35103); list3.Add((GungeonFlags)35104); list3.Add((GungeonFlags)35105); list3.Add((GungeonFlags)35106); list3.Add((GungeonFlags)35107); list3.Add((GungeonFlags)35108); list3.Add((GungeonFlags)35109); list3.Add((GungeonFlags)35110); list3.Add((GungeonFlags)35111); list3.Add((GungeonFlags)35112); list3.Add((GungeonFlags)35113); list3.Add((GungeonFlags)35114); list3.Add((GungeonFlags)35500); field.SetValue(null, list3); } MonsterHuntQuest val = null; bool flag = GameStatsManager.Instance.GetFlag((GungeonFlags)35500); foreach (MonsterHuntQuest orderedQuest in HuntData.OrderedQuests) { if (orderedQuest != null && !orderedQuest.IsReallyCompleted()) { val = orderedQuest; } } if (val != null) { GameStatsManager.Instance.SetFlag((GungeonFlags)35500, false); } if (SaveAPIManager.IsFirstLoad) { if (!AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Load(); } AdvancedGameStatsManager.Instance.cachedHuntIndex = self.CurrentActiveMonsterHuntID; } else { if (!AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Load(); } if (AdvancedGameStatsManager.HasInstance && self.CurrentActiveMonsterHuntID == -1 && AdvancedGameStatsManager.Instance.cachedHuntIndex != -1) { if (GameStatsManager.Instance.GetFlag((GungeonFlags)35500) && GameStatsManager.Instance.GetFlag((GungeonFlags)36015)) { if (AdvancedGameStatsManager.Instance.cachedHuntIndex >= 0 && AdvancedGameStatsManager.Instance.cachedHuntIndex < HuntData.ProceduralQuests.Count) { self.CurrentActiveMonsterHuntID = AdvancedGameStatsManager.Instance.cachedHuntIndex; AdvancedGameStatsManager.Instance.cachedHuntIndex = -1; } } else if (AdvancedGameStatsManager.Instance.cachedHuntIndex >= 0 || AdvancedGameStatsManager.Instance.cachedHuntIndex < HuntData.OrderedQuests.Count) { self.CurrentActiveMonsterHuntID = AdvancedGameStatsManager.Instance.cachedHuntIndex; AdvancedGameStatsManager.Instance.cachedHuntIndex = -1; } } } orig(self); if (val == null && !GameStatsManager.Instance.GetFlag((GungeonFlags)35500)) { flag = true; List list4 = (List)field.GetValue(null); if (list4 != null) { int num = 0; for (int i = 0; i < list4.Count; i++) { num++; } if ((Object)(object)GameManager.Instance == (Object)null && GameManager.Instance.platformInterface == null) { GameManager.Instance.platformInterface.SetStat((PlatformStat)7, num); } } } GameStatsManager.Instance.SetFlag((GungeonFlags)35500, flag); } public static MonsterHuntQuest AddProceduralQuest(List questIntroConversation, string targetEnemyName, List targetEnemyGuids, int numberKillsRequired, JammedEnemyState requiredState = JammedEnemyState.NoCheck, Func validTargetCheck = null, List rewardFlags = null, List customRewardFlags = null) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) string text = "#CUSTOMQUEST_PROCEDURAL_" + Guid.NewGuid().ToString().ToUpper() + "_" + Guid.NewGuid().ToString().ToUpper(); string text2 = text + "_INTRO"; string text3 = text + "_TARGET"; Databases.Strings.Core.SetComplex(text2, questIntroConversation.ToArray()); Databases.Strings.Core.Set(text3, targetEnemyName); return AddProceduralQuest((MonsterHuntQuest)(object)new CustomHuntQuest { QuestFlag = (GungeonFlags)0, QuestIntroString = text2, TargetStringKey = text3, ValidTargetMonsterGuids = SaveTools.CloneList(targetEnemyGuids), FlagsToSetUponReward = ((rewardFlags != null) ? SaveTools.CloneList(rewardFlags) : new List()), CustomFlagsToSetUponReward = ((customRewardFlags != null) ? SaveTools.CloneList(customRewardFlags) : new List()), NumberKillsRequired = numberKillsRequired, RequiredEnemyState = requiredState, ValidTargetCheck = validTargetCheck, CustomQuestFlag = CustomDungeonFlags.NONE }); } public static MonsterHuntQuest AddProceduralQuest(List questIntroConversation, string targetEnemyName, List targetEnemies, int numberKillsRequired, JammedEnemyState requiredState = JammedEnemyState.NoCheck, Func validTargetCheck = null, List rewardFlags = null, List customRewardFlags = null) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) string text = "#CUSTOMQUEST_PROCEDURAL_" + Guid.NewGuid().ToString().ToUpper() + "_" + Guid.NewGuid().ToString().ToUpper(); string text2 = text + "_INTRO"; string text3 = text + "_TARGET"; Databases.Strings.Core.SetComplex(text2, questIntroConversation.ToArray()); Databases.Strings.Core.Set(text3, targetEnemyName); return AddProceduralQuest((MonsterHuntQuest)(object)new CustomHuntQuest { QuestFlag = (GungeonFlags)0, QuestIntroString = text2, TargetStringKey = text3, ValidTargetMonsterGuids = targetEnemies.Convert((AIActor enemy) => enemy.EnemyGuid), FlagsToSetUponReward = ((rewardFlags != null) ? SaveTools.CloneList(rewardFlags) : new List()), CustomFlagsToSetUponReward = ((customRewardFlags != null) ? SaveTools.CloneList(customRewardFlags) : new List()), NumberKillsRequired = numberKillsRequired, RequiredEnemyState = requiredState, ValidTargetCheck = validTargetCheck, CustomQuestFlag = CustomDungeonFlags.NONE }); } public static MonsterHuntQuest AddQuest(CustomDungeonFlags questFlag, List questIntroConversation, string targetEnemyName, List targetEnemyGuids, int numberKillsRequired, List rewardFlags = null, List customRewardFlags = null, JammedEnemyState requiredState = JammedEnemyState.NoCheck, Func validTargetCheck = null, int? index = null) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) string text = "#CUSTOMQUEST_" + questFlag.ToString() + "_" + Guid.NewGuid().ToString().ToUpper(); string text2 = text + "_INTRO"; string text3 = text + "_TARGET"; Databases.Strings.Core.SetComplex(text2, questIntroConversation.ToArray()); Databases.Strings.Core.Set(text3, targetEnemyName); return AddQuest((MonsterHuntQuest)(object)new CustomHuntQuest { QuestFlag = (GungeonFlags)0, QuestIntroString = text2, TargetStringKey = text3, ValidTargetMonsterGuids = SaveTools.CloneList(targetEnemyGuids), FlagsToSetUponReward = ((rewardFlags != null) ? SaveTools.CloneList(rewardFlags) : new List()), CustomFlagsToSetUponReward = ((customRewardFlags != null) ? SaveTools.CloneList(customRewardFlags) : new List()), NumberKillsRequired = numberKillsRequired, RequiredEnemyState = requiredState, ValidTargetCheck = validTargetCheck, CustomQuestFlag = questFlag }, index); } public static MonsterHuntQuest AddQuest(GungeonFlags questFlag, List questIntroConversation, string targetEnemyName, List targetEnemyGuids, int numberKillsRequired, List rewardFlags = null, List customRewardFlags = null, JammedEnemyState requiredState = JammedEnemyState.NoCheck, Func validTargetCheck = null, int? index = null) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) string text = "#CUSTOMQUEST_" + ((object)(GungeonFlags)(ref questFlag)).ToString() + "_" + Guid.NewGuid().ToString().ToUpper(); string text2 = text + "_INTRO"; string text3 = text + "_TARGET"; Databases.Strings.Core.SetComplex(text2, questIntroConversation.ToArray()); Databases.Strings.Core.Set(text3, targetEnemyName); return AddQuest((MonsterHuntQuest)(object)new CustomHuntQuest { QuestFlag = questFlag, QuestIntroString = text2, TargetStringKey = text3, ValidTargetMonsterGuids = SaveTools.CloneList(targetEnemyGuids), FlagsToSetUponReward = ((rewardFlags != null) ? SaveTools.CloneList(rewardFlags) : new List()), CustomFlagsToSetUponReward = ((customRewardFlags != null) ? SaveTools.CloneList(customRewardFlags) : new List()), NumberKillsRequired = numberKillsRequired, RequiredEnemyState = requiredState, ValidTargetCheck = validTargetCheck, CustomQuestFlag = CustomDungeonFlags.NONE }, index); } public static MonsterHuntQuest AddQuest(CustomDungeonFlags questFlag, List questIntroConversation, string targetEnemyName, List targetEnemies, int numberKillsRequired, List rewardFlags = null, List customRewardFlags = null, JammedEnemyState requiredState = JammedEnemyState.NoCheck, Func validTargetCheck = null, int? index = null) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) string text = "#CUSTOMQUEST_" + questFlag.ToString() + "_" + Guid.NewGuid().ToString().ToUpper(); string text2 = text + "_INTRO"; string text3 = text + "_TARGET"; Databases.Strings.Core.SetComplex(text2, questIntroConversation.ToArray()); Databases.Strings.Core.Set(text3, targetEnemyName); return AddQuest((MonsterHuntQuest)(object)new CustomHuntQuest { QuestFlag = (GungeonFlags)0, QuestIntroString = text2, TargetStringKey = text3, ValidTargetMonsterGuids = targetEnemies.Convert((AIActor enemy) => enemy.EnemyGuid), FlagsToSetUponReward = ((rewardFlags != null) ? SaveTools.CloneList(rewardFlags) : new List()), CustomFlagsToSetUponReward = ((customRewardFlags != null) ? SaveTools.CloneList(customRewardFlags) : new List()), NumberKillsRequired = numberKillsRequired, RequiredEnemyState = requiredState, ValidTargetCheck = validTargetCheck, CustomQuestFlag = questFlag }, index); } public static MonsterHuntQuest AddQuest(GungeonFlags questFlag, List questIntroConversation, string targetEnemyName, List targetEnemies, int numberKillsRequired, List rewardFlags = null, List customRewardFlags = null, JammedEnemyState requiredState = JammedEnemyState.NoCheck, Func validTargetCheck = null, int? index = null) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) string text = "#CUSTOMQUEST_" + ((object)(GungeonFlags)(ref questFlag)).ToString() + "_" + Guid.NewGuid().ToString().ToUpper(); string text2 = text + "_INTRO"; string text3 = text + "_TARGET"; Databases.Strings.Core.SetComplex(text2, questIntroConversation.ToArray()); Databases.Strings.Core.Set(text3, targetEnemyName); return AddQuest((MonsterHuntQuest)(object)new CustomHuntQuest { QuestFlag = questFlag, QuestIntroString = text2, TargetStringKey = text3, ValidTargetMonsterGuids = targetEnemies.Convert((AIActor enemy) => enemy.EnemyGuid), FlagsToSetUponReward = ((rewardFlags != null) ? SaveTools.CloneList(rewardFlags) : new List()), CustomFlagsToSetUponReward = ((customRewardFlags != null) ? SaveTools.CloneList(customRewardFlags) : new List()), NumberKillsRequired = numberKillsRequired, RequiredEnemyState = requiredState, ValidTargetCheck = validTargetCheck, CustomQuestFlag = CustomDungeonFlags.NONE }, index); } public static MonsterHuntQuest AddQuest(MonsterHuntQuest quest, int? index = null) { if ((Object)(object)HuntData == (Object)null) { DoSetup(); } if (!index.HasValue) { HuntData.OrderedQuests.Add(quest); } else if (index.Value < 0) { HuntData.OrderedQuests.Add(quest); } else { HuntData.OrderedQuests.InsertOrAdd(index.Value, quest); } if (GameStatsManager.HasInstance && GameStatsManager.Instance.huntProgress != null) { GameStatsManager.Instance.huntProgress.OnLoaded(); } else { int? num = null; if (AdvancedGameStatsManager.HasInstance) { num = AdvancedGameStatsManager.Instance.cachedHuntIndex; AdvancedGameStatsManager.Save(); } GameStatsManager.Load(); if (num.HasValue && AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.cachedHuntIndex = num.Value; } } if (addedOrderedQuests == null) { addedOrderedQuests = new List(); } addedOrderedQuests.Add(quest); return quest; } public static MonsterHuntQuest AddProceduralQuest(MonsterHuntQuest quest) { if ((Object)(object)HuntData == (Object)null) { DoSetup(); } HuntData.ProceduralQuests.Add(quest); if (GameStatsManager.HasInstance && GameStatsManager.Instance.huntProgress != null) { GameStatsManager.Instance.huntProgress.OnLoaded(); } else { int? num = null; if (AdvancedGameStatsManager.HasInstance) { num = AdvancedGameStatsManager.Instance.cachedHuntIndex; AdvancedGameStatsManager.Save(); } GameStatsManager.Load(); if (num.HasValue && AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.cachedHuntIndex = num.Value; } } if (addedProceduralQuests == null) { addedProceduralQuests = new List(); } addedProceduralQuests.Add(quest); return quest; } } public class CustomDungeonFlagsComparer : IEqualityComparer { public bool Equals(CustomDungeonFlags x, CustomDungeonFlags y) { return x == y; } public int GetHashCode(CustomDungeonFlags obj) { return (int)obj; } } public class CustomTrackedMaximumsComparer : IEqualityComparer { public bool Equals(CustomTrackedMaximums x, CustomTrackedMaximums y) { return x == y; } public int GetHashCode(CustomTrackedMaximums obj) { return (int)obj; } } public class CustomTrackedStatsComparer : IEqualityComparer { public bool Equals(CustomTrackedStats x, CustomTrackedStats y) { return x == y; } public int GetHashCode(CustomTrackedStats obj) { return (int)obj; } } public enum CustomCharacterSpecificGungeonFlags { NONE, EXAMPLE_CHARACTER_SPECIFIC_FLAG, EXAMPLE_ENEMY_DEATH_CHARACTER_SPECIFIC_FLAG } public enum CustomDungeonFlags { NOLLA, NONE, TEST_UNLOCK, FULL_POWER, FIRST_FLOOR_NO_MODULES, BEAT_FLOOR_3, BEAT_DRAGUN_AS_MODULAR, BEAT_LICH_AS_MODULAR, BEAT_OLD_KING_AS_MODULAR, BEAT_ADVANCED_DRAGUN_AS_MODULAR, BEAT_RAT_AS_MODULAR, LEAD_GOD_AS_MODULAR, BOSS_RUSH_AS_MODULAR, PAST, OVERLOADED, BEAT_DRAGUN_WITH_3_ACTIVE_MODULES_OR_LESS, BEAT_LICH_WITH_4_MODULES_OR_LESS, PAST_ALT_SKIN, CRATE_DROP, CHECKED_ALL_ADVICE, PAST_MASTERY, DO_NOT_CHANGE, CHALLENGEMODE_DRAGUN, CHALLENGEMODE_LICH, BLESSED_MODE } public enum CustomTrackedMaximums { EXAMPLE_MAXIMUM } public enum CustomTrackedStats { ENCOUNTERS_OF_COFIDENCE, ENCOUNTERS_OF_PREDEFINED } public enum JammedEnemyState { NoCheck, Jammed, Unjammed } public static class SaveAPIManager { public delegate void OnActiveGameDataClearedDelegate(GameManager manager, bool destroyGameManager, bool endSession); private static Hook saveHook; private static Hook loadHook; private static Hook resetHook; private static Hook beginSessionHook; private static Hook endSessionHook; private static Hook clearAllStatsHook; private static Hook deleteMidGameSaveHook; private static Hook midgameSaveHook; private static Hook invalidateSaveHook; private static Hook revalidateSaveHook; private static Hook frameDelayedInitizlizationHook; private static Hook moveSessionStatsHook; private static Hook prerequisiteHook; private static Hook clearActiveGameDataHook; private static Hook aiactorRewardsHook; private static Hook aiactorEngagedHook; private static bool m_loaded; public static SaveType AdvancedGameSave; public static SaveType AdvancedMidGameSave; public static OnActiveGameDataClearedDelegate OnActiveGameDataCleared; private static bool FirstLoad; public static bool IsFirstLoad => FirstLoad; public static void Setup(string prefix) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00a0: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00d3: 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_0102: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Expected O, but got Unknown //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Expected O, but got Unknown //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Expected O, but got Unknown //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Expected O, but got Unknown //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Expected O, but got Unknown //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Expected O, but got Unknown //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Expected O, but got Unknown //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Expected O, but got Unknown if (!m_loaded) { AdvancedGameSave = new SaveType { filePattern = "Slot{0}." + prefix + "Save", encrypted = true, backupCount = 3, backupPattern = "Slot{0}." + prefix + "Backup.{1}", backupMinTimeMin = 45, legacyFilePattern = prefix + "GameStatsSlot{0}.txt" }; AdvancedMidGameSave = new SaveType { filePattern = "Active{0}." + prefix + "Game", legacyFilePattern = prefix + "ActiveSlot{0}.txt", encrypted = true, backupCount = 0, backupPattern = "Active{0}." + prefix + "Backup.{1}", backupMinTimeMin = 60 }; for (int i = 0; i < 3; i++) { SaveSlot val = (SaveSlot)i; SaveTools.SafeMove(Path.Combine(SaveManager.OldSavePath, string.Format(AdvancedGameSave.legacyFilePattern, val)), Path.Combine(SaveManager.OldSavePath, string.Format(AdvancedGameSave.filePattern, val))); SaveTools.SafeMove(Path.Combine(SaveManager.OldSavePath, string.Format(AdvancedGameSave.filePattern, val)), Path.Combine(SaveManager.OldSavePath, string.Format(AdvancedGameSave.filePattern, val))); SaveTools.SafeMove(SaveTools.PathCombine(SaveManager.SavePath, "01", string.Format(AdvancedGameSave.filePattern, val)), Path.Combine(SaveManager.SavePath, string.Format(AdvancedGameSave.filePattern, val)), allowOverwritting: true); } CustomHuntQuests.DoSetup(); saveHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("Save", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("SaveHook")); loadHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("Load", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("LoadHook")); resetHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("DANGEROUS_ResetAllStats", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("ResetHook")); beginSessionHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("BeginNewSession", BindingFlags.Instance | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("BeginSessionHook")); endSessionHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("EndSession", BindingFlags.Instance | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("EndSessionHook")); clearAllStatsHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("ClearAllStatsGlobal", BindingFlags.Instance | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("ClearAllStatsHook")); deleteMidGameSaveHook = new Hook((MethodBase)typeof(SaveManager).GetMethod("DeleteCurrentSlotMidGameSave", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("DeleteMidGameSaveHook")); midgameSaveHook = new Hook((MethodBase)typeof(GameManager).GetMethod("DoMidgameSave", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("MidgameSaveHook")); invalidateSaveHook = new Hook((MethodBase)typeof(GameManager).GetMethod("InvalidateMidgameSave", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("InvalidateSaveHook")); revalidateSaveHook = new Hook((MethodBase)typeof(GameManager).GetMethod("RevalidateMidgameSave", BindingFlags.Static | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("RevalidateSaveHook")); frameDelayedInitizlizationHook = new Hook((MethodBase)typeof(Dungeon).GetMethod("FrameDelayedMidgameInitialization", BindingFlags.Instance | BindingFlags.NonPublic), typeof(SaveAPIManager).GetMethod("FrameDelayedInitizlizationHook")); moveSessionStatsHook = new Hook((MethodBase)typeof(GameStatsManager).GetMethod("MoveSessionStatsToSavedSessionStats", BindingFlags.Instance | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("MoveSessionStatsHook")); prerequisiteHook = new Hook((MethodBase)typeof(DungeonPrerequisite).GetMethod("CheckConditionsFulfilled", BindingFlags.Instance | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("PrerequisiteHook")); clearActiveGameDataHook = new Hook((MethodBase)typeof(GameManager).GetMethod("ClearActiveGameData", BindingFlags.Instance | BindingFlags.Public), typeof(SaveAPIManager).GetMethod("ClearActiveGameDataHook")); aiactorRewardsHook = new Hook((MethodBase)typeof(AIActor).GetMethod("HandleRewards", BindingFlags.Instance | BindingFlags.NonPublic), typeof(SaveAPIManager).GetMethod("AIActorRewardsHook")); aiactorEngagedHook = new Hook((MethodBase)typeof(AIActor).GetMethod("OnEngaged", BindingFlags.Instance | BindingFlags.NonPublic), typeof(SaveAPIManager).GetMethod("AIActorEngagedHook")); LoadGameStatsFirstLoad(); BreachShopTool.DoSetup(); m_loaded = true; } } public static void Reload(string prefix) { Unload(); Setup(prefix); } private static void LoadGameStatsFirstLoad() { bool firstLoad = FirstLoad; FirstLoad = true; GameStatsManager.Load(); FirstLoad = firstLoad; } public static void Unload() { if (m_loaded) { AdvancedGameSave = null; AdvancedMidGameSave = null; Hook obj = saveHook; if (obj != null) { obj.Dispose(); } Hook obj2 = loadHook; if (obj2 != null) { obj2.Dispose(); } Hook obj3 = resetHook; if (obj3 != null) { obj3.Dispose(); } Hook obj4 = beginSessionHook; if (obj4 != null) { obj4.Dispose(); } Hook obj5 = endSessionHook; if (obj5 != null) { obj5.Dispose(); } Hook obj6 = clearAllStatsHook; if (obj6 != null) { obj6.Dispose(); } Hook obj7 = deleteMidGameSaveHook; if (obj7 != null) { obj7.Dispose(); } Hook obj8 = midgameSaveHook; if (obj8 != null) { obj8.Dispose(); } Hook obj9 = invalidateSaveHook; if (obj9 != null) { obj9.Dispose(); } Hook obj10 = revalidateSaveHook; if (obj10 != null) { obj10.Dispose(); } Hook obj11 = frameDelayedInitizlizationHook; if (obj11 != null) { obj11.Dispose(); } Hook obj12 = moveSessionStatsHook; if (obj12 != null) { obj12.Dispose(); } Hook obj13 = prerequisiteHook; if (obj13 != null) { obj13.Dispose(); } Hook obj14 = clearActiveGameDataHook; if (obj14 != null) { obj14.Dispose(); } Hook obj15 = aiactorRewardsHook; if (obj15 != null) { obj15.Dispose(); } Hook obj16 = aiactorEngagedHook; if (obj16 != null) { obj16.Dispose(); } CustomHuntQuests.Unload(); AdvancedGameStatsManager.Save(); AdvancedGameStatsManager.Unload(); BreachShopTool.Unload(); m_loaded = false; } } public static bool GetFlag(CustomDungeonFlags flag) { if (!AdvancedGameStatsManager.HasInstance) { return false; } return AdvancedGameStatsManager.Instance.GetFlag(flag); } public static float GetPlayerStatValue(CustomTrackedStats stat) { if (!AdvancedGameStatsManager.HasInstance) { return 0f; } return AdvancedGameStatsManager.Instance.GetPlayerStatValue(stat); } public static float GetSessionStatValue(CustomTrackedStats stat) { if (AdvancedGameStatsManager.HasInstance && AdvancedGameStatsManager.Instance.IsInSession) { return AdvancedGameStatsManager.Instance.GetSessionStatValue(stat); } return 0f; } public static float GetCharacterStatValue(PlayableCharacters character, CustomTrackedStats stat) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (AdvancedGameStatsManager.HasInstance) { return AdvancedGameStatsManager.Instance.GetCharacterStatValue(character, stat); } return 0f; } public static float GetCharacterStatValue(CustomTrackedStats stat) { if (AdvancedGameStatsManager.HasInstance) { if (GameManager.HasInstance && (Object)(object)GameManager.Instance.PrimaryPlayer != (Object)null) { return AdvancedGameStatsManager.Instance.GetCharacterStatValue(stat); } return AdvancedGameStatsManager.Instance.GetCharacterStatValue((PlayableCharacters)0, stat); } return 0f; } public static bool GetCharacterSpecificFlag(CustomCharacterSpecificGungeonFlags flag) { if (AdvancedGameStatsManager.HasInstance) { if (AdvancedGameStatsManager.Instance.IsInSession) { return AdvancedGameStatsManager.Instance.GetCharacterSpecificFlag(flag); } return AdvancedGameStatsManager.Instance.GetCharacterSpecificFlag((PlayableCharacters)0, flag); } return false; } public static bool GetCharacterSpecificFlag(PlayableCharacters character, CustomCharacterSpecificGungeonFlags flag) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (AdvancedGameStatsManager.HasInstance) { return AdvancedGameStatsManager.Instance.GetCharacterSpecificFlag(character, flag); } return false; } public static float GetPlayerMaximum(CustomTrackedMaximums maximum) { if (AdvancedGameStatsManager.HasInstance) { return AdvancedGameStatsManager.Instance.GetPlayerMaximum(maximum); } return 0f; } public static void SetFlag(CustomDungeonFlags flag, bool value) { if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.SetFlag(flag, value); } } public static void SetStat(CustomTrackedStats stat, float value) { if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.SetStat(stat, value); } } public static void RegisterStatChange(CustomTrackedStats stat, float value) { if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.RegisterStatChange(stat, value); } } public static void UpdateMaximum(CustomTrackedMaximums maximum, float value) { if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.UpdateMaximum(maximum, value); } } public static void SetCharacterSpecificFlag(CustomCharacterSpecificGungeonFlags flag, bool value) { if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.SetCharacterSpecificFlag(flag, value); } } public static void SetCharacterSpecificFlag(PlayableCharacters character, CustomCharacterSpecificGungeonFlags flag, bool value) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.SetCharacterSpecificFlag(character, flag, value); } } public static void AIActorEngagedHook(Action orig, AIActor self, bool isReinforcement) { if (!self.HasBeenEngaged && self.SetsCustomFlagOnActivation()) { AdvancedGameStatsManager.Instance.SetFlag(self.GetCustomFlagToSetOnActivation(), value: true); } orig(self, isReinforcement); } public static void AIActorRewardsHook(Action orig, AIActor self) { FieldInfo field = typeof(AIActor).GetField("m_hasGivenRewards", BindingFlags.Instance | BindingFlags.NonPublic); if (!(bool)field.GetValue(self) && !self.IsTransmogrified) { if (self.SetsCustomFlagOnDeath()) { AdvancedGameStatsManager.Instance.SetFlag(self.GetCustomFlagToSetOnDeath(), value: true); } if (self.SetsCustomCharacterSpecificFlagOnDeath()) { AdvancedGameStatsManager.Instance.SetCharacterSpecificFlag(self.GetCustomCharacterSpecificFlagToSetOnDeath(), value: true); } } orig(self); } public static bool SaveHook(Func orig) { bool result = orig(); AdvancedGameStatsManager.Save(); return result; } public static void LoadHook(Action orig) { AdvancedGameStatsManager.Load(); orig(); } public static void ResetHook(Action orig) { AdvancedGameStatsManager.DANGEROUS_ResetAllStats(); orig(); } public static void BeginSessionHook(Action orig, GameStatsManager self, PlayerController player) { orig(self, player); AdvancedGameStatsManager.Instance.BeginNewSession(player); } public static void EndSessionHook(Action orig, GameStatsManager self, bool recordSessionStats, bool decrementDifferentiator = true) { orig(self, recordSessionStats, decrementDifferentiator); AdvancedGameStatsManager.Instance.EndSession(recordSessionStats); } public static void ClearAllStatsHook(Action orig, GameStatsManager self) { orig(self); AdvancedGameStatsManager.Instance.ClearAllStatsGlobal(); } public static void DeleteMidGameSaveHook(Action orig, SaveSlot? overrideSaveSlot) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig(overrideSaveSlot); if (AdvancedGameStatsManager.HasInstance) { AdvancedGameStatsManager.Instance.midGameSaveGuid = null; } string path = string.Format(SaveManager.MidGameSave.filePattern, (!overrideSaveSlot.HasValue) ? SaveManager.CurrentSaveSlot : overrideSaveSlot.Value); string path2 = Path.Combine(SaveManager.SavePath, path); if (File.Exists(path2)) { File.Delete(path2); } } public static void MidgameSaveHook(Action orig, ValidTilesets tileset) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) AdvancedGameStatsManager.DoMidgameSave(); orig(tileset); } public static void InvalidateSaveHook(Action orig, bool savestats) { AdvancedGameStatsManager.InvalidateMidgameSave(saveStats: false); orig(savestats); } public static void RevalidateSaveHook(Action orig) { AdvancedGameStatsManager.RevalidateMidgameSave(saveStats: false); orig(); } public static IEnumerator FrameDelayedInitizlizationHook(Func orig, Dungeon self, MidGameSaveData data) { yield return orig(self, data); if (AdvancedGameStatsManager.VerifyAndLoadMidgameSave(out var midgameSave)) { midgameSave.LoadDataFromMidGameSave(); } } public static GameStats MoveSessionStatsHook(Func orig, GameStatsManager self) { AdvancedGameStatsManager.Instance.MoveSessionStatsToSavedSessionStats(); return orig(self); } public static bool PrerequisiteHook(Func orig, DungeonPrerequisite self) { if (self is CustomDungeonPrerequisite) { return (self as CustomDungeonPrerequisite).CheckConditionsFulfilled(); } return orig(self); } public static void ClearActiveGameDataHook(Action orig, GameManager self, bool destroyGameManager, bool endSession) { orig(self, destroyGameManager, endSession); OnActiveGameDataCleared?.Invoke(self, destroyGameManager, endSession); } } public static class SaveTools { public static void SafeMove(string oldPath, string newPath, bool allowOverwritting = false) { if (File.Exists(oldPath) && (allowOverwritting || !File.Exists(newPath))) { string text = SaveManager.ReadAllText(oldPath); try { SaveManager.WriteAllText(newPath, text); } catch (Exception ex) { Debug.LogErrorFormat("Failed to move {0} to {1}: {2}", new object[3] { oldPath, newPath, ex }); return; } try { File.Delete(oldPath); } catch (Exception ex2) { Debug.LogErrorFormat("Failed to delete old file {0}: {1}", new object[3] { oldPath, newPath, ex2 }); return; } if (File.Exists(oldPath + ".bak")) { File.Delete(oldPath + ".bak"); } } } public static bool IsReallyCompleted(this MonsterHuntQuest quest) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_00e3: Unknown result type (might be due to invalid IL or missing references) bool flag = true; foreach (GungeonFlags item in quest.FlagsToSetUponReward) { if ((int)item != 0 && !GameStatsManager.Instance.GetFlag(item)) { flag = false; break; } } if (quest is CustomHuntQuest customHuntQuest) { if (flag) { foreach (CustomDungeonFlags item2 in customHuntQuest.CustomFlagsToSetUponReward) { if (item2 != CustomDungeonFlags.NONE && !AdvancedGameStatsManager.Instance.GetFlag(item2)) { flag = false; break; } } } bool flag2 = false; if ((int)quest.QuestFlag > 0) { flag2 = GameStatsManager.Instance.GetFlag(quest.QuestFlag); } else if (customHuntQuest.CustomQuestFlag != CustomDungeonFlags.NONE) { flag2 = AdvancedGameStatsManager.Instance.GetFlag(customHuntQuest.CustomQuestFlag); } return flag2 && flag; } return GameStatsManager.Instance.GetFlag(quest.QuestFlag) && flag; } public static List Convert(this List self, Func convertor) { List list = new List(); foreach (T item in self) { list.Add(convertor(item)); } return list; } public static bool SetsCustomFlagOnDeath(this AIActor enemy) { return (Object)(object)((Component)enemy).GetComponent() != (Object)null && ((Component)enemy).GetComponent().SetsCustomFlagOnDeath; } public static CustomDungeonFlags GetCustomFlagToSetOnDeath(this AIActor enemy) { return (!((Object)(object)((Component)enemy).GetComponent() != (Object)null) || !((Component)enemy).GetComponent().SetsCustomFlagOnDeath) ? CustomDungeonFlags.NONE : ((Component)enemy).GetComponent().CustomFlagToSetOnDeath; } public static void SetCustomFlagToSetOnDeath(this AIActor enemy, CustomDungeonFlags flag) { SpecialAIActor orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)enemy).gameObject); if (flag == CustomDungeonFlags.NONE) { orAddComponent.SetsCustomFlagOnDeath = false; } else if (flag != CustomDungeonFlags.NONE) { orAddComponent.SetsCustomFlagOnDeath = true; } orAddComponent.CustomFlagToSetOnDeath = flag; } public static bool SetsCustomFlagOnActivation(this AIActor enemy) { return (Object)(object)((Component)enemy).GetComponent() != (Object)null && ((Component)enemy).GetComponent().SetsCustomFlagOnActivation; } public static CustomDungeonFlags GetCustomFlagToSetOnActivation(this AIActor enemy) { return (!((Object)(object)((Component)enemy).GetComponent() != (Object)null) || !((Component)enemy).GetComponent().SetsCustomFlagOnActivation) ? CustomDungeonFlags.NONE : ((Component)enemy).GetComponent().CustomFlagToSetOnActivation; } public static void SetCustomFlagToSetOnActivation(this AIActor enemy, CustomDungeonFlags flag) { SpecialAIActor orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)enemy).gameObject); if (flag == CustomDungeonFlags.NONE) { orAddComponent.SetsCustomFlagOnActivation = false; } else if (flag != CustomDungeonFlags.NONE) { orAddComponent.SetsCustomFlagOnActivation = true; } orAddComponent.CustomFlagToSetOnActivation = flag; } public static bool SetsCustomCharacterSpecificFlagOnDeath(this AIActor enemy) { return (Object)(object)((Component)enemy).GetComponent() != (Object)null && ((Component)enemy).GetComponent().SetsCustomCharacterSpecificFlagOnDeath; } public static CustomCharacterSpecificGungeonFlags GetCustomCharacterSpecificFlagToSetOnDeath(this AIActor enemy) { return ((Object)(object)((Component)enemy).GetComponent() != (Object)null && ((Component)enemy).GetComponent().SetsCustomCharacterSpecificFlagOnDeath) ? ((Component)enemy).GetComponent().CustomCharacterSpecificFlagToSetOnDeath : CustomCharacterSpecificGungeonFlags.NONE; } public static void SetCustomCharacterSpecificFlagToSetOnDeath(this AIActor enemy, CustomCharacterSpecificGungeonFlags flag) { SpecialAIActor orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)enemy).gameObject); if (flag == CustomCharacterSpecificGungeonFlags.NONE) { orAddComponent.SetsCustomCharacterSpecificFlagOnDeath = false; } else if (flag != 0) { orAddComponent.SetsCustomCharacterSpecificFlagOnDeath = true; } orAddComponent.CustomCharacterSpecificFlagToSetOnDeath = flag; } public static string PathCombine(string a, string b, string c) { return Path.Combine(Path.Combine(a, b), c); } public static DungeonPrerequisite SetupUnlockOnFlag(this PickupObject self, GungeonFlags flag, bool requiredFlagValue) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnFlag(flag, requiredFlagValue); } public static DungeonPrerequisite SetupUnlockOnFlag(this EncounterTrackable self, GungeonFlags flag, bool requiredFlagValue) { //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_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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)4, saveFlagToCheck = flag, requireFlag = requiredFlagValue }); } public static DungeonPrerequisite SetupUnlockOnStat(this PickupObject self, TrackedStats stat, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnStat(stat, comparisonValue, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnStat(this EncounterTrackable self, TrackedStats stat, float comparisonValue, PrerequisiteOperation comparisonOperation) { //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_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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)1, statToCheck = stat, prerequisiteOperation = comparisonOperation, comparisonValue = comparisonValue }); } public static DungeonPrerequisite SetupUnlockOnMaximum(this PickupObject self, TrackedMaximums maximum, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnMaximum(maximum, comparisonValue, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnMaximum(this EncounterTrackable self, TrackedMaximums maximum, float comparisonValue, PrerequisiteOperation comparisonOperation) { //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_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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)6, maxToCheck = maximum, prerequisiteOperation = comparisonOperation, comparisonValue = comparisonValue }); } public static DungeonPrerequisite SetupUnlockOnEncounter(this PickupObject self, string encounterObjectGuid, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnEncounter(encounterObjectGuid, requiredNumberOfEncounters, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnEncounter(this EncounterTrackable self, string encounterObjectGuid, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //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_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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)0, encounteredObjectGuid = encounterObjectGuid, requiredNumberOfEncounters = requiredNumberOfEncounters, prerequisiteOperation = comparisonOperation }); } public static DungeonPrerequisite SetupUnlockOnEncounter(this PickupObject self, PrototypeDungeonRoom encounterRoom, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnEncounter(encounterRoom, requiredNumberOfEncounters, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnEncounter(this EncounterTrackable self, PrototypeDungeonRoom encounterRoom, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //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_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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)0, encounteredRoom = encounterRoom, requiredNumberOfEncounters = requiredNumberOfEncounters, prerequisiteOperation = comparisonOperation }); } public static DungeonPrerequisite SetupUnlockOnEncounterOrFlag(this PickupObject self, GungeonFlags flag, bool requiredFlagValue, string encounterObjectGuid, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnEncounterOrFlag(flag, requiredFlagValue, encounterObjectGuid, requiredNumberOfEncounters, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnEncounterOrFlag(this EncounterTrackable self, GungeonFlags flag, bool requiredFlagValue, string encounterObjectGuid, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //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_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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)7, saveFlagToCheck = flag, requireFlag = requiredFlagValue, encounteredObjectGuid = encounterObjectGuid, requiredNumberOfEncounters = requiredNumberOfEncounters, prerequisiteOperation = comparisonOperation }); } public static DungeonPrerequisite SetupUnlockOnEncounterOrFlag(this PickupObject self, GungeonFlags flag, bool requiredFlagValue, PrototypeDungeonRoom encounterRoom, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnEncounterOrFlag(flag, requiredFlagValue, encounterRoom, requiredNumberOfEncounters, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnEncounterOrFlag(this EncounterTrackable self, GungeonFlags flag, bool requiredFlagValue, PrototypeDungeonRoom encounterRoom, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //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_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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)7, saveFlagToCheck = flag, requireFlag = requiredFlagValue, encounteredRoom = encounterRoom, requiredNumberOfEncounters = requiredNumberOfEncounters, prerequisiteOperation = comparisonOperation }); } public static DungeonPrerequisite SetupUnlockOnTileset(this PickupObject self, ValidTilesets requiredTileset, bool requiredTilesetValue) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnTileset(requiredTileset, requiredTilesetValue); } public static DungeonPrerequisite SetupUnlockOnTileset(this EncounterTrackable self, ValidTilesets requiredTileset, bool requiredTilesetValue) { //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_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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)3, requireTileset = requiredTilesetValue, requiredTileset = requiredTileset }); } public static DungeonPrerequisite SetupUnlockOnCharacter(this PickupObject self, PlayableCharacters requiredCharacter, bool requiredCharacterValue) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnCharacter(requiredCharacter, requiredCharacterValue); } public static DungeonPrerequisite SetupUnlockOnCharacter(this EncounterTrackable self, PlayableCharacters requiredCharacter, bool requiredCharacterValue) { //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_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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown return self.AddPrerequisite(new DungeonPrerequisite { prerequisiteType = (PrerequisiteType)2, requireCharacter = requiredCharacterValue, requiredCharacter = requiredCharacter }); } public static DungeonPrerequisite SetupUnlockOnEncounterOrCustomFlag(this PickupObject self, CustomDungeonFlags flag, bool requiredFlagValue, string encounterObjectGuid, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnEncounterOrCustomFlag(flag, requiredFlagValue, encounterObjectGuid, requiredNumberOfEncounters, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnEncounterOrCustomFlag(this EncounterTrackable self, CustomDungeonFlags flag, bool requiredFlagValue, string encounterObjectGuid, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_002c: 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) return (DungeonPrerequisite)(object)self.AddPrerequisite(new CustomDungeonPrerequisite { advancedPrerequisiteType = CustomDungeonPrerequisite.AdvancedPrerequisiteType.ENCOUNTER_OR_CUSTOM_FLAG, customFlagToCheck = flag, requireCustomFlag = requiredFlagValue, encounteredObjectGuid = encounterObjectGuid, requiredNumberOfEncounters = requiredNumberOfEncounters, prerequisiteOperation = comparisonOperation }); } public static DungeonPrerequisite SetupUnlockOnEncounterOrCustomFlag(this PickupObject self, CustomDungeonFlags flag, bool requiredFlagValue, PrototypeDungeonRoom encounterRoom, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnEncounterOrCustomFlag(flag, requiredFlagValue, encounterRoom, requiredNumberOfEncounters, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnEncounterOrCustomFlag(this EncounterTrackable self, CustomDungeonFlags flag, bool requiredFlagValue, PrototypeDungeonRoom encounterRoom, int requiredNumberOfEncounters, PrerequisiteOperation comparisonOperation) { //IL_002c: 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) return (DungeonPrerequisite)(object)self.AddPrerequisite(new CustomDungeonPrerequisite { advancedPrerequisiteType = CustomDungeonPrerequisite.AdvancedPrerequisiteType.ENCOUNTER_OR_CUSTOM_FLAG, customFlagToCheck = flag, requireCustomFlag = requiredFlagValue, encounteredRoom = encounterRoom, requiredNumberOfEncounters = requiredNumberOfEncounters, prerequisiteOperation = comparisonOperation }); } public static DungeonPrerequisite SetupUnlockOnCustomFlag(this PickupObject self, CustomDungeonFlags flag, bool requiredFlagValue) { if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnCustomFlag(flag, requiredFlagValue); } public static DungeonPrerequisite SetupUnlockOnCustomFlag(this EncounterTrackable self, CustomDungeonFlags flag, bool requiredFlagValue) { return (DungeonPrerequisite)(object)self.AddPrerequisite(new CustomDungeonPrerequisite { advancedPrerequisiteType = CustomDungeonPrerequisite.AdvancedPrerequisiteType.CUSTOM_FLAG, requireCustomFlag = requiredFlagValue, customFlagToCheck = flag }); } public static DungeonPrerequisite SetupUnlockOnCustomStat(this PickupObject self, CustomTrackedStats stat, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnCustomStat(stat, comparisonValue, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnCustomStat(this EncounterTrackable self, CustomTrackedStats stat, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) return (DungeonPrerequisite)(object)self.AddPrerequisite(new CustomDungeonPrerequisite { advancedPrerequisiteType = CustomDungeonPrerequisite.AdvancedPrerequisiteType.CUSTOM_STAT_COMPARISION, customStatToCheck = stat, prerequisiteOperation = comparisonOperation, comparisonValue = comparisonValue }); } public static DungeonPrerequisite SetupUnlockOnCustomMaximum(this PickupObject self, CustomTrackedMaximums maximum, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnCustomMaximum(maximum, comparisonValue, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnCustomMaximum(this EncounterTrackable self, CustomTrackedMaximums maximum, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) return (DungeonPrerequisite)(object)self.AddPrerequisite(new CustomDungeonPrerequisite { advancedPrerequisiteType = CustomDungeonPrerequisite.AdvancedPrerequisiteType.CUSTOM_MAXIMUM_COMPARISON, customMaximumToCheck = maximum, prerequisiteOperation = comparisonOperation, comparisonValue = comparisonValue }); } public static DungeonPrerequisite SetupUnlockOnPastsBeaten(this PickupObject self, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)self).encounterTrackable == (Object)null) { return null; } return ((BraveBehaviour)self).encounterTrackable.SetupUnlockOnPastsBeaten(comparisonValue, comparisonOperation); } public static DungeonPrerequisite SetupUnlockOnPastsBeaten(this EncounterTrackable self, float comparisonValue, PrerequisiteOperation comparisonOperation) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) return (DungeonPrerequisite)(object)self.AddPrerequisite(new CustomDungeonPrerequisite { advancedPrerequisiteType = CustomDungeonPrerequisite.AdvancedPrerequisiteType.NUMBER_PASTS_COMPLETED_BETTER, prerequisiteOperation = comparisonOperation, comparisonValue = comparisonValue }); } public static T AddPrerequisite(this PickupObject self, T prereq) where T : DungeonPrerequisite { return (T)(object)self.AddPrerequisite((DungeonPrerequisite)(object)prereq); } public static T AddPrerequisite(this EncounterTrackable self, T prereq) where T : DungeonPrerequisite { return (T)(object)self.AddPrerequisite((DungeonPrerequisite)(object)prereq); } public static DungeonPrerequisite AddPrerequisite(this PickupObject self, DungeonPrerequisite prereq) { return ((BraveBehaviour)self).encounterTrackable.AddPrerequisite(prereq); } public static DungeonPrerequisite AddPrerequisite(this EncounterTrackable self, DungeonPrerequisite prereq) { if (!string.IsNullOrEmpty(self.ProxyEncounterGuid)) { self.ProxyEncounterGuid = ""; } if (self.prerequisites == null) { self.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[1] { prereq }; } else { DungeonPrerequisite[] array = self.prerequisites; Add(ref array, prereq); self.prerequisites = array; } EncounterDatabaseEntry entry = EncounterDatabase.GetEntry(self.EncounterGuid); if (!string.IsNullOrEmpty(entry.ProxyEncounterGuid)) { entry.ProxyEncounterGuid = ""; } if (entry.prerequisites == null) { entry.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[1] { prereq }; } else { DungeonPrerequisite[] array2 = entry.prerequisites; Add(ref array2, prereq); entry.prerequisites = array2; } return prereq; } public static void Add(ref T[] array, T element) { List list = array.ToList(); list.Add(element); array = list.ToArray(); } public static string ListToString(List list) { string text = "("; for (int i = 0; i < list.Count; i++) { string text2 = list[i].ToString(); text += text2; if (i < list.Count - 1) { text += ", "; } } return text + ")"; } public static void InsertOrAdd(this List self, int index, T toAdd) { if (index < 0 || index >= self.Count) { self.Add(toAdd); } else { self.Insert(index, toAdd); } } public static void LogSmart(string text, bool debuglog = false) { if (ETGModConsole.Instance != null) { ETGModConsole.Log((object)text, debuglog); } else { Debug.Log((object)text); } } public static List CloneList(List orig) { List list = new List(); for (int i = 0; i < orig.Count; i++) { list.Add(orig[i]); } return list; } public static T LoadAssetFromAnywhere(string path) where T : Object { string[] array = new string[30] { "brave_resources_001", "dungeon_scene_001", "encounters_base_001", "enemies_base_001", "flows_base_001", "foyer_001", "foyer_002", "foyer_003", "shared_auto_001", "shared_auto_002", "shared_base_001", "dungeons/base_bullethell", "dungeons/base_castle", "dungeons/base_catacombs", "dungeons/base_cathedral", "dungeons/base_forge", "dungeons/base_foyer", "dungeons/base_gungeon", "dungeons/base_mines", "dungeons/base_nakatomi", "dungeons/base_resourcefulrat", "dungeons/base_sewer", "dungeons/base_tutorial", "dungeons/finalscenario_bullet", "dungeons/finalscenario_convict", "dungeons/finalscenario_coop", "dungeons/finalscenario_guide", "dungeons/finalscenario_pilot", "dungeons/finalscenario_robot", "dungeons/finalscenario_soldier" }; T val = default(T); string[] array2 = array; foreach (string text in array2) { try { val = ResourceManager.LoadAssetBundle(text).LoadAsset(path); } catch { } if ((Object)(object)val != (Object)null) { break; } } return val; } public static void SetComplex(this StringDBTable self, string key, params string[] values) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown StringCollection val = (StringCollection)new ComplexStringCollection(); foreach (string text in values) { val.AddString(text, 1f); } self[key] = val; } public static bool IsEnemyStateValid(AIActor enemy, JammedEnemyState requiredState) { int result; switch (requiredState) { case JammedEnemyState.NoCheck: return true; case JammedEnemyState.Unjammed: result = ((!enemy.IsBlackPhantom) ? 1 : 0); break; default: result = 0; break; case JammedEnemyState.Jammed: result = (enemy.IsBlackPhantom ? 1 : 0); break; } return (byte)result != 0; } } public class SpecialAIActor : MonoBehaviour { public bool SetsCustomFlagOnActivation; public CustomDungeonFlags CustomFlagToSetOnActivation; public bool SetsCustomFlagOnDeath; public CustomDungeonFlags CustomFlagToSetOnDeath; public bool SetsCustomCharacterSpecificFlagOnDeath; public CustomCharacterSpecificGungeonFlags CustomCharacterSpecificFlagToSetOnDeath; } public class SpecialPickupObject : MonoBehaviour { public CustomDungeonFlags CustomSaveFlagToSetOnAcquisition; } }