Files
CalamityModPublic/Items/Weapons/Magic/TearsofHeaven.cs
T
Ozzatron 22afdd3933 1 - Calamity sell prices increase much more sharply with rarity.
2 - (Example) Post DoG items are now 2 platinum instead of 1 platinum 40 gold.
3 - (Example) Dev items are now 2 platinum 80 gold instead of 2 platinum.
4 - Privated numeric rarity item values.
5 - All assigned item values use the rarity's names, e.g. RarityLightPurpleBuyPrice.
2024-04-17 21:20:17 -04:00

61 lines
2.2 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Projectiles.Magic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class TearsofHeaven : ModItem, ILocalizedModType
{
public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/TearsOfHeavenUse");
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetDefaults()
{
Item.width = 38;
Item.height = 48;
Item.damage = 45;
Item.DamageType = DamageClass.Magic;
Item.mana = 18;
Item.useTime = 20;
Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 5.5f;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
Item.UseSound = UseSound;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<TearsofHeavenProjectile>();
Item.shootSpeed = 5.5f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int index = 0; index < 2; ++index)
{
float SpeedX = velocity.X + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = velocity.Y + (float)Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<FrigidflashBolt>().
AddIngredient(ItemID.WaterBolt).
AddIngredient<SeaPrism>(15).
AddIngredient<CoreofSunlight>(5).
AddTile(TileID.Bookcases).
Register();
}
}
}