- *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
57 lines
1.8 KiB
C#
57 lines
1.8 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Rarities;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.DraedonMisc
|
|
{
|
|
[LegacyName("PowerCell")]
|
|
public class DraedonPowerCell : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.DraedonItems";
|
|
// This is how much Charge each Power Cell is worth when charging. Leave this at 1.
|
|
public const float ChargeValue = 1f;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Item.ResearchUnlockCount = 100;
|
|
ItemID.Sets.ExtractinatorMode[Item.type] = Item.type;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 26;
|
|
Item.height = 14;
|
|
Item.rare = ModContent.RarityType<DarkOrange>();
|
|
Item.maxStack = 9999;
|
|
|
|
Item.MakeUsableWithChlorophyteExtractinator();
|
|
Item.useTime = 2;
|
|
Item.value = Item.sellPrice(copper: 10);
|
|
}
|
|
|
|
public override void ExtractinatorUse(int extractinatorBlockType, ref int resultType, ref int resultStack)
|
|
{
|
|
float dropRand = Main.rand.NextFloat();
|
|
resultStack = 1;
|
|
|
|
// 2.5% chance for Mysterious Circuitry
|
|
// 2.5% chance for Dubious Plating
|
|
// 90% chance for 25-99 Copper Coins
|
|
// 5% chance for 1 Silver Coin
|
|
if (dropRand < 0.025f)
|
|
resultType = ModContent.ItemType<MysteriousCircuitry>();
|
|
else if (dropRand < 0.05f)
|
|
resultType = ModContent.ItemType<DubiousPlating>();
|
|
else if (dropRand < 0.95f)
|
|
{
|
|
resultType = ItemID.CopperCoin;
|
|
resultStack = Main.rand.Next(25, 100);
|
|
}
|
|
else
|
|
resultType = ItemID.SilverCoin;
|
|
}
|
|
}
|
|
}
|