diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 6828404660..8545129723 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -401,44 +401,42 @@ namespace CalamityMod.CalPlayer } } - if (cgp.pearlBullet && proj.numHits == 0) + if ((cgp.pearlBullet1 || cgp.pearlBullet2 || cgp.pearlBullet3) && proj.numHits == 0) { - Vector2 randPos = proj.Center + new Vector2(30, 30).RotateRandom(100) * Main.rand.NextFloat(0.9f, 1.1f); - CustomPulse spark = new CustomPulse(randPos, Vector2.Zero, Color.White, "CalamityMod/Particles/HighResHollowCircleHardEdge", new Vector2(1, 1), Main.rand.NextFloat(-2f, 2f), 0.005f, 0.08f, 14); - GeneralParticleHandler.SpawnParticle(spark); - int points = (int)(MathHelper.Clamp(6 - (int)(proj.numHits * 0.3f), 3, 6)); - float radians = MathHelper.TwoPi / points; + Color color = cgp.pearlBullet1 ? Color.LightBlue : cgp.pearlBullet2 ? Color.LightPink : Color.Khaki; Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f)); + float radians = MathHelper.TwoPi / 3; + + Vector2 Position = target.Center + spinningPoint.RotatedBy(radians * (cgp.pearlBullet1 ? 0 : cgp.pearlBullet2 ? 1 : 2)).RotatedBy(-0.45f) * 55; + int bulletType = (cgp.pearlBullet1 ? 0 : cgp.pearlBullet2 ? 1 : 2); + + CustomPulse spark = new CustomPulse(target.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/HighResHollowCircleHardEdge", new Vector2(1, 1), Main.rand.NextFloat(-2f, 2f), 0.005f, 0.035f + 0.018f * bulletType, 14 + bulletType); + GeneralParticleHandler.SpawnParticle(spark); + CustomPulse spark2 = new CustomPulse(Position, Vector2.Zero, color, "CalamityMod/Particles/HighResFoggyCircleHardEdge", new Vector2(1, 1), Main.rand.NextFloat(-2f, 2f), 0.005f, 0.06f, 17); + GeneralParticleHandler.SpawnParticle(spark2); + + int points = 6; + radians = MathHelper.TwoPi / points; + spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f)); float rotRando = Main.rand.NextFloat(0.1f, 2.5f); for (int k = 0; k < points; k++) { - int randomColor = Main.rand.Next(1, 3 + 1); - Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando); - SparkParticle subTrail = new SparkParticle(randPos + velocity * 10f, velocity * 15, false, 13, 1f, color); + Particle subTrail = new GlowSparkParticle(Position + velocity * 10f, velocity * 15, false, 12, 0.03f, color, new Vector2(1.35f, 0.5f), true); GeneralParticleHandler.SpawnParticle(subTrail); - SparkParticle subTrail2 = new SparkParticle(randPos + velocity * 20f, velocity * 18, false, 23, 0.55f, Color.White); - GeneralParticleHandler.SpawnParticle(subTrail2); } int pearls = (int)(MathHelper.Clamp(7 - (int)(proj.numHits * 0.5f), 2, 7)); for (int k = 0; k < pearls; k++) { - int randomColor = Main.rand.Next(1, 3 + 1); - Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - Vector2 velocity = new Vector2(1, 1).RotatedByRandom(100) * Main.rand.NextFloat(0.7f, 1.2f); - PearlParticle subTrail = new PearlParticle(randPos + velocity * 11f, velocity * 10, true, 50, 0.85f, color, 0.95f, Main.rand.NextFloat(2, -2), true); + PearlParticle subTrail = new PearlParticle(Position + velocity * 11f, velocity * 10, true, 50, 0.85f, color, 0.95f, Main.rand.NextFloat(2, -2), true); GeneralParticleHandler.SpawnParticle(subTrail); } int dusts = (int)(MathHelper.Clamp(10 - (int)(proj.numHits * 0.5f), 2, 10)); for (int i = 0; i <= dusts; i++) { - int randomColor = Main.rand.Next(1, 3 + 1); - Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - - Dust dust2 = Dust.NewDustPerfect(randPos, 278, new Vector2(5, 5).RotatedByRandom(100f) * Main.rand.NextFloat(0.1f, 2.9f)); + Dust dust2 = Dust.NewDustPerfect(Position, 278, new Vector2(5, 5).RotatedByRandom(100f) * Main.rand.NextFloat(0.1f, 2.9f)); dust2.noGravity = false; dust2.scale = Main.rand.NextFloat(0.3f, 0.8f); dust2.color = color; @@ -451,6 +449,7 @@ namespace CalamityMod.CalPlayer SoundEngine.PlaySound(hitSound with { Volume = 0.4f, Pitch = 0.4f, PitchVariance = 0.2f }, proj.Center); } + if (cgp.lifeBullet && proj.numHits == 0) { int points = 10; diff --git a/Items/Weapons/Ranged/AGunofFireAndIce.cs b/Items/Weapons/Ranged/AGunofFireAndIce.cs index dd036d934f..a3e63d3423 100644 --- a/Items/Weapons/Ranged/AGunofFireAndIce.cs +++ b/Items/Weapons/Ranged/AGunofFireAndIce.cs @@ -11,6 +11,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Ranged { + [LegacyName("CursedCapper")] public class AGunofFireAndIce : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = CalamityGlobalItem.Rarity4BuyPrice; + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item41; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Arietes41.cs b/Items/Weapons/Ranged/Arietes41.cs index 6d0f20e088..a2c5021803 100644 --- a/Items/Weapons/Ranged/Arietes41.cs +++ b/Items/Weapons/Ranged/Arietes41.cs @@ -20,15 +20,15 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 56; Item.height = 30; Item.scale = 0.85f; - Item.damage = 45; + Item.damage = 65; Item.DamageType = DamageClass.Ranged; Item.useTime = 13; Item.useAnimation = 13; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 2.25f; - Item.value = CalamityGlobalItem.Rarity4BuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.knockBack = 2.5f; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item41; Item.autoReuse = true; Item.shootSpeed = 13f; @@ -101,9 +101,9 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(). AddIngredient(ItemID.ShroomiteBar, 3). - AddIngredient(ItemID.FallenStar, 5). + AddIngredient(ItemID.FallenStar, 3). // 41 Arietis is a triple star system AddIngredient(). - AddTile(TileID.Anvils). + AddTile(TileID.MythrilAnvil). Register(); } } diff --git a/Items/Weapons/Ranged/DodusHandcannon.cs b/Items/Weapons/Ranged/DodusHandcannon.cs index bfcefcfd68..6751d3d00a 100644 --- a/Items/Weapons/Ranged/DodusHandcannon.cs +++ b/Items/Weapons/Ranged/DodusHandcannon.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(5). AddIngredient(ItemID.LunarBar, 15). AddTile(TileID.LunarCraftingStation). diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index 536d5d4bee..80e3104d20 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -7,6 +7,8 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Rarities; +using CalamityMod.Items.Materials; namespace CalamityMod.Items.Weapons.Ranged { @@ -28,8 +30,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = CalamityGlobalItem.RarityYellowBuyPrice; - Item.rare = ItemRarityID.Yellow; + Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item41; Item.autoReuse = true; Item.shootSpeed = 14f; @@ -66,11 +68,23 @@ namespace CalamityMod.Items.Weapons.Ranged PearlParticle pearl1 = new PearlParticle(itemPosition + velocity.RotatedBy(-0.6 * player.direction) + velocity * 1.35f, velocity.RotatedByRandom(0.25) * Main.rand.NextFloat(0.2f, 1f), false, Main.rand.Next(40, 45 + 1), Main.rand.NextFloat(0.6f, 0.75f), color, 0.95f, Main.rand.NextFloat(1, -1), true); GeneralParticleHandler.SpawnParticle(pearl1); } + int shotColor = Main.rand.Next(1, 3 + 1); for (int k = 0; k < 3; k++) { Projectile pearlShot = Projectile.NewProjectileDirect(source, itemPosition + velocity.RotatedBy(-0.6 * player.direction) + velocity * 1.65f, velocity.RotatedBy(k == 0 ? 0 : k == 1 ? 0.025f : -0.025f), type, damage, knockback, player.whoAmI); CalamityGlobalProjectile cgp = pearlShot.Calamity(); - cgp.pearlBullet = true; + if (shotColor == 1) + cgp.pearlBullet1 = true; // blue + if (shotColor == 2) + cgp.pearlBullet2 = true; // pink + if (shotColor == 3) + cgp.pearlBullet3 = true; // yellow + + if (shotColor < 3) + shotColor++; + else + shotColor = 1; + } } // Life bullet @@ -80,7 +94,7 @@ namespace CalamityMod.Items.Weapons.Ranged { int randomColor = Main.rand.Next(1, 3 + 1); Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - SparkParticle spark = new SparkParticle(itemPosition + velocity.RotatedBy(-0.6 * player.direction) + velocity * 1.35f, velocity.RotatedByRandom(0.25) * Main.rand.NextFloat(0.2f, 1.5f), false, Main.rand.Next(20, 25 + 1), Main.rand.NextFloat(0.4f, 0.65f), color); + Particle spark = new SparkParticle(itemPosition + velocity.RotatedBy(-0.6 * player.direction) + velocity * 1.35f, velocity.RotatedByRandom(0.25) * Main.rand.NextFloat(0.2f, 1.5f), false, Main.rand.Next(20, 25 + 1), Main.rand.NextFloat(0.4f, 0.65f), color); GeneralParticleHandler.SpawnParticle(spark); } for (int k = 0; (k < 13); k++) @@ -139,10 +153,11 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(). - AddIngredient(ItemID.SpectreBar, 5). - AddIngredient(ItemID.ShroomiteBar, 5). - AddTile(TileID.MythrilAnvil). + AddIngredient(). + AddIngredient(5). + AddIngredient(2). + AddIngredient(ItemID.WhitePearl). + AddTile(TileID.LunarCraftingStation). Register(); } } diff --git a/Items/Weapons/Ranged/PridefulHuntersPlanarRipper.cs b/Items/Weapons/Ranged/PridefulHuntersPlanarRipper.cs index a1645ba6c6..604367a05d 100644 --- a/Items/Weapons/Ranged/PridefulHuntersPlanarRipper.cs +++ b/Items/Weapons/Ranged/PridefulHuntersPlanarRipper.cs @@ -61,12 +61,8 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(). AddIngredient(ItemID.Uzi). - AddIngredient(). //This should be removed AddIngredient(ItemID.LunarBar, 5). AddIngredient(ItemID.FragmentVortex, 10). - AddIngredient(6). //This should be removed - AddIngredient(). // This should be removed - AddIngredient(25). // This should be removed AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Particles/HighResFoggyCircleHardEdge.png b/Particles/HighResFoggyCircleHardEdge.png new file mode 100644 index 0000000000..52cd77a39a Binary files /dev/null and b/Particles/HighResFoggyCircleHardEdge.png differ diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 3be26a8c75..34e633a759 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -90,8 +90,12 @@ namespace CalamityMod.Projectiles // Adds shock to bullets, currently used by Arietes 41 public bool shockBullet = false; - // Adds... pearl? to bullets, currently used by Pearl God - public bool pearlBullet = false; + // Adds... pearl? to bullets (visual 1, blue), currently used by Pearl God + public bool pearlBullet1 = false; + // Adds... pearl? to bullets (visual 2, pink), currently used by Pearl God + public bool pearlBullet2 = false; + // Adds... pearl? to bullets (visual 3, yellow), currently used by Pearl God + public bool pearlBullet3 = false; // Adds lifesteal to bullets, currently used by Arietes 41 public bool lifeBullet = false; @@ -3770,14 +3774,13 @@ namespace CalamityMod.Projectiles } } } - if (pearlBullet) + if ((pearlBullet1 || pearlBullet2 || pearlBullet3)) { float targetDist = Vector2.Distance(player.Center, projectile.Center); if (projectile.timeLeft > 200 && targetDist < 1400f) { - int randomColor = Main.rand.Next(1, 3 + 1); - Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity * 1.5f, -projectile.velocity * 0.05f, false, 2, 0.75f, color * 0.75f); + Color color = pearlBullet1 ? Color.LightBlue : pearlBullet2 ? Color.LightPink : Color.Khaki; + Particle spark = new GlowSparkParticle(projectile.Center + projectile.velocity * 1.5f, -projectile.velocity * 0.05f, false, 3, 0.0093f, color, new Vector2(0.6f, 1.8f), false, false); GeneralParticleHandler.SpawnParticle(spark); if (Main.rand.NextBool(5)) {