private void IsaacIsDeadLetsCrabDance()
        {
            Owner.inventory.RemoveGunFromInventory(Owner.CurrentGun);
            IntVector2 bestRewardLocation = Owner.CurrentRoom.GetBestRewardLocation(IntVector2.One * 3, RoomHandler.RewardLocationStyle.PlayerCenter, true);

            Exploder.DoDefaultExplosion(Owner.sprite.WorldCenter, new Vector2());
            if (UnityEngine.Random.value < 0.5)
            {
                Chest Red_Chest = GameManager.Instance.RewardManager.A_Chest;
                Red_Chest.IsLocked = false;
                Chest.Spawn(Red_Chest, bestRewardLocation);
            }
            else if (UnityEngine.Random.value < 0.2)
            {
                Chest Black_Chest = GameManager.Instance.RewardManager.S_Chest;
                Black_Chest.IsLocked = true;
                Chest.Spawn(Black_Chest, bestRewardLocation);
            }
            else
            {
                Chest Synergy_Chest = GameManager.Instance.RewardManager.Synergy_Chest;
                Synergy_Chest.IsLocked = false;
                Chest.Spawn(Synergy_Chest, bestRewardLocation);
            }
        }
Exemple #2
0
 private void Boomber(Projectile obj)
 {
     if (obj.sprite)
     {
         Exploder.DoDefaultExplosion(obj.sprite.WorldCenter, default);
     }
 }
        private IEnumerator Suicide()
        {
            yield return(new WaitForSeconds(lengthOfNonCombatSurvival));

            if (self & self.healthHaver && self.healthHaver.IsAlive)
            {
                ithasBegun = true;
                if (forceExplode && self.specRigidbody)
                {
                    Exploder.DoDefaultExplosion(self.specRigidbody.UnitCenter, Vector2.zero);
                }
                if (eraseInsteadOfKill)
                {
                    self.EraseFromExistenceWithRewards();
                }
                else
                {
                    if (self.healthHaver)
                    {
                        self.healthHaver.ApplyDamage(float.MaxValue, Vector2.zero, "Erasure");
                    }
                }
            }
            yield break;
        }
        // Token: 0x0600030F RID: 783 RVA: 0x0001CEAC File Offset: 0x0001B0AC
        private void OnDestroy(Projectile projectile)
        {
            Exploder.DoDefaultExplosion(projectile.specRigidbody.UnitTopCenter, default(Vector2), null, false, CoreDamageTypes.None, true);
            DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.FireDef);

            goopManagerForGoopType.TimedAddGoopCircle(projectile.specRigidbody.UnitTopCenter, 5f, 0.35f, false);
        }
Exemple #5
0
 protected override void Update()
 {
     base.Update();
     if (base.Owner && Time.frameCount % 10 == 0)
     {
         base.Owner.healthHaver.ApplyDamage(1f, Vector2.zero, "bunny", CoreDamageTypes.None, DamageCategory.Normal, true);
         Exploder.DoDefaultExplosion(base.Owner.sprite.WorldCenter, new Vector2());
     }
 }
        private void OnBroken()
        {
            spriteAnimator.Play(breakAnimName);
            specRigidbody.enabled = false;
            IsBroken = true;
            sprite.HeightOffGround = -3f;
            sprite.UpdateZDepth();
            string ShadowObjectName = "Expand_RickRollChestShadow";

            if (chestType == ChestType.SurpriseChest)
            {
                ShadowObjectName = "Expand_SurpriseChestShadow";
            }
            Transform shadowTransform = transform.Find(ShadowObjectName);

            if (shadowTransform != null)
            {
                Destroy(shadowTransform.gameObject);
            }
            if (m_registeredIconRoom != null)
            {
                Minimap.Instance.DeregisterRoomIcon(m_registeredIconRoom, minimapIconInstance);
            }
            if (!m_Opened)
            {
                m_room.DeregisterInteractable(this);
                if (m_registeredIconRoom != null)
                {
                    Minimap.Instance.DeregisterRoomIcon(m_registeredIconRoom, minimapIconInstance);
                }
                bool  GoldJunkFlag         = GameStatsManager.Instance.GetFlag(GungeonFlags.ITEMSPECIFIC_GOLD_JUNK);
                float ChestDowngradeChance = GameManager.Instance.RewardManager.ChestDowngradeChance;
                float ChestHalfHeartChance = GameManager.Instance.RewardManager.ChestHalfHeartChance;
                float ChestExplosionChance = GameManager.Instance.RewardManager.ChestExplosionChance;
                float ChestJunkChance      = GameManager.Instance.RewardManager.ChestJunkChance;
                float Multiplier           = (!GoldJunkFlag) ? 0f : 0.005f;
                bool  flag3             = GameStatsManager.Instance.GetFlag(GungeonFlags.ITEMSPECIFIC_SER_JUNKAN_UNLOCKED);
                float ChestJunkanChance = (!flag3 || Chest.HasDroppedSerJunkanThisSession) ? 0f : GameManager.Instance.RewardManager.ChestJunkanUnlockedChance;
                if (GameManager.Instance.PrimaryPlayer && GameManager.Instance.PrimaryPlayer.carriedConsumables.KeyBullets > 0)
                {
                    ChestJunkChance *= GameManager.Instance.RewardManager.HasKeyJunkMultiplier;
                }
                if (SackKnightController.HasJunkan())
                {
                    ChestJunkChance *= GameManager.Instance.RewardManager.HasJunkanJunkMultiplier;
                    Multiplier      *= 3f;
                }
                ChestJunkChance -= Multiplier;
                float AllChances = Multiplier + ChestDowngradeChance + ChestHalfHeartChance + ChestExplosionChance + ChestJunkChance + ChestJunkanChance;
                float ChestExplosionChanceMultiplier = (UnityEngine.Random.value * AllChances);
                if (ChestExplosionChanceMultiplier > ChestDowngradeChance + ChestHalfHeartChance + ChestJunkChance + ChestJunkanChance)
                {
                    Exploder.DoDefaultExplosion(sprite.WorldCenter, Vector2.zero, null, false, CoreDamageTypes.None, false);
                }
            }
        }
        protected override void DoEffect(PlayerController user)
        {
            base.DoEffect(user);
            AIActor Target = TargetEnemies(user, 8, 2);

            if (Target != null)
            {
                Exploder.DoDefaultExplosion(Target.specRigidbody.UnitCenter, Vector2.zero);
            }
        }
 private void DoExplosion()
 {
     if (useDefaultExplosion)
     {
         Exploder.DoDefaultExplosion(specRigidbody.GetUnitCenter(ColliderType.HitBox), Vector2.zero, null, true, CoreDamageTypes.None);
         Exploder.DoRadialDamage(120f, specRigidbody.GetUnitCenter(ColliderType.HitBox), 3.5f, true, true, false);
     }
     else
     {
         Exploder.Explode(specRigidbody.GetUnitCenter(ColliderType.HitBox), ChaosExplosionData, Vector2.zero, null, false, CoreDamageTypes.None, false);
     }
 }
