Ejemplo n.º 1
0
 public override void HitEffect(int hitDirection, double damage)
 {
     for (int i = 0; i < 10; i++)
     {
         ;
     }
     if (npc.life <= 0)
     {
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Leaf"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Leaf"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Leaf"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Spore_5"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Spore_5"), 1f);
     }
 }
Ejemplo n.º 2
0
        public override void HitEffect(int hitDirection, double damage)
        {
            if (npc.life <= 0)
            {
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ReaperSkullHead"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ReaperSkullJaw"), 1f);
            }

            for (int k = 0; k < damage / npc.lifeMax * 50; k++)
            {
                Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Stone);
            }

            //Main.PlaySound(SoundID.Tink, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f);
        }
Ejemplo n.º 3
0
        public override void HitEffect(int hitDirection, double damage)
        {
            int d  = 3;
            int d1 = 7;

            for (int k = 0; k < 30; k++)
            {
                Dust.NewDust(npc.position, npc.width, npc.height, d, 2.5f * hitDirection, -2.5f, 0, Color.White, 0.7f);
                Dust.NewDust(npc.position, npc.width, npc.height, d1, 2.5f * hitDirection, -2.5f, 0, default(Color), .34f);
            }
            if (npc.life <= 0)
            {
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Reach3"));
            }
        }
Ejemplo n.º 4
0
 public override void HitEffect(int hitDirection, double damage)
 {
     //spawn gore if npc is dead after being hit
     if (npc.life < 0)
     {
         for (int i = 0; i < 3; i++)
         {
             Gore.NewGore(npc.position + new Vector2(Main.rand.Next(npc.width), Main.rand.Next(npc.height)), npc.velocity, mod.GetGoreSlot("Gores/NPCs/DF3_Gore"));
         }
         for (int i = 0; i < 6; i++)
         {
             Gore.NewGore(npc.position + new Vector2(Main.rand.Next(npc.width), Main.rand.Next(npc.height)), npc.velocity, mod.GetGoreSlot("Gores/NPCs/DF_Effect_Medium" + Main.rand.Next(1, 4)));
         }
     }
 }
Ejemplo n.º 5
0
        public override void AI()
        {
            Player player = Main.LocalPlayer;

            int distance = (int)Vector2.Distance(projectile.Center, player.Center);

            if (distance < 85)
            {
                player.AddBuff(ModContent.BuffType <HealingZoneBuff>(), 130);
                if (Main.rand.NextBool(30))
                {
                    int num143 = Gore.NewGore(new Vector2(projectile.Center.X + Main.rand.Next(-50, 50), projectile.Center.Y + Main.rand.Next(-50, 50)), new Vector2((float)Main.rand.Next(-10, 11) * 0.1f, (float)Main.rand.Next(-20, -10) * 0.1f), 331, (float)Main.rand.Next(80, 120) * 0.01f);
                }
            }
        }
Ejemplo n.º 6
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int i = 0; i < 20; i++)
         {
             Dust newDust = Main.dust[Dust.NewDust(npc.position, npc.width, npc.height, 30, 0f, 0f, 50, default(Color), 1.5f)];
             newDust.velocity *= 2f;
             newDust.noGravity = true;
         }
         Gore.NewGore(new Vector2(npc.position.X, npc.position.Y - 10f), new Vector2(hitDirection, 0f) * .3f, 61, npc.scale);
         Gore.NewGore(new Vector2(npc.position.X, npc.position.Y + (npc.height / 2) - 15f), new Vector2(hitDirection, 0f) * .3f, 62, npc.scale);
         Gore.NewGore(new Vector2(npc.position.X, npc.position.Y + npc.height - 20f), new Vector2(hitDirection, 0f) * .3f, 63, npc.scale);
     }
 }
Ejemplo n.º 7
0
        public override void AI()
        {
            if (FirstTick)
            {
                FirstTick = false;
                for (int i = 0; i < 25; i++)
                {
                    Vector2 gorePosition = Projectile.position;
                    gorePosition += new Vector2(Main.rand.NextFloat(Projectile.width / 2), Main.rand.NextFloat(Projectile.height / 2));

                    Gore.NewGore(gorePosition, new Vector2(1, 1), Main.rand.Next(61, 64), Main.rand.NextFloat(0.2f, 1.5f));
                    Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Type: 31, Scale: Main.rand.NextFloat(2f));
                }
            }
        }
