using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; using CalamityMod.Items.Placeables; using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.GameContent.Creative; namespace CalamityMod.Items.Pets { public class RotomRemote : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Triboluminescent Etomer"); Tooltip.SetDefault("Summons an electric troublemaker\n" + "A little note is attached:\n" + "Thank you, Aloe! Very much appreciated from Ben"); } public override void SetDefaults() { Item.damage = 0; Item.useTime = Item.useAnimation = 20; Item.shoot = ModContent.ProjectileType(); Item.buffType = ModContent.BuffType(); Item.width = 30; Item.height = 34; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.UseSound = SoundID.Item113; Item.value = Item.buyPrice(gold: 4); Item.rare = ItemRarityID.Orange; Item.Calamity().devItem = true; CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1; } public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { player.AddBuff(Item.buffType, 3600, true); } } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Pets/RotomRemoteGlow").Value); } public override void AddRecipes() { CreateRecipe(). AddIngredient(5). AddRecipeGroup("AnyGoldBar", 8). AddIngredient(). AddTile(TileID.Anvils). Register(); } } }