Exemple #9
0
 private void Update()
 {
     if (this.owner.ParentRoom.GetActiveEnemies(Dungeonator.RoomHandler.ActiveEnemyType.RoomClear) != null && CheckForEnemies())
     {
         if (!this.PreventExploding)
         {
             this.owner.healthHaver.ApplyDamage(9999, Vector2.zero, "Lack of Intellegence", CoreDamageTypes.None, DamageCategory.Unstoppable, true, null, true);
             Exploder.DoDefaultExplosion(this.owner.sprite.WorldCenter, new Vector2());
             this.PreventExploding = true;
         }
     }
 }
Exemple #10
0
        public override void Pickup(PlayerController player)
        {
            base.Pickup(player);
            List <AIActor> activeEnemies = player.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.RoomClear);

            if (activeEnemies != null && player.CurrentRoom != null)
            {
                int RandomEnemy = UnityEngine.Random.Range(0, activeEnemies.Count);
                if (activeEnemies[RandomEnemy] != null && activeEnemies[RandomEnemy].specRigidbody)
                {
                    Exploder.DoDefaultExplosion(activeEnemies[RandomEnemy].specRigidbody.UnitCenter, default(Vector2));
                }
            }
        }
Exemple #11
0
 protected void Update()
 {
     if (player && player.CurrentRoom != null && player.CurrentRoom.GetNearestEnemy(projectile.sprite.WorldCenter, out float distance))
     {
         if (distance < 3f)
         {
             Exploder.DoDefaultExplosion(projectile.sprite.WorldCenter, Vector2.zero);
             if (player && player.PlayerHasActiveSynergy(":retroswept:"))
             {
                 FlakTime(projectile, player);
             }
             Destroy(gameObject);
         }
     }
 }
        void OnDamaged(PlayerController player)
        {
            List <AIActor> activeEnemies = player.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);

            if (activeEnemies != null && player.CurrentRoom != null && player.healthHaver && activeEnemies.Count != 0)
            {
                for (int i = 0; i < 3; i++)
                {
                    int RandomEnemy = UnityEngine.Random.Range(0, activeEnemies.Count);
                    if (activeEnemies[RandomEnemy] != null && activeEnemies[RandomEnemy].specRigidbody)
                    {
                        Exploder.DoDefaultExplosion(activeEnemies[RandomEnemy].specRigidbody.UnitCenter, default);
                    }
                }
            }
        }
 private void Update()
 {
     if (enabled && m_gun && m_gun.ammo <= AmmoCutOff && m_gun.CurrentOwner is PlayerController)
     {
         PlayerController playerController = m_gun.CurrentOwner as PlayerController;
         if (playerController)
         {
             playerController.inventory.RemoveGunFromInventory(m_gun);
             if (ExplodesOnDepletion)
             {
                 Exploder.DoDefaultExplosion(m_gun.sprite.WorldCenter, Vector2.zero, null, true, CoreDamageTypes.None, false);
             }
             Destroy(m_gun.gameObject);
         }
     }
 }
        private IEnumerator HandleDelayedFireDamage()
        {
            Vector2 BottomOffset1 = new Vector3(5, 2);
            Vector2 TopOffset1    = new Vector3(9, 6);
            Vector2 BottomOffset2 = new Vector3(4, 1);
            Vector2 TopOffset2    = new Vector3(8, 6);

            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(0.75f), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.SOLID_SPARKLES);
            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(1.5f), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.SOLID_SPARKLES);
            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(2.25f), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.SOLID_SPARKLES);
            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(3), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.SOLID_SPARKLES);
            yield return(new WaitForSeconds(2f));

            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(1.75f), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.STRAIGHT_UP_FIRE);
            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(2.5f), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.STRAIGHT_UP_FIRE);
            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(3.25f), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.STRAIGHT_UP_FIRE);
            GlobalSparksDoer.DoRandomParticleBurst(25, (sprite.WorldBottomLeft + BottomOffset2), (sprite.WorldBottomLeft + TopOffset2), Vector3.up, 70f, 0.5f, null, new float?(4), new Color?(new Color(4f, 0.3f, 0f)), GlobalSparksDoer.SparksType.STRAIGHT_UP_FIRE);
            Exploder.DoDefaultExplosion((transform.position + PitOffset.ToVector3() + new Vector3(1, 0)), Vector2.zero, ignoreQueues: true);
            specRigidbody.PixelColliders[0].Enabled = false;
            specRigidbody.RecheckTriggers           = true;
            specRigidbody.RegenerateColliders       = true;

            IntVector2 basePosition = (transform.position.IntXY(VectorConversions.Floor) + PitOffset);
            IntVector2 cellPos      = basePosition;
            IntVector2 cellPos2     = (basePosition + new IntVector2(1, 0));

            DeadlyDeadlyGoopManager.ForceClearGoopsInCell(cellPos);
            DeadlyDeadlyGoopManager.ForceClearGoopsInCell(cellPos2);
            sprite.SetSprite("Jungle_Tree_Large_Open");
            yield return(new WaitForSeconds(0.4f));

            m_ParentRoom.ForcePitfallForFliers = true;
            CellData cellData  = GameManager.Instance.Dungeon.data[cellPos];
            CellData cellData2 = GameManager.Instance.Dungeon.data[cellPos2];

            cellData.fallingPrevented  = false;
            cellData2.fallingPrevented = false;
            GameObject JungleTreeFrame = Instantiate(JungleTreeTopFrame, transform.position, Quaternion.identity);

            if (m_ParentRoom != null)
            {
                JungleTreeFrame.transform.SetParent(m_ParentRoom.hierarchyParent, true);
            }
            yield break;
        }
        private void OnBroken()
        {
            spriteAnimator.Play(breakAnimName);
            specRigidbody.enabled = false;
            IsBroken = true;
            Transform shadowTransform = transform.Find("ChestShadow");

            if (shadowTransform != null)
            {
                Destroy(shadowTransform.gameObject);
            }
            if (!m_Opened)
            {
                m_Opened = true;
                m_room.DeregisterInteractable(this);
                if (m_registeredIconRoom != null)
                {
                    Minimap.Instance.DeregisterRoomIcon(m_registeredIconRoom, minimapIconInstance);
                }
                bool  flag2 = GameStatsManager.Instance.GetFlag(GungeonFlags.ITEMSPECIFIC_GOLD_JUNK);
                float num   = GameManager.Instance.RewardManager.ChestDowngradeChance;
                float num2  = GameManager.Instance.RewardManager.ChestHalfHeartChance;
                float num3  = GameManager.Instance.RewardManager.ChestExplosionChance;
                float num4  = GameManager.Instance.RewardManager.ChestJunkChance;
                float num5  = (!flag2) ? 0f : 0.005f;
                bool  flag3 = GameStatsManager.Instance.GetFlag(GungeonFlags.ITEMSPECIFIC_SER_JUNKAN_UNLOCKED);
                float num6  = (!flag3 || Chest.HasDroppedSerJunkanThisSession) ? 0f : GameManager.Instance.RewardManager.ChestJunkanUnlockedChance;
                if (GameManager.Instance.PrimaryPlayer && GameManager.Instance.PrimaryPlayer.carriedConsumables.KeyBullets > 0)
                {
                    num4 *= GameManager.Instance.RewardManager.HasKeyJunkMultiplier;
                }
                if (SackKnightController.HasJunkan())
                {
                    num4 *= GameManager.Instance.RewardManager.HasJunkanJunkMultiplier;
                    num5 *= 3f;
                }
                num4 -= num5;
                float num7 = num5 + num + num2 + num3 + num4 + num6;
                float num8 = UnityEngine.Random.value * num7;
                if (num8 > num + num2 + num4 + num6)
                {
                    Exploder.DoDefaultExplosion(sprite.WorldCenter, Vector2.zero, null, false, CoreDamageTypes.None, false);
                }
            }
        }
        private void DoExplosion()
        {
            if (ExplosionNotGuranteed)
            {
                if (Random.value > ExplosionOdds)
                {
                    return;
                }
            }

            if (useDefaultExplosion)
            {
                Exploder.DoDefaultExplosion(specRigidbody.GetUnitCenter(ColliderType.HitBox), Vector2.zero, null, true, CoreDamageTypes.None);
                Exploder.DoRadialDamage(ExplosionDamage, specRigidbody.GetUnitCenter(ColliderType.HitBox), 3.5f, true, true, false);
            }
            else
            {
                Exploder.Explode(specRigidbody.GetUnitCenter(ColliderType.HitBox), ExpandExplosionData, Vector2.zero, null, true, CoreDamageTypes.None, false);
            }
        }