Ejemplo n.º 8
0
        public override void HitEffect(int hitDirection, double damage)
        {
            if (npc.life <= 0)
            {
                for (int k = 0; k < 20; k++)
                {
                    Dust.NewDust(npc.position, npc.width, npc.height, 151, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f);
                }

                for (int i = 0; i < 3; ++i)
                {
                    Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot($"Gores/ChefGore{i+1}"), 1f);
                }
            }
        }
Ejemplo n.º 9
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int k = 0; k < 50; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, 62, 2.5f * (float)hitDirection, -2.5f, 0, default(Color), 1.2f);
         }
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/PetrousKnightGore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/PetrousKnightGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/PetrousKnightGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/PetrousKnightGore3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/PetrousKnightGore3"), 1f);
     }
 }
Ejemplo n.º 10
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int k = 0; k < 20; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, 151, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f);
         }
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DeadlingHead3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DeadlingLeg"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DeadlingArm"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DeadlingLeg"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DeadlingArm"), 1f);
     }
 }
Ejemplo n.º 11
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CyberKingGore3"), 1f);
     }
 }
Ejemplo n.º 12
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int k = 0; k < 20; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType <Sparkle>(), npc.velocity.X, npc.velocity.Y, 0, Color.White, 1);
         }
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LuminousDefenderGore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LuminousDefenderGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LuminousDefenderGore3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LuminousDefenderGore4"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LuminousDefenderGore5"), 1f);
     }
 }
Ejemplo n.º 13
0
        public override void Kill(int timeLeft)
        {
            Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/rumboom"), projectile.Center);
            Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 27);

            for (int i = 1; i < 5; ++i)
            {
                Gore.NewGore(projectile.Center, Vector2.Zero, mod.GetGoreSlot("Gores/Rum/RumGore" + i), 1f);
            }

            Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType <RumExplosion>(), projectile.damage, projectile.knockBack, projectile.owner);

            Projectile.NewProjectileDirect(projectile.Center - new Vector2(0, 15), new Vector2(0.25f, 15), ModContent.ProjectileType <RumFire>(), (int)(projectile.damage * 0.75f), projectile.knockBack, projectile.owner, 1, 12).timeLeft   = 60;
            Projectile.NewProjectileDirect(projectile.Center - new Vector2(0, 15), new Vector2(-0.25f, 15), ModContent.ProjectileType <RumFire>(), (int)(projectile.damage * 0.75f), projectile.knockBack, projectile.owner, -1, 12).timeLeft = 60;
        }
Ejemplo n.º 14
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int k = 0; k < 20; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, 191, 2.5f * hitDirection, -2.5f, 0, Color.Green, 0.7f);
         }
         Dust.NewDust(npc.position, npc.width, npc.height, 191, 2.5f * hitDirection, -2.5f, 0, Color.Green, 0.7f);
         Dust.NewDust(npc.position, npc.width, npc.height, 191, 2.5f * hitDirection, -2.5f, 0, Color.Green, 0.7f);
         Gore.NewGore(npc.position, npc.velocity, 99, 1f);
         Gore.NewGore(npc.position, npc.velocity, 99, 1f);
         Gore.NewGore(npc.position, npc.velocity, 99, 1f);
     }
 }
Ejemplo n.º 15
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int k = 0; k < 20; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, 151, 2.5f * (float)hitDirection, -2.5f, 0, default(Color), 0.7f);
         }
         Gore.NewGore(npc.position, npc.velocity, 99, 0.8f);
         Gore.NewGore(npc.position, npc.velocity, 99, 0.8f);
         Gore.NewGore(npc.position, npc.velocity, 99, 0.8f);
         Gore.NewGore(npc.position, npc.velocity, 99, 0.8f);
         Gore.NewGore(npc.position, npc.velocity, 99, 0.8f);
     }
 }
Ejemplo n.º 16
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         for (int k = 0; k < 20; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, 151, 2.5f * (float)hitDirection, -2.5f, 0, default(Color), 0.7f);
         }
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BloodmoonWarrior1Gore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore2"), 1f);
     }
 }
Ejemplo n.º 17
0
 public override void HitEffect(int hitDirection, double damage)
 {
     npc.ai[0]++;
     if (npc.life <= 0)
     {
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Roc3"), 1f);
     }
 }
