44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
|
|
namespace CalamityMod.Items.CalamityCustomThrowingDamage
|
|
{
|
|
public class Eradicator : CalamityDamageItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Eradicator");
|
|
Tooltip.SetDefault("Throws a disk that fires lasers at nearby enemies");
|
|
}
|
|
|
|
public override void SafeSetDefaults()
|
|
{
|
|
item.width = 38;
|
|
item.damage = 300;
|
|
item.noMelee = true;
|
|
item.noUseGraphic = true;
|
|
item.autoReuse = true;
|
|
item.useAnimation = 19;
|
|
item.useStyle = 1;
|
|
item.useTime = 19;
|
|
item.knockBack = 7f;
|
|
item.UseSound = SoundID.Item1;
|
|
item.height = 54;
|
|
item.value = Item.buyPrice(1, 40, 0, 0);
|
|
item.rare = 10;
|
|
item.shoot = mod.ProjectileType("EradicatorProjectile");
|
|
item.shootSpeed = 12f;
|
|
item.Calamity().rogue = true;
|
|
item.Calamity().postMoonLordRarity = 13;
|
|
}
|
|
|
|
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
|
{
|
|
Vector2 origin = new Vector2(31f, 29f);
|
|
spriteBatch.Draw(mod.GetTexture("Items/CalamityCustomThrowingDamage/EradicatorGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
|
|
}
|
|
}
|
|
}
|