Decimation_Mod/Content/Items/Accessories/Trinity/Trinity.cs
2020-07-19 19:06:10 -04:00

90 lines
3.9 KiB
C#

using System.Collections.Generic;
using Decimation.Content.Items.Misc.ConcentratedSouls;
using Decimation.Content.Tiles;
using Decimation.Lib.Util.Builder;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.UI.Chat;
namespace Decimation.Content.Items.Accessories.Trinity
{
public class Trinity : TrinityAccessory
{
protected override string ItemName => "The Trinity";
protected override string ItemTooltip => "True Equilibrium...\n" +
"Increases maximum life by 50\n" +
"Increases maximum mana by 50\n" +
"Increases all damage by 10%\n" +
"Increases all critical hit chances by 10%\n" +
"Increases minions knockback by 10%\n" +
"Increases view range\n" +
"Melee attacks have 4% chance to fire a Trinity Beam\n" +
"Criticals hits leech mana\n" +
"Hostile projectiles have 10% chance to phase through you,\nnegating all damage and causing your next attack to be a critical hit\n" +
"Hostile projectiles have 10% chance to ricochet off you\nand target your enemies with 50% increased damage";
protected override void InitAccessory()
{
item.width = 34;
item.height = 28;
item.expert = true;
item.value = Item.sellPrice(gold: 15);
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
// Soul
player.statManaMax2 += 50;
player.magicDamage *= 1.10f;
player.magicCrit *= (int) (player.magicCrit * 1.10f);
player.minionDamage *= 1.10f;
player.minionKB *= 1.10f;
// Body
player.statLifeMax2 += 50;
player.meleeDamage *= 1.10f;
player.meleeCrit = (int) (player.meleeCrit * 1.10f);
// Mind
player.pickSpeed *= 1.10f;
player.tileSpeed *= 1.10f;
player.rangedDamage *= 1.10f;
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
player.thrownDamage *= 1.10f;
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
player.scope = true;
base.UpdateAccessory(player, hideVisual);
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Add(new TooltipLine(mod, "trinity", "Trinity")
{
overrideColor = ChatManager.WaveColor(Color.Orange)
});
}
protected override ModRecipe GetRecipe()
{
return new RecipeBuilder(this)
.WithIngredient(ModContent.ItemType<Body>())
.WithIngredient(ModContent.ItemType<Soul>())
.WithIngredient(ModContent.ItemType<Mind>())
.WithIngredient(ModContent.ItemType<ConcentratedFlight>())
.WithIngredient(ModContent.ItemType<ConcentratedMight>())
.WithIngredient(ModContent.ItemType<ConcentratedSight>())
.WithIngredient(ModContent.ItemType<ConcentratedFright>())
.WithIngredient(ModContent.ItemType<ConcentratedLife>())
.WithIngredient(ModContent.ItemType<ConcentratedTime>())
.WithIngredient(ModContent.ItemType<ConcentratedNight>())
.WithIngredient(ModContent.ItemType<ConcentratedLight>())
.WithIngredient(ItemID.HallowedBar, 10)
.WithStation(ModContent.TileType<ChlorophyteAnvil>())
.Build();
}
}
}