Start code for corrupted swarm, add placeholder sprites for new sets, add Corrupted rarity.

This commit is contained in:
2025-11-20 10:53:25 +00:00
parent f5da874019
commit 17ef24345f
103 changed files with 531 additions and 12 deletions
+38
View File
@@ -0,0 +1,38 @@
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;
using System;
namespace ForgottenWawiTech.Content.Rarities
{
public class CorruptedItem : ModRarity
{
public override Color RarityColor
{
get
{
float time = Main.GlobalTimeWrappedHourly;
// Base color cycle: bright cyan <-> deep teal with glitchy pulsing
const float cycleHz = 0.8f;
float t = (float)((Math.Sin(time * cycleHz * MathHelper.TwoPi) + 1f) * 0.5f);
Color brightCyan = new Color(0, 255, 255);
Color deepTeal = new Color(0, 128, 160);
Color baseColor = Color.Lerp(deepTeal, brightCyan, t);
// Add shimmer effect
const float shimmerHz = 2.0f;
float shimmer = (float)((Math.Sin(time * shimmerHz * MathHelper.TwoPi) + 1f) * 0.5f);
float brightness = 1f + 0.15f * shimmer;
// Add occasional "glitch" spikes in brightness
const float glitchHz = 3.7f;
float glitch = (float)Math.Pow(Math.Max(0f, Math.Sin(time * glitchHz * MathHelper.TwoPi)), 8f);
brightness += glitch * 0.4f; // Sharp brightness spikes
return baseColor * brightness;
}
}
}
}