Files
2025-11-20 11:35:07 +00:00

35 lines
1.2 KiB
C#

using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ModLoader;
namespace ForgottenWawiTech.Content.Rarities
{
public class TranscendentItem : ModRarity
{
public override Color RarityColor
{
get
{
float time = Main.GlobalTimeWrappedHourly;
Color singularity = new Color(160, 0, 255);
Color corrupted = new Color(0, 255, 200);
Color sentinel = new Color(90, 220, 255);
Color avalian = new Color(255, 170, 90);
float pulse = (float)(Math.Sin(time * MathHelper.TwoPi) * 0.5f + 0.5f);
float swirl = (float)(Math.Sin(time * 0.75f * MathHelper.TwoPi + Math.PI / 3f) * 0.5f + 0.5f);
float flare = (float)Math.Pow(Math.Max(0f, (float)Math.Sin(time * 2.1f * MathHelper.TwoPi)), 4f);
Color blend = Color.Lerp(singularity, corrupted, pulse);
blend = Color.Lerp(blend, sentinel, swirl * 0.6f);
blend = Color.Lerp(blend, avalian, (1f - pulse) * 0.4f);
float brightness = 1f + 0.35f * flare;
return blend * brightness;
}
}
}
}