using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using Alexandria.BreakableAPI; using Alexandria.DungeonAPI; using Alexandria.ItemAPI; using Alexandria.Misc; using Alexandria.NPCAPI; using Alexandria.SoundAPI; using Alexandria.VisualAPI; using BepInEx; using Dungeonator; using Gungeon; using HarmonyLib; using InControl; using LOLItems; using LOLItems.active_items; using LOLItems.custom_class_data; using LOLItems.guon_stones; using LOLItems.passive_items; using LOLItems.weapons; using LootTableAPI; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Mod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Mod")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class CustomLightningChainEnemiesModifierAOE : BraveBehaviour { [CompilerGenerated] private sealed class d__28 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AIActor damagedTarget; public CustomLightningChainEnemiesModifierAOE <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.m_damagedEnemies.Add(damagedTarget); <>2__current = (object)new WaitForSeconds(<>4__this.damageCooldown); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.m_damagedEnemies.Remove(damagedTarget); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public GameObject LinkVFXPrefab; public CoreDamageTypes damageTypes; public bool RequiresSameProjectileClass; public float maximumLinkDistance; public bool usesStaticDamageStat = true; public float damagePerHit; public float damageScale; public float damageCooldown = 0.1f; public List sfxPath = new List(); [NonSerialized] public bool DamagesEnemies = true; [NonSerialized] public bool PlaysSFX = true; [Header("Dispersal")] public bool UsesDispersalParticles; [ShowInInspectorIf("UsesDispersalParticles", false)] public float DispersalDensity = 3f; [ShowInInspectorIf("UsesDispersalParticles", false)] public float DispersalMinCoherency = 0.2f; [ShowInInspectorIf("UsesDispersalParticles", false)] public float DispersalMaxCoherency = 1f; [ShowInInspectorIf("UsesDispersalParticles", false)] public GameObject DispersalParticleSystemPrefab; private Projectile m_frameLinkProjectile; private tk2dTiledSprite m_extantLink; private bool m_hasSetBlackBullet; private ParticleSystem m_dispersalParticles; private HashSet m_damagedEnemies = new HashSet(); private void Start() { if ((Object)(object)((BraveBehaviour)this).projectile != (Object)null) { Projectile projectile = ((BraveBehaviour)this).projectile; projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, new Action(HandleHitEnemy)); } } private void HandleHitEnemy(Projectile proj, SpeculativeRigidbody enemyRigidbody, bool fatal) { if ((Object)(object)enemyRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)enemyRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)enemyRigidbody).aiActor; } else { if (!((Object)(object)((Component)enemyRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemyRigidbody).GetComponentInParent(); } List list = ChainEnemies(val); if (PlaysSFX) { HelpfulMethods.PlayRandomSFX(((Component)val).gameObject, sfxPath); } if (!usesStaticDamageStat) { damagePerHit = proj.baseData.damage * damageScale; } if (list.Count > 0) { UpdateLinkChain(list); } } public void updateSFXList(string[] newSFXList) { foreach (string item in newSFXList) { sfxPath.Add(item); } } public override void OnDestroy() { ClearLink(); ((BraveBehaviour)this).OnDestroy(); } private void Update() { m_frameLinkProjectile = null; } private void UpdateLinkChain(List chain) { //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_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_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_0105: Unknown result type (might be due to invalid IL or missing references) Vector2 unitCenter = ((BraveBehaviour)((BraveBehaviour)this).projectile).specRigidbody.UnitCenter; foreach (AIActor item in chain) { Vector2 unitCenter2 = ((BraveBehaviour)item).specRigidbody.UnitCenter; GameObject val = SpawnManager.SpawnVFX(LinkVFXPrefab, true); tk2dTiledSprite component = val.GetComponent(); ((BraveBehaviour)component).transform.position = Vector2.op_Implicit(unitCenter); Vector2 val2 = unitCenter2 - unitCenter; float num = BraveMathCollege.Atan2Degrees(((Vector2)(ref val2)).normalized); int num2 = Mathf.RoundToInt(((Vector2)(ref val2)).magnitude / 0.0625f); component.dimensions = new Vector2((float)num2, component.dimensions.y); ((BraveBehaviour)component).transform.rotation = Quaternion.Euler(0f, 0f, num); ((tk2dBaseSprite)component).UpdateZDepth(); Object.Destroy((Object)(object)val, 0.25f); if (!m_damagedEnemies.Contains(item)) { ((BraveBehaviour)item).healthHaver.ApplyDamage(damagePerHit, Vector2.zero, "Cultivation of Spirit", damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); if (!UsesDispersalParticles) { } } } } private void DoDispersalParticles(Vector2 posStart, Vector2 posEnd) { //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_0018: Invalid comparison between Unknown and I4 //IL_004d: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_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_00db: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0170: Unknown result type (might be due to invalid IL or missing references) if ((int)GameManager.Options.ShaderQuality != 0 && (int)GameManager.Options.ShaderQuality != 3) { if (!Object.op_Implicit((Object)(object)m_dispersalParticles)) { m_dispersalParticles = GlobalDispersalParticleManager.GetSystemForPrefab(DispersalParticleSystemPrefab); } int num = Mathf.Max(Mathf.CeilToInt(Vector2.Distance(posStart, posEnd) * DispersalDensity), 1); for (int i = 0; i < num; i++) { float num2 = (float)i / (float)num; Vector3 val = Vector3.Lerp(Vector2.op_Implicit(posStart), Vector2.op_Implicit(posEnd), num2); val += Vector3.back; float num3 = Mathf.PerlinNoise(val.x / 3f, val.y / 3f); Vector3 val2 = Quaternion.Euler(0f, 0f, num3 * 360f) * Vector3.right; Vector3 val3 = Vector3.Lerp(val2, Random.insideUnitSphere, Random.Range(DispersalMinCoherency, DispersalMaxCoherency)); EmitParams val4 = default(EmitParams); ((EmitParams)(ref val4)).position = val; ((EmitParams)(ref val4)).velocity = val3 * m_dispersalParticles.startSpeed; ((EmitParams)(ref val4)).startSize = m_dispersalParticles.startSize; ((EmitParams)(ref val4)).startLifetime = m_dispersalParticles.startLifetime; ((EmitParams)(ref val4)).startColor = Color32.op_Implicit(m_dispersalParticles.startColor); EmitParams val5 = val4; m_dispersalParticles.Emit(val5, 1); } } } private IEnumerator HandleDamageCooldown(AIActor damagedTarget) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this, damagedTarget = damagedTarget }; } private void ClearLink() { if ((Object)(object)m_extantLink != (Object)null) { SpawnManager.Despawn(((Component)m_extantLink).gameObject); m_extantLink = null; } } private List ChainEnemies(AIActor firstEnemy) { //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_0089: 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) List list = new List(); float num = maximumLinkDistance * maximumLinkDistance; foreach (AIActor allEnemy in StaticReferenceManager.AllEnemies) { if (!((Object)(object)allEnemy == (Object)null) && Object.op_Implicit((Object)(object)((BraveBehaviour)allEnemy).healthHaver) && !((BraveBehaviour)allEnemy).healthHaver.IsDead && allEnemy.IsNormalEnemy && allEnemy.HasBeenEngaged && !((object)allEnemy).Equals((object?)firstEnemy)) { Vector2 val = ((GameActor)allEnemy).CenterPosition - ((GameActor)firstEnemy).CenterPosition; float sqrMagnitude = ((Vector2)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { list.Add(allEnemy); } } } return list; } } [Serializable] public class GameActorCrippleEffect : GameActorEffect { public float CrippleAmount; public float CrippleDuration; public bool ShouldVanishOnDeath(GameActor actor) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).healthHaver) && ((BraveBehaviour)actor).healthHaver.IsBoss) { return false; } if (actor is AIActor && ((AIActor)((actor is AIActor) ? actor : null)).IsSignatureEnemy) { return false; } return true; } public override void OnEffectApplied(GameActor actor, RuntimeGameActorEffectData effectData, float partialAmount = 1f) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).aiShooter)) { ((BraveBehaviour)actor).aiShooter.AimTimeScale = CrippleAmount; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).behaviorSpeculator)) { ((BraveBehaviour)actor).behaviorSpeculator.CooldownScale = CrippleAmount; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).bulletBank)) { ((BraveBehaviour)actor).bulletBank.TimeScale = CrippleAmount; } } public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData) { if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).aiShooter)) { ((BraveBehaviour)actor).aiShooter.AimTimeScale = 1f; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).behaviorSpeculator)) { ((BraveBehaviour)actor).behaviorSpeculator.CooldownScale = 1f; } if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).bulletBank)) { ((BraveBehaviour)actor).bulletBank.TimeScale = 1f; } tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)actor).spriteAnimator; if (Object.op_Implicit((Object)(object)spriteAnimator) && Object.op_Implicit((Object)(object)((BraveBehaviour)actor).aiAnimator) && spriteAnimator.CurrentClip != null && !spriteAnimator.IsPlaying(spriteAnimator.CurrentClip)) { ((BraveBehaviour)actor).aiAnimator.PlayUntilFinished(((BraveBehaviour)actor).spriteAnimator.CurrentClip.name, false, (string)null, -1f, true); } } } public class OnPreDamagedPassiveItem : PassiveItem { [CompilerGenerated] private sealed class d__13 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public OnPreDamagedPassiveItem <>4__this; private Material 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_006f: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)((PassiveItem)<>4__this).Owner).sprite); if (<>4__this.triggersGlow && Object.op_Implicit((Object)(object)5__1)) { 5__1.SetColor("_OverrideColor", <>4__this.outlineColor); } <>2__current = (object)new WaitForSeconds(<>4__this.effectDuration); <>1__state = 1; return true; case 1: <>1__state = -1; if (<>4__this.triggersGlow && Object.op_Implicit((Object)(object)5__1)) { 5__1.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public float procChance = 0.1f; public bool triggerBlank = false; public bool playsSFX = false; public List sfxPath = new List(); public bool triggersInvulnerability = false; public bool triggersOutline = false; public Color outlineColor = new Color(0f, 0f, 0f); public bool triggersGlow = false; public float effectDuration = 1f; public override void Pickup(PlayerController player) { if (!base.m_pickedUp) { ((PassiveItem)this).Pickup(player); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Combine(healthHaver.ModifyDamage, new Action(HandleEffect)); } } public void updateSFXList(string[] newSFXList) { foreach (string item in newSFXList) { sfxPath.Add(item); } } public void setProcChance(float newProcChance) { procChance = newProcChance; } private void HandleEffect(HealthHaver source, ModifyDamageEventArgs args) { if (args == EventArgs.Empty || args.ModifiedDamage <= 0f || !source.IsVulnerable) { return; } float value = Random.value; if (value <= procChance && Object.op_Implicit((Object)(object)base.m_owner) && !((GameActor)base.m_owner).IsFalling) { if (playsSFX && sfxPath.Count > 0) { HelpfulMethods.PlayRandomSFX(((Component)((PassiveItem)this).Owner).gameObject, sfxPath); } if (triggersInvulnerability) { PlayerController component = ((Component)source).GetComponent(); source.TriggerInvulnerabilityPeriod(effectDuration); } if (triggerBlank) { base.m_owner.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f); } if (triggersOutline) { ((MonoBehaviour)((PassiveItem)this).Owner).StartCoroutine(TriggerVisualEffect(((PassiveItem)this).Owner)); } args.ModifiedDamage = 0f; } } private IEnumerator TriggerVisualEffect(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this, player = player }; } public override DebrisObject Drop(PlayerController player) { DebrisObject val = ((PassiveItem)this).Drop(player); OnPreDamagedPassiveItem component = ((Component)val).GetComponent(); HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Remove(healthHaver.ModifyDamage, new Action(HandleEffect)); ((PassiveItem)component).m_pickedUpThisRun = true; return val; } public override void OnDestroy() { if (Object.op_Implicit((Object)(object)base.m_owner)) { HealthHaver healthHaver = ((BraveBehaviour)base.m_owner).healthHaver; healthHaver.ModifyDamage = (Action)Delegate.Remove(healthHaver.ModifyDamage, new Action(HandleEffect)); } ((PassiveItem)this).OnDestroy(); } } public class CustomLightningChainEnemiesModifier : BraveBehaviour { [CompilerGenerated] private sealed class d__27 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AIActor damagedTarget; public CustomLightningChainEnemiesModifier <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.m_damagedEnemies.Add(damagedTarget); <>2__current = (object)new WaitForSeconds(<>4__this.damageCooldown); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.m_damagedEnemies.Remove(damagedTarget); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public GameObject LinkVFXPrefab; public CoreDamageTypes damageTypes; public bool RequiresSameProjectileClass; public float maximumLinkDistance; public float damagePerHit; public float damageCooldown = 0.1f; public float maxLinkCount; public List sfxPath = new List(); [NonSerialized] public bool DamagesEnemies = true; [NonSerialized] public bool PlaysSFX = true; [Header("Dispersal")] public bool UsesDispersalParticles; [ShowInInspectorIf("UsesDispersalParticles", false)] public float DispersalDensity = 3f; [ShowInInspectorIf("UsesDispersalParticles", false)] public float DispersalMinCoherency = 0.2f; [ShowInInspectorIf("UsesDispersalParticles", false)] public float DispersalMaxCoherency = 1f; [ShowInInspectorIf("UsesDispersalParticles", false)] public GameObject DispersalParticleSystemPrefab; private Projectile m_frameLinkProjectile; private tk2dTiledSprite m_extantLink; private bool m_hasSetBlackBullet; private ParticleSystem m_dispersalParticles; private HashSet m_damagedEnemies = new HashSet(); private void Start() { if ((Object)(object)((BraveBehaviour)this).projectile != (Object)null) { Projectile projectile = ((BraveBehaviour)this).projectile; projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, new Action(HandleHitEnemy)); } } private void HandleHitEnemy(Projectile proj, SpeculativeRigidbody enemyRigidbody, bool fatal) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)enemyRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)enemyRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)enemyRigidbody).aiActor; } else { if (!((Object)(object)((Component)enemyRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemyRigidbody).GetComponentInParent(); } List list = ChainEnemies(((GameActor)val).CenterPosition); if (PlaysSFX) { HelpfulMethods.PlayRandomSFX(((Component)val).gameObject, sfxPath); } if (list.Count > 0) { UpdateLinkChain(list); } } public void updateSFXList(string[] newSFXList) { foreach (string item in newSFXList) { sfxPath.Add(item); } } public override void OnDestroy() { ClearLink(); ((BraveBehaviour)this).OnDestroy(); } private void Update() { m_frameLinkProjectile = null; } private void UpdateLinkChain(List chain) { //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_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_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_013a: 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_0105: 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_0130: Unknown result type (might be due to invalid IL or missing references) Vector2 val = ((BraveBehaviour)((BraveBehaviour)this).projectile).specRigidbody.UnitCenter; foreach (AIActor item in chain) { Vector2 unitCenter = ((BraveBehaviour)item).specRigidbody.UnitCenter; GameObject val2 = SpawnManager.SpawnVFX(LinkVFXPrefab, true); tk2dTiledSprite component = val2.GetComponent(); ((BraveBehaviour)component).transform.position = Vector2.op_Implicit(val); Vector2 val3 = unitCenter - val; float num = BraveMathCollege.Atan2Degrees(((Vector2)(ref val3)).normalized); int num2 = Mathf.RoundToInt(((Vector2)(ref val3)).magnitude / 0.0625f); component.dimensions = new Vector2((float)num2, component.dimensions.y); ((BraveBehaviour)component).transform.rotation = Quaternion.Euler(0f, 0f, num); ((tk2dBaseSprite)component).UpdateZDepth(); Object.Destroy((Object)(object)val2, 0.25f); if (!m_damagedEnemies.Contains(item)) { ((BraveBehaviour)item).healthHaver.ApplyDamage(damagePerHit, Vector2.zero, "Chain Lightning", damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); m_damagedEnemies.Add(item); if (UsesDispersalParticles) { DoDispersalParticles(val, unitCenter); } } val = unitCenter; } } private void DoDispersalParticles(Vector2 posStart, Vector2 posEnd) { //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_0018: Invalid comparison between Unknown and I4 //IL_004d: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_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_00db: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0170: Unknown result type (might be due to invalid IL or missing references) if ((int)GameManager.Options.ShaderQuality != 0 && (int)GameManager.Options.ShaderQuality != 3) { if (!Object.op_Implicit((Object)(object)m_dispersalParticles)) { m_dispersalParticles = GlobalDispersalParticleManager.GetSystemForPrefab(DispersalParticleSystemPrefab); } int num = Mathf.Max(Mathf.CeilToInt(Vector2.Distance(posStart, posEnd) * DispersalDensity), 1); for (int i = 0; i < num; i++) { float num2 = (float)i / (float)num; Vector3 val = Vector3.Lerp(Vector2.op_Implicit(posStart), Vector2.op_Implicit(posEnd), num2); val += Vector3.back; float num3 = Mathf.PerlinNoise(val.x / 3f, val.y / 3f); Vector3 val2 = Quaternion.Euler(0f, 0f, num3 * 360f) * Vector3.right; Vector3 val3 = Vector3.Lerp(val2, Random.insideUnitSphere, Random.Range(DispersalMinCoherency, DispersalMaxCoherency)); EmitParams val4 = default(EmitParams); ((EmitParams)(ref val4)).position = val; ((EmitParams)(ref val4)).velocity = val3 * m_dispersalParticles.startSpeed; ((EmitParams)(ref val4)).startSize = m_dispersalParticles.startSize; ((EmitParams)(ref val4)).startLifetime = m_dispersalParticles.startLifetime; ((EmitParams)(ref val4)).startColor = Color32.op_Implicit(m_dispersalParticles.startColor); EmitParams val5 = val4; m_dispersalParticles.Emit(val5, 1); } } } private IEnumerator HandleDamageCooldown(AIActor damagedTarget) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this, damagedTarget = damagedTarget }; } private void ClearLink() { if ((Object)(object)m_extantLink != (Object)null) { SpawnManager.Despawn(((Component)m_extantLink).gameObject); m_extantLink = null; } } private List ChainEnemies(Vector2 startPos) { //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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) List list = new List(); HashSet hashSet = new HashSet(); Vector2 val = startPos; for (int i = 0; (float)i < maxLinkCount; i++) { AIActor val2 = null; float num = maximumLinkDistance * maximumLinkDistance; foreach (AIActor allEnemy in StaticReferenceManager.AllEnemies) { if (!((Object)(object)allEnemy == (Object)null) && Object.op_Implicit((Object)(object)((BraveBehaviour)allEnemy).healthHaver) && !((BraveBehaviour)allEnemy).healthHaver.IsDead && allEnemy.IsNormalEnemy && allEnemy.HasBeenEngaged && !hashSet.Contains(allEnemy)) { Vector2 val3 = ((GameActor)allEnemy).CenterPosition - val; float sqrMagnitude = ((Vector2)(ref val3)).sqrMagnitude; if (sqrMagnitude < num) { val2 = allEnemy; num = sqrMagnitude; } } } if ((Object)(object)val2 != (Object)null) { list.Add(val2); hashSet.Add(val2); val = ((GameActor)val2).CenterPosition; continue; } break; } return list; } } namespace LootTableAPI { internal static class LootTableTools { public static GenericLootTable CreateLootTable(List includedLootTables = null, DungeonPrerequisite[] prerequisites = null) { //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_001d: Expected O, but got Unknown GenericLootTable val = ScriptableObject.CreateInstance(); val.defaultItemDrops = new WeightedGameObjectCollection { elements = new List() }; if (prerequisites != null) { val.tablePrerequisites = prerequisites; } else { val.tablePrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; } if (includedLootTables != null) { val.includedLootTables = includedLootTables; } else { val.includedLootTables = new List(); } return val; } public static void AddItemToPool(this GenericLootTable lootTable, PickupObject po, float weight = 1f) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown WeightedGameObjectCollection defaultItemDrops = lootTable.defaultItemDrops; WeightedGameObject val = new WeightedGameObject(); val.pickupId = po.PickupObjectId; val.weight = weight; val.rawGameObject = ((Component)po).gameObject; val.forceDuplicatesPossible = false; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; defaultItemDrops.Add(val); } public static void AddItemToPool(this GenericLootTable lootTable, int poID, float weight = 1f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown PickupObject byId = PickupObjectDatabase.GetById(poID); WeightedGameObjectCollection defaultItemDrops = lootTable.defaultItemDrops; WeightedGameObject val = new WeightedGameObject(); val.pickupId = byId.PickupObjectId; val.weight = weight; val.rawGameObject = ((Component)byId).gameObject; val.forceDuplicatesPossible = false; val.additionalPrerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; defaultItemDrops.Add(val); } } } namespace LOLItems { internal class AdvancedPlayerOrbitalItem : PassiveItem { public PlayerOrbital OrbitalPrefab; public PlayerOrbitalFollower OrbitalFollowerPrefab; public bool HasUpgradeSynergy; public CustomSynergyType UpgradeSynergy; public GameObject UpgradeOrbitalPrefab; public GameObject UpgradeOrbitalFollowerPrefab; public bool CanBeMimicked; public DamageTypeModifier[] modifiers; public DamageTypeModifier[] synergyModifiers; public bool BreaksUponContact; public bool BreaksUponOwnerDamage; public GameObject BreakVFX; protected GameObject m_extantOrbital; protected bool m_synergyUpgradeActive; public bool HasAdvancedUpgradeSynergy; public string AdvancedUpgradeSynergy; public GameObject AdvancedUpgradeOrbitalPrefab; public GameObject AdvancedUpgradeOrbitalFollowerPrefab; public List advancedSynergyModifiers = new List(); protected bool m_advancedSynergyUpgradeActive; private void CreateOrbital(PlayerController owner) { //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown GameObject val = ((!((Object)(object)OrbitalPrefab != (Object)null)) ? ((Component)OrbitalFollowerPrefab).gameObject : ((Component)OrbitalPrefab).gameObject); if (HasUpgradeSynergy && m_synergyUpgradeActive) { val = ((!((Object)(object)UpgradeOrbitalPrefab != (Object)null)) ? UpgradeOrbitalFollowerPrefab.gameObject : UpgradeOrbitalPrefab.gameObject); } if (HasAdvancedUpgradeSynergy && m_advancedSynergyUpgradeActive) { val = ((!((Object)(object)AdvancedUpgradeOrbitalPrefab != (Object)null)) ? AdvancedUpgradeOrbitalFollowerPrefab.gameObject : AdvancedUpgradeOrbitalPrefab.gameObject); } m_extantOrbital = PlayerOrbitalItem.CreateOrbital(owner, val, (Object)(object)OrbitalFollowerPrefab != (Object)null, (PlayerOrbitalItem)null); if (BreaksUponContact && Object.op_Implicit((Object)(object)m_extantOrbital)) { SpeculativeRigidbody component = m_extantOrbital.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { SpeculativeRigidbody val2 = component; val2.OnRigidbodyCollision = (OnRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)val2.OnRigidbodyCollision, (Delegate?)new OnRigidbodyCollisionDelegate(HandleBreakOnCollision)); } } if (BreaksUponOwnerDamage && Object.op_Implicit((Object)(object)owner)) { owner.OnReceivedDamage += HandleBreakOnOwnerDamage; } OnOrbitalCreated(m_extantOrbital); } public static GameObject CreateOrbital(PlayerController owner, GameObject targetOrbitalPrefab, bool isFollower, PlayerOrbitalItem sourceItem = null) { //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) GameObject val = Object.Instantiate(targetOrbitalPrefab, ((BraveBehaviour)owner).transform.position, Quaternion.identity); if (!isFollower) { PlayerOrbital component = val.GetComponent(); component.Initialize(owner); component.SourceItem = sourceItem; } else { PlayerOrbitalFollower component2 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.Initialize(owner); } } return val; } public virtual void OnOrbitalCreated(GameObject orbital) { } private void HandleBreakOnOwnerDamage(PlayerController arg1) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)this)) { if (Object.op_Implicit((Object)(object)BreakVFX) && Object.op_Implicit((Object)(object)m_extantOrbital) && Object.op_Implicit((Object)(object)m_extantOrbital.GetComponentInChildren())) { SpawnManager.SpawnVFX(BreakVFX, Vector2Extensions.ToVector3ZisY(((tk2dBaseSprite)m_extantOrbital.GetComponentInChildren()).WorldCenter, 0f), Quaternion.identity); } if (Object.op_Implicit((Object)(object)base.m_owner)) { base.m_owner.RemovePassiveItem(((PickupObject)this).PickupObjectId); base.m_owner.OnReceivedDamage -= HandleBreakOnOwnerDamage; } Object.Destroy((Object)(object)((Component)this).gameObject); } } private void HandleBreakOnCollision(CollisionData rigidbodyCollision) { if (Object.op_Implicit((Object)(object)base.m_owner)) { base.m_owner.RemovePassiveItem(((PickupObject)this).PickupObjectId); } Object.Destroy((Object)(object)((Component)this).gameObject); } public void DecoupleOrbital() { m_extantOrbital = null; if (BreaksUponOwnerDamage && Object.op_Implicit((Object)(object)base.m_owner)) { base.m_owner.OnReceivedDamage -= HandleBreakOnOwnerDamage; } } private void DestroyOrbital() { if (Object.op_Implicit((Object)(object)m_extantOrbital)) { if (BreaksUponOwnerDamage && Object.op_Implicit((Object)(object)base.m_owner)) { base.m_owner.OnReceivedDamage -= HandleBreakOnOwnerDamage; } Object.Destroy((Object)(object)m_extantOrbital.gameObject); m_extantOrbital = null; } } public override void Update() { //IL_01c4: 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) ((PassiveItem)this).Update(); if (HasAdvancedUpgradeSynergy) { if (m_advancedSynergyUpgradeActive && (!Object.op_Implicit((Object)(object)base.m_owner) || !CustomSynergies.PlayerHasActiveSynergy(base.m_owner, AdvancedUpgradeSynergy))) { if (Object.op_Implicit((Object)(object)base.m_owner)) { for (int i = 0; i < advancedSynergyModifiers.Count; i++) { ((BraveBehaviour)base.m_owner).healthHaver.damageTypeModifiers.Remove(advancedSynergyModifiers[i]); } } m_advancedSynergyUpgradeActive = false; DestroyOrbital(); if (Object.op_Implicit((Object)(object)base.m_owner)) { CreateOrbital(base.m_owner); } } else if (!m_advancedSynergyUpgradeActive && Object.op_Implicit((Object)(object)base.m_owner) && CustomSynergies.PlayerHasActiveSynergy(base.m_owner, AdvancedUpgradeSynergy)) { m_advancedSynergyUpgradeActive = true; DestroyOrbital(); if (Object.op_Implicit((Object)(object)base.m_owner)) { CreateOrbital(base.m_owner); } for (int j = 0; j < advancedSynergyModifiers.Count; j++) { ((BraveBehaviour)base.m_owner).healthHaver.damageTypeModifiers.Add(advancedSynergyModifiers[j]); } } } if (!HasUpgradeSynergy) { return; } if (m_synergyUpgradeActive && (!Object.op_Implicit((Object)(object)base.m_owner) || !base.m_owner.HasActiveBonusSynergy(UpgradeSynergy, false))) { if (Object.op_Implicit((Object)(object)base.m_owner)) { for (int k = 0; k < synergyModifiers.Length; k++) { ((BraveBehaviour)base.m_owner).healthHaver.damageTypeModifiers.Remove(synergyModifiers[k]); } } m_synergyUpgradeActive = false; DestroyOrbital(); if (Object.op_Implicit((Object)(object)base.m_owner)) { CreateOrbital(base.m_owner); } } else if (!m_synergyUpgradeActive && Object.op_Implicit((Object)(object)base.m_owner) && base.m_owner.HasActiveBonusSynergy(UpgradeSynergy, false)) { m_synergyUpgradeActive = true; DestroyOrbital(); if (Object.op_Implicit((Object)(object)base.m_owner)) { CreateOrbital(base.m_owner); } for (int l = 0; l < synergyModifiers.Length; l++) { ((BraveBehaviour)base.m_owner).healthHaver.damageTypeModifiers.Add(synergyModifiers[l]); } } } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); player.OnNewFloorLoaded = (Action)Delegate.Combine(player.OnNewFloorLoaded, new Action(HandleNewFloor)); for (int i = 0; i < modifiers.Length; i++) { ((BraveBehaviour)player).healthHaver.damageTypeModifiers.Add(modifiers[i]); } CreateOrbital(player); } private void HandleNewFloor(PlayerController obj) { DestroyOrbital(); CreateOrbital(obj); } public override DebrisObject Drop(PlayerController player) { DestroyOrbital(); player.OnNewFloorLoaded = (Action)Delegate.Remove(player.OnNewFloorLoaded, new Action(HandleNewFloor)); for (int i = 0; i < modifiers.Length; i++) { ((BraveBehaviour)player).healthHaver.damageTypeModifiers.Remove(modifiers[i]); } for (int j = 0; j < synergyModifiers.Length; j++) { ((BraveBehaviour)player).healthHaver.damageTypeModifiers.Remove(synergyModifiers[j]); } return ((PassiveItem)this).Drop(player); } public override void OnDestroy() { if ((Object)(object)base.m_owner != (Object)null) { PlayerController owner = base.m_owner; owner.OnNewFloorLoaded = (Action)Delegate.Remove(owner.OnNewFloorLoaded, new Action(HandleNewFloor)); for (int i = 0; i < modifiers.Length; i++) { ((BraveBehaviour)base.m_owner).healthHaver.damageTypeModifiers.Remove(modifiers[i]); } for (int j = 0; j < synergyModifiers.Length; j++) { ((BraveBehaviour)base.m_owner).healthHaver.damageTypeModifiers.Remove(synergyModifiers[j]); } base.m_owner.OnReceivedDamage -= HandleBreakOnOwnerDamage; } DestroyOrbital(); ((PassiveItem)this).OnDestroy(); } } public class EasyTrailBullet : BraveBehaviour { public Texture _gradTexture; private Projectile proj; public Vector2 TrailPos; public Color BaseColor; public Color StartColor; public Color EndColor; public float LifeTime; public float StartWidth; public float EndWidth; public EasyTrailBullet() { //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_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_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_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) TrailPos = Vector2.op_Implicit(new Vector3(0f, 0f, 0f)); BaseColor = Color.red; StartColor = Color.red; EndColor = Color.white; LifeTime = 1f; StartWidth = 1f; EndWidth = 0f; } public void Start() { //IL_003b: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //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_00c6: Unknown result type (might be due to invalid IL or missing references) proj = ((BraveBehaviour)this).projectile; GameObject val = ETGMod.AddChild(((Component)((BraveBehaviour)this).projectile).gameObject, "trail object", new Type[0]); val.transform.position = ((BraveBehaviour)((BraveBehaviour)this).projectile).transform.position; val.transform.localPosition = Vector2.op_Implicit(TrailPos); TrailRenderer val2 = val.AddComponent(); ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val2).receiveShadows = false; Material val3 = new Material(Shader.Find("Sprites/Default")); val3.mainTexture = _gradTexture; ((Renderer)val2).material = val3; val2.minVertexDistance = 0.1f; val3.SetColor("_Color", BaseColor); val2.startColor = StartColor; val2.endColor = EndColor; val2.time = LifeTime; val2.startWidth = StartWidth; val2.endWidth = EndWidth; } } public class EasyTrailMisc : BraveBehaviour { public Texture _gradTexture; private GameObject gameobject; public Vector2 TrailPos; public Color BaseColor; public Color StartColor; public Color EndColor; public float LifeTime; public float StartWidth; public float EndWidth; public EasyTrailMisc() { //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_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_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_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) TrailPos = Vector2.op_Implicit(new Vector3(0f, 0f, 0f)); BaseColor = Color.red; StartColor = Color.red; EndColor = Color.white; LifeTime = 1f; StartWidth = 1f; EndWidth = 0f; } public void Start() { //IL_0031: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_00a2: 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_00bc: Unknown result type (might be due to invalid IL or missing references) gameobject = ((Component)this).gameObject; GameObject val = ETGMod.AddChild(((Component)this).gameObject, "trail object", new Type[0]); val.transform.position = ((BraveBehaviour)this).transform.position; val.transform.localPosition = Vector2.op_Implicit(TrailPos); TrailRenderer val2 = val.AddComponent(); ((Renderer)val2).shadowCastingMode = (ShadowCastingMode)0; ((Renderer)val2).receiveShadows = false; Material val3 = new Material(Shader.Find("Sprites/Default")); val3.mainTexture = _gradTexture; ((Renderer)val2).material = val3; val2.minVertexDistance = 0.1f; val3.SetColor("_Color", BaseColor); val2.startColor = StartColor; val2.endColor = EndColor; val2.time = LifeTime; val2.startWidth = StartWidth; val2.endWidth = EndWidth; } } public static class Bubbs { public static GenericLootTable ShopKeeperLootTable; public static GameObject HandyGameObject; public static void Init() { //IL_0ba7: Unknown result type (might be due to invalid IL or missing references) //IL_0bbb: Unknown result type (might be due to invalid IL or missing references) //IL_0beb: Unknown result type (might be due to invalid IL or missing references) //IL_0bf0: Unknown result type (might be due to invalid IL or missing references) //IL_0d25: Unknown result type (might be due to invalid IL or missing references) //IL_0d3c: Unknown result type (might be due to invalid IL or missing references) //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0d72: Expected O, but got Unknown NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Everything I say is {ws}waterproof!{w} Or if not, {wq}water-absorbent!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Perhaps I could tell you about my impending odyssey!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Frugality is not a virtue, I assure you."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Purchase thoroughly! You'll never know when I shove off!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "You look like an aspiring patron of scientific research!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "{ws}The sea is the final frontier!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "I've been designing some new fins!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "{wq}Did you know?:{w} clams can smell colours!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Once, people could breathe in water! Then we forgot how."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Whale crabs. Octo-salmon. Barnacle sharks. Who knows what I'll find?"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "The helmet never comes off! Well, except when I get hungry."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "I theorize that beneath this ocean, there is another, wetter, ocean!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Undersea exploration isn't a job, it's a {wb}privilege!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "I've done several trial runs in local puddles. I'm ready for the big show!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Sea monsters are no more than misunderstood {wj}ambassadors of the deep.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Exploring the sea in a boat is like eating a melon by the rind!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Bilgewater is a lovely place—principally when facing out to sea."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "My research indicates that if you hold your breath long enough, you can kick the habit! You just need to stay awake."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "One day, the ocean will be my oyster—and the ocean's oysters will be my breakfast!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Oh, don't get me started on {ws}buoyancy.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Gadgetry in Piltover, extinct overlords in Freljord? Hmph! I'll show them!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "There's evidence to suggest that manatees once ruled the {wr}land and sea!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "I can't wait to school some fish."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "So many {wj}mysteries{w} to explore."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "I can't wait to see what lies beneath!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "The real sunken {wb}treasure{w} is aquatic knowledge."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_GENERIC_TALK", "Just as soon as I perfect my submersible, I'll be off!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_STOPPER_TALK", "{wj}Soon, very soon...{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_STOPPER_TALK", "{wb}Every coin counts.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_STOPPER_TALK", "{wq}What mysteries await?{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_STOPPER_TALK", "{ws}To knowledge!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "{wb}Perfect!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "{wb}Delightful!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "{wb}Impeccable taste!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "My, that is a {wq}beauty!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Every little bit helps!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "You've just supported science!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "That is a singular find… oh, but I have more, if you need them!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "It complements you {wq}perfectly.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "That is guaranteed for, at a minimum, ballast."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "I've sold four of those today!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "That will spur—or deter—violence swimmingly!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Yeah, I have absolutely no idea what that does. {wr}Good luck!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Thank you for contributing to my expedition."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Would you like that wrapped?"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "{wj}Uh, sorry,{w} I haven't gotten around to drying that off!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "I prefer you only killed bad people with this—or nautical sceptics."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "That is, {wj}uh… most probably valuable!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "A bare minimum of rust."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "No price is too great for {wb}progress.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "That will serve you {wb}splendidly.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Keep this up, and I'll be diving in no time."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "You'll receive a special thanks in my paper."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Now that you've got the hang of it, {wq}purchase something else!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Why not pick up a gift… {wr}for science?{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Your gold will be put to good use."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "Now you're part of the adventure!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "No need to explain what you plan to do with that."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "I can tell you're a collector."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_PURCHASE_TALK", "There's simply no better… {wj}for whatever that does.{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "Ah, yes, but science, {wj}tragically{w}, doesn’t operate on credit."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "{wq}I’d love to fund your dreams{w}, but I can barely fund my own!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "{wb}That’s the spirit!{w} The financial spirit, however, is lacking."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "Sorry, but seawater doesn’t pay the bills."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "{wr}If only enthusiasm were a currency!{w} You’d be rich indeed."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "That price is, {wj}regrettably{w}, non-negotiable—even for pioneers."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "Oh, don’t worry. Many great expeditions ended before they began."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "Perhaps a smaller trinket? To, ah, {ws}stay afloat?{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "{wr}Close!{w} Now, just a few more clams in the purse, as they say."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "I accept gold, doubloons, and… well, mostly just gold."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "Research may be priceless, but my wares are not."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "I could loan it to you, but then I’d need to repossess it underwater."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "Come now, even barnacles save more diligently!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_NOSALE_TALK", "{wb}Ah, a true visionary!{w} Sadly, visions don’t spend well at market."); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_INTRO_TALK", "All profits go to {wq}cutting-edge{w} research!"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_INTRO_TALK", "Have I read you my thesis on {wj}sea slugs?{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_INTRO_TALK", "{wq}Welcome to the dive site!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_INTRO_TALK", "Would you like to join my {wr}expedition?{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_INTRO_TALK", "I brew my potions with salt water for that extra {wb}zing!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_ATTACKED_TALK", "{wr}Uncalled for!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_ATTACKED_TALK", "{wj}No discounts!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_ATTACKED_TALK", "{wr}Not the equipment!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_ATTACKED_TALK", "{wr}Science under siege!{w}"); NpcTools.AddComplex(Databases.Strings.Core, "#BUBBS_STOLEN_TALK", "{wr}Robbery{w} is hardly the scientific method!"); List list = new List { BladeOfTheRuinedKing.ID, ExperimentalHexplate.ID, GuardianAngel.ID, GuinsoosRageblade.ID, Hubris.ID, KrakenSlayer.ID, LiandrysTorment.ID, Manamune.ID, StatikkShiv.ID, Stridebreaker.ID, SunfireAegis.ID, Thornmail.ID, ZhonyasHourglass.ID, Collector.ID, FrozenHeart.ID, RodOfAges.ID, HorizonFocus.ID, Puppeteer.ID, Galeforce.ID, RylaisCrystalScepter.ID, Shadowflame.ID, NavoriQuickblades.ID, BraumsShield.ID, ShieldOfMoltenStone.ID, CloakOfStarryNight.ID, ZekesConvergence.ID, Redemption.ID, Sheen.ID, FatedAshes.ID, Cull.ID, PerfectlyTimedStopwatch.ID, TearOfTheGoddess.ID, DetonationOrb.ID, RefillablePotion.ID, TalismanOfAscension.ID, SilverBolts.ID, PowPow.ID, HextechRifle.ID, ElectricRifle.ID, PrayerBeads.ID, Whisper.ID, Crossblade.ID, VirtueForm1.ID, SoulSpear.ID, Pinger.ID }; ShopKeeperLootTable = LootTableTools.CreateLootTable(); foreach (int item in list) { ShopKeeperLootTable.AddItemToPool(item); } GameObject val = ShopAPI.SetUpShop("BUBBS", "LOLItems", new List { "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_idle_01", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_idle_02", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_idle_03", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_idle_04" }, 6, new List { "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_talk_01", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_talk_02", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_talk_03", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_talk_04" }, 6, ShopKeeperLootTable, (ShopCurrencyType)0, "#BUBBS_GENERIC_TALK", "#BUBBS_STOPPER_TALK", "#BUBBS_PURCHASE_TALK", "#BUBBS_NOSALE_TALK", "#BUBBS_INTRO_TALK", "#BUBBS_ATTACKED_TALK", "#BUBBS_STOLEN_TALK", new Vector3(2.75f, 2.875f, 0f), new Vector3(0.1875f, 3f, 0f), (VoiceBoxes)21, ShopAPI.defaultItemPositions, 0.8f, false, (StatModifier[])null, (Func)null, (Func)null, (Func)null, (Func)null, (Func)null, (string)null, (string)null, true, true, "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_carpet", (Vector2?)Vector2.op_Implicit(new Vector3(0f, 0f, 0f)), true, "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_minimap", true, 0.1f, (DungeonPrerequisite[])null, 2f, (ShopItemPoolType)0, false, (IntVector2?)null, (IntVector2?)null); List list2 = new List { "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_01", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_02", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_03", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_04", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_05", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_06", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_07", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_08", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_09", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_10", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_11", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_12", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_13", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_14", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_15", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_16", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_17", "LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/bubbs_buy_18" }; ShopAPI.AddAdditionalAnimationsToShop(val, list2, 6f, (List)null, 6f, (List)null, 6f); PrototypeDungeonRoom room = RoomFactory.BuildNewRoomFromResource("LOLItems/Resources/npc_sprites/shopkeeper/bubbs_sprites/test.newroom", (Assembly)null).room; RegisterShopRoom(val, room, new Vector2(7.5f, 5f), 1.2f); List injectionData = GameManager.Instance.GlobalInjectionData.entries[2].injectionData.InjectionData; ProceduralFlowModifierData val2 = new ProceduralFlowModifierData(); val2.annotation = "bubbs"; val2.placementRules = new List { (FlowModifierPlacementType)1 }; val2.exactRoom = room; val2.prerequisites = (DungeonPrerequisite[])(object)new DungeonPrerequisite[0]; val2.CanBeForcedSecret = false; injectionData.Add(val2); HandyGameObject = val; } public static void RegisterShopRoom(GameObject shop, PrototypeDungeonRoom protoroom, Vector2 vector, float m_weight = 1f) { //IL_0003: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00e1: 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_0111: 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_0130: Unknown result type (might be due to invalid IL or missing references) protoroom.category = (RoomCategory)2; DungeonPrerequisite[] array = (DungeonPrerequisite[])((shop.GetComponent()?.prerequisites != null) ? ((Array)shop.GetComponent().prerequisites) : ((Array)new DungeonPrerequisite[0])); protoroom.placedObjectPositions.Add(vector); List placedObjects = protoroom.placedObjects; PrototypePlacedObjectData val = new PrototypePlacedObjectData(); val.contentsBasePosition = vector; val.fieldData = new List(); val.instancePrerequisites = array; val.linkedTriggerAreaIDs = new List(); DungeonPlaceable val2 = new DungeonPlaceable(); val2.width = 2; val2.height = 2; val2.respectsEncounterableDifferentiator = true; List list = new List(); DungeonPlaceableVariant val3 = new DungeonPlaceableVariant(); val3.percentChance = 1f; val3.nonDatabasePlaceable = shop; val3.prerequisites = array; val3.materialRequirements = (DungeonPlaceableRoomMaterialRequirement[])(object)new DungeonPlaceableRoomMaterialRequirement[0]; list.Add(val3); val2.variantTiers = list; val.placeableContents = val2; placedObjects.Add(val); RoomData val4 = default(RoomData); val4.room = protoroom; val4.isSpecialRoom = true; val4.category = "SPECIAL"; val4.specialSubCategory = "WEIRD_SHOP"; RoomData val5 = val4; val5.weight = 1f; RoomFactory.rooms.Add(((Object)shop).name, val5); DungeonHandler.Register(val5); } } public static class HelpfulMethods { public static string[,] FloorNames = new string[10, 2] { { "tt_castle", "Keep of the Lead Lord / Floor 1" }, { "tt_sewer", "Oubliette / Floor 1.5" }, { "tt5", "Gungeon Proper / Floor 2" }, { "tt_cathedral", "Abbey of the True Gun / Floor 2.5" }, { "tt_mines", "Black Powder Mine / Floor 3" }, { "ss_resourcefulrat", "Resourceful Rat's Lair / Floor 3.5" }, { "tt_catacombs", "Hollow / Floor 4" }, { "tt_nakatomi", "R&G Dept / Floor 4.5" }, { "tt_forge", "Forge / Floor 5" }, { "tt_bullethell", "Bullet Hell / Floor 6" } }; public static float GetFloorDamageScale() { return GameManager.Instance.GetLastLoadedLevelDefinition().dungeonSceneName switch { "tt_castle" => 1f, "tt_sewer" => 1.25f, "tt5" => 1.25f, "tt_cathedral" => 1.5f, "tt_mines" => 1.5f, "ss_resourcefulrat" => 1.75f, "tt_catacombs" => 1.75f, "tt_nakatomi" => 2f, "tt_forge" => 2f, "tt_bullethell" => 2.25f, _ => 0f, }; } public static void DoRandomParticleBurst(int num, Vector3 minPosition, Vector3 maxPosition, float angleVariance, float magnitudeVariance, float? startSize = null, float? startLifetime = null, Color? startColor = null, SparksType systemType = 0) { //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_0018: 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_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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_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) Vector3 val2 = default(Vector3); for (int i = 0; i < num; i++) { Vector3 val = Vector2.op_Implicit(MathsAndLogicHelper.DegreeToVector2(BraveUtility.RandomAngle())); ((Vector3)(ref val2))..ctor(Random.Range(minPosition.x, maxPosition.x), Random.Range(minPosition.y, maxPosition.y), Random.Range(minPosition.z, maxPosition.z)); Vector3 val3 = Quaternion.Euler(0f, 0f, Random.Range(0f - angleVariance, angleVariance)) * (((Vector3)(ref val)).normalized * Random.Range(((Vector3)(ref val)).magnitude - magnitudeVariance, ((Vector3)(ref val)).magnitude + magnitudeVariance)); GlobalSparksDoer.DoSingleParticle(val2, val3, startSize, startLifetime, startColor, systemType); } } public static float GetFloorPriceMod() { return GameManager.Instance.GetLastLoadedLevelDefinition().priceMultiplier; } public static void PlayRandomSFX(GameObject gameObject, string[] sfxList) { if (sfxList.Length != 0) { Random random = new Random(); int num = random.Next(sfxList.Length); string text = sfxList[num]; AkSoundEngine.PostEvent(text, gameObject); } } public static void PlayRandomSFX(GameObject gameObject, List sfxList) { if (sfxList.Count != 0) { Random random = new Random(); int index = random.Next(sfxList.Count); string text = sfxList[index]; AkSoundEngine.PostEvent(text, gameObject); } } public static float GetFloorValue() { string dungeonSceneName = GameManager.Instance.GetLastLoadedLevelDefinition().dungeonSceneName; for (int i = 0; i < FloorNames.GetLength(0); i++) { string text = FloorNames[i, 0]; if (dungeonSceneName == text) { return text switch { "tt_castle" => 1f, "tt_sewer" => 1.5f, "tt5" => 2f, "tt_cathedral" => 2.5f, "tt_mines" => 3f, "ss_resourcefulrat" => 3.5f, "tt_catacombs" => 4f, "tt_nakatomi" => 4.5f, "tt_forge" => 5f, "tt_bullethell" => 6f, _ => 0f, }; } } return 0f; } public static void CustomNotification(string header, string text, tk2dBaseSprite sprite = null, NotificationColor? color = null) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (sprite == null) { sprite = GameUIRoot.Instance.notificationController.notificationObjectSprite; } GameUIRoot.Instance.notificationController.DoCustomNotification(header, text, sprite.Collection, sprite.spriteId, color.GetValueOrDefault((NotificationColor)2), false, false); } public static GameObject Attach(this GameObject go, Action predicate = null, bool allowDuplicates = false) where T : MonoBehaviour { T obj = (allowDuplicates ? go.gameObject.AddComponent() : GameObjectExtensions.GetOrAddComponent(go.gameObject)); predicate?.Invoke(obj); return go; } public static List GetResourceFrames(this string baseString, int length) { List list = new List(length); for (int i = 1; i <= length; i++) { list.Add($"{baseString}_{i:D3}"); } return list; } public static VFXComplex CreateVFXComplex(string name, List spritePaths, int fps, IntVector2 Dimensions, Anchor anchor, bool usesZHeight, float zHeightOffset, bool persist = false, VFXAlignment alignment = 1, float emissivePower = -1f, Color? emissiveColour = null, VFXPoolType type = 1) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //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_0098: 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_013d: 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_0303: 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_03a3: 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_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_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Expected O, but got Unknown //IL_0232: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); VFXComplex val2 = new VFXComplex(); VFXObject val3 = new VFXObject(); val.SetActive(false); FakePrefab.MarkAsFakePrefab(val); Object.DontDestroyOnLoad((Object)(object)val); tk2dSpriteCollectionData val4 = SpriteBuilder.ConstructCollection(val, name + "_Collection", false); int num = SpriteBuilder.AddSpriteToCollection(spritePaths[0], val4, (Assembly)null); tk2dSprite orAddComponent = GameObjectExtensions.GetOrAddComponent(val); ((tk2dBaseSprite)orAddComponent).SetSprite(val4, num); tk2dSpriteDefinition currentSpriteDef = ((tk2dBaseSprite)orAddComponent).GetCurrentSpriteDef(); currentSpriteDef.colliderVertices = (Vector3[])(object)new Vector3[2] { new Vector3(0f, 0f, 0f), new Vector3((float)(Dimensions.x / 16), (float)(Dimensions.y / 16), 0f) }; tk2dSpriteAnimator orAddComponent2 = GameObjectExtensions.GetOrAddComponent(val); tk2dSpriteAnimation orAddComponent3 = GameObjectExtensions.GetOrAddComponent(val); orAddComponent3.clips = (tk2dSpriteAnimationClip[])(object)new tk2dSpriteAnimationClip[0]; orAddComponent2.Library = orAddComponent3; tk2dSpriteAnimationClip val5 = new tk2dSpriteAnimationClip(); val5.name = "start"; val5.frames = (tk2dSpriteAnimationFrame[])(object)new tk2dSpriteAnimationFrame[0]; val5.fps = fps; tk2dSpriteAnimationClip val6 = val5; List list = new List(); for (int i = 0; i < spritePaths.Count; i++) { tk2dSpriteCollectionData val7 = val4; int num2 = SpriteBuilder.AddSpriteToCollection(spritePaths[i], val7, (Assembly)null); tk2dSpriteDefinition val8 = val7.spriteDefinitions[num2]; GunTools.ConstructOffsetsFromAnchor(val8, anchor, (Vector2?)null, false, true); val8.colliderVertices = currentSpriteDef.colliderVertices; if (emissivePower > 0f) { val8.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); } if (emissivePower > 0f) { val8.material.SetFloat("_EmissiveColorPower", emissivePower); } if (emissiveColour.HasValue) { val8.material.SetColor("_EmissiveColor", emissiveColour.Value); } if (emissivePower > 0f) { val8.materialInst.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); } if (emissivePower > 0f) { val8.materialInst.SetFloat("_EmissiveColorPower", emissivePower); } if (emissiveColour.HasValue) { val8.materialInst.SetColor("_EmissiveColor", emissiveColour.Value); } list.Add(new tk2dSpriteAnimationFrame { spriteId = num2, spriteCollection = val7 }); } if (emissivePower > 0f) { ((BraveBehaviour)orAddComponent).renderer.material.shader = ShaderCache.Acquire("Brave/LitTk2dCustomFalloffTintableTiltedCutoutEmissive"); } if (emissivePower > 0f) { ((BraveBehaviour)orAddComponent).renderer.material.SetFloat("_EmissiveColorPower", emissivePower); } if (emissiveColour.HasValue) { ((BraveBehaviour)orAddComponent).renderer.material.SetColor("_EmissiveColor", emissiveColour.Value); } val6.frames = list.ToArray(); val6.wrapMode = (WrapMode)2; orAddComponent3.clips = orAddComponent3.clips.Concat((IEnumerable)(object)new tk2dSpriteAnimationClip[1] { val6 }).ToArray(); if (!persist) { SpriteAnimatorKiller val9 = ((Component)orAddComponent2).gameObject.AddComponent(); val9.fadeTime = -1f; val9.animator = orAddComponent2; val9.delayDestructionTime = -1f; } orAddComponent2.playAutomatically = true; orAddComponent2.DefaultClipId = orAddComponent2.GetClipIdByName("start"); val3.attached = true; val3.persistsOnDeath = persist; val3.usesZHeight = usesZHeight; val3.zHeight = zHeightOffset; val3.alignment = alignment; val3.destructible = false; val3.effect = val; val2.effects = (VFXObject[])(object)new VFXObject[1] { val3 }; return val2; } public static void RestorePercentAmmo(PlayerController source, float ammoRestorePercent) { for (int i = 0; i < source.inventory.AllGuns.Count; i++) { Gun val = source.inventory.AllGuns[i]; if (!val.InfiniteAmmo && val.CanGainAmmo) { int num = Mathf.CeilToInt((float)val.AdjustedMaxAmmo * ammoRestorePercent); val.GainAmmo(num); } } } public static void AddItemToSynergy(this PickupObject obj, CustomSynergyType type) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) AddItemToSynergy(type, obj.PickupObjectId); } public static void AddItemToSynergy(CustomSynergyType type, int id) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) AdvancedSynergyEntry[] synergies = GameManager.Instance.SynergyManager.synergies; foreach (AdvancedSynergyEntry val in synergies) { if (!val.bonusSynergies.Contains(type) || !((Object)(object)PickupObjectDatabase.GetById(id) != (Object)null)) { continue; } PickupObject byId = PickupObjectDatabase.GetById(id); if (byId is Gun) { if (val.OptionalGunIDs != null) { val.OptionalGunIDs.Add(id); continue; } val.OptionalGunIDs = new List { id }; } else if (val.OptionalItemIDs != null) { val.OptionalItemIDs.Add(id); } else { val.OptionalItemIDs = new List { id }; } } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Ricky2148.etg.LOLItems", "League of legends Items", "3.2.0")] public class Plugin : BaseUnityPlugin { public const string GUID = "Ricky2148.etg.LOLItems"; public const string NAME = "League of legends Items"; public const string VERSION = "3.2.0"; public const string TEXT_COLOR = "#F1C232"; internal static Harmony _Harmony; public void Start() { ETGModMainBehaviour.WaitForGameManagerStart((Action)GMStart); } public void GMStart(GameManager g) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Assets.SetupSpritesFromAssembly(Assembly.GetExecutingAssembly(), "LOLItems/Resources/weapon_sprites"); SoundManager.LoadSoundbanksFromAssembly((Assembly)null); _Harmony = new Harmony("Ricky2148.etg.LOLItems"); BladeOfTheRuinedKing.Init(); GuardianAngel.Init(); GuinsoosRageblade.Init(); Hubris.Init(); KrakenSlayer.Init(); FatedAshes.Init(); LiandrysTorment.Init(); TearOfTheGoddess.Init(); Manamune.Init(); Muramana.Init(); StatikkShiv.Init(); Stridebreaker.Init(); SunfireAegis.Init(); Thornmail.Init(); PerfectlyTimedStopwatch.Init(); ZhonyasHourglass.Init(); Collector.Init(); FrozenHeart.Init(); RodOfAges.Init(); HorizonFocus.Init(); Puppeteer.Init(); Galeforce.Init(); RylaisCrystalScepter.Init(); Shadowflame.Init(); NavoriQuickblades.Init(); BraumsShield.Init(); ShieldOfMoltenStone.Init(); CloakOfStarryNight.Init(); ExperimentalHexplate.Init(); ZekesConvergence.Init(); Redemption.Init(); Sheen.Init(); TrinityForce.Init(); DivineSunderer.Init(); EssenceReaver.Init(); LichBane.Init(); Cull.Init(); DetonationOrb.Init(); RefillablePotion.Init(); TalismanOfAscension.Init(); SilverBolts.Init(); PowPow.Add(); PowPowAltForm.Add(); HextechRifle.Add(); ElectricRifle.Add(); PrayerBeads.Add(); Whisper.Add(); Crossblade.Add(); VirtueForm1.Add(); VirtueForm2.Add(); VirtueForm3.Add(); SoulSpear.Add(); Pinger.Add(); Bubbs.Init(); LOLItemsSynergies.Init(); Log("League of legends Items v3.2.0 started successfully.", "#F1C232"); Log("Thirty seconds until minions spawn!", "#155DFC"); } public static void Log(string text, string color = "#FF007F") { ETGModConsole.Log((object)("" + text + ""), false); } } public static class LOLItemsSynergies { private static int _NUM_SYNERGIES = Enum.GetNames(typeof(Synergy)).Length; public static List _Synergies = Enumerable.Repeat((CustomSynergyType)0, _NUM_SYNERGIES).ToList(); public static List _SynergyNames = Enumerable.Repeat(null, _NUM_SYNERGIES).ToList(); public static List _SynergyEnums = new List(Enum.GetNames(typeof(Synergy))); public static List _SynergyIds = Enumerable.Repeat(0, _NUM_SYNERGIES).ToList(); public static void InitEnums() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < _SynergyNames.Count; i++) { _Synergies[i] = _SynergyEnums[i].ExtendEnum(); } } public static T ExtendEnum(this string s) where T : Enum { return ETGModCompatibility.ExtendEnum("LOLItems".ToUpper(), s); } public static void Init() { NewSynergy(LOLItems.Synergy.YOU_DARE_FACE_A_KING, "You dare face a King?!", new string[1] { IName(BladeOfTheRuinedKing.ItemName) }, new string[3] { "crown_of_guns", "gilded_bullets", "coin_crown" }); NewSynergy(LOLItems.Synergy.FOR_ISOLDE, "For Isolde!", new string[1] { IName(BladeOfTheRuinedKing.ItemName) }, new string[2] { "excaliber", "blasphemy" }); NewSynergy(LOLItems.Synergy.HEAVEN_AND_EARTH_COMBINED, "Heaven and Earth Combined", new string[2] { IName(CloakOfStarryNight.ItemName), IName(ShieldOfMoltenStone.ItemName) }); NewSynergy(LOLItems.Synergy.RETURN_ON_INVESTMENT, "Return on Investment", new string[1] { IName(Collector.ItemName) }, new string[2] { "loot_bag", "briefcase_of_cash" }); NewSynergy(LOLItems.Synergy.STROKE_OF_LUCK, "Stroke of Luck", new string[2] { IName(Collector.ItemName), "fortunes_favor" }); NewSynergy(LOLItems.Synergy.AN_OFFERING, "An offering", new string[2] { IName(Collector.ItemName), "daruma" }); NewSynergy(LOLItems.Synergy.BETTER_RNG, "Better RNG", new string[2] { IName(Collector.ItemName), "chance_bullets" }); NewSynergy(LOLItems.Synergy.WEAK_EARLY_GAME, "weak early game...", new string[2] { IName(Cull.ItemName), "unfinished_gun" }); NewSynergy(LOLItems.Synergy.BAUSEN_LAW, "Bausen Law", new string[2] { IName(Cull.ItemName), "huntsman" }); NewSynergy(LOLItems.Synergy.LIFE_AND_DEATH, "Life & Death", new string[2] { IName(DetonationOrb.ItemName), "life_orb" }); NewSynergy(LOLItems.Synergy.OVERCHARGED, "OVERCHARGED", new string[2] { IName(DetonationOrb.ItemName), "raiden_coil" }); NewSynergy(LOLItems.Synergy.THAT_GOOD_SHIT, "that GOOD $#%&", new string[2] { IName(ExperimentalHexplate.ItemName), "cigarettes" }); NewSynergy(LOLItems.Synergy.SPEED_BLITZ, "Speed Blitz", new string[1] { IName(ExperimentalHexplate.ItemName) }, new string[5] { "bionic_leg", "shotgun_coffee", "shotga_cola", "ballistic_boots", "magic_sweet" }); NewSynergy(LOLItems.Synergy.FILLER_UP, "Fill'Er-Up", new string[2] { IName(ExperimentalHexplate.ItemName), "gungine" }); NewSynergy(LOLItems.Synergy.ICE_TO_THE_CORE, "Ice to the core", new string[1] { IName(FrozenHeart.ItemName) }, new string[3] { "frost_bullets", "snowballets", "heart_of_ice" }); NewSynergy(LOLItems.Synergy.FROZEN_BULLETS, "Frozen Bullets", new string[1] { IName(FrozenHeart.ItemName) }, new string[2] { "cold_45", "frost_giant" }); NewSynergy(LOLItems.Synergy.DIVINE_JUDGEMENT, "Divine Judgement!", new string[2] { IName(GuardianAngel.ItemName), VirtueForm3.internalName }); NewSynergy(LOLItems.Synergy.WHY_WONT_YOU_DIE, "Why won't you DIE!", new string[1] { IName(GuardianAngel.ItemName) }, new string[3] { "clone", "gun_soul", "pig" }); NewSynergy(LOLItems.Synergy.BLADES_OF_CHAOS, "Blades of Chaos", new string[1] { IName(GuinsoosRageblade.ItemName) }, new string[2] { "chaos_ammolet", "chaos_bullets" }); NewSynergy(LOLItems.Synergy.POSEIGUNS_WRATH, "Poseigun's Wrath", new string[2] { IName(GuinsoosRageblade.ItemName), "trident" }); NewSynergy(LOLItems.Synergy.TRIPLE_DELUXE, "TRIPLE DELUXE", new string[3] { IName(GuinsoosRageblade.ItemName), IName(BladeOfTheRuinedKing.ItemName), IName(KrakenSlayer.ItemName) }); NewSynergy(LOLItems.Synergy.AMPLIFIED_LENS, "Amplified Lens", new string[1] { IName(HorizonFocus.ItemName) }, new string[3] { "sniper_rifle", "m1", "awp" }); NewSynergy(LOLItems.Synergy.FUTURISTIC_COMPATIBILITY, "Futuristic Compatibility", new string[1] { IName(HorizonFocus.ItemName) }, new string[3] { "railgun", "prototype_railgun", HextechRifle.internalName }); NewSynergy(LOLItems.Synergy.GUARANTEED_HIT_IF_IT_HITS, "guaranteed hit \"IF\" it hits", new string[2] { IName(HorizonFocus.ItemName), "eyepatch" }); NewSynergy(LOLItems.Synergy.QUADRATIC_SCALING, "Quadratic Scaling", new string[3] { IName(Hubris.ItemName), "metronome", "platinum_bullets" }); NewSynergy(LOLItems.Synergy.GLADITORIAL_CHALLENGE, "Gladitorial Challenge", new string[2] { IName(Hubris.ItemName), "lament_configurum" }); NewSynergy(LOLItems.Synergy.PEACE_AND_WAR, "Peace & War", new string[2] { IName(Hubris.ItemName), "really_special_lute" }); NewSynergy(LOLItems.Synergy.TOP_TIER_FISHING_TOOL, "TOP TIER Fishing Tool", new string[1] { IName(KrakenSlayer.ItemName) }, new string[3] { "siren", "trident", "barrel" }); NewSynergy(LOLItems.Synergy.ENTANGLEMENT, "Entanglement", new string[2] { IName(KrakenSlayer.ItemName), "abyssal_tentacle" }); NewSynergy(LOLItems.Synergy.MEGALODON_SLAYER, "Megalodon Slayer", new string[2] { IName(KrakenSlayer.ItemName), "compressed_air_tank" }); NewSynergy(LOLItems.Synergy.A_SAILORS_BEST_FRIEND, "A sailor's best friend.", new string[2] { IName(KrakenSlayer.ItemName), "double_vision" }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_LIANDRYS_TORMENT, "builds into Liandry's Torment", new string[2] { IName(FatedAshes.ItemName), IName(LiandrysTorment.ItemName) }); NewSynergy(LOLItems.Synergy.BURNING_VENGENCE, "Burning Vengence", new string[1] { IName(LiandrysTorment.ItemName) }, new string[2] { "phoenix", "napalm_strike" }); NewSynergy(LOLItems.Synergy.BLAZING_UNIVERSE, "Blazing Universe!", new string[1] { IName(LiandrysTorment.ItemName) }, new string[2] { "hot_lead", "gungeon_pepper" }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_MANAMUNE, "builds into Manamune", new string[2] { IName(TearOfTheGoddess.ItemName), IName(Manamune.ItemName) }); NewSynergy(LOLItems.Synergy.BLADE_OF_THE_ONI_MANAMUNE, "Blade of the Oni", new string[2] { IName(Manamune.ItemName), "demon_head" }); NewSynergy(LOLItems.Synergy.BLADE_OF_THE_ONI_MURAMANA, "Blade of the Oni", new string[2] { IName(Muramana.ItemName), "demon_head" }); NewSynergy(LOLItems.Synergy.IT_HAS_TO_BE_THIS_WAY, "It Has To Be This Way", new string[2] { IName(Muramana.ItemName), "raiden_coil" }); NewSynergy(LOLItems.Synergy.JETSTREAM_SAM, "Jetstream Sam", new string[2] { IName(Muramana.ItemName), "bionic_leg" }); NewSynergy(LOLItems.Synergy.SPONSORED_BY_NAVORI, "*sponsored by Navori*", new string[1] { IName(NavoriQuickblades.ItemName) }, new string[2] { "knife_shield", "katana_bullets" }); NewSynergy(LOLItems.Synergy.QUICKBLADES_AND_QUICKBULLETS, "Quickblades and Quickbullets", new string[2] { IName(NavoriQuickblades.ItemName), "rocket_powered_bullets" }); NewSynergy(LOLItems.Synergy.LIGHTSLINGER, "Lightslinger", new string[1] { IName(NavoriQuickblades.ItemName) }, new string[2] { "big_iron", "the_judge" }); NewSynergy(LOLItems.Synergy.PLUS25_CHARM, "+25 Charm", new string[1] { IName(Puppeteer.ItemName) }, new string[4] { "shotgun_full_of_love", "charmed_bow", "really_special_lute", "charming_rounds" }); NewSynergy(LOLItems.Synergy.CHARMING_REINVIGORATION, "Charming Reinvigoration", new string[2] { IName(Puppeteer.ItemName), "charm_horn" }); NewSynergy(LOLItems.Synergy.SUPER_TRAINING, "Super Training", new string[2] { IName(RodOfAges.ItemName), "macho_brace" }); NewSynergy(LOLItems.Synergy.AGE_OLD_WISDOM, "Age old wisdom", new string[1] { IName(RodOfAges.ItemName) }, new string[3] { "old_knights_shield", "old_knights_helm", "old_knights_flask" }); NewSynergy(LOLItems.Synergy.ARCANE_MASTERY, "Arcane Mastery", new string[3] { IName(RodOfAges.ItemName), "bundle_of_wands", "staff_of_firepower" }); NewSynergy(LOLItems.Synergy.ICE_II, "Ice II", new string[1] { IName(RylaisCrystalScepter.ItemName) }, new string[4] { "ice_breaker", "freeze_ray", "glacier", "snowballer" }); NewSynergy(LOLItems.Synergy.WITCHCRAFT, "witchcraft...", new string[1] { IName(RylaisCrystalScepter.ItemName) }, new string[2] { "witch_pistol", "hexagun" }); NewSynergy(LOLItems.Synergy.HELLS_SHADOWS, "Hell's Shadows", new string[1] { IName(Shadowflame.ItemName) }, new string[2] { "pitchfork", "demon_head" }); NewSynergy(LOLItems.Synergy.SOLAR_FLAME, "Solar Flame", new string[2] { IName(Shadowflame.ItemName), "sunlight_javelin" }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_TRINITY_FORCE, "builds into Trinity Force", new string[2] { IName(Sheen.ItemName), IName(TrinityForce.ItemName) }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_DIVINE_SUNDERER, "builds into Divine Sunderer", new string[2] { IName(Sheen.ItemName), IName(DivineSunderer.ItemName) }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_ESSENCE_REAVER, "builds into Essence Reaver", new string[2] { IName(Sheen.ItemName), IName(EssenceReaver.ItemName) }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_LICH_BANE, "builds into Lich Bane", new string[2] { IName(Sheen.ItemName), IName(LichBane.ItemName) }); NewSynergy(LOLItems.Synergy.EXTRA_SILVER, "Extra Silver", new string[2] { IName(SilverBolts.ItemName), "silver_bullets" }); NewSynergy(LOLItems.Synergy.THE_NIGHT_HUNTER, "The Night Hunter", new string[2] { IName(SilverBolts.ItemName), "crossbow" }); NewSynergy(LOLItems.Synergy.STATIKK_ELECTRICITY, "statikk electricity", new string[1] { IName(StatikkShiv.ItemName) }, new string[2] { "thunderclap", "laser_lotus" }); NewSynergy(LOLItems.Synergy.MO_LIGHTNING, "Mo' Lightning!", new string[2] { IName(StatikkShiv.ItemName), "shock_rounds" }); NewSynergy(LOLItems.Synergy.EMPEROR_OF_LIGHTNING, "EMPEROR OF LIGHTNING", new string[2] { IName(StatikkShiv.ItemName), "the_emperor" }); NewSynergy(LOLItems.Synergy.TRUE_SUN_GOD, "TRUE SUN GOD", new string[2] { IName(SunfireAegis.ItemName), "sunlight_javelin" }); NewSynergy(LOLItems.Synergy.VOLTAGE_NOVA, "Voltage Nova", new string[2] { IName(SunfireAegis.ItemName), "gungeon_pepper" }); NewSynergy(LOLItems.Synergy.ICE_COLD_THORNS, "Ice cold thorns", new string[2] { IName(Thornmail.ItemName), "heart_of_ice" }); NewSynergy(LOLItems.Synergy.THORN_MAELSTROM, "Thorn Maelstrom", new string[2] { IName(Thornmail.ItemName), "armor_of_thorns" }); NewSynergy(LOLItems.Synergy.OW_SPLINTER, "Ow! Splinter", new string[2] { IName(Thornmail.ItemName), "wood_beam" }); NewSynergy(LOLItems.Synergy.ABSOLUTE_CONVERGENCE, "ABSOLUTE CONVERGENCE", new string[2] { IName(ZekesConvergence.ItemName), "dark_marker" }); NewSynergy(LOLItems.Synergy.FLAME_OVER_ICE, "Flame > Ice", new string[3] { IName(ZekesConvergence.ItemName), "hot_lead", "phoenix" }); NewSynergy(LOLItems.Synergy.ICE_OVER_FLAME, "Ice > Flame", new string[3] { IName(ZekesConvergence.ItemName), "frost_giant", "frost_bullets" }); NewSynergy(LOLItems.Synergy.GALEFORCE_FOUR, "FOUR!", new string[2] { IName(Galeforce.ItemName), Whisper.internalName }); NewSynergy(LOLItems.Synergy.BOW_MASTERY, "Bow Mastery", new string[1] { IName(Galeforce.ItemName) }, new string[3] { "bow", "charmed_bow", "gunbow" }); NewSynergy(LOLItems.Synergy.ENLIGHTENED_BULLETS, "Enlightened Bullets", new string[2] { IName(Redemption.ItemName), "silver_bullets" }); NewSynergy(LOLItems.Synergy.TERROR_TO_THE_GUNDEAD, "Terror to the Gundead", new string[2] { IName(Redemption.ItemName), "mourning_star" }); NewSynergy(LOLItems.Synergy.BUNCH_O_POTIONS, "BunchO Potions", new string[2] { IName(RefillablePotion.ItemName), "old_knights_flask" }); NewSynergy(LOLItems.Synergy.COCKTAIL_POTION, "Cocktail Potion", new string[1] { IName(RefillablePotion.ItemName) }, new string[2] { "potion_of_lead_skin", "potion_of_gun_friendship" }); NewSynergy(LOLItems.Synergy.DEMACIAN_TRAITOR, "Demacian Traitor", new string[2] { IName(Stridebreaker.ItemName), "betrayers_shield" }); NewSynergy(LOLItems.Synergy.BUILDS_INTO_ZHONYAS_HOURGLASS, "builds into Zhonya's Hourglass", new string[2] { IName(PerfectlyTimedStopwatch.ItemName), IName(ZhonyasHourglass.ItemName) }); NewSynergy(LOLItems.Synergy.CHAOS_CONTROL, "CHAOS CONTROL!", new string[3] { IName(ZhonyasHourglass.ItemName), "chaos_bullets", "chaos_ammolet" }); NewSynergy(LOLItems.Synergy.SEVEN_SECONDS_REMAIN, "Seven seconds remain...", new string[2] { IName(ZhonyasHourglass.ItemName), "super_hot_watch" }); NewSynergy(LOLItems.Synergy.BOUNCEMAXXING, "Bouncemaxxing", new string[1] { Crossblade.internalName }, new string[2] { "bouncy_bullets", "boomerang" }); NewSynergy(LOLItems.Synergy.ME_MISS_NOT_BY_A_LONG_SHOT, "\"Me, miss? Not by a long shot.\"", new string[1] { HextechRifle.internalName }, new string[2] { "scope", "laser_sight" }); NewSynergy(LOLItems.Synergy.RUNAANS_BULLETS, "Runaan's Bullets", new string[2] { PowPow.internalName, "scattershot" }); NewSynergy(LOLItems.Synergy.THREE_PRONGED_SPEARS, "Three-pronged spears", new string[1] { SoulSpear.internalName }, new string[2] { "trident", "pitchfork" }); NewSynergy(LOLItems.Synergy.EXP_SHARE_FORM_1, "EXP. Share", new string[1] { VirtueForm1.internalName }, new string[3] { "macho_brace", "scouter", "life_orb" }); NewSynergy(LOLItems.Synergy.EXP_SHARE_FORM_2, "EXP. Share", new string[1] { VirtueForm2.internalName }, new string[3] { "macho_brace", "scouter", "life_orb" }); NewSynergy(LOLItems.Synergy.EXP_SHARE_FORM_3, "EXP. Share", new string[1] { VirtueForm3.internalName }, new string[3] { "macho_brace", "scouter", "life_orb" }); NewSynergy(LOLItems.Synergy.DUO_QUEUING, "Duo queuing", new string[2] { Pinger.internalName, "friendship_cookie" }); NewSynergy(LOLItems.Synergy.SPAM_PINGING, "spam pinging", new string[2] { Pinger.internalName, "scattershot" }); NewSynergy(LOLItems.Synergy.HIGH_BLOOD_PRESSURE, "HIGH BLOOD PRESSURE", new string[2] { Pinger.internalName, "enraging_photo" }); NewSynergy(LOLItems.Synergy.EMOTIONAL_PINGS, "Emotional pings", new string[2] { Pinger.internalName, "shotgun_full_of_hate" }); } private static AdvancedSynergyEntry NewSynergy(Synergy synergy, string name, string[] mandatory, string[] optional = null, bool ignoreLichEyeBullets = false) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) AdvancedSynergyEntry result = RegisterSynergy(_Synergies[(int)synergy], name, mandatory.ToList(), optional?.ToList(), ignoreLichEyeBullets); _SynergyNames[(int)synergy] = name; _SynergyIds[(int)synergy] = GameManager.Instance.SynergyManager.synergies.Length - 1; return result; } public static AdvancedSynergyEntry RegisterSynergy(CustomSynergyType synergy, string name, List mandatoryConsoleIDs, List optionalConsoleIDs = null, bool ignoreLichEyeBullets = false) { //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_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_01cb: 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_01d9: 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_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_0201: Expected O, but got Unknown List list = new List(); List list2 = new List(); List list3 = new List(); List list4 = new List(); foreach (string mandatoryConsoleID in mandatoryConsoleIDs) { PickupObject val = Game.Items[mandatoryConsoleID]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).GetComponent())) { list2.Add(val.PickupObjectId); } else if (Object.op_Implicit((Object)(object)val) && (Object.op_Implicit((Object)(object)((Component)val).GetComponent()) || Object.op_Implicit((Object)(object)((Component)val).GetComponent()))) { list.Add(val.PickupObjectId); } } if (optionalConsoleIDs != null) { foreach (string optionalConsoleID in optionalConsoleIDs) { PickupObject val2 = Game.Items[optionalConsoleID]; if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Component)val2).GetComponent())) { list4.Add(val2.PickupObjectId); } else if (Object.op_Implicit((Object)(object)val2) && (Object.op_Implicit((Object)(object)((Component)val2).GetComponent()) || Object.op_Implicit((Object)(object)((Component)val2).GetComponent()))) { list3.Add(val2.PickupObjectId); } } } string text = "#" + ETGMod.ToID(name).ToUpperInvariant(); Databases.Strings.Synergy.Set(text, name); AdvancedSynergyEntry val3 = new AdvancedSynergyEntry { NameKey = text, MandatoryItemIDs = list, MandatoryGunIDs = list2, OptionalItemIDs = list3, OptionalGunIDs = list4, bonusSynergies = new List { synergy }, statModifiers = new List(), IgnoreLichEyeBullets = ignoreLichEyeBullets }; int num = GameManager.Instance.SynergyManager.synergies.Length; Array.Resize(ref GameManager.Instance.SynergyManager.synergies, num + 1); GameManager.Instance.SynergyManager.synergies[num] = val3; return val3; } private static string IName(string itemName) { return "LOLItems:" + ETGMod.ToID(itemName); } public static CustomSynergyType Synergy(this Synergy synergy) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return _Synergies[(int)synergy]; } public static string SynergyName(this Synergy synergy) { return _SynergyNames[(int)synergy]; } public static bool HasSynergy(this PlayerController player, Synergy synergy) { return player.ActiveExtraSynergies.Contains(_SynergyIds[(int)synergy]); } } public enum Synergy { RETURN_ON_INVESTMENT, STROKE_OF_LUCK, AN_OFFERING, BETTER_RNG, HEAVEN_AND_EARTH_COMBINED, ICE_TO_THE_CORE, FROZEN_BULLETS, GALEFORCE_FOUR, BOW_MASTERY, SUPER_TRAINING, AGE_OLD_WISDOM, YOU_DARE_FACE_A_KING, FOR_ISOLDE, BOUNCEMAXXING, ME_MISS_NOT_BY_A_LONG_SHOT, EXP_SHARE_FORM_1, EXP_SHARE_FORM_2, EXP_SHARE_FORM_3, WEAK_EARLY_GAME, BAUSEN_LAW, THAT_GOOD_SHIT, SPEED_BLITZ, FILLER_UP, DIVINE_JUDGEMENT, WHY_WONT_YOU_DIE, BUNCH_O_POTIONS, COCKTAIL_POTION, BLADES_OF_CHAOS, POSEIGUNS_WRATH, TRIPLE_DELUXE, AMPLIFIED_LENS, FUTURISTIC_COMPATIBILITY, GUARANTEED_HIT_IF_IT_HITS, QUADRATIC_SCALING, GLADITORIAL_CHALLENGE, PEACE_AND_WAR, TOP_TIER_FISHING_TOOL, ENTANGLEMENT, MEGALODON_SLAYER, A_SAILORS_BEST_FRIEND, BUILDS_INTO_LIANDRYS_TORMENT, BUILDS_INTO_MANAMUNE, BUILDS_INTO_ZHONYAS_HOURGLASS, BLADE_OF_THE_ONI_MANAMUNE, BLADE_OF_THE_ONI_MURAMANA, IT_HAS_TO_BE_THIS_WAY, JETSTREAM_SAM, BURNING_VENGENCE, BLAZING_UNIVERSE, SPONSORED_BY_NAVORI, QUICKBLADES_AND_QUICKBULLETS, LIGHTSLINGER, PLUS25_CHARM, CHARMING_REINVIGORATION, ARCANE_MASTERY, ICE_II, WITCHCRAFT, HELLS_SHADOWS, SOLAR_FLAME, STATIKK_ELECTRICITY, MO_LIGHTNING, EMPEROR_OF_LIGHTNING, TRUE_SUN_GOD, VOLTAGE_NOVA, ICE_COLD_THORNS, THORN_MAELSTROM, OW_SPLINTER, ABSOLUTE_CONVERGENCE, FLAME_OVER_ICE, ICE_OVER_FLAME, ENLIGHTENED_BULLETS, TERROR_TO_THE_GUNDEAD, DEMACIAN_TRAITOR, CHAOS_CONTROL, SEVEN_SECONDS_REMAIN, THREE_PRONGED_SPEARS, RUNAANS_BULLETS, EXTRA_SILVER, THE_NIGHT_HUNTER, LIFE_AND_DEATH, OVERCHARGED, DUO_QUEUING, SPAM_PINGING, HIGH_BLOOD_PRESSURE, EMOTIONAL_PINGS, BUILDS_INTO_DIVINE_SUNDERER, BUILDS_INTO_TRINITY_FORCE, BUILDS_INTO_ESSENCE_REAVER, BUILDS_INTO_LICH_BANE } } namespace LOLItems.weapons { internal class Crossblade : AdvancedGunBehavior { public static string internalName = "Crossblade"; public static int ID; public static string realName = "Crossblade"; private static int ammoStat = 250; private static float reloadDuration = 0f; private static float fireRateStat = 0.6f; private static int spreadAngle = 5; private static int ricochetRange = 5; private static int ricochetCount = 8; private static float ricochetDamageScale = 0.4f; private static float ricochetSpeedScale = 0.5f; private static float projectileDamageStat = 10f; private static float projectileSpeedStat = 20f; private static float projectileRangeStat = 25f; private static float projectileForceStat = 8f; private static List CrossbladeFiringSFXList = new List { "boomerangblade_fire_sfx_004", "boomerangblade_fire_sfx_005", "boomerangblade_fire_sfx_006", "boomerangblade_fire_sfx_007" }; public bool BOUNCEMAXXINGActivated; public static void Add() { //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0170: 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_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_0188: 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_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_0458: 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_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0488: 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) //IL_04a8: 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_04c8: 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_060d: 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_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0628: 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_063e: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0654: 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_066a: 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_0680: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: 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_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_0706: 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_0730: 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_082e: Unknown result type (might be due to invalid IL or missing references) //IL_0847: 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_0887: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "boomerangblade"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Catch!\""); GunExt.SetLongDescription((PickupObject)(object)val, "A special cross-shaped boomerang blade said to be from a famous desert mercenary. As if the boomerang itself is determined to finish the job, it will try to attack more enemies if possible.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 18); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.muzzleFlashEffects = null; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)10; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)2; val.carryPixelOffset += new IntVector2(0, 0); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(0.25f, 0.625f); val.gunScreenShake.magnitude = 0f; PickupObject byId2 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; RicochetProjectileModule ricochetProjectileModule = ((Component)val2).gameObject.AddComponent(); ricochetProjectileModule.ricochetDamageScale = ricochetDamageScale; ricochetProjectileModule.ricochetSpeedScale = ricochetSpeedScale; ricochetProjectileModule.ricochetRange = ricochetRange; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetration = ricochetCount - 1; orAddComponent.penetratesBreakables = false; val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; val2.hitEffects.HasProjectileDeathVFX = true; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId3 = PickupObjectDatabase.GetById(24); deathAny = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; val2.hitEffects.deathEnemy = null; val2.hitEffects.enemy = null; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId4 = PickupObjectDatabase.GetById(24); tileMapHorizontal = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId5 = PickupObjectDatabase.GetById(24); tileMapVertical = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; val2.objectImpactEventName = "shockSMG3"; val2.enemyImpactEventName = "boomerangblade1"; GunTools.SetProjectileSpriteRight(val2, "boomerangblade_projectile_001", 22, 22, true, (Anchor)4, (int?)16, (int?)16, true, false, (int?)null, (int?)null, (Projectile)null); List list = new List { "boomerangblade_projectile_001", "boomerangblade_projectile_002", "boomerangblade_projectile_003", "boomerangblade_projectile_004", "boomerangblade_projectile_005", "boomerangblade_projectile_006", "boomerangblade_projectile_007", "boomerangblade_projectile_008" }; int num = 16; List list2 = new List { new IntVector2(22, 22), new IntVector2(22, 22), new IntVector2(22, 22), new IntVector2(22, 22), new IntVector2(22, 22), new IntVector2(22, 22), new IntVector2(22, 22), new IntVector2(22, 22) }; List list3 = new List { false, false, false, false, false, false, false, false }; List list4 = new List { (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4 }; List list5 = new List { false, false, false, false, false, false, false, false }; List list6 = new List { false, false, false, false, false, false, false, false }; List list7 = new List { Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero) }; List list8 = new List { (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16), (IntVector2?)new IntVector2(16, 16) }; List list9 = new List { null, null, null, null, null, null, null, null }; List list10 = new List { null, null, null, null, null, null, null, null }; WrapMode val3 = (WrapMode)0; GunTools.AddAnimationToProjectile(val2, list, num, list2, list3, list4, list5, list6, list7, list8, list9, list10, val3, "idle", "idle"); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("crossblade_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/boomerangblade_ammo_full_001", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/boomerangblade_ammo_empty_001"); ((PickupObject)val).quality = (ItemQuality)2; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; } public override void OnInitializedWithOwner(GameActor actor) { ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); Plugin.Log("Player picked up " + internalName); } public override void OnDropped() { ((AdvancedGunBehavior)this).OnDropped(); } protected override void Update() { if ((Object)(object)((AdvancedGunBehavior)this).Owner != (Object)null) { if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.BOUNCEMAXXING) && !BOUNCEMAXXINGActivated) { ((Component)base.gun.DefaultModule.projectiles[0]).gameObject.GetComponent().penetration = ricochetCount + 2; BOUNCEMAXXINGActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.BOUNCEMAXXING) && BOUNCEMAXXINGActivated) { ((Component)base.gun.DefaultModule.projectiles[0]).gameObject.GetComponent().penetration = ricochetCount; BOUNCEMAXXINGActivated = false; } } ((AdvancedGunBehavior)this).Update(); } public override void PostProcessProjectile(Projectile projectile) { ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } public override void OnPostFired(PlayerController player, Gun gun) { HelpfulMethods.PlayRandomSFX(((Component)gun).gameObject, CrossbladeFiringSFXList); ((AdvancedGunBehavior)this).OnPostFired(player, gun); } } internal class ElectricRifle : AdvancedGunBehavior { public static string internalName = "Electric Rifle"; public static int ID; public static string realName = "Zaunite Rifle"; private static int ammoStat = 1000; private static int clipStat = 70; private static float reloadDuration = 1f; private static float fireRateStat = 0.67f; private static int spreadAngle = 5; private static float projectileDamageStat = 3.5f; private static float projectileSpeedStat = 40f; private static float projectileRangeStat = 15f; private static float projectileForceStat = 6f; private static int burstCount = 7; private static float burstFireInterval = 0.02f; private static float adjustedFireRate = fireRateStat - (float)burstCount * burstFireInterval; private static List normalFiringSFXList = new List { "shockSMG_fire_001", "shockSMG_fire_002", "shockSMG_fire_003", "shockSMG_fire_004", "shockSMG_fire_005", "shockSMG_fire_006" }; private bool initialShotInBurst = true; private int ammoInClipTracker = 0; public static void Add() { //IL_0143: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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_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_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_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_021a: 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_045a: 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_04fb: 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_0532: 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_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0543: 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_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_0637: 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_0655: 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_0673: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_086c: 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_0882: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //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_08ae: 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_08c4: 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_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08df: 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_08f5: 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_090b: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Unknown result type (might be due to invalid IL or missing references) //IL_0921: Unknown result type (might be due to invalid IL or missing references) //IL_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_0952: 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_097a: Unknown result type (might be due to invalid IL or missing references) //IL_098e: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_09b6: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09de: Unknown result type (might be due to invalid IL or missing references) //IL_09f2: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0b7b: Unknown result type (might be due to invalid IL or missing references) //IL_0b94: Unknown result type (might be due to invalid IL or missing references) //IL_0ba8: Unknown result type (might be due to invalid IL or missing references) //IL_0c17: Unknown result type (might be due to invalid IL or missing references) //IL_0c1c: Unknown result type (might be due to invalid IL or missing references) //IL_0c27: Unknown result type (might be due to invalid IL or missing references) //IL_0c43: Unknown result type (might be due to invalid IL or missing references) //IL_0c45: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "shockSMG"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"I am Lightning!\""); GunExt.SetLongDescription((PickupObject)(object)val, "A small compact rifle that appears to run on electricity rather than ammunition. Another weapon of shockingly amazing engineering despite its appearances. It tends to shock you occasionally, which is a bit annoying.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 43); GunExt.SetAnimationFPS(val, val.reloadAnimation, 12); PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId2 = PickupObjectDatabase.GetById(89); muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_plasmacell_reload_01") }); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)4; val.DefaultModule.burstShotCount = burstCount; val.DefaultModule.burstCooldownTime = burstFireInterval; val.gunClass = (GunClass)15; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = adjustedFireRate; val.DefaultModule.numberOfShotsInClip = clipStat; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)2; val.carryPixelOffset += new IntVector2(0, 2); val.carryPixelDownOffset += new IntVector2(0, 0); val.carryPixelUpOffset += new IntVector2(0, 0); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(0.5f, 0.125f); val.gunScreenShake.magnitude = 0.15f; PickupObject byId3 = PickupObjectDatabase.GetById(56); Projectile val2 = Object.Instantiate(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.HasProjectileDeathVFX = true; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId4 = PickupObjectDatabase.GetById(153); deathAny = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; ref VFXPool deathEnemy = ref val2.hitEffects.deathEnemy; PickupObject byId5 = PickupObjectDatabase.GetById(153); deathEnemy = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.deathEnemy; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId6 = PickupObjectDatabase.GetById(153); enemy = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.enemy; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId7 = PickupObjectDatabase.GetById(153); tileMapHorizontal = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId8 = PickupObjectDatabase.GetById(153); tileMapVertical = ((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; val2.objectImpactEventName = "shockSMG1"; val2.enemyImpactEventName = "shockSMG2"; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; GunTools.SetProjectileSpriteRight(val2, "shockSMG_projectile_001", 16, 7, true, (Anchor)4, (int?)14, (int?)5, true, false, (int?)null, (int?)null, (Projectile)null); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = "green_beam"; ref GameObject shellCasing = ref val.shellCasing; PickupObject byId9 = PickupObjectDatabase.GetById(25); shellCasing = ((Gun)((byId9 is Gun) ? byId9 : null)).shellCasing; val.clipObject = ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/shockSMG_clip_001", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 1, false, (GoopDefinition)null, 1f)).gameObject; val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 1; val.reloadClipLaunchFrame = 4; EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.2f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.1f; easyTrailBullet.BaseColor = ExtendedColours.lime; easyTrailBullet.StartColor = Color.white; easyTrailBullet.EndColor = Color.green; List list = new List { "shockSMG_projectile_001", "shockSMG_projectile_002", "shockSMG_projectile_003", "shockSMG_projectile_004", "shockSMG_projectile_005", "shockSMG_projectile_006", "shockSMG_projectile_007", "shockSMG_projectile_008", "shockSMG_projectile_009", "shockSMG_projectile_010", "shockSMG_projectile_011", "shockSMG_projectile_012" }; int num = 30; List list2 = new List { new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7), new IntVector2(16, 7) }; List list3 = new List { true, true, true, true, true, true, true, true, true, true, true, true }; List list4 = new List { (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4, (Anchor)4 }; List list5 = new List { false, false, false, false, false, false, false, false, false, false, false, false }; List list6 = new List { false, false, false, false, false, false, false, false, false, false, false, false }; List list7 = new List { Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero) }; List list8 = new List { (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5), (IntVector2?)new IntVector2(14, 5) }; List list9 = new List { null, null, null, null, null, null, null, null, null, null, null, null }; List list10 = new List { null, null, null, null, null, null, null, null, null, null, null, null }; WrapMode val3 = (WrapMode)0; GunTools.AddAnimationToProjectile(val2, list, num, list2, list3, list4, list5, list6, list7, list8, list9, list10, val3, "idle", "idle"); ((PickupObject)val).quality = (ItemQuality)3; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; List list11 = new List { "LOLItems:electric_rifle" }; List list12 = new List { "battery_bullets", "shock_rifle" }; AdvancedSynergyEntry val4 = CustomSynergies.Add("Passive Charge", list11, list12, true); CustomSynergyType val5 = ETGModCompatibility.ExtendEnum("LOLItems", "Passive Charge"); val4.bonusSynergies = new List(1) { val5 }; AmmoRegenSynergyProcessor val6 = ((Component)val).gameObject.AddComponent(); val6.RequiredSynergy = val5; val6.AmmoPerSecond = 2f; val6.PreventGainWhileFiring = true; } public override void OnPostFired(PlayerController player, Gun gun) { if ((Object)(object)gun != (Object)null && initialShotInBurst) { initialShotInBurst = false; HelpfulMethods.PlayRandomSFX(((Component)gun).gameObject, normalFiringSFXList); } else if (!gun.m_midBurstFire) { ResetInitialFire(player); } ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void OnInitializedWithOwner(GameActor actor) { GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); val.OnPreDodgeRoll += ResetInitialFire; ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); } private void ResetInitialFire(PlayerController player) { initialShotInBurst = true; } public override void OnFinishAttack(PlayerController player, Gun gun) { ResetInitialFire(player); ((AdvancedGunBehavior)this).OnFinishAttack(player, gun); } public override void OnBurstContinued(PlayerController player, Gun gun) { ResetInitialFire(player); ((AdvancedGunBehavior)this).OnBurstContinued(player, gun); } public override void OnSwitchedToThisGun() { GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null); ResetInitialFire(player); ((AdvancedGunBehavior)this).OnSwitchedToThisGun(); } public override void OnReload(PlayerController player, Gun gun) { ResetInitialFire(player); ((AdvancedGunBehavior)this).OnReload(player, gun); } } internal class GauntletOfNeZuk : AdvancedGunBehavior { public static string internalName = "gauntlet_of_nezuk"; public static int ID; public static string realName = "Gauntlet of Ne'Zuk"; public static void Add() { //IL_00ca: 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_017c: 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_01cf: 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_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: 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_035e: 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_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Expected O, but got Unknown //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_055c: 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_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Expected O, but got Unknown //IL_05a3: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "basicchargegun"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "I made a gun!"); GunExt.SetLongDescription((PickupObject)(object)val, "This gun has the potential to become any other gun! Way better than that other Unfinished Gun."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 15); GunExt.SetAnimationFPS(val, val.reloadAnimation, 15); GunExt.SetAnimationFPS(val, val.chargeAnimation, 10); ((Component)val).GetComponent().GetClipByName(val.chargeAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent().GetClipByName(val.chargeAnimation).fps = 15f; PickupObject byId = PickupObjectDatabase.GetById(41); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId2 = PickupObjectDatabase.GetById(228); muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = 0f; val.DefaultModule.shootStyle = (ShootStyle)3; val.gunClass = (GunClass)60; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = 1f; val.DefaultModule.cooldownTime = 0.1f; val.DefaultModule.numberOfShotsInClip = 15; val.SetBaseMaxAmmo(150); val.gunHandedness = (GunHandedness)0; val.carryPixelOffset += new IntVector2(0, 0); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(0.75f, 0.2f); PickupObject byId3 = PickupObjectDatabase.GetById(41); Projectile val2 = Object.Instantiate(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.alwaysUseMidair = true; val2.hitEffects.midairInheritsFlip = true; val2.hitEffects.midairInheritsRotation = true; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId4 = PickupObjectDatabase.GetById(41); tileMapHorizontal = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId5 = PickupObjectDatabase.GetById(41); tileMapVertical = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = 5f; val2.baseData.speed = 25f; val2.baseData.range = 100f; val2.baseData.force = 10f; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; val2.AdditionalScaleMultiplier = 1f; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Template Gun Orbs", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/tempgun_clipfull", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/tempgun_clipempty"); PickupObject byId6 = PickupObjectDatabase.GetById(228); Projectile val3 = Object.Instantiate(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0]); ((Component)val3).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val3).gameObject); Object.DontDestroyOnLoad((Object)(object)val3); val3.baseData.damage = 30f; val3.baseData.speed = 25f; val3.baseData.range = 100f; val3.baseData.force = 5f; ((BraveBehaviour)val3).transform.parent = val.barrelOffset; val3.AdditionalScaleMultiplier = 1f; SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_02", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_grasshopper_shot_01") }); PickupObject byId7 = PickupObjectDatabase.GetById(39); Projectile val4 = Object.Instantiate(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0]); ((Component)val4).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val4).gameObject); Object.DontDestroyOnLoad((Object)(object)val4); val4.baseData.damage = 70f; val4.baseData.speed = 25f; val4.baseData.range = 100f; val4.baseData.force = 10f; ((BraveBehaviour)val4).transform.parent = val.barrelOffset; val4.AdditionalScaleMultiplier = 3f; SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_03", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_bsg_shot_01") }); ChargeProjectile item = new ChargeProjectile { Projectile = val2, ChargeTime = 0f }; ChargeProjectile item2 = new ChargeProjectile { Projectile = val3, ChargeTime = 1f }; ChargeProjectile item3 = new ChargeProjectile { Projectile = val4, ChargeTime = 3f }; val.DefaultModule.chargeProjectiles = new List { item, item2, item3 }; ((PickupObject)val).quality = (ItemQuality)3; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; } } internal class HextechRifle : AdvancedGunBehavior { public static string internalName = "Hextech Rifle"; public static int ID; public static string realName = "Hextech Rifle"; private static int ammoStat = 200; private static float reloadDuration = 1.6f; private static float fireRateStat = 0.8f; private static int spreadAngle = 0; private static float projectileDamageStat = 20f; private static float projectileSpeedStat = 100f; private static float projectileRangeStat = 200f; private static float projectileForceStat = 25f; private static int projectilePierceStat = 3; private static float headshotDamageScale = 2.5f; private static List normalFiringSFXList = new List { "hextech_rifle_atk_sfx_001", "hextech_rifle_atk_sfx_002", "hextech_rifle_atk_sfx_003", "hextech_rifle_atk_sfx_004" }; private static List headshotSFXList = new List { "hextech_rifle_headshot_sfx_001", "hextech_rifle_headshot_sfx_002" }; public static void Add() { //IL_0158: 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_016c: 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_01b9: 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_01ca: 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_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_01fc: 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_0221: 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_0524: 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) string text = "Hextech Rifle"; string text2 = "hextech"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Boom! Headshot.\""); GunExt.SetLongDescription((PickupObject)(object)val, "A long range sniper rifle that was modified with some strange tech. Its shots are fast and pierce through enemies easily. For some reason, you always shoot better on your last bullet.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 5); GunExt.SetAnimationFPS(val, val.reloadAnimation, 13); PickupObject byId = PickupObjectDatabase.GetById(25); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId2 = PickupObjectDatabase.GetById(5); muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_m1911_reload_01") }); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_gun_finale_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)15; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 6; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(4, 2); val.carryPixelDownOffset += new IntVector2(0, -4); val.carryPixelUpOffset += new IntVector2(-8, 0); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(1f, 0.4375f); val.gunScreenShake.magnitude = 0.8f; PickupObject byId3 = PickupObjectDatabase.GetById(25); Projectile val2 = Object.Instantiate(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.deathAny = null; val2.hitEffects.deathEnemy = null; val2.hitEffects.enemy = null; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId4 = PickupObjectDatabase.GetById(86); tileMapHorizontal = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId5 = PickupObjectDatabase.GetById(86); tileMapVertical = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; GunTools.SetProjectileSpriteRight(val2, "hextech_projectile_glow", 11, 5, true, (Anchor)4, (int?)9, (int?)3, true, false, (int?)null, (int?)null, (Projectile)null); Projectile val3 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val3).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val3).gameObject); Object.DontDestroyOnLoad((Object)(object)val3); val3.baseData.damage = projectileDamageStat * headshotDamageScale; val3.baseData.speed = projectileSpeedStat * headshotDamageScale * 1f; val3.baseData.range = projectileRangeStat * headshotDamageScale; val3.baseData.force = projectileForceStat * headshotDamageScale; ((BraveBehaviour)val3).transform.parent = val.barrelOffset; val3.shouldRotate = true; val3.ignoreDamageCaps = true; GunTools.SetProjectileSpriteRight(val3, "hextech_peacemaker_projectile_glow", 11, 7, true, (Anchor)4, (int?)9, (int?)5, true, false, (int?)null, (int?)null, (Projectile)null); val3.AdditionalScaleMultiplier = 2f; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val3).gameObject); orAddComponent.penetration = projectilePierceStat * 2; orAddComponent.penetratesBreakables = true; val.DefaultModule.finalProjectile = val3; val.DefaultModule.numberOfFinalProjectiles = 1; val.DefaultModule.usesOptionalFinalProjectile = true; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("hextech_rifle_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_rifle_ammo_full_nooutline", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_rifle_ammo_empty_nooutline"); val.DefaultModule.finalAmmoType = (AmmoType)14; val.DefaultModule.finalCustomAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("hextech_peacemaker_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_peacemaker_ammo_full_nooutline", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_peacemaker_ammo_empty_nooutline"); val.shellCasing = ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_casing", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 3, false, (GoopDefinition)null, 1f)).gameObject; val.clipObject = ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_clip", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 1, false, (GoopDefinition)null, 1f)).gameObject; val.shellsToLaunchOnFire = 1; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 1; val.reloadClipLaunchFrame = 6; PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent2.penetration = projectilePierceStat; orAddComponent2.penetratesBreakables = true; ((PickupObject)val).quality = (ItemQuality)2; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ItemBuilder.AddToSubShop((PickupObject)(object)val, (ShopType)3, 1f); ID = ((PickupObject)val).PickupObjectId; } public override void PostProcessProjectile(Projectile projectile) { GameActor owner = projectile.Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (projectile.GetCachedBaseDamage == projectileDamageStat) { HelpfulMethods.PlayRandomSFX(((Component)((GameActor)val).CurrentGun).gameObject, normalFiringSFXList); } else if (projectile.GetCachedBaseDamage == projectileDamageStat * headshotDamageScale) { HelpfulMethods.PlayRandomSFX(((Component)((GameActor)val).CurrentGun).gameObject, headshotSFXList); if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.ME_MISS_NOT_BY_A_LONG_SHOT)) { ProjectileData baseData = projectile.baseData; baseData.damage *= 2f; } } else { Plugin.Log("fuck " + ((PickupObject)base.gun).DisplayName); } ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } public override void OnReloadSafe(PlayerController player, Gun gun) { ((AdvancedGunBehavior)this).OnReloadSafe(player, gun); } } public class EnemyTiltedTracker { public Coroutine timerCoroutine; public GameObject activeVFXObject; public EnemyTiltedTracker(Coroutine corou, GameObject obj) { timerCoroutine = corou; activeVFXObject = obj; } } internal class Pinger : AdvancedGunBehavior { [CompilerGenerated] private sealed class d__39 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AIActor enemy; public float duration; public Pinger <>4__this; private float 5__1; private float 5__2; private Color 5__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00e2: Invalid comparison between Unknown and I4 //IL_015b: 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_0175: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; TiltedEffect.SpeedMultiplier = Random.Range(TiltedSpeedMin, TiltedSpeedMax); TiltedEffect.HealthMultiplier = Random.Range(TiltedHealthMin, TiltedHealthMax); ((GameActor)enemy).ApplyEffect((GameActorEffect)(object)TiltedEffect, 1f, (Projectile)null); 5__1 = 0f; 5__2 = 0f; 5__3 = ((BraveBehaviour)enemy).sprite.color; ((GameActor)enemy).RegisterOverrideColor(flatColorOverride, ((GameActorEffect)TiltedEffect).effectIdentifier); break; case 1: <>1__state = -1; break; } if (5__1 < duration) { 5__1 += BraveTime.DeltaTime; if ((int)GameManager.Options.ShaderQuality != 0 && (int)GameManager.Options.ShaderQuality != 3 && Object.op_Implicit((Object)(object)enemy)) { 5__2 += BraveTime.DeltaTime * 40f; if (5__2 > 1f) { 5__4 = Mathf.FloorToInt(5__2); 5__2 %= 1f; GlobalSparksDoer.DoRandomParticleBurst(5__4, Vector2Extensions.ToVector3ZisY(((BraveBehaviour)enemy).sprite.WorldBottomLeft, 0f), Vector2Extensions.ToVector3ZisY(((BraveBehaviour)enemy).sprite.WorldTopRight, 0f), Vector3.up, 90f, 0.5f, (float?)0.25f, (float?)1f, (Color?)null, (SparksType)1); } } <>2__current = null; <>1__state = 1; return true; } ((GameActor)enemy).DeregisterOverrideColor(((GameActorEffect)TiltedEffect).effectIdentifier); <>4__this.enemyTiltedTrackerList[enemy].activeVFXObject.GetComponent().PlayAndDestroyObject("rage_face_vfx_out", (Action)null); ((GameActor)enemy).RemoveEffect((GameActorEffect)(object)TiltedEffect); <>4__this.enemyTiltedTrackerList.Remove(enemy); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__36 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Gun gun; public Pinger <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__36(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003a: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00a8: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0116: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.SpawnKeyboardPiecesAtPosition(gun.CasingLaunchPoint, gun.m_transform, gun.gunAngle, gun.m_owner, gun.barrelOffset, gun.m_localAimPoint); <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.SpawnKeyboardPiecesAtPosition(gun.CasingLaunchPoint, gun.m_transform, gun.gunAngle, gun.m_owner, gun.barrelOffset, gun.m_localAimPoint); <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.SpawnKeyboardPiecesAtPosition(gun.CasingLaunchPoint, gun.m_transform, gun.gunAngle, gun.m_owner, gun.barrelOffset, gun.m_localAimPoint); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string internalName = "Pinger_LOLItems"; public static int ID; public static string realName = "Pinger"; private static int ammoStat = 200; private static float reloadDuration = 2f; private static float fireRateStat = 0.4f; private static int spreadAngle = 0; private static float projectileDamageStat = 10f; private static float projectileSpeedStat = 25f; private static float projectileRangeStat = 12f; private static float projectileForceStat = 15f; private static float TiltedSpeedMin = 0.4f; private static float TiltedSpeedMax = 2f; private static float TiltedHealthMin = 0.6f; private static float TiltedHealthMax = 1.5f; private static float TiltedDuration = 10f; private static Color flatColorOverride = ExtendedColours.maroon; public GameObject OverheadVFX; private static AIActorBuffEffect TiltedEffect = new AIActorBuffEffect { effectIdentifier = "pinger_tilted_effect", SpeedMultiplier = 2f, HealthMultiplier = 0.5f, KeepHealthPercentage = true }; private Dictionary enemyTiltedTrackerList; private static List PingerFiringSFXList = new List { "mouseclick_SFX_01" }; private static List KeyboardPiecesList = new List { ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/ProjectileCollection/key_black_1", true, 0.33f, 2f, 180f, 450f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 2, false, (GoopDefinition)null, 1f)).gameObject, ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/ProjectileCollection/key_black_2", true, 0.33f, 2f, 180f, 450f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 2, false, (GoopDefinition)null, 1f)).gameObject, ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/ProjectileCollection/key_white_1", true, 0.33f, 2f, 180f, 450f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 2, false, (GoopDefinition)null, 1f)).gameObject, ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/ProjectileCollection/key_white_2", true, 0.33f, 2f, 180f, 450f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 2, false, (GoopDefinition)null, 1f)).gameObject }; public bool DUOQUEUINGActivated; private static float DUOQUEUINGFireRateRatio = 0.5f; private static float DUOQUEUINGDamageRatio = 2.5f; public bool SPAMPINGINGActivated; private static float SPAMPINGINGTiltedDurationIncrease = 10f; public bool HIGHBLOODPRESSUREActivated; private static float HIGHBLOODPRESSURETiltedSpeedRatio = 1.25f; private static float HIGHBLOODPRESSURETiltedHealthRatio = 0.6f; public bool EMOTIONALPINGSActivated; private static float EMOTIONALPINGSDamageIncrease = 1.75f; public static void Add() { //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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: 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_01f4: 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_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_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_0233: 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_029a: Expected O, but got Unknown //IL_029d: 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_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown //IL_044f: 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_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Expected O, but got Unknown //IL_0612: 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_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Expected O, but got Unknown //IL_07d5: 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_098e: Unknown result type (might be due to invalid IL or missing references) //IL_0995: Expected O, but got Unknown //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_0b51: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Expected O, but got Unknown //IL_0b5b: Unknown result type (might be due to invalid IL or missing references) //IL_0b77: Unknown result type (might be due to invalid IL or missing references) //IL_0d14: Unknown result type (might be due to invalid IL or missing references) //IL_0d1b: Expected O, but got Unknown //IL_0d1e: Unknown result type (might be due to invalid IL or missing references) //IL_0d3a: Unknown result type (might be due to invalid IL or missing references) //IL_0ed7: Unknown result type (might be due to invalid IL or missing references) //IL_0ede: Expected O, but got Unknown //IL_0ee1: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) //IL_109a: Unknown result type (might be due to invalid IL or missing references) //IL_10a1: Expected O, but got Unknown //IL_10a4: Unknown result type (might be due to invalid IL or missing references) //IL_10c0: Unknown result type (might be due to invalid IL or missing references) //IL_125d: Unknown result type (might be due to invalid IL or missing references) //IL_1264: Expected O, but got Unknown //IL_1267: Unknown result type (might be due to invalid IL or missing references) //IL_1283: Unknown result type (might be due to invalid IL or missing references) //IL_1420: Unknown result type (might be due to invalid IL or missing references) //IL_1427: Expected O, but got Unknown //IL_142a: Unknown result type (might be due to invalid IL or missing references) //IL_1446: Unknown result type (might be due to invalid IL or missing references) //IL_15e3: Unknown result type (might be due to invalid IL or missing references) //IL_15ea: Expected O, but got Unknown //IL_15ed: Unknown result type (might be due to invalid IL or missing references) //IL_1609: Unknown result type (might be due to invalid IL or missing references) //IL_17a6: Unknown result type (might be due to invalid IL or missing references) //IL_17ad: Expected O, but got Unknown //IL_17b0: Unknown result type (might be due to invalid IL or missing references) //IL_17cc: Unknown result type (might be due to invalid IL or missing references) //IL_1969: Unknown result type (might be due to invalid IL or missing references) //IL_1970: Expected O, but got Unknown //IL_1973: Unknown result type (might be due to invalid IL or missing references) //IL_198f: Unknown result type (might be due to invalid IL or missing references) //IL_1afe: Unknown result type (might be due to invalid IL or missing references) //IL_1b22: Unknown result type (might be due to invalid IL or missing references) //IL_1b29: Expected O, but got Unknown //IL_1b2c: Unknown result type (might be due to invalid IL or missing references) //IL_1b95: Unknown result type (might be due to invalid IL or missing references) //IL_1be9: Unknown result type (might be due to invalid IL or missing references) //IL_1c53: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "pinger"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "spam pinging"); GunExt.SetLongDescription((PickupObject)(object)val, $"Shoots projectiles that \"enrage\" enemies hit for {TiltedDuration} seconds. Enraged enemies have their health and movement speed randomized.\n\n" + "A magical tool of communication commonly used amongst those who reject hygiene. These filthy creatures have abandoned language and rely upon this tool for all their needs. Due to its rudimentary vocabulary, the tool often ended up confusing and enraging each other. Those filthy creatures would incite further violence with each ping until they'd tire. No one knows how they continue to function.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 15); GunExt.SetAnimationFPS(val, val.reloadAnimation, 15); GunExt.SetAnimationFPS(val, val.introAnimation, 15); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("mouseclick_SFX_01") }); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("keyboard_smashing_SFX") }); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)55; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 20; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(13, -1); val.carryPixelDownOffset += new IntVector2(-20, -8); val.carryPixelUpOffset += new IntVector2(-8, 12); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(0.375f, 0.625f); val.gunScreenShake.magnitude = 0f; val.DefaultModule.projectiles.Clear(); PickupObject byId2 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val2); VFXPool val3 = new VFXPool(); val3.type = (VFXPoolType)4; VFXComplex val4 = HelpfulMethods.CreateVFXComplex("all_in_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_allIn".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val2.hitEffects.HasProjectileDeathVFX = true; val2.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val2.hitEffects.deathAny = val3; val2.hitEffects.deathEnemy = null; val2.hitEffects.enemy = null; val2.hitEffects.tileMapHorizontal = val3; val2.hitEffects.tileMapVertical = val3; val2.onDestroyEventName = "Play_WPN_all_in_ping_1_impact_01"; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val2, "pinger_projectile_all_in_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId3 = PickupObjectDatabase.GetById(86); Projectile val5 = Object.Instantiate(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val5); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("assist_me_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_assist".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val5.hitEffects.HasProjectileDeathVFX = true; val5.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val5.hitEffects.deathAny = val3; val5.hitEffects.deathEnemy = null; val5.hitEffects.enemy = null; val5.hitEffects.tileMapHorizontal = val3; val5.hitEffects.tileMapVertical = val3; val5.onDestroyEventName = "Play_WPN_assist_me_ping_2_impact_01"; ((Component)val5).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val5).gameObject); Object.DontDestroyOnLoad((Object)(object)val5); val5.baseData.damage = projectileDamageStat; val5.baseData.speed = projectileSpeedStat; val5.baseData.range = projectileRangeStat; val5.baseData.force = projectileForceStat; ((BraveBehaviour)val5).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val5, "pinger_projectile_assist_me_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId4 = PickupObjectDatabase.GetById(86); Projectile val6 = Object.Instantiate(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val6); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("bait_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_bait".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val6.hitEffects.HasProjectileDeathVFX = true; val6.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val6.hitEffects.deathAny = val3; val6.hitEffects.deathEnemy = null; val6.hitEffects.enemy = null; val6.hitEffects.tileMapHorizontal = val3; val6.hitEffects.tileMapVertical = val3; val6.onDestroyEventName = "Play_WPN_bait_ping_3_impact_01"; ((Component)val6).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val6).gameObject); Object.DontDestroyOnLoad((Object)(object)val6); val6.baseData.damage = projectileDamageStat; val6.baseData.speed = projectileSpeedStat; val6.baseData.range = projectileRangeStat; val6.baseData.force = projectileForceStat; ((BraveBehaviour)val6).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val6, "pinger_projectile_bait_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId5 = PickupObjectDatabase.GetById(86); Projectile val7 = Object.Instantiate(((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val7); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("caution_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_caution".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val7.hitEffects.HasProjectileDeathVFX = true; val7.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val7.hitEffects.deathAny = val3; val7.hitEffects.deathEnemy = null; val7.hitEffects.enemy = null; val7.hitEffects.tileMapHorizontal = val3; val7.hitEffects.tileMapVertical = val3; val7.onDestroyEventName = "Play_WPN_caution_ping_4_impact_01"; ((Component)val7).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val7).gameObject); Object.DontDestroyOnLoad((Object)(object)val7); val7.baseData.damage = projectileDamageStat; val7.baseData.speed = projectileSpeedStat; val7.baseData.range = projectileRangeStat; val7.baseData.force = projectileForceStat; ((BraveBehaviour)val7).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val7, "pinger_projectile_caution_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId6 = PickupObjectDatabase.GetById(86); Projectile val8 = Object.Instantiate(((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val8); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("defend_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_defend".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val8.hitEffects.HasProjectileDeathVFX = true; val8.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val8.hitEffects.deathAny = val3; val8.hitEffects.deathEnemy = null; val8.hitEffects.enemy = null; val8.hitEffects.tileMapHorizontal = val3; val8.hitEffects.tileMapVertical = val3; val8.onDestroyEventName = "Play_WPN_defend_ping_5_impact_01"; ((Component)val8).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val8).gameObject); Object.DontDestroyOnLoad((Object)(object)val8); val8.baseData.damage = projectileDamageStat; val8.baseData.speed = projectileSpeedStat; val8.baseData.range = projectileRangeStat; val8.baseData.force = projectileForceStat; ((BraveBehaviour)val8).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val8, "pinger_projectile_defend_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId7 = PickupObjectDatabase.GetById(86); Projectile val9 = Object.Instantiate(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val9); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("missing_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_missing".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val9.hitEffects.HasProjectileDeathVFX = true; val9.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val9.hitEffects.deathAny = val3; val9.hitEffects.deathEnemy = null; val9.hitEffects.enemy = null; val9.hitEffects.tileMapHorizontal = val3; val9.hitEffects.tileMapVertical = val3; val9.onDestroyEventName = "Play_WPN_enemy_missing_ping_6_impact_01"; ((Component)val9).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val9).gameObject); Object.DontDestroyOnLoad((Object)(object)val9); val9.baseData.damage = projectileDamageStat; val9.baseData.speed = projectileSpeedStat; val9.baseData.range = projectileRangeStat; val9.baseData.force = projectileForceStat; ((BraveBehaviour)val9).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val9, "pinger_projectile_enemy_missing_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId8 = PickupObjectDatabase.GetById(86); Projectile val10 = Object.Instantiate(((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val10); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("enemy_vision_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_enemyVision".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val10.hitEffects.HasProjectileDeathVFX = true; val10.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val10.hitEffects.deathAny = val3; val10.hitEffects.deathEnemy = null; val10.hitEffects.enemy = null; val10.hitEffects.tileMapHorizontal = val3; val10.hitEffects.tileMapVertical = val3; val10.onDestroyEventName = "Play_WPN_enemy_vision_ping_7_impact_01"; ((Component)val10).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val10).gameObject); Object.DontDestroyOnLoad((Object)(object)val10); val10.baseData.damage = projectileDamageStat; val10.baseData.speed = projectileSpeedStat; val10.baseData.range = projectileRangeStat; val10.baseData.force = projectileForceStat; ((BraveBehaviour)val10).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val10, "pinger_projectile_enemy_vision_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId9 = PickupObjectDatabase.GetById(86); Projectile val11 = Object.Instantiate(((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val11); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("generic_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_generic".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val11.hitEffects.HasProjectileDeathVFX = true; val11.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val11.hitEffects.deathAny = val3; val11.hitEffects.deathEnemy = null; val11.hitEffects.enemy = null; val11.hitEffects.tileMapHorizontal = val3; val11.hitEffects.tileMapVertical = val3; val11.onDestroyEventName = "Play_WPN_generic_ping_8_impact_01"; ((Component)val11).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val11).gameObject); Object.DontDestroyOnLoad((Object)(object)val11); val11.baseData.damage = projectileDamageStat; val11.baseData.speed = projectileSpeedStat; val11.baseData.range = projectileRangeStat; val11.baseData.force = projectileForceStat; ((BraveBehaviour)val11).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val11, "pinger_projectile_generic_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId10 = PickupObjectDatabase.GetById(86); Projectile val12 = Object.Instantiate(((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val12); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("need_vision_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_vision".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val12.hitEffects.HasProjectileDeathVFX = true; val12.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val12.hitEffects.deathAny = val3; val12.hitEffects.deathEnemy = null; val12.hitEffects.enemy = null; val12.hitEffects.tileMapHorizontal = val3; val12.hitEffects.tileMapVertical = val3; val12.onDestroyEventName = "Play_WPN_need_vision_ping_9_impact_01"; ((Component)val12).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val12).gameObject); Object.DontDestroyOnLoad((Object)(object)val12); val12.baseData.damage = projectileDamageStat; val12.baseData.speed = projectileSpeedStat; val12.baseData.range = projectileRangeStat; val12.baseData.force = projectileForceStat; ((BraveBehaviour)val12).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val12, "pinger_projectile_need_vision_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId11 = PickupObjectDatabase.GetById(86); Projectile val13 = Object.Instantiate(((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val13); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("on_my_way_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_onMyWay".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val13.hitEffects.HasProjectileDeathVFX = true; val13.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val13.hitEffects.deathAny = val3; val13.hitEffects.deathEnemy = null; val13.hitEffects.enemy = null; val13.hitEffects.tileMapHorizontal = val3; val13.hitEffects.tileMapVertical = val3; val13.onDestroyEventName = "Play_WPN_on_my_way_ping_10_impact_01"; ((Component)val13).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val13).gameObject); Object.DontDestroyOnLoad((Object)(object)val13); val13.baseData.damage = projectileDamageStat; val13.baseData.speed = projectileSpeedStat; val13.baseData.range = projectileRangeStat; val13.baseData.force = projectileForceStat; ((BraveBehaviour)val13).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val13, "pinger_projectile_on_my_way_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId12 = PickupObjectDatabase.GetById(86); Projectile val14 = Object.Instantiate(((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val14); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("push_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_push".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val14.hitEffects.HasProjectileDeathVFX = true; val14.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val14.hitEffects.deathAny = val3; val14.hitEffects.deathEnemy = null; val14.hitEffects.enemy = null; val14.hitEffects.tileMapHorizontal = val3; val14.hitEffects.tileMapVertical = val3; val14.onDestroyEventName = "Play_WPN_push_ping_11_impact_01"; ((Component)val14).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val14).gameObject); Object.DontDestroyOnLoad((Object)(object)val14); val14.baseData.damage = projectileDamageStat; val14.baseData.speed = projectileSpeedStat; val14.baseData.range = projectileRangeStat; val14.baseData.force = projectileForceStat; ((BraveBehaviour)val14).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val14, "pinger_projectile_push_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId13 = PickupObjectDatabase.GetById(86); Projectile val15 = Object.Instantiate(((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val15); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("retreat_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_retreat".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val15.hitEffects.HasProjectileDeathVFX = true; val15.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val15.hitEffects.deathAny = val3; val15.hitEffects.deathEnemy = null; val15.hitEffects.enemy = null; val15.hitEffects.tileMapHorizontal = val3; val15.hitEffects.tileMapVertical = val3; val15.onDestroyEventName = "Play_WPN_retreat_ping_12_impact_01"; ((Component)val15).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val15).gameObject); Object.DontDestroyOnLoad((Object)(object)val15); val15.baseData.damage = projectileDamageStat; val15.baseData.speed = projectileSpeedStat; val15.baseData.range = projectileRangeStat; val15.baseData.force = projectileForceStat; ((BraveBehaviour)val15).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val15, "pinger_projectile_retreat_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId14 = PickupObjectDatabase.GetById(86); Projectile val16 = Object.Instantiate(((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val16); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("enemy_target_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_enemyTarget".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val16.hitEffects.HasProjectileDeathVFX = true; val16.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val16.hitEffects.deathAny = val3; val16.hitEffects.deathEnemy = null; val16.hitEffects.enemy = null; val16.hitEffects.tileMapHorizontal = val3; val16.hitEffects.tileMapVertical = val3; val16.onDestroyEventName = "Play_WPN_target_ping_13_impact_01"; ((Component)val16).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val16).gameObject); Object.DontDestroyOnLoad((Object)(object)val16); val16.baseData.damage = projectileDamageStat; val16.baseData.speed = projectileSpeedStat; val16.baseData.range = projectileRangeStat; val16.baseData.force = projectileForceStat; ((BraveBehaviour)val16).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val16, "pinger_projectile_target_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); PickupObject byId15 = PickupObjectDatabase.GetById(86); Projectile val17 = Object.Instantiate(((Gun)((byId15 is Gun) ? byId15 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles.Add(val17); val3 = new VFXPool(); val3.type = (VFXPoolType)4; val4 = HelpfulMethods.CreateVFXComplex("cleared_vision_hiteffect", "LOLItems/Resources/hit_effects/pings_hit_frames/ping_clearedVision".GetResourceFrames(24), 16, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val3.effects = (VFXComplex[])(object)new VFXComplex[1] { val4 }; val17.hitEffects.HasProjectileDeathVFX = true; val17.hitEffects.overrideMidairDeathVFX = val3.effects[0].effects[0].effect; val17.hitEffects.deathAny = val3; val17.hitEffects.deathEnemy = null; val17.hitEffects.enemy = null; val17.hitEffects.tileMapHorizontal = val3; val17.hitEffects.tileMapVertical = val3; val17.onDestroyEventName = "Play_WPN_vision_cleared_ping_14_impact_01"; ((Component)val17).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val17).gameObject); Object.DontDestroyOnLoad((Object)(object)val17); val17.baseData.damage = projectileDamageStat; val17.baseData.speed = projectileSpeedStat; val17.baseData.range = projectileRangeStat; val17.baseData.force = projectileForceStat; ((BraveBehaviour)val17).transform.parent = val.barrelOffset; GunTools.SetProjectileSpriteRight(val17, "pinger_projectile_vision_cleared_001", 16, 16, true, (Anchor)4, (int?)12, (int?)12, true, false, (int?)null, (int?)null, (Projectile)null); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("pinger_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/pinger_ammo_full", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/pinger_ammo_empty"); VFXPool val18 = new VFXPool(); val18.type = (VFXPoolType)4; VFXComplex val19 = HelpfulMethods.CreateVFXComplex("pinger_muzzleflash", new List { "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_001", "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_002", "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_003", "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_004", "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_005", "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_006", "LOLItems/Resources/muzzle_flashes/pinger_rainbow/pinger_muzzleflare_007" }, 18, new IntVector2(41, 28), (Anchor)3, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (VFXPoolType)1); val18.effects = (VFXComplex[])(object)new VFXComplex[1] { val19 }; val.muzzleFlashEffects = val18; val.m_casingLaunchAttachPoint.localPosition = new Vector3(1.25f, 1.0625f, 0f); val.shellCasing = ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/white_dot", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 3, false, (GoopDefinition)null, 1f)).gameObject; val.clipObject = null; val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; val.reloadClipLaunchFrame = 0; ((PickupObject)val).quality = (ItemQuality)1; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; } protected override void Update() { if ((Object)(object)((AdvancedGunBehavior)this).Player != (Object)null) { if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.DUO_QUEUING) && !DUOQUEUINGActivated) { ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)1, DUOQUEUINGFireRateRatio, (ModifyMethod)1); ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)5, DUOQUEUINGDamageRatio, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((AdvancedGunBehavior)this).Player.stats, ((AdvancedGunBehavior)this).Player); DUOQUEUINGActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.DUO_QUEUING) && DUOQUEUINGActivated) { ItemBuilder.RemoveCurrentGunStatModifier(base.gun, (StatType)1); ItemBuilder.RemoveCurrentGunStatModifier(base.gun, (StatType)5); if (EMOTIONALPINGSActivated) { ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)5, EMOTIONALPINGSDamageIncrease, (ModifyMethod)1); } VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((AdvancedGunBehavior)this).Player.stats, ((AdvancedGunBehavior)this).Player); DUOQUEUINGActivated = false; } if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.SPAM_PINGING) && !SPAMPINGINGActivated) { TiltedDuration += SPAMPINGINGTiltedDurationIncrease; SPAMPINGINGActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.SPAM_PINGING) && SPAMPINGINGActivated) { TiltedDuration -= SPAMPINGINGTiltedDurationIncrease; SPAMPINGINGActivated = false; } if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.HIGH_BLOOD_PRESSURE) && !HIGHBLOODPRESSUREActivated) { TiltedSpeedMin *= HIGHBLOODPRESSURETiltedSpeedRatio; TiltedSpeedMax *= HIGHBLOODPRESSURETiltedSpeedRatio; TiltedHealthMin *= HIGHBLOODPRESSURETiltedHealthRatio; TiltedHealthMax *= HIGHBLOODPRESSURETiltedHealthRatio; HIGHBLOODPRESSUREActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.HIGH_BLOOD_PRESSURE) && HIGHBLOODPRESSUREActivated) { TiltedSpeedMin /= HIGHBLOODPRESSURETiltedSpeedRatio; TiltedSpeedMax /= HIGHBLOODPRESSURETiltedSpeedRatio; TiltedHealthMin /= HIGHBLOODPRESSURETiltedHealthRatio; TiltedHealthMax /= HIGHBLOODPRESSURETiltedHealthRatio; HIGHBLOODPRESSUREActivated = false; } if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.EMOTIONAL_PINGS) && !EMOTIONALPINGSActivated) { ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)5, EMOTIONALPINGSDamageIncrease, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((AdvancedGunBehavior)this).Player.stats, ((AdvancedGunBehavior)this).Player); EMOTIONALPINGSActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.EMOTIONAL_PINGS) && EMOTIONALPINGSActivated) { ItemBuilder.RemoveCurrentGunStatModifier(base.gun, (StatType)5); if (DUOQUEUINGActivated) { ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)5, DUOQUEUINGDamageRatio, (ModifyMethod)1); } VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((AdvancedGunBehavior)this).Player.stats, ((AdvancedGunBehavior)this).Player); EMOTIONALPINGSActivated = false; } } ((AdvancedGunBehavior)this).Update(); } public override void OnPostFired(PlayerController player, Gun gun) { ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void OnReload(PlayerController player, Gun gun) { ((MonoBehaviour)player).StartCoroutine(ReloadShellEjectCoroutine(gun)); ((AdvancedGunBehavior)this).OnReload(player, gun); } private IEnumerator ReloadShellEjectCoroutine(Gun gun) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__36(0) { <>4__this = this, gun = gun }; } private void SpawnKeyboardPiecesAtPosition(Vector3 position, Transform m_transform, float gunAngle, GameActor m_owner, Transform barrelOffset, Vector2 m_localAimPoint) { //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_0082: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0124: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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_0217: 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_018f: Invalid comparison between Unknown and I4 //IL_019b: 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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_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_0285: Unknown result type (might be due to invalid IL or missing references) GameObject shellCasing = base.gun.shellCasing; Vector3 val3 = default(Vector3); for (int i = 0; i < 15; i++) { float value = Random.value; float num = value; shellCasing = ((num < 0.25f) ? KeyboardPiecesList[0] : ((num < 0.5f) ? KeyboardPiecesList[1] : ((!(num < 0.75f)) ? KeyboardPiecesList[3] : KeyboardPiecesList[2]))); GameObject val = SpawnManager.SpawnDebris(shellCasing, Vector3Extensions.WithZ(position, m_transform.position.z), Quaternion.Euler(0f, 0f, gunAngle)); ShellCasing component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Trigger(); } DebrisObject component2 = val.GetComponent(); if (!((Object)(object)component2 != (Object)null)) { break; } int num2 = ((((BraveBehaviour)component2).transform.right.x > 0f) ? 1 : (-1)); Vector3 val2 = Vector3.up * (Random.value * 1.5f + 1f) + -1.5f * Vector3.right * (float)num2 * (Random.value + 1.5f); ((Vector3)(ref val3))..ctor(val2.x, 0f, val2.y); if (m_owner is PlayerController) { PlayerController val4 = (PlayerController)(object)((m_owner is PlayerController) ? m_owner : null); if (val4.CurrentRoom != null && (int)val4.CurrentRoom.area.PrototypeRoomSpecialSubcategory == 5) { float num3 = val2.x * (float)num2 * -1f; Vector2 val5 = Vector3Extensions.XY(barrelOffset.position) - m_localAimPoint; val3 = Vector2Extensions.ToVector3ZUp(num3 * ((Vector2)(ref val5)).normalized, val2.y); } } float y = ((BraveBehaviour)m_owner).transform.position.y; float num4 = position.y - ((BraveBehaviour)m_owner).transform.position.y + 0.2f; float num5 = ((BraveBehaviour)component2).transform.position.y - y + Random.value * 0.5f; component2.additionalHeightBoost = num4 - num5; if (gunAngle > 25f && gunAngle < 155f) { component2.additionalHeightBoost += -0.25f; } else { component2.additionalHeightBoost += 0.25f; } component2.Trigger(val3, num5, 1f); } } public override void PostProcessProjectile(Projectile projectile) { projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null)) { AIActor val = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { val = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemy).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null && !((BraveBehaviour)val).healthHaver.IsBoss && !((BraveBehaviour)val).healthHaver.IsSubboss && !enemyTiltedTrackerList.ContainsKey(val)) { enemyTiltedTrackerList.Add(val, new EnemyTiltedTracker(((MonoBehaviour)val).StartCoroutine(HandleTilt(val, TiltedDuration)), ((GameActor)val).PlayEffectOnActor(OverheadVFX, new Vector3(0f, 1.375f, 0f), true, true, false))); } } }); ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } private IEnumerator HandleTilt(AIActor enemy, float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this, enemy = enemy, duration = duration }; } public Pinger() { ref GameObject overheadVFX = ref OverheadVFX; PickupObject byId = PickupObjectDatabase.GetById(353); overheadVFX = ((RagePassiveItem)((byId is RagePassiveItem) ? byId : null)).OverheadVFX; enemyTiltedTrackerList = new Dictionary(); DUOQUEUINGActivated = false; SPAMPINGINGActivated = false; HIGHBLOODPRESSUREActivated = false; EMOTIONALPINGSActivated = false; ((AdvancedGunBehavior)this)..ctor(); } } internal class PowPow : AdvancedGunBehavior { [CompilerGenerated] private sealed class d__29 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public Gun gun; public PowPow <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; break; case 2: <>1__state = -1; <>4__this.rampUpStacks--; if (!<>4__this.isFishbones) { ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)1, 1f + (float)<>4__this.rampUpStacks * 0.1f, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)gun).spriteAnimator.OverrideTimeScale = 1f + (float)<>4__this.rampUpStacks * 0.1f; } break; } if (<>4__this.rampUpStacks > 0) { <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 2; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string internalName = "Pow-Pow"; public static int ID; public static string realName = "Pow-Pow"; private static float rampUpIncCap = 5f; private static float rampUpIncPerSecond = 0.5f; private static int ammoStat = 600; private static float reloadDuration = 1.6f; private static float fireRateStat = 0.3f; private static int spreadAngle = 8; private float currentRampUpIncAmount = 0f; private int rampUpStacks = 0; private float rampUpIncPerStack = 0.01f; private int rampUpStackCap = 20; private Coroutine rampDownCoroutine; private static float projectileDamageStat = 6f; private static float projectileSpeedStat = 50f; private static float projectileRangeStat = 20f; private static float projectileForceStat = 8f; private static List FishbonesFiringSFXList = new List { "FishbonesFireSFX1", "FishbonesFireSFX2", "FishbonesFireSFX3" }; private static List FishbonesExplosionSFXList = new List { "FishbonesExplosionSFX1", "FishbonesExplosionSFX2", "FishbonesExplosionSFX3" }; private static int firingAnimationFPS = 10; public bool RUNAANSBULLETSActivated = false; private static float RUNAANSBULLETSDamageStat = 1.82f; public bool isFishbones = false; public static void Add() { //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_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_01ad: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: 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_0205: 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_032d: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "powpow"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Get Jinxed!"); GunExt.SetLongDescription((PickupObject)(object)val, "Pow-Pow: a fast-firing minigun that gains fire rate as you attack.\nFishbones: a powerful rocket launcher that fires small missles.\nPress reload to swap forms.\n\nUnique weapons of an infamous terrorist known as \"Jinx\". Despite its shoddy appearance, the genius engineering of these weapons is undeniable.\n\n\"Why do they look like animals?\"\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 1); GunExt.SetAnimationFPS(val, val.shootAnimation, firingAnimationFPS); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId2 = PickupObjectDatabase.GetById(2); muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_minigun_shot_01") }); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)1; val.gunClass = (GunClass)10; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = 0f; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(13, 1); val.carryPixelDownOffset += new IntVector2(-15, -14); val.carryPixelUpOffset += new IntVector2(-8, 8); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(1.0625f, 0.125f); val.gunScreenShake.magnitude = 0.15f; val.GainsRateOfFireAsContinueAttack = false; PickupObject byId3 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val.DefaultModule.ammoType = (AmmoType)0; ((Component)val).gameObject.Attach((Action)null, allowDuplicates: false); ref GameObject shellCasing = ref val.shellCasing; PickupObject byId4 = PickupObjectDatabase.GetById(15); shellCasing = ((Gun)((byId4 is Gun) ? byId4 : null)).shellCasing; ref GameObject clipObject = ref val.clipObject; PickupObject byId5 = PickupObjectDatabase.GetById(15); clipObject = ((Gun)((byId5 is Gun) ? byId5 : null)).clipObject; val.shellsToLaunchOnFire = 1; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; ((PickupObject)val).quality = (ItemQuality)3; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ItemBuilder.AddToSubShop((PickupObject)(object)val, (ShopType)3, 1f); ID = ((PickupObject)val).PickupObjectId; ItemBuilder.AddCurrentGunStatModifier(val, (StatType)1, 1f, (ModifyMethod)1); } protected override void Update() { if ((Object)(object)((AdvancedGunBehavior)this).Player != (Object)null) { if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.RUNAANS_BULLETS) && !RUNAANSBULLETSActivated) { ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)5, RUNAANSBULLETSDamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((AdvancedGunBehavior)this).Player.stats, ((AdvancedGunBehavior)this).Player); RUNAANSBULLETSActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.RUNAANS_BULLETS) && RUNAANSBULLETSActivated) { ItemBuilder.RemoveCurrentGunStatModifier(base.gun, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((AdvancedGunBehavior)this).Player.stats, ((AdvancedGunBehavior)this).Player); RUNAANSBULLETSActivated = false; } } ((AdvancedGunBehavior)this).Update(); } public override void OnPostFired(PlayerController player, Gun gun) { ((AdvancedGunBehavior)this).OnPostFired(player, gun); if (isFishbones) { HelpfulMethods.PlayRandomSFX(((Component)gun).gameObject, FishbonesFiringSFXList); return; } if (rampDownCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(rampDownCoroutine); } if (rampUpStacks <= rampUpStackCap) { ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)1, 1f + (float)rampUpStacks * 0.1f, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)gun).spriteAnimator.OverrideTimeScale = 1f + (float)rampUpStacks * 0.1f; rampUpStacks++; ((AdvancedGunBehavior)this).Update(); } } public override void OnFinishAttack(PlayerController player, Gun gun) { if (!isFishbones) { if (rampDownCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(rampDownCoroutine); } rampDownCoroutine = ((MonoBehaviour)this).StartCoroutine(RampUpCooldown(player, gun)); ((AdvancedGunBehavior)this).OnFinishAttack(player, gun); } } public override void OnSwitchedAwayFromThisGun() { GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); for (int i = 0; i < val.inventory.AllGuns.Count; i++) { if (!((Object)(object)val.inventory.AllGuns[i] == (Object)null) && !((Object)(object)val.inventory.AllGuns[i] == (Object)(object)((GameActor)val).CurrentGun) && (Object)(object)((Component)val.inventory.AllGuns[i]).GetComponent() != (Object)null) { Gun val2 = val.inventory.AllGuns[i]; ((BraveBehaviour)val2).spriteAnimator.OverrideTimeScale = 1f; rampUpStacks = 0; } } ((AdvancedGunBehavior)this).OnSwitchedAwayFromThisGun(); } private IEnumerator RampUpCooldown(PlayerController player, Gun gun) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, player = player, gun = gun }; } public override void OnReloadPressedSafe(PlayerController player, Gun gun, bool manualReload) { //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_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) if ((Object)(object)gun == (Object)null && (Object)(object)player == (Object)null) { return; } if (!isFishbones) { PickupObject byId = PickupObjectDatabase.GetById(PowPowAltForm.ID); Gun val = (Gun)(object)((byId is Gun) ? byId : null); AkSoundEngine.PostEvent("SwitchToFishbones", ((Component)player).gameObject); gun.TransformToTargetGun(val); gun.gunHandedness = val.gunHandedness; gun.DefaultModule.cooldownTime = val.DefaultModule.cooldownTime; ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)gun).spriteAnimator.OverrideTimeScale = 1f; if (rampDownCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(rampDownCoroutine); } rampDownCoroutine = ((MonoBehaviour)this).StartCoroutine(RampUpCooldown(player, gun)); } else { PickupObject byId2 = PickupObjectDatabase.GetById(ID); Gun val2 = (Gun)(object)((byId2 is Gun) ? byId2 : null); AkSoundEngine.PostEvent("SwitchToPowPow", ((Component)player).gameObject); gun.TransformToTargetGun(val2); gun.gunHandedness = val2.gunHandedness; gun.DefaultModule.cooldownTime = fireRateStat; ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)1, Mathf.Min(1f + (float)rampUpStacks * 0.1f, 3f), (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)gun).spriteAnimator.OverrideTimeScale = 1f + (float)rampUpStacks * 0.1f; } ((AdvancedGunBehavior)this).Update(); isFishbones = !isFishbones; } } internal class PowPowAmmoDisplay : CustomAmmoDisplay { private Gun _gun; private PowPow _powpow; private PlayerController _owner; private void Start() { _gun = ((Component)this).GetComponent(); _powpow = ((Component)_gun).GetComponent(); ref PlayerController owner = ref _owner; GameActor currentOwner = _gun.CurrentOwner; owner = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); } public override bool DoCustomAmmoDisplay(GameUIAmmoController uic) { if (!Object.op_Implicit((Object)(object)_owner) || !Object.op_Implicit((Object)(object)_powpow)) { return false; } if (!_powpow.isFishbones) { uic.GunAmmoCountLabel.Text = "[color #B266FF]Pow-Pow[/color]\n" + CustomAmmoDisplayExtensions.VanillaAmmoDisplay(_owner); } else { uic.GunAmmoCountLabel.Text = "[color #FF6666]Fishbones[/color]\n" + CustomAmmoDisplayExtensions.VanillaAmmoDisplay(_owner); } return true; } } internal class PowPowAltForm : AdvancedGunBehavior { public static string internalName = "Pow-Pow_AltForm"; public static int ID; public static string realName = "Fishbones"; private static float rampUpIncCap = 5f; private static float rampUpIncPerSecond = 0.5f; private static int ammoStat = 600; private static float reloadDuration = 1.6f; private static float fireRateStat = 0.375f; private static int spreadAngle = 5; private float currentRampUpIncAmount = 0f; private int rampUpStacks = 0; private float rampUpIncPerStack = 0.01f; private int rampUpStackCap = 20; private Coroutine rampDownCoroutine; private static float projectileDamageStat = 6f; private static float projectileSpeedStat = 50f; private static float projectileRangeStat = 35f; private static float projectileForceStat = 15f; public static void Add() { //IL_0130: 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_0144: 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_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_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_01ce: 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_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_01f7: 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_020b: 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_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Expected O, but got Unknown //IL_030d: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "fishbones"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "Jinx's Fishbones"); GunExt.SetLongDescription((PickupObject)(object)val, "idk man"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 1); GunExt.SetAnimationFPS(val, val.shootAnimation, 27); GunExt.SetAnimationFPS(val, val.reloadAnimation, 20); PickupObject byId = PickupObjectDatabase.GetById(16); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId2 = PickupObjectDatabase.GetById(2); muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)10; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 3; val.reloadTime = 0f; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.DefaultModule.angleFromAim = 0f; val.gunHandedness = (GunHandedness)2; val.carryPixelOffset += new IntVector2(2, 2); val.carryPixelDownOffset += new IntVector2(0, 0); val.carryPixelUpOffset += new IntVector2(0, 0); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(1.0625f, -0.125f); val.gunScreenShake.magnitude = 0.3f; val.GainsRateOfFireAsContinueAttack = false; Projectile val2 = Object.Instantiate(val.DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = 0f; val2.baseData.speed = projectileSpeedStat * 0.75f; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.AdditionalScaleMultiplier = 1f; ((Component)val2).GetComponent().searchRadius = 0f; ((Component)val2).GetComponent().angularAcceleration = 0f; ExplosiveModifier component = ((Component)val2).GetComponent(); ExplosionData val3 = new ExplosionData(); ExplosionData val4 = val3; component.explosionData = val3; ExplosionData val5 = val4; val5.doDamage = true; val5.doForce = false; val5.damage = projectileDamageStat * 2f; val5.damageRadius = 1f; val5.pushRadius = 1f; val5.forceUseThisRadius = false; val5.breakSecretWalls = false; val5.forcePreventSecretWallDamage = false; val5.doDestroyProjectiles = false; val5.doScreenShake = true; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Template Gun Orbs", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/fishbones_clipfull_nooutline", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/fishbones_clipempty_nooutline"); ref GameObject shellCasing = ref val.shellCasing; PickupObject byId3 = PickupObjectDatabase.GetById(15); shellCasing = ((Gun)((byId3 is Gun) ? byId3 : null)).shellCasing; ref GameObject clipObject = ref val.clipObject; PickupObject byId4 = PickupObjectDatabase.GetById(15); clipObject = ((Gun)((byId4 is Gun) ? byId4 : null)).clipObject; val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; ((PickupObject)val).quality = (ItemQuality)(-100); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; } } internal class PrayerBeads : AdvancedGunBehavior { public static string internalName = "Prayer Beads"; public static int ID; public static string realName = "Aion Er'na"; private static int ammoStat = 300; private static float reloadDuration = 0.5f; private static float fireRateStat = 0.5f; private static int spreadAngle = 5; private static float projectileDamageStat = 15f; private static float projectileSpeedStat = 70f; private static float projectileRangeStat = 20f; private static float projectileForceStat = 10f; private static float projSpreadRange = 5f; private static List normalFiringSFXList = new List { "prayerbeads_fire_sfx1", "prayerbeads_fire_sfx2", "prayerbeads_fire_sfx3", "prayerbeads_fire_sfx4", "prayerbeads_fire_sfx5" }; public static void Add() { //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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_0392: 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_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_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: 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_04b0: 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_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_053f: 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_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) string text = "Aion Er'na"; string text2 = "prayerbeads"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Relentless fortitude!\n"); GunExt.SetLongDescription((PickupObject)(object)val, "A legendary Kinkou relic. The Kinkou were known for their abilities to interact with both the physical world and the spiritual world. This set of prayer beads can be sent out with simple hand motions, almost as if there's someone else helping you control them.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "prayerbeads_idle_001", 10); GunExt.SetAnimationFPS(val, val.shootAnimation, 34); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.muzzleFlashEffects = null; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)10; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = 0f; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(11, 2); val.carryPixelDownOffset += new IntVector2(-16, -16); val.carryPixelUpOffset += new IntVector2(-4, 10); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(0.5f, 0f); val.gunScreenShake.magnitude = 0f; PickupObject byId2 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.HasProjectileDeathVFX = false; val2.hitEffects.deathAny = null; val2.hitEffects.deathEnemy = null; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId3 = PickupObjectDatabase.GetById(199); enemy = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.finalProjectile.hitEffects.enemy; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId4 = PickupObjectDatabase.GetById(199); tileMapHorizontal = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.finalProjectile.hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId5 = PickupObjectDatabase.GetById(199); tileMapVertical = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.finalProjectile.hitEffects.tileMapVertical; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; GunTools.SetProjectileSpriteRight(val2, "prayerbeads_projectile_003", 13, 9, true, (Anchor)4, (int?)11, (int?)7, true, false, (int?)null, (int?)null, (Projectile)null); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("prayerbeads_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/prayerbeads_ammo_full_001", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/prayerbeads_ammo_empty_001"); val.shellCasing = ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_casing", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 0, false, (GoopDefinition)null, 1f)).gameObject; val.clipObject = ((Component)BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/hextech_clip", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 0, false, (GoopDefinition)null, 1f)).gameObject; val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; val.reloadClipLaunchFrame = 0; EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.3f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.1f; easyTrailBullet.BaseColor = new Color(0.6784314f, 0.7058824f, 1f); easyTrailBullet.StartColor = ExtendedColours.pastelPurple; easyTrailBullet.EndColor = Color.white; List list = new List { "LOLItems/Resources/vfxs/test_vfx/test_vfx_01", "LOLItems/Resources/vfxs/test_vfx/test_vfx_02", "LOLItems/Resources/vfxs/test_vfx/test_vfx_03", "LOLItems/Resources/vfxs/test_vfx/test_vfx_04", "LOLItems/Resources/vfxs/test_vfx/test_vfx_05", "LOLItems/Resources/vfxs/test_vfx/test_vfx_06", "LOLItems/Resources/vfxs/test_vfx/test_vfx_07", "LOLItems/Resources/vfxs/test_vfx/test_vfx_08", "LOLItems/Resources/vfxs/test_vfx/test_vfx_09" }; GameObject val3 = VFXBuilder.CreateVFX("prayer_beads_spread_vfx", list, 10, new IntVector2(5, 5), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)2, false); PickupObject byId6 = PickupObjectDatabase.GetById(298); ComplexProjectileModifier val4 = (ComplexProjectileModifier)(object)((byId6 is ComplexProjectileModifier) ? byId6 : null); CustomLightningChainEnemiesModifierAOE orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.LinkVFXPrefab = val4.ChainLightningVFX; orAddComponent.PlaysSFX = true; string[] newSFXList = new string[5] { "statikk_shiv_lightning_SFX_1", "statikk_shiv_lightning_SFX_2", "statikk_shiv_lightning_SFX_3", "statikk_shiv_lightning_SFX_4", "statikk_shiv_lightning_SFX_5" }; orAddComponent.updateSFXList(newSFXList); orAddComponent.DamagesEnemies = true; orAddComponent.usesStaticDamageStat = false; orAddComponent.damageScale = 0.3f; orAddComponent.damageTypes = (CoreDamageTypes)2; orAddComponent.maximumLinkDistance = projSpreadRange; orAddComponent.UsesDispersalParticles = false; orAddComponent.DispersalDensity = 5f; orAddComponent.DispersalMaxCoherency = 0.7f; orAddComponent.DispersalMinCoherency = 0.3f; ((PickupObject)val).quality = (ItemQuality)3; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ItemBuilder.AddToSubShop((PickupObject)(object)val, (ShopType)2, 1f); ID = ((PickupObject)val).PickupObjectId; } public override void OnDropped() { ((AdvancedGunBehavior)this).OnDropped(); } public override void OnInitializedWithOwner(GameActor actor) { ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); } public override void PostProcessProjectile(Projectile projectile) { ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } public override void OnPostFired(PlayerController player, Gun gun) { HelpfulMethods.PlayRandomSFX(((Component)gun).gameObject, normalFiringSFXList); ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void OnReload(PlayerController player, Gun gun) { BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); ((AdvancedGunBehavior)this).OnReload(player, gun); } } internal class SoulSpear : AdvancedGunBehavior { [CompilerGenerated] private sealed class d__29 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public SoulSpear <>4__this; private Vector2 5__1; private float 5__2; private float 5__3; private float 5__4; private float 5__5; private Material 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__29(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__6 = null; <>1__state = -2; } private bool MoveNext() { //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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Invalid comparison between Unknown and I4 //IL_005e: 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_0212: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: 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_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0365: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Vector2.zero; if ((int)player.CurrentInputState != 4) { 5__1 = player.AdjustInputVector(((TwoAxisInputControl)player.m_activeActions.Move).Vector, BraveInput.MagnetAngles.movementCardinal, BraveInput.MagnetAngles.movementOrdinal); if (((Vector2)(ref 5__1)).magnitude <= 0f) { ItemBuilder.RemoveCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); return false; } } ItemBuilder.RemoveCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); 5__2 = player.stats.GetStatValue((StatType)0); ItemBuilder.AddCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0, 0f - 5__2, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); 5__3 = dashBaseDuration / player.stats.GetStatValue((StatType)1); 5__4 = dashBaseSpeed * (1f + (player.stats.GetStatValue((StatType)1) - 1f) * 0.5f); 5__4 *= (7f + (5__2 - 7f) * 0.5f) / 7f; 5__5 = 0f - BraveTime.DeltaTime; ((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(5__3); 5__6 = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)player).sprite); if (Object.op_Implicit((Object)(object)5__6)) { 5__6.SetColor("_OverrideColor", new Color(15.3f, 76.5f, 45.9f)); } if (((Vector2)(ref 5__1)).magnitude > 1f) { ((Vector2)(ref 5__1)).Normalize(); } break; case 1: <>1__state = -1; break; } if (5__5 < 5__3) { if (((GameActor)player).IsFalling) { if (Object.op_Implicit((Object)(object)5__6)) { 5__6.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } ItemBuilder.RemoveCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0); ItemBuilder.AddCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0, 1f, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); return false; } 5__5 += BraveTime.DeltaTime; ((BraveBehaviour)player).specRigidbody.Velocity = 5__1 * 5__4; <>2__current = null; <>1__state = 1; return true; } if (Object.op_Implicit((Object)(object)5__6)) { 5__6.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } ItemBuilder.RemoveCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0); ItemBuilder.AddCurrentGunStatModifier(((AdvancedGunBehavior)<>4__this).gun, (StatType)0, 1f, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string internalName = "Soul Spear"; public static int ID; public static string realName = "Soul Spear"; private static int ammoStat = 254; private static float reloadDuration = 0f; private static float fireRateStat = 0.6f; private static int spreadAngle = 2; private static float projectileDamageStat = 12f; private static float projectileSpeedStat = 60f; private static float projectileRangeStat = 20f; private static float projectileForceStat = 0f; private static float dashBaseDuration = 0.3f; private static float dashBaseSpeed = 20f; private Coroutine dashCoroutine; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/vengencespear/vengencespear_vfx" }; private static GameObject EffectVFX; private Dictionary> activeVFXObjectList = new Dictionary>(); private static float rendScale = 0.4f; private static List normalFiringSFXList = new List { "vengencespear_dry_fire_sfx_001", "vengencespear_dry_fire_sfx_002", "vengencespear_dry_fire_sfx_003", "vengencespear_dry_fire_sfx_004", "vengencespear_dry_fire_sfx_005", "vengencespear_dry_fire_sfx_006", "vengencespear_dry_fire_sfx_007", "vengencespear_dry_fire_sfx_008" }; private static List rendSFXList = new List { "rend1", "rend2", "rend3", "rend4", "rend5" }; public bool THREEPRONGEDSPEARSActivated = false; private static float THREEPRONGEDSPEARSrendScaleInc = 0.4f; public static void Add() { //IL_0098: 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_015d: 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_0171: 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_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_01d0: 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_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_01f5: 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_0208: 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_0228: 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_03fa: 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_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: 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_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: 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) string text = "Soul Spear"; string text2 = "vengencespear"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Accept no contrition.\""); GunExt.SetLongDescription((PickupObject)(object)val, "These soul spears impale themselves onto the target and can be recalled out at will, inflicting even more suffering.\n\nEvery attacks forces the player to either stay still or dash. You are invulnerable during the dash.\nPress reload to recall the spears and deal damage based on number of spears.\n\nA ghostly weapon originally wielded by the nightmare wraith, Kalista, a being with the sole purpose of hunting deceivers and traitors. It was said that once you were made the focus of her wrath, there was nothing you could do but offer up your soul.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); EffectVFX = VFXBuilder.CreateVFX("soulspear_rend_vfx", VFXSpritePath, 1, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); GunExt.SetAnimationFPS(val, val.shootAnimation, 17); PickupObject byId = PickupObjectDatabase.GetById(56); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.muzzleFlashEffects = null; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_gun_finale_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)15; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(-14, 10); val.carryPixelDownOffset += new IntVector2(18, 4); val.carryPixelUpOffset += new IntVector2(12, -22); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(2f, 0.3125f); val.gunScreenShake.magnitude = 0f; PickupObject byId2 = PickupObjectDatabase.GetById(56); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId3 = PickupObjectDatabase.GetById(8); deathAny = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; val2.hitEffects.deathEnemy = null; val2.hitEffects.enemy = null; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId4 = PickupObjectDatabase.GetById(86); tileMapHorizontal = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId5 = PickupObjectDatabase.GetById(86); tileMapVertical = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; val2.objectImpactEventName = "vengencespear5"; val2.enemyImpactEventName = "vengencespear4"; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; val2.ignoreDamageCaps = false; GunTools.SetProjectileSpriteRight(val2, "vengencespear_projectile_spearonly", 34, 4, true, (Anchor)4, (int?)32, (int?)3, true, false, (int?)null, (int?)null, (Projectile)null); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("soul_spear_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/vengencespear_ammo_full_001", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/vengencespear_ammo_empty_001"); val.shellCasing = null; val.clipObject = null; val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; val.reloadClipLaunchFrame = 0; EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.15f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.1f; easyTrailBullet.BaseColor = Color.cyan; easyTrailBullet.StartColor = Color.white; easyTrailBullet.EndColor = Color.blue; ((PickupObject)val).quality = (ItemQuality)4; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ItemBuilder.AddToSubShop((PickupObject)(object)val, (ShopType)2, 1f); ID = ((PickupObject)val).PickupObjectId; ItemBuilder.AddCurrentGunStatModifier(val, (StatType)0, 1f, (ModifyMethod)1); tk2dSprite component = EffectVFX.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.5f); } } protected override void Update() { if ((Object)(object)((AdvancedGunBehavior)this).Owner != (Object)null) { if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.THREE_PRONGED_SPEARS) && !THREEPRONGEDSPEARSActivated) { rendScale += THREEPRONGEDSPEARSrendScaleInc; THREEPRONGEDSPEARSActivated = true; } else if (!((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.THREE_PRONGED_SPEARS) && THREEPRONGEDSPEARSActivated) { rendScale -= THREEPRONGEDSPEARSrendScaleInc; THREEPRONGEDSPEARSActivated = false; } } ((AdvancedGunBehavior)this).Update(); } public override void OnPostFired(PlayerController player, Gun gun) { HelpfulMethods.PlayRandomSFX(((Component)gun).gameObject, normalFiringSFXList); if (dashCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dashCoroutine); } dashCoroutine = ((MonoBehaviour)this).StartCoroutine(MartialPoiseDash(player)); ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void PostProcessProjectile(Projectile projectile) { Projectile obj = projectile; obj.OnHitEnemy = (Action)Delegate.Combine(obj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //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) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_015f: 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) if (!((Object)(object)enemy == (Object)null)) { AIActor val = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { val = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemy).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { if (fatal && activeVFXObjectList.ContainsKey(val)) { foreach (GameObject item in activeVFXObjectList[val]) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)item); } } activeVFXObjectList.Remove(val); } else { Vector3 val2 = Vector2.op_Implicit(enemy.UnitDimensions); float num = (val2.x + val2.y) / 2f; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(1.625f, 0f); val3 += new Vector3(num * Random.Range(-0.3f, 0.3f), num * Random.Range(-0.3f, 0.3f)); GameObject val4 = ((GameActor)val).PlayEffectOnActor(EffectVFX, val3, true, false, true); tk2dSprite component = val4.GetComponent(); if ((Object)(object)component != (Object)null) { ((BraveBehaviour)component).transform.rotation = ((BraveBehaviour)projectile).transform.rotation; } if (!activeVFXObjectList.ContainsKey(val)) { activeVFXObjectList.Add(val, new List { val4 }); } else { activeVFXObjectList[val].Add(val4); } } } } }); ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } public override void OnReloadPressedSafe(PlayerController player, Gun gun, bool manualReload) { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Invalid comparison between Unknown and I4 //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_01b4: 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_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_01dd: 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_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0201: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_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_017f: Unknown result type (might be due to invalid IL or missing references) float num = gun.DefaultModule.projectiles[0].baseData.damage * rendScale * player.stats.GetStatValue((StatType)5); foreach (KeyValuePair> activeVFXObject in activeVFXObjectList) { float num2 = (float)activeVFXObject.Value.Count * num; if ((Object)(object)((BraveBehaviour)activeVFXObject.Key).healthHaver != (Object)null && (Object)(object)((Component)activeVFXObject.Key).gameObject != (Object)null) { HelpfulMethods.PlayRandomSFX(((Component)activeVFXObject.Key).gameObject, rendSFXList); ((BraveBehaviour)activeVFXObject.Key).healthHaver.ApplyDamage(num2, Vector2.zero, "soul_spear_rend_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, true); Vector2 unitDimensions = ((BraveBehaviour)activeVFXObject.Key).specRigidbody.HitboxPixelCollider.UnitDimensions; Vector2 val = unitDimensions / 2f; int num3 = Mathf.Min(activeVFXObject.Value.Count, 50) + 15; Vector2 val2 = ((BraveBehaviour)activeVFXObject.Key).specRigidbody.HitboxPixelCollider.UnitBottomLeft; Vector2 val3 = ((BraveBehaviour)activeVFXObject.Key).specRigidbody.HitboxPixelCollider.UnitTopRight; PixelCollider pixelCollider = ((BraveBehaviour)activeVFXObject.Key).specRigidbody.GetPixelCollider((ColliderType)1); if (pixelCollider != null && (int)pixelCollider.ColliderGenerationMode == 0) { val2 = Vector2.Min(val2, pixelCollider.UnitBottomLeft); val3 = Vector2.Max(val3, pixelCollider.UnitTopRight); } val2 += Vector2.Min(val * 0.15f, new Vector2(0.25f, 0.25f)); val3 -= Vector2.Min(val * 0.15f, new Vector2(0.25f, 0.25f)); val3.y -= Mathf.Min(val.y * 0.1f, 0.1f); HelpfulMethods.DoRandomParticleBurst(num3, Vector2.op_Implicit(val2), Vector2.op_Implicit(val3), 1f, 1f, 0.3f, 1f, Color.cyan, (SparksType)2); } foreach (GameObject item in activeVFXObject.Value) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)item); } } } activeVFXObjectList.Clear(); } public override void OnFinishAttack(PlayerController player, Gun gun) { ((AdvancedGunBehavior)this).OnFinishAttack(player, gun); } public override void OnSwitchedAwayFromThisGun() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (dashCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dashCoroutine); } Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)val).sprite); if (Object.op_Implicit((Object)(object)outlineMaterial)) { outlineMaterial.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } ItemBuilder.RemoveCurrentGunStatModifier(base.gun, (StatType)0); ItemBuilder.AddCurrentGunStatModifier(base.gun, (StatType)0, 1f, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(val.stats, val); ((AdvancedGunBehavior)this).OnSwitchedAwayFromThisGun(); } public IEnumerator MartialPoiseDash(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this, player = player }; } } internal class VirtueForm3 : AdvancedGunBehavior { [CompilerGenerated] private sealed class d__23 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Projectile projectile; public VirtueForm3 <>4__this; private Vector2 5__1; private Projectile 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //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_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_012b: 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_0198: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)projectile == (Object)null || (Object)(object)projectile.Owner == (Object)null || !Object.op_Implicit((Object)(object)projectile)) { Plugin.Log("fail 1"); return false; } <>2__current = (object)new WaitForSeconds(0.001f); <>1__state = 1; return true; case 1: { <>1__state = -1; Vector2 lastVelocity = projectile.LastVelocity; 5__1 = ((Vector2)(ref lastVelocity)).normalized; 5__2 = Object.Instantiate(((Component)((AdvancedGunBehavior)<>4__this).gun.Volley.projectiles[1].projectiles[0]).gameObject).GetComponent(); 5__2.Owner = projectile.Owner; 5__2.Shooter = projectile.Shooter; ((BraveBehaviour)5__2).transform.position = ((GameActor)<>4__this.currentOwner).CurrentGun.barrelOffset.position + new Vector3(5__1.x, 5__1.y); 5__3 = Mathf.Atan2(5__1.y, 5__1.x) * 57.29578f; ((BraveBehaviour)5__2).transform.rotation = Quaternion.Euler(0f, 0f, 5__3); 5__2.SendInDirection(5__1, true, true); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string internalName = "VirtueForm3"; public static int ID; public static string realName = "Virtue"; private PlayerController currentOwner; private static int ammoStat = 750; private static float reloadDuration = 0f; private static float fireRateStat = 0.35f; private static int spreadAngle = 0; private static float zealSpeedInc = 1.1f; public GameObject prefabToAttachToPlayer; private GameObject instanceWings; private tk2dSprite instanceWingsSprite; private bool m_isCurrentlyActive; private bool m_hiddenForAll; private static float projectileDamageStat = 15f; private static float projectileSpeedStat = 65f; private static float projectileRangeStat = 20f; private static float projectileForceStat = 8f; private static List VirtueFiringSFXList = new List { "virtue_atk_sfx1", "virtue_atk_sfx2", "virtue_atk_sfx3", "virtue_atk_sfx4" }; private static List VirtueWaveSFXList = new List { "virtue_wave_sfx1", "virtue_wave_sfx2", "virtue_wave_sfx3", "virtue_wave_sfx4", "virtue_wave_sfx5" }; public static void Add() { //IL_0121: 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_0135: 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_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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_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_01b2: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: 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_0425: 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_042f: 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_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0466: 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_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_0484: 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) string text = realName; string text2 = "virtue_form3"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Drown in holy fire!\""); GunExt.SetLongDescription((PickupObject)(object)val, "Permanently have max zealous stacks. Fires waves every attack. Gains increased movespeed. Gain wings.\n\nVirtue. Definition: a quality considered morally good.\n\nA blade of celestial creation that are capable of burning evil. The original wielder of this weapon was said to have tested whether one was virtuous by slashing at their neck. If they were truly virtuous, then the blade would cause them no harm. \n\nI have absolved myself of all mortal sin in order to serve judgement to the unworthy. \n\n\"To be human is to be imperfect, but I am not human.\"\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 30); GunExt.SetAnimationFPS(val, val.alternateShootAnimation, 30); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.muzzleFlashEffects = null; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)15; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(13, 2); val.carryPixelDownOffset += new IntVector2(-11, -16); val.carryPixelUpOffset += new IntVector2(-13, 11); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(3.5f, 3.25f); val.gunScreenShake.magnitude = 0f; PickupObject byId2 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.HasProjectileDeathVFX = true; ref GameObject overrideMidairDeathVFX = ref val2.hitEffects.overrideMidairDeathVFX; PickupObject byId3 = PickupObjectDatabase.GetById(8); overrideMidairDeathVFX = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.chargeProjectiles[1].Projectile.hitEffects.enemy.effects[0].effects[0].effect; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId4 = PickupObjectDatabase.GetById(8); deathAny = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.chargeProjectiles[1].Projectile.hitEffects.enemy; ref VFXPool deathEnemy = ref val2.hitEffects.deathEnemy; PickupObject byId5 = PickupObjectDatabase.GetById(8); deathEnemy = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.chargeProjectiles[1].Projectile.hitEffects.enemy; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId6 = PickupObjectDatabase.GetById(8); enemy = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.chargeProjectiles[1].Projectile.hitEffects.enemy; val2.hitEffects.tileMapHorizontal = null; val2.hitEffects.tileMapVertical = null; val2.objectImpactEventName = "virtue2"; val2.enemyImpactEventName = "virtue5"; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; GunTools.SetProjectileSpriteRight(val2, "virtue_yellow_small_projectile_001", 19, 7, true, (Anchor)4, (int?)17, (int?)6, true, false, (int?)null, (int?)null, (Projectile)null); EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.25f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.15f; easyTrailBullet.BaseColor = ExtendedColours.paleYellow; easyTrailBullet.StartColor = ExtendedColours.paleYellow; easyTrailBullet.EndColor = Color.white; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("virtue_form3_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/virtue_form3_ammo_full", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/virtue_form3_ammo_empty"); ((Component)val).gameObject.Attach((Action)null, allowDuplicates: false); val.Volley.ModulesAreTiers = true; ProjectileModule defaultModule = val.DefaultModule; ProjectileModule item = ProjectileModule.CreateClone(defaultModule, false, -1); val.Volley.projectiles.Add(item); PickupObject byId7 = PickupObjectDatabase.GetById(86); Projectile val3 = Object.Instantiate(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0]); val.Volley.projectiles[1].projectiles[0] = val3; val3.hitEffects.HasProjectileDeathVFX = true; val3.hitEffects.deathAny = null; val3.hitEffects.deathEnemy = null; val3.hitEffects.enemy = null; val3.hitEffects.tileMapHorizontal = null; val3.hitEffects.tileMapVertical = null; ((Component)val3).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val3).gameObject); Object.DontDestroyOnLoad((Object)(object)val3); val3.baseData.damage = projectileDamageStat * 0.5f; val3.baseData.speed = projectileSpeedStat; val3.baseData.range = projectileRangeStat; val3.baseData.force = 0f; ((BraveBehaviour)val3).transform.parent = val.barrelOffset; val3.shouldRotate = true; val3.PenetratesInternalWalls = true; val3.pierceMinorBreakables = true; val3.damagesWalls = false; TrueWallPiercingRounds orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val3).gameObject); PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val3).gameObject); orAddComponent2.penetration = 999; orAddComponent2.penetratesBreakables = true; GunTools.SetProjectileSpriteRight(val3, "virtue_yellow_medium_projectile_001", 14, 64, true, (Anchor)4, (int?)12, (int?)52, true, false, (int?)null, (int?)null, (Projectile)null); tk2dSprite component = ((Component)((BraveBehaviour)val3).sprite).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.8f); } val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; ((PickupObject)val).ShouldBeExcludedFromShops = true; ((PickupObject)val).quality = (ItemQuality)(-100); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; GunTools.TrimGunSprites(val); ItemBuilder.AddCurrentGunStatModifier(val, (StatType)0, zealSpeedInc, (ModifyMethod)1); } public override void OnPostFired(PlayerController player, Gun gun) { BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.alternateShootAnimation); ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void PostProcessProjectile(Projectile projectile) { if ((Object)(object)projectile != (Object)null && (Object)(object)projectile.Owner != (Object)null) { HelpfulMethods.PlayRandomSFX(((Component)base.gun).gameObject, VirtueWaveSFXList); ((MonoBehaviour)currentOwner).StartCoroutine(FireWaveDelayed(projectile)); } ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } private IEnumerator FireWaveDelayed(Projectile projectile) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { <>4__this = this, projectile = projectile }; } public override void OnInitializedWithOwner(GameActor actor) { currentOwner = (PlayerController)(object)((actor is PlayerController) ? actor : null); currentOwner.OnIsRolling += OnRollFrame; TriggerFlight(); Plugin.Log("picked up " + realName); ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); } public override void OnDropped() { currentOwner.OnIsRolling -= OnRollFrame; StopFlight(); currentOwner = null; Plugin.Log("dropped " + realName); ((AdvancedGunBehavior)this).OnDropped(); } private void TriggerFlight() { Plugin.Log("trigger flight"); if (!Dungeon.IsGenerating && Object.op_Implicit((Object)(object)currentOwner) && Object.op_Implicit((Object)(object)((BraveBehaviour)currentOwner).sprite) && Object.op_Implicit((Object)(object)((Component)((BraveBehaviour)currentOwner).sprite).GetComponent())) { m_isCurrentlyActive = true; currentOwner.AdditionalCanDodgeRollWhileFlying.SetOverride("Feather", true, (float?)null); ((GameActor)currentOwner).SetIsFlying(true, "DivineAscent", true, false); WingsItem component = ((Component)PickupObjectDatabase.GetById(307)).gameObject.GetComponent(); instanceWings = currentOwner.RegisterAttachedObject(component.prefabToAttachToPlayer, "jetpack", 0.1f); instanceWingsSprite = instanceWings.GetComponent(); if (!Object.op_Implicit((Object)(object)instanceWingsSprite)) { instanceWingsSprite = instanceWings.GetComponentInChildren(); } } } private void StopFlight() { m_isCurrentlyActive = false; currentOwner.AdditionalCanDodgeRollWhileFlying.SetOverride("Feather", false, (float?)null); ((GameActor)currentOwner).SetIsFlying(false, "DivineAscent", true, false); currentOwner.DeregisterAttachedObject(instanceWings, true); instanceWingsSprite = null; } protected override void Update() { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Invalid comparison between Unknown and I4 //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Invalid comparison between Unknown and I4 ((AdvancedGunBehavior)this).Update(); if (!((Object)(object)currentOwner != (Object)null) || !((AdvancedGunBehavior)this).PickedUp || !((Object)(object)((AdvancedGunBehavior)this).Owner != (Object)null)) { return; } if (m_isCurrentlyActive) { if (((GameActor)currentOwner).IsFalling) { m_hiddenForAll = true; ((BraveBehaviour)instanceWingsSprite).renderer.enabled = false; return; } if (m_hiddenForAll) { m_hiddenForAll = false; ((BraveBehaviour)instanceWingsSprite).renderer.enabled = true; } string text = "white_wing" + currentOwner.GetBaseAnimationSuffix(false); if (!((BraveBehaviour)instanceWingsSprite).spriteAnimator.IsPlaying(text) && !currentOwner.IsDodgeRolling) { ((BraveBehaviour)instanceWingsSprite).spriteAnimator.Play(text); } if ((int)GameManager.Instance.CurrentLevelOverrideState == 4) { StopFlight(); } } else if ((int)GameManager.Instance.CurrentLevelOverrideState != 4) { TriggerFlight(); } } private void OnRollFrame(PlayerController player) { //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.CurrentLevelOverrideState != 4) { } } } internal class VirtueForm3AmmoDisplay : CustomAmmoDisplay { private Gun _gun; private VirtueForm3 _virtueform3; private PlayerController _owner; private void Start() { _gun = ((Component)this).GetComponent(); _virtueform3 = ((Component)_gun).GetComponent(); ref PlayerController owner = ref _owner; GameActor currentOwner = _gun.CurrentOwner; owner = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); } public override bool DoCustomAmmoDisplay(GameUIAmmoController uic) { if (!Object.op_Implicit((Object)(object)_owner) || !Object.op_Implicit((Object)(object)_virtueform3)) { return false; } uic.GunAmmoCountLabel.Text = "[color #FFD700]TRANSCENDENT[/color]\n" + CustomAmmoDisplayExtensions.VanillaAmmoDisplay(_owner); return true; } } internal class VirtueForm2 : AdvancedGunBehavior { [CompilerGenerated] private sealed class d__32 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Projectile projectile; public VirtueForm2 <>4__this; private Vector2 5__1; private Projectile 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //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_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_012b: 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_0198: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)projectile == (Object)null || (Object)(object)projectile.Owner == (Object)null || !Object.op_Implicit((Object)(object)projectile)) { Plugin.Log("fail 1"); return false; } <>2__current = (object)new WaitForSeconds(0.001f); <>1__state = 1; return true; case 1: { <>1__state = -1; Vector2 lastVelocity = projectile.LastVelocity; 5__1 = ((Vector2)(ref lastVelocity)).normalized; 5__2 = Object.Instantiate(((Component)((AdvancedGunBehavior)<>4__this).gun.Volley.projectiles[1].projectiles[0]).gameObject).GetComponent(); 5__2.Owner = projectile.Owner; 5__2.Shooter = projectile.Shooter; ((BraveBehaviour)5__2).transform.position = ((GameActor)<>4__this.currentOwner).CurrentGun.barrelOffset.position + new Vector3(5__1.x, 5__1.y); 5__3 = Mathf.Atan2(5__1.y, 5__1.x) * 57.29578f; ((BraveBehaviour)5__2).transform.rotation = Quaternion.Euler(0f, 0f, 5__3); 5__2.SendInDirection(5__1, true, true); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public Gun gun; public VirtueForm2 <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.zealStacks = 0; ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)gun).spriteAnimator.OverrideTimeScale = 1f + (float)<>4__this.zealStacks * <>4__this.zealIncPerStack; if (<>4__this.zealCapActivated) { BraveUtility.Swap(ref ((AdvancedGunBehavior)<>4__this).gun.shootAnimation, ref ((AdvancedGunBehavior)<>4__this).gun.criticalFireAnimation); BraveUtility.Swap(ref ((AdvancedGunBehavior)<>4__this).gun.alternateShootAnimation, ref ((AdvancedGunBehavior)<>4__this).gun.finalShootAnimation); BraveUtility.Swap(ref ((AdvancedGunBehavior)<>4__this).gun.idleAnimation, ref ((AdvancedGunBehavior)<>4__this).gun.alternateIdleAnimation); gun.Reload(); <>4__this.zealCapActivated = false; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string internalName = "VirtueForm2"; public static int ID; public static string realName = "Virtue"; private PlayerController currentOwner; private static int ammoStat = 500; private static float reloadDuration = 0f; private static float fireRateStat = 0.8f; private static int spreadAngle = 0; private int zealStacks = 0; private int zealStackCap = 5; private float zealIncPerStack = 0.12f; private float zealSpeedInc = 1.1f; private Coroutine zealDecayCoroutine; private bool zealCapActivated = false; public float DivineAscentExpTracker = 0f; public float DivineAscentThreshold = 8000f; private Gun NextFormWeapon; private static GameObject AscensionIcon; private Projectile wave; private static float projectileDamageStat = 10f; private static float projectileSpeedStat = 50f; private static float projectileRangeStat = 15f; private static float projectileForceStat = 8f; private static List VirtueFiringSFXList = new List { "virtue_atk_sfx1", "virtue_atk_sfx2", "virtue_atk_sfx3", "virtue_atk_sfx4" }; private static List VirtueWaveSFXList = new List { "virtue_wave_sfx1", "virtue_wave_sfx2", "virtue_wave_sfx3", "virtue_wave_sfx4", "virtue_wave_sfx5" }; private static List VirtueAscensionSFXList = new List { "virtue_ascension_sfx1", "virtue_ascension_sfx2", "virtue_ascension_sfx3" }; public static void Add() { //IL_013f: 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_0153: 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_01ac: 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_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_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_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_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_01ea: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: 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_0771: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "virtue_form2"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Burn all deceivers!\""); GunExt.SetLongDescription((PickupObject)(object)val, "Gains a stack of zealous every attack. Each stack of zealous increases fire rate. At max zealous stacks, fires an additional wave projectile and gain increased movespeed.\nGain EXP per kill. Evolves after enough EXP.\n\nVirtue. Definition: a quality considered morally good.\n\nA blade of celestial creation that are capable of burning evil. The original wielder of this weapon was said to have tested whether one was virtuous by slashing at their neck. If they were truly virtuous, then the blade would cause them no harm. \n\nYou've learned how to ignite the holy fire but cannot fully control its strength. You clearly yet lack something.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 12); GunExt.SetAnimationFPS(val, val.alternateShootAnimation, 12); GunExt.SetAnimationFPS(val, val.criticalFireAnimation, 13); GunExt.SetAnimationFPS(val, val.finalShootAnimation, 13); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.muzzleFlashEffects = null; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)15; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(15, -1); val.carryPixelDownOffset += new IntVector2(-16, -15); val.carryPixelUpOffset += new IntVector2(-12, 16); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(3.5f, 3.25f); val.gunScreenShake.magnitude = 0f; PickupObject byId2 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.HasProjectileDeathVFX = true; ref GameObject overrideMidairDeathVFX = ref val2.hitEffects.overrideMidairDeathVFX; PickupObject byId3 = PickupObjectDatabase.GetById(504); overrideMidairDeathVFX = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId4 = PickupObjectDatabase.GetById(504); deathAny = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; ref VFXPool deathEnemy = ref val2.hitEffects.deathEnemy; PickupObject byId5 = PickupObjectDatabase.GetById(504); deathEnemy = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.deathEnemy; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId6 = PickupObjectDatabase.GetById(504); enemy = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.enemy; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId7 = PickupObjectDatabase.GetById(384); tileMapHorizontal = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId8 = PickupObjectDatabase.GetById(384); tileMapVertical = ((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; val2.objectImpactEventName = "virtue2"; val2.enemyImpactEventName = "virtue5"; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; GunTools.SetProjectileSpriteRight(val2, "virtue_orange_projectile_straight_001", 19, 7, true, (Anchor)4, (int?)17, (int?)6, true, false, (int?)null, (int?)null, (Projectile)null); EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.25f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.15f; easyTrailBullet.BaseColor = ExtendedColours.orange; easyTrailBullet.StartColor = ExtendedColours.paleYellow; easyTrailBullet.EndColor = Color.white; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("virtue_form2_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/virtue_form2_ammo_full", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/virtue_form1_ammo_empty"); ((Component)val).gameObject.Attach((Action)null, allowDuplicates: false); val.Volley.ModulesAreTiers = true; ProjectileModule defaultModule = val.DefaultModule; ProjectileModule item = ProjectileModule.CreateClone(defaultModule, false, -1); val.Volley.projectiles.Add(item); PickupObject byId9 = PickupObjectDatabase.GetById(86); Projectile val3 = Object.Instantiate(((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0]); val.Volley.projectiles[1].projectiles[0] = val3; val3.hitEffects.HasProjectileDeathVFX = true; val3.hitEffects.deathAny = null; val3.hitEffects.deathEnemy = null; val3.hitEffects.enemy = null; val3.hitEffects.tileMapHorizontal = null; val3.hitEffects.tileMapVertical = null; ((Component)val3).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val3).gameObject); Object.DontDestroyOnLoad((Object)(object)val3); val3.baseData.damage = projectileDamageStat * 0.5f; val3.baseData.speed = projectileSpeedStat; val3.baseData.range = projectileRangeStat; val3.baseData.force = 0f; ((BraveBehaviour)val3).transform.parent = val.barrelOffset; val3.shouldRotate = true; val3.PenetratesInternalWalls = true; val3.pierceMinorBreakables = true; val3.damagesWalls = false; TrueWallPiercingRounds orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val3).gameObject); PierceProjModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent(((Component)val3).gameObject); orAddComponent2.penetration = 999; orAddComponent2.penetratesBreakables = true; GunTools.SetProjectileSpriteRight(val3, "virtue_orange_medium_projectile_001", 14, 64, true, (Anchor)4, (int?)12, (int?)52, true, false, (int?)null, (int?)null, (Projectile)null); tk2dSprite component = ((Component)((BraveBehaviour)val3).sprite).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.8f); } val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; ((PickupObject)val).ShouldBeExcludedFromShops = true; ((PickupObject)val).quality = (ItemQuality)(-100); Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ID = ((PickupObject)val).PickupObjectId; GunTools.TrimGunSprites(val); AscensionIcon = SpriteBuilder.SpriteFromResource("LOLItems/Resources/one_off_sprites/virtue_ascension_icons/export_25", AscensionIcon, (Assembly)null); FakePrefab.MarkAsFakePrefab(AscensionIcon); AscensionIcon.SetActive(false); } public override void OnPostFired(PlayerController player, Gun gun) { if (zealDecayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(zealDecayCoroutine); } if (zealStacks <= zealStackCap) { ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)1, 1f + (float)zealStacks * zealIncPerStack, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)gun).spriteAnimator.OverrideTimeScale = 1f + (float)zealStacks * zealIncPerStack; zealStacks++; if (zealStacks > zealStackCap && !zealCapActivated) { BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.criticalFireAnimation); BraveUtility.Swap(ref base.gun.alternateShootAnimation, ref base.gun.finalShootAnimation); BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)0); ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)0, zealSpeedInc, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); zealCapActivated = true; } ((AdvancedGunBehavior)this).Update(); } BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.alternateShootAnimation); ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void OnFinishAttack(PlayerController player, Gun gun) { if (zealDecayCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(zealDecayCoroutine); } zealDecayCoroutine = ((MonoBehaviour)this).StartCoroutine(ZealDecayCoroutine(player, gun)); ((AdvancedGunBehavior)this).OnFinishAttack(player, gun); } public override void OnSwitchedAwayFromThisGun() { for (int i = 0; i < currentOwner.inventory.AllGuns.Count; i++) { if (!((Object)(object)currentOwner.inventory.AllGuns[i] == (Object)null) && !((Object)(object)currentOwner.inventory.AllGuns[i] == (Object)(object)((GameActor)currentOwner).CurrentGun) && (Object)(object)((Component)currentOwner.inventory.AllGuns[i]).GetComponent() != (Object)null) { Gun val = currentOwner.inventory.AllGuns[i]; ((BraveBehaviour)val).spriteAnimator.OverrideTimeScale = 1f; zealStacks = 0; ItemBuilder.RemoveCurrentGunStatModifier(val, (StatType)1); ItemBuilder.RemoveCurrentGunStatModifier(val, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(currentOwner.stats, currentOwner); if (zealCapActivated) { BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.criticalFireAnimation); BraveUtility.Swap(ref base.gun.alternateShootAnimation, ref base.gun.finalShootAnimation); BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); zealCapActivated = false; } } } ((AdvancedGunBehavior)this).OnSwitchedAwayFromThisGun(); } private IEnumerator ZealDecayCoroutine(PlayerController player, Gun gun) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this, player = player, gun = gun }; } public override void PostProcessProjectile(Projectile projectile) { if (zealStacks >= zealStackCap) { if ((Object)(object)projectile != (Object)null && (Object)(object)projectile.Owner != (Object)null) { HelpfulMethods.PlayRandomSFX(((Component)base.gun).gameObject, VirtueWaveSFXList); ((MonoBehaviour)currentOwner).StartCoroutine(FireWaveDelayed(projectile)); } } else { HelpfulMethods.PlayRandomSFX(((Component)base.gun).gameObject, VirtueFiringSFXList); } ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } private IEnumerator FireWaveDelayed(Projectile projectile) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { <>4__this = this, projectile = projectile }; } public override void OnInitializedWithOwner(GameActor actor) { currentOwner = (PlayerController)(object)((actor is PlayerController) ? actor : null); PlayerController obj = currentOwner; obj.OnAnyEnemyReceivedDamage = (Action)Delegate.Combine(obj.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); Plugin.Log("picked up " + realName); ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); } public override void OnDropped() { PlayerController obj = currentOwner; obj.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(obj.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); currentOwner = null; Plugin.Log("dropped " + realName); ((AdvancedGunBehavior)this).OnDropped(); } private void KillEnemyCount(float damage, bool fatal, HealthHaver enemyHealth) { if (Object.op_Implicit((Object)(object)enemyHealth) && fatal && (Object)(object)((BraveBehaviour)enemyHealth).aiActor != (Object)null) { float num = 0f; num = ((!enemyHealth.IsBoss && !enemyHealth.IsSubboss) ? ((BraveBehaviour)((BraveBehaviour)enemyHealth).aiActor).healthHaver.GetMaxHealth() : (((BraveBehaviour)((BraveBehaviour)enemyHealth).aiActor).healthHaver.GetMaxHealth() * 0.25f)); if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.EXP_SHARE_FORM_2)) { num *= 2f; } DivineAscentExpTracker += num; if (DivineAscentExpTracker >= DivineAscentThreshold) { TriggerAscent(); } } } private void TriggerAscent() { PlayerController obj = currentOwner; obj.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(obj.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); DivineAscentExpTracker = 0f; if ((Object)(object)NextFormWeapon == (Object)null) { ref Gun nextFormWeapon = ref NextFormWeapon; PickupObject byId = PickupObjectDatabase.GetById(VirtueForm3.ID); nextFormWeapon = (Gun)(object)((byId is Gun) ? byId : null); } if ((Object)(object)NextFormWeapon != (Object)null || (Object)(object)currentOwner != (Object)null) { HelpfulMethods.CustomNotification("Usurped the Aspect of Justice", "Behold, the righteous flame!", AscensionIcon.GetComponent(), (NotificationColor)2); HelpfulMethods.PlayRandomSFX(((Component)base.gun).gameObject, VirtueAscensionSFXList); currentOwner.inventory.RemoveGunFromInventory(base.gun); PlayerControllerExt.GiveItem(currentOwner, "LOLItems:virtueform3"); } } } internal class VirtueForm2AmmoDisplay : CustomAmmoDisplay { private Gun _gun; private VirtueForm2 _virtueform2; private PlayerController _owner; private void Start() { _gun = ((Component)this).GetComponent(); _virtueform2 = ((Component)_gun).GetComponent(); ref PlayerController owner = ref _owner; GameActor currentOwner = _gun.CurrentOwner; owner = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); } public override bool DoCustomAmmoDisplay(GameUIAmmoController uic) { if (!Object.op_Implicit((Object)(object)_owner) || !Object.op_Implicit((Object)(object)_virtueform2)) { return false; } uic.GunAmmoCountLabel.Text = $"[color #FFFF66]EXP: {dfNumberExtensions.RoundToNearest(_virtueform2.DivineAscentExpTracker, 0f)} / {dfNumberExtensions.RoundToNearest(_virtueform2.DivineAscentThreshold, 0f)}[/color]\n{CustomAmmoDisplayExtensions.VanillaAmmoDisplay(_owner)}"; return true; } } internal class VirtueForm1 : AdvancedGunBehavior { public static string internalName = "VirtueForm1"; public static int ID; public static string realName = "Virtue"; private PlayerController currentOwner; private static int ammoStat = 250; private static float reloadDuration = 0f; private static float fireRateStat = 0.8f; private static int spreadAngle = 0; private Gun NextFormWeapon; private static GameObject AscensionIcon; public float DivineAscentExpTracker = 0f; public float DivineAscentThreshold = 4000f; private static float projectileDamageStat = 8f; private static float projectileSpeedStat = 40f; private static float projectileRangeStat = 15f; private static float projectileForceStat = 8f; private static List VirtueFiringSFXList = new List { "virtue_atk_sfx1", "virtue_atk_sfx2", "virtue_atk_sfx3", "virtue_atk_sfx4" }; private static List VirtueAscensionSFXList = new List { "virtue_ascension_sfx1", "virtue_ascension_sfx2", "virtue_ascension_sfx3" }; public static void Add() { //IL_0121: 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_0135: 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_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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_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_01b2: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: 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_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_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0497: 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_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_04b4: 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_050a: Unknown result type (might be due to invalid IL or missing references) string text = realName; string text2 = "virtue_form1"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Truth, guide my sword!\""); GunExt.SetLongDescription((PickupObject)(object)val, "Gain EXP per kill. Evolves after enough EXP.\n\nVirtue. Definition: a quality considered morally good.\n\nA blade of celestial creation that are capable of burning evil. The original wielder of this weapon was said to have tested whether one was virtuous by slashing at their neck. If they were truly virtuous, then the blade would cause them no harm. \n\nShe was capable of igniting the blade with holy fire but it appears to require something deep within.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 12); GunExt.SetAnimationFPS(val, val.alternateShootAnimation, 12); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.muzzleFlashEffects = null; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)15; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 9999; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)1; val.carryPixelOffset += new IntVector2(15, -1); val.carryPixelDownOffset += new IntVector2(-16, -15); val.carryPixelUpOffset += new IntVector2(-12, 16); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(3.5f, 3.25f); val.gunScreenShake.magnitude = 0f; PickupObject byId2 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; val2.hitEffects.HasProjectileDeathVFX = true; ref GameObject overrideMidairDeathVFX = ref val2.hitEffects.overrideMidairDeathVFX; PickupObject byId3 = PickupObjectDatabase.GetById(89); overrideMidairDeathVFX = ((Gun)((byId3 is Gun) ? byId3 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId4 = PickupObjectDatabase.GetById(89); deathAny = ((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; ref VFXPool deathEnemy = ref val2.hitEffects.deathEnemy; PickupObject byId5 = PickupObjectDatabase.GetById(89); deathEnemy = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.deathEnemy; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId6 = PickupObjectDatabase.GetById(476); enemy = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.enemy; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId7 = PickupObjectDatabase.GetById(89); tileMapHorizontal = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId8 = PickupObjectDatabase.GetById(89); tileMapVertical = ((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; val2.objectImpactEventName = "virtue2"; val2.enemyImpactEventName = "virtue5"; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; GunTools.SetProjectileSpriteRight(val2, "virtue_green_projectile_straight_001", 19, 7, true, (Anchor)4, (int?)17, (int?)6, true, false, (int?)null, (int?)null, (Projectile)null); EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.25f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.15f; easyTrailBullet.BaseColor = ExtendedColours.lime; easyTrailBullet.StartColor = Color.green; easyTrailBullet.EndColor = Color.white; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("virtue_form1_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/virtue_form1_ammo_full", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/virtue_form1_ammo_empty"); ((Component)val).gameObject.Attach((Action)null, allowDuplicates: false); val.shellsToLaunchOnFire = 0; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; ((PickupObject)val).quality = (ItemQuality)2; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ItemBuilder.AddToSubShop((PickupObject)(object)val, (ShopType)2, 1f); ID = ((PickupObject)val).PickupObjectId; GunTools.TrimGunSprites(val); AscensionIcon = SpriteBuilder.SpriteFromResource("LOLItems/Resources/one_off_sprites/virtue_ascension_icons/export_02", AscensionIcon, (Assembly)null); FakePrefab.MarkAsFakePrefab(AscensionIcon); AscensionIcon.SetActive(false); } public override void OnInitializedWithOwner(GameActor actor) { currentOwner = (PlayerController)(object)((actor is PlayerController) ? actor : null); PlayerController obj = currentOwner; obj.OnAnyEnemyReceivedDamage = (Action)Delegate.Combine(obj.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); Plugin.Log("picked up " + realName); ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); } public override void OnDropped() { PlayerController obj = currentOwner; obj.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(obj.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); Plugin.Log("dropped " + realName); ((AdvancedGunBehavior)this).OnDropped(); } public override void OnPostFired(PlayerController player, Gun gun) { BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.alternateShootAnimation); HelpfulMethods.PlayRandomSFX(((Component)gun).gameObject, VirtueFiringSFXList); ((AdvancedGunBehavior)this).OnPostFired(player, gun); } private void KillEnemyCount(float damage, bool fatal, HealthHaver enemyHealth) { if (Object.op_Implicit((Object)(object)enemyHealth) && fatal && (Object)(object)((BraveBehaviour)enemyHealth).aiActor != (Object)null) { float num = 0f; num = ((!enemyHealth.IsBoss && !enemyHealth.IsSubboss) ? ((BraveBehaviour)((BraveBehaviour)enemyHealth).aiActor).healthHaver.GetMaxHealth() : (((BraveBehaviour)((BraveBehaviour)enemyHealth).aiActor).healthHaver.GetMaxHealth() * 0.25f)); if (((AdvancedGunBehavior)this).Player.HasSynergy(Synergy.EXP_SHARE_FORM_1)) { num *= 2f; } DivineAscentExpTracker += num; if (DivineAscentExpTracker >= DivineAscentThreshold) { TriggerAscent(); } } } private void TriggerAscent() { PlayerController obj = currentOwner; obj.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(obj.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); DivineAscentExpTracker = 0f; if ((Object)(object)NextFormWeapon == (Object)null) { ref Gun nextFormWeapon = ref NextFormWeapon; PickupObject byId = PickupObjectDatabase.GetById(VirtueForm2.ID); nextFormWeapon = (Gun)(object)((byId is Gun) ? byId : null); } if ((Object)(object)NextFormWeapon != (Object)null || (Object)(object)currentOwner != (Object)null) { HelpfulMethods.CustomNotification("Taste of Celestial Justice", "The unrighteous will burn!", AscensionIcon.GetComponent(), (NotificationColor)1); HelpfulMethods.PlayRandomSFX(((Component)base.gun).gameObject, VirtueAscensionSFXList); currentOwner.inventory.RemoveGunFromInventory(base.gun); PlayerControllerExt.GiveItem(currentOwner, "LOLItems:virtueform2"); } } } internal class VirtueForm1AmmoDisplay : CustomAmmoDisplay { private Gun _gun; private VirtueForm1 _virtueform1; private PlayerController _owner; private void Start() { _gun = ((Component)this).GetComponent(); _virtueform1 = ((Component)_gun).GetComponent(); ref PlayerController owner = ref _owner; GameActor currentOwner = _gun.CurrentOwner; owner = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); } public override bool DoCustomAmmoDisplay(GameUIAmmoController uic) { if (!Object.op_Implicit((Object)(object)_owner) || !Object.op_Implicit((Object)(object)_virtueform1)) { return false; } uic.GunAmmoCountLabel.Text = $"[color #35D3AC]EXP: {dfNumberExtensions.RoundToNearest(_virtueform1.DivineAscentExpTracker, 0f)} / {dfNumberExtensions.RoundToNearest(_virtueform1.DivineAscentThreshold, 0f)}[/color]\n{CustomAmmoDisplayExtensions.VanillaAmmoDisplay(_owner)}"; return true; } } internal class Whisper : AdvancedGunBehavior { public static string internalName = "Whisper"; public static int ID; public static string realName = "Whisper"; private static int ammoStat = 144; private static float reloadDuration = 2.5f; private static float fireRateStat = 1.3f; private static int spreadAngle = 0; private static float projectileDamageStat = 40f; private static float projectileSpeedStat = 70f; private static float projectileRangeStat = 20f; private static float projectileForceStat = 40f; private static float fourthShotDamageScale = 2f; private static float fourthShotMissingHealthScale = 0.25f; private static float clipSizeToDamageScale = 0.25f; private float currentFireRateMod; private static List normalFiringSFXList = new List { "whisper_fire_sfx_001", "whisper_fire_sfx_002", "whisper_fire_sfx_003" }; private static List thirdShotFiringSFXList = new List { "whisper_3rdshot_into_4thshot_walk_music_001", "whisper_3rdshot_into_4thshot_walk_music_002" }; private static List fourthShotFiringSFXList = new List { "whisper_4th_shot_fire_sfx_001", "whisper_4th_shot_fire_sfx_002" }; private int shotCounter; private bool idleAnimSwapped = false; public static void Add() { //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_01bf: 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_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //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_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_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_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_026d: 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_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06ff: 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_0787: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_07b7: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: 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_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_0829: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083c: 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_0848: Unknown result type (might be due to invalid IL or missing references) string text = "Whisper"; string text2 = "whisper"; internalName = "LOLItems:" + ETGMod.ToID(internalName); Gun val = Databases.Items.NewGun(text, text2); Game.Items.Rename("outdated_gun_mods:" + ETGMod.ToID(text), internalName); ((Component)val).gameObject.AddComponent(); GunExt.SetShortDescription((PickupObject)(object)val, "\"Art is worth the pain.\""); GunExt.SetLongDescription((PickupObject)(object)val, "Fire rate and clip size stat increases will increase damage instead. Fourth shot deals increased damage and deals %missing health damage.\n\nA strange yet artistic weapon once wielded by a psychopath serial killer. It's said that he believed murder to be art and used this gun as his paintbrush. He would go to great lengths to create elaborate scenes of artistic brutality and loved every second of it.\n"); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, text2 + "_idle_001", 8); GunExt.SetAnimationFPS(val, val.alternateIdleAnimation, 40); GunExt.SetAnimationFPS(val, val.shootAnimation, 15); GunExt.SetAnimationFPS(val, val.alternateShootAnimation, 18); GunExt.SetAnimationFPS(val, val.criticalFireAnimation, 15); GunExt.SetAnimationFPS(val, val.finalShootAnimation, 18); GunExt.SetAnimationFPS(val, val.reloadAnimation, 7); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects; PickupObject byId2 = PickupObjectDatabase.GetById(38); muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects; ref VFXPool finalMuzzleFlashEffects = ref val.finalMuzzleFlashEffects; PickupObject byId3 = PickupObjectDatabase.GetById(83); finalMuzzleFlashEffects = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects; val.gunSwitchGroup = "LOLItems_" + ETGMod.ToID(text); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])null); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("whisper_reload_sfx") }); SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_gun_finale_01", (SwitchedEvent[])null); val.DefaultModule.angleVariance = spreadAngle; val.DefaultModule.shootStyle = (ShootStyle)0; val.gunClass = (GunClass)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.DefaultModule.ammoCost = 1; val.reloadTime = reloadDuration; val.DefaultModule.cooldownTime = fireRateStat; val.DefaultModule.numberOfShotsInClip = 4; val.SetBaseMaxAmmo(ammoStat); val.gunHandedness = (GunHandedness)2; val.carryPixelOffset += new IntVector2(2, 2); val.carryPixelDownOffset += new IntVector2(0, 0); val.carryPixelUpOffset += new IntVector2(0, 0); Transform transform = ((Component)val.barrelOffset).transform; transform.localPosition += new Vector3(1.75f, 0.9375f); val.gunScreenShake.magnitude = 0.8f; val.CriticalDamageMultiplier = 1f; val.CanCriticalFire = false; val.CriticalChance = 0f; PickupObject byId4 = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId4 is Gun) ? byId4 : null)).DefaultModule.projectiles[0]); val.DefaultModule.projectiles[0] = val2; ref VFXPool deathAny = ref val2.hitEffects.deathAny; PickupObject byId5 = PickupObjectDatabase.GetById(86); deathAny = ((Gun)((byId5 is Gun) ? byId5 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; ref VFXPool deathEnemy = ref val2.hitEffects.deathEnemy; PickupObject byId6 = PickupObjectDatabase.GetById(86); deathEnemy = ((Gun)((byId6 is Gun) ? byId6 : null)).DefaultModule.projectiles[0].hitEffects.deathEnemy; ref VFXPool enemy = ref val2.hitEffects.enemy; PickupObject byId7 = PickupObjectDatabase.GetById(86); enemy = ((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0].hitEffects.enemy; ref VFXPool tileMapHorizontal = ref val2.hitEffects.tileMapHorizontal; PickupObject byId8 = PickupObjectDatabase.GetById(28); tileMapHorizontal = ((Gun)((byId8 is Gun) ? byId8 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical = ref val2.hitEffects.tileMapVertical; PickupObject byId9 = PickupObjectDatabase.GetById(28); tileMapVertical = ((Gun)((byId9 is Gun) ? byId9 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = projectileDamageStat; val2.baseData.speed = projectileSpeedStat; val2.baseData.range = projectileRangeStat; val2.baseData.force = projectileForceStat; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val2.shouldRotate = true; val2.ignoreDamageCaps = true; GunTools.SetProjectileSpriteRight(val2, "whisper_projectile_blue_001", 9, 5, true, (Anchor)4, (int?)7, (int?)3, true, false, (int?)null, (int?)null, (Projectile)null); Projectile val3 = Object.Instantiate(val.DefaultModule.projectiles[0]); ((Component)val3).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val3).gameObject); Object.DontDestroyOnLoad((Object)(object)val3); val3.baseData.damage = projectileDamageStat * fourthShotDamageScale; val3.baseData.speed = projectileSpeedStat * 1.25f; val3.baseData.range = projectileRangeStat; val3.baseData.force = projectileForceStat * fourthShotDamageScale; ((BraveBehaviour)val3).transform.parent = val.barrelOffset; val3.shouldRotate = true; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val3).gameObject); orAddComponent.penetration = 4; orAddComponent.penetratesBreakables = true; orAddComponent.preventPenetrationOfActors = true; GunTools.SetProjectileSpriteRight(val3, "whisper_projectile_pink_001", 9, 5, true, (Anchor)4, (int?)7, (int?)3, true, false, (int?)null, (int?)null, (Projectile)null); val3.AdditionalScaleMultiplier = 2f; ref VFXPool deathAny2 = ref val3.hitEffects.deathAny; PickupObject byId10 = PickupObjectDatabase.GetById(184); deathAny2 = ((Gun)((byId10 is Gun) ? byId10 : null)).DefaultModule.projectiles[0].hitEffects.deathAny; ref VFXPool deathEnemy2 = ref val3.hitEffects.deathEnemy; PickupObject byId11 = PickupObjectDatabase.GetById(519); deathEnemy2 = ((Gun)((byId11 is Gun) ? byId11 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; ref VFXPool enemy2 = ref val3.hitEffects.enemy; PickupObject byId12 = PickupObjectDatabase.GetById(519); enemy2 = ((Gun)((byId12 is Gun) ? byId12 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; ref VFXPool tileMapHorizontal2 = ref val3.hitEffects.tileMapHorizontal; PickupObject byId13 = PickupObjectDatabase.GetById(86); tileMapHorizontal2 = ((Gun)((byId13 is Gun) ? byId13 : null)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal; ref VFXPool tileMapVertical2 = ref val3.hitEffects.tileMapVertical; PickupObject byId14 = PickupObjectDatabase.GetById(86); tileMapVertical2 = ((Gun)((byId14 is Gun) ? byId14 : null)).DefaultModule.projectiles[0].hitEffects.tileMapVertical; val3.ignoreDamageCaps = true; val.DefaultModule.finalProjectile = val3; val.DefaultModule.numberOfFinalProjectiles = 1; val.DefaultModule.usesOptionalFinalProjectile = true; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("whisper_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/whisper_ammo_blue_001", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/whisper_ammo_empty_001"); val.DefaultModule.finalAmmoType = (AmmoType)14; val.DefaultModule.finalCustomAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("whisper_fourth_ammo", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/whisper_ammo_pink_001", "LOLItems/Resources/weapon_sprites/CustomGunAmmoTypes/whisper_ammo_empty_001"); ref GameObject shellCasing = ref val.shellCasing; PickupObject byId15 = PickupObjectDatabase.GetById(38); shellCasing = ((Gun)((byId15 is Gun) ? byId15 : null)).shellCasing; ref GameObject clipObject = ref val.clipObject; PickupObject byId16 = PickupObjectDatabase.GetById(38); clipObject = ((Gun)((byId16 is Gun) ? byId16 : null)).clipObject; val.shellsToLaunchOnFire = 1; val.shellsToLaunchOnReload = 0; val.clipsToLaunchOnReload = 0; val.reloadClipLaunchFrame = 0; EasyTrailBullet easyTrailBullet = ((Component)val2).gameObject.AddComponent(); easyTrailBullet.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet.StartWidth = 0.2f; easyTrailBullet.EndWidth = 0f; easyTrailBullet.LifeTime = 0.1f; easyTrailBullet.BaseColor = ExtendedColours.skyblue; easyTrailBullet.StartColor = Color.blue; easyTrailBullet.EndColor = Color.white; EasyTrailBullet easyTrailBullet2 = ((Component)val3).gameObject.AddComponent(); easyTrailBullet2.TrailPos = Vector2.op_Implicit(((BraveBehaviour)val2).transform.position); easyTrailBullet2.StartWidth = 0.3f; easyTrailBullet2.EndWidth = 0f; easyTrailBullet2.LifeTime = 0.1f; easyTrailBullet2.BaseColor = ExtendedColours.pink; easyTrailBullet2.StartColor = Color.red; easyTrailBullet2.EndColor = Color.white; ((PickupObject)val).quality = (ItemQuality)4; Databases.Items.Add((PickupObject)(object)val, false, "ANY"); ItemBuilder.AddToSubShop((PickupObject)(object)val, (ShopType)3, 1f); ID = ((PickupObject)val).PickupObjectId; InitRuntimePatches(); } public override void OnInitializedWithOwner(GameActor actor) { GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null); fireRateToDamage(base.gun, player); shotCounter = 1; ((AdvancedGunBehavior)this).OnInitializedWithOwner(actor); } public override void OnDropped() { if (idleAnimSwapped) { BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); idleAnimSwapped = !idleAnimSwapped; } ((AdvancedGunBehavior)this).OnDropped(); } public override void OnSwitchedToThisGun() { GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null); fireRateToDamage(base.gun, player); shotCounter = 5 - base.gun.ClipShotsRemaining; if (idleAnimSwapped) { BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); idleAnimSwapped = !idleAnimSwapped; } ((AdvancedGunBehavior)this).OnSwitchedToThisGun(); } public override void OnSwitchedAwayFromThisGun() { foreach (string thirdShotFiringSFX in thirdShotFiringSFXList) { AkSoundEngine.PostEvent(thirdShotFiringSFX + "_stop", ((Component)base.gun).gameObject); } ((AdvancedGunBehavior)this).OnSwitchedAwayFromThisGun(); } public override void OnAmmoChanged(PlayerController player, Gun gun) { ((AdvancedGunBehavior)this).OnAmmoChanged(player, gun); } public override void OnPostFired(PlayerController player, Gun gun) { switch (shotCounter) { case 1: HelpfulMethods.PlayRandomSFX(((Component)((GameActor)player).CurrentGun).gameObject, normalFiringSFXList); BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.alternateShootAnimation); break; case 2: HelpfulMethods.PlayRandomSFX(((Component)((GameActor)player).CurrentGun).gameObject, normalFiringSFXList); BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.alternateShootAnimation); BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.criticalFireAnimation); break; case 3: HelpfulMethods.PlayRandomSFX(((Component)((GameActor)player).CurrentGun).gameObject, thirdShotFiringSFXList); BraveUtility.Swap(ref base.gun.shootAnimation, ref base.gun.criticalFireAnimation); BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); idleAnimSwapped = !idleAnimSwapped; break; case 4: foreach (string thirdShotFiringSFX in thirdShotFiringSFXList) { AkSoundEngine.PostEvent(thirdShotFiringSFX + "_stop", ((Component)gun).gameObject); } HelpfulMethods.PlayRandomSFX(((Component)((GameActor)player).CurrentGun).gameObject, fourthShotFiringSFXList); BraveUtility.Swap(ref base.gun.idleAnimation, ref base.gun.alternateIdleAnimation); idleAnimSwapped = !idleAnimSwapped; break; default: Plugin.Log("something went wrong here LMAO"); HelpfulMethods.PlayRandomSFX(((Component)((GameActor)player).CurrentGun).gameObject, normalFiringSFXList); break; } shotCounter++; ((AdvancedGunBehavior)this).OnPostFired(player, gun); } public override void PostProcessProjectile(Projectile projectile) { GameActor owner = ((AdvancedGunBehavior)this).Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); float statValue = val.stats.GetStatValue((StatType)16); if (statValue > 1f) { ProjectileData baseData = projectile.baseData; baseData.damage *= 1f + (statValue - 1f) * clipSizeToDamageScale; } if (shotCounter == 4) { projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float num = 0.25f * (((BraveBehaviour)enemy).healthHaver.GetMaxHealth() - ((BraveBehaviour)enemy).healthHaver.GetCurrentHealth()); if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss) { num *= 0.25f; } ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num, Vector2.zero, "whisper_fourth_shot_missing_health_dmg", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, true); } }); } ((AdvancedGunBehavior)this).PostProcessProjectile(projectile); } public override void OnReload(PlayerController player, Gun gun) { fireRateToDamage(gun, player); switch (shotCounter) { case 2: BraveUtility.Swap(ref gun.shootAnimation, ref gun.alternateShootAnimation); break; case 3: BraveUtility.Swap(ref gun.shootAnimation, ref gun.criticalFireAnimation); break; } if (idleAnimSwapped) { BraveUtility.Swap(ref gun.idleAnimation, ref gun.alternateIdleAnimation); idleAnimSwapped = !idleAnimSwapped; } foreach (string thirdShotFiringSFX in thirdShotFiringSFXList) { AkSoundEngine.PostEvent(thirdShotFiringSFX + "_stop", ((Component)gun).gameObject); } shotCounter = 1; ((AdvancedGunBehavior)this).OnReload(player, gun); } private void fireRateToDamage(Gun gun, PlayerController player) { ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)1); ItemBuilder.RemoveCurrentGunStatModifier(gun, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); float statValue = player.stats.GetStatValue((StatType)1); if (statValue > 1f) { currentFireRateMod = 1f / statValue; ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)1, 1f / statValue, (ModifyMethod)1); ItemBuilder.AddCurrentGunStatModifier(gun, (StatType)5, statValue, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); } } public static void InitRuntimePatches() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown Harmony harmony = Plugin._Harmony; BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; harmony.Patch((MethodBase)typeof(ProjectileModule).GetMethod("GetModNumberOfShotsInClip", bindingAttr), (HarmonyMethod)null, new HarmonyMethod(typeof(WhisperGunPatch).GetMethod("_Postfix", bindingAttr)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } [HarmonyPatch] internal static class WhisperGunPatch { [HarmonyPatch(typeof(ProjectileModule), "GetModNumberOfShotsInClip")] [HarmonyPostfix] private static int _Postfix(int __result, ProjectileModule __instance, GameActor owner) { if ((Object)(object)owner != (Object)null && (Object)(object)owner.CurrentGun != (Object)null && owner is PlayerController && ((PickupObject)owner.CurrentGun).PickupObjectId == Whisper.ID) { return 4; } if (__instance.numberOfShotsInClip == 1) { return __instance.numberOfShotsInClip; } if ((Object)(object)owner != (Object)null && owner is PlayerController) { 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)__instance.numberOfShotsInClip * statValue * statValue2); if (num < 0) { return num; } return Mathf.Max(num, 1); } __result = __instance.numberOfShotsInClip; return __result; } } } namespace LOLItems.passive_items { internal class CloakOfStarryNight : OnPreDamagedPassiveItem { public static string ItemName = "Cloak of Starry Night"; private static float HealthStat = 1f; private static int ArmorStat = 0; private static float preDamageProcChance = 0.2f; private static float synergyProcChance = 0.3f; public bool HEAVENANDEARTHCOMBINEDActivated = false; public static int ID; 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_0045: 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) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/cloak_of_starry_night_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); CloakOfStarryNight cloakOfStarryNight = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Limitless as the Stars"; string text3 = "Sometimes prevents the player from taking damage.\n\nThis magical cloak imbues your body with great toughness and durability like that of a star.\n"; ItemBuilder.SetupItem((PickupObject)(object)cloakOfStarryNight, text2, text3, "LOLItems"); ((PickupObject)cloakOfStarryNight).quality = (ItemQuality)3; cloakOfStarryNight.procChance = preDamageProcChance; cloakOfStarryNight.triggersInvulnerability = true; cloakOfStarryNight.effectDuration = 1f; cloakOfStarryNight.triggersOutline = true; cloakOfStarryNight.triggersGlow = true; cloakOfStarryNight.outlineColor = new Color(96.6f, 30.1f, 158.2f); cloakOfStarryNight.playsSFX = true; string[] newSFXList = new string[1] { "carefree_melody_SFX" }; cloakOfStarryNight.updateSFXList(newSFXList); ItemBuilder.AddToSubShop((PickupObject)(object)cloakOfStarryNight, (ShopType)2, 1f); ID = ((PickupObject)cloakOfStarryNight).PickupObjectId; } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.HEAVEN_AND_EARTH_COMBINED) && !HEAVENANDEARTHCOMBINEDActivated) { procChance = synergyProcChance; foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems) { if (((PickupObject)passiveItem).PickupObjectId == ShieldOfMoltenStone.ID && (Object)(object)passiveItem != (Object)null) { ((Component)passiveItem).GetComponent().setProcChance(synergyProcChance); } } HEAVENANDEARTHCOMBINEDActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.HEAVEN_AND_EARTH_COMBINED) && HEAVENANDEARTHCOMBINEDActivated) { procChance = preDamageProcChance; foreach (PassiveItem passiveItem2 in ((PassiveItem)this).Owner.passiveItems) { if (((PickupObject)passiveItem2).PickupObjectId == ShieldOfMoltenStone.ID && (Object)(object)passiveItem2 != (Object)null) { ((Component)passiveItem2).GetComponent().setProcChance(preDamageProcChance); } } HEAVENANDEARTHCOMBINEDActivated = false; } } ((PassiveItem)this).Update(); } } internal class Cull : PassiveItem { public static string ItemName = "Cull"; private static int ReapKillThreshold = 5; private static int ReapCountMax = 200; private int ReapMoney = 1; private static int ReapCountMaxMoney = 30; private bool ReapCountMaxReached = false; private int ReapCount = 0; public bool WEAKEARLYGAMEActivated = false; public bool BAUSENLAWActivated = false; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/cull_pixelart_sprite"; GameObject val = new GameObject(itemName); Cull cull = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"full clearing\""; string text3 = "Drops an extra casing every few kills. After enough kills, drops a one time lump sum of casings.\n\nA simple worn-out scythe used by many to farm crops. Farming enemies seems more efficient now.\n"; ItemBuilder.SetupItem((PickupObject)(object)cull, text2, text3, "LOLItems"); ((PickupObject)cull).quality = (ItemQuality)1; ((PickupObject)cull).UsesCustomCost = false; ID = ((PickupObject)cull).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.OnAnyEnemyReceivedDamage = (Action)Delegate.Combine(player.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(player.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.WEAK_EARLY_GAME) && !WEAKEARLYGAMEActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1.1f, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); WEAKEARLYGAMEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.WEAK_EARLY_GAME) && WEAKEARLYGAMEActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); WEAKEARLYGAMEActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.BAUSEN_LAW) && !BAUSENLAWActivated) { ReapMoney = 3; BAUSENLAWActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.BAUSEN_LAW) && BAUSENLAWActivated) { ReapMoney = 1; BAUSENLAWActivated = false; } } ((PassiveItem)this).Update(); } private void KillEnemyCount(float damage, bool fatal, HealthHaver enemy) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null && Object.op_Implicit((Object)(object)enemy) && fatal) { ReapCount++; if (ReapCount % ReapKillThreshold == 0) { LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, ReapMoney, false); } if (ReapCount >= ReapCountMax && !ReapCountMaxReached) { LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, ReapCountMaxMoney, false); ReapCountMaxReached = true; } } } } public class EnemyTheBombTracker { public float storedDamage; public Coroutine timerCoroutine; public GameObject activeVFXObject; public EnemyTheBombTracker(float dmg, Coroutine corou, GameObject obj) { storedDamage = dmg; timerCoroutine = corou; activeVFXObject = obj; } } internal class DetonationOrb : PassiveItem { [CompilerGenerated] private sealed class d__21 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AIActor enemyActor; public DetonationOrb <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(TheBombDuration); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.DetonateTheBomb(enemyActor); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Detonation Orb"; private static float DamageStat = 1.2f; private static float TheBombDmgScale = 0.25f; private static float TheBombDuration = 3f; public bool LIFEANDDEATHActivated = false; private static float LIFEANDDEATHTheBombDmgScaleInc = 0.15f; public bool OVERCHARGEDActivated = false; private static float OVERCHARGEDTheBombDmgScaleInc = 0.2f; private Dictionary enemyTheBombTrackerList = new Dictionary(); private static List IdleVFXSpritePath = "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_idle".GetResourceFrames(40); private static GameObject IdleEffectVFX; private static List ExplodeVFXSpritePath = new List { "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_001", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_002", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_003", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_004", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_005", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_006", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_007", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_008", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_009", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_010", "LOLItems/Resources/vfxs/detOrb_effect/detOrbFX_explode_011" }; private static GameObject ExplodeEffectVFX; public static Vector3 vfxOffset = new Vector3(-0.0625f, 0.375f, 0f); public static int ID; 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_0051: 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_0092: 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_00c7: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/detonation_orb_pixelart_sprite"; GameObject val = new GameObject(itemName); DetonationOrb detonationOrb = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Bites the Dust"; string text3 = "Dealing damage to an enemy stores some of that damage. Damage accumulates with more damage and detonates after 3 seconds of no damage. Will immediately detonate if stored damage is enough to kill.\n\nA magical orb imbued with the power of a lightning spark. Any who are harmed by its wielder will be subject to further damage from lightning."; ItemBuilder.SetupItem((PickupObject)(object)detonationOrb, text2, text3, "LOLItems"); IdleEffectVFX = VFXBuilder.CreateVFX("the_bomb_idle_vfx", IdleVFXSpritePath, 16, new IntVector2(0, 0), (Anchor)4, false, 0f, 1.5f, (Color?)Color.blue, (WrapMode)0, true); VFXAnchorModule orAddComponent = GameObjectExtensions.GetOrAddComponent(IdleEffectVFX); ExplodeEffectVFX = VFXBuilder.CreateVFX("the_bomb_explode_vfx", ExplodeVFXSpritePath, 16, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)2, false); VFXAnchorModule orAddComponent2 = GameObjectExtensions.GetOrAddComponent(ExplodeEffectVFX); ((PickupObject)detonationOrb).quality = (ItemQuality)3; ID = ((PickupObject)detonationOrb).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } if (enemyTheBombTrackerList != null) { enemyTheBombTrackerList.Clear(); } Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.LIFE_AND_DEATH) && !LIFEANDDEATHActivated) { TheBombDmgScale += LIFEANDDEATHTheBombDmgScaleInc; LIFEANDDEATHActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.LIFE_AND_DEATH) && LIFEANDDEATHActivated) { TheBombDmgScale -= LIFEANDDEATHTheBombDmgScaleInc; LIFEANDDEATHActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.OVERCHARGED) && !OVERCHARGEDActivated) { TheBombDmgScale += OVERCHARGEDTheBombDmgScaleInc; OVERCHARGEDActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.OVERCHARGED) && OVERCHARGEDActivated) { TheBombDmgScale -= OVERCHARGEDTheBombDmgScaleInc; OVERCHARGEDActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //IL_00e6: 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) //IL_00ff: 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_014d: 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_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) if ((Object)(object)hitRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)hitRigidbody).GetComponentInParent(); } if (!((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) || !((BraveBehaviour)hitRigidbody).healthHaver.IsAlive) { return; } float num = beam.Gun.DefaultModule.projectiles[0].baseData.damage * TheBombDmgScale * tickrate; if (((BraveBehaviour)hitRigidbody).healthHaver.IsBoss || ((BraveBehaviour)hitRigidbody).healthHaver.IsSubboss) { } if (!enemyTheBombTrackerList.ContainsKey(val)) { GameObject val2 = Object.Instantiate(IdleEffectVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)val).specRigidbody.UnitBottomCenter, 0f) + vfxOffset, Quaternion.identity); tk2dSprite component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { } val2.GetComponent().anchorAIActor = val; val2.GetComponent().offset = vfxOffset + new Vector3(0f, ((BraveBehaviour)val).specRigidbody.HitboxPixelCollider.UnitDimensions.y); enemyTheBombTrackerList.Add(val, new EnemyTheBombTracker(num, null, val2)); if ((Object)(object)((Component)((BraveBehaviour)val).healthHaver).gameObject.GetComponent() == (Object)null) { HealthHaverOnPreDeathActionModule healthHaverOnPreDeathActionModule = new HealthHaverOnPreDeathActionModule(); healthHaverOnPreDeathActionModule.targetAIActor = val; healthHaverOnPreDeathActionModule.explosionVFX = ExplodeEffectVFX; healthHaverOnPreDeathActionModule.vfxOffset = vfxOffset; healthHaverOnPreDeathActionModule.theBombTracker = enemyTheBombTrackerList[val]; SpriteBuilder.AddComponent(((Component)((BraveBehaviour)val).healthHaver).gameObject, healthHaverOnPreDeathActionModule); } AkSoundEngine.PostEvent("detOrb_SFX_loop_002", ((Component)val).gameObject); } else { enemyTheBombTrackerList[val].storedDamage += num; } if (enemyTheBombTrackerList[val].storedDamage >= ((BraveBehaviour)val).healthHaver.GetCurrentHealth()) { if (enemyTheBombTrackerList[val].timerCoroutine != null) { ((MonoBehaviour)val).StopCoroutine(enemyTheBombTrackerList[val].timerCoroutine); } DetonateTheBomb(val); } else { if (enemyTheBombTrackerList[val].timerCoroutine != null) { ((MonoBehaviour)val).StopCoroutine(enemyTheBombTrackerList[val].timerCoroutine); } enemyTheBombTrackerList[val].timerCoroutine = ((MonoBehaviour)val).StartCoroutine(TheBombCooldown(val)); } } private void OnPostProcessProjectile(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_0125: 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) //IL_013e: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null)) { AIActor val = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { val = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemy).GetComponentInParent(); } if (fatal && enemyTheBombTrackerList.ContainsKey(val)) { if (enemyTheBombTrackerList[val].timerCoroutine != null) { ((MonoBehaviour)val).StopCoroutine(enemyTheBombTrackerList[val].timerCoroutine); } DetonateTheBomb(val); } if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null && ((BraveBehaviour)enemy).healthHaver.IsAlive) { float num = projHit.baseData.damage * TheBombDmgScale; if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss) { } if (!enemyTheBombTrackerList.ContainsKey(val)) { GameObject val2 = Object.Instantiate(IdleEffectVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)val).specRigidbody.UnitBottomCenter, 0f) + vfxOffset, Quaternion.identity); tk2dSprite component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { } val2.GetComponent().anchorAIActor = val; val2.GetComponent().offset = vfxOffset + new Vector3(0f, ((BraveBehaviour)val).specRigidbody.HitboxPixelCollider.UnitDimensions.y); enemyTheBombTrackerList.Add(val, new EnemyTheBombTracker(num, null, val2)); if ((Object)(object)((Component)((BraveBehaviour)val).healthHaver).gameObject.GetComponent() == (Object)null) { HealthHaverOnPreDeathActionModule healthHaverOnPreDeathActionModule = new HealthHaverOnPreDeathActionModule { targetAIActor = val, explosionVFX = ExplodeEffectVFX, vfxOffset = vfxOffset, theBombTracker = enemyTheBombTrackerList[val] }; SpriteBuilder.AddComponent(((Component)((BraveBehaviour)val).healthHaver).gameObject, healthHaverOnPreDeathActionModule); } AkSoundEngine.PostEvent("detOrb_SFX_loop_002", ((Component)val).gameObject); } else { enemyTheBombTrackerList[val].storedDamage += num; } if (enemyTheBombTrackerList[val].storedDamage >= ((BraveBehaviour)val).healthHaver.GetCurrentHealth()) { if (enemyTheBombTrackerList[val].timerCoroutine != null) { ((MonoBehaviour)val).StopCoroutine(enemyTheBombTrackerList[val].timerCoroutine); } DetonateTheBomb(val); } else { if (enemyTheBombTrackerList[val].timerCoroutine != null) { ((MonoBehaviour)val).StopCoroutine(enemyTheBombTrackerList[val].timerCoroutine); } enemyTheBombTrackerList[val].timerCoroutine = ((MonoBehaviour)val).StartCoroutine(TheBombCooldown(val)); } } } }); } private IEnumerator TheBombCooldown(AIActor enemyActor) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { <>4__this = this, enemyActor = enemyActor }; } private void DetonateTheBomb(AIActor enemyActor) { //IL_0030: 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_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_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_00a0: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent("detOrb_SFX_loop_002_stop", ((Component)enemyActor).gameObject); if (((BraveBehaviour)enemyActor).healthHaver.IsAlive) { Object.Instantiate(ExplodeEffectVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)enemyActor).specRigidbody.UnitBottomCenter, 0f) + vfxOffset + new Vector3(0f, ((BraveBehaviour)enemyActor).specRigidbody.HitboxPixelCollider.UnitDimensions.y), Quaternion.identity); AkSoundEngine.PostEvent("detOrb_SFX_explosion_001", ((Component)enemyActor).gameObject); ((BraveBehaviour)enemyActor).healthHaver.ApplyDamage(enemyTheBombTrackerList[enemyActor].storedDamage, Vector2.zero, "the_bomb_detonation_damage", (CoreDamageTypes)0, (DamageCategory)0, true, (PixelCollider)null, true); } if (enemyTheBombTrackerList[enemyActor].timerCoroutine != null) { ((MonoBehaviour)enemyActor).StopCoroutine(enemyTheBombTrackerList[enemyActor].timerCoroutine); } if ((Object)(object)enemyTheBombTrackerList[enemyActor].activeVFXObject != (Object)null) { Object.Destroy((Object)(object)enemyTheBombTrackerList[enemyActor].activeVFXObject); } enemyTheBombTrackerList.Remove(enemyActor); } } internal class DivineSunderer : SpellbladePassiveItem { public static string ItemName = "Divine Sunderer"; private static float spellbladeDmg = 15f; private static float spellbladeCooldown = 3f; private static string spellbladeDamageIdentifier = "divine_sunderer_force_spellblade_damage"; private static float HealthStat = 1f; public static int ID; 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_0053: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/divine_sunderer_pixelart_sprite"; GameObject val = new GameObject(itemName); DivineSunderer divineSunderer = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Bigger = Fall-er?"; string text3 = "Grants Spellblade every few seconds. Spellblade: Empowers next bullet with additional damage and % max health damage.\n\nA two handed axe that once belonged to an immortal jackal-headed Ascended. Using this tool, he oversaw the growth of his kingdom and laid judgement once it fell into despair. Afterwards, he laid down his weapon and simply left. No one knows where he is.\n"; ItemBuilder.SetupItem((PickupObject)(object)divineSunderer, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)divineSunderer, (StatType)3, HealthStat, (ModifyMethod)0); ((PickupObject)divineSunderer).quality = (ItemQuality)3; divineSunderer.activationDmgValue = spellbladeDmg; divineSunderer.activationCooldownValue = spellbladeCooldown; divineSunderer.damageIdentifier = spellbladeDamageIdentifier; divineSunderer.activationDealsPercentDamage = true; divineSunderer.percentDamageRatio = 0.2f; ID = ((PickupObject)divineSunderer).PickupObjectId; } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { base.DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } } internal class EssenceReaver : SpellbladePassiveItem { public static string ItemName = "Essence Reaver"; private static float spellbladeDmg = 15f; private static float spellbladeCooldown = 3f; private static string spellbladeDamageIdentifier = "essence_reaver_spellblade_damage"; private static float ammoRestorePercent = 0.01f; private static float DamageStat = 1.15f; public static int ID; 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_0053: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/essence_reaver_pixelart_sprite"; GameObject val = new GameObject(itemName); EssenceReaver essenceReaver = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "reaves essence"; string text3 = "Increase damage\nGrants Spellblade every few seconds. Spellblade: Empowers next bullet with additional damage scaling with your stats. Restores a small amount of ammo each time spellblade is used.\n\nThis magical reaver is made of self-forming ice, like Sheen. However, the higher quality magic imbued in the weapon overflows when the blade shatters, restoring slight amounts of ammunition to your weapons before reforming the blade.\n"; ItemBuilder.SetupItem((PickupObject)(object)essenceReaver, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)essenceReaver, (StatType)5, DamageStat, (ModifyMethod)1); ((PickupObject)essenceReaver).quality = (ItemQuality)4; essenceReaver.activationDmgValue = spellbladeDmg; essenceReaver.activationCooldownValue = spellbladeCooldown; essenceReaver.damageIdentifier = spellbladeDamageIdentifier; essenceReaver.baseDamageScalesWithPlayerStats = true; essenceReaver.damageStatScaleRatio = 1f; ID = ((PickupObject)essenceReaver).PickupObjectId; } public void Start() { OnSpellbladeProc = (Action)Delegate.Combine(OnSpellbladeProc, new Action(SpellbladeAmmoRestore)); } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { base.DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } private static void SpellbladeAmmoRestore(PlayerController player) { Gun currentGun = player.inventory.CurrentGun; if (!currentGun.InfiniteAmmo && currentGun.CanGainAmmo) { int num = Mathf.CeilToInt((float)currentGun.AdjustedMaxAmmo * ammoRestorePercent); Plugin.Log($"ammo to gain: {num}"); currentGun.GainAmmo(num); } } } internal class FatedAshes : PassiveItem { public static string ItemName = "Fated Ashes"; private static float InflameDamagePerSecond = 3f; private static float InflameDuration = 3f; private static Gun phoenix; private static GameActorFireEffect InflameBurnEffect; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/fated_ashes_pixelart_sprite"; GameObject val = new GameObject(itemName); FatedAshes fatedAshes = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "It's getting warm..."; string text3 = "Dealing damage burns enemies.\n\nA vase storing the ashes of the guilty. Their guilt marks their fate for hell and, in turn, causes their ashes to burn up occasionally.\n"; ItemBuilder.SetupItem((PickupObject)(object)fatedAshes, text2, text3, "LOLItems"); ((PickupObject)fatedAshes).quality = (ItemQuality)1; ((PickupObject)fatedAshes).UsesCustomCost = true; ((PickupObject)fatedAshes).CustomCost = 20; ItemBuilder.AddToSubShop((PickupObject)(object)fatedAshes, (ShopType)0, 1f); ID = ((PickupObject)fatedAshes).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } } public override void Update() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((PassiveItem)this).Owner != (Object)null && ((PassiveItem)this).Owner.HasSynergy(Synergy.BUILDS_INTO_LIANDRYS_TORMENT)) { ((PassiveItem)this).Owner.RemovePassiveItem(ID); LootEngine.SpawnCurrency(((BraveBehaviour)((PassiveItem)this).Owner).specRigidbody.UnitCenter, ((PickupObject)this).PurchasePrice, false); } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(Projectile proj, float f) { proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null) && !((Object)(object)((BraveBehaviour)enemy).healthHaver == (Object)null)) { if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)enemy).aiActor).ApplyEffect((GameActorEffect)(object)InflameBurnEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null) { ((GameActor)((Component)enemy).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)InflameBurnEffect, 1f, (Projectile)null); } } }); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { if (!((Object)(object)hitRigidbody == (Object)null) && !((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver == (Object)null)) { if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)hitRigidbody).aiActor).ApplyEffect((GameActorEffect)(object)InflameBurnEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null) { ((GameActor)((Component)hitRigidbody).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)InflameBurnEffect, 1f, (Projectile)null); } } } static FatedAshes() { //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_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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown PickupObject byId = PickupObjectDatabase.GetById(384); phoenix = (Gun)(object)((byId is Gun) ? byId : null); InflameBurnEffect = new GameActorFireEffect { duration = InflameDuration, DamagePerSecondToEnemies = InflameDamagePerSecond, effectIdentifier = "inflame_burn", ignitesGoops = false, FlameVfx = phoenix.DefaultModule.projectiles[0].fireEffect.FlameVfx }; } } internal class LichBane : SpellbladePassiveItem { public static string ItemName = "Lich Bane"; private static float spellbladeDmg = 40f; private static float spellbladeCooldown = 3f; private static string spellbladeDamageIdentifier = "lich_bane_spellblade_damage"; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/lich_bane_pixelart_sprite"; GameObject val = new GameObject(itemName); LichBane lichBane = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "lich's bane"; string text3 = "Grants Spellblade every few seconds. Spellblade: Empowers next bullet with extreme additional damage.\n\nA petricite blade bathed in the blood of liches. The lingering magicks of the liches clings to the blade, desperate to continue inflicting harm upon anyone who is unfortunate enough to be on the receiving end. The dark magicks that infest this blade are extremely effective against the magic obsessed: granting it the name \"Lich Bane\"\n"; ItemBuilder.SetupItem((PickupObject)(object)lichBane, text2, text3, "LOLItems"); ((PickupObject)lichBane).quality = (ItemQuality)5; lichBane.activationDmgValue = spellbladeDmg; lichBane.activationCooldownValue = spellbladeCooldown; lichBane.damageIdentifier = spellbladeDamageIdentifier; ID = ((PickupObject)lichBane).PickupObjectId; } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { base.DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } } internal class Sheen : SpellbladePassiveItem { public static string ItemName = "Sheen"; private static float spellbladeDmg = 10f; private static float spellbladeCooldown = 3f; private static string spellbladeDamageIdentifier = "sheen_spellblade_damage"; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/sheen_pixelart_sprite"; GameObject val = new GameObject(itemName); Sheen sheen = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "who makes a sword out of ice?"; string text3 = "Grants Spellblade every few seconds. Spellblade: Empowers next bullet with some additional damage.\n\nA sword made out of ice... It's been magically enchanted to mend itself when shattered, but since it's made of ice, it always shatters...\n"; ItemBuilder.SetupItem((PickupObject)(object)sheen, text2, text3, "LOLItems"); ((PickupObject)sheen).quality = (ItemQuality)1; sheen.activationDmgValue = spellbladeDmg; sheen.activationCooldownValue = spellbladeCooldown; sheen.damageIdentifier = spellbladeDamageIdentifier; ((PickupObject)sheen).UsesCustomCost = true; ((PickupObject)sheen).CustomCost = 20; ID = ((PickupObject)sheen).PickupObjectId; } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { base.DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void Update() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((PassiveItem)this).Owner != (Object)null && (((PassiveItem)this).Owner.HasSynergy(Synergy.BUILDS_INTO_TRINITY_FORCE) || ((PassiveItem)this).Owner.HasSynergy(Synergy.BUILDS_INTO_DIVINE_SUNDERER) || ((PassiveItem)this).Owner.HasSynergy(Synergy.BUILDS_INTO_ESSENCE_REAVER) || ((PassiveItem)this).Owner.HasSynergy(Synergy.BUILDS_INTO_LICH_BANE))) { ((PassiveItem)this).Owner.RemovePassiveItem(ID); LootEngine.SpawnCurrency(((BraveBehaviour)((PassiveItem)this).Owner).specRigidbody.UnitCenter, ((PickupObject)this).PurchasePrice, false); } base.Update(); } } internal class ShieldOfMoltenStone : OnPreDamagedPassiveItem { public static string ItemName = "Shield of Molten Stone"; private static float HealthStat = 1f; private static int ArmorStat = 0; private static float preDamageProcChance = 0.2f; private static float synergyProcChance = 0.3f; public static int ID; 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_0045: 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_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) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/shield_of_molten_stone_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); ShieldOfMoltenStone shieldOfMoltenStone = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Immovable as the Earth"; string text3 = "Sometimes prevents the player from taking damage.\n\nThis magical shield imbues your body with heavy defense and resilience like that of the earth.\n"; ItemBuilder.SetupItem((PickupObject)(object)shieldOfMoltenStone, text2, text3, "LOLItems"); ((PickupObject)shieldOfMoltenStone).quality = (ItemQuality)3; shieldOfMoltenStone.procChance = preDamageProcChance; shieldOfMoltenStone.triggersInvulnerability = true; shieldOfMoltenStone.effectDuration = 1f; shieldOfMoltenStone.triggersOutline = true; shieldOfMoltenStone.triggersGlow = true; shieldOfMoltenStone.outlineColor = new Color(96.6f, 30.1f, 158.2f); shieldOfMoltenStone.outlineColor = new Color(124.6f, 23.8f, 23.8f); shieldOfMoltenStone.playsSFX = true; string[] newSFXList = new string[1] { "carefree_melody_SFX" }; shieldOfMoltenStone.updateSFXList(newSFXList); ItemBuilder.AddToSubShop((PickupObject)(object)shieldOfMoltenStone, (ShopType)2, 1f); ID = ((PickupObject)shieldOfMoltenStone).PickupObjectId; } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); if (!player.HasSynergy(Synergy.HEAVEN_AND_EARTH_COMBINED)) { procChance = preDamageProcChance; } } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } } internal class Collector : PassiveItem { public static string ItemName = "The Collector"; private static float DamageStat = 1.1f; private static int DeathGoldStat = 1; private static float DeathGoldChance = 0.3f; private static float ExecuteThreshold = 0.15f; public bool RETURNONINVESTMENTActivated = false; private static int RETURNONINVESTMENTDeathGoldStat = 2; public bool STROKEOFLUCKActivated = false; private static int STROKEOFLUCKGoldMultiplier = 2; public bool ANOFFERINGActivated = false; private static int ANOFFERINGGoldMultiplier = 3; public bool BETTERRNGActivated = false; private static float BETTERRNGDeathGoldChance = 0.75f; public static int ID; 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_0053: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/the_collector_pixelart_sprite"; GameObject val = new GameObject(itemName); Collector collector = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"death and taxes\""; string text3 = "Increase damage\nBullets execute enemies at low health. Each kill has a chance to give an extra casing.\n\nA weapon that once belonged to a legendary pirate. It now rests in your hands and lends you a desire for gold. An orange sounds good right about now.\n"; ItemBuilder.SetupItem((PickupObject)(object)collector, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)collector, (StatType)5, DamageStat, (ModifyMethod)1); ((PickupObject)collector).quality = (ItemQuality)4; ItemBuilder.AddToSubShop((PickupObject)(object)collector, (ShopType)3, 1f); ID = ((PickupObject)collector).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; player.OnKilledEnemyContext += DeathGoldDrop; player.OnUsedPlayerItem += DarumaGoldDrop; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; player.OnKilledEnemyContext -= DeathGoldDrop; player.OnUsedPlayerItem -= DarumaGoldDrop; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.RETURN_ON_INVESTMENT) && !RETURNONINVESTMENTActivated) { DeathGoldStat = RETURNONINVESTMENTDeathGoldStat; RETURNONINVESTMENTActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.RETURN_ON_INVESTMENT) && RETURNONINVESTMENTActivated) { DeathGoldStat = 1; RETURNONINVESTMENTActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.BETTER_RNG) && !BETTERRNGActivated) { DeathGoldChance = BETTERRNGDeathGoldChance; BETTERRNGActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.BETTER_RNG) && BETTERRNGActivated) { DeathGoldChance = 0.3f; BETTERRNGActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hitRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)hitRigidbody).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) { float currentHealthPercentage = ((BraveBehaviour)val).healthHaver.GetCurrentHealthPercentage(); if (currentHealthPercentage <= ExecuteThreshold) { ((BraveBehaviour)val).healthHaver.ApplyDamage(((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetMaxHealth(), Vector2.zero, "the_collector_death_execute", (CoreDamageTypes)0, (DamageCategory)5, false, (PixelCollider)null, false); } } } private void OnPostProcessProjectile(Projectile proj, float f) { proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && !((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) && !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float currentHealthPercentage = ((BraveBehaviour)enemy).healthHaver.GetCurrentHealthPercentage(); if (currentHealthPercentage <= ExecuteThreshold) { ((BraveBehaviour)enemy).healthHaver.ApplyDamage(((BraveBehaviour)enemy).healthHaver.GetMaxHealth(), Vector2.zero, "the_collector_death_execute", (CoreDamageTypes)0, (DamageCategory)5, false, (PixelCollider)null, false); } } }); } private void DeathGoldDrop(PlayerController player, HealthHaver enemy) { ((BraveBehaviour)enemy).healthHaver.OnDeath += delegate { //IL_015f: 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_00b6: 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) if (player.HasSynergy(Synergy.STROKE_OF_LUCK)) { foreach (PlayerItem activeItem in player.activeItems) { if (((PickupObject)activeItem).PickupObjectId == 105 && (Object)(object)activeItem != (Object)null && activeItem.IsCurrentlyActive) { if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss) { LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, STROKEOFLUCKGoldMultiplier * DeathGoldStat * 10, false); } else { LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, STROKEOFLUCKGoldMultiplier * DeathGoldStat, false); } return; } } } if (Random.value < DeathGoldChance) { if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss) { LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, DeathGoldStat * 10, false); } else { LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, DeathGoldStat, false); } } }; } private void DarumaGoldDrop(PlayerController player, PlayerItem item) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player != (Object)null && (Object)(object)item != (Object)null && ((PassiveItem)this).Owner.HasSynergy(Synergy.AN_OFFERING) && ((PickupObject)item).PickupObjectId == 643 && Random.value < DeathGoldChance) { LootEngine.SpawnCurrency(((BraveBehaviour)((PassiveItem)this).Owner).specRigidbody.UnitCenter, ANOFFERINGGoldMultiplier * DeathGoldStat, false); } } } internal class FrozenHeart : AuraItem { public static string ItemName = "Frozen Heart LOLItems"; private static int ArmorStat = 1; private static float WintersCaressCrippleRatio = 0.7f; private static float WintersCaressRange = 8f; public bool ICETOTHECOREActivated = false; public bool FROZENBULLETSActivated = false; public static int ID; private static GameActorCrippleEffect WintersCaressCrippleEffect = new GameActorCrippleEffect { duration = 1f, effectIdentifier = "frozen_heart_cripple_effect", resistanceType = (EffectResistanceType)3, AppliesTint = true, TintColor = ExtendedColours.skyblue, CrippleAmount = WintersCaressCrippleRatio }; 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_0066: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/frozen_heart_pixelart_sprite"; GameObject val = new GameObject(itemName); FrozenHeart frozenHeart = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Warning: Do not thaw!"; string text3 = "+1 Armor\nDecreases nearby enemies' fire rate.\n\nEmits a chilling air that causes those nearby to have cold hands. It might just be a disguised AC unit. They keep complaining that they would've killed you if it weren't for their cold hands.\n"; ItemBuilder.SetupItem((PickupObject)(object)frozenHeart, text2, text3, "LOLItems"); ((PassiveItem)frozenHeart).ArmorToGainOnInitialPickup = ArmorStat; ((AuraItem)frozenHeart).AuraRadius = WintersCaressRange; ((AuraItem)frozenHeart).DamagePerSecond = 0f; ((PickupObject)frozenHeart).quality = (ItemQuality)3; GunExt.SetName((PickupObject)(object)frozenHeart, "Frozen Heart"); ID = ((PickupObject)frozenHeart).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_TO_THE_CORE) && !ICETOTHECOREActivated) { WintersCaressCrippleEffect.CrippleAmount = 1f - (1f - WintersCaressCrippleRatio) * 1.5f; ICETOTHECOREActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_TO_THE_CORE) && ICETOTHECOREActivated) { WintersCaressCrippleEffect.CrippleAmount = WintersCaressCrippleRatio; ICETOTHECOREActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.FROZEN_BULLETS) && !FROZENBULLETSActivated) { ((PassiveItem)this).Owner.PostProcessProjectile += OnPostProcessProjectile; FROZENBULLETSActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.FROZEN_BULLETS) && FROZENBULLETSActivated) { ((PassiveItem)this).Owner.PostProcessProjectile -= OnPostProcessProjectile; FROZENBULLETSActivated = false; } } ((AuraItem)this).Update(); } public override void DoAura() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.m_extantAuraVFX == (Object)null) { } base.didDamageEnemies = false; if (base.AuraAction == null) { base.AuraAction = delegate(AIActor actor, float dist) { ((GameActor)actor).ApplyEffect((GameActorEffect)(object)WintersCaressCrippleEffect, 1f, (Projectile)null); }; } if ((Object)(object)((PassiveItem)this).m_owner != (Object)null && ((PassiveItem)this).m_owner.CurrentRoom != null) { ((PassiveItem)this).m_owner.CurrentRoom.ApplyActionToNearbyEnemies(((GameActor)((PassiveItem)this).m_owner).CenterPosition, ((AuraItem)this).ModifiedAuraRadius, base.AuraAction); } if (base.didDamageEnemies) { ((PassiveItem)this).m_owner.DidUnstealthyAction(); } } private void OnPostProcessProjectile(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null)) { if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)enemy).aiActor).ApplyEffect((GameActorEffect)(object)WintersCaressCrippleEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null) { ((GameActor)((Component)enemy).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)WintersCaressCrippleEffect, 1f, (Projectile)null); } } }); } } internal class HorizonFocus : PassiveItem { public static string ItemName = "Horizon Focus"; private static float DamageStat = 1.1f; private static float HyperShotMaxDistance = 15f; private static float HyperShotMinDistance = 3f; private static float HyperShotMaxDamageInc = 0.5f; public bool AMPLIFIEDLENSActivated = false; private static float AMPLIFIEDLENSHyperShotMaxDamageInc = 0.25f; public bool FUTURISTICCOMPATIBILITYActivated = false; private static float FUTURISTICCOMPATIBILITYHyperShotMaxDamageInc = 0.5f; public bool GUARANTEEDHITIFITHITSActivated = false; private static float GUARANTEEDHITIFITHITSHyperShotMaxDamageInc = 0.75f; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/horizon_focus_pixelart_sprite"; GameObject val = new GameObject(itemName); HorizonFocus horizonFocus = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*not camping btw*"; string text3 = "Bullets deal increased damage the farther away you are from the target.\n\nA futuristic gauntlet that seems to improve your aim at far ranges, allowing your long range attacks to deal increased damage. There seems to be a signature: Ja-c- -nd Vi--or\n"; ItemBuilder.SetupItem((PickupObject)(object)horizonFocus, text2, text3, "LOLItems"); ((PickupObject)horizonFocus).quality = (ItemQuality)4; ID = ((PickupObject)horizonFocus).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.AMPLIFIED_LENS) && !AMPLIFIEDLENSActivated) { HyperShotMaxDamageInc += AMPLIFIEDLENSHyperShotMaxDamageInc; AMPLIFIEDLENSActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.AMPLIFIED_LENS) && AMPLIFIEDLENSActivated) { HyperShotMaxDamageInc -= AMPLIFIEDLENSHyperShotMaxDamageInc; AMPLIFIEDLENSActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.FUTURISTIC_COMPATIBILITY) && !FUTURISTICCOMPATIBILITYActivated) { HyperShotMaxDamageInc += FUTURISTICCOMPATIBILITYHyperShotMaxDamageInc; FUTURISTICCOMPATIBILITYActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.FUTURISTIC_COMPATIBILITY) && FUTURISTICCOMPATIBILITYActivated) { HyperShotMaxDamageInc -= FUTURISTICCOMPATIBILITYHyperShotMaxDamageInc; FUTURISTICCOMPATIBILITYActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.GUARANTEED_HIT_IF_IT_HITS) && !GUARANTEEDHITIFITHITSActivated) { HyperShotMaxDamageInc += GUARANTEEDHITIFITHITSHyperShotMaxDamageInc; GUARANTEEDHITIFITHITSActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.GUARANTEED_HIT_IF_IT_HITS) && GUARANTEEDHITIFITHITSActivated) { HyperShotMaxDamageInc -= GUARANTEEDHITIFITHITSHyperShotMaxDamageInc; GUARANTEEDHITIFITHITSActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //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_00a8: 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 ((Object)(object)hitRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)hitRigidbody).GetComponentInParent(); } if (!((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) || !Object.op_Implicit((Object)(object)beam)) { return; } GameActor owner = beam.Owner; PlayerController val2 = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (val2 != null) { float num = Vector2.Distance(Vector2.op_Implicit(((BraveBehaviour)val2).transform.position), Vector2.op_Implicit(((BraveBehaviour)val).transform.position)); if (!(num <= HyperShotMinDistance)) { float num2 = Mathf.Min(num, HyperShotMaxDistance) / HyperShotMaxDistance * HyperShotMaxDamageInc; float num3 = ((BraveBehaviour)beam).projectile.baseData.damage * num2 * tickrate; ((BraveBehaviour)val).healthHaver.ApplyDamage(num3, Vector2.zero, "horizon_focus_hypershot_amp", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } private void OnPostProcessProjectile(Projectile proj, float f) { if (!Object.op_Implicit((Object)(object)proj)) { return; } GameActor owner = proj.Owner; PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (player == null) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //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_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_00bb: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float num = Vector2.Distance(Vector2.op_Implicit(((BraveBehaviour)player).transform.position), Vector2.op_Implicit(((BraveBehaviour)projHit).transform.position)); if (!(num <= HyperShotMinDistance)) { float num2 = Mathf.Min(num, HyperShotMaxDistance) / HyperShotMaxDistance * HyperShotMaxDamageInc; float num3 = projHit.baseData.damage * num2; ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num3, Vector2.zero, "horizon_focus_hypershot_amp", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } }); } } public class Muramana : PassiveItem { public static string ItemName = "Muramana"; private static float DamageStat = 1.2f; private static float ClipAndAmmoIncrease = 1.5f; private static float MuramanaShockBaseDamage = 5f; private static float MuramanaShockScale = 0.5f; public bool BLADEOFTHEONIActivated = false; private static float BLADEOFTHEONIDamageStat = 1.5f; public bool ITHASTOBETHISWAYActivated = false; private static float ITHASTOBETHISWAYClipAndAmmoIncrease = 2f; public bool JETSTREAMSAMActivated = false; private static float JETSTREAMSAMMovementSpeedInc = 2f; private static float JETSTREAMSAMMuramanaShockBaseDamageInc = 5f; private static List MuramanaSparkVFXSpritePath = new List { "LOLItems/Resources/one_off_sprites/muramana_spark_sprites/4" }; private static GameObject MuramanaSparkVFX; private GameObject activeVFXObject; public static int ID; 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_0072: 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_00a7: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/muramana_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); Muramana muramana = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "The Peak of Swordsmithing"; string text3 = "Increase damage, max ammo, and clip size\nEvery bullet deals additional damage. This damage increases based on your max ammo multiplier and clip size multiplier.\n\nA blade forged by Masamune and wielded by the worthy, the Manamune's true power has been unlocked and empowers your every attack.\n"; ItemBuilder.SetupItem((PickupObject)(object)muramana, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)muramana, (StatType)5, DamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)muramana, (StatType)16, ClipAndAmmoIncrease, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)muramana, (StatType)9, ClipAndAmmoIncrease, (ModifyMethod)1); ((PickupObject)muramana).quality = (ItemQuality)(-100); ((PickupObject)muramana).ShouldBeExcludedFromShops = true; ID = ((PickupObject)muramana).PickupObjectId; MuramanaSparkVFX = VFXBuilder.CreateVFX("muramana_spark_vfx", MuramanaSparkVFXSpritePath, 4, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); activeVFXObject = PlayVFXEffectOnHand(player.primaryHand); player.GunChanged += VFXLogic; player.PostProcessProjectile += MuramanaShock; player.PostProcessBeamTick += MuramanaShock; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } if ((Object)(object)player != (Object)null) { player.GunChanged -= VFXLogic; player.PostProcessProjectile -= MuramanaShock; player.PostProcessBeamTick -= MuramanaShock; } } private void VFXLogic(Gun previous, Gun current, bool newGun) { //IL_0007: 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_0037: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Invalid comparison between Unknown and I4 //IL_00a3: 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) Plugin.Log($"thing happen | current gun: {current.gunHandedness}"); if (!((Object)(object)current != (Object)null)) { return; } if ((int)current.gunHandedness == 3 || (int)current.gunHandedness == 4) { if ((Object)(object)activeVFXObject != (Object)null) { Plugin.Log($"destroy vfx | current gun: {current.gunHandedness}"); Object.Destroy((Object)(object)activeVFXObject); } } else if ((Object)(object)activeVFXObject == (Object)null) { Plugin.Log($"restore vfx | current gun: {current.gunHandedness}"); activeVFXObject = PlayVFXEffectOnHand(((PassiveItem)this).Owner.primaryHand); } } public static GameObject PlayVFXEffectOnHand(PlayerHandController hand) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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_007a: 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_008f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, 0f, -2f); GameObject val2 = Object.Instantiate(MuramanaSparkVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)hand).sprite.WorldCenter, 0f) + val, Quaternion.identity); tk2dSprite component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -2f; ((tk2dBaseSprite)component).UpdateZDepth(); } VFXAnchorOnHandModule vFXAnchorOnHandModule = val2.AddComponent(); vFXAnchorOnHandModule.hand = hand; vFXAnchorOnHandModule.offset = val + new Vector3(0f, 0f); return val2; } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.BLADE_OF_THE_ONI_MURAMANA) && !BLADEOFTHEONIActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, BLADEOFTHEONIDamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); BLADEOFTHEONIActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.BLADE_OF_THE_ONI_MURAMANA) && BLADEOFTHEONIActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, DamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); BLADEOFTHEONIActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.IT_HAS_TO_BE_THIS_WAY) && !ITHASTOBETHISWAYActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, ITHASTOBETHISWAYClipAndAmmoIncrease, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, ITHASTOBETHISWAYClipAndAmmoIncrease, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); ITHASTOBETHISWAYActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.IT_HAS_TO_BE_THIS_WAY) && ITHASTOBETHISWAYActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, ClipAndAmmoIncrease, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, ClipAndAmmoIncrease, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); ITHASTOBETHISWAYActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.JETSTREAM_SAM) && !JETSTREAMSAMActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)0, JETSTREAMSAMMovementSpeedInc, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); MuramanaShockBaseDamage += JETSTREAMSAMMuramanaShockBaseDamageInc; JETSTREAMSAMActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.JETSTREAM_SAM) && JETSTREAMSAMActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); MuramanaShockBaseDamage = 5f; JETSTREAMSAMActivated = false; } } ((PassiveItem)this).Update(); } private void MuramanaShock(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //IL_011f: Unknown result type (might be due to invalid IL or missing references) GameActor owner = beam.Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (val == null) { return; } Gun currentGun = ((GameActor)val).CurrentGun; if (currentGun == null || (Object)(object)hitRigidbody == (Object)null) { return; } AIActor val2 = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val2 = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val2 = ((Component)hitRigidbody).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) { float num = Mathf.Max(0f, (val.stats.GetStatValue((StatType)16) - 1f) * MuramanaShockScale); float num2 = Mathf.Max(0f, (val.stats.GetStatValue((StatType)9) - 1f) * MuramanaShockScale); float num3 = Mathf.Max(1f, 1f + num + num2); float num4 = Mathf.Max(1f, MuramanaShockBaseDamage * num3) * tickrate; ((BraveBehaviour)val2).healthHaver.ApplyDamage(num4, Vector2.zero, "muramana_shock_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } private void MuramanaShock(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } GameActor owner = proj.Owner; PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (player == null) { return; } Gun currentGun = ((GameActor)player).CurrentGun; if (currentGun == null) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float num = Mathf.Max(0f, (player.stats.GetStatValue((StatType)16) - 1f) * MuramanaShockScale); float num2 = Mathf.Max(0f, (player.stats.GetStatValue((StatType)9) - 1f) * MuramanaShockScale); float num3 = Mathf.Max(1f, 1f + num + num2); float num4 = Mathf.Max(1f, MuramanaShockBaseDamage * num3); ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num4, Vector2.zero, "muramana_shock_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } }); } } internal class MuramanaSynergyActivation : PassiveItem { public static int ID; 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_0046: Unknown result type (might be due to invalid IL or missing references) string text = "Manaflow Fully Stacked"; string text2 = "LOLItems/Resources/black_dot"; GameObject val = new GameObject(text); MuramanaSynergyActivation muramanaSynergyActivation = val.AddComponent(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = " "; string text4 = " "; ItemBuilder.SetupItem((PickupObject)(object)muramanaSynergyActivation, text3, text4, "LOLItems"); ((PickupObject)muramanaSynergyActivation).quality = (ItemQuality)(-100); ID = ((PickupObject)muramanaSynergyActivation).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } } internal class NavoriQuickblades : PassiveItem { public static string ItemName = "Navori Quickblades"; private static float RateOfFireStat = 1.1f; private static float TranscendenceCooldownReductionRatio = 0.03f; public bool SPONSOREDBYNAVORIActivated = false; private static float SPONSOREDBYNAVORIDamageStat = 1.15f; public bool QUICKBLADESANDQUICKBULLETSActivated = false; private static float QUICKBLADESANDQUICKBULLETSRateOfFireStatInc = 0.15f; public bool LIGHTSLINGERActivated = false; private static float LIGHTSLINGERTranscendenceCooldownReductionRatioInc = 0.05f; public static int ID; 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_0053: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/navori_quickblades_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); NavoriQuickblades navoriQuickblades = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"random !^@$*#%& go!\""; string text3 = "Increase fire rate\nEvery bullet decreases your active item cooldowns by %remaining cooldown.\n\nA set of knives that magically come back after they land. Somehow there's always at least one in your hand. You wonder what would happen if you threw them all at once but you never do.\n"; ItemBuilder.SetupItem((PickupObject)(object)navoriQuickblades, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)navoriQuickblades, (StatType)1, RateOfFireStat, (ModifyMethod)1); ((PickupObject)navoriQuickblades).quality = (ItemQuality)3; ID = ((PickupObject)navoriQuickblades).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.SPONSORED_BY_NAVORI) && !SPONSOREDBYNAVORIActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, SPONSOREDBYNAVORIDamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); SPONSOREDBYNAVORIActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.SPONSORED_BY_NAVORI) && SPONSOREDBYNAVORIActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); SPONSOREDBYNAVORIActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.QUICKBLADES_AND_QUICKBULLETS) && !QUICKBLADESANDQUICKBULLETSActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)1, RateOfFireStat + QUICKBLADESANDQUICKBULLETSRateOfFireStatInc, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); QUICKBLADESANDQUICKBULLETSActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.QUICKBLADES_AND_QUICKBULLETS) && QUICKBLADESANDQUICKBULLETSActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)1, RateOfFireStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); QUICKBLADESANDQUICKBULLETSActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.LIGHTSLINGER) && !LIGHTSLINGERActivated) { TranscendenceCooldownReductionRatio += LIGHTSLINGERTranscendenceCooldownReductionRatioInc; LIGHTSLINGERActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.LIGHTSLINGER) && LIGHTSLINGERActivated) { TranscendenceCooldownReductionRatio = 0.03f; LIGHTSLINGERActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { if ((Object)(object)((PassiveItem)this).Owner.CurrentItem == (Object)null || (Object)(object)hitRigidbody == (Object)null || ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor == (Object)null && (Object)(object)((Component)hitRigidbody).GetComponentInParent() == (Object)null) || !((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null)) { return; } PlayerController owner = ((PassiveItem)this).Owner; if (!owner.CurrentItem.IsCurrentlyActive) { if (owner.CurrentItem.CurrentDamageCooldown > 0f) { float currentDamageCooldown = owner.CurrentItem.CurrentDamageCooldown; float currentDamageCooldown2 = currentDamageCooldown * (1f - TranscendenceCooldownReductionRatio * tickrate); owner.CurrentItem.CurrentDamageCooldown = currentDamageCooldown2; } else if (owner.CurrentItem.CurrentTimeCooldown > 0f) { float currentTimeCooldown = owner.CurrentItem.CurrentTimeCooldown; float currentTimeCooldown2 = currentTimeCooldown * (1f - TranscendenceCooldownReductionRatio * tickrate); owner.CurrentItem.CurrentTimeCooldown = currentTimeCooldown2; } } } private void OnPostProcessProjectile(Projectile proj, float f) { if ((Object)(object)((PassiveItem)this).Owner.CurrentItem == (Object)null || !((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { PlayerController owner = ((PassiveItem)this).Owner; if (!owner.CurrentItem.IsCurrentlyActive) { if (owner.CurrentItem.CurrentDamageCooldown > 0f) { float currentDamageCooldown = owner.CurrentItem.CurrentDamageCooldown; float currentDamageCooldown2 = currentDamageCooldown * (1f - TranscendenceCooldownReductionRatio); owner.CurrentItem.CurrentDamageCooldown = currentDamageCooldown2; } else if (owner.CurrentItem.CurrentTimeCooldown > 0f) { float currentTimeCooldown = owner.CurrentItem.CurrentTimeCooldown; float currentTimeCooldown2 = currentTimeCooldown * (1f - TranscendenceCooldownReductionRatio); owner.CurrentItem.CurrentTimeCooldown = currentTimeCooldown2; } } } }); } } internal class Puppeteer : PassiveItem { [CompilerGenerated] private sealed class d__21 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public Puppeteer <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isOnCooldown = true; <>2__current = (object)new WaitForSeconds(PullTheirStringsCooldown); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.isOnCooldown = false; <>4__this.enemyCharmStacks.Clear(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Puppeteer"; private static float RateOfFireStat = 1.15f; private static float PullTheirStringsCharmDuration = 999f; private static float PullTheirStringsMaxStacks = 4f; private static float PullTheirStringsCooldown = 25f; private bool isOnCooldown = false; private Dictionary enemyCharmStacks = new Dictionary(); private static GameActorCharmEffect CharmEffect; public bool PLUS25CHARMActivated = false; private static float PLUS25CHARMPullTheirStringsMaxStacks; private static float PLUS25CHARMPullTheirStringsCooldown; public bool CHARMINGREINVIGORATIONActivated = false; private Coroutine itemCooldownCoroutine; public static int ID; 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_0062: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/puppeteer_pixelart_sprite"; GameObject val = new GameObject(itemName); Puppeteer puppeteer = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "dance, boy, dance!"; string text3 = "Increase fire rate\nEvery bullet applies a stack to enemies hit. Once any enemy reaches max stacks, charms them. Goes on a cooldown.\n\nA marionette glove without its marionette. It allows you to control enemies but fills you with an uneasy feeling. You could swear there's a creepy laugh in the gungeon's corridors now.\n"; ItemBuilder.SetupItem((PickupObject)(object)puppeteer, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)puppeteer, (StatType)1, RateOfFireStat, (ModifyMethod)1); ((GameActorEffect)CharmEffect).duration = PullTheirStringsCharmDuration; ((PickupObject)puppeteer).quality = (ItemQuality)3; ID = ((PickupObject)puppeteer).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; player.OnUsedPlayerItem += OnCharmHornUsed; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; player.OnUsedPlayerItem -= OnCharmHornUsed; } if (enemyCharmStacks != null) { enemyCharmStacks.Clear(); } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.PLUS25_CHARM) && !PLUS25CHARMActivated) { PullTheirStringsMaxStacks = PLUS25CHARMPullTheirStringsMaxStacks; PullTheirStringsCooldown = PLUS25CHARMPullTheirStringsCooldown; PLUS25CHARMActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.PLUS25_CHARM) && PLUS25CHARMActivated) { PullTheirStringsMaxStacks = 4f; PullTheirStringsCooldown = 25f; PLUS25CHARMActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { if (isOnCooldown || (Object)(object)hitRigidbody == (Object)null || ((GameActor)((BraveBehaviour)hitRigidbody).aiActor).GetEffect(((GameActorEffect)CharmEffect).effectIdentifier) != null || !((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)) { return; } PlayerController owner = ((PassiveItem)this).Owner; AIActor aiActor = ((BraveBehaviour)hitRigidbody).aiActor; if (Random.value <= 0.05f) { if (!enemyCharmStacks.ContainsKey(aiActor)) { enemyCharmStacks.Add(aiActor, 1); } else { enemyCharmStacks[aiActor]++; } if ((float)enemyCharmStacks[aiActor] >= PullTheirStringsMaxStacks) { enemyCharmStacks.Clear(); ((GameActor)aiActor).ApplyEffect((GameActorEffect)(object)CharmEffect, 1f, (Projectile)null); itemCooldownCoroutine = ((MonoBehaviour)this).StartCoroutine(StartPullTheirStringsCooldown(owner)); } } } private void OnPostProcessProjectile(Projectile proj, float f) { if (isOnCooldown || !((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile proj, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null) && ((GameActor)((BraveBehaviour)enemy).aiActor).GetEffect(((GameActorEffect)CharmEffect).effectIdentifier) == null && (Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { PlayerController owner = ((PassiveItem)this).Owner; AIActor aiActor = ((BraveBehaviour)enemy).aiActor; if (!enemyCharmStacks.ContainsKey(aiActor)) { enemyCharmStacks.Add(aiActor, 1); } else { enemyCharmStacks[aiActor]++; } if ((float)enemyCharmStacks[aiActor] >= PullTheirStringsMaxStacks) { enemyCharmStacks.Clear(); ((GameActor)aiActor).ApplyEffect((GameActorEffect)(object)CharmEffect, 1f, (Projectile)null); itemCooldownCoroutine = ((MonoBehaviour)this).StartCoroutine(StartPullTheirStringsCooldown(owner)); } } }); } private void OnCharmHornUsed(PlayerController player, PlayerItem item) { if ((Object)(object)player != (Object)null && (Object)(object)item != (Object)null && ((PassiveItem)this).Owner.HasSynergy(Synergy.CHARMING_REINVIGORATION) && ((PickupObject)item).PickupObjectId == 206) { ((MonoBehaviour)this).StopCoroutine(itemCooldownCoroutine); enemyCharmStacks.Clear(); isOnCooldown = false; } } private IEnumerator StartPullTheirStringsCooldown(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { <>4__this = this, player = player }; } static Puppeteer() { PickupObject byId = PickupObjectDatabase.GetById(527); CharmEffect = ((BulletStatusEffectItem)((byId is BulletStatusEffectItem) ? byId : null)).CharmModifierEffect; PLUS25CHARMPullTheirStringsMaxStacks = 3f; PLUS25CHARMPullTheirStringsCooldown = 15f; } } internal class RodOfAges : PassiveItem { [CompilerGenerated] private sealed class d__21 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public RodOfAges <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; goto IL_008e; case 2: { <>1__state = -1; goto IL_008e; } IL_008e: ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)9); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)16); <>4__this.TimelessStackCount++; if (<>4__this.SUPERTRAININGActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)<>4__this.TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)9, 1f + TimelessIncrementValue * (float)<>4__this.TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)16, 1f + TimelessIncrementValue * (float)<>4__this.TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); } else { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)<>4__this.TimelessStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)9, 1f + TimelessIncrementValue * (float)<>4__this.TimelessStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)16, 1f + TimelessIncrementValue * (float)<>4__this.TimelessStackCount, (ModifyMethod)1); } VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); break; } if ((float)<>4__this.TimelessStackCount * TimelessIncrementValue < TimelessIncreaseMax) { if (player.HasSynergy(Synergy.SUPER_TRAINING)) { <>2__current = (object)new WaitForSeconds(TimelessIncrementTimeInterval / 2f); <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(TimelessIncrementTimeInterval); <>1__state = 2; return true; } if (!<>4__this.EternityActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)3, TimelessMaxStackHealthIncrease, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); ((BraveBehaviour)player).healthHaver.ApplyHealing(1f); HelpfulMethods.CustomNotification("Achieved Eternity!", "", ((BraveBehaviour)<>4__this).sprite, (NotificationColor)2); player.OnReceivedDamage += <>4__this.EternityEffect; <>4__this.EternityActivated = true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Rod of Ages"; private static float TimelessDamageIncreaseMax = 0.3f; private static float TimelessDamageIncrementValue = 0.02f; private static float TimelessIncreaseMax = 0.75f; private static float TimelessIncrementValue = 0.05f; private static float TimelessIncrementTimeInterval = 120f; private int TimelessStackCount = 0; private static float TimelessMaxStackHealthIncrease = 1f; private Coroutine TimelessStackTrackerCoroutine; private bool EternityActivated = false; private static float EternityAmmoRestorePercent = 0.25f; public bool SUPERTRAININGActivated = false; private static float SUPERTRAININGTimelessStackMultiplier = 2f; public bool AGEOLDWISDOMActivated = false; public bool ARCANEMASTERYActivated = false; private static float ARCANEMASTERYMovementSpeedStat = 1f; public static int ID; 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_005e: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/rod_of_ages_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); RodOfAges rodOfAges = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Power through wisdom"; string text3 = $"Gains a stack every {TimelessIncrementTimeInterval} seconds. Each stack increases max ammo, clip size, and damage a little. " + "At max stacks, gain an extra heart and taking damage restores some ammo.\n\nA staff once wielded by a legendary sorcerer, said to have achieved immortality and still lives on to this day. The vast knowledge within this tool takes ages to fully grasp.\n"; ItemBuilder.SetupItem((PickupObject)(object)rodOfAges, text2, text3, "LOLItems"); ((PickupObject)rodOfAges).quality = (ItemQuality)3; ItemBuilder.AddToSubShop((PickupObject)(object)rodOfAges, (ShopType)2, 1f); ID = ((PickupObject)rodOfAges).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); TimelessStackTrackerCoroutine = ((MonoBehaviour)this).StartCoroutine(TimelessStackingTracker(player)); } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null && TimelessStackTrackerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(TimelessStackTrackerCoroutine); } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.SUPER_TRAINING) && !SUPERTRAININGActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + TimelessIncrementValue * (float)TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + TimelessIncrementValue * (float)TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); SUPERTRAININGActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.SUPER_TRAINING) && SUPERTRAININGActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)TimelessStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + TimelessIncrementValue * (float)TimelessStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + TimelessIncrementValue * (float)TimelessStackCount, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); SUPERTRAININGActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.AGE_OLD_WISDOM) && !AGEOLDWISDOMActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + TimelessDamageIncreaseMax, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); AGEOLDWISDOMActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.AGE_OLD_WISDOM) && AGEOLDWISDOMActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); AGEOLDWISDOMActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.ARCANE_MASTERY) && !ARCANEMASTERYActivated) { if (TimelessStackTrackerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(TimelessStackTrackerCoroutine); } TimelessStackCount = 15; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); if (SUPERTRAININGActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + TimelessIncrementValue * (float)TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + TimelessIncrementValue * (float)TimelessStackCount * SUPERTRAININGTimelessStackMultiplier, (ModifyMethod)1); } else { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)TimelessStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + TimelessIncrementValue * (float)TimelessStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + TimelessIncrementValue * (float)TimelessStackCount, (ModifyMethod)1); } if (!EternityActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)3, TimelessMaxStackHealthIncrease, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.ApplyHealing(1f); HelpfulMethods.CustomNotification("Achieved Eternity!", "", ((BraveBehaviour)this).sprite, (NotificationColor)2); ((PassiveItem)this).Owner.OnReceivedDamage += EternityEffect; EternityActivated = true; } ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)0, ARCANEMASTERYMovementSpeedStat, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); ARCANEMASTERYActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ARCANE_MASTERY) && ARCANEMASTERYActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); ARCANEMASTERYActivated = false; } } ((PassiveItem)this).Update(); } private IEnumerator TimelessStackingTracker(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { <>4__this = this, player = player }; } private void EternityEffect(PlayerController source) { for (int i = 0; i < source.inventory.AllGuns.Count; i++) { Gun val = source.inventory.AllGuns[i]; if (!val.InfiniteAmmo && val.CanGainAmmo) { int num = Mathf.CeilToInt((float)val.AdjustedMaxAmmo * EternityAmmoRestorePercent); if (source.HasSynergy(Synergy.AGE_OLD_WISDOM)) { num *= 2; } val.GainAmmo(num); } } } } internal class RylaisCrystalScepter : PassiveItem { public static string ItemName = "Rylai's Crystal Scepter"; private static float HealthStat = 1f; private static float RimefrostSlowPercent = 0.7f; private static float RimefrostSlowDuration = 3.5f; private static GameActorSpeedEffect slowEffect = new GameActorSpeedEffect { duration = RimefrostSlowDuration, effectIdentifier = "rimefrost_slow", resistanceType = (EffectResistanceType)0, AppliesOutlineTint = true, OutlineTintColor = Color.cyan, SpeedMultiplier = RimefrostSlowPercent }; public bool ICEIIActivated = false; private static float ICEIIRimefrostSlowPercent = 0.4f; public bool WITCHCRAFTActivated = false; private static float WITCHCRAFTDamageStat = 1.1f; private static float WITCHCRAFTRimefrostSlowDurationMultiplier = 2f; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/rylais_crystal_scepter_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); RylaisCrystalScepter rylaisCrystalScepter = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "A Cold One"; string text3 = "+1 Heart\nDealing damage slows enemies hit.\n\nA magic scepter with a bright blue crystal. The crystal is freezing to the touch, but you kinda don't care. Things start to feel less important as you hold this scepter.\n"; ItemBuilder.SetupItem((PickupObject)(object)rylaisCrystalScepter, text2, text3, "LOLItems"); ((PickupObject)rylaisCrystalScepter).quality = (ItemQuality)2; ItemBuilder.AddToSubShop((PickupObject)(object)rylaisCrystalScepter, (ShopType)2, 1f); ID = ((PickupObject)rylaisCrystalScepter).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += ApplyRimefrostEffect; player.PostProcessBeamTick += ApplyRimefrostEffect; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= ApplyRimefrostEffect; player.PostProcessBeamTick -= ApplyRimefrostEffect; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_II) && !ICEIIActivated) { slowEffect.SpeedMultiplier = ICEIIRimefrostSlowPercent; ICEIIActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_II) && ICEIIActivated) { slowEffect.SpeedMultiplier = RimefrostSlowPercent; ICEIIActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.WITCHCRAFT) && !WITCHCRAFTActivated) { ((GameActorEffect)slowEffect).duration = RimefrostSlowDuration * WITCHCRAFTRimefrostSlowDurationMultiplier; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, WITCHCRAFTDamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); WITCHCRAFTActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.WITCHCRAFT) && WITCHCRAFTActivated) { ((GameActorEffect)slowEffect).duration = RimefrostSlowDuration; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); WITCHCRAFTActivated = false; } } ((PassiveItem)this).Update(); } private void ApplyRimefrostEffect(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { if (!((Object)(object)hitRigidbody == (Object)null) && !((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver == (Object)null)) { if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)hitRigidbody).aiActor).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null) { ((GameActor)((Component)hitRigidbody).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); } } } private void ApplyRimefrostEffect(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null) && !((Object)(object)((BraveBehaviour)enemy).healthHaver == (Object)null)) { if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)enemy).aiActor).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null) { ((GameActor)((Component)enemy).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); } } }); } } internal class Shadowflame : PassiveItem { public static string ItemName = "Shadowflame"; private static float DamageStat = 1.15f; private static float CinderbloomThreshold = 0.5f; private static float CinderbloomDamageAmp = 0.5f; public bool HELLSSHADOWSActivated = false; private static float HELLSSHADOWSCinderbloomDamageAmpInc = 0.25f; public bool SOLARFLAMEActivated = false; private static float SOLARFLAMECinderbloomThresholdInc = 0.25f; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/shadowflame_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); Shadowflame shadowflame = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*hiring janitors*"; string text3 = "Deal increased damage to low health enemies.\n\nA magical necklace that empowers you to finish off targets quicker. You begin to feel like you like a character called \"Shadow\"? This cannot be good\n"; ItemBuilder.SetupItem((PickupObject)(object)shadowflame, text2, text3, "LOLItems"); ((PickupObject)shadowflame).quality = (ItemQuality)4; ItemBuilder.AddToSubShop((PickupObject)(object)shadowflame, (ShopType)2, 1f); ID = ((PickupObject)shadowflame).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.HELLS_SHADOWS) && !HELLSSHADOWSActivated) { CinderbloomDamageAmp += HELLSSHADOWSCinderbloomDamageAmpInc; HELLSSHADOWSActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.HELLS_SHADOWS) && HELLSSHADOWSActivated) { CinderbloomDamageAmp = 0.4f; HELLSSHADOWSActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.SOLAR_FLAME) && !SOLARFLAMEActivated) { CinderbloomThreshold += SOLARFLAMECinderbloomThresholdInc; SOLARFLAMEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.SOLAR_FLAME) && SOLARFLAMEActivated) { CinderbloomThreshold = 0.4f; SOLARFLAMEActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hitRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)hitRigidbody).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) { float currentHealthPercentage = ((BraveBehaviour)val).healthHaver.GetCurrentHealthPercentage(); if (currentHealthPercentage <= CinderbloomThreshold) { float num = ((BraveBehaviour)beam).projectile.baseData.damage * CinderbloomDamageAmp * tickrate; ((BraveBehaviour)val).healthHaver.ApplyDamage(num, Vector2.zero, "shadowflame_low_health_crit_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } private void OnPostProcessProjectile(Projectile proj, float f) { proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float currentHealthPercentage = ((BraveBehaviour)enemy).healthHaver.GetCurrentHealthPercentage(); if (currentHealthPercentage <= CinderbloomThreshold) { float num = projHit.baseData.damage * CinderbloomDamageAmp; ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num, Vector2.zero, "shadowflame_low_health_crit_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } }); } } internal class SilverBolts : PassiveItem { public static string ItemName = "Silver Bolts"; private int silverBoltsCount = 0; private static float silverBoltsPercentHealthDamage = 0.15f; private static float silverBoltsBaseDamage = 5f; private AIActor lastHitEnemy; private static List sfxList = new List { "silverbolts_sfx_001", "silverbolts_sfx_002", "silverbolts_sfx_003", "silverbolts_sfx_004" }; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/silver_bolts_vfx/ring_inner_001" }; private static GameObject EffectVFX; private static List SecondVFXSpritePath = new List { "LOLItems/Resources/vfxs/silver_bolts_vfx/ring_double_001" }; private static GameObject SecondEffectVFX; private GameObject activeVFXObject; public static Vector3 vfxOffset = new Vector3(0f, 0.125f, 0f); public bool EXTRASILVERActivated = false; private static float EXTRASILVERsilverBoltsPercentHealthDamageInc = 0.1f; public bool THENIGHTHUNTERActivated = false; public static int ID; 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_0045: 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_0073: 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_00e4: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/silver_bolts_pixelart_sprite"; GameObject val = new GameObject(itemName); SilverBolts silverBolts = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"Purge with silver.\""; string text3 = "Every 3rd bullet deals additional max health damage.\n\nCrossbow bolts tipped with baptized silver. Despite their small size, these bolts are said to purge demons back into hell. Thankfully the hell enemies are condemned to is different from Bullet Hell.\n"; ItemBuilder.SetupItem((PickupObject)(object)silverBolts, text2, text3, "LOLItems"); ((PickupObject)silverBolts).quality = (ItemQuality)2; ID = ((PickupObject)silverBolts).PickupObjectId; EffectVFX = VFXBuilder.CreateVFX("silver_bolts_ring_inner", VFXSpritePath, 1, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); tk2dSprite component = EffectVFX.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -50f; ((tk2dBaseSprite)component).UpdateZDepth(); } VFXAnchorModule orAddComponent = GameObjectExtensions.GetOrAddComponent(EffectVFX); SecondEffectVFX = VFXBuilder.CreateVFX("silver_bolts_ring_double", SecondVFXSpritePath, 1, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); component = SecondEffectVFX.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -50f; ((tk2dBaseSprite)component).UpdateZDepth(); } VFXAnchorModule orAddComponent2 = GameObjectExtensions.GetOrAddComponent(SecondEffectVFX); } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.EXTRA_SILVER) && !EXTRASILVERActivated) { silverBoltsPercentHealthDamage += EXTRASILVERsilverBoltsPercentHealthDamageInc; EXTRASILVERActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.EXTRA_SILVER) && EXTRASILVERActivated) { silverBoltsPercentHealthDamage -= EXTRASILVERsilverBoltsPercentHealthDamageInc; EXTRASILVERActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.THE_NIGHT_HUNTER) && !THENIGHTHUNTERActivated) { THENIGHTHUNTERActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.THE_NIGHT_HUNTER) && THENIGHTHUNTERActivated) { THENIGHTHUNTERActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_0175: 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_01a6: 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_01e9: 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) //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_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_0245: 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_0276: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null)) { AIActor val = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { val = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemy).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null && ((BraveBehaviour)enemy).healthHaver.IsAlive) { if ((Object)(object)val != (Object)(object)lastHitEnemy) { silverBoltsCount = 0; lastHitEnemy = val; } if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } if (THENIGHTHUNTERActivated) { silverBoltsCount += 2; } else { silverBoltsCount++; } int num = silverBoltsCount; int num2 = num; if (num2 < 3) { switch (num2) { case 1: { activeVFXObject = Object.Instantiate(EffectVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)val).specRigidbody.UnitBottomCenter, 0f) + vfxOffset, Quaternion.identity); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -10f; ((tk2dBaseSprite)component).UpdateZDepth(); tk2dSprite obj2 = component; ((tk2dBaseSprite)obj2).scale = ((tk2dBaseSprite)obj2).scale * Mathf.Max(1f, 1f + (((BraveBehaviour)val).specRigidbody.UnitDimensions.x - 1f) / 2f); } activeVFXObject.GetComponent().anchorAIActor = val; activeVFXObject.GetComponent().offset = vfxOffset; break; } case 2: { activeVFXObject = Object.Instantiate(SecondEffectVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)val).specRigidbody.UnitBottomCenter, 0f) + vfxOffset, Quaternion.identity); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -10f; ((tk2dBaseSprite)component).UpdateZDepth(); tk2dSprite obj = component; ((tk2dBaseSprite)obj).scale = ((tk2dBaseSprite)obj).scale * Mathf.Max(1f, 1f + (((BraveBehaviour)val).specRigidbody.UnitDimensions.x - 1f) / 2f); } activeVFXObject.GetComponent().anchorAIActor = val; activeVFXObject.GetComponent().offset = vfxOffset; break; } } } else { HelpfulMethods.PlayRandomSFX(((Component)val).gameObject, sfxList); float num3 = ((BraveBehaviour)enemy).healthHaver.GetMaxHealth() * silverBoltsPercentHealthDamage + silverBoltsBaseDamage; if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss) { num3 *= 0.25f; } ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num3, Vector2.zero, "silver_bolts_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, true); silverBoltsCount = 0; } } } }); } } internal class SunfireAegis : AuraItem { public static string ItemName = "Sunfire Aegis"; private static float HealthStat = 1f; private static int ArmorStat = 1; private static float ImmolateBaseDamage = 0f; private static float ImmolateDamagePerHeart = 1.5f; private static float ImmolateBaseRadius = 3f; private static float ImmolateRadiusPerHeart = 0.5f; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_001", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_002", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_003", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_004", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_005", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_006", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_007", "LOLItems/Resources/vfxs/sunfireaura/sunfireaura_008" }; private static GameObject EffectVFX; private GameObject activeVFXObject; public bool TRUESUNGODActivated = false; private static float TRUESUNGODImmolateDamagePerHeartInc = 0.5f; private static float TRUESUNGODImmolateRadiusPerHeartInc = 0.25f; public bool VOLTAGENOVAActivated = false; private static float VOLTAGENOVAImmolateDamagePerHeartInc = 1.5f; public static int ID; 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_007f: 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_00a8: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/sunfire_aegis_pixelart_sprite_small"; GameObject val = new GameObject(itemName); SunfireAegis sunfireAegis = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Radiates Heat"; string text3 = "+1 Heart and Armor\nGain a damaging aura around you. Size and damage increases based on your max hearts.\n\nThe golden armor glows with a warmth not unlike the sun. Appears to have been blessed by the gods to burn the wicked around it.\n"; ItemBuilder.SetupItem((PickupObject)(object)sunfireAegis, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)sunfireAegis, (StatType)3, HealthStat, (ModifyMethod)0); ((PassiveItem)sunfireAegis).ArmorToGainOnInitialPickup = ArmorStat; ((AuraItem)sunfireAegis).AuraRadius = ImmolateBaseRadius; ((AuraItem)sunfireAegis).DamagePerSecond = ImmolateBaseDamage; EffectVFX = VFXBuilder.CreateVFX("sunfireaura", VFXSpritePath, 8, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); ((PickupObject)sunfireAegis).quality = (ItemQuality)3; ID = ((PickupObject)sunfireAegis).PickupObjectId; } public override void Pickup(PlayerController player) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.OnNewFloorLoaded = (Action)Delegate.Combine(player.OnNewFloorLoaded, new Action(OnLoadedNewFloor)); base.AuraRadius = ImmolateBaseRadius + 3f * ImmolateRadiusPerHeart; base.DamagePerSecond = ImmolateBaseDamage + 3f * ImmolateDamagePerHeart; if (!player.ForceZeroHealthState) { ((BraveBehaviour)player).healthHaver.OnHealthChanged += new OnHealthChangedEvent(UpdateImmolateStats); UpdateImmolateStats(0f, ((BraveBehaviour)player).healthHaver.GetMaxHealth()); } if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } activeVFXObject = ((GameActor)player).PlayEffectOnActor(EffectVFX, new Vector3(1.3125f, 0.625f, -2f), true, false, false); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -50f; ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.25f); } } public override void DisableEffect(PlayerController player) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnNewFloorLoaded = (Action)Delegate.Remove(player.OnNewFloorLoaded, new Action(OnLoadedNewFloor)); ((BraveBehaviour)player).healthHaver.OnHealthChanged -= new OnHealthChangedEvent(UpdateImmolateStats); } if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.TRUE_SUN_GOD) && !TRUESUNGODActivated) { ImmolateDamagePerHeart += TRUESUNGODImmolateDamagePerHeartInc; ImmolateRadiusPerHeart += TRUESUNGODImmolateRadiusPerHeartInc; TRUESUNGODActivated = true; if (((PassiveItem)this).Owner.ForceZeroHealthState) { UpdateImmolateStats(0f, 3f); } else { UpdateImmolateStats(0f, ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.GetMaxHealth()); } } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.TRUE_SUN_GOD) && TRUESUNGODActivated) { ImmolateDamagePerHeart -= TRUESUNGODImmolateDamagePerHeartInc; ImmolateRadiusPerHeart -= TRUESUNGODImmolateRadiusPerHeartInc; TRUESUNGODActivated = false; if (((PassiveItem)this).Owner.ForceZeroHealthState) { UpdateImmolateStats(0f, 3f); } else { UpdateImmolateStats(0f, ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.GetMaxHealth()); } } if (((PassiveItem)this).Owner.HasSynergy(Synergy.VOLTAGE_NOVA) && !VOLTAGENOVAActivated) { ImmolateDamagePerHeart += VOLTAGENOVAImmolateDamagePerHeartInc; VOLTAGENOVAActivated = true; if (((PassiveItem)this).Owner.ForceZeroHealthState) { UpdateImmolateStats(0f, 3f); } else { UpdateImmolateStats(0f, ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.GetMaxHealth()); } } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.VOLTAGE_NOVA) && VOLTAGENOVAActivated) { ImmolateDamagePerHeart -= VOLTAGENOVAImmolateDamagePerHeartInc; VOLTAGENOVAActivated = false; if (((PassiveItem)this).Owner.ForceZeroHealthState) { UpdateImmolateStats(0f, 3f); } else { UpdateImmolateStats(0f, ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.GetMaxHealth()); } } } ((AuraItem)this).Update(); } private void UpdateImmolateStats(float oldHealth, float newHealth) { base.DamagePerSecond = newHealth * ImmolateDamagePerHeart; base.AuraRadius = ImmolateBaseRadius + newHealth * ImmolateRadiusPerHeart; ((PassiveItem)this).Update(); } private void OnLoadedNewFloor(PlayerController player) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } activeVFXObject = ((GameActor)player).PlayEffectOnActor(EffectVFX, new Vector3(1.3125f, 0.625f, -2f), true, false, false); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -50f; ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.25f); } } } internal class BladeOfTheRuinedKing : PassiveItem { public static string ItemName = "Blade of the Ruined King"; private bool shouldApplySlow = false; private static float DamageStat = 1.25f; private static float RateOfFireStat = 1.2f; private static float PercentCurrentHealthStat = 0.12f; private static float slowPercent = 0.5f; private static float slowDuration = 3f; private static GameActorSpeedEffect slowEffect = new GameActorSpeedEffect { duration = slowDuration, effectIdentifier = "botrk_slow", resistanceType = (EffectResistanceType)0, AppliesOutlineTint = true, OutlineTintColor = Color.cyan, SpeedMultiplier = slowPercent }; public bool YOUDAREFACEAKINGActivated = false; private static float YOUDAREFACEAKINGPercentCurrentHealthStat = 0.2f; public bool FORISOLDEActivated = false; public static int ID; 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_0061: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/blade_of_the_ruined_king_pixelart_sprite_small"; GameObject val = new GameObject(itemName); BladeOfTheRuinedKing bladeOfTheRuinedKing = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"The mist devours all!\""; string text3 = "Increase damage and fire rate\nFirst bullet of clip slows enemies, every bullet deals %current health damage.\n\nNo price is too great.\nNo atrocity beyond my reach.\nFor her, I will do anything.\n\n- King of Camavor\n"; ItemBuilder.SetupItem((PickupObject)(object)bladeOfTheRuinedKing, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)bladeOfTheRuinedKing, (StatType)5, DamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)bladeOfTheRuinedKing, (StatType)1, RateOfFireStat, (ModifyMethod)1); ((PickupObject)bladeOfTheRuinedKing).quality = (ItemQuality)5; ID = ((PickupObject)bladeOfTheRuinedKing).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.OnReloadedGun = (Action)Delegate.Combine(player.OnReloadedGun, new Action(OnGunReloaded)); shouldApplySlow = true; player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnReloadedGun = (Action)Delegate.Remove(player.OnReloadedGun, new Action(OnGunReloaded)); player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } shouldApplySlow = false; } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.YOU_DARE_FACE_A_KING) && !YOUDAREFACEAKINGActivated) { PercentCurrentHealthStat = YOUDAREFACEAKINGPercentCurrentHealthStat; YOUDAREFACEAKINGActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.YOU_DARE_FACE_A_KING) && YOUDAREFACEAKINGActivated) { PercentCurrentHealthStat = 0.12f; YOUDAREFACEAKINGActivated = false; } } ((PassiveItem)this).Update(); } private void OnGunReloaded(PlayerController player, Gun gun) { shouldApplySlow = true; } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)hitRigidbody == (Object)null) && (!((Object)(object)((BraveBehaviour)hitRigidbody).aiActor == (Object)null) || !((Object)(object)((Component)hitRigidbody).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) { float currentHealth = ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetCurrentHealth(); float num = Mathf.Max(1f, currentHealth * PercentCurrentHealthStat) * tickrate; if (((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.IsBoss || ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.IsSubboss) { num *= 0.25f; } ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(num, Vector2.zero, "botrk_current_health_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } private void OnPostProcessProjectile(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } if (shouldApplySlow) { ApplySlowEffect(proj); if (((PassiveItem)this).Owner.HasSynergy(Synergy.FOR_ISOLDE)) { shouldApplySlow = true; } else { shouldApplySlow = false; } } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null)) && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float currentHealth = ((BraveBehaviour)enemy).healthHaver.GetCurrentHealth(); float num = Mathf.Max(1f, currentHealth * PercentCurrentHealthStat); if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss) { num *= 0.25f; } ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num, Vector2.zero, "botrk_current_health_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } }); } private void ApplySlowEffect(Projectile projectile) { projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null)) { if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)enemy).aiActor).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null) { ((GameActor)((Component)enemy).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); } } }); } } internal class ExperimentalHexplate : PassiveItem { [CompilerGenerated] private sealed class d__22 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public ExperimentalHexplate <>4__this; private Material 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isOverdriveActive = true; <>4__this.isOnCooldown = true; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1, OverdriveRateOfFireStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)0, overdriveMovementSpeedStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); 5__1 = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)player).sprite); if (Object.op_Implicit((Object)(object)5__1)) { 5__1.SetColor("_OverrideColor", new Color(0f, 89.6f, 178.5f)); } AkSoundEngine.PostEvent("experimental_hexplate_passive_triggered_SFX", ((Component)player).gameObject); AkSoundEngine.PostEvent("experimental_hexplate_passive_effect_SFX", ((Component)player).gameObject); <>2__current = (object)new WaitForSeconds(OverdriveDuration); <>1__state = 1; return true; case 1: <>1__state = -1; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)0); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1, RateOfFireStat, (ModifyMethod)1); if (player.HasSynergy(Synergy.SPEED_BLITZ)) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)0, SPEEDBLITZMovementSpeedStat, (ModifyMethod)0); } <>4__this.FILLERUPActivated = false; VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); if (Object.op_Implicit((Object)(object)5__1)) { 5__1.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } <>4__this.isOverdriveActive = false; <>2__current = (object)new WaitForSeconds(OverdriveCooldown - OverdriveDuration); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.isOnCooldown = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Experimental Hexplate"; private static float DamageStat = 1.1f; private static float RateOfFireStat = 1.1f; private static float HealthStat = 1f; private static float OverdriveDuration = 8f; private static float OverdriveCooldown = 30f; private static float OverdriveRateOfFireStat = 1.5f; private static float overdriveMovementSpeedStat = 1.25f; private bool isOverdriveActive = false; public bool isOnCooldown = false; private int cigaretteUses = 0; private static float DamageStatPerCigUse = 0.05f; public bool SPEEDBLITZActivated = false; private static float SPEEDBLITZMovementSpeedStat = 1.5f; public bool FILLERUPActivated = false; private static float FILLERUPRateOfFireStat = 2f; public static int ID; 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_006f: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/experimental_hexplate_pixelart_sprite"; GameObject val = new GameObject(itemName); ExperimentalHexplate experimentalHexplate = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Ethically Questionable"; string text3 = "+1 Heart, Increase damage and fire rate\nActivating an item increases your fire rate and movespeed for a few seconds. Goes on a cooldown.\n\nThis strange piece of armor appears to be mechanically equipped to help the user enhance their physical abilities. There's an extra mechanism on the armor, but you can't figure out what the trigger is.\n\nIt never passed testing phase for a reason.\n"; ItemBuilder.SetupItem((PickupObject)(object)experimentalHexplate, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)experimentalHexplate, (StatType)5, DamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)experimentalHexplate, (StatType)1, RateOfFireStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)experimentalHexplate, (StatType)3, HealthStat, (ModifyMethod)0); ((PickupObject)experimentalHexplate).quality = (ItemQuality)4; ID = ((PickupObject)experimentalHexplate).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.OnUsedPlayerItem += OnPlayerItemUsed; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnUsedPlayerItem -= OnPlayerItemUsed; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.SPEED_BLITZ) && !SPEEDBLITZActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)0, SPEEDBLITZMovementSpeedStat, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); SPEEDBLITZActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.SPEED_BLITZ) && SPEEDBLITZActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); SPEEDBLITZActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.FILLER_UP) && !FILLERUPActivated && ((PickupObject)((GameActor)((PassiveItem)this).Owner).CurrentGun).PickupObjectId == 401) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)1, FILLERUPRateOfFireStat * RateOfFireStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); FILLERUPActivated = true; } else if (((PassiveItem)this).Owner.HasSynergy(Synergy.FILLER_UP) && ((PickupObject)((GameActor)((PassiveItem)this).Owner).CurrentGun).PickupObjectId != 401) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)1, RateOfFireStat, (ModifyMethod)1); if (isOverdriveActive) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)1, OverdriveRateOfFireStat, (ModifyMethod)1); } VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); FILLERUPActivated = false; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.FILLER_UP) && FILLERUPActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)1, RateOfFireStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); FILLERUPActivated = false; } } ((PassiveItem)this).Update(); } private void OnPlayerItemUsed(PlayerController player, PlayerItem item) { if (player.HasSynergy(Synergy.THAT_GOOD_SHIT) && ((PickupObject)item).PickupObjectId == 203) { cigaretteUses++; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)item, (StatType)5); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)item, (StatType)5, (float)cigaretteUses * DamageStatPerCigUse, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); } if (!isOnCooldown) { ((MonoBehaviour)this).StartCoroutine(ApplyOverdriveBuff(player)); } } private IEnumerator ApplyOverdriveBuff(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { <>4__this = this, player = player }; } } internal class GuardianAngel : PassiveItem { [CompilerGenerated] private sealed class d__15 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public GuardianAngel <>4__this; private Color 5__1; private Color 5__2; private Material 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; <>1__state = -2; } private bool MoveNext() { //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_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_00f2: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown //IL_0158: 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_01c1: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!((BraveBehaviour)player).healthHaver.IsAlive) { <>4__this.hasRevived = true; ((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(4.1f); ((BraveBehaviour)player).healthHaver.ForceSetCurrentHealth(((BraveBehaviour)player).healthHaver.GetMaxHealth() / 2f); player.CurrentInputState = (PlayerInputState)1; ((BraveBehaviour)player).healthHaver.OnPreDeath -= <>4__this.Rebirth; 5__1 = ((BraveBehaviour)player).sprite.color; 5__2 = ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color; ((BraveBehaviour)player).sprite.color = ExtendedColours.paleYellow; ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = ExtendedColours.paleYellow; 5__3 = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)player).sprite); if (Object.op_Implicit((Object)(object)5__3)) { 5__3.SetColor("_OverrideColor", new Color(169.4f, 166.59999f, 103.6f)); } AkSoundEngine.PostEvent("guardian_angel_passive_SFX", ((Component)GameManager.Instance).gameObject); <>2__current = (object)new WaitForSeconds(4f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; ((BraveBehaviour)player).sprite.color = 5__1; ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = 5__2; if (Object.op_Implicit((Object)(object)5__3)) { 5__3.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } player.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f); if (player.HasSynergy(Synergy.DIVINE_JUDGEMENT)) { <>4__this.DoDivineJudgement(player); } player.CurrentInputState = (PlayerInputState)0; ((BraveBehaviour)player).healthHaver.PreventAllDamage = false; 5__3 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Guardian Angel"; private static float DamageStat = 1.25f; private static int ArmorStat = 2; private bool hasRevived = false; private static float DIVINEJUDGEMENTRange = 5f; private static float DIVINEJUDGEMENTDamage = 30f; public bool WHYWONTYOUDIEActivated; private static float WHYWONTYOUDIEHealthStat = 1f; public bool WHYWONTYOUDIEFirstActivation = true; public static int ID; 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_005e: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/guardian_angel_pixelart_sprite_small"; GameObject val = new GameObject(itemName); GuardianAngel guardianAngel = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"Heroes never die!\""; string text3 = "+2 Armor, Increase damage\nRevives you once on death.\n\nA blade imbued with the hope of a cult who believed in rebirth. You almost feel like you could defy even death with it in hand.\n"; ItemBuilder.SetupItem((PickupObject)(object)guardianAngel, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)guardianAngel, (StatType)5, DamageStat, (ModifyMethod)1); ((PassiveItem)guardianAngel).ArmorToGainOnInitialPickup = ArmorStat; ((PickupObject)guardianAngel).quality = (ItemQuality)5; ItemBuilder.AddToSubShop((PickupObject)(object)guardianAngel, (ShopType)2, 1f); ID = ((PickupObject)guardianAngel).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); ((BraveBehaviour)player).healthHaver.OnPreDeath += Rebirth; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { ((BraveBehaviour)player).healthHaver.OnPreDeath -= Rebirth; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.WHY_WONT_YOU_DIE) && !WHYWONTYOUDIEActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)3, WHYWONTYOUDIEHealthStat, (ModifyMethod)0); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); if (WHYWONTYOUDIEFirstActivation) { ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.ApplyHealing(1f); WHYWONTYOUDIEFirstActivation = false; } WHYWONTYOUDIEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.WHY_WONT_YOU_DIE) && WHYWONTYOUDIEActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)3); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); WHYWONTYOUDIEActivated = false; } } ((PassiveItem)this).Update(); } private void Rebirth(Vector2 DeathPositon) { if (!hasRevived) { PlayerController owner = ((PassiveItem)this).Owner; if (owner != null) { ((MonoBehaviour)owner).StartCoroutine(ReviveCoroutine(owner)); } } } private IEnumerator ReviveCoroutine(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { <>4__this = this, player = player }; } private void DoDivineJudgement(PlayerController player) { //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_00b6: Unknown result type (might be due to invalid IL or missing references) if (player.CurrentRoom == null) { return; } List activeEnemies = player.CurrentRoom.GetActiveEnemies((ActiveEnemyType)0); if (activeEnemies == null) { return; } foreach (AIActor item in activeEnemies) { if ((Object)(object)item != (Object)null && (Object)(object)((BraveBehaviour)item).healthHaver != (Object)null && ((BraveBehaviour)item).healthHaver.IsVulnerable) { float num = Vector2.Distance(((GameActor)player).CenterPosition, ((GameActor)item).CenterPosition); float num2 = DIVINEJUDGEMENTDamage * player.stats.GetStatValue((StatType)5); if (num <= DIVINEJUDGEMENTRange) { ((BraveBehaviour)item).healthHaver.ApplyDamage(num2, Vector2.zero, "thornmail_blank_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } } } internal class Hubris : PassiveItem { [CompilerGenerated] private sealed class d__19 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public Hubris <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.eminenceCountPerStack *= GLADITORIALCHALLENGEEminenceCountPerStackMultiplier; <>2__current = (object)new WaitForSeconds(GLADITORIALCHALLENGEDuration); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.eminenceCountPerStack = 1; <>4__this.QUADRATICSCALINGActivated = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Hubris"; private int eminenceCount = 0; private int eminenceCountPerStack = 1; private float eminenceDamageIncrease = 0.004f; public bool QUADRATICSCALINGActivated = false; private static int QUADRATICSCALINGEminenceCountPerStack = 1; private static int GLADITORIALCHALLENGEEminenceCountPerStackMultiplier = 3; private static float GLADITORIALCHALLENGEDuration = 10f; public bool PEACEANDWARActivated = false; private static int PEACEANDWARStackCount = 0; private static int PEACEANDWARStackReq = 50; private static float PEACEANDWARHealAmount = 0.5f; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/hubris_pixelart_sprite_small"; GameObject val = new GameObject(itemName); Hubris hubris = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "A symbol of victory"; string text3 = "Every kill permanently increases your damage a little bit.\n\nA congratulatory laurel wreath gifted to the victor. With each triumph, one's strength increases. Legends speak of a statue that once bore this headpiece.\n"; ItemBuilder.SetupItem((PickupObject)(object)hubris, text2, text3, "LOLItems"); ((PickupObject)hubris).quality = (ItemQuality)4; ID = ((PickupObject)hubris).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.OnAnyEnemyReceivedDamage = (Action)Delegate.Combine(player.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); player.OnUsedPlayerItem += ConfigurumSynergyInteraction; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(player.OnAnyEnemyReceivedDamage, new Action(KillEnemyCount)); player.OnUsedPlayerItem -= ConfigurumSynergyInteraction; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.QUADRATIC_SCALING) && !QUADRATICSCALINGActivated) { eminenceCountPerStack += QUADRATICSCALINGEminenceCountPerStack; QUADRATICSCALINGActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.QUADRATIC_SCALING) && QUADRATICSCALINGActivated) { eminenceCountPerStack = 1; QUADRATICSCALINGActivated = false; } } ((PassiveItem)this).Update(); } private void KillEnemyCount(float damage, bool fatal, HealthHaver enemyHealth) { if (!((Object)(object)((BraveBehaviour)enemyHealth).aiActor != (Object)null && Object.op_Implicit((Object)(object)enemyHealth) && fatal)) { return; } if (((BraveBehaviour)enemyHealth).aiActor.IsNormalEnemy && (enemyHealth.IsBoss || enemyHealth.IsSubboss)) { eminenceCount += eminenceCountPerStack * 5; } else { eminenceCount += eminenceCountPerStack; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.PEACE_AND_WAR)) { PEACEANDWARStackCount++; if (PEACEANDWARStackCount >= PEACEANDWARStackReq) { PEACEANDWARStackCount = 0; ((BraveBehaviour)((PassiveItem)this).Owner).healthHaver.ApplyHealing(PEACEANDWARHealAmount); } } ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); float num = (float)eminenceCount * eminenceDamageIncrease; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + num, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); } private void ConfigurumSynergyInteraction(PlayerController player, PlayerItem item) { if ((Object)(object)player != (Object)null && (Object)(object)item != (Object)null && ((PassiveItem)this).Owner.HasSynergy(Synergy.GLADITORIAL_CHALLENGE) && ((PickupObject)item).PickupObjectId == 525) { ((MonoBehaviour)this).StartCoroutine(StartConfigurumDuration(player)); } } private IEnumerator StartConfigurumDuration(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this, player = player }; } } internal class KrakenSlayer : PassiveItem { public static string ItemName = "Kraken Slayer"; public int bringItDownCount = 0; public float bringItDownDamage = 20f; private static float bringItDownMissingHealthScale = 0.75f; private static float DamageStat = 1.25f; private static float RateOfFireStat = 1.25f; public string[] sfxList = new string[3] { "kraken_slayer_passive_SFX_1", "kraken_slayer_passive_SFX_2", "kraken_slayer_passive_SFX_3" }; public bool TOPTIERFISHINGTOOLActivated = false; private static float TOPTIERFISHINGTOOLbringItDownDamageInc = 10f; public bool ENTANGLEMENTActivated = false; private static GameActorSpeedEffect ENTANGLEMENTSlowEffect = new GameActorSpeedEffect { duration = 1.5f, effectIdentifier = "kraken_slayer_entanglement_slow_effect", resistanceType = (EffectResistanceType)0, AppliesOutlineTint = true, OutlineTintColor = ExtendedColours.purple, SpeedMultiplier = 0.6f }; public bool MEGALODONSLAYERActivated = false; private static float MEGALODONSLAYERbringItDownMissingHealthScaleInc = 1.25f; private static float ASAILORSBESTFRIENDbringItDownDamageMultiplier = 2f; public static int ID; 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_0063: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/kraken_slayer_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); KrakenSlayer krakenSlayer = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "The Ultimate fishing tool"; string text3 = "Increase damage and fire rate\nEvery 3rd bullet deals additional damage. This damage increases based on the floor and the target's missing health.\n\nA fishing tool passed down through generations. It's said that the original user felled a kraken with it and freed the seas from its terror.\n"; ItemBuilder.SetupItem((PickupObject)(object)krakenSlayer, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)krakenSlayer, (StatType)5, DamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)krakenSlayer, (StatType)1, RateOfFireStat, (ModifyMethod)1); ((PickupObject)krakenSlayer).quality = (ItemQuality)5; ItemBuilder.AddToSubShop((PickupObject)(object)krakenSlayer, (ShopType)3, 1f); ID = ((PickupObject)krakenSlayer).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; bringItDownCount = 0; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.TOP_TIER_FISHING_TOOL) && !TOPTIERFISHINGTOOLActivated) { bringItDownDamage += TOPTIERFISHINGTOOLbringItDownDamageInc; TOPTIERFISHINGTOOLActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.TOP_TIER_FISHING_TOOL) && TOPTIERFISHINGTOOLActivated) { bringItDownDamage = 20f; TOPTIERFISHINGTOOLActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.ENTANGLEMENT) && !ENTANGLEMENTActivated) { ENTANGLEMENTActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ENTANGLEMENT) && ENTANGLEMENTActivated) { ENTANGLEMENTActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.MEGALODON_SLAYER) && !MEGALODONSLAYERActivated) { bringItDownMissingHealthScale += MEGALODONSLAYERbringItDownMissingHealthScaleInc; MEGALODONSLAYERActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.MEGALODON_SLAYER) && MEGALODONSLAYERActivated) { bringItDownMissingHealthScale = 0.75f; MEGALODONSLAYERActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { //IL_017f: Unknown result type (might be due to invalid IL or missing references) float value = Random.value; if (value <= 0.04f) { bringItDownCount++; } if (bringItDownCount < 3 || (Object)(object)hitRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)hitRigidbody).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) { float num = bringItDownMissingHealthScale * (1f - ((BraveBehaviour)val).healthHaver.GetCurrentHealthPercentage()); float num2 = bringItDownDamage * (1f + num) * HelpfulMethods.GetFloorDamageScale(); if (((PassiveItem)this).Owner.HasSynergy(Synergy.A_SAILORS_BEST_FRIEND)) { foreach (PlayerItem activeItem in ((PassiveItem)this).Owner.activeItems) { if (((PickupObject)activeItem).PickupObjectId == 168 && (Object)(object)activeItem != (Object)null && activeItem.IsCurrentlyActive) { num2 *= ASAILORSBESTFRIENDbringItDownDamageMultiplier; } } } if (ENTANGLEMENTActivated) { ((GameActor)val).ApplyEffect((GameActorEffect)(object)ENTANGLEMENTSlowEffect, 1f, (Projectile)null); } ((BraveBehaviour)val).healthHaver.ApplyDamage(num2, Vector2.zero, "kraken_slayer_bring_it_down_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } bringItDownCount = 0; } private void OnPostProcessProjectile(Projectile proj, float f) { //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_006a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody)) { return; } bringItDownCount++; if (bringItDownCount < 3) { return; } if ((Object)(object)((BraveBehaviour)proj).sprite != (Object)null) { ((BraveBehaviour)proj).sprite.color = Color.Lerp(((BraveBehaviour)proj).sprite.color, Color.cyan, 0.7f); } HelpfulMethods.PlayRandomSFX(((Component)proj).gameObject, sfxList); proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_0140: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)enemy == (Object)null)) { AIActor val = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { val = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemy).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float num = bringItDownMissingHealthScale * (1f - ((BraveBehaviour)enemy).healthHaver.GetCurrentHealthPercentage()); float num2 = bringItDownDamage * (1f + num) * HelpfulMethods.GetFloorPriceMod(); if (((PassiveItem)this).Owner.HasSynergy(Synergy.A_SAILORS_BEST_FRIEND)) { foreach (PlayerItem activeItem in ((PassiveItem)this).Owner.activeItems) { if (((PickupObject)activeItem).PickupObjectId == 168 && (Object)(object)activeItem != (Object)null && activeItem.IsCurrentlyActive) { num2 *= ASAILORSBESTFRIENDbringItDownDamageMultiplier; } } } if (ENTANGLEMENTActivated) { ((GameActor)val).ApplyEffect((GameActorEffect)(object)ENTANGLEMENTSlowEffect, 1f, (Projectile)null); } ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num2, Vector2.zero, "kraken_slayer_bring_it_down_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } }); bringItDownCount = 0; } private void OnGunReloaded(PlayerController player, Gun gun) { bringItDownCount = 0; } } internal class LiandrysTorment : PassiveItem { public static string ItemName = "Liandry's Torment"; private static float DamageStat = 1.15f; private static float HealthStat = 1f; private static float TormentBaseDamage = 5f; private static float TormentPercentHealthDamage = 0.15f; private static float TormentDuration = 3f; private static Gun phoenix; private static GameActorFireEffect TormentBurnEffect; public bool BURNINGVENGENCEActivated = false; private static float BURNINGVENGENCETormentDurationInc; public bool BLAZINGUNIVERSEActivated = false; private static float BLAZINGUNIVERSETormentDamageIncScale; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/liandrys_torment_pixelart_sprite_small"; GameObject val = new GameObject(itemName); LiandrysTorment liandrysTorment = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Cursed Mask"; string text3 = "+1 Heart\nDealing damage burns enemies for %max health damage.\n\nOnce belonged to a theatre company and used as a prop in their most infamous act. Rumors claim that each run of the act needed new actors since one actor always died mysteriously. \nSomething tells you that this mask was connected to these incidents.\n"; ItemBuilder.SetupItem((PickupObject)(object)liandrysTorment, text2, text3, "LOLItems"); ((PickupObject)liandrysTorment).quality = (ItemQuality)3; ItemBuilder.AddToSubShop((PickupObject)(object)liandrysTorment, (ShopType)2, 1f); ID = ((PickupObject)liandrysTorment).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.PostProcessBeamTick += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.PostProcessBeamTick -= OnPostProcessProjectile; } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.BURNING_VENGENCE) && !BURNINGVENGENCEActivated) { ((GameActorEffect)TormentBurnEffect).duration = TormentDuration + BURNINGVENGENCETormentDurationInc; BURNINGVENGENCEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.BURNING_VENGENCE) && BURNINGVENGENCEActivated) { ((GameActorEffect)TormentBurnEffect).duration = TormentDuration; BURNINGVENGENCEActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.BLAZING_UNIVERSE) && !BLAZINGUNIVERSEActivated) { TormentBaseDamage *= BLAZINGUNIVERSETormentDamageIncScale; TormentPercentHealthDamage *= BLAZINGUNIVERSETormentDamageIncScale; BLAZINGUNIVERSEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.BLAZING_UNIVERSE) && BLAZINGUNIVERSEActivated) { TormentBaseDamage = 5f; TormentPercentHealthDamage = 0.1f; BLAZINGUNIVERSEActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate) { if ((Object)(object)hitRigidbody == (Object)null) { return; } AIActor val = null; if ((Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null) { val = ((BraveBehaviour)hitRigidbody).aiActor; } else { if (!((Object)(object)((Component)hitRigidbody).GetComponentInParent() != (Object)null)) { return; } val = ((Component)hitRigidbody).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)hitRigidbody).healthHaver != (Object)null) { ((GameActorHealthEffect)TormentBurnEffect).DamagePerSecondToEnemies = ((BraveBehaviour)val).healthHaver.GetMaxHealth() * TormentPercentHealthDamage + TormentBaseDamage; if (((BraveBehaviour)val).healthHaver.IsBoss || ((BraveBehaviour)val).healthHaver.IsSubboss) { GameActorFireEffect tormentBurnEffect = TormentBurnEffect; ((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies = ((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies * 0.25f; } ((GameActor)val).ApplyEffect((GameActorEffect)(object)TormentBurnEffect, 1f, (Projectile)null); } } private void OnPostProcessProjectile(Projectile proj, float f) { proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null)) { AIActor val = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { val = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } val = ((Component)enemy).GetComponentInParent(); } if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { ((GameActorHealthEffect)TormentBurnEffect).DamagePerSecondToEnemies = ((BraveBehaviour)val).healthHaver.GetMaxHealth() * TormentPercentHealthDamage + TormentBaseDamage; if (((BraveBehaviour)val).healthHaver.IsBoss || ((BraveBehaviour)val).healthHaver.IsSubboss) { GameActorFireEffect tormentBurnEffect = TormentBurnEffect; ((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies = ((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies * 0.25f; } ((GameActor)val).ApplyEffect((GameActorEffect)(object)TormentBurnEffect, 1f, (Projectile)null); } } }); } static LiandrysTorment() { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown PickupObject byId = PickupObjectDatabase.GetById(99); phoenix = (Gun)(object)((byId is Gun) ? byId : null); TormentBurnEffect = new GameActorFireEffect { duration = TormentDuration, DamagePerSecondToEnemies = 0f, effectIdentifier = "liandrys_torment_burn", ignitesGoops = false, FlameVfx = phoenix.DefaultModule.projectiles[0].fireEffect.FlameVfx }; BURNINGVENGENCETormentDurationInc = 3f; BLAZINGUNIVERSETormentDamageIncScale = 2f; } } public class Manamune : PassiveItem { public static string ItemName = "Manamune"; private static float DamageStat = 1.05f; private static float ManaflowIncreaseMax = 0.5f; private static float ManaflowIncrementValue = 0.05f; private static float ManaflowIncrementKillReq = 25f; private static float MuramanaShockBaseDamage = 5f; private float CurrentManaflowKillCount = 0f; private int ManaflowStackCount = 0; public bool BLADEOFTHEONIActivated = false; private static float BLADEOFTHEONIDamageStat = 1.25f; public static int ID; private PassiveItem muramanaItem; 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_0053: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/manamune_pixelart_sprite_small"; GameObject val = new GameObject(itemName); Manamune manamune = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "from the Greatest Swordsmith"; string text3 = "Slightly increase damage\nIncreases max ammo multiplier and clip size multiplier every few kills. Evolves after enough kills.\n\nCreated by the Greatest Swordsmith, Masamune, this sword increases the wielder's capacity for battle.\n\nLegends hint at the blade's true strength being sealed away.\n"; ItemBuilder.SetupItem((PickupObject)(object)manamune, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)manamune, (StatType)5, DamageStat, (ModifyMethod)1); ((PickupObject)manamune).quality = (ItemQuality)3; ItemBuilder.AddToSubShop((PickupObject)(object)manamune, (ShopType)2, 1f); ID = ((PickupObject)manamune).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); if ((float)ManaflowStackCount * ManaflowIncrementValue <= ManaflowIncreaseMax) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Combine(player.OnAnyEnemyReceivedDamage, new Action(ManaflowStack)); } } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(player.OnAnyEnemyReceivedDamage, new Action(ManaflowStack)); } } public override void Update() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.BUILDS_INTO_MANAMUNE)) { foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems) { if (((PickupObject)passiveItem).PickupObjectId == TearOfTheGoddess.ID && (Object)(object)passiveItem != (Object)null) { if (((Component)passiveItem).GetComponent().ManaflowMaxed) { UpgradeToMuramana(((PassiveItem)this).Owner); continue; } ManaflowStackCount = ((Component)passiveItem).GetComponent().ManaflowStackCount; CurrentManaflowKillCount = ((Component)passiveItem).GetComponent().CurrentManaflowKillCount * 0.5f; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1); LootEngine.SpawnCurrency(((BraveBehaviour)((PassiveItem)this).Owner).specRigidbody.UnitCenter, ((PickupObject)passiveItem).PurchasePrice, false); } } ((PassiveItem)this).Owner.RemovePassiveItem(TearOfTheGoddess.ID); } if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.BLADE_OF_THE_ONI_MANAMUNE) && !BLADEOFTHEONIActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, BLADEOFTHEONIDamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); BLADEOFTHEONIActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.BLADE_OF_THE_ONI_MANAMUNE) && BLADEOFTHEONIActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, DamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); BLADEOFTHEONIActivated = false; } } } ((PassiveItem)this).Update(); } private void ManaflowStack(float damage, bool fatal, HealthHaver enemyHealth) { if (!(Object.op_Implicit((Object)(object)((BraveBehaviour)enemyHealth).aiActor) && Object.op_Implicit((Object)(object)enemyHealth) && fatal)) { return; } if (((BraveBehaviour)enemyHealth).aiActor.IsNormalEnemy && (enemyHealth.IsBoss || enemyHealth.IsSubboss)) { CurrentManaflowKillCount += 5f; } else { CurrentManaflowKillCount += 1f; } if (CurrentManaflowKillCount >= ManaflowIncrementKillReq) { CurrentManaflowKillCount -= ManaflowIncrementKillReq; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ManaflowStackCount++; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); if ((float)ManaflowStackCount * ManaflowIncrementValue >= ManaflowIncreaseMax) { UpgradeToMuramana(((PassiveItem)this).Owner); } } } private void UpgradeToMuramana(PlayerController player) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(player.OnAnyEnemyReceivedDamage, new Action(ManaflowStack)); ManaflowStackCount = 0; CurrentManaflowKillCount = 0f; if ((Object)(object)muramanaItem == (Object)null) { ref PassiveItem reference = ref muramanaItem; PickupObject byName = PickupObjectDatabase.GetByName("Muramana"); reference = (PassiveItem)(object)((byName is PassiveItem) ? byName : null); } if ((Object)(object)muramanaItem != (Object)null) { HelpfulMethods.CustomNotification("Manamune Upgraded to Muramana", "", ((BraveBehaviour)muramanaItem).sprite, (NotificationColor)2); player.RemovePassiveItem(((PickupObject)this).PickupObjectId); PlayerControllerExt.GiveItem(player, "LOLItems:muramana"); Plugin.Log("Manamune has been upgraded to Muramana"); } else { Plugin.Log("Muramana not found in the database!"); } } } internal class TearOfTheGoddess : PassiveItem { public static string ItemName = "Tear of the Goddess"; private static float ManaflowIncreaseMax = 0.5f; private static float ManaflowIncrementValue = 0.05f; private static float ManaflowIncrementKillReq = 50f; public float CurrentManaflowKillCount = 0f; public int ManaflowStackCount = 0; public bool ManaflowMaxed = false; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/tear_of_the_goddess_pixelart_sprite"; GameObject val = new GameObject(itemName); TearOfTheGoddess tearOfTheGoddess = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*NOT A REAL TEAR*"; string text3 = "Increases max ammo multiplier and clip size multiplier every few kills. After enough kills, stops increasing stats. Stacks carry over to Manamune.\n\n\"Few are fortunate enough to come across the tears of the very goddess who created our world... but those who are lucky enough to acquire a Tear of the Goddess are said to be destined for greatness.\""; ItemBuilder.SetupItem((PickupObject)(object)tearOfTheGoddess, text2, text3, "LOLItems"); ((PickupObject)tearOfTheGoddess).quality = (ItemQuality)1; ((PickupObject)tearOfTheGoddess).UsesCustomCost = false; ItemBuilder.AddToSubShop((PickupObject)(object)tearOfTheGoddess, (ShopType)0, 1f); ID = ((PickupObject)tearOfTheGoddess).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); if ((float)ManaflowStackCount * ManaflowIncrementValue <= ManaflowIncreaseMax) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Combine(player.OnAnyEnemyReceivedDamage, new Action(ManaflowStack)); } } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(player.OnAnyEnemyReceivedDamage, new Action(ManaflowStack)); } } private void ManaflowStack(float damage, bool fatal, HealthHaver enemyHealth) { if (!(Object.op_Implicit((Object)(object)((BraveBehaviour)enemyHealth).aiActor) && Object.op_Implicit((Object)(object)enemyHealth) && fatal)) { return; } if (((BraveBehaviour)enemyHealth).aiActor.IsNormalEnemy && (enemyHealth.IsBoss || enemyHealth.IsSubboss)) { CurrentManaflowKillCount += 5f; } else { CurrentManaflowKillCount += 1f; } if (CurrentManaflowKillCount >= ManaflowIncrementKillReq) { CurrentManaflowKillCount -= ManaflowIncrementKillReq; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9); ManaflowStackCount++; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); if ((float)ManaflowStackCount * ManaflowIncrementValue >= ManaflowIncreaseMax) { PlayerController owner = ((PassiveItem)this).Owner; owner.OnAnyEnemyReceivedDamage = (Action)Delegate.Remove(owner.OnAnyEnemyReceivedDamage, new Action(ManaflowStack)); ManaflowMaxed = true; } } } } internal class TrinityForce : SpellbladePassiveItem { public static string ItemName = "Trinity Force"; private static float spellbladeDmg = 20f; private static float spellbladeCooldown = 3f; private static string spellbladeDamageIdentifier = "trinity_force_spellblade_damage"; private static float DamageStat = 1.1f; private static float RateOfFireStat = 1.1f; private static float HealthStat = 1f; public static int ID; 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_006f: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/trinity_force_pixelart_sprite"; GameObject val = new GameObject(itemName); TrinityForce trinityForce = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*not affiliated with Zelda*"; string text3 = "+1 Heart, Increase damage and fire rate\nGrants Spellblade every few seconds. Spellblade: Empowers next bullet with high additional damage.\n\nThe pinnacle of balance. A charm of legend rumored to belong to a far away land. You feel stronger with it, especially your Power, Wisdom, and Courage.\n"; ItemBuilder.SetupItem((PickupObject)(object)trinityForce, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)trinityForce, (StatType)5, DamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)trinityForce, (StatType)1, RateOfFireStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)trinityForce, (StatType)3, HealthStat, (ModifyMethod)0); ((PickupObject)trinityForce).quality = (ItemQuality)4; trinityForce.activationDmgValue = spellbladeDmg; trinityForce.activationCooldownValue = spellbladeCooldown; trinityForce.damageIdentifier = spellbladeDamageIdentifier; ID = ((PickupObject)trinityForce).PickupObjectId; } public override void Pickup(PlayerController player) { base.Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public override void DisableEffect(PlayerController player) { base.DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); } } internal class ZekesConvergence : AuraItem { [CompilerGenerated] private sealed class d__24 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public ZekesConvergence <>4__this; private tk2dSprite 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__24(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a5: 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_0200: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isFrostFireTempestActive = true; ((AuraItem)<>4__this).AuraRadius = FrostFireTempestRadius; ((AuraItem)<>4__this).DamagePerSecond = FrostFireTempestDamage; if ((Object)(object)<>4__this.activeVFXObject != (Object)null) { Object.Destroy((Object)(object)<>4__this.activeVFXObject); } <>4__this.activeVFXObject = ((GameActor)player).PlayEffectOnActor(EffectVFX, new Vector3(3.1875f, 2.5f, -2f), true, false, false); AkSoundEngine.PostEvent("zekes_convergence_sfx_01", ((Component)player).gameObject); 5__1 = <>4__this.activeVFXObject.GetComponent(); if ((Object)(object)5__1 != (Object)null) { ((tk2dBaseSprite)5__1).HeightOffGround = -50f; ((tk2dBaseSprite)5__1).scale = new Vector3(2.5f, 2.5f, 0f); ((tk2dBaseSprite)5__1).UpdateZDepth(); ((tk2dBaseSprite)5__1).usesOverrideMaterial = true; ((BraveBehaviour)5__1).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)5__1).renderer.material.SetFloat("_Fade", 0.5f); } <>2__current = (object)new WaitForSeconds(FrostFireTempestDuration); <>1__state = 1; return true; case 1: <>1__state = -1; ((AuraItem)<>4__this).AuraRadius = 0f; ((AuraItem)<>4__this).DamagePerSecond = 0f; if ((Object)(object)<>4__this.activeVFXObject != (Object)null) { Object.Destroy((Object)(object)<>4__this.activeVFXObject); } <>2__current = (object)new WaitForSeconds(FrostFireTempestCooldown - FrostFireTempestDuration); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.isFrostFireTempestActive = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Zeke's Convergence"; private static float HealthStat = 1f; private static float FrostFireTempestDamage = 15f; private static float FrostFireTempestRadius = 6f; private bool isFrostFireTempestActive = false; private static float FrostFireTempestDuration = 10f; private static float FrostFireTempestCooldown = 45f; private static float FrostFireTempestSlowPercent = 0.5f; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/convergence/convergenceaura_001", "LOLItems/Resources/vfxs/convergence/convergenceaura_002", "LOLItems/Resources/vfxs/convergence/convergenceaura_003", "LOLItems/Resources/vfxs/convergence/convergenceaura_004", "LOLItems/Resources/vfxs/convergence/convergenceaura_005", "LOLItems/Resources/vfxs/convergence/convergenceaura_006", "LOLItems/Resources/vfxs/convergence/convergenceaura_007", "LOLItems/Resources/vfxs/convergence/convergenceaura_008" }; private static GameObject EffectVFX; private GameObject activeVFXObject; private Coroutine FrostFireTempestCoroutine; private static GameActorSpeedEffect FrostFireTempestSlowEffect = new GameActorSpeedEffect { duration = 1f, SpeedMultiplier = FrostFireTempestSlowPercent, effectIdentifier = "frostfire_tempest_slow_effect", resistanceType = (EffectResistanceType)3, AppliesTint = true, TintColor = ExtendedColours.dodgerBlue }; public bool ABSOLUTECONVERGENCEActivated = false; public bool FLAMEOVERICEActivated = false; private static float FLAMEOVERICEFrostFireTempestDamageMultiplier = 2f; public bool ICEOVERFLAMEActivated = false; private static float ICEOVERFLAMEFrostFireTempestSlowPercent = 0.2f; public static int ID; 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_0074: 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_009d: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/zekes_convergence_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); ZekesConvergence zekesConvergence = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "ICY HOT"; string text3 = "+1 Heart\nActivating an item creates an aura around you that deals damage and slows. Goes on a cooldown.\n\nAnother strange piece of armor that helps protect the user. There appears to be a mechanism to emit an aura of fire and ice, but the trigger is nowhere to be found. It makes you feel both hot and cold at the same time and it's really annoying.\n"; ItemBuilder.SetupItem((PickupObject)(object)zekesConvergence, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)zekesConvergence, (StatType)3, HealthStat, (ModifyMethod)0); ((AuraItem)zekesConvergence).AuraRadius = 0f; ((AuraItem)zekesConvergence).DamagePerSecond = 0f; EffectVFX = VFXBuilder.CreateVFX("convergenceaura", VFXSpritePath, 8, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); ((PickupObject)zekesConvergence).quality = (ItemQuality)3; ID = ((PickupObject)zekesConvergence).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.OnUsedPlayerItem += ActivateFrostFireTempest; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } if ((Object)(object)player != (Object)null) { player.OnUsedPlayerItem -= ActivateFrostFireTempest; } } public override void Update() { //IL_010b: 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) if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.ABSOLUTE_CONVERGENCE) && !ABSOLUTECONVERGENCEActivated) { PlayerController owner = ((PassiveItem)this).Owner; owner.OnNewFloorLoaded = (Action)Delegate.Combine(owner.OnNewFloorLoaded, new Action(OnLoadedNewFloor)); ((PassiveItem)this).OnPickedUp = (Action)Delegate.Combine(((PassiveItem)this).OnPickedUp, new Action(OnLoadedNewFloor)); ((PassiveItem)this).Owner.OnUsedPlayerItem -= ActivateFrostFireTempest; if (FrostFireTempestCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(FrostFireTempestCoroutine); } isFrostFireTempestActive = true; base.AuraRadius = FrostFireTempestRadius; base.DamagePerSecond = FrostFireTempestDamage; if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } activeVFXObject = ((GameActor)((PassiveItem)this).Owner).PlayEffectOnActor(EffectVFX, new Vector3(3.1875f, 2.5f, -2f), true, false, false); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -50f; ((tk2dBaseSprite)component).scale = new Vector3(2.5f, 2.5f, 0f); ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.5f); } ABSOLUTECONVERGENCEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ABSOLUTE_CONVERGENCE) && ABSOLUTECONVERGENCEActivated) { PlayerController owner2 = ((PassiveItem)this).Owner; owner2.OnNewFloorLoaded = (Action)Delegate.Remove(owner2.OnNewFloorLoaded, new Action(OnLoadedNewFloor)); ((PassiveItem)this).OnPickedUp = (Action)Delegate.Remove(((PassiveItem)this).OnPickedUp, new Action(OnLoadedNewFloor)); ((PassiveItem)this).Owner.OnUsedPlayerItem += ActivateFrostFireTempest; base.AuraRadius = 0f; base.DamagePerSecond = 0f; if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } isFrostFireTempestActive = false; ABSOLUTECONVERGENCEActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.FLAME_OVER_ICE) && !FLAMEOVERICEActivated) { FrostFireTempestDamage *= FLAMEOVERICEFrostFireTempestDamageMultiplier; if (isFrostFireTempestActive) { base.DamagePerSecond = FrostFireTempestDamage; } FLAMEOVERICEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.FLAME_OVER_ICE) && FLAMEOVERICEActivated) { FrostFireTempestDamage /= FLAMEOVERICEFrostFireTempestDamageMultiplier; if (isFrostFireTempestActive) { base.DamagePerSecond = FrostFireTempestDamage; } FLAMEOVERICEActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_OVER_FLAME) && !ICEOVERFLAMEActivated) { FrostFireTempestSlowEffect.SpeedMultiplier = ICEOVERFLAMEFrostFireTempestSlowPercent; ICEOVERFLAMEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_OVER_FLAME) && ICEOVERFLAMEActivated) { FrostFireTempestSlowEffect.SpeedMultiplier = FrostFireTempestSlowPercent; ICEOVERFLAMEActivated = false; } } ((AuraItem)this).Update(); } private void ActivateFrostFireTempest(PlayerController player, PlayerItem item) { if (!isFrostFireTempestActive) { FrostFireTempestCoroutine = ((MonoBehaviour)this).StartCoroutine(DoFrostFireTempestEffect(player)); } } private IEnumerator DoFrostFireTempestEffect(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__24(0) { <>4__this = this, player = player }; } public override void DoAura() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.m_extantAuraVFX == (Object)null) { } base.didDamageEnemies = false; if (base.AuraAction == null) { base.AuraAction = delegate(AIActor actor, float dist) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) float num = ((AuraItem)this).ModifiedDamagePerSecond * BraveTime.DeltaTime; if (base.DamageFallsOffInRadius) { float num2 = dist / ((AuraItem)this).ModifiedAuraRadius; num = Mathf.Lerp(num, 0f, num2); } if (num > 0f) { base.didDamageEnemies = true; } ((BraveBehaviour)actor).healthHaver.ApplyDamage(num, Vector2.zero, "Aura", base.damageTypes, (DamageCategory)0, false, (PixelCollider)null, false); ((GameActor)actor).ApplyEffect((GameActorEffect)(object)FrostFireTempestSlowEffect, 1f, (Projectile)null); }; } if ((Object)(object)((PassiveItem)this).m_owner != (Object)null && ((PassiveItem)this).m_owner.CurrentRoom != null) { ((PassiveItem)this).m_owner.CurrentRoom.ApplyActionToNearbyEnemies(((GameActor)((PassiveItem)this).m_owner).CenterPosition, ((AuraItem)this).ModifiedAuraRadius, base.AuraAction); } if (base.didDamageEnemies) { ((PassiveItem)this).m_owner.DidUnstealthyAction(); } } private void OnLoadedNewFloor(PlayerController player) { //IL_0035: 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 ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } activeVFXObject = ((GameActor)player).PlayEffectOnActor(EffectVFX, new Vector3(3.1875f, 2.5f, -2f), true, false, false); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = -50f; ((tk2dBaseSprite)component).scale = new Vector3(2.5f, 2.5f, 0f); ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.5f); } } } public class GuinsoosRageblade : PassiveItem { [CompilerGenerated] private sealed class d__19 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Projectile proj; public GuinsoosRageblade <>4__this; private PlayerController 5__1; private GameActor 5__2; private SpeculativeRigidbody 5__3; private Color 5__4; private Vector2 5__5; private ProjectileData 5__6; private float 5__7; private float 5__8; private float 5__9; private Projectile 5__10; private float 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__19(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; 5__6 = null; 5__10 = null; <>1__state = -2; } private bool MoveNext() { //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_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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown //IL_0300: 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_030f: 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_0389: 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_03e8: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; if ((Object)(object)proj == (Object)null || (Object)(object)proj.Owner == (Object)null) { Plugin.Log("fail 1"); return false; } if (!Object.op_Implicit((Object)(object)proj)) { Plugin.Log("fail 2"); return false; } ref PlayerController reference = ref 5__1; GameActor owner = proj.Owner; reference = (PlayerController)(object)((owner is PlayerController) ? owner : null); 5__2 = proj.Owner; 5__3 = proj.Shooter; 5__4 = ExtendedColours.brown; if ((Object)(object)((BraveBehaviour)proj).sprite != (Object)null) { 5__4 = ((BraveBehaviour)proj).sprite.color; } <>2__current = (object)new WaitForSeconds(0.001f); <>1__state = 1; return true; } case 1: { <>1__state = -1; Vector2 lastVelocity = proj.LastVelocity; 5__5 = ((Vector2)(ref lastVelocity)).normalized; 5__6 = new ProjectileData(); 5__6.damage = proj.baseData.damage; 5__6.force = proj.baseData.force; 5__6.speed = proj.baseData.speed; 5__6.range = proj.baseData.range; 5__7 = 0.3f; 5__8 = ((GameActor)5__1).CurrentGun.DefaultModule.cooldownTime; 5__9 = Mathf.Max(5__8 * 5__7 / 5__1.stats.GetStatValue((StatType)1), 0.01f); 5__9 = Mathf.Ceil(5__9 * 100f) / 100f; <>2__current = (object)new WaitForSeconds(5__9 - 0.001f); <>1__state = 2; return true; } case 2: <>1__state = -1; if ((Object)(object)proj == (Object)null) { return false; } 5__10 = Object.Instantiate(((Component)proj).gameObject).GetComponent(); 5__10.baseData = 5__6; 5__10.Owner = 5__2; 5__10.Shooter = 5__3; 5__1.DoPostProcessProjectile(5__10); <>4__this.phantomHitCount--; if ((Object)(object)((BraveBehaviour)proj).sprite != (Object)null) { ((BraveBehaviour)5__10).sprite.color = Color.Lerp(5__4, ExtendedColours.carrionRed, 0.7f); } if (5__1.HasSynergy(Synergy.BLADES_OF_CHAOS)) { Projectile obj = 5__10; obj.OnHitEnemy = (Action)Delegate.Combine(obj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { if (!((Object)(object)enemy == (Object)null) && !((Object)(object)((BraveBehaviour)enemy).healthHaver == (Object)null)) { if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { ((GameActor)((BraveBehaviour)enemy).aiActor).ApplyEffect((GameActorEffect)(object)BLADESOFCHAOSBurnEffect, 1f, (Projectile)null); } else if ((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null) { ((GameActor)((Component)enemy).GetComponentInParent()).ApplyEffect((GameActorEffect)(object)BLADESOFCHAOSBurnEffect, 1f, (Projectile)null); } } }); } ((BraveBehaviour)5__10).transform.position = ((GameActor)5__1).CurrentGun.barrelOffset.position; 5__11 = Mathf.Atan2(5__5.y, 5__5.x) * 57.29578f; ((BraveBehaviour)5__10).transform.rotation = Quaternion.Euler(0f, 0f, 5__11); 5__10.SendInDirection(5__5, true, true); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Guinsoo's Rageblade"; private int phantomHitCount = 0; private int phantomHitCap = 3; private static float DamageStat = 1.25f; private static float RateOfFireStat = 1.2f; private const int AK47_ID = 15; private static Gun phoenix; private static GameActorFireEffect BLADESOFCHAOSBurnEffect; public bool POSEIGUNSWRATHActivated = false; private static float POSEIGUNSWRATHProjSpeedStat; private static float POSEIGUNSWRATHReloadSpeedStat; public bool TRIPLEDELUXEActivated = false; private static int TRIPLEDELUXEphantomHitCap; public static int ID; 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_0061: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/guinsoos_rageblade_pixelart_sprite_small"; GameObject val = new GameObject(itemName); GuinsoosRageblade guinsoosRageblade = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*not affiliated with Kratos*"; string text3 = "Increase damage and fire rate\nEvery 3rd bullet fires an additional copy of that bullet.\n\nForged in the foulest depths of the Void. These blades increase one's capacity for rage and destruction. Perhaps you should not wield them.\n"; ItemBuilder.SetupItem((PickupObject)(object)guinsoosRageblade, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)guinsoosRageblade, (StatType)5, DamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)guinsoosRageblade, (StatType)1, RateOfFireStat, (ModifyMethod)1); ((PickupObject)guinsoosRageblade).quality = (ItemQuality)5; ID = ((PickupObject)guinsoosRageblade).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; } phantomHitCount = 0; } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.POSEIGUNS_WRATH) && !POSEIGUNSWRATHActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)6, POSEIGUNSWRATHProjSpeedStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)10, POSEIGUNSWRATHReloadSpeedStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); POSEIGUNSWRATHActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.POSEIGUNS_WRATH) && POSEIGUNSWRATHActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)6); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)10); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PassiveItem)this).Owner.stats, ((PassiveItem)this).Owner); POSEIGUNSWRATHActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.TRIPLE_DELUXE) && !TRIPLEDELUXEActivated) { phantomHitCap = TRIPLEDELUXEphantomHitCap; TRIPLEDELUXEActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.TRIPLE_DELUXE) && TRIPLEDELUXEActivated) { phantomHitCap = 3; TRIPLEDELUXEActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(Projectile proj, float f) { if ((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody) { phantomHitCount++; if (phantomHitCount >= phantomHitCap) { GameActor owner = proj.Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); phantomHitCount = 0; ((MonoBehaviour)val).StartCoroutine(FirePhantomProjectileDelayed(proj)); } } } private IEnumerator FirePhantomProjectileDelayed(Projectile proj) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__19(0) { <>4__this = this, proj = proj }; } static GuinsoosRageblade() { //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_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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown PickupObject byId = PickupObjectDatabase.GetById(384); phoenix = (Gun)(object)((byId is Gun) ? byId : null); BLADESOFCHAOSBurnEffect = new GameActorFireEffect { duration = 5f, DamagePerSecondToEnemies = 10f, effectIdentifier = "blades_of_chaos_synergy_burn_effect", ignitesGoops = false, FlameVfx = phoenix.DefaultModule.projectiles[0].fireEffect.FlameVfx }; POSEIGUNSWRATHProjSpeedStat = 1.5f; POSEIGUNSWRATHReloadSpeedStat = 0.6f; TRIPLEDELUXEphantomHitCap = 2; } } internal class StatikkShiv : PassiveItem { public static string ItemName = "Statikk Shiv"; private static float ElectroSparkDamage = 10f; private static float ElectroSparkChainCount = 8f; private static float ElectroSparkChainRange = 8f; private int ElectroSparkShotCount = 5; private int ElectroSparkShotCountTracker = 0; public bool STATIKKELECTRICITYActivated = false; private static int STATIKKELECTRICITYElectroSparkShotCountInc = 4; public bool MOLIGHTNINGActivated = false; private static float MOLIGHTNINGElectroSparkDamageInc = 3f; private static float MOLIGHTNINGElectroSparkChainCountInc = 3f; private static float MOLIGHTNINGElectroSparkChainRangeInc = 2f; public bool EMPEROROFLIGHTNINGActivated = false; private static int EMPEROROFLIGHTNINGElectroSparkShotCountInc = 5; private static float EMPEROROFLIGHTNINGElectroSparkDamageInc = 5f; public static int ID; 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_0045: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/statikk_shiv_pixelart_sprite"; GameObject val = new GameObject(itemName); StatikkShiv statikkShiv = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*shocks you*"; string text3 = "Increase damage and fire rate\nFirst 5 bullets of clip applies a chain lightning to enemies hit.\n\nSupposed to be a replica of Zeus's Lightning Bolt.\njust a shiv with a taser\n"; ItemBuilder.SetupItem((PickupObject)(object)statikkShiv, text2, text3, "LOLItems"); ((PickupObject)statikkShiv).quality = (ItemQuality)4; ID = ((PickupObject)statikkShiv).PickupObjectId; } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); player.PostProcessProjectile += OnPostProcessProjectile; player.OnReloadedGun = (Action)Delegate.Combine(player.OnReloadedGun, new Action(ResetElectroSpark)); ElectroSparkShotCountTracker = ElectroSparkShotCount; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { player.PostProcessProjectile -= OnPostProcessProjectile; player.OnReloadedGun = (Action)Delegate.Remove(player.OnReloadedGun, new Action(ResetElectroSpark)); } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.STATIKK_ELECTRICITY) && !STATIKKELECTRICITYActivated) { ElectroSparkShotCount += STATIKKELECTRICITYElectroSparkShotCountInc; ResetElectroSpark(null, null); STATIKKELECTRICITYActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.STATIKK_ELECTRICITY) && STATIKKELECTRICITYActivated) { ElectroSparkShotCount -= STATIKKELECTRICITYElectroSparkShotCountInc; ResetElectroSpark(null, null); STATIKKELECTRICITYActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.MO_LIGHTNING) && !MOLIGHTNINGActivated) { ElectroSparkDamage += MOLIGHTNINGElectroSparkDamageInc; ElectroSparkChainCount += MOLIGHTNINGElectroSparkChainCountInc; ElectroSparkChainRange += MOLIGHTNINGElectroSparkChainRangeInc; MOLIGHTNINGActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.MO_LIGHTNING) && MOLIGHTNINGActivated) { ElectroSparkDamage -= MOLIGHTNINGElectroSparkDamageInc; ElectroSparkChainCount -= MOLIGHTNINGElectroSparkChainCountInc; ElectroSparkChainRange -= MOLIGHTNINGElectroSparkChainRangeInc; MOLIGHTNINGActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.EMPEROR_OF_LIGHTNING) && !EMPEROROFLIGHTNINGActivated) { ElectroSparkShotCount += EMPEROROFLIGHTNINGElectroSparkShotCountInc; ElectroSparkDamage += EMPEROROFLIGHTNINGElectroSparkDamageInc; ResetElectroSpark(null, null); EMPEROROFLIGHTNINGActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.EMPEROR_OF_LIGHTNING) && EMPEROROFLIGHTNINGActivated) { ElectroSparkShotCount -= EMPEROROFLIGHTNINGElectroSparkShotCountInc; ElectroSparkDamage -= EMPEROROFLIGHTNINGElectroSparkDamageInc; ResetElectroSpark(null, null); EMPEROROFLIGHTNINGActivated = false; } } ((PassiveItem)this).Update(); } private void OnPostProcessProjectile(Projectile proj, float f) { //IL_0092: Unknown result type (might be due to invalid IL or missing references) GameActor owner = proj.Owner; PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null); if (val != null) { Gun currentGun = ((GameActor)val).CurrentGun; if (currentGun != null && (Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody && ElectroSparkShotCountTracker > 0) { PickupObject byId = PickupObjectDatabase.GetById(298); ComplexProjectileModifier val2 = (ComplexProjectileModifier)(object)((byId is ComplexProjectileModifier) ? byId : null); CustomLightningChainEnemiesModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)proj).gameObject); orAddComponent.LinkVFXPrefab = val2.ChainLightningVFX; orAddComponent.damageTypes = (CoreDamageTypes)64; orAddComponent.maximumLinkDistance = ElectroSparkChainRange; orAddComponent.damagePerHit = ElectroSparkDamage; orAddComponent.maxLinkCount = ElectroSparkChainCount; orAddComponent.DispersalDensity = 5f; orAddComponent.DispersalMaxCoherency = 0.7f; orAddComponent.DispersalMinCoherency = 0.3f; orAddComponent.UsesDispersalParticles = false; string[] newSFXList = new string[5] { "statikk_shiv_lightning_SFX_1", "statikk_shiv_lightning_SFX_2", "statikk_shiv_lightning_SFX_3", "statikk_shiv_lightning_SFX_4", "statikk_shiv_lightning_SFX_5" }; orAddComponent.updateSFXList(newSFXList); ElectroSparkShotCountTracker--; } } } private void ResetElectroSpark(PlayerController player, Gun gun) { ElectroSparkShotCountTracker = ElectroSparkShotCount; } } internal class Thornmail : OnDamagedPassiveItem { public static string ItemName = "Thornmail"; private static float HealthStat = 1f; private static int ArmorStat = 1; private static float ThornsDamage = 20f; private static float ThornsRadius = 7f; public bool ICECOLDTHORNSActivated = false; public SpawnProjectileOnDamagedItem HeartOfIceObject; private static int ICECOLDTHORNSHeartOfIceNumToSpawnMultiplier = 2; public bool THORNMAELSTROMActivated = false; private static float THORNMAELSTROMThornsDamageInc = 15f; private static float THORNMAELSTROMThornsRadiusInc = 5f; public bool OWSPLINTERActivated = false; private static float OWSPLINTERThornsDamageInc = 30f; public static int ID; 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_005e: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/passive_item_sprites/thornmail_pixelart_sprite_outline"; GameObject val = new GameObject(itemName); Thornmail thornmail = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*social distancing*"; string text3 = "+1 Heart and Armor\nTaking damage activates a blank and deals damage to nearby enemies.\n\nArmor with spikes. Spikes hurt. Don't touch wearer, spikes will hurt. Spikes on armor. Armor under spikes. Armor hurts. Because spikes hurt. Don't touch armor. Armor hurts.\n"; ItemBuilder.SetupItem((PickupObject)(object)thornmail, text2, text3, "LOLItems"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)thornmail, (StatType)3, HealthStat, (ModifyMethod)0); ((PassiveItem)thornmail).ArmorToGainOnInitialPickup = ArmorStat; ((PickupObject)thornmail).quality = (ItemQuality)3; ItemBuilder.AddToSubShop((PickupObject)(object)thornmail, (ShopType)3, 1f); ID = ((PickupObject)thornmail).PickupObjectId; } public override void Pickup(PlayerController player) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown ((OnDamagedPassiveItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); ((BraveBehaviour)player).healthHaver.OnDamaged += new OnDamagedEvent(OnPlayerDamaged); } public override void DisableEffect(PlayerController player) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown ((PassiveItem)this).DisableEffect(player); Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); if ((Object)(object)player != (Object)null) { ((BraveBehaviour)player).healthHaver.OnDamaged -= new OnDamagedEvent(OnPlayerDamaged); } } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null) { if (((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_COLD_THORNS) && !ICECOLDTHORNSActivated) { foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems) { if (((PickupObject)passiveItem).PickupObjectId == 364 && (Object)(object)passiveItem != (Object)null) { HeartOfIceObject = ((Component)passiveItem).GetComponent(); SpawnProjectileOnDamagedItem heartOfIceObject = HeartOfIceObject; heartOfIceObject.minNumToSpawn *= ICECOLDTHORNSHeartOfIceNumToSpawnMultiplier; SpawnProjectileOnDamagedItem heartOfIceObject2 = HeartOfIceObject; heartOfIceObject2.maxNumToSpawn *= ICECOLDTHORNSHeartOfIceNumToSpawnMultiplier; } } ICECOLDTHORNSActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.ICE_COLD_THORNS) && ICECOLDTHORNSActivated) { if ((Object)(object)HeartOfIceObject != (Object)null) { SpawnProjectileOnDamagedItem heartOfIceObject3 = HeartOfIceObject; heartOfIceObject3.minNumToSpawn /= ICECOLDTHORNSHeartOfIceNumToSpawnMultiplier; SpawnProjectileOnDamagedItem heartOfIceObject4 = HeartOfIceObject; heartOfIceObject4.maxNumToSpawn /= ICECOLDTHORNSHeartOfIceNumToSpawnMultiplier; } ICECOLDTHORNSActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.THORN_MAELSTROM) && !THORNMAELSTROMActivated) { ThornsDamage += THORNMAELSTROMThornsDamageInc; ThornsRadius += THORNMAELSTROMThornsRadiusInc; THORNMAELSTROMActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.THORN_MAELSTROM) && THORNMAELSTROMActivated) { ThornsDamage -= THORNMAELSTROMThornsDamageInc; ThornsRadius -= THORNMAELSTROMThornsRadiusInc; THORNMAELSTROMActivated = false; } if (((PassiveItem)this).Owner.HasSynergy(Synergy.OW_SPLINTER) && !OWSPLINTERActivated) { ThornsDamage += OWSPLINTERThornsDamageInc; OWSPLINTERActivated = true; } else if (!((PassiveItem)this).Owner.HasSynergy(Synergy.OW_SPLINTER) && OWSPLINTERActivated) { ThornsDamage -= OWSPLINTERThornsDamageInc; OWSPLINTERActivated = false; } } ((PassiveItem)this).Update(); } private void DoBlankDamage(PlayerController player) { //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_00a5: Unknown result type (might be due to invalid IL or missing references) if (player.CurrentRoom == null) { return; } List activeEnemies = player.CurrentRoom.GetActiveEnemies((ActiveEnemyType)0); if (activeEnemies == null) { return; } foreach (AIActor item in activeEnemies) { if ((Object)(object)item != (Object)null && (Object)(object)((BraveBehaviour)item).healthHaver != (Object)null && ((BraveBehaviour)item).healthHaver.IsVulnerable) { float num = Vector2.Distance(((GameActor)player).CenterPosition, ((GameActor)item).CenterPosition); if (num <= ThornsRadius) { ((BraveBehaviour)item).healthHaver.ApplyDamage(ThornsDamage, Vector2.zero, "thornmail_blank_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } } private void OnPlayerDamaged(float resultValue, float maxValue, CoreDamageTypes damageTypes, DamageCategory damageCategory, Vector2 damageDirection) { PlayerController owner = ((PassiveItem)this).Owner; owner.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f); DoBlankDamage(owner); } } } namespace LOLItems.guon_stones { internal class BraumsShield : AdvancedPlayerOrbitalItem { public static string ItemName = "Braum's Shield"; public static PlayerOrbital orbitalPrefab; public static PlayerOrbital upgradeOrbitalPrefab; public static int ID; public static void Init() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0044: 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) string itemName = ItemName; string text = "LOLItems/Resources/guon_sprites/braum_shield_sprites/braumshield_icon_001"; GameObject val = new GameObject(); BraumsShield braumsShield = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Stand behind me!"; string text3 = "It's just a guon stone lol.\n\nA repurposed vault door used as a shield in a far away land. The original wielder was said to have such a kind soul that his own protective instincts were instilled within the magic shield. Now it floats around to protect the user as best it can.\n"; ItemBuilder.SetupItem((PickupObject)(object)braumsShield, text2, text3, "LOLItems"); ((PickupObject)braumsShield).quality = (ItemQuality)4; BuildPrefab(); braumsShield.OrbitalPrefab = orbitalPrefab; BuildSynergyPrefab(); braumsShield.HasAdvancedUpgradeSynergy = true; braumsShield.AdvancedUpgradeSynergy = "Test Guon Stone Synergy"; braumsShield.AdvancedUpgradeOrbitalPrefab = ((Component)upgradeOrbitalPrefab).gameObject; ((PickupObject)braumsShield).quality = (ItemQuality)2; ID = ((PickupObject)braumsShield).PickupObjectId; } public static void BuildPrefab() { //IL_0034: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)orbitalPrefab != (Object)null)) { GameObject val = SpriteBuilder.SpriteFromResource("LOLItems/Resources/guon_sprites/braum_shield_sprites/braumshield_nofire_001", (GameObject)null, (Assembly)null); ((Object)val).name = "Test Guon Stone Orbital"; SpeculativeRigidbody val2 = SpriteBuilder.SetUpSpeculativeRigidbody(val.GetComponent(), IntVector2.Zero, new IntVector2(11, 12)); val2.CollideWithTileMap = false; val2.CollideWithOthers = true; val2.PrimaryPixelCollider.CollisionLayer = (CollisionLayer)15; orbitalPrefab = val.AddComponent(); orbitalPrefab.motionStyle = (OrbitalMotionStyle)0; orbitalPrefab.shouldRotate = false; orbitalPrefab.orbitRadius = 2.5f; orbitalPrefab.orbitDegreesPerSecond = 120f; orbitalPrefab.perfectOrbitalFactor = 0f; orbitalPrefab.SetOrbitalTier(0); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); val.SetActive(false); } } public static void BuildSynergyPrefab() { //IL_0035: 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_006a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)upgradeOrbitalPrefab == (Object)null) { GameObject val = SpriteBuilder.SpriteFromResource("LOLItems/Resources/npc_sprites/shopkeeper/talk", (GameObject)null, (Assembly)null); ((Object)val).name = "Your Guon Orbital Synergy Form"; SpeculativeRigidbody val2 = SpriteBuilder.SetUpSpeculativeRigidbody(val.GetComponent(), IntVector2.Zero, new IntVector2(11, 12)); upgradeOrbitalPrefab = val.AddComponent(); val2.CollideWithTileMap = false; val2.CollideWithOthers = true; val2.PrimaryPixelCollider.CollisionLayer = (CollisionLayer)15; upgradeOrbitalPrefab.shouldRotate = false; upgradeOrbitalPrefab.orbitRadius = 2.5f; upgradeOrbitalPrefab.orbitDegreesPerSecond = 120f; upgradeOrbitalPrefab.perfectOrbitalFactor = 10f; upgradeOrbitalPrefab.SetOrbitalTier(0); Object.DontDestroyOnLoad((Object)(object)val); FakePrefab.MarkAsFakePrefab(val); val.SetActive(false); } } public override void Update() { base.Update(); } public override void Pickup(PlayerController player) { base.Pickup(player); } public override DebrisObject Drop(PlayerController player) { return base.Drop(player); } public override void OnDestroy() { base.OnDestroy(); } } } namespace LOLItems.custom_class_data { public enum Items { MagicLamp = 0, Winchester = 1, Thompson = 2, Screecher = 3, StickyCrossbow = 4, Awp = 5, Zorgun = 6, Barrel = 7, Bow = 8, DuelingPistol = 9, MegaDouser = 10, Crossbow = 12, Thunderclap = 13, BeeHive = 14, Ak47 = 15, YariLauncher = 16, HeckBlaster = 17, Blooper = 18, GrenadeLauncher = 19, Moonscraper = 20, Bsg = 21, ShadesRevolver = 22, DungeonEagle = 23, DartGun = 24, M1 = 25, NailGun = 26, LightGun = 27, Mailbox = 28, Vertebraek47 = 29, M1911 = 30, Klobbe = 31, VoidMarshal = 32, TearJerker = 33, SmileysRevolver = 35, Megahand = 36, SeriousCannon = 37, Magnum = 38, Rpg = 39, FreezeRay = 40, Heroine = 41, TrankGun = 42, MachinePistol = 43, SkullSpitter = 45, Jolter = 47, SniperRifle = 49, Saa = 50, RegularShotgun = 51, CrescentCrossbow = 52, AuGun = 53, LaserRifle = 54, VoidShotgun = 55, _38Special = 56, AlienSidearm = 57, VoidCoreAssaultRifle = 58, HegemonyRifle = 59, DemonHead = 60, BundleOfWands = 61, Colt1851 = 62, Medkit = 63, PotionOfLeadSkin = 64, KnifeShield = 65, ProximityMine = 66, Key = 67, Casing = 68, BulletTime = 69, Unknown2 = 70, Decoy = 71, BubbleShield = 72, HalfHeart = 73, _50Casing = 74, EyeJewel = 76, SupplyDrop = 77, Ammo = 78, Makarov = 79, BudgetRevolver = 80, Deck4rd = 81, ElephantGun = 82, UnfinishedGun = 83, VulcanCannon = 84, Heart = 85, MarineSidearm = 86, GammaRay = 87, RobotsRightHand = 88, RogueSpecial = 89, EyeOfTheBeholster = 90, H4mmer = 91, Stinger = 92, OldGoldie = 93, Mac10 = 94, Akey47 = 95, M16 = 96, Polaris = 97, Patriot = 98, RustySidearm = 99, UnicornHorn = 100, Scope = 102, Ration = 104, FortunesFavor = 105, Jetpack = 106, RaidenCoil = 107, Bomb = 108, IceBomb = 109, MagicSweet = 110, HeavyBullets = 111, CartographersRing = 112, RocketPoweredBullets = 113, BionicLeg = 114, Ballot = 115, AmmoSynthesizer = 116, Eyepatch = 118, Metronome = 119, Armor = 120, Disintegrator = 121, Blunderbuss = 122, PulseCannon = 123, Cactus = 124, FlameHand = 125, Shotbow = 126, Junk = 127, RubeAdyneMk2 = 128, Com4nd0 = 129, Glacier = 130, UtilityBelt = 131, RingOfMiserlyProtection = 132, Backpack = 133, AmmoBelt = 134, CogOfBattle = 135, C4 = 136, Map = 137, Honeycomb = 138, MasterOfUnlocking = 140, RubeAdynePrototype = 142, ShotgunFullOfHate = 143, WitchPistol = 145, Dragunfire = 146, PlaceableKey = 147, Lies = 148, FaceMelter = 149, TShirtCannon = 150, TheMembrane = 151, TheKiln = 152, ShockRifle = 153, Trashcannon = 154, Singularity = 155, LaserLotus = 156, BigIron = 157, AmuletOfThePitLord = 158, GundromedaStrain = 159, GunknightHelmet = 160, GunknightGreaves = 161, GunknightGauntlet = 162, GunknightArmor = 163, HeartSynthesizer = 164, OiledCylinder = 165, ShelletonKey = 166, BloodyEye = 167, DoubleVision = 168, BlackHoleGun = 169, IceCube = 170, GhostBullets = 172, PileOfSouls = 173, PotionOfGunFriendship = 174, Tangler = 175, GungeonAnt = 176, AlienEngine = 177, Crestfaller = 178, ProtonBackpack = 179, Grasschopper = 180, WinchesterRifle = 181, GreyMauser = 182, SerManuelsRevolver = 183, TheJudge = 184, MachineFist = 186, DisarmingPersonality = 187, RollingEye = 190, RingOfFireResistance = 191, BugBoots = 193, FossilizedGun = 196, PeaShooter = 197, GunslingersAshes = 198, LuxinCannon = 199, CharmedBow = 200, PortableTurret = 201, SawedOff = 202, Cigarettes = 203, IrradiatedLead = 204, PoisonVial = 205, CharmHorn = 206, PlaguePistol = 207, Plunger = 208, SenseOfDirection = 209, Gunbow = 210, BallisticBoots = 212, LichyTriggerFinger = 213, CoinCrown = 214, Box = 216, OldKnightsShield = 219, TutorialAk47 = 221, OldKnightsHelm = 222, Cold45 = 223, Blank = 224, IceBreaker = 225, Wristbow = 227, Particulator = 228, HegemonyCarbine = 229, Helix = 230, GildedHydra = 231, SpaceFriend = 232, IbombCompanionApp = 234, AgedBell = 237, DuctTape = 239, Crutch = 240, Scattershot = 241, NapalmStrike = 242, InfuriatingNote1 = 243, InfuriatingNote2 = 244, InfuriatingNote3 = 245, InfuriatingNote4 = 246, InfuriatingNote5 = 247, InfuriatingNote6 = 248, Owl = 249, GrapplingHook = 250, PrizePistol = 251, AirStrike = 252, GungeonPepper = 253, RingOfChestFriendship = 254, AncientHerosBandana = 255, HeavyBoots = 256, Broccoli = 258, Antibody = 259, PinkGuonStone = 260, WhiteGuonStone = 262, OrangeGuonStone = 263, ClearGuonStone = 264, OldKnightsFlask = 267, RedGuonStone = 269, BlueGuonStone = 270, RiddleOfLead = 271, IronCoin = 272, LaserSight = 273, DarkMarker = 274, FlareGun = 275, Spice = 276, FatBullets = 277, FrostBullets = 278, SuperHotWatch = 279, DrumClip = 280, GungeonBlueprint = 281, HomingBullets = 284, BloodBrooch = 285, _1Bullets = 286, BackupGun = 287, BouncyBullets = 288, SevenLeafClover = 289, Sunglasses = 290, Meatbun = 291, MolotovLauncher = 292, MimicToothNecklace = 293, RingOfMimicFriendship = 294, HotLead = 295, MetashopBreachItemOld = 296, HegemonyCredit = 297, ShockRounds = 298, SuperSpaceTurtlesGun = 299, Dog = 300, SuperSpaceTurtle = 301, BulletThatCanKillThePast = 303, ExplosiveRounds = 304, OldCrest = 305, EscapeRope = 306, WaxWings = 307, ClusterMine = 308, CloranthyRing = 309, FairyWings = 310, Clone = 311, BlastHelmet = 312, MonsterBlood = 313, Nanomachines = 314, Gunboots = 315, GnawedKey = 316, R2g2 = 318, Ticket = 320, GoldAmmolet = 321, LodestoneAmmolet = 322, AngryBullets = 323, ChaosAmmolet = 325, Number2 = 326, Corsair = 327, ChargeShot = 328, ZillaShotgun = 329, TheEmperor = 330, ScienceCannon = 331, LilBomber = 332, Mutation = 333, WindUpGun = 334, Silencer = 335, Pitchfork = 336, CompositeGun = 337, Gunther = 338, Mahoguny = 339, LowerCaseR = 340, Buzzkill = 341, UraniumAmmolet = 342, CopperAmmolet = 343, FrostAmmolet = 344, Fightsabre = 345, Huntsman = 346, Shotgrub = 347, PrimePrimer = 348, PlanarLead = 349, ObsidianShellCasing = 350, ArcaneGunpowder = 351, ShadowBullets = 352, EnragingPhoto = 353, MilitaryTraining = 354, ChromesteelAssaultRifle = 355, TrustyLockpicks = 356, CatClaw = 357, Railgun = 358, CompressedAirTank = 359, Snakemaker = 360, BulletBore = 362, TrickGun = 363, HeartOfIce = 364, MassShotgun = 365, Molotov = 366, HuntersJournal = 367, ElTigre = 368, BaitLauncher = 369, PrototypeRailgun = 370, RcRocket = 372, AlphaBullets = 373, OmegaBullets = 374, EasyReloadBullets = 375, BrickBreaker = 376, Excaliber = 377, Derringer = 378, ShotgunFullOfLove = 379, BetrayersShield = 380, TripleCrossbow = 381, Sling = 382, FlashRay = 383, Phoenix = 384, Hexagun = 385, FrostGiant = 387, CobaltHammer = 390, CellKey = 392, Anvillain = 393, MineCutter = 394, StaffOfFirepower = 395, TableTechSight = 396, TableTechMoney = 397, TableTechRocket = 398, TableTechRage = 399, TableTechBlanks = 400, Gungine = 401, Snowballer = 402, MeltedRock = 403, Siren = 404, Rattler = 406, SixthChamber = 407, BustedTelevision = 409, BatteryBullets = 410, CoolantLeak = 411, FriendshipCookie = 412, HerosSword = 413, LiveAmmo = 414, ReplacementArm = 415, Balloon = 416, Blasphemy = 417, TrorcBreachItem = 418, HeartHolster = 421, HeartLunchbox = 422, HeartLocket = 423, HeartBottle = 424, HeartPurse = 425, ShotgaCola = 426, ShotgunCoffee = 427, GooptonBreachItem = 429, LiquidValkyrie = 431, JarOfBees = 432, StuffedStar = 433, BulletIdol = 434, Mustache = 435, BloodiedScarf = 436, MuscleRelaxant = 437, ExplosiveDecoy = 438, BracketKey = 439, RubyBracelet = 440, EmeraldBracelet = 441, Badge = 442, BigBoy = 443, Trident = 444, TheScrambler = 445, ShieldOfTheMaiden = 447, Boomerang = 448, TeleporterPrototype = 449, ArmorSynthesizer = 450, Pig = 451, Sponge = 452, GasMask = 453, HazmatSuit = 454, RingOfTriggers = 456, ArmorOfThorns = 457, RingOfEtherealForm = 458, ChaffGrenade = 460, BlankCompanionsRing = 461, SmokeBomb = 462, RingOfTheResourcefulRat = 463, Shellegun = 464, TableTechStun = 465, GreenGuonStone = 466, MasterRound5 = 467, MasterRound3 = 468, MasterRound1 = 469, MasterRound4 = 470, MasterRound2 = 471, GummyGun = 472, HiddenCompartment = 473, AbyssalTentacle = 474, QuadLaser = 475, MicrotransactionGun = 476, Origuni = 477, Banana = 478, SuperMeatGun = 479, MakeshiftCannon = 480, Camera = 481, Gunzheng = 482, Tetrominator = 483, Devolver = 484, Orange = 485, TreadnaughtCannon = 486, BookOfChestAnatomy = 487, RingOfChestVampirism = 488, GunSoul = 489, BrickOfCash = 490, Wingman = 491, Wolf = 492, BriefcaseOfCash = 493, GalacticMedalOfValor = 494, Unity = 495, MetashopBreachItemGun = 497, ElderBlank = 499, HipHolster = 500, MetashopBreachItemItem = 501, HmAbsolutionRockets = 502, Bullet = 503, HyperLightBlaster = 504, MagnumWickedSister = 505, ReallySpecialLute = 506, Starpew = 507, DuelingLaser = 508, Jk47 = 510, _3rdPartyController = 511, Shell = 512, Poxcannon = 513, DirectionalPad = 514, MourningStar = 515, TripleGun = 516, TripleGunForm2 = 517, TripleGunForm3 = 518, CombinedRifle = 519, BalloonGun = 520, ChanceBullets = 521, StoutBullets = 523, Bloody9mm = 524, LamentConfigurum = 525, SpringheelBoots = 526, CharmingRounds = 527, ZombieBullets = 528, BattleStandard = 529, RemoteBullets = 530, FlakBullets = 531, GildedBullets = 532, MagicBullets = 533, RealCoolBow = 535, Relodestone = 536, VorpalGun = 537, SilverBullets = 538, BoxingGlove = 539, GlassCannon = 540, Casey = 541, StrafeGun = 542, ThePredator = 543, Ac15Unarmored = 544, Ac15 = 545, Windgunner = 546, KnightsGun = 550, CrownOfGuns = 551, Bottle = 558, TheFatLine = 562, TheExotic = 563, FullMetalJacket = 564, GlassGuonStone = 565, RadGun = 566, RollBomb = 567, HelixBullets = 568, ChaosBullets = 569, YellowChamber = 570, CursedBullets = 571, ChickenFlute = 572, ChestTeleporter = 573, WoodenBlasphemy = 574, DougBreachItem = 575, RobotsLeftHand = 576, TurboGun = 577, Sprun = 578, BlankBullets = 579, Junkan = 580, VoidCoreCannon = 593, MoonlightTiara = 594, LifeOrb = 595, Teapot = 596, MrAccretionJr = 597, StoneDome = 598, BubbleBlaster = 599, PartialAmmo = 600, BigShotgun = 601, Gunner = 602, LameyGun = 603, Slinger = 604, LootBag = 605, ClownMask = 607, MutationNeoTechYo = 608, RubeAdyneRubensteinsMonster = 609, WoodBeam = 610, Ak47IslandForme = 611, HeroineWaveBeam = 612, HeroineIceBeam = 613, HeroinePlasmaBeam = 614, HeroineHyberBeam = 615, CaseyCarefulIteration = 616, MegahandQuickBoomerang = 617, MegahandTimeStopper = 618, MegahandMetalBlade = 619, MegahandLeafShield = 620, MegahandAtomicFire = 621, MegahandBubbleLead = 622, MegahandAirShooter = 623, MegahandCrashBomber = 624, Drill = 625, Elimentaler = 626, PlatinumBullets = 627, Bumbullets = 630, HoleyGrail = 631, Turkey = 632, TableTechShotgun = 633, CrisisStone = 634, Snowballets = 636, WeirdEgg = 637, DevolverRounds = 638, VorpalBullets = 640, GoldJunk = 641, Daruma = 643, PortableTableDevice = 644, TurtleProblem = 645, ChamberGun = 647, TanglerFullCircle = 648, UppercaseR = 649, PaydayWinchester = 650, RogueSpecialAlt = 651, BudgetRevolverAlt = 652, GunPiece = 654, HungryBullets = 655, KrullerGlaive = 656, ChamberGunOubliette = 657, ChamberGunForge = 658, ChamberGunHollow = 659, ChamberGunProper = 660, OrbitalBullets = 661, PartiallyEatenCheese = 662, ResourcefulSack = 663, BabyGoodMimic = 664, MachoBrace = 665, TableTechHeat = 666, RatBoots = 667, EnemyElimentaler = 668, HighDragunfire = 670, GammaRayBetaRay = 671, ElephantGunTheElephantInTheRoom = 672, MachinePistolPistolMachine = 673, PeaShooterPeaCannon = 674, DuelingPistolDualingPistol = 675, LaserRifleLaserLightShow = 676, DragunfireKalibreath = 677, BlunderbussBlunderbrace = 678, SnowballerSnowballShotgun = 679, ExcaliberArmoredCorps = 680, _38SpecialDetectiveMode = 681, PlaguePistolPandemicPistol = 682, ThunderclapAlistairsLadder = 683, M1M1MultiTool = 684, ThompsonFutureGangster = 685, CorsairBlackFlag = 686, CrestfallerFiveOclockSomewhere = 687, BananaFruitsAndVegetables = 688, AbyssalTentacleKalibersGrip = 689, KlobbeKlobberingTime = 690, MolotovLauncherSpecialReserve = 691, NailGunNailedIt = 692, GunbowShowAcrossTheBow = 693, BigIronIronSlug = 694, HyperLightBlasterHardLight = 695, AlienSidearmChiefMaster = 696, ShockRifleBatteryPowered = 697, FlameHandMaximizeSpell = 698, HegemonyRifleHegemonySpecialForces = 699, CactusCactusFlower = 700, LuxinCannonNoxinCannon = 701, FaceMelterAlternativeRock = 702, BeeHiveApiary = 703, TrashcannonRecyclingBin = 704, FlashRaySaviorOfTheUniverse = 705, FlareGunFiringWithFlair = 706, VulcanCannonNotQuiteAsMini = 707, HelixDoubleDoubleHelix = 708, BarrelLikeShootingFish = 709, FreezeRayIceCap = 710, LightGunPeripheralVision = 711, RaidenCoilRaiden = 712, MoonscraperDoubleMoon7 = 713, LaserLotusLotusBloom = 714, H4mmerHammerAndNail = 715, AwpArcticWarfare = 716, BulletBoreCerebralBros = 717, PolarisSquareBrace = 718, LilBomberKingBomber = 719, ProtonBackpackElectronPack = 720, JolterHeavyJolt = 721, PitchforkPitchPerfect = 722, Com4nd0CommammoBelt = 723, HegemonyCarbineRubyCarbine = 724, TearJerkerUnknown = 725, Akey47AkeyBreaky = 726, RatKey = 727, GunderfuryLv50 = 728, GunderfuryLv60 = 729, GunderfuryLv40 = 730, GunderfuryLv30 = 731, GunderfuryLv10 = 732, GunderfuryLv20 = 733, MimicGun = 734, Serpent = 735, PhoenixPhoenixUp = 736, BetrayersShieldBetrayersLies = 737, LowerCaseRUnknown = 738, GungeonAntGreatQueenAnt = 739, BuzzkillNotSoSawedOff = 740, TearJerkerWrathOfTheBlam = 741, AlienEngineContrail = 742, RadGunKungFuHippieRappinSurfer = 743, OriguniParchmental = 744, IceBreakerGunderlord = 745, TurtineGun = 747, SunlightJavelin = 748, ShotbowSecondAccident = 749, DungeonEagleDontHootTheMessenger = 750, BigGun = 751, WestBroNomesRevolver = 752, WestBroTucosRevolver = 753, WestBroAngelsRevolver = 754, Evolver = 755, EvolverSponge = 756, EvolverFlatworm = 757, EvolverSnail = 758, EvolverFrog = 759, EvolverDragon = 760, HighKaliber = 761, FinishedGun = 762, ChamberGunHell = 763, ChamberGunAbbey = 806, ChamberGunMines = 807, ChamberGunRatLair = 808, MarineSidearmAlt = 809, RustySidearmAlt = 810, DartGunAlt = 811, RobotsRightHandAlt = 812, BlasphemyAlt = 813, MagazineRack = 814, LichsEyeBullets = 815, TrankGunINeedScissors = 816, CatBulletKingThrone = 817, BabyGoodShelleton = 818, GlassCannonSteelSkin = 819, ShadowClone = 820, Scouter = 821, KatanaBullets = 822, ChamberGunRNG = 823 } public enum StatTypesEnum { MovementSpeed, RateOfFire, Accuracy, Health, Coolness, Damage, ProjectileSpeed, AdditionalGunCapacity, AdditionalItemCapacity, AmmoCapacityMultiplier, ReloadSpeed, AdditionalShotPiercing, KnockbackMultiplier, GlobalPriceMultiplier, Curse, PlayerBulletScale, AdditionalClipCapacityMultiplier, AdditionalShotBounces, AdditionalBlanksPerFloor, ShadowBulletChance, ThrownGunDamage, DodgeRollDamage, DamageToBosses, EnemyProjectileSpeedMultiplier, ExtremeShadowBulletChance, ChargeAmountMultiplier, RangeMultiplier, DodgeRollDistanceMultiplier, DodgeRollSpeedMultiplier, TarnisherClipCapacityMultiplier, MoneyMultiplierFromEnemies } public static class ShaderBase { public static readonly string[] Shaders = new string[152] { "Brave_Alpha Mask Mood Renderer", "Brave_AmmonomiconSpriteListShader", "Brave_BlendEmissiveMaskedCutout", "Brave_BraveTilesetWallColorEmissiveCutout", "Brave_BurnableSprite", "Brave_CameraEffects_BossCardEffect", "Brave_CameraEffects_DepthToColor", "Brave_CameraEffects_Pixelator_FinalFade", "Brave_CameraEffects_Pixelator_VignetteFade", "Brave_CameraEffects_UpsideDownEffect", "Brave_CameraEffects_Vignette", "Brave_CutoutEmissiveGodrayExperimental", "Brave_DebrisPitfallShader", "Brave_DebugLines", "Brave_DepthMask", "Brave_DisplacerBeast", "Brave_Effects_Curse Pot Circle", "Brave_Effects_CutoutPortalInternalTilted", "Brave_Effects_InterdimensionalHorrorPortal", "Brave_Effects_PartialDesaturationEffect", "Brave_Effects_PixelFog", "Brave_Effects_Scanlines", "Brave_Effects_SimpleCameraMask", "Brave_Effects_SimpleStencilMask", "Brave_Effects_SimplicityDerivativeShader", "Brave_Effects_Starnest_Replacement_Cheap", "Brave_Effects_StencilMask", "Brave_Effects_StencilMasked", "Brave_Effects_TitleFog", "Brave_Effects_TitleInk", "Brave_Effects_TitleSky", "Brave_Effects_TitleWaterShader", "Brave_Enemy Projectile Emissive UV Scroll", "Brave_Enemy Projectile Emissive", "Brave_GhostEnemy", "Brave_GoopShader", "Brave_GungeonTilemapFloorReflection", "Brave_HueShift", "Brave_Internal_AdditiveDimensionFog", "Brave_Internal_Black", "Brave_Internal_DarkPortalShader", "Brave_Internal_DistortionLine", "Brave_Internal_DistortionRadius", "Brave_Internal_DistortionWave", "Brave_Internal_DownwellAfterImage", "Brave_Internal_DragunTest", "Brave_Internal_EeveeOutline", "Brave_Internal_EndTimesEnvironmentShader", "Brave_Internal_FinalGunRoom_BG_01", "Brave_Internal_FinalGunRoom_BG_02", "Brave_Internal_GammaGamma", "Brave_Internal_GBuffer_Custom_DragunSpotlight", "Brave_Internal_GBuffer_LightMask", "Brave_Internal_GBuffer_LightMaskCombiner", "Brave_Internal_GBuffer_LightRenderer", "Brave_Internal_GBuffer_LightRenderer_Coronal", "Brave_Internal_GBuffer_LightRenderer_Fast", "Brave_Internal_Glitch", "Brave_Internal_GlitchEevee", "Brave_Internal_GlitchUnlit", "Brave_Internal_GlitterPassAdditive", "Brave_Internal_HighPriestAfterImage", "Brave_Internal_HologramShader", "Brave_Internal_PartialCopy", "Brave_Internal_PhotographBurn", "Brave_Internal_PhotographDissolve", "Brave_Internal_PitSpirits", "Brave_Internal_RadialDesaturateAndDarken", "Brave_Internal_RadiusIndicatorEffect", "Brave_Internal_RainbowChestShader", "Brave_Internal_RatFloorShader", "Brave_Internal_RatMazeTransition", "Brave_Internal_SimpleAlphaFadeUnlit", "Brave_Internal_SimpleBraveOutlineSpriteMask", "Brave_Internal_SimpleSpriteMask", "Brave_Internal_SimpleSpriteMaskSwitch", "Brave_Internal_SimpleSpriteMaskUnpixelated", "Brave_Internal_SimpleSpriteUnmask", "Brave_Internal_SinglePassOutline", "Brave_Internal_SpaceFogShader", "Brave_Internal_StarNest_Derivative", "Brave_Internal_WallMirror", "Brave_Internal_WorldDecay", "Brave_ItemSpecific_LootGlintAdditivePass", "Brave_ItemSpecific_LootGlintCutout", "Brave_ItemSpecific_MetalSkinLayerShader", "Brave_ItemSpecific_MetalSkinShader", "Brave_LitBlendUber", "Brave_LitCutoutUber", "Brave_LitCutoutUber_ColorEmissive", "Brave_LitCutoutUberPhantom", "Brave_LitTk2dCustomFalloff", "Brave_LitTk2dCustomFalloffCutout", "Brave_LitTk2dCustomFalloffHigherQueue", "Brave_LitTk2dCustomFalloffTilted", "Brave_LitTk2dCustomFalloffTiltedCutout", "Brave_LitTk2dCustomFalloffTiltedCutoutEmissive", "Brave_LitTk2dCustomFalloffTiltedCutoutEmissiveMapped", "Brave_LitTk2dCustomFalloffTiltedCutoutEmissiveVertexColor", "Brave_LitTk2dCustomFalloffTiltedCutoutFast", "Brave_LitTk2dCustomFalloffTiltedCutoutFastPixelShadow", "Brave_LitTk2dCustomFalloffTiltedCutoutFastPixelShadowPalette", "Brave_LitTk2dCustomFalloffTintable", "Brave_LitTk2dCustomFalloffTintableTilted", "Brave_LitTk2dCustomFalloffTintableTiltedCutout", "Brave_LitTk2dCustomFalloffTintableTiltedCutoutEmissive", "Brave_LitTk2dCustomFalloffTintableTiltedEmissive", "Brave_LitTk2dPaletteFalloffTintableTilted", "Brave_MagicCircle", "Brave_MeduziWaterCaustics", "Brave_Particles_Additive", "Brave_PitCaustics", "Brave_PlayerPalettized", "Brave_PlayerShader", "Brave_PlayerShaderEevee", "Brave_PlayerShaderNoStencil", "Brave_ReflectionOnly", "Brave_SimpleTextureAlphaFade", "Brave_Special_Rat Blender", "Brave_TilemapClampCutout", "Brave_Tinted Multiply (Double)", "Brave_Unity Transparent Cutout", "Brave_UnlitTintableCutoutColorEmissive", "Brave_UnlitTintableCutoutEmissive", "Cloud_ShaderForge_ShadowCaster", "Cloud_ShaderForge_Standard", "Custom_AmmonomiconPageShader", "Custom_AmmonomiconTransitionPageShader", "Custom_Caster Renderer Foyer", "Custom_Caster Renderer", "Custom_Shadow_Distance Intense", "Custom_Shadow_Distance", "Kvant_Tunnel_Surface_02", "Sonic Ether_Particles_Additive", "tk2d_AdditiveVertexColor", "tk2d_BlendVertexColor", "tk2d_BlendVertexColorAlphaTintableTilted", "tk2d_BlendVertexColorAlphaTintableTiltedHigherQueue", "tk2d_BlendVertexColorFadeRange", "tk2d_BlendVertexColorTilted", "tk2d_BlendVertexColorTintable", "tk2d_BlendVertexColorTintableTilted", "tk2d_BlendVertexColorUnlitTilted", "tk2d_CutoutVertexColor", "tk2d_CutoutVertexColorTilted", "tk2d_CutoutVertexColorTiltedDistorting", "tk2d_CutoutVertexColorTiltedGonner", "tk2d_CutoutVertexColorTintable", "tk2d_CutoutVertexColorTintableTilted", "tk2d_LitBlendVertexColor", "tk2d_LitCutoutVertexColor", "tk2d_SpriteOutlineCutout" }; } public static class ItemHelper { public static PickupObject Get(Items i) { return PickupObjectDatabase.GetById((int)i); } } public class ExtendedColours { public static Color carrionRed = new Color(0.6901961f, 0.015686275f, 0.015686275f); public static Color pink = new Color(0.9490196f, 0.45490196f, 0.88235295f); public static Color paleYellow = new Color(0.9490196f, 14f / 15f, 0.5803922f); public static Color lime = new Color(37f / 85f, 84f / 85f, 1f / 85f); public static Color brown = new Color(0.47843137f, 0.2784314f, 0.0627451f); public static Color orange = new Color(0.9411765f, 32f / 51f, 0.08627451f); public static Color vibrantOrange = new Color(1f, 48f / 85f, 0.16078432f); public static Color purple = new Color(57f / 85f, 0.08627451f, 0.9411765f); public static Color skyblue = new Color(26f / 51f, 46f / 51f, 1f); public static Color honeyYellow = new Color(1f, 0.7058824f, 6f / 85f); public static Color maroon = new Color(0.4117647f, 0.02745098f, 3f / 85f); public static Color veryDarkRed = new Color(0.2784314f, 0.015686275f, 1f / 85f); public static Color plaguePurple = new Color(0.9490196f, 0.6313726f, 1f); public static Color darkBrown = new Color(0.2901961f, 0.08627451f, 1f / 51f); public static Color pastelPurple = new Color(31f / 85f, 0.29411766f, 76f / 85f); public static Color silver = new Color(64f / 85f, 64f / 85f, 64f / 85f); public static Color dodgerBlue = new Color(0.11764706f, 48f / 85f, 1f); } public class HealthHaverOnPreDeathActionModule : HealthHaver { public AIActor targetAIActor; public GameObject idleVFX; public GameObject explosionVFX; public Vector3 vfxOffset; public EnemyTheBombTracker theBombTracker; public void Start() { ((BraveBehaviour)targetAIActor).healthHaver.OnPreDeath += OnPreDeathActivation; } public void OnPreDeathActivation(Vector2 vector2) { //IL_0053: 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_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_0082: 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) if (theBombTracker.timerCoroutine != null) { ((MonoBehaviour)targetAIActor).StopCoroutine(theBombTracker.timerCoroutine); } AkSoundEngine.PostEvent("detOrb_SFX_loop_002_stop", ((Component)targetAIActor).gameObject); Object.Instantiate(explosionVFX, Vector2Extensions.ToVector3ZUp(((BraveBehaviour)targetAIActor).specRigidbody.UnitBottomCenter, 0f) + vfxOffset + new Vector3(0f, ((BraveBehaviour)targetAIActor).specRigidbody.HitboxPixelCollider.UnitDimensions.y), Quaternion.identity); AkSoundEngine.PostEvent("detOrb_SFX_explosion_001", ((Component)targetAIActor).gameObject); if ((Object)(object)theBombTracker.activeVFXObject != (Object)null) { Object.Destroy((Object)(object)theBombTracker.activeVFXObject); } } } public class RicochetProjectileModule : BraveBehaviour { public HashSet visited = new HashSet(); public bool isRicocheting = false; public float ricochetDamageScale; public float ricochetSpeedScale; public int ricochetRange; public void Awake() { //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)this).specRigidbody; specRigidbody.OnRigidbodyCollision = (OnRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)specRigidbody.OnRigidbodyCollision, (Delegate?)new OnRigidbodyCollisionDelegate(HasntPierced)); Projectile projectile = ((BraveBehaviour)this).projectile; projectile.OnHitEnemy = (Action)Delegate.Combine(projectile.OnHitEnemy, new Action(OnHitEnemy)); } public void HasntPierced(CollisionData data) { if (data != null && !((Object)(object)data.MyRigidbody == (Object)null) && (Object)(object)((BraveBehaviour)data.MyRigidbody).projectile != (Object)null) { ((BraveBehaviour)data.MyRigidbody).projectile.m_hasPierced = false; } } public void OnHitEnemy(Projectile proj, SpeculativeRigidbody enemy, bool fatal) { //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_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_023a: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) if (!isRicocheting) { isRicocheting = true; ProjectileData baseData = proj.baseData; baseData.damage *= ricochetDamageScale; ProjectileData baseData2 = proj.baseData; baseData2.speed *= ricochetSpeedScale; proj.baseData.force = 0f; proj.baseData.range = 999f; proj.UpdateSpeed(); } if ((Object)(object)enemy == (Object)null) { return; } AIActor targetEnemy = null; if ((Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null) { targetEnemy = ((BraveBehaviour)enemy).aiActor; } else { if (!((Object)(object)((Component)enemy).GetComponentInParent() != (Object)null)) { return; } targetEnemy = ((Component)enemy).GetComponentInParent(); } if (!((Object)(object)targetEnemy != (Object)null)) { return; } RicochetProjectileModule component = ((Component)proj).GetComponent(); if (!((Object)(object)((Component)proj).GetComponent() != (Object)null) || ((Component)proj).GetComponent().penetration <= 0 || targetEnemy.ParentRoom == null || targetEnemy.ParentRoom.GetActiveEnemies((ActiveEnemyType)0) == null) { return; } AIActor val = null; float num = ricochetRange * ricochetRange; List list = targetEnemy.ParentRoom.GetActiveEnemies((ActiveEnemyType)0).FindAll((AIActor x) => (Object)(object)x != (Object)null && (Object)(object)x != (Object)(object)targetEnemy && x.HasBeenEngaged && (Object)(object)((BraveBehaviour)x).healthHaver != (Object)null && ((BraveBehaviour)x).healthHaver.IsVulnerable); foreach (AIActor item in list) { if (!((Component)proj).GetComponent().visited.Contains(item) && item.IsNormalEnemy) { Vector2 val2 = ((GameActor)item).CenterPosition - ((GameActor)targetEnemy).CenterPosition; float sqrMagnitude = ((Vector2)(ref val2)).sqrMagnitude; if (sqrMagnitude < num) { val = item; num = sqrMagnitude; } } } if ((Object)(object)val != (Object)null) { Vector2 val3 = ((GameActor)val).CenterPosition - ((BraveBehaviour)proj).specRigidbody.UnitCenter; proj.SendInDirection(val3, false, true); component.visited.Add(((BraveBehaviour)enemy).aiActor); } else { proj.ForceDestruction(); } } } public class SpellbladePassiveItem : PassiveItem { public string damageIdentifier = "spellblade_template_damage"; private bool shouldApplySpellblade = false; public float activationDmgValue = 10f; public float activationCooldownValue = 3f; public bool baseDamageScalesWithPlayerStats = false; public float damageStatScaleRatio = 1f; public bool activationDealsPercentDamage = false; public float percentDamageRatio = 0f; private bool isOnCooldown = false; private float CooldownTimer = 1E+09f; public Action OnSpellbladeProc; public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); player.OnReloadedGun = (Action)Delegate.Combine(player.OnReloadedGun, new Action(OnGunReloaded)); player.PostProcessProjectile += OnPostProcessProjectile; shouldApplySpellblade = true; } public override void DisableEffect(PlayerController player) { ((PassiveItem)this).DisableEffect(player); if ((Object)(object)player != (Object)null) { player.OnReloadedGun = (Action)Delegate.Remove(player.OnReloadedGun, new Action(OnGunReloaded)); player.PostProcessProjectile -= OnPostProcessProjectile; } shouldApplySpellblade = false; } public override void Update() { if ((Object)(object)((PassiveItem)this).Owner != (Object)null && isOnCooldown) { float scaledTimeSinceStartup = BraveTime.ScaledTimeSinceStartup; if (scaledTimeSinceStartup < CooldownTimer) { ((PassiveItem)this).Update(); return; } Plugin.Log($"cooldown ended: curTime: {BraveTime.ScaledTimeSinceStartup}"); isOnCooldown = false; } ((PassiveItem)this).Update(); } private void OnGunReloaded(PlayerController player, Gun gun) { if (!isOnCooldown) { shouldApplySpellblade = true; Plugin.Log($"sheen activated: {shouldApplySpellblade}"); } } private void OnPostProcessProjectile(Projectile proj, float f) { if (!((Object)(object)proj.Shooter == (Object)(object)((BraveBehaviour)proj.Owner).specRigidbody) || !shouldApplySpellblade) { return; } proj.OnHitEnemy = (Action)Delegate.Combine(proj.OnHitEnemy, (Action)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal) { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if (shouldApplySpellblade && !((Object)(object)enemy == (Object)null) && (!((Object)(object)((BraveBehaviour)enemy).aiActor == (Object)null) || !((Object)(object)((Component)enemy).GetComponentInParent() == (Object)null))) { if ((Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null) { float num = activationDmgValue; if (baseDamageScalesWithPlayerStats) { num *= ((PassiveItem)this).Owner.stats.GetStatValue((StatType)5) * damageStatScaleRatio; } if (activationDealsPercentDamage) { num += ((BraveBehaviour)enemy).healthHaver.GetMaxHealth() * percentDamageRatio; } ((BraveBehaviour)enemy).healthHaver.ApplyDamage(num, Vector2.zero, damageIdentifier, (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } Plugin.Log($"cooldown started, shouldApplySpellblade: {shouldApplySpellblade}, curTime: {BraveTime.ScaledTimeSinceStartup}, expected cooldown end time: {BraveTime.ScaledTimeSinceStartup + activationCooldownValue}"); shouldApplySpellblade = false; isOnCooldown = true; CooldownTimer = BraveTime.ScaledTimeSinceStartup + activationCooldownValue; if (OnSpellbladeProc != null) { OnSpellbladeProc(base.m_owner); } } }); } } public class TrueWallPiercingRounds : MonoBehaviour { private PlayerController projOwner; private Projectile m_projectile; public bool isInWall = false; private void Start() { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown m_projectile = ((Component)this).GetComponent(); if (m_projectile.Owner is PlayerController) { ref PlayerController reference = ref projOwner; GameActor owner = m_projectile.Owner; reference = (PlayerController)(object)((owner is PlayerController) ? owner : null); } SpeculativeRigidbody specRigidbody = ((BraveBehaviour)m_projectile).specRigidbody; m_projectile.BulletScriptSettings.surviveRigidbodyCollisions = true; m_projectile.BulletScriptSettings.surviveTileCollisions = true; m_projectile.pierceMinorBreakables = true; ((BraveBehaviour)m_projectile).specRigidbody.OnPreTileCollision = (OnPreTileCollisionDelegate)Delegate.Combine((Delegate?)(object)((BraveBehaviour)m_projectile).specRigidbody.OnPreTileCollision, (Delegate?)new OnPreTileCollisionDelegate(OnPreCollisionTile)); ((BraveBehaviour)m_projectile).specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)((BraveBehaviour)m_projectile).specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OnPreCollision)); } private void OnPreCollisionTile(SpeculativeRigidbody myRigidBody, PixelCollider myPixelCollider, Tile tile, PixelCollider tilePixelCollider) { PhysicsEngine.SkipCollision = true; isInWall = true; } private void OnPreCollision(SpeculativeRigidbody myRigidbody, PixelCollider myPixelCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherPixelCollider) { if (!Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).aiActor) && !Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).minorBreakable) && !Object.op_Implicit((Object)(object)((BraveBehaviour)otherRigidbody).projectile)) { PhysicsEngine.SkipCollision = true; } } private void Update() { keepTrackOfInWallState(); } private void keepTrackOfInWallState() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (isInWall) { if (!((BraveBehaviour)m_projectile).specRigidbody.HasTriggerCollisions) { isInWall = false; } } else if (Vector3Extensions.GetAbsoluteRoom(m_projectile.LastPosition) != null && Vector3Extensions.GetAbsoluteRoom(m_projectile.LastPosition) != projOwner.CurrentRoom) { m_projectile.DieInAir(false, true, true, false); } } } public class VFXAnchorModule : MonoBehaviour { public AIActor anchorAIActor; public Vector3 offset; private void LateUpdate() { //IL_0028: 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) if ((Object)(object)anchorAIActor != (Object)null) { ((Component)this).gameObject.transform.position = Vector2Extensions.ToVector3ZUp(((BraveBehaviour)anchorAIActor).specRigidbody.UnitBottomCenter, 0f) + offset; ((tk2dBaseSprite)((Component)this).gameObject.GetComponent()).UpdateZDepth(); if (!((BraveBehaviour)anchorAIActor).healthHaver.IsAlive) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class VFXAnchorOnHandModule : MonoBehaviour { public PlayerHandController hand; public Vector3 offset; private void LateUpdate() { //IL_0028: 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) if ((Object)(object)hand != (Object)null) { ((Component)this).gameObject.transform.position = Vector2Extensions.ToVector3ZUp(((BraveBehaviour)hand).sprite.WorldCenter, 0f) + offset; ((tk2dBaseSprite)((Component)this).gameObject.GetComponent()).UpdateZDepth(); } } } } namespace LOLItems.active_items { internal class debugItem : PlayerItem { [CompilerGenerated] private sealed class d__10 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public debugItem <>4__this; private ParticleSystem 5__1; private Vector3 5__2; private EmitParams 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fa: Expected O, but got Unknown //IL_010d: 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_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_0134: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_01a3: 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: Expected O, but got Unknown //IL_01d2: 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0268: 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_0275: Unknown result type (might be due to invalid IL or missing references) EmitParams val; switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = GlobalSparksDoer.InitializeParticles((SparksType)2); 5__2 = Vector2.op_Implicit(MathsAndLogicHelper.DegreeToVector2(BraveUtility.RandomAngle())); val = default(EmitParams); ((EmitParams)(ref val)).position = Vector2.op_Implicit(((GameActor)player).CenterPosition + new Vector2(4f, 0f)); ((EmitParams)(ref val)).velocity = 5__2; ((EmitParams)(ref val)).startSize = 1f; ((EmitParams)(ref val)).startLifetime = 2.5f; ((EmitParams)(ref val)).startColor = Color32.op_Implicit(Color.white); ((EmitParams)(ref val)).randomSeed = (uint)Random.Range(1, 100); 5__3 = val; 5__1.Emit(5__3, 1); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; case 1: <>1__state = -1; val = default(EmitParams); ((EmitParams)(ref val)).position = Vector2.op_Implicit(((GameActor)player).CenterPosition + new Vector2(4f, 0f)); ((EmitParams)(ref val)).velocity = 5__2; ((EmitParams)(ref val)).startSize = 1f; ((EmitParams)(ref val)).startLifetime = 2.5f; ((EmitParams)(ref val)).startColor = Color32.op_Implicit(Color.white); ((EmitParams)(ref val)).rotation = 10f; ((EmitParams)(ref val)).randomSeed = (uint)Random.Range(1, 100); 5__3 = val; 5__1.Emit(5__3, 1); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 2; return true; case 2: <>1__state = -1; val = default(EmitParams); ((EmitParams)(ref val)).position = Vector2.op_Implicit(((GameActor)player).CenterPosition + new Vector2(4f, 0f)); ((EmitParams)(ref val)).velocity = 5__2; ((EmitParams)(ref val)).startSize = 1f; ((EmitParams)(ref val)).startLifetime = 2.5f; ((EmitParams)(ref val)).startColor = Color32.op_Implicit(Color.white); ((EmitParams)(ref val)).rotation = 0f; ((EmitParams)(ref val)).angularVelocity = 10f; ((EmitParams)(ref val)).randomSeed = (uint)Random.Range(1, 100); 5__3 = val; 5__1.Emit(5__3, 1); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static int ID; public static GameObject AscensionIcon; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/test_vfx/image (1)", "LOLItems/Resources/vfxs/test_vfx/image (2)", "LOLItems/Resources/vfxs/test_vfx/image (3)", "LOLItems/Resources/vfxs/test_vfx/image (4)", "LOLItems/Resources/vfxs/test_vfx/image (5)", "LOLItems/Resources/vfxs/test_vfx/image (6)", "LOLItems/Resources/vfxs/test_vfx/image (7)", "LOLItems/Resources/vfxs/test_vfx/image (8)", "LOLItems/Resources/vfxs/test_vfx/image (9)" }; private static GameObject EffectVFX = VFXBuilder.CreateVFX("test_vfx", VFXSpritePath, 10, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); private GameObject activeVFXObject; private static GameActorBleedEffect bleedEffect = new GameActorBleedEffect { duration = 5f, effectIdentifier = "debug bleed effect", resistanceType = (EffectResistanceType)0, AppliesOutlineTint = true, OutlineTintColor = Color.gray }; 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_0061: Unknown result type (might be due to invalid IL or missing references) string text = "Debug Item"; string text2 = "LOLItems/Resources/black_dot"; GameObject val = new GameObject(text); debugItem debugItem2 = val.AddComponent(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = "idk"; string text4 = "idk"; ItemBuilder.SetupItem((PickupObject)(object)debugItem2, text3, text4, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)debugItem2, (CooldownType)0, 1f); ((PlayerItem)debugItem2).consumable = false; ((PlayerItem)debugItem2).usableDuringDodgeRoll = true; ((PickupObject)debugItem2).quality = (ItemQuality)(-100); ID = ((PickupObject)debugItem2).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public override void DoEffect(PlayerController player) { } private IEnumerator EffectCoroutine(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { <>4__this = this, player = player }; } } internal class Galeforce : PlayerItem { [CompilerGenerated] private sealed class d__15 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public Galeforce <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private ExplosionData 5__5; private Vector2 5__6; private Material 5__7; private float[] 5__8; private Projectile 5__9; private int 5__10; private GameObject 5__11; private Projectile 5__12; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__5 = null; 5__7 = null; 5__8 = null; 5__9 = null; 5__11 = null; 5__12 = null; <>1__state = -2; } private bool MoveNext() { //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_019c: Expected O, but got Unknown //IL_01a1: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_0248: 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_0285: 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_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Expected O, but got Unknown //IL_02ee: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: { <>1__state = -1; AkSoundEngine.PostEvent("galeforce_active_SFX", ((Component)player).gameObject); 5__1 = 0.2f; 5__2 = 30f; 5__3 = 0f - BraveTime.DeltaTime; 5__4 = CloudburstBaseDamage * HelpfulMethods.GetFloorPriceMod(); <>4__this.CloudburstProjectile.baseData.damage = 5__4 * player.stats.GetStatValue((StatType)5); if (player.HasSynergy(Synergy.GALEFORCE_FOUR)) { ProjectileData baseData = <>4__this.CloudburstProjectile.baseData; baseData.damage *= 2.5f; } <>4__this.CloudburstProjectile.baseData.force = 5f; <>4__this.CloudburstProjectile.baseData.speed = 20f; ((Component)<>4__this.CloudburstProjectile).GetComponent().searchRadius = 30f; ((Component)<>4__this.CloudburstProjectile).GetComponent().angularAcceleration = 360f; ((Projectile)((Component)<>4__this.CloudburstProjectile).GetComponent()).PenetratesInternalWalls = true; ((Projectile)((Component)<>4__this.CloudburstProjectile).GetComponent()).pierceMinorBreakables = true; ((Component)<>4__this.CloudburstProjectile).GetComponent().reacquiresTargets = true; ExplosiveModifier component = ((Component)<>4__this.CloudburstProjectile).GetComponent(); ExplosionData val = new ExplosionData(); ExplosionData val2 = val; component.explosionData = val; 5__5 = val2; 5__5.doDamage = true; 5__5.damage = 10f; 5__5.doForce = false; 5__6 = ((Vector2)(ref player.m_lastNonzeroCommandedDirection)).normalized; ((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(5__1); 5__7 = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)player).sprite); ((GameActor)player).FallingProhibited = true; if (Object.op_Implicit((Object)(object)5__7)) { 5__7.SetColor("_OverrideColor", new Color(30.6f, 76.5f, 76.5f)); } goto IL_02a2; } case 1: <>1__state = -1; goto IL_02a2; case 2: { <>1__state = -1; 5__11 = null; 5__12 = null; 5__10++; break; } IL_02a2: if (5__3 < 5__1) { 5__3 += BraveTime.DeltaTime; ((BraveBehaviour)player).specRigidbody.Velocity = 5__6 * 5__2; <>2__current = null; <>1__state = 1; return true; } ((GameActor)player).FallingProhibited = false; if (Object.op_Implicit((Object)(object)5__7)) { 5__7.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } 5__8 = new float[3] { ((GameActor)player).CurrentGun.CurrentAngle, ((GameActor)player).CurrentGun.CurrentAngle + 45f, ((GameActor)player).CurrentGun.CurrentAngle - 45f }; 5__9 = <>4__this.CloudburstProjectile; 5__10 = 0; break; } if (5__10 < <>4__this.NumToSpawn) { 5__11 = SpawnManager.SpawnProjectile(((Component)5__9).gameObject, Vector2.op_Implicit(((BraveBehaviour)player).specRigidbody.UnitCenter), Quaternion.Euler(0f, 0f, 5__8[5__10]), true); 5__12 = 5__11.GetComponent(); 5__12.Owner = (GameActor)(object)player; 5__12.Shooter = ((BraveBehaviour)player).specRigidbody; <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 2; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Galeforce"; private static float DamageStat = 1.25f; private static float RateOfFireStat = 1.2f; private static float CloudburstBaseDamage = 25f; private static float CloudburstCooldown = 30f; private bool BOWMASTERYActivated = false; public Projectile CloudburstProjectile; public int NumToSpawn; public static int ID; 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_0060: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/galeforce_pixelart_sprite"; GameObject val = new GameObject(itemName); Galeforce galeforce = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"Hasagi!\""; string text3 = "Dash in a direction.\n\nA strangely crafted bow that seems to make the feet below you lighter. You can't help but feel that there's something hidden with this bow. Maybe there's something hidden in the bow?\n"; ItemBuilder.SetupItem((PickupObject)(object)galeforce, text2, text3, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)galeforce, (CooldownType)0, CloudburstCooldown); ((PlayerItem)galeforce).consumable = false; ((PlayerItem)galeforce).usableDuringDodgeRoll = true; ((PickupObject)galeforce).quality = (ItemQuality)3; ID = ((PickupObject)galeforce).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); return ((PlayerItem)this).Drop(player, 4f); } public override void Update() { if ((Object)(object)base.LastOwner != (Object)null) { if (base.LastOwner.HasSynergy(Synergy.BOW_MASTERY) && !BOWMASTERYActivated) { base.timeCooldown = CloudburstCooldown / 2f; BOWMASTERYActivated = true; } else if (!base.LastOwner.HasSynergy(Synergy.BOW_MASTERY) && BOWMASTERYActivated) { base.timeCooldown = CloudburstCooldown; BOWMASTERYActivated = false; } } ((PlayerItem)this).Update(); } public override void DoEffect(PlayerController player) { ((MonoBehaviour)player).StartCoroutine(HandleCloudburst(player)); } private void HandleSFX(Projectile proj, SpeculativeRigidbody body, bool fatal) { if (!((Object)(object)body == (Object)null) && !((Object)(object)((BraveBehaviour)body).aiActor == (Object)null)) { AkSoundEngine.PostEvent("galeforce_active_missile_hit_SFX", ((Component)proj).gameObject); } } public IEnumerator HandleCloudburst(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { <>4__this = this, player = player }; } public Galeforce() { ref Projectile cloudburstProjectile = ref CloudburstProjectile; PickupObject byId = PickupObjectDatabase.GetById(16); cloudburstProjectile = ProjectileUtility.InstantiateAndFakeprefab(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]); NumToSpawn = 3; ((PlayerItem)this)..ctor(); } } internal class RefillablePotion : EstusFlaskItem { [CompilerGenerated] private sealed class d__17 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController user; public RefillablePotion <>4__this; private List.Enumerator <>s__1; private PlayerItem 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((PlayerItem)<>4__this).IsCurrentlyActive) { Debug.LogError((object)"Using a ActiveBasicStatItem while it is already active!"); return false; } ((PlayerItem)<>4__this).IsCurrentlyActive = true; if (user.HasSynergy(Synergy.COCKTAIL_POTION)) { <>s__1 = user.activeItems.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if (((PickupObject)5__2).PickupObjectId == 174) { AkSoundEngine.PostEvent("Play_OBJ_power_up_01", ((Component)<>4__this).gameObject); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5, POGFDamageStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1, POGFRateOfFireStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)10, POGFReloadStat, (ModifyMethod)1); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)12, POGFKnockbackStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(user.stats, user); } if (((PickupObject)5__2).PickupObjectId == 64) { ((MonoBehaviour)user).StartCoroutine(<>4__this.HandleShield(user)); AkSoundEngine.PostEvent("Play_OBJ_metalskin_activate_01", ((Component)<>4__this).gameObject); } 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); } ((PlayerItem)<>4__this).m_activeElapsed = 0f; ((PlayerItem)<>4__this).m_activeDuration = <>4__this.duration; break; case 1: <>1__state = -1; break; } if (((PlayerItem)<>4__this).m_activeElapsed < ((PlayerItem)<>4__this).m_activeDuration && ((PlayerItem)<>4__this).IsCurrentlyActive) { <>2__current = null; <>1__state = 1; return true; } ((PlayerItem)<>4__this).IsCurrentlyActive = false; ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)10); ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)12); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(user.stats, user); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__18 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController user; public RefillablePotion <>4__this; private SpeculativeRigidbody 5__1; private float 5__2; private SpeculativeRigidbody 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__18(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((PlayerItem)<>4__this).m_activeElapsed = 0f; ((PlayerItem)<>4__this).m_activeDuration = <>4__this.duration / 2f; <>4__this.m_usedOverrideMaterial = ((BraveBehaviour)user).sprite.usesOverrideMaterial; ((BraveBehaviour)user).sprite.usesOverrideMaterial = true; user.SetOverrideShader(ShaderCache.Acquire("Brave/ItemSpecific/MetalSkinShader")); 5__1 = ((BraveBehaviour)user).specRigidbody; 5__1.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Combine((Delegate?)(object)5__1.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(<>4__this.OnPreCollision)); ((BraveBehaviour)user).healthHaver.IsVulnerable = false; 5__2 = 0f; break; case 1: <>1__state = -1; break; } if (5__2 < <>4__this.duration) { 5__2 += BraveTime.DeltaTime; ((BraveBehaviour)user).healthHaver.IsVulnerable = false; <>2__current = null; <>1__state = 1; return true; } if (Object.op_Implicit((Object)(object)user)) { ((BraveBehaviour)user).healthHaver.IsVulnerable = true; user.ClearOverrideShader(); ((BraveBehaviour)user).sprite.usesOverrideMaterial = <>4__this.m_usedOverrideMaterial; 5__3 = ((BraveBehaviour)user).specRigidbody; 5__3.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)5__3.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(<>4__this.OnPreCollision)); 5__3 = null; } if (Object.op_Implicit((Object)(object)<>4__this)) { AkSoundEngine.PostEvent("Play_OBJ_metalskin_end_01", ((Component)<>4__this).gameObject); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Refillable Potion"; private static float POGFDamageStat = 1.15f; private static float POGFRateOfFireStat = 1.5f; private static float POGFReloadStat = 0.65f; private static float POGFKnockbackStat = 5f; protected SpeculativeRigidbody userSRB; private bool m_usedOverrideMaterial; public bool BUNCHOBALLOONSActivated = false; private static int BUNCHOBALLOONSUseIncreases = 1; public static int ID; public float duration = 12f; 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_009e: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/refillable_potion_pixelart_sprite"; GameObject val = new GameObject(itemName); RefillablePotion refillablePotion = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"this healed me\""; string text3 = "A potion that heals you.\n\nUsed to be a commercial product sold with the slogan \"It's so refreshing, you'll want to drink it twice! Thankfully, you can never finish it in one go!\"\nThe product also sold with a lifetime warranty of infinite refills anytime anywhere, which completely bankrupted the company.\n\nSomehow, the refill service is still active but only between floors.\n"; ItemBuilder.SetupItem((PickupObject)(object)refillablePotion, text2, text3, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)refillablePotion, (CooldownType)3, 25f); ((EstusFlaskItem)refillablePotion).numDrinksPerFloor = 2; ((EstusFlaskItem)refillablePotion).healingAmount = 0.5f; ((EstusFlaskItem)refillablePotion).drinkDuration = 0f; ref GameObject healVFX = ref ((EstusFlaskItem)refillablePotion).healVFX; PickupObject byId = PickupObjectDatabase.GetById(267); healVFX = ((EstusFlaskItem)((byId is EstusFlaskItem) ? byId : null)).healVFX; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)refillablePotion, (StatType)8, 1f, (ModifyMethod)0); ((PlayerItem)refillablePotion).usableDuringDodgeRoll = true; ((PickupObject)refillablePotion).quality = (ItemQuality)1; ItemBuilder.AddToSubShop((PickupObject)(object)refillablePotion, (ShopType)0, 1f); ID = ((PickupObject)refillablePotion).PickupObjectId; } public override void Pickup(PlayerController player) { ((EstusFlaskItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public override void Update() { if ((Object)(object)((PlayerItem)this).LastOwner != (Object)null) { if (((PlayerItem)this).LastOwner.HasSynergy(Synergy.BUNCH_O_POTIONS) && !BUNCHOBALLOONSActivated) { base.numDrinksPerFloor = 2 + BUNCHOBALLOONSUseIncreases; BUNCHOBALLOONSActivated = true; } else if (!((PlayerItem)this).LastOwner.HasSynergy(Synergy.BUNCH_O_POTIONS) && BUNCHOBALLOONSActivated) { base.numDrinksPerFloor = 2; BUNCHOBALLOONSActivated = false; } } ((PlayerItem)this).Update(); } public override bool CanBeUsed(PlayerController user) { if (((BraveBehaviour)user).healthHaver.GetCurrentHealthPercentage() >= 1f) { return false; } return base.m_remainingDrinksThisFloor > 0; } public override void DoEffect(PlayerController user) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (base.m_remainingDrinksThisFloor > 0) { if ((Object)(object)base.healVFX != (Object)null) { ((GameActor)user).PlayEffectOnActor(base.healVFX, Vector3.zero, true, false, false); } userSRB = ((BraveBehaviour)user).specRigidbody; base.m_remainingDrinksThisFloor--; ((BraveBehaviour)user).healthHaver.ApplyHealing(base.healingAmount); AkSoundEngine.PostEvent("Health_Potion_active_SFX", ((Component)this).gameObject); ((MonoBehaviour)this).StartCoroutine(HandleDuration(user)); } if (base.m_remainingDrinksThisFloor <= 0) { ((BraveBehaviour)this).sprite.SetSprite(base.NoDrinkSprite); } } private IEnumerator HandleDuration(PlayerController user) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { <>4__this = this, user = user }; } private IEnumerator HandleShield(PlayerController user) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__18(0) { <>4__this = this, user = user }; } private void OnPreCollision(SpeculativeRigidbody myRigidbody, PixelCollider myCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherCollider) { Projectile component = ((Component)otherRigidbody).GetComponent(); if ((Object)(object)component != (Object)null && !(component.Owner is PlayerController)) { PassiveReflectItem.ReflectBullet(component, true, ((BraveBehaviour)userSRB).gameActor, 10f, 1f, 1f, 0f); PhysicsEngine.SkipCollision = true; } } public override void OnPreDrop(PlayerController user) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown if (((PlayerItem)this).IsCurrentlyActive) { ((MonoBehaviour)this).StopAllCoroutines(); if (Object.op_Implicit((Object)(object)user)) { ((BraveBehaviour)user).healthHaver.IsVulnerable = true; user.ClearOverrideShader(); ((BraveBehaviour)user).sprite.usesOverrideMaterial = m_usedOverrideMaterial; SpeculativeRigidbody specRigidbody = ((BraveBehaviour)user).specRigidbody; specRigidbody.OnPreRigidbodyCollision = (OnPreRigidbodyCollisionDelegate)Delegate.Remove((Delegate?)(object)specRigidbody.OnPreRigidbodyCollision, (Delegate?)new OnPreRigidbodyCollisionDelegate(OnPreCollision)); ((PlayerItem)this).IsCurrentlyActive = false; } if (Object.op_Implicit((Object)(object)this)) { AkSoundEngine.PostEvent("Play_OBJ_metalskin_end_01", ((Component)this).gameObject); } } } } internal class TalismanOfAscension : PlayerItem { [CompilerGenerated] private sealed class d__17 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public List displayText; public TalismanOfAscension <>4__this; private List.Enumerator <>s__1; private string 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = default(List.Enumerator); 5__2 = null; <>1__state = -2; } private bool MoveNext() { //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_0081: 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_00a4: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = displayText.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; GameUIRoot.Instance.DeregisterDefaultLabel(((BraveBehaviour)((BraveBehaviour)player).sprite).transform); 5__2 = null; break; } if (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; GameUIRoot instance = GameUIRoot.Instance; Transform transform = ((BraveBehaviour)((BraveBehaviour)player).sprite).transform; Bounds bounds = ((BraveBehaviour)player).sprite.GetBounds(); float num = ((Bounds)(ref bounds)).max.x + 0f; bounds = ((BraveBehaviour)player).sprite.GetBounds(); instance.RegisterDefaultLabel(transform, new Vector3(num, ((Bounds)(ref bounds)).min.y + 0f, 0f), 5__2); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = default(List.Enumerator); return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; ((IDisposable)<>s__1).Dispose(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Talisman of Ascension"; public static int ID; public float duration = 5f; public List StatTypeList = new List((StatType[])Enum.GetValues(typeof(StatType))); public int timesUsed = 0; private static int baseNumBuffs = 2; private static float numBuffsIncPerStack = 0.25f; private static float baseBuffValueMin = 0.2f; private static float buffValueMinIncPerStack = 0.1f; private static float baseBuffValueMax = 1f; private static float buffValueMaxIncPerStack = 0.25f; public Dictionary StatTypeWeights = new Dictionary(); private static List effectSFXList = new List { "chrTrg_gainHp_SFX", "chrTrg_gainMp_SFX" }; 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_0060: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/talisman_of_ascension_pixelart_sprite_sparks"; GameObject val = new GameObject(itemName); TalismanOfAscension talismanOfAscension = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "*aw dang it*"; string text3 = "Each use rerolls this item's stat buffs, randomizing which stats are buffed and how much they're buffed. Strength and num of buffs increase with each use.\n\nThis ancient talisman is said to have been bathed in the intense heat of the shuriman desert atop its highest peak. The gods answered this showing of reverence by imbuing it with a spirit of fortune. It then became presitigous as every emperor who bore this talisman would exhibit unreasonable feats of luck. However, after millennia of constant use, the talisman's effects have dwindled and have become unreliable.\n\nhttps://www.youtube.com/watch\n?v=IPFiKEm-oNI\n"; ItemBuilder.SetupItem((PickupObject)(object)talismanOfAscension, text2, text3, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)talismanOfAscension, (CooldownType)2, 5f); ((PlayerItem)talismanOfAscension).consumable = false; ((PlayerItem)talismanOfAscension).usableDuringDodgeRoll = true; ((PickupObject)talismanOfAscension).quality = (ItemQuality)4; ItemBuilder.AddToSubShop((PickupObject)(object)talismanOfAscension, (ShopType)2, 1f); ID = ((PickupObject)talismanOfAscension).PickupObjectId; talismanOfAscension.timesUsed = 0; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)talismanOfAscension, (StatType)8, 1f, (ModifyMethod)0); talismanOfAscension.StatTypeList.Remove((StatType)3); talismanOfAscension.StatTypeList.Remove((StatType)4); talismanOfAscension.StatTypeList.Remove((StatType)7); talismanOfAscension.StatTypeList.Remove((StatType)8); talismanOfAscension.StatTypeList.Remove((StatType)13); talismanOfAscension.StatTypeList.Remove((StatType)14); talismanOfAscension.StatTypeList.Remove((StatType)18); talismanOfAscension.StatTypeList.Remove((StatType)19); talismanOfAscension.StatTypeList.Remove((StatType)20); talismanOfAscension.StatTypeList.Remove((StatType)21); talismanOfAscension.StatTypeList.Remove((StatType)23); talismanOfAscension.StatTypeList.Remove((StatType)24); talismanOfAscension.StatTypeList.Remove((StatType)27); talismanOfAscension.StatTypeList.Remove((StatType)28); talismanOfAscension.StatTypeList.Remove((StatType)29); } public override void Pickup(PlayerController player) { //IL_003d: 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_0077: 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_00b1: 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_00eb: 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_0125: 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_0161: 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_019d: 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_01d9: 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) ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); StatTypeWeights.Clear(); StatTypeWeights.Add(StatTypeList[0], 1f); StatTypeWeights.Add(StatTypeList[1], 0.3f); StatTypeWeights.Add(StatTypeList[2], 0.2f); StatTypeWeights.Add(StatTypeList[3], 0.3f); StatTypeWeights.Add(StatTypeList[4], 0.4f); StatTypeWeights.Add(StatTypeList[5], 0.2f); StatTypeWeights.Add(StatTypeList[6], 1f); StatTypeWeights.Add(StatTypeList[7], 1f); StatTypeWeights.Add(StatTypeList[8], 0.5f); StatTypeWeights.Add(StatTypeList[9], 0.4f); StatTypeWeights.Add(StatTypeList[10], 0.4f); StatTypeWeights.Add(StatTypeList[11], 1f); StatTypeWeights.Add(StatTypeList[12], 0.6f); StatTypeWeights.Add(StatTypeList[13], 1f); StatTypeWeights.Add(StatTypeList[14], 0.3f); StatTypeWeights.Add(StatTypeList[15], 0.2f); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public override void DoEffect(PlayerController user) { //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_0078: 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: Invalid comparison between Unknown and I4 //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Invalid comparison between Unknown and I4 //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Invalid comparison between Unknown and I4 //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Invalid comparison between Unknown and I4 //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Invalid comparison between Unknown and I4 //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Invalid comparison between Unknown and I4 //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Invalid comparison between Unknown and I4 //IL_02c1: 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_0313: 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_0264: 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_019e: 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_01ba: 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) HelpfulMethods.PlayRandomSFX(((Component)this).gameObject, effectSFXList); int num = baseNumBuffs + Mathf.FloorToInt(numBuffsIncPerStack * (float)timesUsed); List list = new List(); for (int i = 0; i < num; i++) { list.Add(Random.Range(0, StatTypeList.Count)); } foreach (StatType statType in StatTypeList) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, statType); } VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(user.stats, user); List list2 = new List(); foreach (int item in list) { float num2 = baseBuffValueMin + buffValueMinIncPerStack * (float)timesUsed; float num3 = baseBuffValueMax + buffValueMaxIncPerStack * (float)timesUsed; float num4 = Random.Range(num2, num3); if (((int)StatTypeList[item] == 0) | ((int)StatTypeList[item] == 11) | ((int)StatTypeList[item] == 17)) { num4 = ((!(((int)StatTypeList[item] == 11) | ((int)StatTypeList[item] == 17))) ? (num4 * StatTypeWeights[StatTypeList[item]]) : Math.Max(1f, num4 * StatTypeWeights[StatTypeList[item]])); list2.Add($"{StatTypeList[item]}: +{Mathf.Round(num4 * 100f) / 100f}\n"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, StatTypeList[item], num4, (ModifyMethod)0); } else if (((int)StatTypeList[item] == 10) | ((int)StatTypeList[item] == 2)) { num4 = 1f / (1f + num4 * StatTypeWeights[StatTypeList[item]]); list2.Add($"{StatTypeList[item]}: x{Mathf.Round(num4 * 100f) / 100f}\n"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, StatTypeList[item], num4, (ModifyMethod)1); } else { num4 = 1f + num4 * StatTypeWeights[StatTypeList[item]]; list2.Add($"{StatTypeList[item]}: x{Mathf.Round(num4 * 100f) / 100f}\n"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, StatTypeList[item], num4, (ModifyMethod)1); } } VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(user.stats, user); timesUsed++; ((MonoBehaviour)this).StartCoroutine(DisplayStats(user, list2)); } private IEnumerator DisplayStats(PlayerController player, List displayText) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { <>4__this = this, player = player, displayText = displayText }; } } internal class TeemoShrooms : PlayerItem { [CompilerGenerated] private sealed class d__17 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public TeemoShrooms <>4__this; private Vector2 5__1; private GameObject 5__2; private DebrisObject 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Vector2.op_Implicit(((PlayerItem)<>4__this).LastOwner.unadjustedAimPoint - ((Component)((GameActor)((PlayerItem)<>4__this).LastOwner).CurrentGun.barrelOffset).transform.position); 5__2 = Object.Instantiate(((Component)shroomObject).gameObject, Vector2.op_Implicit(((GameActor)((PlayerItem)<>4__this).LastOwner).CenterPosition), Quaternion.identity); 5__3 = LootEngine.DropItemWithoutInstantiating(5__2, ((Component)((GameActor)((PlayerItem)<>4__this).LastOwner).CurrentGun.barrelOffset).transform.position, 5__1, 7f, false, false, true, false); while ((Object)(object)5__2.gameObject != (Object)null) { if (GetPrivateType(5__3, "onGround") && !((Object)(object)5__3 != (Object)null)) { } } <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static int ID; private static int numShrooms = 5; private static float ShroomDPS = 25f; private static float ShroomSlowPercent = 0.5f; private static float ShroomEffectDuration = 4f; public static DebrisObject shroomObject; public static Projectile shroomExplosion; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/test_vfx/image (1)", "LOLItems/Resources/vfxs/test_vfx/image (2)", "LOLItems/Resources/vfxs/test_vfx/image (3)", "LOLItems/Resources/vfxs/test_vfx/image (4)", "LOLItems/Resources/vfxs/test_vfx/image (5)", "LOLItems/Resources/vfxs/test_vfx/image (6)", "LOLItems/Resources/vfxs/test_vfx/image (7)", "LOLItems/Resources/vfxs/test_vfx/image (8)", "LOLItems/Resources/vfxs/test_vfx/image (9)" }; private static GameObject EffectVFX = VFXBuilder.CreateVFX("test_vfx", VFXSpritePath, 10, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); private GameObject activeVFXObject; private static GameActorSpeedEffect ShroomSlowEffect = new GameActorSpeedEffect { duration = ShroomEffectDuration, SpeedMultiplier = ShroomSlowPercent, effectIdentifier = "shroom_slow_effect", resistanceType = (EffectResistanceType)0, AppliesTint = true, TintColor = ExtendedColours.plaguePurple }; private static Gun phoenix; private static GameActorFireEffect TormentBurnEffect; 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_014b: Unknown result type (might be due to invalid IL or missing references) string text = "Teemo's Shrooms"; string text2 = "LOLItems/Resources/example_item_sprite"; GameObject val = new GameObject(text); TeemoShrooms teemoShrooms = val.AddComponent(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = "Poison"; string text4 = "idk"; ItemBuilder.SetupItem((PickupObject)(object)teemoShrooms, text3, text4, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)teemoShrooms, (CooldownType)0, 1f); ((PlayerItem)teemoShrooms).consumable = true; ((PlayerItem)teemoShrooms).canStack = true; ((PlayerItem)teemoShrooms).usableDuringDodgeRoll = false; shroomObject = BreakableAPIToolbox.GenerateDebrisObject("LOLItems/Resources/example_item_sprite", true, 7f, 10f, 100f, 0f, (tk2dSprite)null, 0.2f, (string)null, (GameObject)null, 0, false, (GoopDefinition)null, 1f); PickupObject byId = PickupObjectDatabase.GetById(86); Projectile val2 = Object.Instantiate(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val2.baseData.damage = 2f; val2.baseData.speed = 0f; val2.baseData.range = 20f; val2.SuppressHitEffects = true; val2.objectImpactEventName = null; PierceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)val2).gameObject); orAddComponent.penetratesBreakables = true; orAddComponent.penetration = 100; shroomExplosion = val2; ((PickupObject)teemoShrooms).quality = (ItemQuality)4; ID = ((PickupObject)teemoShrooms).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public void DoEffect(PlayerController player) { if ((Object)(object)player != (Object)null) { ((MonoBehaviour)this).StartCoroutine(ThrowShroom()); player.DidUnstealthyAction(); } } private IEnumerator ThrowShroom() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { <>4__this = this }; } private static T2 GetPrivateType(T obj, string field) { FieldInfo field2 = typeof(T).GetField(field, BindingFlags.Instance | BindingFlags.NonPublic); return (T2)field2.GetValue(obj); } static TeemoShrooms() { //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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_017b: Expected O, but got Unknown PickupObject byId = PickupObjectDatabase.GetById(99); phoenix = (Gun)(object)((byId is Gun) ? byId : null); TormentBurnEffect = new GameActorFireEffect { duration = ShroomEffectDuration, DamagePerSecondToEnemies = 0f, effectIdentifier = "liandrys_torment_burn", ignitesGoops = false, FlameVfx = phoenix.DefaultModule.projectiles[0].fireEffect.FlameVfx }; } } internal class PerfectlyTimedStopwatch : PlayerItem { [CompilerGenerated] private sealed class d__8 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public PerfectlyTimedStopwatch <>4__this; private Color 5__1; private Color 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_010e: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(StasisDuration + 0.1f); player.CurrentInputState = (PlayerInputState)1; ((BraveBehaviour)player).healthHaver.PreventAllDamage = true; 5__1 = ((BraveBehaviour)player).sprite.color; 5__2 = ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color; ((BraveBehaviour)player).sprite.color = ExtendedColours.honeyYellow; ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = ExtendedColours.honeyYellow; AkSoundEngine.PostEvent("zhonyas_hourglass_activation_SFX", ((Component)GameManager.Instance).gameObject); <>2__current = (object)new WaitForSeconds(StasisDuration); <>1__state = 1; return true; case 1: <>1__state = -1; ((BraveBehaviour)player).sprite.color = 5__1; ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = 5__2; player.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f); player.CurrentInputState = (PlayerInputState)0; <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 2; return true; case 2: <>1__state = -1; ((BraveBehaviour)player).healthHaver.PreventAllDamage = false; AkSoundEngine.PostEvent("zhonyas_hourglass_ending_SFX", ((Component)GameManager.Instance).gameObject); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Perfectly Timed Stopwatch"; private static float StasisDuration = 2.5f; public static int ID; 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_0060: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/perfectly_timed_stopwatch_pixelart_sprite"; GameObject val = new GameObject(itemName); PerfectlyTimedStopwatch perfectlyTimedStopwatch = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"yea, I got time.\""; string text3 = "Enter a one-time stasis, where you're invulnerable but also can't do anything for a duration, then activates a blank.\n\nA stopwatch that is stuck at 2:37:56. Activating it will affect time itself but it'll shatter instantly since it's been stuck for so long.\n"; ItemBuilder.SetupItem((PickupObject)(object)perfectlyTimedStopwatch, text2, text3, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)perfectlyTimedStopwatch, (CooldownType)3, 0f); ((PlayerItem)perfectlyTimedStopwatch).consumable = true; ((PlayerItem)perfectlyTimedStopwatch).usableDuringDodgeRoll = true; ((PickupObject)perfectlyTimedStopwatch).quality = (ItemQuality)1; ((PickupObject)perfectlyTimedStopwatch).UsesCustomCost = true; ((PickupObject)perfectlyTimedStopwatch).CustomCost = 20; ItemBuilder.AddToSubShop((PickupObject)(object)perfectlyTimedStopwatch, (ShopType)4, 1f); ID = ((PickupObject)perfectlyTimedStopwatch).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public override void Update() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.LastOwner != (Object)null && base.LastOwner.HasSynergy(Synergy.BUILDS_INTO_ZHONYAS_HOURGLASS)) { base.LastOwner.RemoveActiveItem(ID); LootEngine.SpawnCurrency(((BraveBehaviour)base.LastOwner).specRigidbody.UnitCenter, ((PickupObject)this).PurchasePrice, false); } ((PlayerItem)this).Update(); } public override void DoEffect(PlayerController player) { ((MonoBehaviour)player).StartCoroutine(StasisCoroutine(player)); } private IEnumerator StasisCoroutine(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__8(0) { <>4__this = this, player = player }; } } internal class Redemption : TargetedAttackPlayerItem { [CompilerGenerated] private sealed class d__28 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public Vector2 cursorPos; public Redemption <>4__this; private Vector2 5__1; private Vector3 5__2; private List 5__3; private BraveInput 5__4; private Vector2 5__5; private List.Enumerator <>s__6; private AIActor 5__7; private float 5__8; private float 5__9; private PlayerController 5__10; private PlayerController 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; 5__4 = null; <>s__6 = default(List.Enumerator); 5__7 = null; 5__10 = null; 5__11 = null; <>1__state = -2; } private bool MoveNext() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0128: 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_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_015a: 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_0185: 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_01d6: 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_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_022a: 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_0079: 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_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_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_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_04cf: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: 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_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_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Expected O, but got Unknown //IL_024e: 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_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: 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_05b0: 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_0558: 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_03b4: 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_0415: 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) switch (<>1__state) { default: return false; case 0: { <>1__state = -1; 5__1 = Vector2.zero; 5__2 = Vector3.zero; if (BraveInput.GetInstanceForPlayer(player.PlayerIDX).IsKeyboardAndMouse(false)) { 5__1 = Vector3Extensions.XY(player.unadjustedAimPoint) - (((GameActor)player).CenterPosition - ((BraveBehaviour)player).specRigidbody.UnitCenter); 5__2 = new Vector3(0f, 0.5f); } else { 5__4 = BraveInput.GetInstanceForPlayer(((TargetedAttackPlayerItem)<>4__this).m_currentUser.PlayerIDX); 5__5 = ((GameActor)((TargetedAttackPlayerItem)<>4__this).m_currentUser).CenterPosition + Vector3Extensions.XY(Quaternion.Euler(0f, 0f, ((TargetedAttackPlayerItem)<>4__this).m_currentAngle) * Vector2.op_Implicit(Vector2.right)) * ((TargetedAttackPlayerItem)<>4__this).m_currentDistance; 5__5 += ((TwoAxisInputControl)5__4.ActiveActions.Aim).Vector; ((TargetedAttackPlayerItem)<>4__this).m_currentAngle = BraveMathCollege.Atan2Degrees(5__5 - ((GameActor)((TargetedAttackPlayerItem)<>4__this).m_currentUser).CenterPosition); ((TargetedAttackPlayerItem)<>4__this).m_currentDistance = Vector2.Distance(5__5, ((GameActor)((TargetedAttackPlayerItem)<>4__this).m_currentUser).CenterPosition); ((TargetedAttackPlayerItem)<>4__this).m_currentDistance = Mathf.Min(((TargetedAttackPlayerItem)<>4__this).m_currentDistance, ((TargetedAttackPlayerItem)<>4__this).maxDistance); 5__5 = ((GameActor)((TargetedAttackPlayerItem)<>4__this).m_currentUser).CenterPosition + Vector3Extensions.XY(Quaternion.Euler(0f, 0f, ((TargetedAttackPlayerItem)<>4__this).m_currentAngle) * Vector2.op_Implicit(Vector2.right)) * ((TargetedAttackPlayerItem)<>4__this).m_currentDistance; 5__1 = 5__5; 5__4 = null; } if (5__1 != Vector2.zero) { 5__1 = BraveMathCollege.ClampToBounds(5__1, GameManager.Instance.MainCameraController.MinVisiblePoint, GameManager.Instance.MainCameraController.MaxVisiblePoint); } <>4__this.activeVFXObject = Object.Instantiate(EffectVFX, Vector2.op_Implicit(5__1), Quaternion.identity); Transform transform = ((BraveBehaviour)<>4__this.activeVFXObject.GetComponent()).transform; transform.localPosition += 5__2; AkSoundEngine.PostEvent("redemption_effect_buildup_SFX", <>4__this.activeVFXObject.gameObject); <>2__current = (object)new WaitForSeconds(2.5f); <>1__state = 1; return true; } case 1: <>1__state = -1; AkSoundEngine.PostEvent("redemption_effect_landing_SFX", <>4__this.activeVFXObject.gameObject); 5__3 = player.CurrentRoom.GetActiveEnemies((ActiveEnemyType)0); if (5__3 != null) { <>s__6 = 5__3.GetEnumerator(); try { while (<>s__6.MoveNext()) { 5__7 = <>s__6.Current; if ((Object)(object)5__7 != (Object)null && (Object)(object)((BraveBehaviour)5__7).healthHaver != (Object)null && ((BraveBehaviour)5__7).healthHaver.IsVulnerable) { 5__8 = Vector2.Distance(5__1, ((GameActor)5__7).CenterPosition); if (5__8 <= InterventionEffectRadius) { 5__9 = ((BraveBehaviour)5__7).healthHaver.GetMaxHealth() * InterventionDamageScale; ((BraveBehaviour)5__7).healthHaver.ApplyDamage(5__9, Vector2.zero, "intervention", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); ((GameActor)5__7).PlayEffectOnActor(DamageEffectVFX, new Vector3(1.4375f, 1.125f, -2f), true, false, false); AkSoundEngine.PostEvent("redemption_effect_damage_SFX", ((Component)5__7).gameObject); } } 5__7 = null; } } finally { ((IDisposable)<>s__6).Dispose(); } <>s__6 = default(List.Enumerator); } if ((Object)(object)GameManager.Instance.PrimaryPlayer != (Object)null) { 5__10 = GameManager.Instance.PrimaryPlayer; if (Vector2.Distance(5__1, ((GameActor)5__10).CenterPosition) <= InterventionEffectRadius && ((BraveBehaviour)5__10).healthHaver.currentHealth < ((BraveBehaviour)5__10).healthHaver.GetMaxHealth()) { ((BraveBehaviour)5__10).healthHaver.ForceSetCurrentHealth(((BraveBehaviour)5__10).healthHaver.currentHealth + InterventionHealAmount); ((GameActor)5__10).PlayEffectOnActor(HealEffectVFX, new Vector3(1.4375f, 1.125f, -2f), true, false, false); AkSoundEngine.PostEvent("redemption_effect_heal_SFX", ((Component)5__10).gameObject); } 5__10 = null; } if ((Object)(object)GameManager.Instance.SecondaryPlayer != (Object)null) { 5__11 = GameManager.Instance.SecondaryPlayer; if (Vector2.Distance(5__1, ((GameActor)5__11).CenterPosition) <= InterventionEffectRadius && ((BraveBehaviour)5__11).healthHaver.currentHealth < ((BraveBehaviour)5__11).healthHaver.GetMaxHealth()) { ((BraveBehaviour)5__11).healthHaver.ForceSetCurrentHealth(((BraveBehaviour)5__11).healthHaver.currentHealth + InterventionHealAmount); ((GameActor)5__11).PlayEffectOnActor(HealEffectVFX, new Vector3(1.4375f, 1.125f, -2f), true, false, false); AkSoundEngine.PostEvent("redemption_effect_heal_SFX", ((Component)5__11).gameObject); } 5__11 = null; } <>2__current = (object)new WaitForSeconds(5f); <>1__state = 2; return true; case 2: <>1__state = -1; if ((Object)(object)<>4__this.activeVFXObject != (Object)null) { Object.Destroy((Object)(object)<>4__this.activeVFXObject); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Redemption"; private static float HealthStat = 1f; private static float InterventionHealAmount = 0.5f; private static float InterventionDamageScale = 0.1f; private static float InterventionActivationRange = 10f; private static float InterventionEffectRadius = 5f; private static float InterventionCooldown = 1f; private static float InterventionPerRoomCooldown = 10f; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/redemption/redemption_attack_001", "LOLItems/Resources/vfxs/redemption/redemption_attack_002", "LOLItems/Resources/vfxs/redemption/redemption_attack_003", "LOLItems/Resources/vfxs/redemption/redemption_attack_004", "LOLItems/Resources/vfxs/redemption/redemption_attack_005", "LOLItems/Resources/vfxs/redemption/redemption_attack_006", "LOLItems/Resources/vfxs/redemption/redemption_attack_007", "LOLItems/Resources/vfxs/redemption/redemption_attack_008", "LOLItems/Resources/vfxs/redemption/redemption_attack_009", "LOLItems/Resources/vfxs/redemption/redemption_attack_010", "LOLItems/Resources/vfxs/redemption/redemption_attack_011", "LOLItems/Resources/vfxs/redemption/redemption_attack_012", "LOLItems/Resources/vfxs/redemption/redemption_attack_013", "LOLItems/Resources/vfxs/redemption/redemption_attack_014", "LOLItems/Resources/vfxs/redemption/redemption_attack_015", "LOLItems/Resources/vfxs/redemption/redemption_attack_016", "LOLItems/Resources/vfxs/redemption/redemption_attack_017", "LOLItems/Resources/vfxs/redemption/redemption_attack_018", "LOLItems/Resources/vfxs/redemption/redemption_attack_019", "LOLItems/Resources/vfxs/redemption/redemption_attack_020", "LOLItems/Resources/vfxs/redemption/redemption_attack_021", "LOLItems/Resources/vfxs/redemption/redemption_attack_022", "LOLItems/Resources/vfxs/redemption/redemption_attack_023", "LOLItems/Resources/vfxs/redemption/redemption_attack_024", "LOLItems/Resources/vfxs/redemption/redemption_attack_025", "LOLItems/Resources/vfxs/redemption/redemption_attack_026", "LOLItems/Resources/vfxs/redemption/redemption_attack_027", "LOLItems/Resources/vfxs/redemption/redemption_attack_028", "LOLItems/Resources/vfxs/redemption/redemption_attack_029", "LOLItems/Resources/vfxs/redemption/redemption_attack_030", "LOLItems/Resources/vfxs/redemption/redemption_attack_031" }; private static GameObject EffectVFX; private static List DamageEffectSpritePath = new List { "LOLItems/Resources/vfxs/redemption/redemption_damage_001", "LOLItems/Resources/vfxs/redemption/redemption_damage_002", "LOLItems/Resources/vfxs/redemption/redemption_damage_003", "LOLItems/Resources/vfxs/redemption/redemption_damage_004", "LOLItems/Resources/vfxs/redemption/redemption_damage_005", "LOLItems/Resources/vfxs/redemption/redemption_damage_006", "LOLItems/Resources/vfxs/redemption/redemption_damage_007", "LOLItems/Resources/vfxs/redemption/redemption_damage_008" }; private static GameObject DamageEffectVFX; private static List HealEffectSpritePath = new List { "LOLItems/Resources/vfxs/redemption/redemption_heal_001", "LOLItems/Resources/vfxs/redemption/redemption_heal_002", "LOLItems/Resources/vfxs/redemption/redemption_heal_003", "LOLItems/Resources/vfxs/redemption/redemption_heal_004", "LOLItems/Resources/vfxs/redemption/redemption_heal_005", "LOLItems/Resources/vfxs/redemption/redemption_heal_006", "LOLItems/Resources/vfxs/redemption/redemption_heal_007", "LOLItems/Resources/vfxs/redemption/redemption_heal_008" }; private static GameObject HealEffectVFX; private static List ReticleVFXSpritePath = new List { "LOLItems/Resources/vfxs/redemption/redemption_overheadicon_001" }; private static GameObject ReticleVFX; private GameObject activeVFXObject; public bool ENLIGHTENEDBULLETSActivated = false; private static float ENLIGHTENEDBULLETSDamageStat = 1.15f; public bool TERRORTOTHEGUNDEADActivated = false; private static int TERRORTOTHEGUNDEADInterventionPerRoomCooldown = 5; public static int ID; 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_0050: 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_0084: 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_00b8: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_014e: 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_030a: 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) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/redemption_pixelart_sprite"; GameObject val = new GameObject(itemName); Redemption redemption = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Deus Ex Machina"; string text3 = "+1 Heart\nActivates a circle where you target. The circle winds up for a short time, then harms enemies and heals players.\n\nA magical pendant with the power to call upon a beam of light at will. It's purifying light harms those it deems evil and heals those it deems good. The light's morals seem questionable if it deems the gungeoneers as good.\n"; ItemBuilder.SetupItem((PickupObject)(object)redemption, text2, text3, "LOLItems"); EffectVFX = VFXBuilder.CreateVFX("intervention_vfx", VFXSpritePath, 8, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)2, false); DamageEffectVFX = VFXBuilder.CreateVFX("intervention_damage_hiteffect", DamageEffectSpritePath, 8, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)2, false); HealEffectVFX = VFXBuilder.CreateVFX("intervention_heal_hiteffect", HealEffectSpritePath, 8, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)2, false); ReticleVFX = VFXBuilder.CreateVFX("intervention_reticle_vfx", ReticleVFXSpritePath, 1, new IntVector2(16, 13), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)0, true); tk2dSprite component = EffectVFX.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = 0f; ((tk2dBaseSprite)component).scale = new Vector3(1.1f, 1.1f, 1f); ((tk2dBaseSprite)component).UpdateZDepth(); ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.8f); } component = DamageEffectVFX.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.8f); } component = HealEffectVFX.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).usesOverrideMaterial = true; ((BraveBehaviour)component).renderer.material.shader = ShaderCache.Acquire("Brave/Internal/SimpleAlphaFadeUnlit"); ((BraveBehaviour)component).renderer.material.SetFloat("_Fade", 0.8f); } ItemBuilder.SetCooldownType((PlayerItem)(object)redemption, (CooldownType)2, InterventionPerRoomCooldown); ((PlayerItem)redemption).consumable = false; ((TargetedAttackPlayerItem)redemption).minDistance = 0f; ((TargetedAttackPlayerItem)redemption).maxDistance = InterventionActivationRange; ((TargetedAttackPlayerItem)redemption).reticleQuad = FakePrefabExtensions.InstantiateAndFakeprefab(((Component)PickupObjectDatabase.GetById(443)).gameObject.GetComponent().reticleQuad); tk2dBaseSprite component2 = EffectVFX.GetComponent(); int spriteId = component2.spriteId; tk2dSpriteCollectionData collection = component2.collection; tk2dSlicedSprite component3 = ((TargetedAttackPlayerItem)redemption).reticleQuad.GetComponent(); ((tk2dBaseSprite)component3).SetSprite(collection, spriteId); ((tk2dBaseSprite)component3).scale = new Vector3(1.1f, 1.1f, 1f); component3.dimensions = new Vector2(150f, 143f); Object.Destroy((Object)(object)((TargetedAttackPlayerItem)redemption).reticleQuad.GetComponent()); ((TargetedAttackPlayerItem)redemption).doesStrike = false; ((TargetedAttackPlayerItem)redemption).doesGoop = false; ((TargetedAttackPlayerItem)redemption).DoScreenFlash = false; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)redemption, (StatType)3, HealthStat, (ModifyMethod)0); ((PickupObject)redemption).quality = (ItemQuality)4; ID = ((PickupObject)redemption).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public override void Update() { if ((Object)(object)((PlayerItem)this).LastOwner != (Object)null) { if (((PlayerItem)this).LastOwner.HasSynergy(Synergy.ENLIGHTENED_BULLETS) && !ENLIGHTENEDBULLETSActivated) { ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, ENLIGHTENEDBULLETSDamageStat, (ModifyMethod)1); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PlayerItem)this).LastOwner.stats, ((PlayerItem)this).LastOwner); ENLIGHTENEDBULLETSActivated = true; } else if (!((PlayerItem)this).LastOwner.HasSynergy(Synergy.ENLIGHTENED_BULLETS) && ENLIGHTENEDBULLETSActivated) { ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(((PlayerItem)this).LastOwner.stats, ((PlayerItem)this).LastOwner); ENLIGHTENEDBULLETSActivated = false; } if (((PlayerItem)this).LastOwner.HasSynergy(Synergy.TERROR_TO_THE_GUNDEAD) && !TERRORTOTHEGUNDEADActivated) { ((PlayerItem)this).roomCooldown = ((PlayerItem)this).roomCooldown - TERRORTOTHEGUNDEADInterventionPerRoomCooldown; ((PlayerItem)this).CurrentRoomCooldown = ((PlayerItem)this).CurrentRoomCooldown - TERRORTOTHEGUNDEADInterventionPerRoomCooldown; TERRORTOTHEGUNDEADActivated = true; } else if (!((PlayerItem)this).LastOwner.HasSynergy(Synergy.TERROR_TO_THE_GUNDEAD) && TERRORTOTHEGUNDEADActivated) { ((PlayerItem)this).roomCooldown = ((PlayerItem)this).roomCooldown + TERRORTOTHEGUNDEADInterventionPerRoomCooldown; ((PlayerItem)this).CurrentRoomCooldown = ((PlayerItem)this).CurrentRoomCooldown + TERRORTOTHEGUNDEADInterventionPerRoomCooldown; TERRORTOTHEGUNDEADActivated = false; } } ((TargetedAttackPlayerItem)this).Update(); } public override void DoEffect(PlayerController user) { ((TargetedAttackPlayerItem)this).DoEffect(user); AkSoundEngine.PostEvent("redemption_initial_activation_SFX", ((Component)user).gameObject); } public override void DoActiveEffect(PlayerController player) { //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_001a: Unknown result type (might be due to invalid IL or missing references) ((TargetedAttackPlayerItem)this).DoActiveEffect(player); tk2dBaseSprite extantReticleQuad = base.m_extantReticleQuad; Vector2 worldCenter = extantReticleQuad.WorldCenter; ((MonoBehaviour)this).StartCoroutine(DoInterventionEvent(player, worldCenter)); } private IEnumerator DoInterventionEvent(PlayerController player, Vector2 cursorPos) { //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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this, player = player, cursorPos = cursorPos }; } } internal class Stridebreaker : PlayerItem { public static string ItemName = "Stridebreaker"; private static float DamageStat = 1.1f; private static float RateOfFireStat = 1.1f; private static float HealthStat = 1f; private static float slowPercent = 0.2f; private static float slowDuration = 10f; private static float ShockwaveBaseDamage = 20f; private static float ShockwaveRadius = 6f; private static float ShockwaveCooldown = 15f; private static GameObject slashVFX = ((Gun)PickupObjectDatabase.GetById(417)).DefaultModule.projectiles[0].hitEffects.tileMapHorizontal.effects[0].effects[0].effect; private static GameActorSpeedEffect slowEffect = new GameActorSpeedEffect { duration = slowDuration, effectIdentifier = "stridebreaker_active_slow", resistanceType = (EffectResistanceType)3, AppliesOutlineTint = true, OutlineTintColor = Color.gray, SpeedMultiplier = slowPercent }; private static List VFXSpritePath = new List { "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_001", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_002", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_003", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_004", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_005", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_006", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_007", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_008", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_009", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_010", "LOLItems/Resources/vfxs/breakingshockwave/breakingshockwave_011" }; private static GameObject EffectVFX; private GameObject activeVFXObject; public bool DEMACIANTRAITORActivated = false; private static float DEMACIANTRAITORShockwaveDamageMultiplier = 2f; private static float DEMACIANTRAITORslowPercent = 0.05f; private static float DEMACIANTRAITORslowDuration = 8f; public static int ID; 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_0065: 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_0095: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/stridebreaker_pixelart_sprite_small"; GameObject val = new GameObject(itemName); Stridebreaker stridebreaker = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "\"No more cages!\""; string text3 = "Slashes around you, deals damage, enemies hit are slowed.\n\nA set of chains that appears to have been used as a weapon. The chains feel cold to the touch and seem to instill a feeling of rebellion within you.\n"; ItemBuilder.SetupItem((PickupObject)(object)stridebreaker, text2, text3, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)stridebreaker, (CooldownType)0, ShockwaveCooldown); ((PlayerItem)stridebreaker).consumable = false; EffectVFX = VFXBuilder.CreateVFX("breakingshockwave", VFXSpritePath, 30, new IntVector2(0, 0), (Anchor)4, false, 0f, -1f, (Color?)Color.cyan, (WrapMode)2, false); ((PlayerItem)stridebreaker).usableDuringDodgeRoll = true; ((PickupObject)stridebreaker).quality = (ItemQuality)3; ID = ((PickupObject)stridebreaker).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); VolleyRebuildHelpers.RecalculateStatsWithoutRebuildingGunVolleys(player.stats, player); return ((PlayerItem)this).Drop(player, 4f); } public override void Update() { if ((Object)(object)base.LastOwner != (Object)null) { if (base.LastOwner.HasSynergy(Synergy.DEMACIAN_TRAITOR) && !DEMACIANTRAITORActivated) { GameActorSpeedEffect obj = slowEffect; ((GameActorEffect)obj).duration = ((GameActorEffect)obj).duration + DEMACIANTRAITORslowDuration; DEMACIANTRAITORActivated = true; } else if (!base.LastOwner.HasSynergy(Synergy.DEMACIAN_TRAITOR) && DEMACIANTRAITORActivated) { ((GameActorEffect)slowEffect).duration = slowDuration; DEMACIANTRAITORActivated = false; } } ((PlayerItem)this).Update(); } public override void DoEffect(PlayerController player) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_012e: 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) AkSoundEngine.PostEvent("stridebreaker_active_SFX", ((Component)player).gameObject); if ((Object)(object)activeVFXObject != (Object)null) { Object.Destroy((Object)(object)activeVFXObject); } activeVFXObject = Object.Instantiate(EffectVFX, Vector2.op_Implicit(((GameActor)player).CenterPosition), Quaternion.identity); tk2dSprite component = activeVFXObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((tk2dBaseSprite)component).HeightOffGround = 0f; ((tk2dBaseSprite)component).scale = new Vector3(3.1f, 3.1f, 1f); ((tk2dBaseSprite)component).UpdateZDepth(); } float num = ShockwaveBaseDamage * player.stats.GetStatValue((StatType)5); if (player.HasSynergy(Synergy.DEMACIAN_TRAITOR)) { num *= DEMACIANTRAITORShockwaveDamageMultiplier; } List activeEnemies = player.CurrentRoom.GetActiveEnemies((ActiveEnemyType)0); if (activeEnemies == null) { return; } foreach (AIActor item in activeEnemies) { if ((Object)(object)item != (Object)null && (Object)(object)((BraveBehaviour)item).healthHaver != (Object)null && ((BraveBehaviour)item).healthHaver.IsVulnerable) { float num2 = Vector2.Distance(((GameActor)player).CenterPosition, ((GameActor)item).CenterPosition); if (num2 <= ShockwaveRadius) { ((BraveBehaviour)item).healthHaver.ApplyDamage(num, Vector2.zero, "Stridebreaker", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); ((GameActor)item).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null); AkSoundEngine.PostEvent("stridebreaker_active_hit_SFX", ((Component)player).gameObject); } } } } } internal class ZhonyasHourglass : PlayerItem { [CompilerGenerated] private sealed class d__15 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; public ZhonyasHourglass <>4__this; private Color 5__1; private Color 5__2; private Material 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_016e: 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_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_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_00bb: 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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0121: 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_023b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(StasisDuration + 0.1f); if (!player.HasSynergy(Synergy.SEVEN_SECONDS_REMAIN)) { player.CurrentInputState = (PlayerInputState)1; } ((BraveBehaviour)player).healthHaver.PreventAllDamage = true; 5__1 = ((BraveBehaviour)player).sprite.color; 5__2 = ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color; ((BraveBehaviour)player).sprite.color = ExtendedColours.honeyYellow; ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = ExtendedColours.honeyYellow; 5__3 = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)player).sprite); if (Object.op_Implicit((Object)(object)5__3)) { 5__3.SetColor("_OverrideColor", new Color(178.5f, 126f, 12.599999f)); } AkSoundEngine.PostEvent("zhonyas_hourglass_activation_SFX", ((Component)GameManager.Instance).gameObject); <>2__current = (object)new WaitForSeconds(StasisDuration); <>1__state = 1; return true; case 1: <>1__state = -1; ((BraveBehaviour)player).sprite.color = 5__1; ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = 5__2; if (Object.op_Implicit((Object)(object)5__3)) { 5__3.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } player.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f); if (!player.HasSynergy(Synergy.SEVEN_SECONDS_REMAIN)) { player.CurrentInputState = (PlayerInputState)0; } AkSoundEngine.PostEvent("zhonyas_hourglass_ending_SFX", ((Component)GameManager.Instance).gameObject); <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 2; return true; case 2: <>1__state = -1; ((BraveBehaviour)player).healthHaver.PreventAllDamage = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string ItemName = "Zhonya's Hourglass"; private static float DamageStat = 1.05f; private static float ArmorStat = 2f; private bool hasGainedArmor = false; private static float StasisDuration = 2.5f; private static float StasisCooldown = 120f; public bool CHAOSCONTROLActivated = false; private static float CHAOSCONTROLStasisCooldown = 100f; public bool SEVENSECONDSREMAINActivated = false; public static int ID; 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_007c: Unknown result type (might be due to invalid IL or missing references) string itemName = ItemName; string text = "LOLItems/Resources/active_item_sprites/zhonyas_hourglass_pixelart_sprite_small"; GameObject val = new GameObject(itemName); ZhonyasHourglass zhonyasHourglass = val.AddComponent(); ItemBuilder.AddSpriteToObject(itemName, text, val, (Assembly)null); string text2 = "Borrowed Time"; string text3 = "Slightly increase damage\nEnter stasis, where you're invulnerable but also can't do anything for a duration, then activates a blank.\n\nA sand stopwatch that allows the user to suspend their life for a few moments. It's believed that a pharaoh used it to reminisce his last moments during his empire's fall.\n"; ItemBuilder.SetupItem((PickupObject)(object)zhonyasHourglass, text2, text3, "LOLItems"); ItemBuilder.SetCooldownType((PlayerItem)(object)zhonyasHourglass, (CooldownType)0, StasisCooldown); ((PlayerItem)zhonyasHourglass).consumable = false; ItemBuilder.AddPassiveStatModifier((PickupObject)(object)zhonyasHourglass, (StatType)8, 1f, (ModifyMethod)0); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)zhonyasHourglass, (StatType)5, DamageStat, (ModifyMethod)1); ((PlayerItem)zhonyasHourglass).usableDuringDodgeRoll = true; ((PickupObject)zhonyasHourglass).quality = (ItemQuality)4; ItemBuilder.AddToSubShop((PickupObject)(object)zhonyasHourglass, (ShopType)4, 1f); ID = ((PickupObject)zhonyasHourglass).PickupObjectId; } public override void Pickup(PlayerController player) { ((PlayerItem)this).Pickup(player); Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName); if (!hasGainedArmor) { HealthHaver healthHaver = ((BraveBehaviour)player).healthHaver; healthHaver.Armor += ArmorStat; } hasGainedArmor = true; } public DebrisObject Drop(PlayerController player) { Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName); return ((PlayerItem)this).Drop(player, 4f); } public override void Update() { if ((Object)(object)base.LastOwner != (Object)null) { if (base.LastOwner.HasSynergy(Synergy.CHAOS_CONTROL) && !CHAOSCONTROLActivated) { base.timeCooldown -= CHAOSCONTROLStasisCooldown; ((PlayerItem)this).CurrentTimeCooldown = ((PlayerItem)this).CurrentTimeCooldown - CHAOSCONTROLStasisCooldown; CHAOSCONTROLActivated = true; } else if (!base.LastOwner.HasSynergy(Synergy.CHAOS_CONTROL) && CHAOSCONTROLActivated) { base.timeCooldown += CHAOSCONTROLStasisCooldown; ((PlayerItem)this).CurrentTimeCooldown = ((PlayerItem)this).CurrentTimeCooldown + CHAOSCONTROLStasisCooldown; CHAOSCONTROLActivated = false; } } ((PlayerItem)this).Update(); } public override void DoEffect(PlayerController player) { ((MonoBehaviour)player).StartCoroutine(StasisCoroutine(player)); } private IEnumerator StasisCoroutine(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { <>4__this = this, player = player }; } } }