Make the Avalian Trader less robotic, add Avali Feather
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user