Files
CalamityModPublic/Items/Weapons/Ranged/RubicoPrime.cs
T

63 lines
2.1 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Ranged
{
public class RubicoPrime : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.damage = 1178;
Item.DamageType = DamageClass.Ranged;
Item.knockBack = 10f;
Item.useTime = 30;
Item.useAnimation = 300;
Item.autoReuse = false;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.width = 82;
Item.height = 28;
Item.shoot = ProjectileID.PurificationPowder;
Item.shootSpeed = 12f;
Item.useAmmo = AmmoID.Bullet;
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
Item.rare = ModContent.RarityType<DarkBlue>();
Item.Calamity().donorItem = true;
Item.Calamity().canFirePointBlankShots = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 40;
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType<ImpactRound>(), damage, knockback, player.whoAmI, 0f, 0f);
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<PestilentDefiler>().
AddIngredient<CosmiliteBar>(8).
AddIngredient<NightmareFuel>(20).
AddTile<CosmicAnvil>().
Register();
}
}
}