2 - Counter Scarf is no longer dropped by EoC and is now sold by the Clothier for 10 gold.
65 lines
2.1 KiB
C#
65 lines
2.1 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Projectiles.Magic;
|
|
using Microsoft.Xna.Framework;
|
|
using System;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class AmalgamatedBrain : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Amalgamated Brain");
|
|
Tooltip.SetDefault("10% increased damage\n" +
|
|
"Shade rains down when you are hit\n" +
|
|
"You will confuse nearby enemies when you are struck");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 34;
|
|
item.height = 34;
|
|
item.value = CalamityGlobalItem.Rarity4BuyPrice;
|
|
item.rare = ItemRarityID.LightRed;
|
|
item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.aBrain = true;
|
|
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)(60 * player.AverageDamage()), 2f, player.whoAmI);
|
|
if (rain.whoAmI.WithinBounds(Main.maxProjectiles))
|
|
{
|
|
rain.Calamity().forceTypeless = true;
|
|
rain.tileCollide = false;
|
|
rain.penetrate = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
player.allDamage += 0.1f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<RottenBrain>());
|
|
recipe.AddIngredient(ItemID.BrainOfConfusion);
|
|
recipe.AddIngredient(ItemID.SoulofNight, 3);
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|