Exemple #17
0
 public void Start()
 {
     //base.aiActor.HasBeenEngaged = true;
     if (healthHaver.healthHaver.GetCurrentHealth() <= healthHaver.healthHaver.GetMaxHealth() / 2)
     {
         var bs = FlameChamber.prefab.GetComponent <BehaviorSpeculator>();
     }
     base.aiActor.healthHaver.OnPreDeath += (obj) =>
     {
         Exploder.DoDefaultExplosion(base.aiActor.CenterPosition, base.aiActor.CenterPosition.ToIntVector2().ToVector2());
         AkSoundEngine.PostEvent("Play_ENM_highpriest_blast_01", base.aiActor.gameObject);
         //Chest chest2 = GameManager.Instance.RewardManager.SpawnTotallyRandomChest(spawnspot);
         //chest2.IsLocked = false;
         DeadlyDeadlyGoopManager goopManagerForGoopType = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.FireDef);
         goopManagerForGoopType.AddGoopCircle(this.aiActor.specRigidbody.UnitCenter, 3f, -1, false, -1);
     };
     base.healthHaver.healthHaver.OnDeath += (obj) =>
     {
     };;
     this.aiActor.knockbackDoer.SetImmobile(true, "fuckshitdeath");
 }
        //NAME SYNERGY '...Badda Boom!'
        private void OnEnemyDamaged(float damage, bool fatal, HealthHaver enemyHealth)
        {
            if (Owner.HasPickupID(304) || Owner.HasPickupID(Gungeon.Game.Items["nn:nitroglycylinder"].PickupObjectId))
            {
                hasSynergy = true;
            }
            else
            {
                hasSynergy = false;
            }

            if (enemyHealth.aiActor && enemyHealth && !enemyHealth.IsBoss && fatal && enemyHealth.aiActor.IsNormalEnemy && hasSynergy == false)
            {
                if (UnityEngine.Random.value < .50f)
                {
                    Exploder.DoDefaultExplosion(enemyHealth.aiActor.CenterPosition, new Vector2());
                }
            }
            else if (enemyHealth && !enemyHealth.IsBoss && fatal && enemyHealth.aiActor && enemyHealth.aiActor.IsNormalEnemy && hasSynergy == true)
            {
                Exploder.DoDefaultExplosion(enemyHealth.aiActor.CenterPosition, new Vector2());
            }
        }
