Make the Avalian Trader less robotic, add Avali Feather

This commit is contained in:
2025-11-11 11:43:58 +00:00
parent 7038741693
commit a9b0d1571d
13 changed files with 268 additions and 80 deletions
+33
View File
@@ -0,0 +1,33 @@
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;
using System;
namespace ForgottenWawiTech.Content.Rarities
{
public class AvalianItem : ModRarity
{
public override Color RarityColor
{
get
{
float time = Main.GlobalTimeWrappedHourly;
// Base color cycle: bright cyan <-> deep teal
const float cycleHz = 0.8f; // cycles per second
float t = (float)((Math.Sin(time * cycleHz * MathHelper.TwoPi) + 1f) * 0.5f); // 0..1
Color brightCyan = new Color(0, 255, 255); // Bright cyan
Color deepTeal = new Color(0, 128, 160); // Deep teal
Color baseColor = Color.Lerp(deepTeal, brightCyan, t);
// Add a subtle shimmer effect (faster, gentler than pulse)
const float shimmerHz = 2.0f;
float shimmer = (float)((Math.Sin(time * shimmerHz * MathHelper.TwoPi) + 1f) * 0.5f);
float brightness = 1f + 0.15f * shimmer; // subtle +15% max brightness variation
return baseColor * brightness;
}
}
}
}