Files
CalamityModPublic/Items/Fishing/EnchantedStarfish.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

53 lines
1.8 KiB
C#

using Terraria;
using Terraria.GameContent.Achievements;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Fishing
{
public class EnchantedStarfish : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Fishing";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 10;
ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true;
// For some reason Life/Mana boosting items are in this set (along with Magic Mirror+)
ItemID.Sets.SortingPriorityBossSpawns[Type] = 21; // Mana Crystal
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ArcaneCrystal;
}
public override void SetDefaults()
{
Item.width = 30;
Item.height = 26;
Item.useAnimation = 30;
Item.useTime = 30;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.UseSound = SoundID.Item29;
Item.maxStack = 9999;
Item.autoReuse = true;
Item.consumable = true;
Item.value = Item.sellPrice(silver: 25);
Item.rare = ItemRarityID.Green;
}
public override bool? UseItem(Player player)
{
if (player.itemAnimation > 0 && player.itemTime == 0)
{
player.itemTime = Item.useTime;
// Still has the holding animation if fully consumed Mana Crystals, but not consuming the item
if (player.ConsumedManaCrystals >= Player.ManaCrystalMax)
return null;
player.UseManaMaxIncreasingItem(20);
player.ConsumedManaCrystals++;
AchievementsHelper.HandleSpecialEvent(player, 1);
}
return true;
}
}
}