60 lines
2.2 KiB
C#
60 lines
2.2 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Rogue;
|
|
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.Rogue
|
|
{
|
|
public class ScarletDevil : RogueWeapon
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 108;
|
|
Item.height = 108;
|
|
Item.damage = 8800;
|
|
Item.crit = 20;
|
|
Item.noMelee = true;
|
|
Item.noUseGraphic = true;
|
|
Item.useAnimation = Item.useTime = 60;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.knockBack = 8f;
|
|
Item.UseSound = SoundID.Item60;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<ScarletDevilProjectile>();
|
|
Item.shootSpeed = 30f;
|
|
Item.DamageType = RogueDamageClass.Instance;
|
|
|
|
Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice;
|
|
Item.rare = ModContent.RarityType<HotPink>();
|
|
Item.Calamity().devItem = true;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
|
if (Main.projectile.IndexInRange(proj))
|
|
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<Wrathwing>().
|
|
AddIngredient<RealityRupture>().
|
|
AddIngredient<ShadowspecBar>(5).
|
|
AddIngredient<BloodstoneCore>(15).
|
|
AddIngredient(ItemID.SoulofNight, 15).
|
|
AddTile<DraedonsForge>().
|
|
Register();
|
|
}
|
|
|
|
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f);
|
|
}
|
|
}
|