Exemple #19
0
            public static void PanaceaUseHook(Action <Panacea, PlayerController> orig, Panacea self, PlayerController user)
            {
                orig(self, user);
                List <int> OptionalItemIDs = new List <int>
                {
                    64,
                    174,
                    267,
                    168,
                    205,
                    427,
                    426,
                    424
                };
                bool hasMysteriousBrewSynergy = false;

                foreach (PlayerItem active in user.activeItems)
                {
                    if (OptionalItemIDs.Contains(active.PickupObjectId))
                    {
                        hasMysteriousBrewSynergy = true;
                    }
                }
                foreach (PassiveItem passive in user.passiveItems)
                {
                    if (OptionalItemIDs.Contains(passive.PickupObjectId))
                    {
                        hasMysteriousBrewSynergy = true;
                    }
                }
                if (hasMysteriousBrewSynergy)
                {
                    int    value  = UnityEngine.Random.Range(1, 9);
                    string header = "";
                    string text   = "";
                    if (value == 1)
                    {
                        header = "?";
                        text   = "Nothing happened.";
                    }
                    else if (value == 2)
                    {
                        header = "Invigorated";
                        text   = "You feel healthier.";
                        StatModifier mod = new StatModifier
                        {
                            statToBoost = PlayerStats.StatType.Health,
                            amount      = 1,
                            modifyType  = StatModifier.ModifyMethod.ADDITIVE,
                        };
                        user.ownerlessStatModifiers.Add(mod);
                        user.stats.RecalculateStats(user, true, false);
                    }
                    else if (value == 3)
                    {
                        header = "Overloaded";
                        text   = "The brew explodes.";
                        Exploder.DoDefaultExplosion(user.sprite.WorldCenter, new Vector2());
                    }
                    else if (value == 4)
                    {
                        header = "Pathetic";
                        text   = "You feel weaker.";
                        StatModifier mod = new StatModifier
                        {
                            statToBoost = PlayerStats.StatType.Damage,
                            amount      = -0.20f,
                            modifyType  = StatModifier.ModifyMethod.ADDITIVE,
                        };
                        StatModifier mod2 = new StatModifier
                        {
                            statToBoost = PlayerStats.StatType.ThrownGunDamage,
                            amount      = 0,
                            modifyType  = StatModifier.ModifyMethod.MULTIPLICATIVE,
                        };
                        user.ownerlessStatModifiers.Add(mod);
                        user.ownerlessStatModifiers.Add(mod2);
                        user.stats.RecalculateStats(user, true, false);
                    }
                    else if (value == 5)
                    {
                        header = "Fast Reaction";
                        text   = "Bullets are slow to you.";
                        StatModifier mod2 = new StatModifier
                        {
                            statToBoost = PlayerStats.StatType.EnemyProjectileSpeedMultiplier,
                            amount      = 0.90f,
                            modifyType  = StatModifier.ModifyMethod.MULTIPLICATIVE,
                        };
                        user.ownerlessStatModifiers.Add(mod2);
                        user.stats.RecalculateStats(user, true, false);
                    }
                    else if (value == 6)
                    {
                        header = "Slow Hands";
                        text   = "Slower charge and reload.";
                        StatModifier mod2 = new StatModifier
                        {
                            statToBoost = PlayerStats.StatType.ReloadSpeed,
                            amount      = 0.10f,
                            modifyType  = StatModifier.ModifyMethod.ADDITIVE,
                        };
                        StatModifier mod1 = new StatModifier
                        {
                            statToBoost = PlayerStats.StatType.ChargeAmountMultiplier,
                            amount      = -0.10f,
                            modifyType  = StatModifier.ModifyMethod.ADDITIVE,
                        };
                        user.ownerlessStatModifiers.Add(mod2);
                        user.ownerlessStatModifiers.Add(mod1);
                        user.stats.RecalculateStats(user, true, false);
                    }
                    else if (value == 7)
                    {
                        header = "Flammable";
                        text   = "You feel vulnerable to fire.";
                        DamageTypeModifier mod = new DamageTypeModifier
                        {
                            damageType       = CoreDamageTypes.Fire,
                            damageMultiplier = 2
                        };
                        user.healthHaver.damageTypeModifiers.Add(mod);
                    }
                    else if (value == 8)
                    {
                        header = "Obsidian Skin";
                        text   = "You feel immune to fire.";
                        DamageTypeModifier mod = new DamageTypeModifier
                        {
                            damageType       = CoreDamageTypes.Fire,
                            damageMultiplier = 0
                        };
                        user.healthHaver.damageTypeModifiers.Add(mod);
                    }
                    else if (value == 9)
                    {
                        header = "Bulletproof";
                        text   = "You feel almost invulnerable!";
                        void ModifyDamageEvent(HealthHaver healthHaver, HealthHaver.ModifyDamageEventArgs args)
                        {
                            if (args == EventArgs.Empty)
                            {
                                return;
                            }
                            if (UnityEngine.Random.value < 0.2f)
                            {
                                args.ModifiedDamage = 0f;
                            }
                        }

                        user.healthHaver.ModifyDamage += ModifyDamageEvent;
                    }

                    NoPseudosynergiesModule.Notify(header, text, self.sprite);
                }
            }
 private void DoExplosion(PlayerController player, Gun gun)
 {
     Exploder.DoDefaultExplosion(gun.sprite.WorldCenter, Vector2.zero);
 }
        private IEnumerator DoRickRoll()
        {
            yield return(new WaitForSeconds(0.1f));

            if (!m_room.IsSealed)
            {
                m_room.npcSealState = RoomHandler.NPCSealState.SealAll;
                m_room.SealRoom();
            }
            GameObject m_RickRollInstance = Instantiate(RickRollAnimationObject, (transform.position + new Vector3(0.1f, 0.5f, 0)), Quaternion.identity);
            Vector3    RickScale          = new Vector2(0.2f, 0.2f).ToVector3ZUp(1f);

            m_RickRollInstance.layer = LayerMask.NameToLayer("Unpixelated");
            m_RickRollInstance.transform.localScale = RickScale;
            MajorBreakable m_MajorBreakable = GetComponent <MajorBreakable>();

            if (m_MajorBreakable)
            {
                m_MajorBreakable.TemporarilyInvulnerable = true;
            }
            if (sprite)
            {
                sprite.HeightOffGround = -2f; sprite.UpdateZDepth();
            }

            if (m_room.area.PrototypeRoomCategory != PrototypeDungeonRoom.RoomCategory.SECRET)
            {
                GameManager.Instance.StartCoroutine(SpwanEnemyAirDrop());
            }

            tk2dSpriteAnimator m_RickRollAnimator = m_RickRollInstance.GetComponent <tk2dSpriteAnimator>();

            m_RickRollAnimator.Play("RickRollAnimation_Rise");
            while (m_RickRollAnimator.IsPlaying("RickRollAnimation_Rise"))
            {
                yield return(null);
            }
            m_RickRollAnimator.Play("RickRollAnimation");
            if (!ExpandStats.youtubeSafeMode)
            {
                AkSoundEngine.PostEvent("Play_EX_RickRollMusic_01", gameObject);
            }
            else
            {
                GameManager.Instance.StartCoroutine(DoYouTubeSafeAnnouncement(new Vector3(1.5f, 3.5f)));
            }
            yield return(new WaitForSeconds(10));

            Destroy(m_RickRollInstance);
            m_MajorBreakable.TemporarilyInvulnerable = false;
            if (m_MajorBreakable)
            {
                MajorBreakable majorBreakable = m_MajorBreakable;
                majorBreakable.OnBreak = (Action)Delegate.Remove(majorBreakable.OnBreak, new Action(OnBroken));
            }
            spriteAnimator.Play(breakAnimName);
            specRigidbody.enabled = false;
            IsBroken = true;
            Transform shadowTransform = transform.Find("Expand_RickRollChestShadow");

            if (shadowTransform != null)
            {
                Destroy(shadowTransform.gameObject);
            }
            m_Opened = true;
            if (m_registeredIconRoom != null)
            {
                Minimap.Instance.DeregisterRoomIcon(m_registeredIconRoom, minimapIconInstance);
            }
            m_room.DeregisterInteractable(this);
            if (m_room.npcSealState != RoomHandler.NPCSealState.SealNone)
            {
                m_room.npcSealState = RoomHandler.NPCSealState.SealNone;
            }
            Exploder.DoDefaultExplosion(sprite.WorldCenter, Vector2.zero, null, true, CoreDamageTypes.None, false);
            yield break;
        }
        private IEnumerator DoRickRoll()
        {
            yield return(new WaitForSeconds(0.1f));

            GameObject m_RickRollInstance = Instantiate(RickRollAnimationObject, (transform.position + new Vector3(0.1f, 0.5f, 0)), Quaternion.identity);
            Vector3    RickScale          = new Vector2(0.2f, 0.2f).ToVector3ZUp(1f);

            m_RickRollInstance.layer = LayerMask.NameToLayer("Unpixelated");
            m_RickRollInstance.transform.localScale = RickScale;
            if (majorBreakable)
            {
                majorBreakable.TemporarilyInvulnerable = true;
            }
            if (sprite)
            {
                sprite.HeightOffGround = -2f; sprite.UpdateZDepth();
            }
            tk2dSpriteAnimator m_RickRollAnimator = m_RickRollInstance.GetComponent <tk2dSpriteAnimator>();

            m_RickRollAnimator.Play("RickRollAnimation_Rise");
            while (m_RickRollAnimator.IsPlaying("RickRollAnimation_Rise"))
            {
                yield return(null);
            }
            m_RickRollAnimator.Play("RickRollAnimation");
            if (!ExpandSettings.youtubeSafeMode)
            {
                AkSoundEngine.PostEvent("Play_EX_RickRollMusic_01", gameObject);
            }
            else
            {
                GameManager.Instance.StartCoroutine(DoYouTubeSafeAnnouncement(new Vector3(1.5f, 3.5f)));
            }
            yield return(new WaitForSeconds(10));

            Destroy(m_RickRollInstance);
            if (majorBreakable)
            {
                majorBreakable.TemporarilyInvulnerable = false;
            }
            yield return(null);

            spriteAnimator.Play(breakAnimName);
            specRigidbody.enabled = false;
            IsBroken = true;
            Transform shadowTransform = transform.Find("Expand_RickRollChestShadow");

            if (shadowTransform != null)
            {
                Destroy(shadowTransform.gameObject);
            }
            if (m_room.npcSealState != RoomHandler.NPCSealState.SealNone)
            {
                m_room.npcSealState = RoomHandler.NPCSealState.SealNone;
            }
            Exploder.DoDefaultExplosion(sprite.WorldCenter, Vector2.zero, null, true, CoreDamageTypes.None, false);
            yield return(null);

            PickupObject.ItemQuality targetQuality = (UnityEngine.Random.value >= 0.2f) ? ((!BraveUtility.RandomBool()) ? PickupObject.ItemQuality.B : PickupObject.ItemQuality.C) : PickupObject.ItemQuality.B;
            GenericLootTable         lootTable     = (!BraveUtility.RandomBool()) ? GameManager.Instance.RewardManager.GunsLootTable : GameManager.Instance.RewardManager.ItemsLootTable;
            PickupObject             item          = LootEngine.GetItemOfTypeAndQuality <PickupObject>(targetQuality, lootTable, false);

            if (item)
            {
                LootEngine.SpawnItem(item.gameObject, sprite.WorldCenter, Vector2.zero, 0f, true, true, false);
            }
            yield break;
        }
        //public override void OnReloadPressed(PlayerController player, Gun gun, bool bSOMETHING)
        //{
        //    AkSoundEngine.PostEvent("Stop_WPN_All", base.gameObject);
        //    base.OnReloadPressed(player, gun, bSOMETHING);
        //    AkSoundEngine.PostEvent("Play_WPN_duelingpistol_reload_01", base.gameObject);
        //}

        public override void OnPostFired(PlayerController player, Gun gun)
        {
            Exploder.DoDefaultExplosion(gun.sprite.WorldBottomRight, Vector2.zero, null, false, CoreDamageTypes.None, false);
            AkSoundEngine.PostEvent("Play_BOSS_DragunGold_Grenade_01", base.gameObject);
        }
