public override void HitEffect(int hitDirection, double damage) { //Putting gores in HitEffect prevents gores when scripting NPC death (setting life to 0) if (npc.life <= 0) { //spawn initial set for (int i = 1; i <= 3; i++) { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Crystal_Cultist_Gore_" + i)); } //spawn the remaining arm Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Crystal_Cultist_Gore_1")); } }
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/TravalibirdGore1"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/TravalibirdGore2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/TravalibirdGore2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/TravalibirdGore3"), 1f); } }
public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/EarthElemental"), 1f); } }
public override void NPCLoot() { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HeroofLumeliGore1"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HeroofLumeliaGore2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HeroofLumeliaGore3"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HeroofLumeliaGore2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HeroofLumeliaGore3"), 1f); }
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/Gore1"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore3"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gore4"), 1f); } }
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, 31, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f); } Gore.NewGore(npc.position, npc.velocity, 220, 1f); Gore.NewGore(npc.position, npc.velocity, 221, 1f); Gore.NewGore(npc.position, npc.velocity, 222, 1f); } }
// TODO: GetGoreSlot public override void HitEffect(int hitDirection, double damage) { if (NPC.life <= 0) { //spawn initial set for (int i = 1; i <= 3; i++) { Gore.NewGore(NPC.position, NPC.velocity, Find <ModGore>("CrystiliumMod/Crystal_Archer_Gore_" + i).Type); } //spawn a couple extra bits Gore.NewGore(NPC.position, NPC.velocity, Find <ModGore>("CrystiliumMod/Crystal_Archer_Gore_4").Type); Gore.NewGore(NPC.position, NPC.velocity, Find <ModGore>("CrystiliumMod/Crystal_Archer_Gore_4").Type); } }
public override void HitEffect(int hitDirection, double damage) { for (int k = 0; k < 10; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection * 2.5f, -1f, 0, default(Color), Main.rand.NextFloat(.45f, 1.15f)); } if (npc.life <= 0) { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hookbat/Hookbat1"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hookbat/Hookbat2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hookbat/Hookbat3"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hookbat/Hookbat1"), 1f); } }
public override bool CheckDead() { int goreIndex = Gore.NewGore(npc.position, (npc.velocity * npc.direction), mod.GetGoreSlot("Gores/Idols/ObsidianIdols/ObsidianIdol3/ObsidianIdol3_Gore1"), 1f); int goreIndex2 = Gore.NewGore(npc.position, (npc.velocity * npc.direction) * -1, mod.GetGoreSlot("Gores/Idols/ObsidianIdols/ObsidianIdol3/ObsidianIdol3_Gore2"), 1f); int goreIndex3 = Gore.NewGore(npc.position, (npc.velocity * npc.direction), mod.GetGoreSlot("Gores/Idols/ObsidianIdols/ObsidianIdol3/ObsidianIdol3_Gore3"), 1f); int goreIndex4 = Gore.NewGore(npc.position, (npc.velocity * npc.direction) * -1, mod.GetGoreSlot("Gores/Idols/ObsidianIdols/ObsidianIdol3/ObsidianIdol3_Gore4"), 1f); for (int i = 0; i <= 20; i++) { Dust.NewDustDirect(npc.Center, npc.width, npc.height, DustID.Dirt, Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f), Scale: 1); } return(true); }
public override void HitEffect(int hitDirection, double damage) { npc.life = npc.lifeMax; 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, 73, 1f); Gore.NewGore(npc.position, npc.velocity, 74, 1f); Gore.NewGore(npc.position, npc.velocity, 75, 1f); } }
// TODO: GetGoreSlot public override void HitEffect(int hitDirection, double damage) { //Putting gores in HitEffect prevents gores when scripting NPC death (setting life to 0) if (NPC.life <= 0) { //spawn initial set for (int i = 1; i <= 3; i++) { Gore.NewGore(NPC.position, NPC.velocity, Find <ModGore>("CrystiliumMod/Crystal_Cultist_Gore_" + i).Type); } //spawn the remaining arm Gore.NewGore(NPC.position, NPC.velocity, Find <ModGore>("CrystiliumMod/Crystal_Cultist_Gore_1").Type); } }
public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { for (int i = 0; i < 5; i++) { Dust.NewDust(npc.position, npc.width, npc.height, 86, npc.velocity.X, npc.velocity.Y); } Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WilloWispGore1"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WilloWispGore2"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WilloWispGore3"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WilloWispGore3"), 1f); } }
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/One1"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/One2"), 1f); int dust = Dust.NewDust(npc.position, npc.width, npc.height, 6); } }
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/Flesh_Golem_Head"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Golem_Arm"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Golem_Arm"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Flesh_Golem_gore_1"), 1f); } }
public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { for (int i = 1; i <= 6; i++) { Vector2 pos = npc.position + new Vector2(Main.rand.NextFloat(npc.width), Main.rand.NextFloat(npc.height)); Gore.NewGore(pos, npc.velocity, mod.GetGoreSlot("Gores/NatureGore" + i.ToString()), npc.scale); } for (int i = 0; i < Main.maxNPCs; i++) //find neck segments, place gores there { if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType<NatureChampionHead>() && Main.npc[i].ai[1] == npc.whoAmI) { Vector2 connector = Main.npc[i].Center; Vector2 neckOrigin = npc.Center + new Vector2(54 * npc.spriteDirection, -10); float chainsPerUse = 0.05f; bool spawnNeck = false; for (float j = 0; j <= 1; j += chainsPerUse) { if (j == 0) continue; Vector2 distBetween = new Vector2(X(j, neckOrigin.X, (neckOrigin.X + connector.X) / 2, connector.X) - X(j - chainsPerUse, neckOrigin.X, (neckOrigin.X + connector.X) / 2, connector.X), Y(j, neckOrigin.Y, (neckOrigin.Y + 50), connector.Y) - Y(j - chainsPerUse, neckOrigin.Y, (neckOrigin.Y + 50), connector.Y)); if (distBetween.Length() > 36 && chainsPerUse > 0.01f) { chainsPerUse -= 0.01f; j -= chainsPerUse; continue; } float projTrueRotation = distBetween.ToRotation() - (float)Math.PI / 2; Vector2 lightPos = new Vector2(X(j, neckOrigin.X, (neckOrigin.X + connector.X) / 2, connector.X), Y(j, neckOrigin.Y, (neckOrigin.Y + 50), connector.Y)); spawnNeck = !spawnNeck; if (spawnNeck) Gore.NewGore(lightPos, Main.npc[i].velocity, mod.GetGoreSlot("Gores/NatureGore7"), Main.npc[i].scale); } for (int j = 8; j <= 10; j++) //head gores { Vector2 pos = Main.npc[i].position + new Vector2(Main.rand.NextFloat(Main.npc[i].width), Main.rand.NextFloat(Main.npc[i].height)); Gore.NewGore(pos, Main.npc[i].velocity, mod.GetGoreSlot("Gores/NatureGore" + j.ToString()), Main.npc[i].scale); } } } } }
public override void Kill(int timeLeft) { int a = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y - 16f, 0f, 0f, mod.ProjectileType("BombExplosion"), 200, 3, projectile.owner); // Play explosion sound Main.PlaySound(SoundID.Item15, projectile.position); // 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, DustID.Smoke, 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, DustID.Fire, 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, DustID.Fire, 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 = 48; projectile.height = 48; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); }
public void explode() { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62, 0.8f); projectile.velocity.X = 0; projectile.velocity.Y = 0; Gore.NewGore(projectile.position - projectile.Size, new Vector2(0, 0), mod.GetGoreSlot("Gores/Explosions/DreadBomb")); Lighting.AddLight(projectile.position, 1f, 1f, 0.5f); projectile.position.X = projectile.position.X + (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); projectile.width = 96; projectile.height = 96; projectile.penetrate = 30; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); projectile.knockBack = 8f; for (int k = 0; k < 2 + Main.rand.Next(2); k++) { int num1 = Gore.NewGore(projectile.Center, new Vector2(Main.rand.Next(4) - 2, Main.rand.Next(4) - 2), GoreID.ChimneySmoke1); Main.gore[num1].timeLeft = Main.rand.Next(50) + 45; } for (int k = 0; k < 2 + Main.rand.Next(2); k++) { int num1 = Gore.NewGore(projectile.Center, new Vector2(Main.rand.Next(4) - 2, Main.rand.Next(4) - 2), GoreID.ChimneySmoke2); Main.gore[num1].timeLeft = Main.rand.Next(30) + 35; } for (int k = 0; k < 2 + Main.rand.Next(2); k++) { int num1 = Gore.NewGore(projectile.Center, new Vector2(Main.rand.Next(4) - 2, Main.rand.Next(4) - 2), GoreID.ChimneySmoke3); Main.gore[num1].timeLeft = Main.rand.Next(20) + 25; } for (int k = 0; k < 8; k++) { int num1 = Dust.NewDust(projectile.position, projectile.width, projectile.height, mod.DustType("OrangeLight"), Main.rand.Next(10) - 5, Main.rand.Next(10) - 5); Main.dust[num1].noGravity = true; Main.dust[num1].velocity.X = Main.rand.NextFloat() * 5 - 2.5f; Main.dust[num1].velocity.X = Main.rand.NextFloat() * 5 - 2.5f; } for (int k = 0; k < 12; k++) { int num1 = Dust.NewDust(projectile.position, projectile.width, projectile.height, mod.DustType("YellowLight"), Main.rand.Next(10) - 5, Main.rand.Next(10) - 5); Main.dust[num1].noGravity = true; Main.dust[num1].velocity.X = Main.rand.NextFloat() * 5 - 2.5f; Main.dust[num1].velocity.X = Main.rand.NextFloat() * 5 - 2.5f; } projectile.hide = true; projectile.timeLeft = bonusTime; projectile.extraUpdates = bonusTime; canExplode = false; }
public override void AI() { if (!LegendWorld.OvergrowBossOpen) { npc.dontTakeDamage = true; } else { npc.dontTakeDamage = false; } if (!(Main.npc.Any(n => n.active && n.type == ModContent.NPCType <OvergrowBoss>()))) { return; } NPC boss = Main.npc.FirstOrDefault(n => n.active && n.type == ModContent.NPCType <OvergrowBoss>()); if (npc.immortal) { npc.ai[0]++; } if (npc.ai[0] >= 30) { npc.active = false; } if (npc.ai[0] > 0) { Vector2 pos = Vector2.Lerp(npc.Center, boss.Center + Vector2.Normalize(npc.Center - boss.Center) * 80, npc.ai[0] / 30f); for (int k = 0; k < 5; k++) { Dust.NewDustPerfect(pos, ModContent.DustType <Dusts.Stamina>(), Vector2.One.RotatedByRandom(6.28f)); if (Main.rand.Next(2) == 0) { Dust.NewDustPerfect(pos, ModContent.DustType <Dusts.Stone>(), Vector2.One.RotatedByRandom(6.28f)); } } if (npc.ai[0] % 3 == 0) { Gore.NewGore(pos, new Vector2(0, 1), mod.GetGoreSlot("Gores/ChainGore")); } if (npc.ai[0] % 8 == 0) { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/ChainHit").WithPitchVariance(0.4f), pos); } } if (npc.ai[0] == 1) { } }
public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { for (int k = 0; k < 60; k++) { Dust.NewDust(npc.Center, npc.width, npc.height, 6, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f); Dust.NewDust(npc.Center, npc.width, npc.height, 6, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f); Dust.NewDust(npc.Center, npc.width, npc.height, 6, 2.5f * hitDirection, -2.5f, 0, default(Color), 0.7f); } Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/DunekeeperEye"), 1f); Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/DunekeeperLeftHalf"), 1f); Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/DunekeeperRightHalf"), 1f); } }
public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ReaverSharkGore"), 1f); } for (int k = 0; k < 11; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 5, npc.direction, -1f, 1, default(Color), .61f); } for (int k = 0; k < 5; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 5, npc.direction, -1f, 1, default(Color), .91f); } }
public override void AI() { Player player = Main.LocalPlayer; int distance = (int)Vector2.Distance(projectile.Center, player.Center); if (distance < 100) { player.AddBuff(ModContent.BuffType <HealingZoneBuff>(), 300); 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); } } }
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/DeadlingHead1"), 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); } }
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; }
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())); } }
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); } }
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); } }
public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0 && Main.netMode != 2) { Gore gore = Gore.NewGoreDirect(npc.Center, RandomVel, mod.GetGoreSlot("Gores/Mobs/OwtchGore"), npc.scale); gore.position -= new Vector2(Main.goreTexture[gore.type].Width, Main.goreTexture[gore.type].Height) / 2; gore.timeLeft = 60; for (int i = 0; i < 10; i++) { Dust dust = Dust.NewDustDirect(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 69, RandomVel.X, RandomVel.Y, 0, default(Color), 1f); dust.noGravity = false; } } }
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/TheUndertakerGore{i+1}"), 1f); } } }
public override void Kill(int timeLeft) { Player player = Main.player[projectile.owner]; Main.PlaySound(new Terraria.Audio.LegacySoundStyle(4, 19)); Main.PlaySound(new Terraria.Audio.LegacySoundStyle(2, 107)); for (int j = 0; j < 4; j++) { Gore.NewGore(projectile.position, new Vector2(), Main.rand.Next(134, 137), 1); } if (Main.rand.Next(4) == 0 && !player.HasBuff(ModContent.BuffType <CrimsonSkullBuff>()) && projectile.friendly) { Item.NewItem((int)projectile.position.X, (int)projectile.position.Y - 20, projectile.width, projectile.height, ModContent.ItemType <CrimsonSkull>()); } }
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); } }