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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Rarities
|
||||
{
|
||||
public class ProtogenItem : ModRarity
|
||||
{
|
||||
// Cycles between bright neon blue and vibrant pink/magenta with digital-style pulses
|
||||
// to represent Protogen visor displays and cybernetic aesthetic
|
||||
public override Color RarityColor
|
||||
{
|
||||
get
|
||||
{
|
||||
float time = Main.GlobalTimeWrappedHourly;
|
||||
|
||||
// Base color cycle: neon blue <-> vibrant pink
|
||||
const float cycleHz = 0.9f; // cycles per second
|
||||
float t = (float)((Math.Sin(time * cycleHz * MathHelper.TwoPi) + 1f) * 0.5f); // 0..1
|
||||
|
||||
Color neonBlue = new Color(0, 180, 255); // Bright neon blue
|
||||
Color vibrantPink = new Color(255, 0, 180); // Vibrant pink/magenta
|
||||
Color baseColor = Color.Lerp(neonBlue, vibrantPink, t);
|
||||
|
||||
// Digital pulse effect (quick, sharp like LED displays)
|
||||
const float pulseHz = 1.5f;
|
||||
float s = (float)Math.Sin(time * pulseHz * MathHelper.TwoPi);
|
||||
float pulse = (float)Math.Pow(Math.Max(0f, s), 2.5f); // sharper pulse
|
||||
float brightness = 1f + 0.2f * pulse; // up to +20% brightness at pulse peak
|
||||
|
||||
return baseColor * brightness;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user