Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetFairyQueenWeaponsColor()

Color Terraria.Projectile.GetFairyQueenWeaponsColor ( float alphaChannelMultiplier = 1f,
float lerpToWhite = 0f,
float? rawHueOverride = null )
inline

Definition at line 18042 of file Projectile.cs.

18043 {
18044 float num = ai[1];
18045 if (rawHueOverride.HasValue)
18046 {
18047 num = rawHueOverride.Value;
18048 }
18049 float num2 = (num + 0.5f) % 1f;
18050 float saturation = 1f;
18051 float luminosity = 0.5f;
18052 if (Main.player[owner].active)
18053 {
18054 switch (Main.player[owner].name)
18055 {
18056 case "Cenx":
18057 {
18058 float amount13 = Utils.PingPongFrom01To010(num2);
18061 Color color3 = Color.Lerp(new Color(0.3f, 1f, 0.2f), Color.HotPink, amount13);
18062 if (lerpToWhite != 0f)
18063 {
18065 }
18066 color3.A = (byte)((float)(int)color3.A * alphaChannelMultiplier);
18067 return color3;
18068 }
18069 case "Crowno":
18070 luminosity = MathHelper.Lerp(0.25f, 0.4f, Utils.Turn01ToCyclic010(num2));
18071 num2 = MathHelper.Lerp(127f / 180f, 47f / 60f, Utils.Turn01ToCyclic010(num2));
18073 break;
18074 case "Yoraiz0r":
18075 num2 = MathHelper.Lerp(0.9f, 0.95f, Utils.Turn01ToCyclic010(num2));
18076 luminosity = 0.5f;
18077 break;
18078 case "Jaxrud":
18079 num2 = MathHelper.Lerp(13f / 72f, 0.43611112f, Utils.Turn01ToCyclic010(num2));
18080 luminosity = 0.5f;
18081 break;
18082 case "Lazure":
18083 num2 = MathHelper.Lerp(8f / 15f, 83f / 90f, Utils.Turn01ToCyclic010(num2));
18084 luminosity = 0.5f;
18085 break;
18086 case "Leinfors":
18087 num2 = MathHelper.Lerp(0.7f, 0.77f, Utils.Turn01ToCyclic010(num2));
18088 luminosity = 0.5f;
18089 break;
18090 case "Grox The Great":
18091 num2 = MathHelper.Lerp(0.31f, 0.5f, Utils.Turn01ToCyclic010(num2));
18092 luminosity = 0.5f;
18094 break;
18095 case "Acamaeda":
18096 num2 = MathHelper.Lerp(0.06f, 0.28f, Utils.Turn01ToCyclic010(num2));
18097 luminosity = 0.5f;
18099 break;
18100 case "Alchemystics":
18101 num2 = MathHelper.Lerp(0.74f, 0.96f, Utils.Turn01ToCyclic010(num2));
18102 luminosity = 0.6f;
18104 break;
18105 case "Antithesis":
18106 {
18107 num2 = 0.51f;
18108 float amount14 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18109 luminosity = MathHelper.Lerp(0f, 0.5f, amount14);
18110 break;
18111 }
18112 case "Aurora3500":
18113 num2 = MathHelper.Lerp(0.33f, 0.8f, Utils.Turn01ToCyclic010(num2));
18114 luminosity = 0.5f;
18116 break;
18117 case "Bame":
18118 {
18119 float amount12 = Utils.PingPongFrom01To010(num2);
18122 Color color2 = Color.Lerp(Color.Yellow, new Color(0.4f, 0f, 0.75f), amount12);
18123 if (lerpToWhite != 0f)
18124 {
18126 }
18127 color2.A = (byte)((float)(int)color2.A * alphaChannelMultiplier);
18128 return color2;
18129 }
18130 case "Criddle":
18131 num2 = MathHelper.Lerp(0.05f, 0.15f, Utils.Turn01ToCyclic010(num2));
18132 luminosity = 0.5f;
18134 break;
18135 case "Darthkitten":
18136 {
18137 num2 = 1f;
18138 float amount11 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18139 luminosity = MathHelper.Lerp(1f, 0.4f, amount11);
18140 break;
18141 }
18142 case "darthmorf":
18143 {
18144 num2 = 0f;
18145 float amount10 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18146 luminosity = MathHelper.Lerp(0f, 0.2f, amount10);
18147 break;
18148 }
18149 case "Discipile":
18150 {
18151 num2 = 0.53f;
18152 float amount9 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18153 luminosity = MathHelper.Lerp(0.05f, 0.5f, amount9);
18154 break;
18155 }
18156 case "Doylee":
18157 num2 = MathHelper.Lerp(0.68f, 1f, Utils.Turn01ToCyclic010(num2));
18158 luminosity = 0.5f;
18160 break;
18161 case "Ghostar":
18162 {
18163 num2 = 0.66f;
18164 float amount8 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18165 luminosity = MathHelper.Lerp(0.15f, 0.85f, amount8);
18166 break;
18167 }
18168 case "Jenosis":
18169 num2 = MathHelper.Lerp(0.9f, 1.13f, Utils.Turn01ToCyclic010(num2)) % 1f;
18170 luminosity = 0.5f;
18172 break;
18173 case "Kazzymodus":
18174 {
18175 num2 = 0.33f;
18176 float amount7 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18177 luminosity = MathHelper.Lerp(0.15f, 0.4f, amount7);
18178 break;
18179 }
18180 case "Khaios":
18181 {
18182 num2 = 0.33f;
18183 float amount6 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18184 luminosity = MathHelper.Lerp(0f, 0.2f, amount6);
18185 break;
18186 }
18187 case "Loki":
18188 {
18189 num2 = 0f;
18190 float amount5 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18191 luminosity = MathHelper.Lerp(0f, 0.25f, amount5);
18192 break;
18193 }
18194 case "ManaUser":
18195 num2 = MathHelper.Lerp(0.41f, 0.57f, Utils.Turn01ToCyclic010(num2));
18196 luminosity = 0.5f;
18197 break;
18198 case "Mid":
18199 {
18200 num2 = 0f;
18201 float amount4 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18202 luminosity = MathHelper.Lerp(0f, 0.9f, amount4);
18203 break;
18204 }
18205 case "Nimbus":
18206 num2 = MathHelper.Lerp(0.75f, 1f, Utils.Turn01ToCyclic010(num2));
18207 luminosity = 1f;
18209 break;
18210 case "Nike Leon":
18211 num2 = MathHelper.Lerp(0.04f, 0.1f, Utils.Turn01ToCyclic010(num2));
18212 luminosity = 0.5f;
18214 break;
18215 case "ppowersteef":
18216 num2 = MathHelper.Lerp(0f, 0.15f, Utils.Turn01ToCyclic010(num2));
18217 luminosity = 0.5f;
18219 break;
18220 case "RBrandon":
18221 num2 = 0.03f;
18222 luminosity = 0.3f;
18224 break;
18225 case "Redigit":
18226 num2 = 0.7f;
18227 luminosity = 0.5f;
18228 break;
18229 case "Serenity":
18230 {
18231 num2 = 0.85f;
18232 float amount3 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18233 luminosity = MathHelper.Lerp(1f, 0.5f, amount3);
18234 break;
18235 }
18236 case "Sigma":
18237 num2 = MathHelper.Lerp(0f, 0.12f, Utils.Turn01ToCyclic010(num2));
18238 luminosity = 0.5f;
18240 break;
18241 case "teiull":
18242 num2 = MathHelper.Lerp(0.66f, 1f, Utils.Turn01ToCyclic010(num2));
18243 luminosity = 0.5f;
18244 break;
18245 case "Unit One":
18246 {
18247 float amount2 = Utils.PingPongFrom01To010(num2);
18250 if (lerpToWhite != 0f)
18251 {
18252 color = Color.Lerp(color, Color.White, lerpToWhite);
18253 }
18254 color.A = (byte)((float)(int)color.A * alphaChannelMultiplier);
18255 return color;
18256 }
18257 case "Vulpes Inculta":
18258 num2 = MathHelper.Lerp(0.65f, 0.75f, Utils.Turn01ToCyclic010(num2));
18259 luminosity = 0.5f;
18261 break;
18262 case "Waze3174":
18263 num2 = MathHelper.Lerp(0.33f, 0f, Utils.Turn01ToCyclic010(num2));
18264 luminosity = 0.3f;
18266 break;
18267 case "Xman101":
18268 {
18269 num2 = 0.06f;
18270 float amount = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
18271 luminosity = MathHelper.Lerp(0f, 0.5f, amount);
18272 break;
18273 }
18274 case "Zoomo":
18275 num2 = 0.77f;
18276 luminosity = 0.5f;
18278 break;
18279 }
18280 }
18281 Color color4 = Main.hslToRgb(num2, saturation, luminosity);
18282 color4 *= Opacity;
18283 if (lerpToWhite != 0f)
18284 {
18286 }
18287 color4.A = (byte)((float)(int)color4.A * alphaChannelMultiplier);
18288 return color4;
18289 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static float SmoothStep(float value1, float value2, float amount)
Definition MathHelper.cs:63
static double Cos(double d)
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

References Microsoft.Xna.Framework.Color.A, Terraria.Projectile.ai, Microsoft.Xna.Framework.Color.Blue, System.Math.Cos(), Microsoft.Xna.Framework.Color.HotPink, Terraria.Main.hslToRgb(), Microsoft.Xna.Framework.Color.Lerp(), Microsoft.Xna.Framework.MathHelper.Lerp(), Terraria.Projectile.Opacity, Terraria.Projectile.owner, Terraria.Utils.PingPongFrom01To010(), Terraria.Main.player, Microsoft.Xna.Framework.MathHelper.SmoothStep(), Terraria.Utils.Turn01ToCyclic010(), Microsoft.Xna.Framework.Color.White, and Microsoft.Xna.Framework.Color.Yellow.