2 - Counter Scarf is no longer dropped by EoC and is now sold by the Clothier for 10 gold.
51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Projectiles.Magic;
|
|
using Microsoft.Xna.Framework;
|
|
using System;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ID;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class RottenBrain : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Rotten Brain");
|
|
Tooltip.SetDefault("10% increased damage when below 75% life\n5% decreased movement speed when below 50% life\nShade rains down when you are hit");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 34;
|
|
item.height = 34;
|
|
item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
|
item.rare = ItemRarityID.Orange;
|
|
item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
if (player.immune)
|
|
{
|
|
if (player.miscCounter % 6 == 0)
|
|
{
|
|
if (player.whoAmI == Main.myPlayer)
|
|
{
|
|
Projectile rain = CalamityUtils.ProjectileRain(player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<AuraRain>(), (int)(18 * player.AverageDamage()), 2f, player.whoAmI);
|
|
if (rain.whoAmI.WithinBounds(Main.maxProjectiles))
|
|
{
|
|
rain.Calamity().forceTypeless = true;
|
|
rain.tileCollide = false;
|
|
rain.penetrate = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.rBrain = true;
|
|
}
|
|
}
|
|
}
|