2 - Many jump speed bonuses rebalanced. 3 - Absorber and Sponge give 4 regen while standing still instead of 2. 4 - Grand Gelatin, Life Jelly and Mana Jelly give 4 regen while standing still instead of 2. 5 - Heart of the Elements is a pure summon accessory. 6 - I have no idea what to do with Cryo, Chaos and Bloom Stone.
56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
using CalamityMod.Buffs.Summon;
|
|
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ID;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class RoseStone : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Rose Stone");
|
|
Tooltip.SetDefault("One of the ancient relics\n" +
|
|
"Summons a brimstone elemental to fight for you");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 20;
|
|
item.height = 20;
|
|
item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
|
item.rare = ItemRarityID.Pink;
|
|
item.accessory = true;
|
|
}
|
|
|
|
public override bool CanEquipAccessory(Player player, int slot)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
if (modPlayer.elementalHeart)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.brimstoneWaifu = true;
|
|
if (player.whoAmI == Main.myPlayer)
|
|
{
|
|
if (player.FindBuffIndex(ModContent.BuffType<BrimstoneWaifu>()) == -1)
|
|
{
|
|
player.AddBuff(ModContent.BuffType<BrimstoneWaifu>(), 3600, true);
|
|
}
|
|
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
|
|
{
|
|
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), (int)(60 * player.MinionDamage()), 2f, Main.myPlayer, 0f, 0f);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|