diff --git a/Items/Ammo/HallowPointRound.cs b/Items/Ammo/HallowPointRound.cs new file mode 100644 index 0000000000..851bd80b7c --- /dev/null +++ b/Items/Ammo/HallowPointRound.cs @@ -0,0 +1,44 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Ammo +{ + public class HallowPointRound : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Ammo"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 99; + } + + public override void SetDefaults() + { + Item.width = 8; + Item.height = 18; + Item.damage = 18; + Item.DamageType = DamageClass.Ranged; + Item.maxStack = 9999; + Item.consumable = true; + Item.knockBack = 3f; + Item.value = Item.sellPrice(copper: 12); + Item.rare = ItemRarityID.Pink; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 6f; + Item.ammo = AmmoID.Bullet; + } + + public override void AddRecipes() + { + CreateRecipe(100). + AddIngredient(ItemID.EmptyBullet, 100). + AddIngredient(ItemID.HallowedBar). + AddTile(TileID.MythrilAnvil). + Register(); + } + } +} diff --git a/Items/Ammo/HallowPointRound.png b/Items/Ammo/HallowPointRound.png new file mode 100644 index 0000000000..9a7162fe95 Binary files /dev/null and b/Items/Ammo/HallowPointRound.png differ diff --git a/Items/Weapons/Ranged/AngelicShotgun.cs b/Items/Weapons/Ranged/AngelicShotgun.cs index 81ba5c013f..ef4b78d176 100644 --- a/Items/Weapons/Ranged/AngelicShotgun.cs +++ b/Items/Weapons/Ranged/AngelicShotgun.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().donorItem = true; Item.shootSpeed = BulletSpeed; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.useAmmo = AmmoID.Bullet; Item.Calamity().canFirePointBlankShots = true; } @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Ranged Vector2 randomVelocity = baseVelocity + new Vector2(dx, dy); if (type == ProjectileID.Bullet) - Projectile.NewProjectile(source, position, randomVelocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, position, randomVelocity, Item.shoot, damage, knockback, player.whoAmI); else Projectile.NewProjectile(source, position, randomVelocity, type, damage, knockback, player.whoAmI); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 1fb54c6fdb..461971d85a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -69,6 +69,11 @@ GodSlayerSlug: { ''' } +HallowPointRound: { + DisplayName: Hallow-Point Round + Tooltip: "" +} + HolyFireBullet: { DisplayName: Holy Fire Bullet Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index fb79477184..9307489bac 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -29,7 +29,7 @@ AngelicShotgun: { Tooltip: ''' Each shot casts a radiant beam of holy light from the sky - Converts musket balls into illuminated bullets + Converts musket balls into hallow-point rounds 'Fighting 'til the war's won' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index d3b2b1be11..a4f9c8ce6a 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -107,7 +107,7 @@ HyperiusBulletProj.DisplayName: Hyperius Bullet HyperiusSplit.DisplayName: Hyperius Bad Time IcicleArrowProj.DisplayName: Icicle Arrow IcyBulletProj.DisplayName: Icy Bullet -IlluminatedBullet.DisplayName: Illuminated Bullet +HallowPointRoundProj.DisplayName: Hallow-Point Round ImpactRound.DisplayName: Impact Round KarasawaShot.DisplayName: Karasawa Shot LeafArrow.DisplayName: Leaf Arrow diff --git a/Projectiles/Ranged/IlluminatedBullet.cs b/Projectiles/Ranged/HallowPointRoundProj.cs similarity index 81% rename from Projectiles/Ranged/IlluminatedBullet.cs rename to Projectiles/Ranged/HallowPointRoundProj.cs index 88f82c52c2..250a548204 100644 --- a/Projectiles/Ranged/IlluminatedBullet.cs +++ b/Projectiles/Ranged/HallowPointRoundProj.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -7,7 +8,7 @@ using Terraria.Audio; namespace CalamityMod.Projectiles.Ranged { - public class IlluminatedBullet : ModProjectile, ILocalizedModType + public class HallowPointRoundProj : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() @@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.tileCollide = true; Projectile.penetrate = 1; Projectile.timeLeft = 300; - Projectile.extraUpdates = 3; + Projectile.MaxUpdates = 5; // Invisible for the first few frames Projectile.alpha = 255; @@ -35,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - Lighting.AddLight(Projectile.Center, 1f, 0.7f, 0f); + Lighting.AddLight(Projectile.Center, 0.7f, 0.5f, 0.3f); // Projectile becomes visible after a few frames if (Projectile.timeLeft == 298) @@ -54,20 +55,18 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor); + CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, Color.White); return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 120); - } - - // On impact, make impact dust and play a sound. + // On impact, make impact sparkle and play a sound. public override void OnKill(int timeLeft) { Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height); SoundEngine.PlaySound(SoundID.Item10, Projectile.position); + + GenericSparkle impactParticle = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.Goldenrod, Color.White, Main.rand.NextFloat(0.7f, 1.2f), 12); + GeneralParticleHandler.SpawnParticle(impactParticle); } } } diff --git a/Projectiles/Ranged/IlluminatedBullet.png b/Projectiles/Ranged/HallowPointRoundProj.png similarity index 100% rename from Projectiles/Ranged/IlluminatedBullet.png rename to Projectiles/Ranged/HallowPointRoundProj.png