- Various dye slot changes for accessory/armor dust spawning - Lab Hologram Projectors can now face left or right - Dragonblood Disgorger minor tooltip changes - Nuclear Rod renamed to Nuclear Fuel Rod - Graveyard enemies can now drop Blood Orbs - Nadir now uses Auric Bars and is buffed accordingly - [1.4.4 fix] Fixed typical spear AI prematurely expiring - [1.4.4 fix] Fixed Wulfrum Blunderbuss ammo text being misplaced
62 lines
2.0 KiB
C#
62 lines
2.0 KiB
C#
using CalamityMod.Buffs.StatDebuffs;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Terraria.GameContent;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
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.Rarity8BuyPrice;
|
|
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;
|
|
}
|
|
}
|
|
}
|