44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using CalamityMod.Projectiles.Magic;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class WrathoftheAncients : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Wrath of the Ancients");
|
|
Tooltip.SetDefault("Summons an energy pulse at the cursor to periodically summon homing spirits");
|
|
SacrificeTotal = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 47;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 20;
|
|
Item.width = 28;
|
|
Item.height = 30;
|
|
Item.useTime = 38;
|
|
Item.useAnimation = 38;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 6f;
|
|
Item.value = CalamityGlobalItem.Rarity8BuyPrice;
|
|
Item.rare = ItemRarityID.Yellow;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<GranitePulse>();
|
|
Item.shootSpeed = 9f;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 0f);
|
|
return false;
|
|
}
|
|
}
|
|
}
|