Ejemplo n.º 18
0
 public override void HitEffect(int hitDirection, double damage)
 {
     Dust.NewDust(npc.position, npc.width, npc.height, 5, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f);
     if (npc.life <= 0)
     {
         for (int k = 0; k < 20; k++)
         {
             Dust.NewDust(npc.position, npc.width, npc.height, 5, 2.5f * hitDirection, -2.5f, 0, default(Color), 1f);
         }
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore_490"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore_491"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore_492"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore_493"), 1f);
     }
 }
Ejemplo n.º 19
0
 public override void Kill(int timeLeft)
 {
     Collision.HitTiles(projectile.position, projectile.velocity, projectile.width, projectile.height);
     for (int i = 0; i < 10; i++)
     {
         int d = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 167, projectile.oldVelocity.X * 0.2f, projectile.oldVelocity.Y * 0.2f);
         Main.dust[d].noGravity = true;
         Main.dust[d].scale     = 1.2f;
     }
     Main.PlaySound(SoundID.NPCDeath16, (int)projectile.Center.X, (int)projectile.Center.Y);
     for (int i = 1; i <= 3; i++)
     {
         Gore.NewGore(projectile.Center, projectile.velocity, mod.GetGoreSlot("Gores/Scarabeus/largescarab" + i.ToString()));
     }
 }
Ejemplo n.º 20
0
        public override void HitEffect(int hitDirection, double damage)
        {
            if (npc.life <= 0)
            {
                for (int k = 0; k < 20; k++)
                {
                    Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType <Sparkle>(), npc.velocity.X, npc.velocity.Y, 0, Color.White, 1);
                }

                for (int i = 0; i < 2; i++)
                {
                    Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/TumbleRockV2Gore" + i));
                }
            }
        }
Ejemplo n.º 21
0
 public override void Kill(int timeLeft)
 {
     Main.PlaySound(SoundID.Item89, projectile.position);
     projectile.position.X += (float)(projectile.width / 2);
     projectile.position.Y += (float)(projectile.height / 2);
     projectile.width       = (int)(128.0 * (double)projectile.scale);
     projectile.height      = (int)(128.0 * (double)projectile.scale);
     projectile.position.X -= (float)(projectile.width / 2);
     projectile.position.Y -= (float)(projectile.height / 2);
     for (int index = 0; index < 8; ++index)
     {
         Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0.0f, 0.0f, 100, new Color(), 1.5f);
     }
     for (int index1 = 0; index1 < 32; ++index1)
     {
         int index2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 15, 0.0f, 0.0f, 100, new Color(), 2.5f);
         Main.dust[index2].noGravity = true;
         Main.dust[index2].velocity *= 3f;
         int index3 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 15, 0.0f, 0.0f, 100, new Color(), 1.5f);
         Main.dust[index3].velocity *= 2f;
         Main.dust[index3].noGravity = true;
     }
     for (int index1 = 0; index1 < 2; ++index1)
     {
         int index2 = Gore.NewGore(projectile.position + new Vector2((float)(projectile.width * Main.rand.Next(100)) / 100f, (float)(projectile.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64), 1f);
         Main.gore[index2].velocity   *= 0.3f;
         Main.gore[index2].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
         Main.gore[index2].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
     }
     if (projectile.owner == Main.myPlayer)
     {
         projectile.localAI[1]   = -1f;
         projectile.maxPenetrate = 0;
         projectile.Damage();
     }
     for (int index1 = 0; index1 < 5; ++index1)
     {
         int index2 = Dust.NewDust(projectile.position, projectile.width, projectile.height, Utils.SelectRandom <int>(Main.rand, new int[3]
         {
             15,
             176,
             59
         }), 2.5f * (float)projectile.direction, -2.5f, 0, new Color(), 1f);
         Main.dust[index2].alpha     = 200;
         Main.dust[index2].velocity *= 2.4f;
         Main.dust[index2].scale    += Main.rand.NextFloat();
     }
 }
