Files
CalamityModPublic/Items/Weapons/Magic/Effervescence.cs
T
enamoured_ 2f3902a2bc effervescence recipe change, now aether
the sprite looks more like shimmer themed than sea prism or luminite so i changed the recipe!
2024-09-04 21:20:01 -04:00

58 lines
2.0 KiB
C#

using CalamityMod.Items.Placeables;
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 Effervescence : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetDefaults()
{
Item.width = 56;
Item.height = 26;
Item.damage = 60;
Item.DamageType = DamageClass.Magic;
Item.mana = 20;
Item.useTime = 15;
Item.useAnimation = 15;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 3.75f;
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
Item.UseSound = SoundID.Item95;
Item.autoReuse = true;
Item.shootSpeed = 13f;
Item.shoot = ModContent.ProjectileType<UberBubble>();
}
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int randomBullets = 0; randomBullets < 4; randomBullets++)
{
float SpeedX = velocity.X + Main.rand.Next(-25, 26) * 0.05f;
float SpeedY = velocity.Y + Main.rand.Next(-25, 26) * 0.05f;
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.BubbleGun).
AddIngredient(ItemID.LunarBar, 5).
AddIngredient(ItemID.ShimmerBlock, 5).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}