Files
CalamityModPublic/Items/PermanentBoosters/NimbleBounder.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

54 lines
1.7 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Rarities;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.PermanentBoosters
{
public class NimbleBounder : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Misc";
public override void SetDefaults()
{
Item.width = 20;
Item.height = 20;
Item.useAnimation = Item.useTime = 30;
// Same price as Frog Leg, which is used to shimmer into it
Item.value = Item.sellPrice(gold: 1);
Item.rare = ModContent.RarityType<HotPink>();
Item.useStyle = ItemUseStyleID.HoldUp;
Item.UseSound = SoundID.Zombie13; // frog sfx
Item.consumable = true;
Item.Calamity().devItem = true;
}
public override bool CanUseItem(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.nimbleBounderBoost)
{
return false;
}
return true;
}
public override bool? UseItem(Player player)
{
if (player.itemAnimation > 0 && player.itemTime == 0)
{
player.itemTime = Item.useTime;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.nimbleBounderBoost = true;
}
return true;
}
// Gives a purple light when dropped as an item
public override void PostUpdate()
{
Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), 0.51f, 0.14f, 0.57f);
}
}
}