Ejemplo n.º 22
0
 public override void Kill(int timeLeft)
 {
     if (projectile.ai[1] == 0)
     {
         for (int i = 0; i < 2; i++)
         {
             // Random upward vector.
             Vector2 vel = new Vector2(Main.rand.NextFloat(-8, 8), Main.rand.NextFloat(-10, -8));
             Projectile.NewProjectile(projectile.Center, vel, ProjectileID.StyngerShrapnel, projectile.damage / 2, projectile.knockBack, projectile.owner, 0, 1);
         }
     }
     // Play explosion sound
     Main.PlaySound(SoundID.Item62, projectile.position);
     // Smoke Dust spawn
     for (int i = 0; i < 3; i++)
     {
         int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 2f);
         Main.dust[dustIndex].velocity *= 1.4f;
     }
     // Fire Dust spawn
     for (int i = 0; i < 6; i++)
     {
         int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 3f);
         Main.dust[dustIndex].noGravity = true;
         Main.dust[dustIndex].velocity *= 5f;
         dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 2f);
         Main.dust[dustIndex].velocity *= 3f;
     }
     // Large Smoke Gore spawn
     for (int g = 0; g < 2; g++)
     {
         int goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
         Main.gore[goreIndex].scale      = 1f;
         Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f;
         Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f;
         goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
         Main.gore[goreIndex].scale      = 1f;
         Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f;
         Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f;
     }
     // reset size to normal width and height.
     projectile.position.X = projectile.position.X + (float)(projectile.width / 2);
     projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2);
     projectile.width      = 10;
     projectile.height     = 10;
     projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
     projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
 }
Ejemplo n.º 23
0
        public override void NPCLoot()
        {
            Gore.NewGore(npc.Center, npc.velocity + new Vector2(Main.rand.Next(-1, 1), Main.rand.Next(-1, 1)), mod.GetGoreSlot("Gores/FrogHead"), 1f);
            Gore.NewGore(npc.Center, npc.velocity + new Vector2(Main.rand.Next(-1, 1), Main.rand.Next(-1, 1)), mod.GetGoreSlot("Gores/FrogLeg"), 1f);
            Gore.NewGore(npc.Center, npc.velocity + new Vector2(Main.rand.Next(-1, 1), Main.rand.Next(-1, 1)), mod.GetGoreSlot("Gores/FrogBody"), 1f);
            DRGNModWorld.downedToxicFrog = true;
            if (!Main.expertMode)
            {
                Item.NewItem(npc.getRect(), mod.ItemType("ToxicFlesh"), Main.rand.Next(15, 20));
                Item.NewItem(npc.getRect(), mod.ItemType("EarthenOre"), Main.rand.Next(15, 20));
                int rand = Main.rand.Next(1, 8);


                if (rand == 1)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <ThePlague>());
                }
                else if (rand == 2)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <ToxicRifle>());
                }
                else if (rand == 3)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <ThrowingTongue>());
                }
                else if (rand == 4)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <Lobber>());
                }
                else if (rand == 5)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <TongueSword>());
                }
                else if (rand == 6)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <TongueWhip>());
                }
                else if (rand == 7)
                {
                    Item.NewItem(npc.getRect(), ModContent.ItemType <FrogStaff>());
                }
            }

            else
            {
                npc.DropBossBags();
            }
        }
Ejemplo n.º 24
0
        public override void AI()
        {
            projectile.frameCounter++;
            if (projectile.frameCounter >= 2)
            {
                projectile.frameCounter = 0;
                projectile.frame        = (projectile.frame + 1);
            }

            if (projectile.ai[0] > 0)
            {
                return;
            }
            Main.PlaySound(89, (int)projectile.position.X, (int)projectile.position.Y, 21);;
            projectile.position.X += (float)(projectile.width / 2);
            projectile.position.Y += (float)(projectile.height / 2);
            projectile.width       = (int)(16.0 * (double)projectile.scale);
            projectile.height      = (int)(16.0 * (double)projectile.scale);
            projectile.position.X -= (float)(projectile.width / 2);
            projectile.position.Y -= (float)(projectile.height / 2);
            for (int index = 0; index < 8; ++index)
            {
                Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0.0f, 0.0f, 100, new Color(), 1.5f);
            }
            for (int index1 = 0; index1 < 32; ++index1)
            {
                int index2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("UndeadDust"), 0.0f, 0.0f, 100, new Color(), 2.5f);
                Main.dust[index2].noGravity = true;
                Main.dust[index2].velocity *= 3f;
                int index3 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("UndeadDust"), 0.0f, 0.0f, 100, new Color(), 1.5f);
                Main.dust[index3].velocity *= 2f;
                Main.dust[index3].noGravity = true;
            }
            for (int index1 = 0; index1 < 2; ++index1)
            {
                int index2 = Gore.NewGore(projectile.position + new Vector2((float)(projectile.width * Main.rand.Next(100)) / 100f, (float)(projectile.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64), 1f);
                Main.gore[index2].velocity   *= 0.3f;
                Main.gore[index2].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
                Main.gore[index2].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
            }
            if (projectile.owner == Main.myPlayer)
            {
                projectile.localAI[1]   = -1f;
                projectile.maxPenetrate = 0;
                projectile.Damage();
            }
            projectile.ai[0]++;
        }
