diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a08c46c1d0..fb3e09c9de 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1093,6 +1093,7 @@ namespace CalamityMod.CalPlayer #region Draedon Summoning public bool AbleToSelectExoMech = false; + public bool HasTalkedAtCodebreaker = false; #endregion Draedon Summoning #region Mouse Controls Syncing @@ -1225,6 +1226,7 @@ namespace CalamityMod.CalPlayer boost.AddWithCondition("newBanditInventory", newBanditInventory); boost.AddWithCondition("newCalamitasInventory", newCalamitasInventory); boost.AddWithCondition("GivenBrimstoneLocus", GivenBrimstoneLocus); + boost.AddWithCondition("HasTalkedAtCodebreaker", HasTalkedAtCodebreaker); // Calculate the new total time of all sessions at the instant of this player save. TimeSpan newSessionTotal = previousSessionTotal.Add(CalamityMod.SpeedrunTimer.Elapsed); @@ -1313,6 +1315,7 @@ namespace CalamityMod.CalPlayer newBanditInventory = boost.Contains("newBanditInventory"); newCalamitasInventory = boost.Contains("newCalamitasInventory"); GivenBrimstoneLocus = boost.Contains("GivenBrimstoneLocus"); + HasTalkedAtCodebreaker = boost.Contains("HasTalkedAtCodebreaker"); // Load rage if it's there, which it will be for any players saved with 1.5. // Older players have "stress" instead, which will be ignored. This is intentional. diff --git a/Effects/BlueStaticShader.fx b/Effects/BlueStaticShader.fx index 41bb90d15b..51c42aaac8 100644 --- a/Effects/BlueStaticShader.fx +++ b/Effects/BlueStaticShader.fx @@ -38,7 +38,7 @@ float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD // Lastly, apply the noise from above, and clamp the entire interpolant between 0-1 before passing it in as a color multiplier. brightLineInterpolant += noise * (useStaticLine ? 0.16 : 0.91); - return float4(0.3, 0.8, 1, 1) * lerp(1, 6, saturate(brightLineInterpolant)) * sampleColor * 0.2; + return float4(uColor, 1) * lerp(1, 6, saturate(brightLineInterpolant)) * sampleColor * tex2D(uImage0, coords).a * 0.2; } technique Technique1 { diff --git a/Effects/BlueStaticShader.xnb b/Effects/BlueStaticShader.xnb index 1fc89b09dd..9a3b7ce829 100644 Binary files a/Effects/BlueStaticShader.xnb and b/Effects/BlueStaticShader.xnb differ diff --git a/UI/DraedonSummoning/CodebreakerCommunicationUI.cs b/UI/DraedonSummoning/CodebreakerCommunicationUI.cs index 9289e08645..713a34365c 100644 --- a/UI/DraedonSummoning/CodebreakerCommunicationUI.cs +++ b/UI/DraedonSummoning/CodebreakerCommunicationUI.cs @@ -82,21 +82,40 @@ namespace CalamityMod.UI.DraedonSummoning { get { + if (PreviousTextCharacter is '\n') + return 48; + if (PreviousTextCharacter is '.' or '?') return 9; + return 1; } } - public static string InquiryText => "State your inquiry."; + public static string InquiryText + { + get + { + if (!Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker) + { + return "Fascinating.\n\n" + + "You would seek to establish communication with me?\n\n" + + "Very well. Though my time is precious, as a personal subject of intrigue, I am willing to humor some of your questions."; + } + + return "State your inquiry."; + } + } public static Dictionary DialogQueries => new() { - ["Mrrp"] = "Mrrp is cringe.", - ["The Destroyer"] = "Hardly designed for battle, its intended function was simply that of material collection. The souls that composed it were likely responsible for its senselessly destructive behaviors.", - ["The Twins"] = "I need to work more on those weird robots.", - ["Skeletron Prime"] = "I need to work more on those weird robots.", + ["Exo Prisms"] = "Those crystals are one of the most foundational materials used in my finest work, each containing so much energy " + + "as to warp surrounding material into branch-like structures, in a manner akin to rust.\n\nWith any luck, you may be able to harness their power to create very interesting weaponry.", + + ["The Tyrant"] = "I am unsure of the current whereabouts of the Tyrant. The last time we spoke, he wore an expression of finality before making his way into the shrouded sky. I have been unable to locate him since then.\n\n" + + "Perhaps you are fated to find and face him, wherever he may be.", }; + public static string HoverSoundDialogType { get; @@ -167,14 +186,17 @@ namespace CalamityMod.UI.DraedonSummoning public static void DisplayDraedonFacePanel(Vector2 panelCenter, Vector2 panelScale) { // Draw a panel that has Draedon's face. - Texture2D iconTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonContactPanel").Value; + Texture2D iconTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonIconBorder").Value; + Texture2D iconTextureInner = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonIconBorderInner").Value; float draedonIconDrawInterpolant = Utils.GetLerpValue(0.51f, 0.36f, DraedonScreenStaticInterpolant, true); - Vector2 draedonIconDrawTopRight = panelCenter + iconTexture.Size() * new Vector2(-0.5f, -0.5f) * panelScale + new Vector2(2f, 4f) * panelScale; + Vector2 draedonIconDrawTopRight = panelCenter + new Vector2(-128f, -84f) * panelScale; draedonIconDrawTopRight += new Vector2(24f, 4f) * panelScale; - Vector2 draedonIconScale = panelScale * new Vector2(0.32f, 0.25f); + Vector2 draedonIconScale = panelScale * 0.5f; Vector2 draedonIconCenter = draedonIconDrawTopRight + iconTexture.Size() * new Vector2(0.5f, 0.5f) * draedonIconScale; Rectangle draedonIconArea = Utils.CenteredRectangle(draedonIconCenter, iconTexture.Size() * draedonIconScale * 0.95f); + draedonIconArea.Y += 4; + draedonIconArea.Height -= 8; Main.spriteBatch.Draw(iconTexture, draedonIconDrawTopRight, null, Color.White * draedonIconDrawInterpolant, 0f, Vector2.Zero, draedonIconScale, 0, 0f); // Draw Draedon's face inside the panel. @@ -196,11 +218,12 @@ namespace CalamityMod.UI.DraedonSummoning Main.spriteBatch.ReleaseCutoffRegion(Matrix.Identity, SpriteSortMode.Immediate); // Draw a glitch effect over the panel and Draedon's icon. + GameShaders.Misc["CalamityMod:BlueStatic"].UseColor(Color.Cyan); GameShaders.Misc["CalamityMod:BlueStatic"].UseImage1("Images/Misc/noise"); GameShaders.Misc["CalamityMod:BlueStatic"].Shader.Parameters["useStaticLine"].SetValue(true); GameShaders.Misc["CalamityMod:BlueStatic"].Shader.Parameters["coordinateZoomFactor"].SetValue(1f); GameShaders.Misc["CalamityMod:BlueStatic"].Apply(); - Main.spriteBatch.Draw(iconTexture, draedonIconDrawTopRight, null, Color.White * draedonIconDrawInterpolant, 0f, Vector2.Zero, draedonIconScale, 0, 0f); + Main.spriteBatch.Draw(iconTextureInner, draedonIconDrawTopRight, null, Color.White * draedonIconDrawInterpolant, 0f, Vector2.Zero, draedonIconScale, 0, 0f); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, Matrix.Identity); } diff --git a/UI/DraedonSummoning/CodebreakerUI.cs b/UI/DraedonSummoning/CodebreakerUI.cs index ceb6848d70..94fa253014 100644 --- a/UI/DraedonSummoning/CodebreakerUI.cs +++ b/UI/DraedonSummoning/CodebreakerUI.cs @@ -128,6 +128,9 @@ namespace CalamityMod.UI.DraedonSummoning // Reset communication things. DraedonTextCreationTimer = 0; + if (!string.IsNullOrEmpty(DraedonText)) + Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker = false; + DraedonText = DraedonTextComplete = string.Empty; DialogHistory.Clear(); diff --git a/UI/DraedonSummoning/DraedonIconBorder.png b/UI/DraedonSummoning/DraedonIconBorder.png new file mode 100644 index 0000000000..95cf9b545d Binary files /dev/null and b/UI/DraedonSummoning/DraedonIconBorder.png differ diff --git a/UI/DraedonSummoning/DraedonIconBorderInner.png b/UI/DraedonSummoning/DraedonIconBorderInner.png new file mode 100644 index 0000000000..9b02e931ea Binary files /dev/null and b/UI/DraedonSummoning/DraedonIconBorderInner.png differ