Files
CalamityModPublic/Items/Materials/GalacticaSingularity.cs
T
Altixal e1c848d45f bulk price changes part 1
- *Re-scaled price of most Calamity materials* (most drastically post-DoG)
- Shimmer transmutation price parity (same as og items)
- Applied consistent vanilla sell anchor values to Calamity items:
 - Buff potions: 2 silver
 - Flask: 5 silver
 - Uncommon critters: 10 silver
 - Potion fish: 15 silver
 - Lootable fish: 10 silver
 - Sashimi fish: 7.5 silver
 - Plentiful fish: 5 silver
 - Added value to Calamity seeds and saplings to match vanilla
2024-09-17 21:42:55 +07:00

47 lines
1.7 KiB
C#

using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Materials
{
public class GalacticaSingularity : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Materials";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 25;
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 24));
ItemID.Sets.AnimatesAsSoul[Type] = true;
ItemID.Sets.ItemNoGravity[Item.type] = true;
ItemID.Sets.SortingPriorityMaterials[Type] = 99; // Luminite
}
public override void SetDefaults()
{
Item.width = 28;
Item.height = 28;
Item.maxStack = 9999;
Item.value = Item.sellPrice(silver: 80);
Item.rare = ItemRarityID.Red;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.FragmentSolar).
AddIngredient(ItemID.FragmentVortex).
AddIngredient(ItemID.FragmentNebula).
AddIngredient(ItemID.FragmentStardust).
AddTile(TileID.LunarCraftingStation).
Register();
}
public override void Update(ref float gravity, ref float maxFallSpeed)
{
float brightness = (float)Main.rand.Next(90, 111) * 0.01f;
brightness *= Main.essScale;
Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 1f * brightness, 0.3f * brightness, 0.3f * brightness);
}
}
}