Ejemplo n.º 25
0
        public override void HitEffect(int hitDirection, double damage)
        {
            if (npc.life <= (int)(npc.lifeMax * .66f) && !RespawnArms1 && Main.netMode != 1)
            {
                WeaponCount += 1;
                npc.ai[1]    = 0;
                RespawnArms1 = true;

                RespawnArms();
                if (Main.netMode != 1)
                {
                    AAMod.Chat(Lang.BossChat("ZeroBoss10"), Color.Red, false);
                }
                npc.netUpdate = true;
            }
            if (npc.life <= (int)(npc.lifeMax * .33f) && !RespawnArms2 && Main.netMode != 1)
            {
                WeaponCount += 1;
                npc.ai[1]    = 0;
                RespawnArms2 = true;
                RespawnArms();
                if (Main.netMode != 1)
                {
                    AAMod.Chat(Lang.BossChat("ZeroBoss10"), Color.Red, false);
                }
                npc.netUpdate = true;
            }

            if (npc.life <= 0 && npc.type == ModContent.NPCType <Zero>())
            {
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore1"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore1"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore1"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore1"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore3"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore3"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore3"), 1f);
                Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ZeroGore3"), 1f);
                if (!Main.expertMode)
                {
                    if (Main.netMode != 1)
                    {
                        AAMod.Chat(Lang.BossChat("ZeroBoss2"), Color.Red.R, Color.Red.G, Color.Red.B);
                    }
                }
            }
        }
Ejemplo n.º 26
0
        public override void Kill(int timeLeft)
        {
            // Play explosion sound
            Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Projectiles/LAMExplode"));

            // Smoke Dust spawn
            for (int i = 0; i < 50; i++)
            {
                int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 2f);
                Main.dust[dustIndex].velocity *= 1.4f;
            }
            // Fire Dust spawn
            for (int i = 0; i < 80; i++)
            {
                int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 3f);
                Main.dust[dustIndex].noGravity = true;
                Main.dust[dustIndex].velocity *= 5f;
                dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 2f);
                Main.dust[dustIndex].velocity *= 3f;
            }
            // Large Smoke Gore spawn
            for (int g = 0; g < 2; g++)
            {
                int goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[goreIndex].scale      = 1.5f;
                Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f;
                Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f;
                goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[goreIndex].scale      = 1.5f;
                Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f;
                Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f;
                goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[goreIndex].scale      = 1.5f;
                Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f;
                Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y - 1.5f;
                goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[goreIndex].scale      = 1.5f;
                Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f;
                Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y - 1.5f;
            }
            // reset size to normal width and height.
            projectile.position.X = projectile.position.X + (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2);
            projectile.width      = 10;
            projectile.height     = 10;
            projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
        }
Ejemplo n.º 27
0
        public override void Kill(int timeLeft)
        {
            Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14);
            for (int num625 = 0; num625 < 2; num625++)
            {
                float scaleFactor10 = 0.33f;
                if (num625 == 1)
                {
                    scaleFactor10 = 0.66f;
                }
                if (num625 == 2)
                {
                    scaleFactor10 = 1f;
                }

                int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num626].velocity *= scaleFactor10;
                Gore expr_13AB6_cp_0 = Main.gore[num626];
                expr_13AB6_cp_0.velocity.X = expr_13AB6_cp_0.velocity.X + 1f;
                Gore expr_13AD6_cp_0 = Main.gore[num626];
                expr_13AD6_cp_0.velocity.Y = expr_13AD6_cp_0.velocity.Y + 1f;
                num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num626].velocity *= scaleFactor10;
                Gore expr_13B79_cp_0 = Main.gore[num626];
                expr_13B79_cp_0.velocity.X = expr_13B79_cp_0.velocity.X - 1f;
                Gore expr_13B99_cp_0 = Main.gore[num626];
                expr_13B99_cp_0.velocity.Y = expr_13B99_cp_0.velocity.Y + 1f;
                num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num626].velocity *= scaleFactor10;
                Gore expr_13C3C_cp_0 = Main.gore[num626];
                expr_13C3C_cp_0.velocity.X = expr_13C3C_cp_0.velocity.X + 1f;
                Gore expr_13C5C_cp_0 = Main.gore[num626];
                expr_13C5C_cp_0.velocity.Y = expr_13C5C_cp_0.velocity.Y - 1f;
                num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f);
                Main.gore[num626].velocity *= scaleFactor10;
                Gore expr_13CFF_cp_0 = Main.gore[num626];
                expr_13CFF_cp_0.velocity.X = expr_13CFF_cp_0.velocity.X - 1f;
                Gore expr_13D1F_cp_0 = Main.gore[num626];
                expr_13D1F_cp_0.velocity.Y = expr_13D1F_cp_0.velocity.Y - 1f;
            }

            projectile.position.X = projectile.position.X + (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2);
            projectile.width      = 10;
            projectile.height     = 10;
            projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
            projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
        }
