Files
CalamityModPublic/Items/Accessories/StarTaintedGenerator.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

62 lines
2.0 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class StarTaintedGenerator : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetDefaults()
{
Item.width = 38;
Item.height = 60;
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().voltaicJelly = true;
player.Calamity().starbusterCore = true;
player.Calamity().starTaintedGenerator = true;
player.GetDamage<SummonDamageClass>() += 0.07f;
player.buffImmune[ModContent.BuffType<Irradiated>()] = true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<JellyChargedBattery>().
AddIngredient<NuclearFuelRod>().
AddIngredient<StarbusterCore>().
AddIngredient<LifeAlloy>(3).
AddTile(TileID.MythrilAnvil).
Register();
}
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
CalamityUtils.DrawInventoryCustomScale(
spriteBatch,
texture: TextureAssets.Item[Type].Value,
position,
frame,
drawColor,
itemColor,
origin,
scale,
wantedScale: 0.8f,
drawOffset: new(0f, 0f)
);
return false;
}
}
}