Files
CalamityModPublic/Items/Ammo/HallowPointRound.cs
T
Altixal a38aadfda6 Hallow-Point Round uses Work Benches
(Parity with other Empty Bullet recipes)
2025-05-06 14:45:10 +07:00

54 lines
1.7 KiB
C#

using System.Collections.Generic;
using CalamityMod.Projectiles.Ranged;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Ammo
{
public class HallowPointRound : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Ammo";
public static int BaseDamage = 12;
public static int BonusDamageOnHit = 6; // 12 + 6 = 18
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 99;
}
public override void SetDefaults()
{
Item.width = 8;
Item.height = 18;
Item.damage = BaseDamage;
Item.DamageType = DamageClass.Ranged;
Item.maxStack = Item.CommonMaxStack;
Item.consumable = true;
Item.knockBack = 3f;
Item.value = Item.sellPrice(copper: 12);
Item.rare = ItemRarityID.Pink;
Item.shoot = ModContent.ProjectileType<HallowPointRoundProj>();
Item.shootSpeed = 6f;
Item.ammo = AmmoID.Bullet;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
// Add the proper damage value
int nonConvertDamage = (int)Main.LocalPlayer.GetTotalDamage<RangedDamageClass>().ApplyTo(BaseDamage + BonusDamageOnHit);
list.FindAndReplace("[DAMAGE]", nonConvertDamage.ToString());
}
public override void AddRecipes()
{
CreateRecipe(100).
AddIngredient(ItemID.EmptyBullet, 100).
AddIngredient(ItemID.HallowedBar).
AddTile(TileID.WorkBenches).
Register();
}
}
}