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.
44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Potions.Alcohol;
|
|
using CalamityMod.Projectiles.Typeless;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
[LegacyName("CalamityRing")]
|
|
public class VoidofCalamity : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Accessories";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 20;
|
|
Item.height = 22;
|
|
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
|
Item.rare = ItemRarityID.Lime;
|
|
Item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.voidOfCalamity = true;
|
|
player.GetDamage<GenericDamageClass>() += 0.12f;
|
|
if (player.whoAmI == Main.myPlayer)
|
|
{
|
|
var source = player.GetSource_Accessory(Item);
|
|
if (player.immune)
|
|
{
|
|
if (player.miscCounter % 10 == 0)
|
|
{
|
|
int damage = (int)player.GetBestClassDamage().ApplyTo(30);
|
|
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
|
CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<StandingFire>(), damage, 5f, player.whoAmI);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|