Exemple #24
0
 private void kerboomer(Projectile projectile)
 {
     Exploder.DoDefaultExplosion(projectile.specRigidbody.UnitTopCenter, default(Vector2), null, false, CoreDamageTypes.None, true);
 }
        public IEnumerator HandleAttack(AIActor enemyToStartWith, RoomHandler room)
        {
            this.m_isCurrentlyActive = true;
            AIActor        currentEnemy    = enemyToStartWith;
            RoundKingState currentState    = RoundKingState.Falling;
            Vector2        targetPoint     = currentEnemy.sprite.WorldBottomCenter;
            Vector2        velocity        = default(Vector2);
            float          cooldownTime    = 0f;
            float          chaseTime       = 0f;
            Vector2        lastTargetPoint = Vector2.zero;

            while (true)
            {
                if (!this.m_pickedUp || this.LastOwner == null)
                {
                    break;
                }
                if (currentState == RoundKingState.Falling)
                {
                    if (this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter.y > targetPoint.y)
                    {
                        this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().PlaceAtPositionByAnchor(this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter + new Vector2(0, -(30f * BraveTime.DeltaTime)), tk2dBaseSprite.Anchor.LowerCenter);
                    }
                    else
                    {
                        Exploder.DoDefaultExplosion(this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter, new Vector2());
                        if (this.LastOwner != null && this.LastOwner.PlayerHasActiveSynergy("#TRUE_KING"))
                        {
                            for (int i = 0; i < 6; i++)
                            {
                                GameObject obj = SpawnManager.SpawnProjectile(Toolbox.GetGunById(52).DefaultModule.chargeProjectiles[0].Projectile.gameObject, this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter,
                                                                              Quaternion.Euler(0, 0, i * 60));
                                Projectile proj = obj.GetComponent <Projectile>();
                                if (proj != null)
                                {
                                    proj.Owner            = this.LastOwner;
                                    proj.Shooter          = this.LastOwner.specRigidbody;
                                    proj.DefaultTintColor = Color.white;
                                    proj.HasDefaultTint   = true;
                                    if (proj.GetComponent <SpawnProjModifier>() != null)
                                    {
                                        Destroy(proj.GetComponent <SpawnProjModifier>());
                                    }
                                    PierceProjModifier mod = proj.gameObject.GetOrAddComponent <PierceProjModifier>();
                                    mod.penetration = 999;
                                    mod.preventPenetrationOfActors = true;
                                    mod.BeastModeLevel             = PierceProjModifier.BeastModeStatus.BEAST_MODE_LEVEL_ONE;
                                }
                            }
                        }
                        currentState = RoundKingState.CoolingDown;
                        cooldownTime = 1f;
                    }
                }
                else if (currentState == RoundKingState.CoolingDown)
                {
                    if (cooldownTime > 0)
                    {
                        cooldownTime -= BraveTime.DeltaTime;
                    }
                    else
                    {
                        if (room.HasActiveEnemies(RoomHandler.ActiveEnemyType.All))
                        {
                            currentState = RoundKingState.Chasing;
                            this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().SetSprite(spriteIds[0]);
                            chaseTime = 2f;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
                else if (currentState == RoundKingState.Chasing)
                {
                    if (room.HasActiveEnemies(RoomHandler.ActiveEnemyType.All))
                    {
                        if (currentEnemy == null || currentEnemy.sprite == null || (currentEnemy.healthHaver != null && currentEnemy.healthHaver.IsDead))
                        {
                            currentEnemy = room.GetRandomActiveEnemy(true);
                        }
                        Vector2 a = (currentEnemy.sprite.WorldTopCenter + new Vector2(0, 1) - this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter);
                        a.Normalize();
                        bool flag5 = Vector2.Distance((currentEnemy.sprite.WorldTopCenter + new Vector2(0, 1)), base.sprite.WorldBottomCenter) < 0.2f;
                        if (flag5)
                        {
                            velocity = Vector2.Lerp(velocity, Vector2.zero, 0.5f);
                        }
                        else
                        {
                            velocity = Vector2.Lerp(velocity, a * 10, 0.1f);
                        }
                        this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().PlaceAtPositionByAnchor(this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter + (BraveTime.DeltaTime * velocity), tk2dBaseSprite.Anchor.LowerCenter);
                        lastTargetPoint = (this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter + new Vector2(0, -1f - currentEnemy.sprite.GetRelativePositionFromAnchor(tk2dBaseSprite.Anchor.UpperCenter).y));
                        if (chaseTime > 0)
                        {
                            chaseTime -= BraveTime.DeltaTime;
                        }
                        else
                        {
                            targetPoint = (this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter + new Vector2(0, -1f - currentEnemy.sprite.GetRelativePositionFromAnchor(tk2dBaseSprite.Anchor.UpperCenter).y));
                            this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().SetSprite(spriteIds[1]);
                            currentState = RoundKingState.Falling;
                        }
                    }
                    else
                    {
                        targetPoint = lastTargetPoint;
                        this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().SetSprite(spriteIds[1]);
                        currentState = RoundKingState.Falling;
                    }
                }
                yield return(null);
            }
            this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().SetSprite(spriteIds[0]);
            float ela = 0f;

            while (ela < 2f)
            {
                this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().PlaceAtPositionByAnchor(this.m_extantRoundKing.GetComponent <tk2dBaseSprite>().WorldBottomCenter + new Vector2(0, (30f * BraveTime.DeltaTime)), tk2dBaseSprite.Anchor.LowerCenter);
                ela += BraveTime.DeltaTime;
                yield return(null);
            }
            Destroy(this.m_extantRoundKing);
            this.m_isCurrentlyActive = false;
            yield break;
        }
Exemple #26
0
 private void Destruction(Projectile projectile)
 {
     //ETGModConsole.Log("On Destroy was called");
     Exploder.DoDefaultExplosion(projectile.specRigidbody.UnitTopCenter, new Vector2(), null, false, CoreDamageTypes.None, true);
     //Exploder.DoDefaultExplosion(projectile.specRigidbody.UnitTopCenter, new Vector2(), null, false, CoreDamageTypes.None, true);
 }
Exemple #27
0
        private void SelfDestructOnKick()
        {
            int     currentCurse                 = PlayerStats.GetTotalCurse();
            int     currentCoolness              = PlayerStats.GetTotalCoolness();
            float   ExplodeOnKickChances         = 0.25f;
            float   ExplodeOnKickDamageToEnemies = 150f;
            Vector2 ExplosionCenterPosition      = sprite.WorldCenter;


            bool ExplodeOnKickDamagesPlayer = BraveUtility.RandomBool();

            if (willDefinitelyExplode)
            {
                ExplodeOnKickDamagesPlayer   = false;
                ExplodeOnKickDamageToEnemies = 200f;
            }
            else
            {
                if (currentCoolness >= 3)
                {
                    ExplodeOnKickDamagesPlayer   = false;
                    ExplodeOnKickDamageToEnemies = 175f;
                }
                if (currentCurse >= 3)
                {
                    ExplodeOnKickChances         = 0.35f;
                    ExplodeOnKickDamageToEnemies = 200f;
                }
            }

            if (!ExplodeOnKickDamagesPlayer)
            {
                TableExplosionData.damageToPlayer = 0;
            }

            if (spawnObjectOnSelfDestruct && SpawnedObject != null && !m_objectSpawned)
            {
                m_objectSpawned = true;
                GameObject PlacedGlitchObject = ExpandUtility.GenerateDungeonPlacable(SpawnedObject, false, true).InstantiateObject(transform.position.GetAbsoluteRoom(), (specRigidbody.GetUnitCenter(ColliderType.HitBox) - transform.position.GetAbsoluteRoom().area.basePosition.ToVector2()).ToIntVector2(VectorConversions.Floor));
                PlacedGlitchObject.transform.parent = transform.position.GetAbsoluteRoom().hierarchyParent;

                if (PlacedGlitchObject.GetComponent <PickupObject>() != null)
                {
                    PickupObject PlacedGltichObjectComponent = PlacedGlitchObject.GetComponent <PickupObject>();
                    PlacedGltichObjectComponent.RespawnsIfPitfall = true;
                }
            }

            if (UnityEngine.Random.value <= ExplodeOnKickChances | willDefinitelyExplode)
            {
                if (useDefaultExplosion)
                {
                    Exploder.DoDefaultExplosion(ExplosionCenterPosition, Vector2.zero, null, true, CoreDamageTypes.None);
                    Exploder.DoRadialDamage(ExplodeOnKickDamageToEnemies, ExplosionCenterPosition, 4f, ExplodeOnKickDamagesPlayer, true, true);
                }
                else
                {
                    Exploder.Explode(ExplosionCenterPosition, TableExplosionData, Vector2.zero, null, false, CoreDamageTypes.None, false);
                }
                Destroy(gameObject);
                return;
            }
            return;
        }
Exemple #28
0
        protected override void DoEffect(PlayerController user)
        {
            IPlayerInteractable nearestInteractable = user.CurrentRoom.GetNearestInteractable(user.CenterPosition, 1f, user);

            if (!(nearestInteractable is Chest))
            {
                return;
            }

            AkSoundEngine.PostEvent("Play_ENM_electric_charge_01", user.gameObject);

            Chest rerollChest = nearestInteractable as Chest;
            int   selected    = UnityEngine.Random.Range(1, 15);

            ETGModConsole.Log(selected.ToString());

            VFXToolbox.GlitchScreenForSeconds(1.5f);


            switch (selected)
            {
            case 1:     //Blow up chest
                if (user.PlayerHasActiveSynergy("KEYGEN"))
                {
                    SpareChest(rerollChest);
                }
                else
                {
                    Exploder.DoDefaultExplosion(rerollChest.specRigidbody.UnitCenter, Vector2.zero);
                    if (rerollChest.IsMimic)
                    {
                        OMITBReflectionHelpers.ReflectSetField <bool>(typeof(Chest), "m_isMimic", false, rerollChest);
                    }
                    rerollChest.majorBreakable.Break(Vector2.zero);
                    if (rerollChest.GetChestTier() == ChestToolbox.ChestTier.RAT)
                    {
                        UnityEngine.Object.Destroy(rerollChest.gameObject);
                    }
                }
                break;

            case 2:     //Open Chest
                rerollChest.ForceOpen(user);
                break;

            case 3:     //Break Lock
                if (user.PlayerHasActiveSynergy("KEYGEN"))
                {
                    SpareChest(rerollChest);
                }
                else
                {
                    if (rerollChest.IsLocked)
                    {
                        rerollChest.BreakLock();
                    }
                    else
                    {
                        rerollChest.majorBreakable.Break(Vector2.zero);
                    }
                }
                break;

            case 4:     //Duplicate Chest
                DupeChest(rerollChest, user);
                break;

            case 5:     //Turn into mimic
                if (!rerollChest.IsMimic)
                {
                    rerollChest.overrideMimicChance = 100; rerollChest.MaybeBecomeMimic();
                }
                rerollChest.ForceOpen(user);
                break;

            case 6:     //Englitch
                List <GlobalDungeonData.ValidTilesets> bannedGlitchFloors = new List <GlobalDungeonData.ValidTilesets>()
                {
                    GlobalDungeonData.ValidTilesets.CATACOMBGEON,
                    GlobalDungeonData.ValidTilesets.HELLGEON,
                    GlobalDungeonData.ValidTilesets.OFFICEGEON,
                    GlobalDungeonData.ValidTilesets.FORGEGEON,
                };
                if (!bannedGlitchFloors.Contains(GameManager.Instance.Dungeon.tileIndices.tilesetId))
                {
                    rerollChest.BecomeGlitchChest();
                }
                else
                {
                    if (!rerollChest.IsMimic)
                    {
                        rerollChest.MaybeBecomeMimic();
                    }
                    rerollChest.ForceOpen(user);
                }
                break;

            case 7:     //Enrainbow
                if (UnityEngine.Random.value <= 0.65f)
                {
                    UpgradeChest(rerollChest, user);
                }
                else
                {
                    rerollChest.BecomeRainbowChest();
                }
                break;

            case 8:     //Reroll
                RerollChest(rerollChest, user);
                break;

            case 9:     //Turn into pickups
                if (user.PlayerHasActiveSynergy("KEYGEN"))
                {
                    SpareChest(rerollChest);
                }
                else
                {
                    for (int i = 0; i < 5; i++)
                    {
                        LootEngine.SpawnItem(PickupObjectDatabase.GetById(BraveUtility.RandomElement(BabyGoodChanceKin.lootIDlist)).gameObject, rerollChest.sprite.WorldCenter, Vector2.zero, 0);
                    }
                    LootEngine.SpawnCurrency(rerollChest.sprite.WorldCenter, UnityEngine.Random.Range(5, 11));
                    user.CurrentRoom.DeregisterInteractable(rerollChest);
                    rerollChest.DeregisterChestOnMinimap();
                    UnityEngine.Object.Destroy(rerollChest.gameObject);
                }
                break;

            case 10:     //Fuse
                if (user.PlayerHasActiveSynergy("KEYGEN"))
                {
                    SpareChest(rerollChest);
                }
                else
                {
                    var type = typeof(Chest);
                    var func = type.GetMethod("TriggerCountdownTimer", BindingFlags.Instance | BindingFlags.NonPublic);
                    var ret  = func.Invoke(rerollChest, null);
                    AkSoundEngine.PostEvent("Play_OBJ_fuse_loop_01", rerollChest.gameObject);
                }
                break;

            case 11:     //Unlock
                if (rerollChest.IsLocked)
                {
                    rerollChest.ForceUnlock();
                }
                else
                {
                    rerollChest.ForceOpen(user);
                }
                break;

            case 12:     //Enjam
                rerollChest.gameObject.GetOrAddComponent <JammedChestBehav>();
                break;

            case 13:     //TeleportChest
                TeleportChest(rerollChest, user);
                break;

            case 14:     //Drill
                FauxDrill(rerollChest, user);
                break;
            }
        }
Exemple #29
0
 private void EXPLODE(Vector2 obj)
 {
     Exploder.DoDefaultExplosion(obj, default(Vector2), null, false, CoreDamageTypes.None, true);
 }
        private void SelfDestructOnKick()
        {
            int   currentCurse                 = PlayerStats.GetTotalCurse();
            int   currentCoolness              = PlayerStats.GetTotalCoolness();
            float ExplodeOnKickChances         = 0.25f;
            float ExplodeOnKickDamageToEnemies = 150f;

            bool ExplodeOnKickDamagesPlayer = BraveUtility.RandomBool();

            if (willDefinitelyExplode)
            {
                ExplodeOnKickChances         = 1f;
                ExplodeOnKickDamagesPlayer   = false;
                ExplodeOnKickDamageToEnemies = 200f;
            }
            else
            {
                if (currentCoolness >= 3)
                {
                    ExplodeOnKickDamagesPlayer   = false;
                    ExplodeOnKickDamageToEnemies = 175f;
                }
                if (currentCurse >= 3)
                {
                    ExplodeOnKickChances         = 0.35f;
                    ExplodeOnKickDamageToEnemies = 200f;
                }
            }

            if (spawnObjectOnSelfDestruct && SpawnedObject != null && !m_objectSpawned)
            {
                m_objectSpawned = true;
                GameObject PlacedGlitchObject = ChaosUtility.GenerateDungeonPlacable(SpawnedObject, false, true).InstantiateObject(transform.position.GetAbsoluteRoom(), (specRigidbody.GetUnitCenter(ColliderType.HitBox) - transform.position.GetAbsoluteRoom().area.basePosition.ToVector2()).ToIntVector2(VectorConversions.Floor));
                PlacedGlitchObject.transform.parent = transform.position.GetAbsoluteRoom().hierarchyParent;

                if (PlacedGlitchObject.GetComponent <PickupObject>() != null)
                {
                    PickupObject PlacedGltichObjectComponent = PlacedGlitchObject.GetComponent <PickupObject>();
                    PlacedGltichObjectComponent.RespawnsIfPitfall = true;
                }
            }

            if (UnityEngine.Random.value <= ExplodeOnKickChances)
            {
                if (useDefaultExplosion)
                {
                    Exploder.DoDefaultExplosion(specRigidbody.GetUnitCenter(ColliderType.HitBox), Vector2.zero, null, true, CoreDamageTypes.None);
                    Exploder.DoRadialDamage(ExplodeOnKickDamageToEnemies, sprite.WorldCenter, 4f, ExplodeOnKickDamagesPlayer, true, true);
                }
                else
                {
                    Exploder.Explode(specRigidbody.GetUnitCenter(ColliderType.HitBox), TableExplosionData, Vector2.zero, null, false, CoreDamageTypes.None, false);
                }

                /*if (gameObject.GetComponent<FlippableCover>() != null) {
                 *  FlippableCover flippableCover = gameObject.GetComponent<FlippableCover>();
                 *      flippableCover.DestroyCover();
                 * } else if (gameObject.GetComponent<MajorBreakable>() != null) {
                 *  MajorBreakable majorBreakableComponent = gameObject.GetComponent<MajorBreakable>();
                 *  if (m_lastDirectionKicked.HasValue) {
                 *      majorBreakableComponent.Break(m_lastDirectionKicked.Value.ToVector2());
                 *  } else {
                 *      majorBreakableComponent.Break(new Vector2(0, 0));
                 *  }
                 * } else if (gameObject.GetComponent<MinorBreakable>() != null) {
                 *  MinorBreakable minorBreakableComponent = gameObject.GetComponent<MinorBreakable>();
                 *  minorBreakableComponent.Break();
                 * } else {
                 *  Destroy(gameObject);
                 * }*/
                Destroy(gameObject);
                return;
            }
            return;
        }