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

57 lines
2.0 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Magic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class RottenBrain : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetDefaults()
{
Item.width = 34;
Item.height = 34;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (player.immune)
{
var source = player.GetSource_Accessory(Item);
if (player.miscCounter % 6 == 0)
{
if (player.whoAmI == Main.myPlayer)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(18);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
Projectile rain = CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<AuraRain>(), damage, 2f, player.whoAmI);
if (rain.whoAmI.WithinBounds(Main.maxProjectiles))
{
rain.DamageType = DamageClass.Generic;
rain.tileCollide = false;
rain.penetrate = 1;
}
}
}
}
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rBrain = true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<BloodyWormTooth>().
AddTile(TileID.TinkerersWorkbench).
AddCondition(Condition.InGraveyard).
Register();
}
}
}