Example #1
0
        public override void AI()
        {
            foreach (Player player in Main.player)
            {
                if (AbilityHelper.CheckSmash(player, projectile.Hitbox))
                {
                    if (!StarlightWorld.HasFlag(WorldFlags.SealOpen))
                    {
                        StarlightWorld.Flag(WorldFlags.SealOpen);
                        player.GetHandler().ActiveAbility?.Deactivate();
                        player.GetModPlayer <StarlightPlayer>().Shake = 80;

                        Main.PlaySound(SoundID.NPCDeath59);
                        Main.PlaySound(SoundID.Item123);

                        for (float k = 0; k <= 3.14f; k += 0.02f)
                        {
                            Dust.NewDustPerfect(projectile.Center, DustID.Stone, new Vector2(-1, 0).RotatedBy(k) * Main.rand.Next(0, 150) * 0.1f, 0, default, 2.5f);