Decimation_Mod/Content/Items/Accessories/TideTurner.cs
2020-06-11 23:19:28 -04:00

54 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
using Decimation.Content.Items.Ores;
using Decimation.Content.Tiles;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Items.Accessories
{
internal class TideTurner : DecimationAccessory
{
protected override string ItemName => "Tide Turner";
protected override string ItemTooltip => "Not one of yas going to survive this!\n" +
"Deals the same amount of damage as held item\n" +
"Increase underwater mobility\n" +
"+10% chance to dodge attacks when charging";
protected override void InitAccessory()
{
item.width = 46;
item.height = 36;
item.rare = Rarity.Rainbow.GetRarityValue();
item.value = Item.buyPrice(0, 3);
item.defense = 3;
item.shieldSlot = 5;
item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
DecimationPlayer modPlayer = player.GetModPlayer<DecimationPlayer>();
item.damage = player.HeldItem.damage;
modPlayer.dashDamages = player.HeldItem.damage;
modPlayer.dash = 2;
player.accFlipper = true;
}
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()}, false);
recipe.AddIngredient(ItemID.EoCShield);
recipe.AddIngredient(ItemID.Coral, 10);
recipe.AddIngredient(ModContent.ItemType<DenziumBar>(), 5);
return new List<ModRecipe> {recipe};
}
}
}