Ejemplo n.º 28
0
        public override bool CheckDead()
        {
            int goreIndex  = Gore.NewGore(npc.position, (npc.velocity * npc.direction), mod.GetGoreSlot("Gores/Idols/IceIdols/IceIdol3/IceIdol3_Gore1"), 1f);
            int goreIndex2 = Gore.NewGore(npc.position, (npc.velocity * npc.direction) * -1, mod.GetGoreSlot("Gores/Idols/IceIdols/IceIdol3/IceIdol1_Gore2"), 1f);
            int goreIndex3 = Gore.NewGore(npc.position, (npc.velocity * npc.direction), mod.GetGoreSlot("Gores/Idols/IceIdols/IceIdol3/IceIdol3_Gore3"), 1f);
            int goreIndex4 = Gore.NewGore(npc.position, (npc.velocity * npc.direction) * -1, mod.GetGoreSlot("Gores/Idols/IceIdols/IceIdol3/IceIdol3_Gore4"), 1f);
            int goreIndex5 = Gore.NewGore(npc.position, (npc.velocity * npc.direction), mod.GetGoreSlot("Gores/Idols/IceIdols/IceIdol3/IceIdol3_Gore5"), 1f);
            int goreIndex6 = Gore.NewGore(npc.position, (npc.velocity * npc.direction), mod.GetGoreSlot("Gores/Idols/IceIdols/IceIdol3/IceIdol3_Gore6"), 1f);

            for (int i = 0; i <= 20; i++)
            {
                Dust.NewDustDirect(npc.Center, npc.width, npc.height, DustID.Ice, Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f), Scale: 1);
            }

            return(true);
        }
Ejemplo n.º 29
0
 public override void HitEffect(int hitDirection, double damage)
 {
     if (npc.life <= 0)
     {
         int gore = Gore.NewGore(npc.position + new Vector2(10f, 0f), Vector2.Zero, Main.rand.Next(435, 438), 2f);
         Main.gore[gore].velocity *= 0.3f;
         gore = Gore.NewGore(npc.position + new Vector2(50f, 10f), Vector2.Zero, Main.rand.Next(435, 438), 2f);
         Main.gore[gore].velocity *= 0.3f;
         gore = Gore.NewGore(npc.position + new Vector2(0f, 60f), Vector2.Zero, Main.rand.Next(435, 438), 2f);
         Main.gore[gore].velocity *= 0.3f;
         gore = Gore.NewGore(npc.position + new Vector2(40f, 50f), Vector2.Zero, Main.rand.Next(435, 438), 2f);
         Main.gore[gore].velocity *= 0.3f;
         gore = Gore.NewGore(npc.position + new Vector2(30f, 30f), Vector2.Zero, Main.rand.Next(435, 438), 2f);
         Main.gore[gore].velocity *= 0.3f;
     }
 }
Ejemplo n.º 30
0
 public override void HitEffect(int hitDirection, double damage)
 {
     for (int k = 0; k < 30; k++)
     {
         Dust.NewDust(npc.position, npc.width, npc.height, DustID.Rope, 2.5f * hitDirection, -2.5f, 0, Color.White, Main.rand.NextFloat(.3f, 1.1f));
         Dust.NewDust(npc.position, npc.width, npc.height, DustID.Harpy, 2.5f * hitDirection, -2.5f, 0, Color.White, Main.rand.NextFloat(.3f, 1.1f));
     }
     //Main.PlaySound(3, (int)npc.position.X, (int)npc.position.Y, 45, 1f, 0f);
     if (npc.life <= 0)
     {
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MycelialBotanistGore1"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MycelialBotanistGore2"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MycelialBotanistGore3"), 1f);
         Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MycelialBotanistGore4"), 1f);
     }
 }