Files
CalamityModPublic/Items/Weapons/Melee/Pwnagehammer.cs
T
Xyk 7770e21ee0 Hammer Balancing
Galx Smasher Fucking Kills you irl now

Implemented homing for the echo hammers and did some buffs and nerfs based on Done's tests
2023-07-30 01:09:19 -07:00

58 lines
2.0 KiB
C#

using Terraria.DataStructures;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
[LegacyName("PwnagehammerMelee", "PwnagehammerRogue")]
public class Pwnagehammer : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 66;
Item.damage = 210;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.autoReuse = true;
Item.useAnimation = Item.useTime = 50;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 10f;
Item.UseSound = SoundID.Item1;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.height = 66;
Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice;
Item.rare = ItemRarityID.LightPurple;
Item.shoot = ModContent.ProjectileType<PwnagehammerProj>();
Item.shootSpeed = 29.4f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 yeetOffset = Vector2.Normalize(velocity) * 40f;
if (Collision.CanHit(position, 0, 0, position + yeetOffset, 0, 0))
{
position += yeetOffset;
}
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.Pwnhammer).
AddIngredient(ItemID.HallowedBar, 7).
AddIngredient(ItemID.SoulofFright, 3).
AddIngredient(ItemID.SoulofMight, 3).
AddIngredient(ItemID.SoulofSight, 3).
AddTile(TileID.MythrilAnvil).
Register();
}
}
}