From a71d9f609d49146a0001927bd9365efa1cb0f0de Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 17 Oct 2023 12:24:41 -0400 Subject: [PATCH 001/197] Add readme and license (already in private repo) --- LICENSE.md | 7 +++++++ README.md | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000..7b9e3935c2 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +**The Calamity Mod and all associated source code, visual assets and audio assets, is all rights reserved (ARR), with the following stipulations:** + +- Open source contributions to this repository are welcome. +- You may use the source code of the Calamity Mod as a reference for building or developing Terraria mods or other software. +- Code lifted from the Calamity Mod repository must be credited to the Calamity Team. +- The Calamity Mod cannot be redistributed in any form or in any location. The Steam Workshop is the only officially hosted download of the Calamity Mod. +- All music tracks are the property of their respective composers and are used by the Calamity Team with permission. \ No newline at end of file diff --git a/README.md b/README.md index bab1b4d500..1a934c316c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,15 @@ -# CalamityMod -The private repository for the Calamity Mod. +# Calamity Mod +[![Discord](https://img.shields.io/discord/225030931008847874)](https://discord.gg/calamity) +- [Official site](https://calamitymod.com/) +- [Steam Workshop](https://calamitymod.com/download/) +- [Discord](https://discord.gg/calamity) +- [Official Wiki](https://calamitymod.wiki.gg/) +- [Patreon](https://patreon.com/fabsol) + +The Calamity Mod is a vast content mod for Terraria which adds dozens of bosses and thousands of items to create an intense and varied experience. The mod must be installed using [tModLoader](https://github.com/tModLoader/tModLoader). + +**Note:** This repository contains only the latest public release of the Calamity Mod and any public contributions made since then. + +Active development by Calamity developers occurs on a separate, private repository. Contributions made here will be cherry picked into that repository. When an update is released to the Steam Workshop, the `1.4.4-release` branch is replaced with the matching branch from the private repository. + +**Do not redistribute the Calamity Mod.** Creating your own builds of the mod from an in-development sourcetree will cause confusion in the community and will make players' mods fail to sync in multiplayer. We will take down any copies of the Calamity Mod published to Steam Workshop or rehosted elsewhere, and reserve the right to take legal action as we see fit. \ No newline at end of file From d4cac103f6c137e27449b273f3210a7de9c3f41d Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 17 Oct 2023 18:19:16 -0400 Subject: [PATCH 002/197] Update license regarding contributions. --- LICENSE.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 7b9e3935c2..14b42fd06e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,12 @@ -**The Calamity Mod and all associated source code, visual assets and audio assets, is all rights reserved (ARR), with the following stipulations:** +**The Calamity Mod and all associated source code, visual assets and audio assets, is all rights reserved (ARR).** +The following stipulations apply to *contributing* to the Calamity Mod: - Open source contributions to this repository are welcome. +- If you contribute to the Calamity Mod, you expressly give the Calamity Team permission to use and reproduce your code and/or assets. +- You certify that all code contributed to the Calamity Mod is your own work or appropriately licensed for inclusion. +- We will make good faith efforts to honor reasonable requests to remove contributions from the Calamity Mod. Requests for your work to be excluded are a *privilege*, not a *right*, and we will ignore requests we deem unreasonable. + +The following stipulations apply to the Calamity Mod as a whole: - You may use the source code of the Calamity Mod as a reference for building or developing Terraria mods or other software. - Code lifted from the Calamity Mod repository must be credited to the Calamity Team. - The Calamity Mod cannot be redistributed in any form or in any location. The Steam Workshop is the only officially hosted download of the Calamity Mod. From 98d2064dac482b4bf3b85a95f02ab02fbd851428 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 25 Oct 2023 13:23:58 -0400 Subject: [PATCH 003/197] Update README with Iban's feedback (resprite PRs -> art server) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1a934c316c..9ae12d6b43 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,6 @@ The Calamity Mod is a vast content mod for Terraria which adds dozens of bosses Active development by Calamity developers occurs on a separate, private repository. Contributions made here will be cherry picked into that repository. When an update is released to the Steam Workshop, the `1.4.4-release` branch is replaced with the matching branch from the private repository. +Please do not submit resprites via pull requests. Instead, go to the [Calamity Art Discord](https://discord.gg/CKByxd5) and use the Asset Submission system if you want to propose a resprite for Calamity. + **Do not redistribute the Calamity Mod.** Creating your own builds of the mod from an in-development sourcetree will cause confusion in the community and will make players' mods fail to sync in multiplayer. We will take down any copies of the Calamity Mod published to Steam Workshop or rehosted elsewhere, and reserve the right to take legal action as we see fit. \ No newline at end of file From c82d3a2d678adfddeec25b739be5946ca1308b7d Mon Sep 17 00:00:00 2001 From: Toasty <74939552+toasty599@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:02:43 +0000 Subject: [PATCH 004/197] Fixed vanilla not accounting for spritebatch modification in held projectile drawing (#13) * - Properly restore spritebatch to its original settings. * - Try-Catch + error logging. * Actually check the bool. --------- Co-authored-by: Cameron Ewell --- ILEditing/ILChangesLoading.cs | 4 ++++ ILEditing/VanillaBugfixingILChanges.cs | 28 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 71d3c12511..10d0f7bc4c 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.Armor.LunicCorps; using CalamityMod.Tiles.DraedonStructures; using CalamityMod.Tiles.FurnitureExo; using Terraria; +using Terraria.DataStructures; using Terraria.GameContent; using Terraria.GameContent.Drawing; using Terraria.GameContent.Events; @@ -146,6 +147,9 @@ namespace CalamityMod.ILEditing // Fix vanilla bugs exposed by Calamity mechanics IL_NPC.NPCLoot += FixSplittingWormBannerDrops; + // Fix vanilla not accounting for spritebatch modification in held projectile drawing + On_PlayerDrawLayers.DrawHeldProj += FixHeldProjectileBlendState; + //Additional detours that are in their own item files given they are only relevant to these specific items: //Rover drive detours on Player.DrawInfernoRings to draw its shield //Wulfrum armor hooks on Player.KeyDoubleTap and DrawPendingMouseText to activate its set bonus and spoof the mouse text to display the stats of the activated weapon if shift is held diff --git a/ILEditing/VanillaBugfixingILChanges.cs b/ILEditing/VanillaBugfixingILChanges.cs index b7e9ac1add..81b8656eca 100644 --- a/ILEditing/VanillaBugfixingILChanges.cs +++ b/ILEditing/VanillaBugfixingILChanges.cs @@ -1,8 +1,11 @@ using CalamityMod.NPCs; +using Microsoft.Xna.Framework.Graphics; using Mono.Cecil.Cil; using MonoMod.Cil; using System; using Terraria; +using Terraria.DataStructures; +using Terraria.Graphics.Renderers; namespace CalamityMod.ILEditing { @@ -41,5 +44,30 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Brfalse, ret); } #endregion Fixing Splitting Worm Banner Spam in Deathmode + + #region Fixing Vanilla Not Accounting For Spritebatch Modification in Held Projectiles + private static bool HasLoggedHeldProjectileBlendStateCatch = false; + private void FixHeldProjectileBlendState(On_PlayerDrawLayers.orig_DrawHeldProj orig, PlayerDrawSet drawinfo, Projectile proj) + { + orig(drawinfo, proj); + + // Vanilla uses a worse quality sampler state for mounts when moving for some reason. Really couldn't say why. + var sampler = (drawinfo.drawPlayer.mount.Active && drawinfo.drawPlayer.fullRotation != 0f) ? LegacyPlayerRenderer.MountedSamplerState : Main.DefaultSamplerState; + + try + { + // Restart the spritebatch, to ensure that modifications made to it are properly restored. + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, sampler, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + catch + { + if (!HasLoggedHeldProjectileBlendStateCatch) + LogFailure("FixHeldProjectileBlendState", "The spritebatch was not left properly by another mod! The game will now most likely crash."); + + HasLoggedHeldProjectileBlendStateCatch = true; + } + } + #endregion } } From 0016f76ffea58434312e9db19e7e78e319dd26f7 Mon Sep 17 00:00:00 2001 From: Toasty <74939552+toasty599@users.noreply.github.com> Date: Mon, 18 Dec 2023 19:59:20 +0000 Subject: [PATCH 005/197] Fix obscure crash with miracle blight renderer (again) (#17) - Fixed weird index out of range error. - Cleaned up my code from #3 readability, and to better implement the guarding checks from #12 --- .../MiracleBlightRenderer.cs | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs b/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs index e5e673b989..2f6ee9af3f 100644 --- a/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs +++ b/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs @@ -49,18 +49,39 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers #endregion #region Methods - // Only draw if: - // - A Vanilla or Calamity NPC OR another mod's non boss npc. - // - The NPC is active. - // - The NPC has miracle blight. - // - The current player does not have the shrooms effect. - // - The current NPC isnt in an excluded list of NPCs. - // - The current NPC does not have the polarity effect. - // If this seems really excessive, it's because global complex effects like this are a pain in the ass to implement without having a million - // broken edge cases. - public static bool ValidToDraw(NPC npc) => - (npc.ModNPC == null || npc.ModNPC.Mod == CalamityMod.Instance || !npc.boss) && npc.active && npc.Calamity().miracleBlight > 0 - && !(Main.LocalPlayer.Calamity().trippy && !npc.IsABestiaryIconDummy) && !ExcludedNPCs.Contains(npc.type) && npc.PolarityNPC().CurPolarity == 0; + /// + /// Checks if the provided npc is eligible to be drawn with the miracle blight visual effect. + /// + /// The NPC to check + /// If the NPC is eligible + public static bool ValidToDraw(NPC npc) + { + // Do not draw inactive npcs, or ones with weird MP types less than or equal to 0. + if (!npc.active || npc.type <= NPCID.None) + return false; + + // Do not draw other mod's bosses. + if (npc.ModNPC != null && npc.ModNPC.Mod != CalamityMod.Instance && npc.boss) + return false; + + // Don't draw excluded NPCs, or if the npc is a bestiary dummy. + if (ExcludedNPCs.Contains(npc.type) || npc.IsABestiaryIconDummy) + return false; + + // Safety check for weird MP bug when getting global npcs. + if (!npc.TryGetGlobalNPC(out var calNPC) || !npc.TryGetGlobalNPC(out var polNPC)) + return false; + + // Do not draw if the npc does not have miracle blight, or has the polarity effect. + if (calNPC.miracleBlight <= 0 || polNPC.CurPolarity > 0f) + return false; + + // Do not draw if the current player has the trippy effect. + if (Main.LocalPlayer.Calamity().trippy) + return false; + + return true; + } public override void DrawToTarget(SpriteBatch spriteBatch) { @@ -68,12 +89,13 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers ActuallyDoPreDraw = true; // Draw every npc to a single target that should have the miracle blight visual. - foreach (var npc in Main.npc) + for (int i = 0; i < Main.maxNPCs; i++) { - // I don't know why this isnt always the case in MP, but if the global npc cant be found then the effect cannot be applied anyway as it is impossible - // to tell if they have miracle blight. - if (!npc.TryGetGlobalNPC(out _)) - continue; + // Extra check to ensure that index errors will not occur. If not in range, something has gone wrong and the loop should terminate. + if (!Main.npc.IndexInRange(i)) + break; + + NPC npc = Main.npc[i]; if (ValidToDraw(npc)) Main.instance.DrawNPC(npc.whoAmI, npc.behindTiles); From 7fad7403b18b17e97337b3b0470582d1f4663ce6 Mon Sep 17 00:00:00 2001 From: Raesh <153566542+Raesh-Haze@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:01:02 -0500 Subject: [PATCH 006/197] Fixed an error with lumenousAmulet inflicting riptide and not inflicting crush depth. (#16) * Lumenous Amulet now inflicts Crush Depth as its tooltip states. * Lumenous Amulet no longer sets Abyssal Amulet's bool to true, stopping it from inflicting Riptide. * The health increase from the amulets is now a combined if statement that checks for either one. --- CalPlayer/CalamityPlayer.cs | 2 +- CalPlayer/CalamityPlayerOnHit.cs | 4 ++++ Items/Accessories/LumenousAmulet.cs | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index b45a489ce5..5dc5c9c044 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1477,7 +1477,7 @@ namespace CalamityMod.CalPlayer Player.statLifeMax2 += 45; int percentMaxLifeIncrease = 0; - if (ZoneAbyss && abyssalAmulet) + if (ZoneAbyss && (abyssalAmulet || lumenousAmulet)) percentMaxLifeIncrease += lumenousAmulet ? 25 : 10; // Blood Pact and Chalice of the Blood God stack their HP bonuses if you want to equip both diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 163fe02e06..a6e99b607d 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1087,6 +1087,10 @@ namespace CalamityMod.CalPlayer { CalamityUtils.Inflict246DebuffsNPC(target, BuffType()); } + if (lumenousAmulet) + { + CalamityUtils.Inflict246DebuffsNPC(target, BuffType()); + } if (alchFlask) { CalamityUtils.Inflict246DebuffsNPC(target, BuffType()); diff --git a/Items/Accessories/LumenousAmulet.cs b/Items/Accessories/LumenousAmulet.cs index 4d9b3acba9..efc6a1e410 100644 --- a/Items/Accessories/LumenousAmulet.cs +++ b/Items/Accessories/LumenousAmulet.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.abyssalAmulet = true; modPlayer.lumenousAmulet = true; player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; From 2b5057329bf4945c9fa92d779d311c99c01c15a9 Mon Sep 17 00:00:00 2001 From: Dominic Karma <51094361+DominicKarma@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:16:06 -0600 Subject: [PATCH 007/197] Draedon Zoom Call (#18) * Add desired communication UI functionalities * Communication code improvements * Move dialog registry to localization files * Comments for DraedonDialogEntry.cs * More clear comment * Improve contact comment * Fix typo in localization comment ("Repeate" -> "Repeated"). * Fix explanative comment --------- Co-authored-by: tomat --- Localization/en-US/Mods.CalamityMod.UI.hjson | 57 +++ ModSupport/ModCalls.cs | 19 +- ...onUI.cs => CodebreakerUI.Communication.cs} | 390 +++++++++++++----- UI/DraedonSummoning/CodebreakerUI.cs | 82 +++- UI/DraedonSummoning/CodebreakerUIScroller.cs | 67 +++ UI/DraedonSummoning/DraedonDialogEntry.cs | 30 +- UI/DraedonSummoning/DraedonDialogRegistry.cs | 34 +- UI/DraedonSummoning/Scroller.png | Bin 0 -> 216 bytes 8 files changed, 531 insertions(+), 148 deletions(-) rename UI/DraedonSummoning/{CodebreakerCommunicationUI.cs => CodebreakerUI.Communication.cs} (55%) create mode 100644 UI/DraedonSummoning/CodebreakerUIScroller.cs create mode 100644 UI/DraedonSummoning/Scroller.png diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index 36d93f7516..63c871d76e 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -127,6 +127,7 @@ Cost: "Cost: " Contact: Contact Summon: Summon Evoke: Evoke +Exit: Exit Communicate: Communicate ConfirmationText: Are you sure? UpgradesRequired: Encryption unsolveable: Upgrades required. @@ -134,6 +135,62 @@ ThanatosIcon: Thanatos, a serpentine terror with impervious armor and innumerabl AresIcon: Ares, a heavyweight, diabolical monstrosity with four Exo superweapons. ArtemisApolloIcon: Artemis and Apollo, a pair of extremely persistent automatons with unstable energy reserves. +// Draedon Contact UI. Repeated newlines indicate pauses in Draedon's speaking. As a result, newline characters may be explicitly defined. +// The code that interprets these strings will transform them. +Communication: { + WhoAreYou: { + Inquiry: Who are you? + Response: + ''' + An ambitious question, if you are a philosopher. I will give only the facts.\n\n + I am not of this planet. I was born from machines. Or rather, I was... created. It may be misleading to say I was born.\n\n + The exact circumstances, I do not know. I do know that my first instance of awareness was that I was surrounded by a workshop.\n\n + All I have known since then was the act of creation and destruction. + ''' + } + + CalamitasBeforeDefeat: { + Inquiry: Calamitas + Response: The witch? She is a walking weapon. Such powerful magic in a living being was destined to be so. Look at yourself now. + } + + CalamitasAfterDefeat: { + Inquiry: Calamitas + Response: She has mellowed, I've noticed. For you creatures so burdened by emotion and guilt, I wonder now, how she manages to live with herself. + } + + Plague: { + Inquiry: The Plague + Response: + ''' + Fascinating, isn't it? I wasn't able to control it, unfortunately, but for science there is no such thing as failure as long as you record the results.\n\n + I knew the Astral Infection was capable of converting even machinery, but for nanotechnology I'd given it to react in kind, and begin to use the virus as a building block itself...\n\n + Marvelous. + ''' + } + + SulphuricSea: { + Inquiry: The Sulphuric Sea + Response: + ''' + Your concern for the utter destruction of the ecosystem is understandable, for you biological, and sentimental folk. However, nothing is irreparable or truly unrecreatable. Not even your sacred 'miracle of life'.\n\n + The sea simply exists now in a different state than what it once was, one that resulted out of convenience for my work.\n\n + Should I ever need to return to that sea? A pointless worry. I shall simply recreate it from the data I gathered, from the bedrock up. I would be a shame as a creator should I not be able to do that. + ''' + } + + TheTyrant: { + Inquiry: The Tyrant + Response: + ''' + My patron...\n + He is not someone I have spoken to in a very long time.\n\n + Is that such a surprise? He no longer required my services and I no longer needed his patronage. Many years ago now he withdrew himself to some secret hideaway. I suspect, to the grave of dragons he spoke of...\n\n + Should you locate him, I'll await the news of either his or your death. Perhaps I will collect the cadaver. + ''' + } +} + // Hologram Texts Hologram: { Text1: To any personnel engaged in the laboratories. Please wear your steel engraved ID badge at all times. It is the easiest method to discern your body if any accidents do occur. diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 46243a07e7..3b28e56129 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -1982,9 +1982,22 @@ namespace CalamityMod return SetPersistentBuffList(buffType4, isPersistent); case "CreateCodebreakerDialogOption": - if (args.Length != 4 || args[1] is not string inquiry || args[2] is not string response || args[3] is not Func condition) - throw new ArgumentException("ERROR: Must specify a string that determines the inquiry, a string that determines the response, and a Func that determines the condition."); - DraedonDialogRegistry.DialogOptions.Add(new(inquiry, response, condition)); + // NOTE: This is a legacy variant of this call. The variant with three arguments is the standard. + if (args.Length == 4) + { + if (args[1] is not string inquiry || args[2] is not string response || args[3] is not Func condition) + throw new ArgumentException("ERROR: Must specify a string that determines the inquiry, a string that determines the response, and a Func that determines the condition for the three argument call."); + DraedonDialogRegistry.DialogOptions.Add(new(inquiry, response, condition)); + } + else if (args.Length == 3) + { + if (args[1] is not string localizationKey || args[2] is not Func condition) + throw new ArgumentException("ERROR: Must specify a string that determines the localization key and a Func that determines the condition for the two argument call."); + DraedonDialogRegistry.DialogOptions.Add(new(localizationKey, condition)); + } + else + throw new ArgumentException("ERROR: Must specify either two or three arguments."); + return null; case "AddToVeneratedLocketBanlist": diff --git a/UI/DraedonSummoning/CodebreakerCommunicationUI.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs similarity index 55% rename from UI/DraedonSummoning/CodebreakerCommunicationUI.cs rename to UI/DraedonSummoning/CodebreakerUI.Communication.cs index bdc2084f99..898817b3a0 100644 --- a/UI/DraedonSummoning/CodebreakerCommunicationUI.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using CalamityMod.NPCs.ExoMechs; +using log4net; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -20,8 +21,14 @@ namespace CalamityMod.UI.DraedonSummoning { public class DialogEntry { + /// + /// Whether this dialog entry is spoken by Draedon or not. + /// public bool FromDraedon; + /// + /// The text of the dialog. + /// public string Dialog; public DialogEntry(string dialog, bool fromDraedon) @@ -31,67 +38,133 @@ namespace CalamityMod.UI.DraedonSummoning } } + /// + /// The scale of the overall communication panel. + /// public static float CommunicationPanelScale { get; set; - } = 0f; + } + /// + /// The text creation timer. Once this reaches a value of this value is set back to 0 and the next character in the dialog sequence is displayed. + /// public static int DraedonTextCreationTimer { get; set; } - public static string DraedonText + /// + /// The currently written text by Draedon. This string's contents are added to character-by-character. For the completed contents of this, refer to . + /// + public static string WrittenDraedonText { get; set; } = string.Empty; - public static List DialogHistory + /// + /// The text that Draedon is spelling out. For the partially spelt out text, refer to . + /// + public static string FullDraedonText { get; set; - } = new(); + } = string.Empty; - public static int DraedonDialogDelayCountdown + /// + /// The countdown until the next character sound can be played. + /// + public static int DialogSoundDelay { get; set; } + /// + /// The intensity of the universal static overlay. This is drawn when communication is initiated, as an indicator of the monitor "powering up". + /// public static float DraedonScreenStaticInterpolant { get; set; } = 1f; - public static float DraedonTextOptionsOpacity + /// + /// The opacity of text in the topic options menu. + /// + public static float OptionsTextOpacity { get; set; } = 1f; - // The text that Draedon should attempt to spell out. - public static string DraedonTextComplete + /// + /// The vertical offset as a result of scrolling for the dialog. + /// + public static float DialogVerticalOffset { get; set; - } = string.Empty; + } - // This is used to give a one-frame buffer before dialog actually appears. The reason for this is to prevent dialog sometimes showing up for one frame - // in the case of dialog entries being pruned because of going past the natural box. - public static bool CanDisplayLatestDialogEntries + /// + /// The vertical offset as a result of scrolling for the topic options. + /// + public static float OptionsTextVerticalOffset + { + get; + private set; + } + + /// + /// How much the of the dialog changed last frame. + /// + public static float LatestDialogHeightIncrease { get; set; - } = true; + } - public static char PreviousTextCharacter => DraedonText.Length >= 1 ? DraedonTextComplete[DraedonText.Length - 1] : ' '; + /// + /// How much vertical space is taken up by the dialog. This includes space that is cut off and requires scrolling to view. + /// + public static float DialogHeight + { + get; + private set; + } - public static char NextTextCharacter => DraedonText.Length < DraedonTextComplete.Length ? DraedonTextComplete[DraedonText.Length] : ' '; + /// + /// How much vertical space is taken up by the topic options text. This includes space that is cut off and requires scrolling to view. + /// + public static float OptionsTextHeight + { + get; + private set; + } + /// + /// The scale of dialog text. + /// + public static Vector2 DialogTextScale => Vector2.One * GeneralScale * 0.75f; + + /// + /// The previous character that Draedon spoke. + /// + public static char PreviousTextCharacter => WrittenDraedonText.Length >= 1 ? FullDraedonText[WrittenDraedonText.Length - 1] : ' '; + + /// + /// The next character that Draedon will speak. + /// + public static char NextTextCharacter => WrittenDraedonText.Length < FullDraedonText.Length ? FullDraedonText[WrittenDraedonText.Length] : ' '; + + /// + /// How much delay in frames there is between now and the next character based what the previous character was.

+ /// Most characters have a single frame delay, but things like newlines and sentence terminators have longer delays. + ///
public static int DraedonTextCreationRate { get @@ -106,22 +179,71 @@ namespace CalamityMod.UI.DraedonSummoning } } + /// + /// The text Draedon starts off with when you interact with the codebreaker. The first time you see him he says nothing, but in successive calls he asks what your inquiry is. + /// public static string InquiryText => Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker ? "State your inquiry." : "..."; + /// + /// The text of the previously hovered topic option. This is used to ensure hover clicking sounds only play if the sound type changes. + /// public static string HoverSoundDialogType { get; set; } = null; + /// + /// The history of all dialog spoken since the player latest initiated communication with Draedon. The contents of this can be backtracked via scrolling. + /// + public static List DialogHistory + { + get; + set; + } = new(); + + /// + /// The scroller responsible for navigating topic options. + /// + public static CodebreakerUIScroller TopicOptionsScroller + { + get; + internal set; + } = new(); + + /// + /// The scroller responsible for navigating previously spoken dialog. + /// + public static CodebreakerUIScroller DialogScroller + { + get; + internal set; + } = new(); + + /// + /// The font used for displaying dialog. + /// public static DynamicSpriteFont DialogFont { get; internal set; } + /// + /// The dialog hover sound. + /// public static readonly SoundStyle DialogOptionHoverSound = new("CalamityMod/Sounds/Custom/Codebreaker/DialogOptionHover"); - + + /// + /// Possible sounds Draedon can play when he speaks. + /// + public static readonly SoundStyle[] DraedonTalks = new SoundStyle[] + { + new("CalamityMod/Sounds/Custom/Codebreaker/DraedonTalk1"), + new("CalamityMod/Sounds/Custom/Codebreaker/DraedonTalk2"), + new("CalamityMod/Sounds/Custom/Codebreaker/DraedonTalk3") + }; + public override void OnModLoad() { if (Main.dedServ) @@ -153,11 +275,12 @@ namespace CalamityMod.UI.DraedonSummoning Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); // Apply a glitch shader. - GameShaders.Misc["CalamityMod:BlueStatic"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/SharpNoise")); - GameShaders.Misc["CalamityMod:BlueStatic"].Shader.Parameters["useStaticLine"].SetValue(false); - GameShaders.Misc["CalamityMod:BlueStatic"].Shader.Parameters["coordinateZoomFactor"].SetValue(0.5f); - GameShaders.Misc["CalamityMod:BlueStatic"].Shader.Parameters["useTrueNoise"].SetValue(true); - GameShaders.Misc["CalamityMod:BlueStatic"].Apply(); + MiscShaderData blueStatic = GameShaders.Misc["CalamityMod:BlueStatic"]; + blueStatic.SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/SharpNoise")); + blueStatic.Shader.Parameters["useStaticLine"].SetValue(false); + blueStatic.Shader.Parameters["coordinateZoomFactor"].SetValue(0.5f); + blueStatic.Shader.Parameters["useTrueNoise"].SetValue(true); + blueStatic.Apply(); float readjustedInterpolant = Utils.GetLerpValue(0.42f, 1f, DraedonScreenStaticInterpolant, true); Color staticColor = Color.White * (float)Math.Pow(CalamityUtils.AperiodicSin(readjustedInterpolant * 2.94f) * 0.5f + 0.5f, 0.54) * (float)Math.Pow(readjustedInterpolant, 0.51D); @@ -173,6 +296,8 @@ namespace CalamityMod.UI.DraedonSummoning DisplayDraedonFacePanel(panelCenter, panelScale); DisplayTextSelectionOptions(panelArea, panelScale); DisplayDialogHistory(panelArea, panelScale); + if (OptionsTextOpacity > 0f && DraedonScreenStaticInterpolant <= 0f) + DrawExitButton(panelCenter + new Vector2(-16f, 138f) * GeneralScale, OptionsTextOpacity); } public static void DisplayDraedonFacePanel(Vector2 panelCenter, Vector2 panelScale) @@ -194,13 +319,14 @@ namespace CalamityMod.UI.DraedonSummoning Main.spriteBatch.EnforceCutoffRegion(draedonIconArea, Matrix.Identity, SpriteSortMode.Immediate); // Apply a glitch shader. - GameShaders.Misc["CalamityMod:TeleportDisplacement"].UseOpacity(0.04f); - GameShaders.Misc["CalamityMod:TeleportDisplacement"].UseSecondaryColor(Color.White * 0.75f); - GameShaders.Misc["CalamityMod:TeleportDisplacement"].UseSaturation(0.75f); - GameShaders.Misc["CalamityMod:TeleportDisplacement"].Shader.Parameters["frameCount"].SetValue(Vector2.One); - GameShaders.Misc["CalamityMod:TeleportDisplacement"].Apply(); + MiscShaderData teleportEffect = GameShaders.Misc["CalamityMod:TeleportDisplacement"]; + teleportEffect.UseOpacity(0.04f); + teleportEffect.UseSecondaryColor(Color.White * 0.75f); + teleportEffect.UseSaturation(0.75f); + teleportEffect.Shader.Parameters["frameCount"].SetValue(Vector2.One); + teleportEffect.Apply(); - Vector2 draedonScale = new Vector2(draedonIconDrawInterpolant, 1f) * 1.6f; + Vector2 draedonScale = new Vector2(draedonIconDrawInterpolant, 1f) * Main.UIScale * 1.32f; SpriteEffects draedonDirection = SpriteEffects.FlipHorizontally; Texture2D draedonFaceTexture = ModContent.Request("CalamityMod/NPCs/ExoMechs/HologramDraedon").Value; @@ -208,11 +334,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(); + MiscShaderData blueStatic = GameShaders.Misc["CalamityMod:BlueStatic"]; + blueStatic.UseColor(Color.Cyan); + blueStatic.UseImage1("Images/Misc/noise"); + blueStatic.Shader.Parameters["useStaticLine"].SetValue(true); + blueStatic.Shader.Parameters["coordinateZoomFactor"].SetValue(1f); + blueStatic.Apply(); 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); @@ -228,22 +355,41 @@ namespace CalamityMod.UI.DraedonSummoning Main.spriteBatch.Draw(selectionOutline, selectionCenter, null, Color.White * selectionOptionsDrawInterpolant, 0f, selectionOutline.Size() * 0.5f, panelScale, 0, 0f); // Update the options opacity. - bool canChooseQuery = DraedonText.Length == DraedonTextComplete.Length; - DraedonTextOptionsOpacity = MathHelper.Clamp(DraedonTextOptionsOpacity + canChooseQuery.ToDirectionInt() * 0.1f, 0f, 1f); + bool canChooseQuery = WrittenDraedonText.Length == FullDraedonText.Length; + OptionsTextOpacity = MathHelper.Clamp(OptionsTextOpacity + canChooseQuery.ToDirectionInt() * 0.1f, 0f, 1f); + + // Enforce a cutoff on everything. + Rectangle textCutoffRegion = selectionArea; + textCutoffRegion.Y += 6; + textCutoffRegion.Height -= 10; + var rasterizer = Main.Rasterizer; + rasterizer.ScissorTestEnable = true; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, rasterizer, null, Matrix.Identity); + Main.spriteBatch.GraphicsDevice.ScissorRectangle = textCutoffRegion; + + // Draw and update the text scroller if there is some cut off text. + Vector2 textTopLeft = selectionArea.TopLeft() + new Vector2(20f, 12f) * panelScale + Vector2.UnitY * OptionsTextVerticalOffset; + float cutoffDistance = OptionsTextHeight / GeneralScale - selectionOutline.Height; + if (cutoffDistance > 0f && OptionsTextOpacity > 0f) + { + TopicOptionsScroller.PositionYInterpolant = MathHelper.Clamp(OptionsTextVerticalOffset / -cutoffDistance, 0f, 1f); + TopicOptionsScroller.Draw(selectionArea.Top + GeneralScale * 62f, selectionArea.Bottom - GeneralScale * 62f, selectionArea.Right - GeneralScale * 12f, GeneralScale * 0.8f, OptionsTextOpacity); + OptionsTextVerticalOffset = TopicOptionsScroller.PositionYInterpolant * -cutoffDistance; + } + + // Reset the options text height. + OptionsTextHeight = 0f; - // Display text options in the box. bool hoveringOverAnyOption = false; - float opacity = DraedonTextOptionsOpacity * (1f - DraedonScreenStaticInterpolant); - Vector2 textTopLeft = selectionArea.TopLeft() + new Vector2(20f, 12f) * panelScale; + float opacity = OptionsTextOpacity * (1f - DraedonScreenStaticInterpolant); Texture2D markerTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonInquirySelector").Value; Vector2 markerScale = panelScale * 0.24f; Vector2 markerDrawPositionOffset = Vector2.UnitX * markerTexture.Width * markerScale.X * 0.52f; Vector2 markerTextureSize = markerTexture.Size() * markerScale; - float bloomTexScale = (float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.05f + 0.26f; - float bloomTexRot = Main.GlobalTimeWrappedHourly * 0.5f; - Vector2 markerTextureOrigin = markerTexture.Size() * 0.5f; - float panelOffset = panelScale.Y * 12f; + float verticalOffsetPerOption = panelScale.Y * 12f; + // Display text options in the box. foreach (var dialog in DialogOptions.Where(d => d.Condition())) { // Skip/isolate the introduction text as needed. @@ -266,7 +412,7 @@ namespace CalamityMod.UI.DraedonSummoning Color textColor = Color.Cyan; Color markerColor = Color.White; Vector2 textArea = DialogFont.MeasureString(inquiry) * GeneralScale; - Rectangle textAreaRect = new((int)textTopLeft.X, (int)textTopLeft.Y, (int)textArea.X, (int)textArea.Y); + Rectangle textAreaRect = new((int)textTopLeft.X, (int)textTopLeft.Y, (int)(textArea.X * 0.9f), (int)textArea.Y); Rectangle markerArea = Utils.CenteredRectangle(markerDrawPosition, markerTextureSize); textAreaRect.Y = markerArea.Y; textAreaRect.Height = markerArea.Height; @@ -278,8 +424,11 @@ namespace CalamityMod.UI.DraedonSummoning Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, null, null, null, null, Matrix.Identity); + // Collect bloom flare draw information and draw based on it. Texture2D bloomTex = ModContent.Request("CalamityMod/UI/ModeIndicator/BloomFlare").Value; - Main.spriteBatch.Draw(bloomTex, markerDrawPosition, null, Color.SteelBlue * dialog.BloomOpacity * opacity, bloomTexRot, new Vector2(123f, 124f), bloomTexScale, 0, 0f); + float bloomTexScale = MathF.Sin(Main.GlobalTimeWrappedHourly) * 0.05f + 0.26f; + float bloomTexRotation = Main.GlobalTimeWrappedHourly * 0.5f; + Main.spriteBatch.Draw(bloomTex, markerDrawPosition, null, Color.SteelBlue * dialog.BloomOpacity * opacity, bloomTexRotation, new Vector2(123f, 124f), bloomTexScale, 0, 0f); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, Matrix.Identity); @@ -306,7 +455,7 @@ namespace CalamityMod.UI.DraedonSummoning if (!Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker) { DialogHistory.Insert(0, new(string.Empty, true)); - DraedonTextOptionsOpacity = 0f; + OptionsTextOpacity = 0f; } if (inquiry == DialogOptions[0].Inquiry) @@ -322,23 +471,37 @@ namespace CalamityMod.UI.DraedonSummoning DialogHistory[^1] = new(inquiry, false); DialogHistory.Add(new(string.Empty, true)); } - DraedonTextComplete = dialog.Response; - DraedonText = string.Empty; + + FullDraedonText = dialog.Response.Replace("\\n", "\n"); + WrittenDraedonText = string.Empty; + + // Ensure that the player starts at the bottom of the scoller, now that new text is generating there. + Texture2D dialogOutline = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonDialogOutline").Value; + Rectangle dialogArea = Utils.CenteredRectangle(selectionCenter, dialogOutline.Size() * panelScale); + DialogVerticalOffset = dialogArea.Height - DialogHeight * GeneralScale; + DialogScroller.PositionYInterpolant = 1f; + if (DialogVerticalOffset > 0f) + DialogVerticalOffset = 0f; + if (!Main.LocalPlayer.Calamity().SeenDraedonDialogs.Contains(dialog.ID)) Main.LocalPlayer.Calamity().SeenDraedonDialogs.Add(dialog.ID); - - CanDisplayLatestDialogEntries = false; } } + // Draw the marker texture next to the text. + Vector2 markerTextureOrigin = markerTexture.Size() * 0.5f; Main.spriteBatch.Draw(markerTexture, markerDrawPosition, null, markerColor * opacity, 0f, markerTextureOrigin, markerScale, 0, 0f); - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, DialogFont, inquiry, textTopLeft, textColor * opacity, 0f, Vector2.Zero, Vector2.One * GeneralScale * 0.76f); - textTopLeft.Y += panelOffset; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, DialogFont, inquiry, textTopLeft, textColor * opacity, 0f, Vector2.Zero, Vector2.One * GeneralScale * 0.85f); + textTopLeft.Y += verticalOffsetPerOption; + OptionsTextHeight += verticalOffsetPerOption; } if (!hoveringOverAnyOption) HoverSoundDialogType = null; + + // Return the sprite batch to its default state. + Main.spriteBatch.ReleaseCutoffRegion(Matrix.Identity); } public static void DisplayDialogHistory(Rectangle panelArea, Vector2 panelScale) @@ -350,19 +513,29 @@ namespace CalamityMod.UI.DraedonSummoning Rectangle dialogArea = Utils.CenteredRectangle(selectionCenter, dialogOutline.Size() * panelScale); Main.spriteBatch.Draw(dialogOutline, selectionCenter, null, Color.White * dialogHistoryDrawInterpolant, 0f, dialogOutline.Size() * 0.5f, panelScale, 0, 0f); + // Enforce a cutoff on everything. + Rectangle textCutoffRegion = dialogArea; + textCutoffRegion.Y += 6; + textCutoffRegion.Height -= 10; + var rasterizer = Main.Rasterizer; + rasterizer.ScissorTestEnable = true; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, rasterizer, null, Matrix.Identity); + Main.spriteBatch.GraphicsDevice.ScissorRectangle = textCutoffRegion; + // Intialize Draedon's dialog if necessary. - if (string.IsNullOrEmpty(DraedonTextComplete)) - DraedonTextComplete = InquiryText; + if (string.IsNullOrEmpty(FullDraedonText)) + FullDraedonText = InquiryText; // Type out Draedon text. - if (DraedonDialogDelayCountdown > 0) - DraedonDialogDelayCountdown--; + if (DialogSoundDelay > 0) + DialogSoundDelay--; if (DraedonScreenStaticInterpolant <= 0f) DraedonTextCreationTimer++; - if (DraedonTextCreationTimer >= DraedonTextCreationRate && DraedonText.Length < DraedonTextComplete.Length) + if (DraedonTextCreationTimer >= DraedonTextCreationRate && WrittenDraedonText.Length < FullDraedonText.Length) { - char nextLetter = DraedonTextComplete[DraedonText.Length]; - DraedonText += nextLetter; + char nextLetter = FullDraedonText[WrittenDraedonText.Length]; + WrittenDraedonText += nextLetter; DraedonTextCreationTimer = 0; // Initialize the dialog history if it's empty. @@ -370,44 +543,55 @@ namespace CalamityMod.UI.DraedonSummoning DialogHistory.Add(new(string.Empty, true)); // Update the last dialog history entry as Draedon types. - DialogHistory[^1].Dialog = DraedonText; + DialogHistory[^1].Dialog += nextLetter; + + // Shift the text downward if it exceeds the current bottom. + if (DialogHeight * 1.2f >= textCutoffRegion.Height && !string.IsNullOrEmpty(nextLetter.ToString()) && LatestDialogHeightIncrease > 0f) + DialogVerticalOffset -= LatestDialogHeightIncrease; // Move to the next index in the dialog history once Draedon is finished speaking. - if (DraedonText.Length >= DraedonTextComplete.Length) + if (WrittenDraedonText.Length >= FullDraedonText.Length) { - if (DraedonText == DialogOptions[0].Response) + if (WrittenDraedonText == DialogOptions[0].Response) Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker = true; DialogHistory.Add(new(string.Empty, true)); } // Play a small dialog sound, similar to that of Undertale. - if (DraedonDialogDelayCountdown <= 0 && nextLetter != ' ' && nextLetter != '\n') + if (DialogSoundDelay <= 0 && nextLetter != ' ' && nextLetter != '\n') { - SoundStyle[] DraedonTalks = { new("CalamityMod/Sounds/Custom/Codebreaker/DraedonTalk1"), - new("CalamityMod/Sounds/Custom/Codebreaker/DraedonTalk2"), - new("CalamityMod/Sounds/Custom/Codebreaker/DraedonTalk3")}; - - SoundStyle playThisSound = Main.rand.Next(DraedonTalks.ToArray()); - + SoundStyle playThisSound = Main.rand.Next(DraedonTalks); SoundEngine.PlaySound(playThisSound with { Volume = 0.4f }, Main.LocalPlayer.Center); - DraedonDialogDelayCountdown = 4; + + DialogSoundDelay = 4; } } - // Display text in the box. - int textIndex = 0; - int entriesToPrune = 0; - bool showNewEntries = CanDisplayLatestDialogEntries; - var dialogEntries = DialogHistory.Where(d => !string.IsNullOrEmpty(d.Dialog)); + // Draw and update the text scroller if there is some cut off text. Vector2 textTopLeft = dialogArea.TopLeft() + new Vector2(20f, 14f) * panelScale; + float cutoffDistance = DialogHeight - dialogOutline.Height; + if (cutoffDistance > 0f && OptionsTextOpacity > 0f) + { + DialogScroller.PositionYInterpolant = MathHelper.Clamp(DialogVerticalOffset / -cutoffDistance, 0f, 1f); + DialogScroller.Draw(dialogArea.Top + GeneralScale * 66f, dialogArea.Bottom - GeneralScale * 66f, dialogArea.Right - GeneralScale * 12f, GeneralScale * 0.8f, OptionsTextOpacity); + DialogVerticalOffset = DialogScroller.PositionYInterpolant * -cutoffDistance; + } + + // Display text in the box. + var dialogEntries = DialogHistory.Where(d => !string.IsNullOrEmpty(d.Dialog)); Texture2D markerTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonInquirySelector").Value; Vector2 markerScale = panelScale * 0.24f; Vector2 markerDrawPositionOffset = Vector2.UnitX * markerTexture.Width * markerScale.X * 0.6f; float markerDrawPositionOffsetY = markerScale.Y * 24f; float localTextOffsetY = markerScale.Y * 4f; Vector2 markerTextureOrigin = markerTexture.Size() * 0.5f; - float panelOffset = panelScale.Y * 7.6f; - float panelOffset2 = panelScale.Y * 16f; + float panelOffsetPerLine = panelScale.Y * 10f; + float panelOffsetPerEntry = panelScale.Y * 16f; + + // Store the top and bottom position of the text. This starts out as floating point extremes but is whittled down to the true + // vertical range of the text in the loop below. + float top = float.MaxValue; + float bottom = float.MinValue; foreach (var entry in dialogEntries) { @@ -419,18 +603,18 @@ namespace CalamityMod.UI.DraedonSummoning // Define a bunch of variables for text. These vary based on whether it's Draedon speaking or not. bool textIsFromDraedon = entry.FromDraedon; - Color dialogColor = Draedon.TextColor; - Vector2 localTextTopLeft = textTopLeft; - Vector2 markerDrawPosition = textTopLeft - markerDrawPositionOffset; + Color dialogColor = Draedon.TextColor * 1.25f; + Vector2 localTextTopLeft = textTopLeft + Vector2.UnitY * DialogVerticalOffset; + Vector2 markerDrawPosition = textTopLeft - markerDrawPositionOffset + Vector2.UnitY * DialogVerticalOffset; markerDrawPosition.Y += markerDrawPositionOffsetY; SpriteEffects markerDirection = SpriteEffects.None; if (!textIsFromDraedon) { // Flip positions to the other side of the dialog outline if the text is being said by the player. Vector2 anchorPoint = new(dialogArea.Center.X, markerDrawPosition.Y); - markerDrawPosition.X = anchorPoint.X + (anchorPoint.X - markerDrawPosition.X); - localTextTopLeft.X = anchorPoint.X + (anchorPoint.X - localTextTopLeft.X); - localTextTopLeft.X -= DialogFont.MeasureString(line).X * GeneralScale * 0.725f; + markerDrawPosition.X = anchorPoint.X + (anchorPoint.X - markerDrawPosition.X) - GeneralScale * 12f; + localTextTopLeft.X = anchorPoint.X + (anchorPoint.X - localTextTopLeft.X) - GeneralScale * 14f; + localTextTopLeft.X -= DialogFont.MeasureString(line).X * DialogTextScale.X; localTextTopLeft.Y -= localTextOffsetY; // Use a neutral grey-ish color if text is being said by the player. @@ -439,42 +623,30 @@ namespace CalamityMod.UI.DraedonSummoning markerDirection = SpriteEffects.FlipHorizontally; } - if (entriesToPrune <= 0 && (textIndex < dialogEntries.Count() - 2 || showNewEntries)) - { - // Draw the text marker. - if (lineIndex <= 0) - Main.spriteBatch.Draw(markerTexture, markerDrawPosition, null, Color.White * dialogHistoryDrawInterpolant, 0f, markerTextureOrigin, markerScale, markerDirection, 0f); + // Draw the text marker. + if (lineIndex <= 0) + Main.spriteBatch.Draw(markerTexture, markerDrawPosition, null, Color.White * dialogHistoryDrawInterpolant, 0f, markerTextureOrigin, markerScale, markerDirection, 0f); - // Draw the text itself. - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, DialogFont, line, localTextTopLeft, dialogColor * dialogHistoryDrawInterpolant, 0f, Vector2.Zero, Vector2.One * GeneralScale * 0.7f); - } + // Draw the text itself. + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, DialogFont, line, localTextTopLeft, dialogColor * dialogHistoryDrawInterpolant, 0f, Vector2.Zero, DialogTextScale); - textTopLeft.Y += panelOffset; + textTopLeft.Y += panelOffsetPerLine; lineIndex++; + + // Improve the calculation of the top and bottom of the dialog. + top = MathF.Min(top, localTextTopLeft.Y); + bottom = MathF.Max(bottom, localTextTopLeft.Y); } - textTopLeft.Y += panelOffset2; - if (textTopLeft.Y >= dialogArea.Bottom) - entriesToPrune++; - - textIndex++; + textTopLeft.Y += panelOffsetPerEntry; } - // If the text entries went past the dialog box, prune the oldest ones. - while (entriesToPrune >= 1) - { - if (DialogHistory.Count <= 0) - break; + // Store the dialog text height, along with how much the height changed this frame. + LatestDialogHeightIncrease = bottom - top - DialogHeight; + DialogHeight = bottom - top; - string text = DialogHistory[0].Dialog; - if (text == DialogOptions[0].Inquiry) - Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker = true; - - DialogHistory.RemoveAt(0); - entriesToPrune--; - } - - CanDisplayLatestDialogEntries = true; + // Return the sprite batch to its default state. + Main.spriteBatch.ReleaseCutoffRegion(Matrix.Identity); } } } diff --git a/UI/DraedonSummoning/CodebreakerUI.cs b/UI/DraedonSummoning/CodebreakerUI.cs index f308e072b7..ed5ae65894 100644 --- a/UI/DraedonSummoning/CodebreakerUI.cs +++ b/UI/DraedonSummoning/CodebreakerUI.cs @@ -50,11 +50,11 @@ namespace CalamityMod.UI.DraedonSummoning set; } = 1f; - public static float CancelButtonScale + public static float ExitButtonScale { get; set; - } = 0.75f; + } = 1f; public static float ContactButtonScale { @@ -68,14 +68,28 @@ namespace CalamityMod.UI.DraedonSummoning set; } = 1f; + public static float CancelButtonScale + { + get; + set; + } = 1f; + public static float MechIconScale { get; set; } = 1f; + // This variable is currently permanently set to false due to being deemed unfinished and not fit for release. + // It used to be a local variable but has been moved to a property so that addon mods can easily enable it. + public static bool DraedonTalkFeatureEnabled + { + get; + set; + } + public static Vector2 BackgroundCenter => new(500f, Main.screenHeight * 0.5f + 115f); - + public static float GeneralScale => MathHelper.Lerp(1f, 0.7f, Utils.GetLerpValue(1325f, 750f, Main.screenWidth, true)) * Main.UIScale; public static Rectangle MouseScreenArea => Utils.CenteredRectangle(Main.MouseScreen, Vector2.One * 2f); @@ -94,11 +108,18 @@ namespace CalamityMod.UI.DraedonSummoning CancelButtonScale = 0.75f; ContactButtonScale = 1f; CommunicateButtonScale = 1f; + ExitButtonScale = 1f; CommunicationPanelScale = 0f; ViewedTileEntityID = -1; AwaitingCloseConfirmation = false; DisplayingCommunicationText = false; MechIconScale = 1f; + DialogScroller.Reset(); + TopicOptionsScroller.Reset(); + DialogVerticalOffset = 0f; + OptionsTextVerticalOffset = 0f; + DialogHeight = 0f; + LatestDialogHeightIncrease = 0f; return; } @@ -122,6 +143,7 @@ namespace CalamityMod.UI.DraedonSummoning DraedonScreenStaticInterpolant = 0f; } + // Disable the codebreaker UI's typical functions if currently speaking with Draedon, ignoring everything else in this method. if (DisplayingCommunicationText) { DisplayCommunicationPanel(); @@ -131,17 +153,14 @@ namespace CalamityMod.UI.DraedonSummoning // Reset communication things. DraedonTextCreationTimer = 0; - if (!string.IsNullOrEmpty(DraedonText) && DraedonTextComplete == DraedonDialogRegistry.DialogOptions[0].Inquiry) + if (!string.IsNullOrEmpty(WrittenDraedonText) && FullDraedonText == DraedonDialogRegistry.DialogOptions[0].Inquiry) Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker = true; - DraedonText = DraedonTextComplete = string.Empty; + WrittenDraedonText = FullDraedonText = string.Empty; DialogHistory.Clear(); bool canSummonDraedon = codebreakerTileEntity.ReadyToSummonDraedon && CalamityWorld.AbleToSummonDraedon; - // canTalkToDraedon is currently permanently set to false due to being deemed unfinished and not fit for release. - // If there is a desire to re-enable it, replace the following line with the commented line beneath it. - bool canTalkToDraedon = false; - // bool canTalkToDraedon = codebreakerTileEntity.ReadyToSummonDraedon && DownedBossSystem.downedExoMechs; + bool canTalkToDraedon = codebreakerTileEntity.ReadyToSummonDraedon && DownedBossSystem.downedExoMechs && DraedonTalkFeatureEnabled; Vector2 backgroundTopLeft = BackgroundCenter - backgroundTexture.Size() * GeneralScale * 0.5f; // Draw the cell payment slot icon. @@ -227,18 +246,53 @@ namespace CalamityMod.UI.DraedonSummoning // If cells are present, make the item reflect that. Item temporaryPowerCell = new Item(); if (codebreakerTileEntity.ContainsBloodSample) - { temporaryPowerCell.SetDefaults(ModContent.ItemType()); - } else - { temporaryPowerCell.SetDefaults(ModContent.ItemType()); - } + + // Copy the cell stack from the amount of cells in the tile entity. temporaryPowerCell.stack = codebreakerTileEntity.InputtedCellCount; Vector2 cellInteractionArea = ModContent.Request("CalamityMod/UI/DraedonsArsenal/PowerCellSlot_Empty").Value.Size() * GeneralScale; CalamityUtils.DrawPowercellSlot(spriteBatch, temporaryPowerCell, cellDrawCenter, GeneralScale); HandleCellSlotInteractions(codebreakerTileEntity, temporaryPowerCell, cellDrawCenter, cellInteractionArea); + + // Draw the exit button. + // The prevent confusion, this does not draw if the player is attempting to cancel an ongoing decryption. + if (!AwaitingCloseConfirmation) + DrawExitButton(Vector2.Lerp(summonButtonCenter, talkButtonCenter, 0.5f), 1f); + } + + public static void DrawExitButton(Vector2 drawPosition, float opacity) + { + Texture2D cancelButton = ModContent.Request("CalamityMod/UI/DraedonSummoning/DecryptCancelIcon").Value; + Rectangle clickArea = Utils.CenteredRectangle(drawPosition, cancelButton.Size() * VerificationButtonScale); + + // Check if the mouse is hovering over the exit button area. + if (MouseScreenArea.Intersects(clickArea)) + { + // If so, cause the button to inflate a little bit. + ExitButtonScale = MathHelper.Clamp(ExitButtonScale + 0.035f, 1f, 1.4f); + + // If a click is done, leave the Codebreaker UI. + if (Main.mouseLeft && Main.mouseLeftRelease) + ViewedTileEntityID = -1; + } + + // Otherwise, if not hovering, cause the button to deflate back to its normal size. + else + ExitButtonScale = MathHelper.Clamp(ExitButtonScale - 0.05f, 1f, 1.4f); + + // Draw the exit button. + Main.spriteBatch.Draw(cancelButton, drawPosition, null, Color.White, 0f, cancelButton.Size() * 0.5f, ExitButtonScale * GeneralScale, 0, 0f); + + // And display a text indicator that describes the function of the button. + string exitText = CalamityUtils.GetTextValue("UI.Exit"); + + // Center the draw position. + drawPosition.X -= FontAssets.MouseText.Value.MeasureString(exitText).X * GeneralScale * 0.5f; + drawPosition.Y += GeneralScale * 20f; + Utils.DrawBorderStringFourWay(Main.spriteBatch, FontAssets.MouseText.Value, exitText, drawPosition.X, drawPosition.Y, Color.Red * opacity, Color.Black * opacity, Vector2.Zero, GeneralScale); } public static void HandleCellSlotInteractions(TECodebreaker codebreakerTileEntity, Item temporaryItem, Vector2 cellIconCenter, Vector2 area) @@ -417,7 +471,7 @@ namespace CalamityMod.UI.DraedonSummoning Texture2D cellTexture = ModContent.Request("CalamityMod/Items/DraedonMisc/DraedonPowerCell").Value; Vector2 offsetDrawPosition = new Vector2(drawPosition.X + ChatManager.GetStringSize(FontAssets.MouseText.Value, text, Vector2.One, -1f).X * GeneralScale + GeneralScale * 15f, drawPosition.Y + GeneralScale * 30f); Main.spriteBatch.Draw(cellTexture, offsetDrawPosition, null, Color.White, 0f, cellTexture.Size() * 0.5f, GeneralScale, 0, 0f); - + // Display the cell quantity numerically below the drawn cells. Utils.DrawBorderStringFourWay(Main.spriteBatch, FontAssets.ItemStack.Value, totalCellsCost.ToString(), offsetDrawPosition.X - GeneralScale * 11f, offsetDrawPosition.Y, Color.White, Color.Black, new Vector2(0.3f), GeneralScale * 0.75f); } diff --git a/UI/DraedonSummoning/CodebreakerUIScroller.cs b/UI/DraedonSummoning/CodebreakerUIScroller.cs new file mode 100644 index 0000000000..3d0533c942 --- /dev/null +++ b/UI/DraedonSummoning/CodebreakerUIScroller.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework.Graphics; +using Terraria.ModLoader; +using Terraria; +using Microsoft.Xna.Framework; + +namespace CalamityMod.UI.DraedonSummoning +{ + public class CodebreakerUIScroller + { + public bool IsBeingDragged + { + get; + set; + } + + public float PositionYInterpolant + { + get; + set; + } + + public void Draw(float top, float bottom, float x, float scale, float opacity) + { + Color scrollerColor = Color.White; + Texture2D scrollerTexture = ModContent.Request("CalamityMod/UI/DraedonSummoning/Scroller").Value; + + // Update the top and bottom position to account for the texture origin. + top -= scrollerTexture.Height * scale * 0.5f; + bottom += scrollerTexture.Height * scale * 0.5f; + + // Calculate the scroller position and area. + Vector2 scrollerPosition = new Vector2(x, MathHelper.Lerp(top, bottom, PositionYInterpolant)); + Rectangle scrollerArea = Utils.CenteredRectangle(scrollerPosition, scrollerTexture.Size() * scale); + + // Calculate the mouse screen area. + Rectangle mouseArea = new Rectangle((int)Main.MouseScreen.X, (int)Main.MouseScreen.Y, 2, 2); + + // Check if the user is dragging the scroller. + bool pressingDownOnScroller = Main.mouseLeft && scrollerArea.Intersects(mouseArea); + if (pressingDownOnScroller) + IsBeingDragged = true; + + // Check if the user is done dragging the scroller. + bool releaseDown = Main.mouseLeftRelease; + if (IsBeingDragged && releaseDown) + IsBeingDragged = false; + + // Update the Y position interpolant if the scroller is being dragged based on mouse position. + if (IsBeingDragged) + PositionYInterpolant = Utils.GetLerpValue(top, bottom, Main.MouseScreen.Y, true); + + // Make the scroller a bit darker when being dragged. + if (IsBeingDragged) + scrollerColor = Color.DarkSlateGray; + + // Draw the scroller. + Vector2 scrollerOrigin = scrollerTexture.Size() * 0.5f; + Main.spriteBatch.Draw(scrollerTexture, scrollerPosition, null, scrollerColor * opacity, 0f, scrollerOrigin, scale, 0, 0f); + } + + public void Reset() + { + IsBeingDragged = false; + PositionYInterpolant = 0f; + } + } +} diff --git a/UI/DraedonSummoning/DraedonDialogEntry.cs b/UI/DraedonSummoning/DraedonDialogEntry.cs index 4eab4ea4bb..d6c65975ee 100644 --- a/UI/DraedonSummoning/DraedonDialogEntry.cs +++ b/UI/DraedonSummoning/DraedonDialogEntry.cs @@ -2,20 +2,36 @@ using System.Text; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Localization; namespace CalamityMod.UI.DraedonSummoning { public class DraedonDialogEntry { + /// + /// The question the player asks to prompt the dialog. + /// public string Inquiry; + /// + /// The response Draedon gives to the inquiry. + /// public string Response; + /// + /// The opacity of the bloom flare for this dialog entry. Used to indicate new/unread dialog options to the player. + /// public float BloomOpacity; + /// + /// The condition upon which this dialog can be read. The most common example of such is chcecking whether a boss of some kind has been defeated. + /// public Func Condition; // A bit of a scuffed way of identifying text based on a single neat number but it should be fine for all intents and purposes. + /// + /// The (mostly) unique identifier of this dialog based on the response Draedon gives. + /// public ulong ID { get @@ -32,19 +48,29 @@ namespace CalamityMod.UI.DraedonSummoning } } + /// + /// Whether the local player has seen this dialog instance yet. + /// public bool HasBeenSeen => Main.LocalPlayer.Calamity().SeenDraedonDialogs.Contains(ID); - public DraedonDialogEntry(string inquiry, string response, Func condition = null) + // NOTE: This is a legacy constructor. It remains so that mod calls that rely on it do not break. + internal DraedonDialogEntry(string inquiry, string response, Func condition = null) { // Initialize the condition as a simple "always show up" if nothing else is inputted. Condition = condition ?? (() => true); - Inquiry = inquiry; Response = response; } + // This is the proper constructor. + public DraedonDialogEntry(string localizationKey, Func condition = null) : + this(Language.GetTextValue($"{localizationKey}.Inquiry"), Language.GetTextValue($"{localizationKey}.Response"), condition) + { + } + public void Update() { + // Make bloom dissipate if this dialog has been seen. if (!HasBeenSeen) BloomOpacity = 1f; else diff --git a/UI/DraedonSummoning/DraedonDialogRegistry.cs b/UI/DraedonSummoning/DraedonDialogRegistry.cs index 0763dc9197..2cd6134ac9 100644 --- a/UI/DraedonSummoning/DraedonDialogRegistry.cs +++ b/UI/DraedonSummoning/DraedonDialogRegistry.cs @@ -1,32 +1,23 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace CalamityMod.UI.DraedonSummoning { public static class DraedonDialogRegistry { - public static readonly DraedonDialogEntry WhoAreYou = new("Who are you?", "An ambitious question, if you are a philosopher. I will give only the facts.\n\n" + - "I am not of this planet. I was born from machines. Or rather, I was... created. It may be misleading to say I was born.\n\n" + - "The exact circumstances, I do not know. I do know that my first instance of awareness was that I was surrounded by a workshop.\n\n" + - "All I have known since then was the act of creation and destruction."); + public const string CommunicationLocalizationBase = "Mods.CalamityMod.UI.Communication."; - public static readonly DraedonDialogEntry CalamitasBeforeHerDefeat = new("Calamitas", "The witch? She is a walking weapon. Such powerful magic in a living being was destined to be so. Look at yourself now.", () => !DownedBossSystem.downedCalamitas); + public static readonly DraedonDialogEntry WhoAreYou = CreateFromKey("WhoAreYou"); - public static readonly DraedonDialogEntry CalamitasAfterHerDefeat = new("Calamitas", "She has mellowed, I've noticed. For you creatures so burdened by emotion and guilt, I wonder now, how she manages to live with herself.", () => - DownedBossSystem.downedCalamitas); + public static readonly DraedonDialogEntry CalamitasBeforeHerDefeat = CreateFromKey("CalamitasBeforeDefeat", () => !DownedBossSystem.downedCalamitas); - public static readonly DraedonDialogEntry Plague = new("The Plague", "Fascinating, isn't it? I wasn't able to control it, unfortunately, but for science there is no such thing as failure as long as you record the results.\n\n" + - "I knew the Astral Infection was capable of converting even machinery, but for nanotechnology I'd given it to react in kind, and begin to use the virus as a building block itself...\n\n" + - "Marvelous.", () => DownedBossSystem.downedPlaguebringer); - - public static readonly DraedonDialogEntry SulphurousSea = new("The Sulphuric Sea", "Your concern for the utter destruction of the ecosystem is understandable, for you biological, and sentimental folk. However, " + - "nothing is irreparable or truly unrecreatable. Not even your sacred 'miracle of life'.\n\n" + - "The sea simply exists now in a different state than what it once was, one that resulted out of convenience for my work.\n\n" + - "Should I ever need to return to that sea? A pointless worry. I shall simply recreate it from the data I gathered, from the bedrock up. I would be a shame as a creator should I not be able to do that."); + public static readonly DraedonDialogEntry CalamitasAfterHerDefeat = CreateFromKey("CalamitasAfterDefeat", () => DownedBossSystem.downedCalamitas); - public static readonly DraedonDialogEntry TheTyrant = new("The Tyrant", "My patron...\n" + - "He is not someone I have spoken to in a very long time.\n\n" + - "Is that such a surprise? He no longer required my services and I no longer needed his patronage. Many years ago now he withdrew himself to some secret hideaway. I suspect, to the grave of dragons he spoke of...\n\n" + - "Should you locate him, I'll await the news of either his or your death. Perhaps I will collect the cadaver.", () => DownedBossSystem.downedCalamitas); + public static readonly DraedonDialogEntry Plague = CreateFromKey("Plague", () => DownedBossSystem.downedPlaguebringer); + + public static readonly DraedonDialogEntry SulphurousSea = CreateFromKey("SulphuricSea"); + + public static readonly DraedonDialogEntry TheTyrant = CreateFromKey("TheTyrant", () => DownedBossSystem.downedCalamitas); internal static List DialogOptions = new() { @@ -39,5 +30,8 @@ namespace CalamityMod.UI.DraedonSummoning SulphurousSea, TheTyrant }; + + internal static DraedonDialogEntry CreateFromKey(string key, Func condition = null) => + new($"{CommunicationLocalizationBase}{key}", condition); } } diff --git a/UI/DraedonSummoning/Scroller.png b/UI/DraedonSummoning/Scroller.png new file mode 100644 index 0000000000000000000000000000000000000000..ef2791a3f87a7f40095f1113fcc471ecf7bba97d GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^d_e5R!3-o%&kcP9q!^2X+?^QKos)S9^91;WxY|v9S$pKaXX-AXz*(ziOOU#fAiv=M|Nk>MXs!GL2=L z-w(o!7OcT4KtWee7sn6_|F@S7`4|*9m>qKd|4(1(w1|^?^+xZV?VrAlY*CM8+wk&rgR3}dc8pz=3>gTe~DWM4f DN8ChI literal 0 HcmV?d00001 From 621ba5cb58b50040157b1176a07a38420e590128 Mon Sep 17 00:00:00 2001 From: Golfing7 <51512085+Golfing7@users.noreply.github.com> Date: Mon, 1 Jan 2024 22:31:40 -0500 Subject: [PATCH 008/197] Cache lava style at beginning of DrawWaters for performance (#20) --- ILEditing/ILChangesLoading.cs | 1 + ILEditing/ILHelperMethods.cs | 47 ++++++++++++++++++++------------ ILEditing/MechanicILChanges.cs | 50 ++++++++++++++++++++++++++++------ 3 files changed, 72 insertions(+), 26 deletions(-) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 10d0f7bc4c..abd6038bb1 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -45,6 +45,7 @@ namespace CalamityMod.ILEditing On_Main.DrawInfernoRings += DrawForegroundParticles; On_TileDrawing.DrawPartialLiquid += DrawCustomLava; On_WaterfallManager.DrawWaterfall_int_int_int_float_Vector2_Rectangle_Color_SpriteEffects += DrawCustomLavafalls; + On_Main.RenderWater += CacheLavaStyle; IL_LiquidRenderer.DrawNormalLiquids += ChangeWaterQuadColors; IL_Main.oldDrawWater += DrawCustomLava3; On_TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter; diff --git a/ILEditing/ILHelperMethods.cs b/ILEditing/ILHelperMethods.cs index 167e4bd24a..e497cd1e46 100644 --- a/ILEditing/ILHelperMethods.cs +++ b/ILEditing/ILHelperMethods.cs @@ -9,6 +9,7 @@ using CalamityMod.Systems; using Terraria.Graphics; using System.Collections.Generic; using System.Linq; +using Microsoft.Xna.Framework.Input; namespace CalamityMod.ILEditing { @@ -63,7 +64,7 @@ namespace CalamityMod.ILEditing SoundEngine.PlaySound(SoundID.DoorClosed, new Vector2(doorX * 16, doorY * 16)); return true; } - + private static Texture2D SelectLavaTexture(Texture2D initialTexture, LiquidTileType type) { // Use the initial texture if it isn't lava. @@ -72,20 +73,17 @@ namespace CalamityMod.ILEditing initialTexture != CustomLavaManagement.LavaSlopeTexture) return initialTexture; - foreach (CustomLavaStyle lavaStyle in CustomLavaManagement.CustomLavaStyles) + if (cachedLavaStyle == default) + return initialTexture; + + switch (type) { - if (lavaStyle.ChooseLavaStyle()) - { - switch (type) - { - case LiquidTileType.Block: - return lavaStyle.BlockTexture; - case LiquidTileType.Waterflow: - return lavaStyle.LavaTexture; - case LiquidTileType.Slope: - return lavaStyle.SlopeTexture; - } - } + case LiquidTileType.Block: + return cachedLavaStyle.BlockTexture; + case LiquidTileType.Waterflow: + return cachedLavaStyle.LavaTexture; + case LiquidTileType.Slope: + return cachedLavaStyle.SlopeTexture; } return initialTexture; @@ -93,10 +91,23 @@ namespace CalamityMod.ILEditing private static VertexColors SelectLavaQuadColor(Texture2D initialTexture, ref VertexColors initialColor, bool forceTrue = false) { - initialColor.TopLeftColor = SelectLavaColor(initialTexture, initialColor.TopLeftColor, forceTrue); - initialColor.TopRightColor = SelectLavaColor(initialTexture, initialColor.TopRightColor, forceTrue); - initialColor.BottomLeftColor = SelectLavaColor(initialTexture, initialColor.BottomLeftColor, forceTrue); - initialColor.BottomRightColor = SelectLavaColor(initialTexture, initialColor.BottomRightColor, forceTrue); + // We should handle the 'forceTrue' flag at this level to prevent us from checking the same thing four times. + if (!forceTrue) + { + if (initialTexture != CustomLavaManagement.LavaTexture && + initialTexture != CustomLavaManagement.LavaBlockTexture && + initialTexture != CustomLavaManagement.LavaSlopeTexture) + return initialColor; + } + + // No lava style to draw? Then skip. + if (cachedLavaStyle == default) + return initialColor; + + cachedLavaStyle.SelectLightColor(ref initialColor.TopLeftColor); + cachedLavaStyle.SelectLightColor(ref initialColor.TopRightColor); + cachedLavaStyle.SelectLightColor(ref initialColor.BottomLeftColor); + cachedLavaStyle.SelectLightColor(ref initialColor.BottomRightColor); return initialColor; } diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 79ce1e920d..a36155c22a 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -51,6 +51,8 @@ namespace CalamityMod.ILEditing private static int aLabDoorClosed = -1; private static int exoDoorOpen = -1; private static int exoDoorClosed = -1; + // Cached for use in ChangeWaterQuadColors. + private static CustomLavaStyle cachedLavaStyle = default; // Holds the vanilla game function which spawns town NPCs, wrapped in a delegate for reflection purposes. // This function is (optionally) invoked manually in an IL edit to enable NPCs to spawn at night. @@ -765,6 +767,25 @@ namespace CalamityMod.ILEditing #endregion #region Custom Lava Visuals + + private static void CacheLavaStyle(Terraria.On_Main.orig_RenderWater orig, Main self) + { + // Immediately cache the lava drawing style. + // This will pay off in SPADES when we go to draw the tiles. + foreach (CustomLavaStyle style in CustomLavaManagement.CustomLavaStyles) + { + if (style.ChooseLavaStyle()) + { + cachedLavaStyle = style; + orig(self); + return; + } + } + + cachedLavaStyle = default; + orig(self); + } + private static void DrawCustomLava(Terraria.GameContent.Drawing.On_TileDrawing.orig_DrawPartialLiquid orig, TileDrawing self, bool behindBlocks, Tile tileCache, ref Vector2 position, ref Rectangle liquidSize, int liquidType, ref VertexColors colors) { if (liquidType != 1) @@ -774,7 +795,7 @@ namespace CalamityMod.ILEditing } int slope = (int)tileCache.Slope; - colors = SelectLavaQuadColor(TextureAssets.LiquidSlope[liquidType].Value, ref colors, liquidType == 1); + colors = SelectLavaQuadColor(TextureAssets.LiquidSlope[liquidType].Value, ref colors, true); if (!TileID.Sets.BlocksWaterDrawingBehindSelf[tileCache.TileType] || behindBlocks || slope == 0) { Texture2D liquidTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaBlockTexture : TextureAssets.Liquid[liquidType].Value, LiquidTileType.Block); @@ -835,16 +856,29 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ldloc, 8); cursor.Emit(OpCodes.Ldloc, 3); cursor.Emit(OpCodes.Ldloc, 4); + + // Caching these values can save a LOT of overhead at runtime. + ModWaterStyle sunkenSeaWater = ModContent.GetInstance(); + ModWaterStyle sulphuricWater = ModContent.GetInstance(); + ModWaterStyle sulphuricDepthsWater = ModContent.GetInstance(); + ModWaterStyle upperAbyssWater = ModContent.GetInstance(); + ModWaterStyle middleAbyssWater = ModContent.GetInstance(); + ModWaterStyle voidWater = ModContent.GetInstance(); + cursor.EmitDelegate>((initialColor, initialTexture, liquidType, x, y) => { - initialColor = SelectLavaQuadColor(initialTexture, ref initialColor, liquidType == 1); + // Don't bother changing the color if the cached drawing style is null. + if (cachedLavaStyle != default) + { + initialColor = SelectLavaQuadColor(initialTexture, ref initialColor, liquidType == 1); + } - if (liquidType == ModContent.Find("CalamityMod/SunkenSeaWater").Slot || - liquidType == ModContent.Find("CalamityMod/SulphuricWater").Slot || - liquidType == ModContent.Find("CalamityMod/SulphuricDepthsWater").Slot || - liquidType == ModContent.Find("CalamityMod/UpperAbyssWater").Slot || - liquidType == ModContent.Find("CalamityMod/MiddleAbyssWater").Slot || - liquidType == ModContent.Find("CalamityMod/VoidWater").Slot) + if (liquidType == sunkenSeaWater.Slot || + liquidType == sulphuricWater.Slot || + liquidType == sulphuricDepthsWater.Slot || + liquidType == upperAbyssWater.Slot || + liquidType == middleAbyssWater.Slot || + liquidType == voidWater.Slot) { SelectSulphuricWaterColor(x, y, ref initialColor); } From 183a4af99a9b8a32ea4b0feb981d3f8608298e90 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 4 Jan 2024 19:51:09 -0500 Subject: [PATCH 009/197] Add a startup message for the Gimme Swag plushie campaign. --- CalPlayer/CalamityPlayer.cs | 11 +++++++++-- CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++++ Localization/en-US/Mods.CalamityMod.Misc.hjson | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index b45a489ce5..1ca3d74853 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4813,8 +4813,15 @@ namespace CalamityMod.CalPlayer if (CalamityConfig.Instance.SpeedrunTimer) CalamityMod.SpeedrunTimer.Restart(); - // Set a random delay between 12 and 20 seconds. When this delay hits zero, the music mod and wiki reminder messages display - if ((CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) || CalamityConfig.Instance.WikiStatusMessage) + // + // 04JAN2024: Ozzatron: Added a temporary message for the Gimme Swag plushie campaign. + // This message should not exist indefinitely. It is being pushed as a silent public update just for itself. + // As this message always displays and is not configurable, the previous rules about startup messages have been replaced with always-true. + // + + // Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display + bool plushieMessage = true; + if (plushieMessage || (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) || CalamityConfig.Instance.WikiStatusMessage) { startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1); } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 9338322a15..d9481c8967 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -4118,10 +4118,14 @@ namespace CalamityMod.CalPlayer CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus1"); CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2"); } + if (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) { CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.MusicModReminder"); } + + // 04JAN2024: Ozzatron: Plushie message always appears. + CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.GimmeSwagPlushieCampaign"); } --startMessageDisplayDelay; diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index e67ca338e8..e7ab97cb58 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -22,6 +22,7 @@ RecipeGroup: { WikiStatus1: "[i:Book] [c/EE4939:Note: The Fandom wiki is no longer supported by Calamity.] [i:Book]" WikiStatus2: "[i:Book] [c/EE4939:Check out the Official Calamity Mod Wiki at ][c/3989FF:calamitymod.wiki.gg][c/EE4939:!] [i:Book]" MusicModReminder: "[i:MusicBoxMartians] [c/71DFF5:Remember to also install the Calamity Music Mod to experience our soundtrack!] [i:MusicBoxMartians]" +GimmeSwagPlushieCampaign: "\n[i:GreenPresent] [c/3BE022:LIMITED TIME! Sign up for the Calamitas Plushie Campaign!] [c/3989FF:calamitymod.com/plush] [i:GreenPresent]" // Recipe Conditions Tier1ArsenalRecipeCondition: View an unencrypted schematic from the lab near the Sunken Sea Tier2ArsenalRecipeCondition: Decrypt a schematic from the lab in the large planetoid in the sky From 83b2c294be565cf14bb14514946b4798ad012392 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 4 Jan 2024 20:03:04 -0500 Subject: [PATCH 010/197] Version bump to 2.0.3.009 for Gimme Swag campaign --- build.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.txt b/build.txt index cf7f77ec52..f696702666 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 2.0.3.008 +version = 2.0.3.009 displayName = Calamity Mod homepage = https://discord.gg/calamity buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, .github\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes, Effects\Compiler\* From 96e94bc23286df7bd02230bf4bf17ecca5b555f7 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 4 Jan 2024 20:06:23 -0500 Subject: [PATCH 011/197] Add Gimme Swag campaign to workshop description --- description_workshop.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/description_workshop.txt b/description_workshop.txt index 0c12ea169a..d54f4d6e30 100644 --- a/description_workshop.txt +++ b/description_workshop.txt @@ -1,5 +1,6 @@ [h1]Calamity Mod[/h1] [url=https://discord.gg/calamity]Discord[/url] [url=https://calamitymod.wiki.gg]Official Wiki[/url] +[b]LIMITED TIME![/b] [url=https://calamitymod.com/plush]Gimme Swag Plushie Campaign[/url] The Calamity Mod is a vast content mod that creates a new and refreshing experience for Terraria! From c72940dc417e00dc1030f3e92cb5f29fa1b0788c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 4 Jan 2024 20:10:39 -0500 Subject: [PATCH 012/197] tml insisted on this alteration. ugh. --- Localization/en-US/Mods.CalamityMod.Misc.hjson | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index e7ab97cb58..ea779ddde8 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -22,7 +22,11 @@ RecipeGroup: { WikiStatus1: "[i:Book] [c/EE4939:Note: The Fandom wiki is no longer supported by Calamity.] [i:Book]" WikiStatus2: "[i:Book] [c/EE4939:Check out the Official Calamity Mod Wiki at ][c/3989FF:calamitymod.wiki.gg][c/EE4939:!] [i:Book]" MusicModReminder: "[i:MusicBoxMartians] [c/71DFF5:Remember to also install the Calamity Music Mod to experience our soundtrack!] [i:MusicBoxMartians]" -GimmeSwagPlushieCampaign: "\n[i:GreenPresent] [c/3BE022:LIMITED TIME! Sign up for the Calamitas Plushie Campaign!] [c/3989FF:calamitymod.com/plush] [i:GreenPresent]" +GimmeSwagPlushieCampaign: + ''' + + [i:GreenPresent] [c/3BE022:LIMITED TIME! Sign up for the Calamitas Plushie Campaign!] [c/3989FF:calamitymod.com/plush] [i:GreenPresent] + ''' // Recipe Conditions Tier1ArsenalRecipeCondition: View an unencrypted schematic from the lab near the Sunken Sea Tier2ArsenalRecipeCondition: Decrypt a schematic from the lab in the large planetoid in the sky From 227e3f6e63394958dd261433af3b37fb0a7774ac Mon Sep 17 00:00:00 2001 From: YataYT <151573037+YataYT@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:13:57 -0600 Subject: [PATCH 013/197] Cosmic Shiv Rework (from the person the item is dedicated to) (#19) * Rework from Yatagarasu (patreon donor for Cosmic Shiv) --------- Co-authored-by: Cameron Ewell --- Items/Weapons/Melee/CosmicShiv.cs | 8 +- Projectiles/Melee/CosmicShivAura.cs | 71 ++++++ Projectiles/Melee/CosmicShivBall.cs | 133 ---------- Projectiles/Melee/CosmicShivBlade.cs | 128 +++++----- Projectiles/Melee/CosmicShivTrail.cs | 232 ++++++++++++++++++ .../{GalaxyStar.png => CosmicShivTrail.png} | Bin Projectiles/Melee/GalaxyStar.cs | 56 ----- .../Melee/Shortswords/CosmicShivProj.cs | 78 ++++-- 8 files changed, 432 insertions(+), 274 deletions(-) create mode 100644 Projectiles/Melee/CosmicShivAura.cs delete mode 100644 Projectiles/Melee/CosmicShivBall.cs create mode 100644 Projectiles/Melee/CosmicShivTrail.cs rename Projectiles/Melee/{GalaxyStar.png => CosmicShivTrail.png} (100%) delete mode 100644 Projectiles/Melee/GalaxyStar.cs diff --git a/Items/Weapons/Melee/CosmicShiv.cs b/Items/Weapons/Melee/CosmicShiv.cs index e67e36ebfc..518e84bb8c 100644 --- a/Items/Weapons/Melee/CosmicShiv.cs +++ b/Items/Weapons/Melee/CosmicShiv.cs @@ -20,16 +20,16 @@ namespace CalamityMod.Items.Weapons.Melee Item.noUseGraphic = true; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Rapier; - Item.damage = 98; + Item.damage = 300; Item.DamageType = DamageClass.Melee; - Item.useAnimation = Item.useTime = 18; + Item.useAnimation = Item.useTime = 38; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 2.4f; Item.knockBack = 9f; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.rare = ModContent.RarityType(); - Item.Calamity().donorItem = true; //Yatagarasu#0001 + Item.Calamity().donorItem = true; // revertusernamechange on Discord (Yatagarasu) } public override bool MeleePrefix() => true; @@ -43,4 +43,4 @@ namespace CalamityMod.Items.Weapons.Melee Register(); } } -} +} \ No newline at end of file diff --git a/Projectiles/Melee/CosmicShivAura.cs b/Projectiles/Melee/CosmicShivAura.cs new file mode 100644 index 0000000000..39e903edfb --- /dev/null +++ b/Projectiles/Melee/CosmicShivAura.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class CosmicShivAura : ModProjectile + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public readonly int SwordsAverageDelay = 40; + public readonly int SwordsRandomOffset = 15; + public int CurrentSwordTimer; + public NPC target; + + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 2; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 300; + } + + public override void OnSpawn(IEntitySource source) + { + if (Main.npc[(int)Projectile.ai[0]] is not null || Main.npc[(int)Projectile.ai[0]].active) + target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object + } + + // ai[0] for ID of target to follow until the end of projectile's lifespan or the target cannot be found + // ai[1] for sword timer + public override void AI() + { + // Unexist with target + if (target is null || !target.active) { + Projectile.Kill(); + } + + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; // Stay with target + + if (Projectile.ai[1] == CurrentSwordTimer) + { + Vector2 randomDirection = Main.rand.NextFloat(0, MathHelper.TwoPi).ToRotationVector2(); + randomDirection.Normalize(); + int randomDistance = Main.rand.Next(200, 426); + Vector2 spawnPos = Projectile.Center + (randomDirection * randomDistance); + Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; // Sword moves a bit slower if spawned closer, moves faster if spawned further + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.8f, Projectile.owner, randomDistance); + Projectile.ai[1] = 0; // Reset timer + CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); // Determine when next sword will spawn + } + + Projectile.ai[1]++; + } + + // The aura itself should not do contact damage + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Melee/CosmicShivBall.cs b/Projectiles/Melee/CosmicShivBall.cs deleted file mode 100644 index fcbf9b6d7a..0000000000 --- a/Projectiles/Melee/CosmicShivBall.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using CalamityMod.Buffs.DamageOverTime; - -namespace CalamityMod.Projectiles.Melee -{ - public class CosmicShivBall : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - // TODO -- Please for the love of god refactor this at some point. It is ancient. - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public NPC target = null; - public const float maxDistanceToTarget = 540f; - public bool initialized = false; - public float startingVelocityY = 0f; - public float randomAngleDelta = 0f; - public const float explosionDamageMultiplier = 1.5f; - public override void SetDefaults() - { - Projectile.width = 12; - Projectile.height = 12; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Melee; - Projectile.penetrate = 1; - Projectile.tileCollide = false; - Projectile.timeLeft = 220; - } - public override void AI() - { - if (!initialized) - { - target = Projectile.Center.ClosestNPCAt(maxDistanceToTarget); - startingVelocityY = Projectile.velocity.Y; - randomAngleDelta = Main.rand.NextFloat(0f, MathHelper.TwoPi); - initialized = true; - } - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 4f) - { - for (int i = 0; i < 3; i++) - { - int dustID = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, (float)(Projectile.direction * 2), 0f, 115, Color.White, 1.3f); - Main.dust[dustID].noGravity = true; - Main.dust[dustID].velocity *= 0f; - } - } - if (Projectile.localAI[0] % 30 == 0) // every 0.5 seconds - { - target = Projectile.Center.ClosestNPCAt(maxDistanceToTarget); - } - if (target != null) - { - float inertia = 35f; - float homingSpeed = 33.5f; - Vector2 idealVelocity = Projectile.SafeDirectionTo(target.Center, Vector2.UnitX) * homingSpeed; - Projectile.velocity = (Projectile.velocity * (inertia - 1f) + idealVelocity) / inertia; - } - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - // for spawning the side beams - for (int i = 0; i < 2; i++) - { - int directionSign = Main.rand.NextBool().ToDirectionInt(); - Vector2 spawnPos = new Vector2(target.Center.X + directionSign * 650, Projectile.Center.Y + Main.rand.Next(-500, 501)); - Vector2 velocity = Vector2.Normalize(target.Center - spawnPos) * 30f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), Projectile.knockBack * 0.1f, Projectile.owner); - } - int starMax = Main.rand.Next(6, 11); // 6 to 10 stars - for (int i = -starMax / 2; i < starMax / 2; i++) - { - int ySpawnAdditive = Main.rand.Next(-40, 41); - Vector2 toSpawn = target.Center - new Vector2(0f, 800f + ySpawnAdditive).RotatedBy(MathHelper.ToRadians(i * 11f / starMax)); - Vector2 toTarget = Vector2.Normalize(target.Center - toSpawn) * 35f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), toSpawn, toTarget, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner); - } - target.AddBuff(ModContent.BuffType(), 60); - } - // pretty much entirely from the Oracle circular damage code - - private void CircularDamage(float radius) - { - if (Projectile.owner != Main.myPlayer) - return; - Player owner = Main.player[Projectile.owner]; - - for (int i = 0; i < Main.npc.Length; ++i) - { - NPC target = Main.npc[i]; - if (!target.active || target.dontTakeDamage || target.friendly) - continue; - - // Shock any valid target within range. Check all four corners of their hitbox. - float d1 = Vector2.Distance(Projectile.Center, target.Hitbox.TopLeft()); - float d2 = Vector2.Distance(Projectile.Center, target.Hitbox.TopRight()); - float d3 = Vector2.Distance(Projectile.Center, target.Hitbox.BottomLeft()); - float d4 = Vector2.Distance(Projectile.Center, target.Hitbox.BottomRight()); - float dist = MathHelper.Min(d1, d2); - dist = MathHelper.Min(dist, d3); - dist = MathHelper.Min(dist, d4); - - if (dist <= radius) - { - int damage = (int)(Projectile.damage * explosionDamageMultiplier); - bool crit = Main.rand.Next(100) <= owner.GetCritChance() + 4; - target.StrikeNPC(target.CalculateHitInfo(damage, 0, crit, 0)); - - if (Main.netMode != NetmodeID.SinglePlayer) - NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, i, damage, 0f, 0f, crit ? 1 : 0, 0, 0); - } - } - } - public override void OnKill(int timeLeft) - { - // mostly from AstralCrystal kill code - float rand2PI = Main.rand.NextFloat(MathHelper.TwoPi); - int petalCount = 5; - float speed = 12f; - float scale = Main.rand.NextFloat(1f, 1.35f); - for (float k = 0f; k < MathHelper.TwoPi; k += 0.05f) - { - Vector2 velocity = k.ToRotationVector2() * (2f + (float)(Math.Sin((double)(rand2PI + k * (float)petalCount)) + 1.0) * speed) * Main.rand.NextFloat(0.95f, 1.05f); - Dust dust = Dust.NewDustPerfect(Projectile.Center, 173, new Vector2?(velocity), 0, default, scale); - dust.customData = 0.025f; - } - CircularDamage(80f); - } - } -} diff --git a/Projectiles/Melee/CosmicShivBlade.cs b/Projectiles/Melee/CosmicShivBlade.cs index 092bf4affe..29b208bbbe 100644 --- a/Projectiles/Melee/CosmicShivBlade.cs +++ b/Projectiles/Melee/CosmicShivBlade.cs @@ -4,96 +4,100 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework.Graphics; +using Terraria.GameContent; +using Terraria.DataStructures; +using Newtonsoft.Json.Linq; +using Terraria.Graphics.Shaders; +using Terraria.Graphics; namespace CalamityMod.Projectiles.Melee { public class CosmicShivBlade : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public const int penetrateMax = 12; - public const float maxScale = 1.8f; - public bool initialized = false; - public float startYVelSign = 0f; + public Vector2 StartPosition = Vector2.Zero; + public int ColorIndex = 0; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + } + public override void SetDefaults() { Projectile.width = 42; Projectile.height = 42; Projectile.friendly = true; - Projectile.penetrate = penetrateMax; + Projectile.penetrate = 5; Projectile.tileCollide = false; - Projectile.timeLeft = 290; + Projectile.timeLeft = 6000; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 7; + Projectile.localNPCHitCooldown = -1; + Projectile.extraUpdates = 2; + Projectile.alpha = 0; + Projectile.scale = 1.2f; } + + public override void OnSpawn(IEntitySource source) + { + StartPosition = Projectile.position; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + ColorIndex = Main.rand.Next(0, CosmicShivTrail.DustColors.Count); + } + public override void AI() { - if (!initialized) - { - startYVelSign = (float)Math.Sign(Projectile.velocity.Y) * 0.35f; - initialized = true; - } - if (Projectile.penetrate == penetrateMax && Projectile.timeLeft < 245) - { - Projectile.velocity.Y -= startYVelSign; //arc on the X axis (the amount of pressure on this tiny detail made me want to tear my head off) - if (Math.Abs(Projectile.velocity.X) < 30f) - { - Projectile.velocity.X *= 1.04f; - } - } - if (Projectile.velocity.Length() != 0) - { - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.Pi / 4; - } - else - { - Projectile.rotation += MathHelper.Pi / 6f / (Projectile.scale * 2.5f); - } - Projectile.ai[0]++; - if (Projectile.ai[1] >= 0) - { - Projectile.ai[1]--; - if (Projectile.ai[1] == 0) - { - Projectile.velocity *= -0.9f; - } - } + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + + if (Projectile.Distance(StartPosition) > Projectile.ai[0] * 2) + Projectile.Kill(); + + Lighting.AddLight(Projectile.Center, Projectile.GetAlpha(Color.White).ToVector3() * 0.2f); } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - Projectile.scale += (maxScale - 1) / (float)penetrateMax; - Projectile.ai[1] = 5 + Main.rand.Next(-2, 3); target.AddBuff(ModContent.BuffType(), 120); } + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Rectangle sourceRectangle = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = sourceRectangle.Size() / 2f; + float rotation = Projectile.rotation; + Color randomColor = Projectile.GetAlpha(lightColor); + + float scaleMult = 1.2f; + for (int i = 0; i < Projectile.oldPos.Length; i++) // Afterimages to make the blade look longer + { + Vector2 drawPos = Projectile.oldPos[i] + (Projectile.Size / 2f) - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color color = randomColor * ((float)(Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); + Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color, rotation, origin, Projectile.scale * scaleMult, SpriteEffects.None, 0f); // Smaller, more visible layer + Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color * 0.5f, rotation, origin, Projectile.scale * 1.6f * scaleMult, SpriteEffects.None, 0f); // Bigger, less visible layer + scaleMult *= 0.95f; + } + + return false; + } + public override void OnKill(int timeLeft) { - Vector2 randomCirclePointVector = Vector2.One.RotatedByRandom(MathHelper.ToRadians(32f)); - float lerpStart = (float)Main.rand.Next(12, 17); - float lerpEnd = (float)Main.rand.Next(3, 7); - for (float i = 0; i < 9f; ++i) + for (int i = 0; i < 6; i++) { - for (int j = 0; j < 2; ++j) - { - Vector2 randomCirclePointRotated = randomCirclePointVector.RotatedBy((j == 0 ? 1 : -1) * MathHelper.TwoPi / 18); - for (float k = 0f; k < 20f; ++k) - { - Vector2 randomCirclePointLerped = Vector2.Lerp(randomCirclePointVector, randomCirclePointRotated, k / 20f); - float lerpMultiplier = MathHelper.Lerp(lerpStart, lerpEnd, k / 20f) * 4f; - int dustIndex = Dust.NewDust(Projectile.Center, 0, 0, - 173, - 0f, 0f, 100, default, 1.1f); - Main.dust[dustIndex].velocity *= 0.1f; - Main.dust[dustIndex].noGravity = true; - Main.dust[dustIndex].velocity += randomCirclePointLerped * lerpMultiplier; - } - } - - randomCirclePointVector = randomCirclePointVector.RotatedBy(MathHelper.TwoPi / 9); + Dust dust = Dust.NewDustDirect(Projectile.Center, Projectile.width, Projectile.height, DustID.RainbowMk2, 0f, 0f, 0, Projectile.GetAlpha(Color.Purple) * 0.4f, 1.5f); + dust.noGravity = true; } } - public override Color? GetAlpha(Color lightColor) + + public override Color? GetAlpha(Color lightColor) // Probably not the right way to use this function, but it works (hopefully) { - return new Color(124, Main.DiscoG, 255, Projectile.alpha); + Color color = CosmicShivTrail.DustColors[ColorIndex] * Projectile.Opacity; + color = Color.Lerp(color, Color.White, 0.6f); + color.A = 0; + return color; // Take random color from a list and make it more white } } } diff --git a/Projectiles/Melee/CosmicShivTrail.cs b/Projectiles/Melee/CosmicShivTrail.cs new file mode 100644 index 0000000000..01c7d802d6 --- /dev/null +++ b/Projectiles/Melee/CosmicShivTrail.cs @@ -0,0 +1,232 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Buffs.DamageOverTime; +using System.Collections.Generic; +using System.Security.Cryptography.X509Certificates; +using System.Reflection.Metadata; +using Microsoft.Xna.Framework.Graphics; +using System.Diagnostics.Contracts; +using Terraria.GameContent; +using Terraria.Audio; + +namespace CalamityMod.Projectiles.Melee +{ + public class CosmicShivTrail : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + + public NPC target = null; + public const float MaxDistanceToTarget = 540f; + public const float ExplosionDamageMultiplier = 2f; + public const int FadeInTime = 12; + + public static List DustColors = new List + { + new Color(69, 69, 222), + new Color(99, 66, 212), + new Color(130, 64, 214), + new Color(154, 75, 219), + new Color(165, 62, 201) + }; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = 24; + Projectile.height = 24; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Melee; + Projectile.penetrate = 1; + Projectile.tileCollide = false; + Projectile.timeLeft = 220; + Projectile.scale = 0.7f; + Projectile.Opacity = 0f; + Projectile.extraUpdates = 1; + } + + public override void AI() + { + int QuarterSpriteWidth = 48 / 3; + int QuarterSpriteHeight = 48 / 3; + + int QuarterProjWidth = Projectile.width / 3; + int QuarterProjHeight = Projectile.height / 3; + + DrawOriginOffsetX = 0; + DrawOffsetX = -(QuarterSpriteWidth - QuarterProjWidth); + DrawOriginOffsetY = -(QuarterSpriteHeight - QuarterProjHeight); + + + Lighting.AddLight(Projectile.Center, Projectile.GetAlpha(Color.White).ToVector3()); + + Projectile.rotation += Utils.GetLerpValue(-8f, 12f, Projectile.velocity.Length(), clamped: true); + + if (Projectile.ai[0] > 2f) // After two frames + { + Projectile.Opacity = Utils.GetLerpValue(2f, FadeInTime, Projectile.ai[0], clamped: true); // Fade in + + if (Main.rand.Next(0, 2) == 0) // Dust trail + { + float scale = Main.rand.NextFloat(1.6f, 2.1f); + Color randomColor = DustColors[Main.rand.Next(0, DustColors.Count)]; + Dust dust = Dust.NewDustDirect(Projectile.position, 1, 1, DustID.RainbowMk2, 0, 0, 255, randomColor * 0.6f, scale); + dust.noGravity = true; + } + } + + if (Projectile.ai[0] % 30 == 16) // every 0.25 seconds, starting 8 frames later (extraUpdates = 1 so the values are doubled) + { + target = Projectile.Center.ClosestNPCAt(MaxDistanceToTarget); + } + + if (target is not null) + { + Vector2 targetVelocity = (target.Center - Projectile.Center).SafeNormalize(Vector2.Zero); + + float multiplier = Projectile.velocity.Length() < 4f ? Projectile.velocity.Length() + 1f : 1f; // Probably a better way to do this, but just a bandaid fix for if the trail velocity ends up being low + targetVelocity *= Projectile.velocity.Length() + multiplier; + + Projectile.velocity = Vector2.Lerp(Projectile.velocity, targetVelocity, 0.12f); + } + + // lifespan timer + Projectile.ai[0]++; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + // Summons invisible aura that sticks to enemies, spawning blades + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, target.whoAmI); + target.AddBuff(ModContent.BuffType(), 60); + } + + // pretty much entirely from the Oracle circular damage code + private void CircularDamage(float radius) + { + if (Projectile.owner != Main.myPlayer) + return; + Player owner = Main.player[Projectile.owner]; + + for (int i = 0; i < Main.npc.Length; ++i) + { + NPC target = Main.npc[i]; + if (!target.active || target.dontTakeDamage || target.friendly) + continue; + + // Shock any valid target within range. Check all four corners of their hitbox. + float d1 = Vector2.Distance(Projectile.Center, target.Hitbox.TopLeft()); + float d2 = Vector2.Distance(Projectile.Center, target.Hitbox.TopRight()); + float d3 = Vector2.Distance(Projectile.Center, target.Hitbox.BottomLeft()); + float d4 = Vector2.Distance(Projectile.Center, target.Hitbox.BottomRight()); + float dist = MathHelper.Min(d1, d2); + dist = MathHelper.Min(dist, d3); + dist = MathHelper.Min(dist, d4); + + if (dist <= radius) + { + int damage = (int)(Projectile.damage * ExplosionDamageMultiplier); + bool crit = Main.rand.Next(100) <= owner.GetCritChance() + 4; + target.StrikeNPC(target.CalculateHitInfo(damage, 0, crit, 0)); + + if (Main.netMode != NetmodeID.SinglePlayer) + NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, i, damage, 0f, 0f, crit ? 1 : 0, 0, 0); + } + } + } + + // Very similar to CosmicShivBlade PreDraw + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Rectangle sourceRectangle = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Vector2 origin = sourceRectangle.Size() / 2f; + float rotation = Projectile.rotation; + Color color = Projectile.GetAlpha(Color.White); + float scaleMult = 1f; + + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + Vector2 drawPos = Projectile.oldPos[i] + (Projectile.Size / 2f) - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + color *= ((float)(Projectile.oldPos.Length - (i / 4)) / (float)Projectile.oldPos.Length); + Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color * 0.4f, rotation * -1f, origin, Projectile.scale * 1.8f * scaleMult, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color, rotation, origin, Projectile.scale * scaleMult, SpriteEffects.None, 0f); + scaleMult *= 0.9f; + } + + return false; + + } + + // Lots of trig here, use desmos to comprehend its full power + public override void OnKill(int timeLeft) + { + float rand2PI = Main.rand.NextFloat(0, MathHelper.TwoPi); // Random rotation offset + int rosePetalCount = Main.rand.Next(5, 8); + int bigWavyPetalCount = Main.rand.Next(7, 11); + int wavyPetalCount = Main.rand.Next(6, 10); + float speed = Main.rand.Next(6, 11); // Size + + int rand = Main.rand.Next(0, 10); // 10% chance rose, 10% chance big wavy shape, and 80% chance small undetail wavy shape + if (rand == 0) { + for (float k = 0f; k < MathHelper.TwoPi; k += 0.03f) + { + float scale = Main.rand.NextFloat(1.1f, 1.4f); + float randomWhitingValue = Main.rand.NextFloat(0.0f, 0.2f); + Color color = Color.Lerp(DustColors[Main.rand.Next(0, DustColors.Count)], Color.White, randomWhitingValue); + + Vector2 velocity = k.ToRotationVector2() * (2f + (float)(Math.Sin((double)(rand2PI + k * (float)rosePetalCount)) + 1.0) * speed) * Main.rand.NextFloat(0.95f, 1.05f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, new Vector2?(velocity), 0, color, scale); + dust.noGravity = true; + dust.fadeIn = -1f; + + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, new Vector2?(velocity) * 0.75f, 0, color, scale); + dust2.noGravity = true; + dust2.fadeIn = -1f; + } + } else if (rand == 1) { + for (float k = 0f; k < MathHelper.TwoPi; k += 0.08f) + { + float scale = Main.rand.NextFloat(1.2f, 1.6f); + float randomWhitingValue = Main.rand.NextFloat(0.0f, 0.2f); + Color color = Color.Lerp(DustColors[Main.rand.Next(0, DustColors.Count)], Color.White, randomWhitingValue); + + Vector2 velocity = k.ToRotationVector2() * (float)(Math.Cos((double)(k * (float)bigWavyPetalCount) + rand2PI) + 5.1f) * speed / 4; + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, new Vector2?(velocity), 0, color, scale); + dust.noGravity = true; + dust.fadeIn = -1f; + + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, new Vector2?(velocity) * 0.75f, 0, color, scale); + dust2.noGravity = true; + dust2.fadeIn = -1f; + } + } else { + for (float k = 0f; k < MathHelper.TwoPi; k += 0.2f) + { + float scale = Main.rand.NextFloat(1f, 1.2f); + float randomWhitingValue = Main.rand.NextFloat(0.5f, 0.7f); + Color color = Color.Lerp(DustColors[Main.rand.Next(0, DustColors.Count)], Color.White, randomWhitingValue); + + Vector2 velocity = k.ToRotationVector2() * (0.4f * (float)(Math.Sin((double)(k * (float)wavyPetalCount) + rand2PI) + 2.1f) * (speed / 2)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, new Vector2?(velocity), 0, color * 0.3f, scale); + dust.noGravity = true; + dust.fadeIn = -1f; + } + } + + CircularDamage(80f); + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(238, 171, 255, 25) * Projectile.Opacity; + } + } +} diff --git a/Projectiles/Melee/GalaxyStar.png b/Projectiles/Melee/CosmicShivTrail.png similarity index 100% rename from Projectiles/Melee/GalaxyStar.png rename to Projectiles/Melee/CosmicShivTrail.png diff --git a/Projectiles/Melee/GalaxyStar.cs b/Projectiles/Melee/GalaxyStar.cs deleted file mode 100644 index 6fffa74c23..0000000000 --- a/Projectiles/Melee/GalaxyStar.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; - -namespace CalamityMod.Projectiles.Melee -{ - public class GalaxyStar : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public bool madeCoolMagicSound = false; - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = 42; - Projectile.height = 42; - Projectile.friendly = true; - Projectile.penetrate = 1; - Projectile.tileCollide = false; - Projectile.timeLeft = 160; - Projectile.extraUpdates = 2; - } - public override void AI() - { - Lighting.AddLight(Projectile.Center, 1f, 1f, 1f); - if (!madeCoolMagicSound) - { - SoundEngine.PlaySound(SoundID.Item9, Projectile.position); // Starfury sound - madeCoolMagicSound = true; - } - Projectile.ai[0]++; - if (Projectile.ai[0] % 5 == 0) - { - for (int i = 0; i < Main.rand.Next(2, 4); i++) //2-3 stars - { - Vector2 randVector = Vector2.One.RotatedByRandom(Math.PI * 2.0) * 0.7f; - Dust.NewDust(Projectile.Center, 4, 4, 58, randVector.X, randVector.Y, 0, default, 1f); - } - } - Projectile.rotation += Projectile.velocity.Length() / 19f; - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); - return false; - } - } -} diff --git a/Projectiles/Melee/Shortswords/CosmicShivProj.cs b/Projectiles/Melee/Shortswords/CosmicShivProj.cs index 6ca1318dc8..a22c6cb94b 100644 --- a/Projectiles/Melee/Shortswords/CosmicShivProj.cs +++ b/Projectiles/Melee/Shortswords/CosmicShivProj.cs @@ -1,9 +1,14 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -14,6 +19,8 @@ namespace CalamityMod.Projectiles.Melee.Shortswords { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/CosmicShiv"; + public bool MeleeEffect = false; + public int NumHits = 0; public override void SetDefaults() { @@ -29,12 +36,12 @@ namespace CalamityMod.Projectiles.Melee.Shortswords Projectile.hide = true; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; + Projectile.localNPCHitCooldown = -1; } public override Action EffectBeforePullback => (proj) => { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 14f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 3f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); }; public override void SetVisualOffsets() @@ -50,31 +57,64 @@ namespace CalamityMod.Projectiles.Melee.Shortswords DrawOriginOffsetY = -(HalfSpriteHeight - HalfProjHeight); } - public override void ExtraBehavior() - { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 173); - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - for (int k = 0; k < 36; k++) - { - int dustID = Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height -16, 173, 0f, 0f, 0, default, 1f); - Main.dust[dustID].velocity *= 3f; - Main.dust[dustID].scale *= 2f; + OnHitEffect(); + + if (NumHits < 3) { // Just to avoid insanity from stacking so many super dummies or hitting many worm segments at once + // 2x bonus for true melee hits (spawns an additional aura plus the one aura from the cosmic shiv ball) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, target.whoAmI); + NumHits++; } - target.AddBuff(ModContent.BuffType(), 120); + + target.AddBuff(ModContent.BuffType(), 240); } public override void OnHitPlayer(Player target, Player.HurtInfo info) { - for (int k = 0; k < 36; k++) + OnHitEffect(); + + target.AddBuff(ModContent.BuffType(), 240); + } + + public void OnHitEffect() + { + float rand2PI = Main.rand.NextFloat(MathHelper.TwoPi); // Random rotation offset + int petalCount = Main.rand.Next(5, 8); // Number of star points + float speed = Main.rand.Next(18, 24); // Size of star + + // Bool check so it only performs this effect once per strike, at a 50% chance + if (!MeleeEffect && Main.rand.NextBool()) { - int dustID = Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height - 16, 173, 0f, 0f, 0, default, 1f); - Main.dust[dustID].velocity *= 3f; - Main.dust[dustID].scale *= 2f; + for (float k = 0f; k < MathHelper.TwoPi; k += 0.08f) + { + float scale = Main.rand.NextFloat(1.5f, 1.9f); + float randomWhitingValue = Main.rand.NextFloat(0.0f, 0.2f); + Color color = Color.Lerp(CosmicShivTrail.DustColors[Main.rand.Next(0, CosmicShivTrail.DustColors.Count)], Color.White, randomWhitingValue); // Just for even more variety in colors idk + Vector2 velocity = StarPolarEquation(petalCount, k, rand2PI) * speed * 2; + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, velocity, 0, color, scale); + dust.noGravity = true; + dust.fadeIn = -1f; // I don't know if this does anything but it looks like the dust fades out faster with this + + Vector2 velocity2 = StarPolarEquation(petalCount, k - 0.04f, rand2PI) * speed * 2 * 0.9f; // Inner star + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB, velocity2, 0, color, scale); + dust2.noGravity = true; + dust2.fadeIn = -1f; + } } - target.AddBuff(ModContent.BuffType(), 120); + } + + public Vector2 StarPolarEquation(int pointCount, float angle, float offset) // For OnHitNPC(), Thanks Dominic + { + // There should be a star point that looks directly upward. However, that isn't the case for odd star counts with the equation below. + // To address this, a -90 degree rotation is performed. + // Refer to desmos to view the resulting shape this creates. It's basically a black box of trig otherwise. + float sqrt3 = 1.732051f; + float numerator = MathF.Cos(MathHelper.Pi * (pointCount + 1f) / pointCount); + float starAdjustedAngle = MathF.Asin(MathF.Cos(pointCount * angle + offset)) * 2f; + float denominator = MathF.Cos((starAdjustedAngle + MathHelper.PiOver2 * pointCount) / (pointCount * 2f)); + Vector2 result = angle.ToRotationVector2() * numerator / denominator / sqrt3; + return result; } } } From bb9807964b83eecac0477331eac4d691db3f861e Mon Sep 17 00:00:00 2001 From: JavyzTaken <36089970+JavyzTaken@users.noreply.github.com> Date: Wed, 17 Jan 2024 19:36:52 +0100 Subject: [PATCH 014/197] Fargo's Mutant Mod Stat Sheet support for the Rogue Class (#21) --- ModSupport/WeakReferenceSupport.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index b9b8987d39..1327f31e92 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -18,6 +18,7 @@ using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; @@ -1040,6 +1041,17 @@ namespace CalamityMod if (fargos is null) return; + // Stat Sheet support + double Damage(DamageClass damageClass) => Math.Round(Main.LocalPlayer.GetTotalDamage(damageClass).Additive * Main.LocalPlayer.GetTotalDamage(damageClass).Multiplicative * 100 - 100); + int Crit(DamageClass damageClass) => (int)Main.LocalPlayer.GetTotalCritChance(damageClass); + + int rogueItem = ModContent.ItemType(); + DamageClass rogueDamageClass = ModContent.GetInstance(); + Func rogueDamage = () => $"Rogue Damage: {Damage(rogueDamageClass)}%"; + Func rogueCrit = () => $"Rogue Critical: {Crit(rogueDamageClass)}%"; + fargos.Call("AddStat", rogueItem, rogueDamage); + fargos.Call("AddStat", rogueItem, rogueCrit); + void AddToMutantShop(string bossName, string summonItemName, Func downed, int price) { BossChecklistProgressionValues.TryGetValue(bossName, out float order); From 2d321756e5db0fb4a5471e290be4437849052cfe Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Sat, 3 Feb 2024 13:30:48 -0600 Subject: [PATCH 015/197] Fixed Spawn Blockers failing in Multiplayer --- Items/AntiCystOintment.cs | 3 +-- Items/AntiTumorOintment.cs | 3 +-- Items/BleachBall.cs | 3 +-- Items/BrokenWaterFilter.cs | 3 +-- Items/SirenproofEarMuffs.cs | 3 +-- Items/VoodooDemonVoodooDoll.cs | 3 +-- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 13 ++++++------- 7 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index 9d2273e4d0..100dc24eb2 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - if (Item.favorited) - player.Calamity().disablePerfCystSpawns = true; + player.Calamity().disablePerfCystSpawns = true; } public override void AddRecipes() diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index b1998194ee..39a580e908 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - if (Item.favorited) - player.Calamity().disableHiveCystSpawns = true; + player.Calamity().disableHiveCystSpawns = true; } public override void AddRecipes() diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index 2fef70d3d2..61da080344 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -23,8 +23,7 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - if (Item.favorited) - player.Calamity().disableNaturalScourgeSpawns = true; + player.Calamity().disableNaturalScourgeSpawns = true; } public override void AddRecipes() diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index 7bde69df31..26439460f2 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -23,8 +23,7 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - if (Item.favorited) - player.Calamity().noStupidNaturalARSpawns = true; + player.Calamity().noStupidNaturalARSpawns = true; } public override void AddRecipes() diff --git a/Items/SirenproofEarMuffs.cs b/Items/SirenproofEarMuffs.cs index f98aef4a4e..0cd7ef032c 100644 --- a/Items/SirenproofEarMuffs.cs +++ b/Items/SirenproofEarMuffs.cs @@ -23,8 +23,7 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - if (Item.favorited) - player.Calamity().disableAnahitaSpawns = true; + player.Calamity().disableAnahitaSpawns = true; } public override void AddRecipes() diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 2be133a986..261c22f228 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - if (Item.favorited) - player.Calamity().disableVoodooSpawns = true; + player.Calamity().disableVoodooSpawns = true; } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index c066cdb09a..467c33e478 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -198,32 +198,31 @@ StarlightFuelCell: { // Spawn Blockers AntiCystOintment: { DisplayName: Anti-Cyst Ointment - Tooltip: Favorite this item to prevent perforator cysts from spawning near you + Tooltip: This item prevents perforator cysts from spawning while on the inventory } AntiTumorOintment: { DisplayName: Anti-Tumor Ointment - Tooltip: Favorite this item to prevent hive tumors from spawning near you + Tooltip: This item prevents hive tumors from spawning while on the inventory } BleachBall: { DisplayName: Bleach Ball - Tooltip: Favorite this item to prevent the Aquatic Scourge from naturally spawning near you + Tooltip: This item prevents Aquatic Scourge from spawning while on the inventory } BrokenWaterFilter: { DisplayName: Broken Water Filter - Tooltip: Favorite this item to disable natural Acid Rain spawns -} + Tooltip: This item prevents Acid Rains from happening while on the inventory SirenproofEarMuffs: { DisplayName: Sirenproof Earmuffs - Tooltip: Favorite this item to prevent Anahita from spawning near you + Tooltip: This item prevents Anahita from spawning while on the inventory } VoodooDemonVoodooDoll: { DisplayName: Voodoo Demon Voodoo Doll - Tooltip: Favorite this item to prevent voodoo demons from spawning near you + Tooltip: This item prevents voodoo demons from spawning while on the inventory } // Uncategorized From 21c6efdc97c189d818ed6c30664ab44cc97b391d Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 19:17:37 -0600 Subject: [PATCH 016/197] Voodoo (needs enabled sprite) --- CalPlayer/CalamityPlayer.cs | 2 +- Items/VoodooDemonVoodooDoll.cs | 66 ++++++++++++++++++- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 7 +- 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index d05a267f4d..cf3159c438 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2126,7 +2126,7 @@ namespace CalamityMod.CalPlayer KalandraMirror = false; StellarTorus = false; - disableVoodooSpawns = false; + //disableVoodooSpawns = false; disablePerfCystSpawns = false; disableHiveCystSpawns = false; disableNaturalScourgeSpawns = false; diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 261c22f228..4f45c4ac92 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -1,18 +1,24 @@ using Terraria.ID; using Terraria; using Terraria.ModLoader; +using System.Collections.Generic; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; namespace CalamityMod.Items { public class VoodooDemonVoodooDoll : ModItem, ILocalizedModType { + public static bool state = false; public new string LocalizationCategory => "Items.Misc"; + public override void SetDefaults() { Item.width = 44; Item.height = 34; Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; + Item.consumable = false; } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) @@ -20,9 +26,65 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) + public override bool CanRightClick() => true; + + public override void RightClick(Player player) { - player.Calamity().disableVoodooSpawns = true; + if (player.Calamity().disableVoodooSpawns == true) + player.Calamity().disableVoodooSpawns = false; + else + player.Calamity().disableVoodooSpawns = true; + state = player.Calamity().disableVoodooSpawns; //Tooltip... + + bool favorited = Item.favorited; + Item.SetDefaults(ModContent.ItemType()); + Item.stack++; + Item.favorited = favorited; + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (state) + { + texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture; + + if (state) + { + texture = ModContent.Request(Texture).Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + return false; + } + + public override void ModifyTooltips(List tooltips) + { + string text; + if (state == true) + text = "Currently On"; + else + text = "Currently Off"; + tooltips.FindAndReplace("[STATE]", text); } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 467c33e478..799c7847ce 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -222,7 +222,12 @@ SirenproofEarMuffs: { VoodooDemonVoodooDoll: { DisplayName: Voodoo Demon Voodoo Doll - Tooltip: This item prevents voodoo demons from spawning while on the inventory + Tooltip: + ''' + Favorite this item to prevent voodoo demons from spawning near you + Press to toggle + [STATE] + ''' } // Uncategorized From 5e90fa584f8007293bb6710989318ee9aa274669 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 19:26:43 -0600 Subject: [PATCH 017/197] Proper Cyst treatment (I will need a bunch of sprites later) --- CalPlayer/CalamityPlayer.cs | 4 +- Items/AntiCystOintment.cs | 65 ++++++++++++++++++- Items/VoodooDemonVoodooDoll.cs | 4 +- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 9 ++- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index cf3159c438..93dffa1254 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2126,11 +2126,13 @@ namespace CalamityMod.CalPlayer KalandraMirror = false; StellarTorus = false; - //disableVoodooSpawns = false; + /* + disableVoodooSpawns = false; disablePerfCystSpawns = false; disableHiveCystSpawns = false; disableNaturalScourgeSpawns = false; disableAnahitaSpawns = false; + */ abyssalDivingSuitPrevious = abyssalDivingSuit; abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false; diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index 100dc24eb2..5814a4df13 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -1,11 +1,15 @@ using Terraria.ID; using Terraria; using Terraria.ModLoader; +using System.Collections.Generic; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; namespace CalamityMod.Items { public class AntiCystOintment : ModItem, ILocalizedModType { + public static bool state = false; public new string LocalizationCategory => "Items.Misc"; public override void SetDefaults() { @@ -20,11 +24,68 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) + public override bool CanRightClick() => true; + + public override void RightClick(Player player) { - player.Calamity().disablePerfCystSpawns = true; + if (player.Calamity().disableHiveCystSpawns == true) + player.Calamity().disableHiveCystSpawns = false; + else + player.Calamity().disableHiveCystSpawns = true; + state = player.Calamity().disableHiveCystSpawns; //Tooltip... + + bool favorited = Item.favorited; + Item.SetDefaults(ModContent.ItemType()); + Item.stack++; + Item.favorited = favorited; } + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + return false; + } + + public override void ModifyTooltips(List tooltips) + { + string text; + if (state == true) + text = "Currently On"; + else + text = "Currently Off"; + tooltips.FindAndReplace("[STATE]", text); + } public override void AddRecipes() { CreateRecipe(). diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 4f45c4ac92..09e2b58a2b 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -48,6 +48,7 @@ namespace CalamityMod.Items if (state) { + //Replace with enabled texture texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); } @@ -66,7 +67,8 @@ namespace CalamityMod.Items if (state) { - texture = ModContent.Request(Texture).Value; + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); } else diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 799c7847ce..d493ab34e9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -198,7 +198,12 @@ StarlightFuelCell: { // Spawn Blockers AntiCystOintment: { DisplayName: Anti-Cyst Ointment - Tooltip: This item prevents perforator cysts from spawning while on the inventory + Tooltip: + ''' + Toggle this item to prevent hive cysts from spawning near you + Press to toggle + [STATE] + ''' } AntiTumorOintment: { @@ -224,7 +229,7 @@ VoodooDemonVoodooDoll: { DisplayName: Voodoo Demon Voodoo Doll Tooltip: ''' - Favorite this item to prevent voodoo demons from spawning near you + Toggle this item to prevent voodoo demons from spawning near you Press to toggle [STATE] ''' From 0b2061d72a9f7b6a9034f62f6f69969a178b935e Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 19:38:57 -0600 Subject: [PATCH 018/197] Localization files --- Localization/en-US/Mods.CalamityMod.Items.Misc.hjson | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index d493ab34e9..de732e3848 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -198,12 +198,12 @@ StarlightFuelCell: { // Spawn Blockers AntiCystOintment: { DisplayName: Anti-Cyst Ointment - Tooltip: - ''' + Tooltip: + ''' Toggle this item to prevent hive cysts from spawning near you Press to toggle [STATE] - ''' + ''' } AntiTumorOintment: { @@ -219,6 +219,7 @@ BleachBall: { BrokenWaterFilter: { DisplayName: Broken Water Filter Tooltip: This item prevents Acid Rains from happening while on the inventory +} SirenproofEarMuffs: { DisplayName: Sirenproof Earmuffs From 982e51af53204d5a7e11fd2c6a21fbb1d9ee4460 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 19:43:14 -0600 Subject: [PATCH 019/197] Fixed Cyst ointment doing what Tumor Ointment was supposed to do and properly fixed Tumor Ointment --- Items/AntiCystOintment.cs | 8 +-- Items/AntiTumorOintment.cs | 66 ++++++++++++++++++- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 6 +- 3 files changed, 73 insertions(+), 7 deletions(-) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index 5814a4df13..1688a9c61b 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -28,11 +28,11 @@ namespace CalamityMod.Items public override void RightClick(Player player) { - if (player.Calamity().disableHiveCystSpawns == true) - player.Calamity().disableHiveCystSpawns = false; + if (player.Calamity().disablePerfCystSpawns == true) + player.Calamity().disablePerfCystSpawns = false; else - player.Calamity().disableHiveCystSpawns = true; - state = player.Calamity().disableHiveCystSpawns; //Tooltip... + player.Calamity().disablePerfCystSpawns = true; + state = player.Calamity().disablePerfCystSpawns; //Tooltip... bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index 39a580e908..c6e212c6b5 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -1,11 +1,15 @@ using Terraria.ID; using Terraria; using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using System.Collections.Generic; namespace CalamityMod.Items { public class AntiTumorOintment : ModItem, ILocalizedModType { + public static bool state = false; public new string LocalizationCategory => "Items.Misc"; public override void SetDefaults() { @@ -20,9 +24,67 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) + public override bool CanRightClick() => true; + + public override void RightClick(Player player) { - player.Calamity().disableHiveCystSpawns = true; + if (player.Calamity().disableHiveCystSpawns == true) + player.Calamity().disableHiveCystSpawns = false; + else + player.Calamity().disableHiveCystSpawns = true; + state = player.Calamity().disableHiveCystSpawns; //Tooltip... + + bool favorited = Item.favorited; + Item.SetDefaults(ModContent.ItemType()); + Item.stack++; + Item.favorited = favorited; + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + return false; + } + + public override void ModifyTooltips(List tooltips) + { + string text; + if (state == true) + text = "Currently On"; + else + text = "Currently Off"; + tooltips.FindAndReplace("[STATE]", text); } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index de732e3848..3e055fc763 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -208,7 +208,11 @@ AntiCystOintment: { AntiTumorOintment: { DisplayName: Anti-Tumor Ointment - Tooltip: This item prevents hive tumors from spawning while on the inventory + Tooltip:''' + Toggle this item to prevent hive tumors from spawning near you + Press to toggle + [STATE] + ''' } BleachBall: { From b02afbbb338f39c2b9bf10786461d03eb31e8cde Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 19:45:47 -0600 Subject: [PATCH 020/197] Just gonna do the localizations all at once --- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 3e055fc763..ea318ea3aa 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -208,7 +208,8 @@ AntiCystOintment: { AntiTumorOintment: { DisplayName: Anti-Tumor Ointment - Tooltip:''' + Tooltip: + ''' Toggle this item to prevent hive tumors from spawning near you Press to toggle [STATE] @@ -217,17 +218,32 @@ AntiTumorOintment: { BleachBall: { DisplayName: Bleach Ball - Tooltip: This item prevents Aquatic Scourge from spawning while on the inventory + Tooltip: + ''' + Toggle this item to prevent Aquatic Scourge from spawning + Press to toggle + [STATE] + ''' } BrokenWaterFilter: { DisplayName: Broken Water Filter - Tooltip: This item prevents Acid Rains from happening while on the inventory + Tooltip: + ''' + Toggle this item to prevent Acid Rain from occurring + Press to toggle + [STATE] + ''' } SirenproofEarMuffs: { DisplayName: Sirenproof Earmuffs - Tooltip: This item prevents Anahita from spawning while on the inventory + Tooltip: + ''' + Toggle this item to prevent Anahita from spawning + Press to toggle + [STATE] + ''' } VoodooDemonVoodooDoll: { From 852f958b5241ec2eb5cd2a4c0d3aecaaf1b676f6 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 19:59:10 -0600 Subject: [PATCH 021/197] Bleach Volley Ball Also fixed having multiple of the same item having only the right clicked one actually reflect the change --- Items/AntiCystOintment.cs | 6 ++- Items/AntiTumorOintment.cs | 6 ++- Items/BleachBall.cs | 68 +++++++++++++++++++++++++++++++++- Items/VoodooDemonVoodooDoll.cs | 6 ++- 4 files changed, 82 insertions(+), 4 deletions(-) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index 1688a9c61b..a561547532 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -24,6 +24,11 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } + public override void UpdateInventory(Player player) + { + state = player.Calamity().disablePerfCystSpawns; //So that any item of this type always has the proper flag for use in the tooltip + } + public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -32,7 +37,6 @@ namespace CalamityMod.Items player.Calamity().disablePerfCystSpawns = false; else player.Calamity().disablePerfCystSpawns = true; - state = player.Calamity().disablePerfCystSpawns; //Tooltip... bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index c6e212c6b5..31eb6eb2cf 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -24,6 +24,11 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } + public override void UpdateInventory(Player player) + { + state = player.Calamity().disableHiveCystSpawns; //So that any item of this type always has the proper flag for use in the tooltip + } + public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -32,7 +37,6 @@ namespace CalamityMod.Items player.Calamity().disableHiveCystSpawns = false; else player.Calamity().disableHiveCystSpawns = true; - state = player.Calamity().disableHiveCystSpawns; //Tooltip... bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index 61da080344..6a1ec8eaf1 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -2,11 +2,15 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using System.Collections.Generic; namespace CalamityMod.Items { public class BleachBall : ModItem, ILocalizedModType { + public static bool state = false; public new string LocalizationCategory => "Items.Misc"; public override void SetDefaults() { @@ -23,7 +27,69 @@ namespace CalamityMod.Items public override void UpdateInventory(Player player) { - player.Calamity().disableNaturalScourgeSpawns = true; + state = player.Calamity().disableNaturalScourgeSpawns; //So that any item of this type always has the proper flag for use in the tooltip + } + + public override bool CanRightClick() => true; + + public override void RightClick(Player player) + { + if (player.Calamity().disableNaturalScourgeSpawns == true) + player.Calamity().disableNaturalScourgeSpawns = false; + else + player.Calamity().disableNaturalScourgeSpawns = true; + + bool favorited = Item.favorited; + Item.SetDefaults(ModContent.ItemType()); + Item.stack++; + Item.favorited = favorited; + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + return false; + } + + public override void ModifyTooltips(List tooltips) + { + string text; + if (state == true) + text = "Currently On"; + else + text = "Currently Off"; + tooltips.FindAndReplace("[STATE]", text); } public override void AddRecipes() diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 09e2b58a2b..9fddd8c770 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -26,6 +26,11 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } + public override void UpdateInventory(Player player) + { + state = player.Calamity().disableVoodooSpawns; //So that any item of this type always has the proper flag for use in the tooltip + } + public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -34,7 +39,6 @@ namespace CalamityMod.Items player.Calamity().disableVoodooSpawns = false; else player.Calamity().disableVoodooSpawns = true; - state = player.Calamity().disableVoodooSpawns; //Tooltip... bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); From 1fdedc9e8c2c4c5755e735a3f7ec281dd2f0ded3 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 20:08:45 -0600 Subject: [PATCH 022/197] Nvm that second bugfx was actually an oversight on my part Fixed Bleach Ball showing up as Tumor ointment in the overworld --- Items/AntiCystOintment.cs | 6 +----- Items/AntiTumorOintment.cs | 6 +----- Items/BleachBall.cs | 10 +++------- Items/VoodooDemonVoodooDoll.cs | 7 +------ .../en-US/Mods.CalamityMod.Items.Misc.hjson | 14 +++++++------- 5 files changed, 13 insertions(+), 30 deletions(-) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index a561547532..cb28dad371 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -24,11 +24,6 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) - { - state = player.Calamity().disablePerfCystSpawns; //So that any item of this type always has the proper flag for use in the tooltip - } - public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -37,6 +32,7 @@ namespace CalamityMod.Items player.Calamity().disablePerfCystSpawns = false; else player.Calamity().disablePerfCystSpawns = true; + state = player.Calamity().disablePerfCystSpawns; bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index 31eb6eb2cf..ccc496ddab 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -24,11 +24,6 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) - { - state = player.Calamity().disableHiveCystSpawns; //So that any item of this type always has the proper flag for use in the tooltip - } - public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -37,6 +32,7 @@ namespace CalamityMod.Items player.Calamity().disableHiveCystSpawns = false; else player.Calamity().disableHiveCystSpawns = true; + state = player.Calamity().disableHiveCystSpawns; bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index 6a1ec8eaf1..4aa398d5d6 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -25,11 +25,6 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) - { - state = player.Calamity().disableNaturalScourgeSpawns; //So that any item of this type always has the proper flag for use in the tooltip - } - public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -38,6 +33,7 @@ namespace CalamityMod.Items player.Calamity().disableNaturalScourgeSpawns = false; else player.Calamity().disableNaturalScourgeSpawns = true; + state = player.Calamity().disableNaturalScourgeSpawns; bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); @@ -71,12 +67,12 @@ namespace CalamityMod.Items if (state) { //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); } else { - texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; + texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); } return false; diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 9fddd8c770..ca4aa3cbf5 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -26,11 +26,6 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) - { - state = player.Calamity().disableVoodooSpawns; //So that any item of this type always has the proper flag for use in the tooltip - } - public override bool CanRightClick() => true; public override void RightClick(Player player) @@ -39,7 +34,7 @@ namespace CalamityMod.Items player.Calamity().disableVoodooSpawns = false; else player.Calamity().disableVoodooSpawns = true; - + state = player.Calamity().disableVoodooSpawns; bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); Item.stack++; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index ea318ea3aa..263512ea28 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -209,7 +209,7 @@ AntiCystOintment: { AntiTumorOintment: { DisplayName: Anti-Tumor Ointment Tooltip: - ''' + ''' Toggle this item to prevent hive tumors from spawning near you Press to toggle [STATE] @@ -218,8 +218,8 @@ AntiTumorOintment: { BleachBall: { DisplayName: Bleach Ball - Tooltip: - ''' + Tooltip: + ''' Toggle this item to prevent Aquatic Scourge from spawning Press to toggle [STATE] @@ -228,8 +228,8 @@ BleachBall: { BrokenWaterFilter: { DisplayName: Broken Water Filter - Tooltip: - ''' + Tooltip: + ''' Toggle this item to prevent Acid Rain from occurring Press to toggle [STATE] @@ -238,8 +238,8 @@ BrokenWaterFilter: { SirenproofEarMuffs: { DisplayName: Sirenproof Earmuffs - Tooltip: - ''' + Tooltip: + ''' Toggle this item to prevent Anahita from spawning Press to toggle [STATE] From 6e95a8a6523cd0f0466ec6949ed25b9740244916 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 5 Feb 2024 20:22:19 -0600 Subject: [PATCH 023/197] the last 2 --- Items/BrokenWaterFilter.cs | 66 ++++++++++++++++++++++++++++++++++-- Items/SirenproofEarMuffs.cs | 67 +++++++++++++++++++++++++++++++++++-- 2 files changed, 128 insertions(+), 5 deletions(-) diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index 26439460f2..4f8e9b7b5d 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -2,11 +2,15 @@ using Terraria.ID; using Terraria; using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using System.Collections.Generic; namespace CalamityMod.Items { public class BrokenWaterFilter : ModItem, ILocalizedModType { + public static bool state = false; public new string LocalizationCategory => "Items.Misc"; public override void SetDefaults() { @@ -21,9 +25,67 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) + public override bool CanRightClick() => true; + + public override void RightClick(Player player) { - player.Calamity().noStupidNaturalARSpawns = true; + if (player.Calamity().disableAnahitaSpawns == true) + player.Calamity().disableAnahitaSpawns = false; + else + player.Calamity().disableAnahitaSpawns = true; + state = player.Calamity().disableAnahitaSpawns; + + bool favorited = Item.favorited; + Item.SetDefaults(ModContent.ItemType()); + Item.stack++; + Item.favorited = favorited; + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + return false; + } + + public override void ModifyTooltips(List tooltips) + { + string text; + if (state == true) + text = "Currently On"; + else + text = "Currently Off"; + tooltips.FindAndReplace("[STATE]", text); } public override void AddRecipes() diff --git a/Items/SirenproofEarMuffs.cs b/Items/SirenproofEarMuffs.cs index 0cd7ef032c..e7450b35b8 100644 --- a/Items/SirenproofEarMuffs.cs +++ b/Items/SirenproofEarMuffs.cs @@ -1,12 +1,15 @@ using Terraria.ID; using Terraria; using Terraria.ModLoader; -using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using System.Collections.Generic; namespace CalamityMod.Items { public class SirenproofEarMuffs : ModItem, ILocalizedModType { + public static bool state = false; public new string LocalizationCategory => "Items.Misc"; public override void SetDefaults() { @@ -21,9 +24,67 @@ namespace CalamityMod.Items itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention; } - public override void UpdateInventory(Player player) + public override bool CanRightClick() => true; + + public override void RightClick(Player player) { - player.Calamity().disableAnahitaSpawns = true; + if (player.Calamity().disableAnahitaSpawns == true) + player.Calamity().disableAnahitaSpawns = false; + else + player.Calamity().disableAnahitaSpawns = true; + state = player.Calamity().disableAnahitaSpawns; + + bool favorited = Item.favorited; + Item.SetDefaults(ModContent.ItemType()); + Item.stack++; + Item.favorited = favorited; + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture; + + if (state) + { + //Replace with enabled texture + texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + return false; + } + + public override void ModifyTooltips(List tooltips) + { + string text; + if (state == true) + text = "Currently On"; + else + text = "Currently Off"; + tooltips.FindAndReplace("[STATE]", text); } public override void AddRecipes() From 967dcfdb2d94d33832bec22c9cd9d1db7d6a234d Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Tue, 6 Feb 2024 13:39:25 -0600 Subject: [PATCH 024/197] Fixes to Broken filter and proper localization --- Items/AntiCystOintment.cs | 5 +++-- Items/AntiTumorOintment.cs | 5 +++-- Items/BleachBall.cs | 5 +++-- Items/BrokenWaterFilter.cs | 13 +++++++------ Items/SirenproofEarMuffs.cs | 5 +++-- Items/VoodooDemonVoodooDoll.cs | 5 +++-- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 3 +++ 7 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index cb28dad371..e08f3dc823 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items { @@ -81,9 +82,9 @@ namespace CalamityMod.Items { string text; if (state == true) - text = "Currently On"; + text = GetTextValue("Items.Misc.SpawnBlockersOn"); else - text = "Currently Off"; + text = GetTextValue("Items.Misc.SpawnBlockersOff"); tooltips.FindAndReplace("[STATE]", text); } public override void AddRecipes() diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index ccc496ddab..48b31cd9a0 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; using System.Collections.Generic; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items { @@ -81,9 +82,9 @@ namespace CalamityMod.Items { string text; if (state == true) - text = "Currently On"; + text = GetTextValue("Items.Misc.SpawnBlockersOn"); else - text = "Currently Off"; + text = GetTextValue("Items.Misc.SpawnBlockersOff"); tooltips.FindAndReplace("[STATE]", text); } diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index 4aa398d5d6..faa445f07b 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; using System.Collections.Generic; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items { @@ -82,9 +83,9 @@ namespace CalamityMod.Items { string text; if (state == true) - text = "Currently On"; + text = GetTextValue("Items.Misc.SpawnBlockersOn"); else - text = "Currently Off"; + text = GetTextValue("Items.Misc.SpawnBlockersOff"); tooltips.FindAndReplace("[STATE]", text); } diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index 4f8e9b7b5d..f143e390c0 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; using System.Collections.Generic; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items { @@ -29,11 +30,11 @@ namespace CalamityMod.Items public override void RightClick(Player player) { - if (player.Calamity().disableAnahitaSpawns == true) - player.Calamity().disableAnahitaSpawns = false; + if (player.Calamity().noStupidNaturalARSpawns == true) + player.Calamity().noStupidNaturalARSpawns = false; else - player.Calamity().disableAnahitaSpawns = true; - state = player.Calamity().disableAnahitaSpawns; + player.Calamity().noStupidNaturalARSpawns = true; + state = player.Calamity().noStupidNaturalARSpawns; bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); @@ -82,9 +83,9 @@ namespace CalamityMod.Items { string text; if (state == true) - text = "Currently On"; + text = GetTextValue("Items.Misc.SpawnBlockersOn"); else - text = "Currently Off"; + text = GetTextValue("Items.Misc.SpawnBlockersOff"); tooltips.FindAndReplace("[STATE]", text); } diff --git a/Items/SirenproofEarMuffs.cs b/Items/SirenproofEarMuffs.cs index e7450b35b8..8b6c27122a 100644 --- a/Items/SirenproofEarMuffs.cs +++ b/Items/SirenproofEarMuffs.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; using System.Collections.Generic; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items { @@ -81,9 +82,9 @@ namespace CalamityMod.Items { string text; if (state == true) - text = "Currently On"; + text = GetTextValue("Items.Misc.SpawnBlockersOn"); else - text = "Currently Off"; + text = GetTextValue("Items.Misc.SpawnBlockersOff"); tooltips.FindAndReplace("[STATE]", text); } diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index ca4aa3cbf5..87e20e01a8 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items { @@ -82,9 +83,9 @@ namespace CalamityMod.Items { string text; if (state == true) - text = "Currently On"; + text = GetTextValue("Items.Misc.SpawnBlockersOn"); else - text = "Currently Off"; + text = GetTextValue("Items.Misc.SpawnBlockersOff"); tooltips.FindAndReplace("[STATE]", text); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 263512ea28..7703d16a87 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -196,6 +196,9 @@ StarlightFuelCell: { } // Spawn Blockers +SpawnBlockersOn: Currently enabled +SpawnBlockersOff: Currently disabled + AntiCystOintment: { DisplayName: Anti-Cyst Ointment Tooltip: From c041d7cb4870638ea9e4bb07eef0874d5baa41c7 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Tue, 6 Feb 2024 14:00:33 -0600 Subject: [PATCH 025/197] commented out sprite swapping code as Alt Sprites will no longer be necesary --- Items/AntiCystOintment.cs | 2 ++ Items/AntiTumorOintment.cs | 3 ++- Items/BleachBall.cs | 2 ++ Items/BrokenWaterFilter.cs | 2 ++ Items/SirenproofEarMuffs.cs | 2 ++ Items/VoodooDemonVoodooDoll.cs | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index e08f3dc823..e3f6af02fc 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Items Item.favorited = favorited; } + /* public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; @@ -77,6 +78,7 @@ namespace CalamityMod.Items } return false; } + */ public override void ModifyTooltips(List tooltips) { diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index 48b31cd9a0..0bd3e0760c 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items Item.stack++; Item.favorited = favorited; } - + /* public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; @@ -77,6 +77,7 @@ namespace CalamityMod.Items } return false; } + */ public override void ModifyTooltips(List tooltips) { diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index faa445f07b..6ce3cea6cf 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -42,6 +42,7 @@ namespace CalamityMod.Items Item.favorited = favorited; } + /* public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; @@ -78,6 +79,7 @@ namespace CalamityMod.Items } return false; } + */ public override void ModifyTooltips(List tooltips) { diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index f143e390c0..748a7099dc 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -42,6 +42,7 @@ namespace CalamityMod.Items Item.favorited = favorited; } + /* public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; @@ -78,6 +79,7 @@ namespace CalamityMod.Items } return false; } + */ public override void ModifyTooltips(List tooltips) { diff --git a/Items/SirenproofEarMuffs.cs b/Items/SirenproofEarMuffs.cs index 8b6c27122a..fb9517da1a 100644 --- a/Items/SirenproofEarMuffs.cs +++ b/Items/SirenproofEarMuffs.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Items Item.favorited = favorited; } + /* public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; @@ -77,6 +78,7 @@ namespace CalamityMod.Items } return false; } + */ public override void ModifyTooltips(List tooltips) { diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 87e20e01a8..8e0ce4f181 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -42,6 +42,7 @@ namespace CalamityMod.Items Item.favorited = favorited; } + /* public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; @@ -78,6 +79,7 @@ namespace CalamityMod.Items } return false; } + */ public override void ModifyTooltips(List tooltips) { From b000446e16f9240874968abeafca7c125f772f7d Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Tue, 6 Feb 2024 14:04:49 -0600 Subject: [PATCH 026/197] Item.NetStateChanged(); --- Items/AntiCystOintment.cs | 1 + Items/AntiTumorOintment.cs | 1 + Items/BleachBall.cs | 1 + Items/BrokenWaterFilter.cs | 1 + Items/SirenproofEarMuffs.cs | 1 + Items/VoodooDemonVoodooDoll.cs | 1 + 6 files changed, 6 insertions(+) diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index e3f6af02fc..e08f648c18 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items player.Calamity().disablePerfCystSpawns = false; else player.Calamity().disablePerfCystSpawns = true; + Item.NetStateChanged(); state = player.Calamity().disablePerfCystSpawns; bool favorited = Item.favorited; diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index 0bd3e0760c..d84ad1f01a 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items player.Calamity().disableHiveCystSpawns = false; else player.Calamity().disableHiveCystSpawns = true; + Item.NetStateChanged(); state = player.Calamity().disableHiveCystSpawns; bool favorited = Item.favorited; diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index 6ce3cea6cf..bcdf1dfe54 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Items player.Calamity().disableNaturalScourgeSpawns = false; else player.Calamity().disableNaturalScourgeSpawns = true; + Item.NetStateChanged(); state = player.Calamity().disableNaturalScourgeSpawns; bool favorited = Item.favorited; diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index 748a7099dc..a16add7062 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Items player.Calamity().noStupidNaturalARSpawns = false; else player.Calamity().noStupidNaturalARSpawns = true; + Item.NetStateChanged(); state = player.Calamity().noStupidNaturalARSpawns; bool favorited = Item.favorited; diff --git a/Items/SirenproofEarMuffs.cs b/Items/SirenproofEarMuffs.cs index fb9517da1a..1d4075c4ac 100644 --- a/Items/SirenproofEarMuffs.cs +++ b/Items/SirenproofEarMuffs.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items player.Calamity().disableAnahitaSpawns = false; else player.Calamity().disableAnahitaSpawns = true; + Item.NetStateChanged(); state = player.Calamity().disableAnahitaSpawns; bool favorited = Item.favorited; diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index 8e0ce4f181..92c725ef82 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Items player.Calamity().disableVoodooSpawns = false; else player.Calamity().disableVoodooSpawns = true; + Item.NetStateChanged(); state = player.Calamity().disableVoodooSpawns; bool favorited = Item.favorited; Item.SetDefaults(ModContent.ItemType()); From 4db0ebdea26f6f6c5cc59fddee260bc9bca7a5da Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Sat, 10 Feb 2024 13:20:56 +0900 Subject: [PATCH 027/197] Fix crimson plant bug, multiplayer pylon bug (#22) * Fix bug where crimson plants are destroyed immediately after planted * Fix multiplayer pylon bugs --- Tiles/Furniture/Fountains/AbyssFountainTile.cs | 2 +- Tiles/Furniture/Fountains/AstralFountainTile.cs | 2 +- Tiles/Furniture/Fountains/SulphurousFountainTile.cs | 2 +- Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs | 2 +- Tiles/Rubblemaker/SunkenSea/FanCoralEcho.cs | 3 ++- Tiles/SunkenSea/FanCoral.cs | 3 ++- Utilities/TileFraming.cs | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Tiles/Furniture/Fountains/AbyssFountainTile.cs b/Tiles/Furniture/Fountains/AbyssFountainTile.cs index 253fbee3ea..9c3464b1fd 100644 --- a/Tiles/Furniture/Fountains/AbyssFountainTile.cs +++ b/Tiles/Furniture/Fountains/AbyssFountainTile.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { - if (Main.tile[i, j].TileFrameX >= 36) + if (!Main.dedServ && Main.tile[i, j].TileFrameX >= 36) Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/VoidWater").Slot; } diff --git a/Tiles/Furniture/Fountains/AstralFountainTile.cs b/Tiles/Furniture/Fountains/AstralFountainTile.cs index d06c0e44ae..44c0823d18 100644 --- a/Tiles/Furniture/Fountains/AstralFountainTile.cs +++ b/Tiles/Furniture/Fountains/AstralFountainTile.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { - if (Main.tile[i, j].TileFrameX >= 36) + if (!Main.dedServ && Main.tile[i, j].TileFrameX >= 36) Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/AstralWater").Slot; } diff --git a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs index 9c0da14f6d..35f96bd6c4 100644 --- a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs +++ b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { string waterColor = Main.zenithWorld ? "CalamityMod/PissWater" : "CalamityMod/SulphuricWater"; - if (Main.tile[i, j].TileFrameX >= 36) + if (!Main.dedServ && Main.tile[i, j].TileFrameX >= 36) Main.SceneMetrics.ActiveFountainColor = ModContent.Find(waterColor).Slot; } diff --git a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs index 8ff20df623..01867f0992 100644 --- a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs +++ b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { - if (Main.tile[i, j].TileFrameX >= 36) + if (!Main.dedServ && Main.tile[i, j].TileFrameX >= 36) Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/SunkenSeaWater").Slot; } diff --git a/Tiles/Rubblemaker/SunkenSea/FanCoralEcho.cs b/Tiles/Rubblemaker/SunkenSea/FanCoralEcho.cs index 6dde836456..29797481d3 100644 --- a/Tiles/Rubblemaker/SunkenSea/FanCoralEcho.cs +++ b/Tiles/Rubblemaker/SunkenSea/FanCoralEcho.cs @@ -30,7 +30,8 @@ namespace CalamityMod.Tiles.Rubblemaker.SunkenSea public override void NearbyEffects(int i, int j, bool closer) { - Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/SunkenSeaWater").Slot; + if (!Main.dedServ) + Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/SunkenSeaWater").Slot; } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/FanCoral.cs b/Tiles/SunkenSea/FanCoral.cs index 9b79218502..9159a92307 100644 --- a/Tiles/SunkenSea/FanCoral.cs +++ b/Tiles/SunkenSea/FanCoral.cs @@ -25,7 +25,8 @@ namespace CalamityMod.Tiles.SunkenSea public override void NearbyEffects(int i, int j, bool closer) { - Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/SunkenSeaWater").Slot; + if (!Main.dedServ) + Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/SunkenSeaWater").Slot; } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 4b614ad800..81a5c9e29e 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -61,7 +61,7 @@ namespace CalamityMod PlantCheckAgainst[TileID.JunglePlants2] = new int[1] { TileID.JungleGrass }; PlantCheckAgainst[TileID.HallowedPlants] = new int[1] { TileID.HallowedGrass }; PlantCheckAgainst[TileID.HallowedPlants2] = new int[1] { TileID.HallowedGrass }; - PlantCheckAgainst[TileID.CrimsonPlants] = new int[1] { TileID.CrimsonPlants }; + PlantCheckAgainst[TileID.CrimsonPlants] = new int[1] { TileID.CrimsonGrass }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; From ca86f74737c7e306fdf2380812bad859c2f3f6ab Mon Sep 17 00:00:00 2001 From: Toasty <74939552+toasty599@users.noreply.github.com> Date: Thu, 29 Feb 2024 06:17:19 +0000 Subject: [PATCH 028/197] Primitive System Remake (#23) * - Primitive system rewrite, start of converting old code to use the newer system. * - Tweaks to the primitive manager to match the old one. - Finished porting old uses of the primitives to the new ones. - Improved XML documentation on the newer ones. * Delete en-US.hjson * Remove cosmic shiv auto-entry * - Indentation fixes. * - Remove interface access modifiers --- .../Primitives/IPixelatedPrimitiveRenderer.cs | 20 ++ .../Primitives/PixelationPrimitiveLayer.cs | 15 + .../Primitives/PrimitivePixelationSystem.cs | 158 ++++++++++ Graphics/Primitives/PrimitiveSet.cs | 296 ++++++++++++++++++ Graphics/Primitives/PrimitiveSettings.cs | 92 ++++++ Graphics/Primitives/PrimitiveTrail.cs | 262 ---------------- .../VertexPosition2DColorTexture.cs | 46 +++ NPCs/AcidRain/AcidEel.cs | 10 +- NPCs/ExoMechs/Apollo/Apollo.cs | 25 +- NPCs/ExoMechs/Ares/AresBody.cs | 26 +- NPCs/ExoMechs/Artemis/Artemis.cs | 24 +- NPCs/SupremeCalamitas/BrimstoneHeart.cs | 8 +- Projectiles/Boss/ApolloChargeTelegraph.cs | 7 +- Projectiles/Boss/AresTeslaOrb.cs | 12 +- Projectiles/Boss/ArtemisChargeTelegraph.cs | 10 +- Projectiles/Boss/ArtemisSpinLaserbeam.cs | 10 +- .../Boss/CirrusPhotonRipperPrismTooth.cs | 7 +- Projectiles/Boss/DraedonSummonLaser.cs | 9 +- Projectiles/Boss/DyingSun.cs | 8 +- Projectiles/Boss/InfernadoRevenge.cs | 7 +- .../DraedonsArsenal/PhaseslayerProjectile.cs | 7 +- .../DraedonsArsenal/SnakeEyesProjectile.cs | 5 +- Projectiles/Enemy/GammRayBurst.cs | 9 +- Projectiles/Magic/ApotheosisEnergy.cs | 9 +- Projectiles/Magic/ArtAttackStar.cs | 9 +- Projectiles/Magic/EternityHex.cs | 9 +- Projectiles/Magic/ExoVortex.cs | 8 +- Projectiles/Magic/ExoVortex2.cs | 8 +- Projectiles/Magic/FabBolt.cs | 9 +- Projectiles/Magic/FabRay.cs | 10 +- Projectiles/Magic/RainbowRocket.cs | 7 +- Projectiles/Magic/RancorLaserbeam.cs | 7 +- Projectiles/Magic/WulfrumBolt.cs | 9 +- Projectiles/Melee/CosmicShivAura.cs | 142 ++++----- Projectiles/Melee/EonBolt.cs | 8 +- Projectiles/Melee/Exobeam.cs | 20 +- Projectiles/Melee/ExobladeProj.cs | 15 +- Projectiles/Melee/MarniteObliteratorProj.cs | 11 +- Projectiles/Melee/PrismTooth.cs | 7 +- Projectiles/Melee/RendingNeedle.cs | 10 +- Projectiles/Melee/StygianShieldAttack.cs | 10 +- Projectiles/Melee/TaintedBladeSlasher.cs | 22 +- Projectiles/Melee/TerratomereBeam.cs | 8 +- Projectiles/Melee/TerratomereBigSlash.cs | 8 +- Projectiles/Melee/TerratomereHoldoutProj.cs | 7 +- Projectiles/Melee/ViolenceSlashProjectile.cs | 9 +- Projectiles/Melee/ViolenceThrownProjectile.cs | 9 +- Projectiles/Melee/WulfrumScrew.cs | 9 +- Projectiles/Ranged/ExoCrystalArrow.cs | 10 +- Projectiles/Ranged/ExoLightningBolt.cs | 7 +- Projectiles/Ranged/MarksmanShot.cs | 7 +- Projectiles/Ranged/MeowCreature.cs | 9 +- Projectiles/Ranged/MineralMortarProjectile.cs | 7 +- Projectiles/Ranged/PristineFire.cs | 9 +- Projectiles/Ranged/SpeedBlasterShot.cs | 7 +- Projectiles/Ranged/TelluricGlareArrow.cs | 9 +- Projectiles/Ranged/TheMaelstromShark.cs | 7 +- Projectiles/Ranged/WulfrumScrapBullet.cs | 8 +- .../Rogue/DynamicPursuerElectricity.cs | 13 +- .../Rogue/FishboneBoomerangProjectile.cs | 1 - Projectiles/Rogue/ScarletDevilProjectile.cs | 8 +- Projectiles/Rogue/StormfrontLightning.cs | 8 +- Projectiles/Rogue/WulfrumKnifeProj.cs | 8 +- .../Summon/CnidarianJellyfishOnTheString.cs | 9 +- Projectiles/Summon/CosmilampBeam.cs | 12 +- Projectiles/Summon/DaedalusLightning.cs | 9 +- .../Summon/SmallAresArms/MinionTeslaOrb.cs | 16 +- Projectiles/Summon/WulfrumDroid.cs | 6 +- Projectiles/Summon/WulfrumEnergyBurst.cs | 8 +- Projectiles/Summon/WulfrumFusionBolt.cs | 7 +- Projectiles/Typeless/GemTechArmorGem.cs | 7 +- Projectiles/Typeless/MythrilFlare.cs | 9 +- Projectiles/Typeless/SuicideBomberDemon.cs | 8 +- Projectiles/Typeless/WulfrumHook.cs | 9 +- 74 files changed, 889 insertions(+), 782 deletions(-) create mode 100644 Graphics/Primitives/IPixelatedPrimitiveRenderer.cs create mode 100644 Graphics/Primitives/PixelationPrimitiveLayer.cs create mode 100644 Graphics/Primitives/PrimitivePixelationSystem.cs create mode 100644 Graphics/Primitives/PrimitiveSet.cs create mode 100644 Graphics/Primitives/PrimitiveSettings.cs delete mode 100644 Graphics/Primitives/PrimitiveTrail.cs create mode 100644 Graphics/Primitives/VertexPosition2DColorTexture.cs diff --git a/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs b/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs new file mode 100644 index 0000000000..7270d3e93a --- /dev/null +++ b/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs @@ -0,0 +1,20 @@ +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Graphics.Primitives +{ + /// + /// Use to sucessfully render primitives with pixelation with an NPC or Projectile. + /// + public interface IPixelatedPrimitiveRenderer + { + /// + /// The layer to render the primitive(s) to. + /// + PixelationPrimitiveLayer LayerToRenderTo => PixelationPrimitiveLayer.BeforeProjectiles; + + /// + /// Render primitives that use pixelation here. + /// + void RenderPixelatedPrimitives(SpriteBatch spriteBatch); + } +} diff --git a/Graphics/Primitives/PixelationPrimitiveLayer.cs b/Graphics/Primitives/PixelationPrimitiveLayer.cs new file mode 100644 index 0000000000..1ed0348bc8 --- /dev/null +++ b/Graphics/Primitives/PixelationPrimitiveLayer.cs @@ -0,0 +1,15 @@ +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Graphics.Primitives +{ + /// + /// Controls what layer the renders to. + /// + public enum PixelationPrimitiveLayer + { + BeforeNPCs, + AfterNPCs, + BeforeProjectiles, + AfterProjectiles + } +} diff --git a/Graphics/Primitives/PrimitivePixelationSystem.cs b/Graphics/Primitives/PrimitivePixelationSystem.cs new file mode 100644 index 0000000000..27a40a1efd --- /dev/null +++ b/Graphics/Primitives/PrimitivePixelationSystem.cs @@ -0,0 +1,158 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Primitives +{ + public class PrimitivePixelationSystem : ModSystem + { + #region Fields/Properties + private static ManagedRenderTarget PixelationTarget_BeforeNPCs; + + private static ManagedRenderTarget PixelationTarget_AfterNPCs; + + private static ManagedRenderTarget PixelationTarget_BeforeProjectiles; + + private static ManagedRenderTarget PixelationTarget_AfterProjectiles; + + private static RenderTarget2D CreatePixelTarget(int width, int height) => new(Main.instance.GraphicsDevice, width / 2, height / 2); + + /// + /// Whether the system is currently rendering any primitives. + /// + public static bool CurrentlyRendering + { + get; + private set; + } + #endregion + + #region Loading + public override void Load() + { + On_Main.CheckMonoliths += DrawToTargets; + On_Main.DoDraw_DrawNPCsOverTiles += DrawTarget_NPCs; + On_Main.DrawProjectiles += DrawTarget_Projectiles; + + PixelationTarget_BeforeNPCs = new(true, CreatePixelTarget); + PixelationTarget_AfterNPCs = new(true, CreatePixelTarget); + PixelationTarget_BeforeProjectiles = new(true, CreatePixelTarget); + PixelationTarget_AfterProjectiles = new(true, CreatePixelTarget); + } + + public override void Unload() + { + On_Main.CheckMonoliths -= DrawToTargets; + On_Main.DoDraw_DrawNPCsOverTiles -= DrawTarget_NPCs; + } + #endregion + + #region Drawing To Targets + private void DrawToTargets(On_Main.orig_CheckMonoliths orig) + { + if (Main.gameMenu) + { + orig(); + return; + } + + var beforeNPCs = new List(); + var afterNPCs = new List(); + var beforeProjectiles = new List(); + var afterProjectiles = new List(); + + // Check every active projectile. + for (int i = 0; i < Main.maxProjectiles; i++) + { + var projectile = Main.projectile[i]; + + // If the projectile is active, a mod projectile, and uses the interface, add it to the list of primitives to draw this frame. + if (projectile.active && projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile) + { + var listToUse = pixelPrimitiveProjectile.LayerToRenderTo switch + { + PixelationPrimitiveLayer.BeforeNPCs => beforeNPCs, + PixelationPrimitiveLayer.AfterNPCs => afterNPCs, + PixelationPrimitiveLayer.BeforeProjectiles => beforeProjectiles, + _ => afterProjectiles + }; + listToUse.Add(pixelPrimitiveProjectile); + } + } + + // Check every active NPC. + for (int i = 0; i < Main.maxNPCs; i++) + { + var npc = Main.npc[i]; + + // If the NPC is active, a mod NPC, and uses the interface, add it to the list of primitives to draw this frame. + if (npc.active && npc.ModNPC != null && npc.ModNPC is IPixelatedPrimitiveRenderer pixelPrimitiveNPC) + { + var listToUse = pixelPrimitiveNPC.LayerToRenderTo switch + { + PixelationPrimitiveLayer.BeforeNPCs => beforeNPCs, + PixelationPrimitiveLayer.AfterNPCs => afterNPCs, + PixelationPrimitiveLayer.BeforeProjectiles => beforeProjectiles, + _ => afterProjectiles + }; + listToUse.Add(pixelPrimitiveNPC); + } + } + + CurrentlyRendering = true; + + DrawPrimsToRenderTarget(PixelationTarget_BeforeNPCs, beforeNPCs); + DrawPrimsToRenderTarget(PixelationTarget_AfterNPCs, afterNPCs); + DrawPrimsToRenderTarget(PixelationTarget_BeforeProjectiles, beforeProjectiles); + DrawPrimsToRenderTarget(PixelationTarget_AfterProjectiles, afterProjectiles); + + Main.instance.GraphicsDevice.SetRenderTarget(null); + + CurrentlyRendering = false; + orig(); + } + + private static void DrawPrimsToRenderTarget(RenderTarget2D renderTarget, List pixelPrimitives) + { + // Swap to the target regardless, in order to clear any leftover content from last frame. Not doing this results in the final frame lingering once it stops rendering. + renderTarget.SwapTo(); + + if (pixelPrimitives.Any()) + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null); + + foreach (var pixelPrimitiveDrawer in pixelPrimitives) + pixelPrimitiveDrawer.RenderPixelatedPrimitives(Main.spriteBatch); + + Main.spriteBatch.End(); + } + } + #endregion + + #region Target Drawing + private void DrawTarget_NPCs(On_Main.orig_DoDraw_DrawNPCsOverTiles orig, Main self) + { + DrawTargetScaled(PixelationTarget_BeforeNPCs); + orig(self); + DrawTargetScaled(PixelationTarget_AfterNPCs); + } + + private void DrawTarget_Projectiles(On_Main.orig_DrawProjectiles orig, Main self) + { + DrawTargetScaled(PixelationTarget_BeforeProjectiles); + orig(self); + DrawTargetScaled(PixelationTarget_AfterProjectiles); + } + + private static void DrawTargetScaled(ManagedRenderTarget target) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Draw(target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + } + #endregion + } +} diff --git a/Graphics/Primitives/PrimitiveSet.cs b/Graphics/Primitives/PrimitiveSet.cs new file mode 100644 index 0000000000..a911dd3b20 --- /dev/null +++ b/Graphics/Primitives/PrimitiveSet.cs @@ -0,0 +1,296 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Graphics.Shaders; + +namespace CalamityMod.Graphics.Primitives +{ + /// + /// This both acts as an instanceable struct containing primitive trail data, and as a manager that creates and renders said instances.

+ /// To use normally, in the draw method of an NPC or Projectile call .
+ /// + /// The first param should be the positions to use for the trail. + /// The second is a struct that allows you to choose a desired configuration of settings to use with the trail, to allow for customization. + /// The third controls how many points are created for the trail, and the fourth determines whether the primitive is subsequently rendered. + /// If you do not render in , you MUST call manually on the created instance to make it actually appear. + /// + /// If you wish to use pixelation, you MUST make the NPC/Projectile inherit and use instead.
+ /// You can also optionally specify a render layer with . It is by default. + ///
+ public readonly struct PrimitiveSet + { + #region Instance Members + /// + /// The vertices of the set. + /// + public readonly VertexPosition2DColorTexture[] Vertices; + + /// + /// The indices of the set. + /// + public readonly int[] Indices; + + /// + /// The settings of the set. + /// + public readonly PrimitiveSettings Settings; + + private PrimitiveSet(VertexPosition2DColorTexture[] vertices, int[] indices, PrimitiveSettings settings) + { + Vertices = vertices; + Indices = indices; + Settings = settings; + } + #endregion + + #region Static Members + private static void PerformPixelationSafetyChecks(PrimitiveSettings settings) + { + // Don't allow accidental screw ups with these. + if (settings.Pixelate && !PrimitivePixelationSystem.CurrentlyRendering) + throw new Exception("Error: Primitives using pixelation MUST be prepared/rendered from the IPixelatedPrimitiveRenderer.RenderPixelatedPrimitives method, did you forget to use the interface?"); + else if (!settings.Pixelate && PrimitivePixelationSystem.CurrentlyRendering) + throw new Exception("Error: Primitives not using pixelation MUST NOT be prepared/rendered from the IPixelatedPrimitiveRenderer.RenderPixelatedPrimitives method."); + } + + /// + /// Prepares a based on the provided information, and optionally renders it. + /// + /// The list of positions to use. Keep in mind that these are expected to be in world position, and is automatically subtracted from them all. + /// The primitive draw settings to use. + /// The amount of points to use. More is higher detailed, but less performant. By default, is the number of positions provided. Going above 100 is NOT recommended. + /// Whether to render the set. + /// The prepared set. + public static PrimitiveSet? Prepare(IEnumerable positions, PrimitiveSettings settings, int? pointsToCreate = null, bool render = true) + { + PerformPixelationSafetyChecks(settings); + + int positionCount = positions.Count(); + + // Return if not enough to draw anything. + if (positionCount <= 2) + return null; + + // Cull out any zeroed points. + positions = positions.Where(p => p != Vector2.Zero); + List trailPoints = PreparePointsRectangleTrail(positions, settings, pointsToCreate ?? positionCount).ToList(); + + // A trail with only one point or less has nothing to connect to, and therefore, can't make a trail. + if (trailPoints.Count <= 2) + return null; + + // If the trail point has any NaN positions, don't draw anything. + if (trailPoints.Any(point => point.HasNaNs())) + return null; + + // If the trail points are all equal, don't draw anything. + if (trailPoints.All(point => point == trailPoints[0])) + return null; + + IEnumerable vertices = CreateVerticesRectangleTrail(trailPoints.ToList(), settings); + int[] indices = CreateIndicesRectangleTrail(trailPoints.Count); + + // Create the set, and just return it if not asked to render. + PrimitiveSet set = new(vertices.ToArray(), indices, settings); + if (!render) + return set; + + // Else render the set and return it. + return set.Render(); + } + #endregion + + #region Instance Methods + /// + /// Renders the provided primitive set to the screen. + /// + /// The provided set. + public PrimitiveSet Render() + { + PerformPixelationSafetyChecks(Settings); + + if (Indices.Length % 6 != 0 || Vertices.Length <= 3) + return this; + + // Perform screen culling, for performance reasons. + Main.instance.GraphicsDevice.RasterizerState = RasterizerState.CullNone; + Main.instance.GraphicsDevice.RasterizerState.ScissorTestEnable = true; + Main.instance.GraphicsDevice.ScissorRectangle = new Rectangle(0, 0, Main.screenWidth, Main.screenHeight); + + Matrix view; + Matrix projection; + if (Settings.Pixelate) + CalcuatePixelatedPerspectiveMatrices(out view, out projection); + else + CalamityUtils.CalculatePerspectiveMatricies(out view, out projection); + + var shaderToUse = Settings.Shader ?? GameShaders.Misc["CalamityMod:StandardPrimitiveShader"]; + shaderToUse.Shader.Parameters["uWorldViewProjection"].SetValue(view * projection); + shaderToUse.Apply(); + + // Render the set. + Main.instance.GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, Vertices, 0, Vertices.Length, Indices, 0, Indices.Length / 3); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + return this; + } + #endregion + + #region Set Preperation + private static IEnumerable PreparePointsRectangleTrail(IEnumerable positions, PrimitiveSettings settings, int pointsToCreate) + { + // Don't smoothen the points unless explicitly told do so. + if (!settings.Smoothen) + { + List basePoints = positions.Where(originalPosition => originalPosition != Vector2.Zero).ToList(); + List endPoints = new(); + + if (basePoints.Count <= 2) + return endPoints; + + // Remap the original positions across a certain length. + for (int i = 0; i < pointsToCreate; i++) + { + float completionRatio = i / (float)(pointsToCreate - 1f); + int currentIndex = (int)(completionRatio * (basePoints.Count - 1)); + Vector2 currentPoint = basePoints[currentIndex]; + Vector2 nextPoint = basePoints[(currentIndex + 1) % basePoints.Count]; + endPoints.Add(Vector2.Lerp(currentPoint, nextPoint, completionRatio * (basePoints.Count - 1) % 0.99999f) - Main.screenPosition); + } + return endPoints; + } + + List controlPoints = new(); + for (int i = 0; i < positions.Count(); i++) + { + // Don't incorporate points that are zeroed out. + // They are almost certainly a result of incomplete oldPos arrays. + if (positions.ElementAt(i) == Vector2.Zero) + continue; + + float completionRatio = i / (float)positions.Count(); + Vector2 offset = -Main.screenPosition; + if (settings.OffsetFunction != null) + offset += settings.OffsetFunction(completionRatio); + controlPoints.Add(positions.ElementAt(i) + offset); + } + List points = new(); + + // Avoid stupid index errors. + if (controlPoints.Count <= 4) + return controlPoints; + + for (int j = 0; j < pointsToCreate; j++) + { + float splineInterpolant = j / (float)pointsToCreate; + float localSplineInterpolant = splineInterpolant * (controlPoints.Count - 1f) % 1f; + int localSplineIndex = (int)(splineInterpolant * (controlPoints.Count - 1f)); + + Vector2 farLeft; + Vector2 left = controlPoints[localSplineIndex]; + Vector2 right = controlPoints[localSplineIndex + 1]; + Vector2 farRight; + + // Special case: If the spline attempts to access the previous/next index but the index is already at the very beginning/end, simply + // cheat a little bit by creating a phantom point that's mirrored from the previous one. + if (localSplineIndex <= 0) + { + Vector2 mirrored = left * 2f - right; + farLeft = mirrored; + } + else + farLeft = controlPoints[localSplineIndex - 1]; + + if (localSplineIndex >= controlPoints.Count - 2) + { + Vector2 mirrored = right * 2f - left; + farRight = mirrored; + } + else + farRight = controlPoints[localSplineIndex + 2]; + + points.Add(Vector2.CatmullRom(farLeft, left, right, farRight, localSplineInterpolant)); + } + + // Manually insert the front and end points. + points.Insert(0, controlPoints.First()); + points.Add(controlPoints.Last()); + + return points; + } + + private static IEnumerable CreateVerticesRectangleTrail(List positions, PrimitiveSettings settings) + { + List vertices = new(); + + for (int i = 0; i < positions.Count; i++) + { + float completionRatio = i / (float)(positions.Count - 1); + float widthAtVertex = settings.WidthFunction(completionRatio); + Color vertexColor = settings.ColorFunction(completionRatio); + Vector2 currentPosition = positions[i]; + Vector2 directionToAhead = i == positions.Count - 1 ? (positions[i] - positions[i - 1]).SafeNormalize(Vector2.Zero) : (positions[i + 1] - positions[i]).SafeNormalize(Vector2.Zero); + + Vector2 leftCurrentTextureCoord = new(completionRatio, 0f); + Vector2 rightCurrentTextureCoord = new(completionRatio, 1f); + + // Point 90 degrees away from the direction towards the next point, and use it to mark the edges of the rectangle. + // This doesn't use RotatedBy for the sake of performance (there can potentially be a lot of trail points). + Vector2 sideDirection = new(-directionToAhead.Y, directionToAhead.X); + + Vector2 left = currentPosition - sideDirection * widthAtVertex; + Vector2 right = currentPosition + sideDirection * widthAtVertex; + + // Override the initial vertex positions if requested. + if (i == 0 && settings.InitialVertexPositionsOverride.HasValue && settings.InitialVertexPositionsOverride.Value.Item1 != Vector2.Zero && settings.InitialVertexPositionsOverride.Value.Item2 != Vector2.Zero) + { + left = settings.InitialVertexPositionsOverride.Value.Item1; + right = settings.InitialVertexPositionsOverride.Value.Item2; + } + + // What this is doing, at its core, is defining a rectangle based on two triangles. + // These triangles are defined based on the width of the strip at that point. + // The resulting rectangles combined are what make the trail itself. + vertices.Add(new VertexPosition2DColorTexture(left, vertexColor, leftCurrentTextureCoord)); + vertices.Add(new VertexPosition2DColorTexture(right, vertexColor, rightCurrentTextureCoord)); + } + + return vertices; + } + + private static int[] CreateIndicesRectangleTrail(int pointCount) + { + // What this is doing is basically representing each point on the vertices list as + // indices. These indices should come together to create a tiny rectangle that acts + // as a segment on the trail. This is achieved here by splitting the indices (or rather, points) + // into 2 triangles, which requires 6 points. + // The logic here basically determines which indices are connected together. + int totalIndices = (pointCount - 1) * 6; + int[] indices = new int[totalIndices]; + + for (int i = 0; i < pointCount - 2; i++) + { + int startingTriangleIndex = i * 6; + int connectToIndex = i * 2; + indices[startingTriangleIndex] = connectToIndex; + indices[startingTriangleIndex + 1] = connectToIndex + 1; + indices[startingTriangleIndex + 2] = connectToIndex + 2; + indices[startingTriangleIndex + 3] = connectToIndex + 2; + indices[startingTriangleIndex + 4] = connectToIndex + 1; + indices[startingTriangleIndex + 5] = connectToIndex + 3; + } + + return indices; + } + + private static void CalcuatePixelatedPerspectiveMatrices(out Matrix viewMatrix, out Matrix projectionMatrix) + { + // Due to the scaling, the normal transformation calcuations do not work with pixelated primitives. + projectionMatrix = Matrix.CreateOrthographicOffCenter(0, Main.screenWidth, Main.screenHeight, 0, -1, 1); + viewMatrix = Matrix.Identity; + } + #endregion + } +} diff --git a/Graphics/Primitives/PrimitiveSettings.cs b/Graphics/Primitives/PrimitiveSettings.cs new file mode 100644 index 0000000000..bbee27c4a7 --- /dev/null +++ b/Graphics/Primitives/PrimitiveSettings.cs @@ -0,0 +1,92 @@ +using Microsoft.Xna.Framework; +using Terraria.Graphics.Shaders; + +namespace CalamityMod.Graphics.Primitives +{ + /// + /// Contains all the various options to use when creating a primitive trail. New members can be added freely without breaking existing implementations. + /// + public readonly struct PrimitiveSettings + { + #region Delegates + /// + /// A delegate to dynamically determine the width of the trail at each position. + /// + /// The current position along the trail as a 0-1 interlopant value. + /// The width for the current point. + public delegate float VertexWidthFunction(float trailLengthInterpolant); + + /// + /// A delegate to dynamically determine the color of the trail at each position. + /// + /// The current position along the trail as a 0-1 interlopant value. + /// The color for the current point. + public delegate Color VertexColorFunction(float trailLengthInterpolant); + + /// + /// A delegate to dynamically determine the offset of the trail at each position. + /// + /// The current position along the trail as a 0-1 interlopant value. + /// The offset for the current point. + public delegate Vector2 VertexOffsetFunction(float trailLengthInterpolant); + #endregion + + #region Instance Fields + /// + /// Used to determine the width of each vertex. + /// + public readonly VertexWidthFunction WidthFunction; + + /// + /// Used to determine the color of each vertex. + /// + public readonly VertexColorFunction ColorFunction; + + /// + /// Used to offset each position when generating them. + /// + public readonly VertexOffsetFunction OffsetFunction; + + /// + /// Whether to use smoothening when generating the vertex positions from the provided ones Recommended to be on by default. + /// + public readonly bool Smoothen; + + /// + /// Whether to pixelate the primitives. Recommended to be on by default. + /// + public readonly bool Pixelate; + + /// + /// The shader to apply when rendering. + /// + public readonly MiscShaderData Shader; + + /// + /// An optional override to force the trail to use the provided positions as the side positions of the initial vertex. They are the left and right positions respectively. + /// + public readonly (Vector2, Vector2)? InitialVertexPositionsOverride; + #endregion + + /// + /// Contains all the various options to use when creating a primitive trail. + /// + /// Used to determine the width of each vertex. + /// Used to determine the color of each vertex. + /// Used to offset each position when generating them. + /// Whether to use smoothening when generating the vertex positions from the provided ones. Recommended to be enabled. + /// Whether to pixelate the primitives. Recommended to be enabled if the effect was designed with this in mind. + /// The shader to apply when rendering the primitives. + /// An optional override to force the trail to use the provided positions as the side positions of the initial vertex. They are the left and right positions respectively and should be in screen space. + public PrimitiveSettings(VertexWidthFunction widthFunction, VertexColorFunction colorFunction, VertexOffsetFunction offsetFunction = null, bool smoothen = true, bool pixelate = false, MiscShaderData shader = null, (Vector2, Vector2)? initialVertexPositionsOverride = null) + { + WidthFunction = widthFunction; + ColorFunction = colorFunction; + OffsetFunction = offsetFunction; + Smoothen = smoothen; + Pixelate = pixelate; + Shader = shader; + InitialVertexPositionsOverride = initialVertexPositionsOverride; + } + } +} diff --git a/Graphics/Primitives/PrimitiveTrail.cs b/Graphics/Primitives/PrimitiveTrail.cs deleted file mode 100644 index 16e3b48dd7..0000000000 --- a/Graphics/Primitives/PrimitiveTrail.cs +++ /dev/null @@ -1,262 +0,0 @@ -using CalamityMod.DataStructures; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; - -namespace CalamityMod -{ - public class PrimitiveTrail - { - public struct VertexPosition2DColor : IVertexType - { - public Vector2 Position; - public Color Color; - public Vector2 TextureCoordinates; - public VertexDeclaration VertexDeclaration => _vertexDeclaration; - - private static readonly VertexDeclaration _vertexDeclaration = new VertexDeclaration(new VertexElement[] - { - new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), - new VertexElement(8, VertexElementFormat.Color, VertexElementUsage.Color, 0), - new VertexElement(12, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0), - }); - public VertexPosition2DColor(Vector2 position, Color color, Vector2 textureCoordinates) - { - Position = position; - Color = color; - TextureCoordinates = textureCoordinates; - } - } - - public delegate float VertexWidthFunction(float completionRatio); - public delegate Color VertexColorFunction(float completionRatio); - - public int DegreeOfBezierCurveCornerSmoothening; - public VertexWidthFunction WidthFunction; - public VertexColorFunction ColorFunction; - - public MiscShaderData SpecialShader; - public TrailPointRetrievalFunction TrailPointFunction; - - public Vector2 OverridingStickPointStart = Vector2.Zero; - public Vector2 OverridingStickPointEnd = Vector2.Zero; - - public delegate List TrailPointRetrievalFunction(IEnumerable originalPositions, Vector2 generalOffset, int totalTrailPoints, IEnumerable originalRotations = null); - - public PrimitiveTrail(VertexWidthFunction widthFunction, VertexColorFunction colorFunction, TrailPointRetrievalFunction pointFunction = null, MiscShaderData specialShader = null) - { - if (widthFunction is null || colorFunction is null) - throw new NullReferenceException($"In order to create a primitive trail, a non-null {(widthFunction is null ? "width" : "color")} function must be specified."); - WidthFunction = widthFunction; - ColorFunction = colorFunction; - - // Default to bezier smoothening if nothing else is inputted. - if (pointFunction is null) - pointFunction = SmoothBezierPointRetreivalFunction; - - TrailPointFunction = pointFunction; - - SpecialShader = specialShader ?? GameShaders.Misc["CalamityMod:StandardPrimitiveShader"]; - - if (specialShader != null) - SpecialShader = specialShader; - } - - public static List RigidPointRetreivalFunction(IEnumerable originalPositions, Vector2 generalOffset, int totalTrailPoints, IEnumerable _ = null) - { - List basePoints = originalPositions.Where(originalPosition => originalPosition != Vector2.Zero).ToList(); - List endPoints = new List(); - - if (basePoints.Count < 2) - { - for (int i = 0; i < basePoints.Count; i++) - basePoints[i] += generalOffset; - return basePoints; - } - - // Remap the original positions across a certain length. - for (int i = 0; i < totalTrailPoints; i++) - { - float completionRatio = i / (float)(totalTrailPoints - 1f); - int currentIndex = (int)(completionRatio * (basePoints.Count - 1)); - Vector2 currentPoint = basePoints[currentIndex]; - Vector2 nextPoint = basePoints[(currentIndex + 1) % basePoints.Count]; - endPoints.Add(Vector2.Lerp(currentPoint, nextPoint, completionRatio * (basePoints.Count - 1) % 0.99999f) + generalOffset); - } - endPoints.Add(basePoints.Last() + generalOffset); - return endPoints; - } - - // NOTE: Beziers can be laggy when a lot of control points are used, since our implementation - // uses a recursive Lerp that gets more computationally expensive the more original indices. - // n(n + 1)/2 linear interpolations to be precise, where n is the amount of original indices. - public List SmoothBezierPointRetreivalFunction(IEnumerable originalPositions, Vector2 generalOffset, int totalTrailPoints, IEnumerable originalRotations = null) - { - List controlPoints = new List(); - for (int i = 0; i < originalPositions.Count(); i++) - { - // Don't incorporate points that are zeroed out. - // They are almost certainly a result of incomplete oldPos arrays. - if (originalPositions.ElementAt(i) == Vector2.Zero) - continue; - controlPoints.Add(originalPositions.ElementAt(i) + generalOffset); - } - - bool pointCountCondition = DegreeOfBezierCurveCornerSmoothening <= 0 || controlPoints.Count < DegreeOfBezierCurveCornerSmoothening * 3; - int effectivePointCount = DegreeOfBezierCurveCornerSmoothening > 0 ? totalTrailPoints * DegreeOfBezierCurveCornerSmoothening : totalTrailPoints; - BezierCurve bezierCurve = new BezierCurve(controlPoints.Where((_, i) => - { - return DegreeOfBezierCurveCornerSmoothening <= 0 || - i % DegreeOfBezierCurveCornerSmoothening == 0 || - i == 0 || - i == controlPoints.Count - 1 || - pointCountCondition; - }).ToArray()); - return controlPoints.Count <= 1 ? controlPoints : bezierCurve.GetPoints(effectivePointCount); - } - - // Using this method requires oldRot be supplied to the Draw method for the sake of determining how many points need to be made at a given time step. - // Furthermore, since the point count is dynamic, the point count int parameter has no purpose. It can be supplied simply with zero. - public static List SmoothCatmullRomPointRetreivalFunction(IEnumerable originalPositions, Vector2 generalOffset, int _, IEnumerable originalRotations) - { - List smoothenedPoints = new List(); - for (int i = 0; i < originalPositions.Count() - 1; i++) - { - Vector2 currentPosition = originalPositions.ElementAt(i); - Vector2 aheadPosition = originalPositions.ElementAt(i + 1); - - // Don't incorporate points that are zeroed out. - // They are almost certainly a result of incomplete oldPos arrays. - if (currentPosition == Vector2.Zero || aheadPosition == Vector2.Zero) - continue; - - float currentRotation = MathHelper.WrapAngle(originalRotations.ElementAt(i)); - float aheadRotation = MathHelper.WrapAngle(originalRotations.ElementAt(i + 1)); - - // Determine the amount of extra points to draw based on the rotational offset between the two time steps. - int pointsToAdd = (int)Math.Round(Math.Abs(MathHelper.WrapAngle(aheadRotation - currentRotation)) * 8f / MathHelper.Pi); - - // Add a base point. - smoothenedPoints.Add(currentPosition + generalOffset); - - // If no new points are needed, skip this. - if (pointsToAdd == 0) - continue; - - float segmentLength = Vector2.Distance(currentPosition, aheadPosition); - float increment = 1f / (pointsToAdd + 2); - Vector2 backEnd = currentPosition + currentRotation.ToRotationVector2() * segmentLength; - Vector2 frontEnd = aheadPosition + aheadRotation.ToRotationVector2() * -segmentLength; - - // Create smoothened points based on a Catmull-Rom spline. - for (float j = increment; j < 1f; j += increment) - smoothenedPoints.Add(Vector2.CatmullRom(backEnd, currentPosition, aheadPosition, frontEnd, j) + generalOffset); - } - return smoothenedPoints; - } - - public VertexPosition2DColor[] GetVerticesFromTrailPoints(List trailPoints) - { - VertexPosition2DColor[] vertices = new VertexPosition2DColor[trailPoints.Count * 2 - 2]; - for (int i = 0; i < trailPoints.Count - 1; i++) - { - float completionRatio = i / (float)trailPoints.Count; - float widthAtVertex = WidthFunction(completionRatio); - Color vertexColor = ColorFunction(completionRatio); - - Vector2 currentPosition = trailPoints[i]; - Vector2 positionAhead = trailPoints[i + 1]; - Vector2 directionToAhead = (positionAhead - trailPoints[i]).SafeNormalize(Vector2.Zero); - - Vector2 leftCurrentTextureCoord = new Vector2(completionRatio, 0f); - Vector2 rightCurrentTextureCoord = new Vector2(completionRatio, 1f); - - // Point 90 degrees away from the direction towards the next point, and use it to mark the edges of the rectangle. - // This doesn't use RotatedBy for the sake of performance (there can potentially be a lot of trail points). - Vector2 sideDirection = new Vector2(-directionToAhead.Y, directionToAhead.X); - - Vector2 left = currentPosition - sideDirection * widthAtVertex; - Vector2 right = currentPosition + sideDirection * widthAtVertex; - if (i == 0 && OverridingStickPointStart != Vector2.Zero) - { - left = OverridingStickPointStart; - right = OverridingStickPointEnd; - } - - // What this is doing, at its core, is defining a rectangle based on two triangles. - // These triangles are defined based on the width of the strip at that point. - // The resulting rectangles combined are what make the trail itself. - vertices[i * 2] = new VertexPosition2DColor(left, vertexColor, leftCurrentTextureCoord); - vertices[i * 2 + 1] = new VertexPosition2DColor(right, vertexColor, rightCurrentTextureCoord); - } - - return vertices.ToArray(); - } - - public short[] GetIndicesFromTrailPoints(int pointCount) - { - // What this is doing is basically representing each point on the vertices list as - // indices. These indices should come together to create a tiny rectangle that acts - // as a segment on the trail. This is achieved here by splitting the indices (or rather, points) - // into 2 triangles, which requires 6 points. - // The logic here basically determines which indices are connected together. - int totalIndices = (pointCount - 1) * 6; - short[] indices = new short[totalIndices]; - - for (int i = 0; i < pointCount - 2; i++) - { - int startingTriangleIndex = i * 6; - int connectToIndex = i * 2; - indices[startingTriangleIndex] = (short)connectToIndex; - indices[startingTriangleIndex + 1] = (short)(connectToIndex + 1); - indices[startingTriangleIndex + 2] = (short)(connectToIndex + 2); - indices[startingTriangleIndex + 3] = (short)(connectToIndex + 2); - indices[startingTriangleIndex + 4] = (short)(connectToIndex + 1); - indices[startingTriangleIndex + 5] = (short)(connectToIndex + 3); - } - - return indices; - } - - public void Draw(IEnumerable originalPositions, Vector2 generalOffset, int totalTrailPoints, IEnumerable originalRotations = null) - { - List trailPoints = TrailPointFunction(originalPositions, generalOffset, totalTrailPoints, originalRotations); - - // A trail with only one point or less has nothing to connect to, and therefore, can't make a trail. - if (trailPoints.Count < 2) - return; - - // If the trail points have any NaN positions, don't draw anything. - if (trailPoints.Any(point => point.HasNaNs())) - return; - - // If the trail points are all equal, don't draw anything. - if (trailPoints.All(point => point == trailPoints[0])) - return; - - CalamityUtils.CalculatePerspectiveMatricies(out Matrix view, out Matrix projection); - VertexPosition2DColor[] vertices = GetVerticesFromTrailPoints(trailPoints); - - short[] triangleIndices = GetIndicesFromTrailPoints(trailPoints.Count); - - // Don't draw anything if the indicies/vertices are in any way invalid. - // If they are, the graphics engine, along with the entire game, will crash. - if (triangleIndices.Length % 6 != 0 || vertices.Length % 2 != 0) - return; - - Main.instance.GraphicsDevice.RasterizerState = RasterizerState.CullNone; - Main.instance.GraphicsDevice.RasterizerState.ScissorTestEnable = true; - Main.instance.GraphicsDevice.ScissorRectangle = new Rectangle(0, 0, Main.screenWidth, Main.screenHeight); //offscreen culling - - SpecialShader.Shader.Parameters["uWorldViewProjection"].SetValue(view * projection); - SpecialShader.Apply(); - - Main.instance.GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length, triangleIndices, 0, triangleIndices.Length / 3); - Main.pixelShader.CurrentTechnique.Passes[0].Apply(); - } - } -} diff --git a/Graphics/Primitives/VertexPosition2DColorTexture.cs b/Graphics/Primitives/VertexPosition2DColorTexture.cs new file mode 100644 index 0000000000..0ac7154e44 --- /dev/null +++ b/Graphics/Primitives/VertexPosition2DColorTexture.cs @@ -0,0 +1,46 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Graphics.Primitives +{ + /// + /// A custom vertex type with a position using Vector2 instead of Vector4, as Terraria is only a 2D game. + /// + /// This represents a vertex that will be rendered by the GPU. + public readonly struct VertexPosition2DColorTexture : IVertexType + { + /// + /// The position of the vertex. + /// + public readonly Vector2 Position; + + /// + /// The color of the vertex. + /// + public readonly Color Color; + + /// + /// The texture-coordinate of the vertex. + /// + public readonly Vector2 TextureCoordinates; + + /// + /// The vertex declaration. This declares the layout and size of the data in the vertex shader. + /// + public VertexDeclaration VertexDeclaration => VertexDeclaration2D; + + public static readonly VertexDeclaration VertexDeclaration2D = new(new VertexElement[] + { + new(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), + new(8, VertexElementFormat.Color, VertexElementUsage.Color, 0), + new(12, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0), + }); + + public VertexPosition2DColorTexture(Vector2 position, Color color, Vector2 textureCoordinates) + { + Position = position; + Color = color; + TextureCoordinates = textureCoordinates; + } + } +} diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index b49de944d5..f724c32fa1 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -15,6 +15,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.Graphics.Shaders; using System.Linq; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.NPCs.AcidRain { @@ -22,8 +23,6 @@ namespace CalamityMod.NPCs.AcidRain { public Player Target => Main.player[NPC.target]; - public PrimitiveTrail SegmentDrawer = null; - public override void SetStaticDefaults() { Main.npcFrameCount[NPC.type] = 6; @@ -187,9 +186,6 @@ namespace CalamityMod.NPCs.AcidRain return false; } - // Initialize the segment drawer. - SegmentDrawer ??= new(SegmentWidthFunction, _ => NPC.GetAlpha(Color.White), null, GameShaders.Misc["CalamityMod:PrimitiveTexture"]); - Texture2D headTexture = ModContent.Request(Texture).Value; Texture2D tailTexture = ModContent.Request("CalamityMod/NPCs/AcidRain/AcidEelTail").Value; Vector2[] segmentPositions = (Vector2[])NPC.oldPos.Clone(); @@ -205,7 +201,7 @@ namespace CalamityMod.NPCs.AcidRain for (int i = 0; i < segmentPositions.Length; i++) { - segmentPositions[i] += NPC.Size * 0.5f - screenPos - NPC.rotation.ToRotationVector2() * Math.Sign(NPC.velocity.X) * 8f; + segmentPositions[i] += NPC.Size * 0.5f - NPC.rotation.ToRotationVector2() * Math.Sign(NPC.velocity.X) * 8f; if (segmentAreaTopLeft.X > segmentPositions[i].X) segmentAreaTopLeft.X = segmentPositions[i].X; if (segmentAreaTopLeft.Y > segmentPositions[i].Y) @@ -234,7 +230,7 @@ namespace CalamityMod.NPCs.AcidRain Vector2 tailDrawPosition = segmentPositions[^1] - tailRotation.ToRotationVector2() * 4f; SpriteEffects tailDirection = NPC.velocity.X < 0f ? SpriteEffects.None : SpriteEffects.FlipVertically; Main.EntitySpriteDraw(tailTexture, tailDrawPosition, tailArea, NPC.GetAlpha(Color.White), tailRotation, tailArea.Size() * new Vector2(0f, 0.5f), NPC.scale, tailDirection, 0); - SegmentDrawer.Draw(segmentPositions, Vector2.Zero, 36); + PrimitiveSet.Prepare(segmentPositions, new(SegmentWidthFunction, _ => NPC.GetAlpha(Color.White), pixelate: false, shader: GameShaders.Misc["CalamityMod:PrimitiveTexture"]), 36); } return false; diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index eec03a58fc..aa350c4a84 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -1,4 +1,5 @@ using CalamityMod.Events; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Potions; using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.NPCs.ExoMechs.Ares; @@ -117,13 +118,6 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo // Intensity of flash effects during the charge combo public float ChargeComboFlash; - // Primitive trail drawers for thrusters when charging - public PrimitiveTrail ChargeFlameTrail = null; - public PrimitiveTrail ChargeFlameTrailBig = null; - - // Primitive trail drawer for the ribbon things - public PrimitiveTrail RibbonTrail = null; - public static string NameToDisplay = "XS-03 Apollo"; public static readonly SoundStyle MissileLaunchSound = new("CalamityMod/Sounds/Custom/ExoMechs/ApolloMissileLaunch") { Volume = 1.3f }; @@ -1498,16 +1492,6 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - // Declare the trail drawers if they have yet to be defined. - if (ChargeFlameTrail is null) - ChargeFlameTrail = new PrimitiveTrail(FlameTrailWidthFunction, FlameTrailColorFunction, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - - if (ChargeFlameTrailBig is null) - ChargeFlameTrailBig = new PrimitiveTrail(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - - if (RibbonTrail is null) - RibbonTrail = new PrimitiveTrail(RibbonTrailWidthFunction, RibbonTrailColorFunction); - // Prepare the flame trail shader with its map texture. GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); @@ -1570,7 +1554,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo currentSegmentRotation += segmentRotationOffset; } - RibbonTrail.Draw(ribbonDrawPositions, -screenPos, 66); + PrimitiveSet.Prepare(ribbonDrawPositions, new(RibbonTrailWidthFunction, RibbonTrailColorFunction), 66); } int instanceCount = (int)MathHelper.Lerp(1f, 15f, ChargeComboFlash); @@ -1635,11 +1619,12 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo for (int i = 0; i < 4; i++) { Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 8f; - ChargeFlameTrailBig.Draw(drawPositions, drawOffset - screenPos, 70); + PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, (_) => drawOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } else - ChargeFlameTrail.Draw(drawPositions, -screenPos, 70); + PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunction, FlameTrailColorFunction, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); + } } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 30a8c47ef6..2345f31467 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -1,4 +1,5 @@ using CalamityMod.Events; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; @@ -94,10 +95,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public ThanatosSmokeParticleSet SmokeDrawer = new ThanatosSmokeParticleSet(-1, 3, 0f, 16f, 1.5f); - // Drawers for arm segments. - public PrimitiveTrail LightningDrawer; - public PrimitiveTrail LightningBackgroundDrawer; - // This stores the sound slot of the deathray sound Ares makes, so it may be properly updated in terms of position and looped. public SlotId DeathraySoundSlot; @@ -1279,11 +1276,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public void DrawArm(SpriteBatch spriteBatch, Vector2 handPosition, Vector2 screenOffset, Color glowmaskColor, int direction, bool backArm) { - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - if (LightningBackgroundDrawer is null) - LightningBackgroundDrawer = new PrimitiveTrail(BackgroundWidthFunction, BackgroundColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - SpriteEffects spriteDirection = direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; float distanceFromHand = NPC.Distance(handPosition); float frameTime = Main.GlobalTimeWrappedHourly * 0.9f % 1f; @@ -1336,13 +1328,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.Opacity > 0f && !NPC.IsABestiaryIconDummy) { List arm2ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(armSegmentDrawPosition, arm2DrawPosition + arm2Rotation.ToRotationVector2() * -direction * 20f, 250290787); - LightningBackgroundDrawer.Draw(arm2ElectricArcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(arm2ElectricArcPoints, -Main.screenPosition, 90); + PrimitiveSet.Prepare(arm2ElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveSet.Prepare(arm2ElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); // Draw electricity between the final arm and the hand. List handElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm2DrawPosition - arm2Rotation.ToRotationVector2() * direction * 100f, handPosition, 27182); - LightningBackgroundDrawer.Draw(handElectricArcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(handElectricArcPoints, -Main.screenPosition, 90); + PrimitiveSet.Prepare(handElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveSet.Prepare(handElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } shoulderDrawPosition += Vector2.UnitY * NPC.gfxOffY - screenOffset; @@ -1398,13 +1390,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.Opacity > 0f && !NPC.IsABestiaryIconDummy) { List arm2ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm1DrawPosition - arm2Rotation.ToRotationVector2() * direction * 10f, arm1DrawPosition + arm2Rotation.ToRotationVector2() * direction * 20f, 31416); - LightningBackgroundDrawer.Draw(arm2ElectricArcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(arm2ElectricArcPoints, -Main.screenPosition, 90); + PrimitiveSet.Prepare(arm2ElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveSet.Prepare(arm2ElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); // Draw electricity between the final arm and the hand. List handElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm2DrawPosition - arm2Rotation.ToRotationVector2() * direction * 20f, handPosition, 27182); - LightningBackgroundDrawer.Draw(handElectricArcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(handElectricArcPoints, -Main.screenPosition, 90); + PrimitiveSet.Prepare(handElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveSet.Prepare(handElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } shoulderDrawPosition += Vector2.UnitY * NPC.gfxOffY - screenOffset; diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index b97a1a5fd9..b417ddd3b6 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -1,4 +1,5 @@ using CalamityMod.Events; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Potions; using CalamityMod.NPCs.ExoMechs.Ares; using CalamityMod.NPCs.ExoMechs.Thanatos; @@ -148,13 +149,6 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Intensity of flash effects during the charge combo public float ChargeFlash; - // Primitive trail drawers for thrusters when charging - public PrimitiveTrail ChargeFlameTrail = null; - public PrimitiveTrail ChargeFlameTrailBig = null; - - // Primitive trail drawer for the ribbon things - public PrimitiveTrail RibbonTrail = null; - //This stores the sound slot of the ML laser sound it makes, so it may be properly updated in terms of position. private SlotId DeathraySoundSlot; @@ -1392,16 +1386,6 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - // Declare the trail drawers if they have yet to be defined. - if (ChargeFlameTrail is null) - ChargeFlameTrail = new PrimitiveTrail(FlameTrailWidthFunction, FlameTrailColorFunction, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - - if (ChargeFlameTrailBig is null) - ChargeFlameTrailBig = new PrimitiveTrail(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - - if (RibbonTrail is null) - RibbonTrail = new PrimitiveTrail(RibbonTrailWidthFunction, RibbonTrailColorFunction); - // Prepare the flame trail shader with its map texture. GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); @@ -1464,7 +1448,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis currentSegmentRotation += segmentRotationOffset; } - RibbonTrail.Draw(ribbonDrawPositions, -screenPos, 66); + PrimitiveSet.Prepare(ribbonDrawPositions, new(RibbonTrailWidthFunction, RibbonTrailColorFunction), 66); } int instanceCount = (int)MathHelper.Lerp(1f, 15f, ChargeFlash); @@ -1529,11 +1513,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis for (int i = 0; i < 4; i++) { Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 8f; - ChargeFlameTrailBig.Draw(drawPositions, drawOffset - screenPos, 70); + PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, (_) => drawOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } else - ChargeFlameTrail.Draw(drawPositions, -screenPos, 70); + PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunction, FlameTrailColorFunction, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } diff --git a/NPCs/SupremeCalamitas/BrimstoneHeart.cs b/NPCs/SupremeCalamitas/BrimstoneHeart.cs index 397b1b1bf0..23144ecd84 100644 --- a/NPCs/SupremeCalamitas/BrimstoneHeart.cs +++ b/NPCs/SupremeCalamitas/BrimstoneHeart.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Projectiles.Rogue; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -13,7 +14,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas { public class BrimstoneHeart : ModNPC { - public PrimitiveTrail ChainDrawer = null; public int ChainHeartIndex => (int)NPC.ai[0]; public List ChainEndpoints = new(); public override void SetStaticDefaults() @@ -113,8 +113,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - if (ChainDrawer is null) - ChainDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction); if (NPC.IsABestiaryIconDummy) return true; @@ -125,7 +123,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.Center, ChainEndpoints[i] + NPC.DirectionTo(ChainEndpoints[i]) * 25f }; - ChainDrawer.Draw(points, -screenPos, 40); + PrimitiveSet.Prepare(points, new(PrimitiveWidthFunction, PrimitiveColorFunction), 40); } return true; diff --git a/Projectiles/Boss/ApolloChargeTelegraph.cs b/Projectiles/Boss/ApolloChargeTelegraph.cs index 508eafd00c..a5bb6afc74 100644 --- a/Projectiles/Boss/ApolloChargeTelegraph.cs +++ b/Projectiles/Boss/ApolloChargeTelegraph.cs @@ -1,4 +1,5 @@ using CalamityMod.Events; +using CalamityMod.Graphics.Primitives; using CalamityMod.World; using Microsoft.Xna.Framework; using System.IO; @@ -17,7 +18,6 @@ namespace CalamityMod.Projectiles.Boss public NPC ThingToAttachTo => Main.npc.IndexInRange((int)Projectile.ai[1]) ? Main.npc[(int)Projectile.ai[1]] : null; - public PrimitiveTrail TelegraphDrawer = null; public const float TelegraphFadeTime = 15f; public const float TelegraphWidth = 1132.07774f; // a squared plus b squared equals c squared, dumbass @@ -113,9 +113,6 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - if (TelegraphDrawer is null) - TelegraphDrawer = new PrimitiveTrail(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:Flame"]); - GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.41f); @@ -131,7 +128,7 @@ namespace CalamityMod.Projectiles.Boss // It is not used anywhere else. Projectile.ai[0] = i; - TelegraphDrawer.Draw(positions, Projectile.Size * 0.5f - Main.screenPosition, 55); + PrimitiveSet.Prepare(positions, new(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, (_) => Projectile.Size * 0.5f, smoothen: false, shader: GameShaders.Misc["CalamityMod:Flame"]), 55); } return false; } diff --git a/Projectiles/Boss/AresTeslaOrb.cs b/Projectiles/Boss/AresTeslaOrb.cs index 499fcd342c..99d55c8eba 100644 --- a/Projectiles/Boss/AresTeslaOrb.cs +++ b/Projectiles/Boss/AresTeslaOrb.cs @@ -1,4 +1,5 @@ using CalamityMod.Events; +using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs; using CalamityMod.NPCs.ExoMechs.Ares; using CalamityMod.World; @@ -16,8 +17,6 @@ namespace CalamityMod.Projectiles.Boss { public new string LocalizationCategory => "Projectiles.Boss"; public ref float Identity => ref Projectile.ai[0]; - public PrimitiveTrail LightningDrawer; - public PrimitiveTrail LightningBackgroundDrawer; private const int timeLeft = 480; public override void SetStaticDefaults() @@ -226,17 +225,12 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - if (LightningBackgroundDrawer is null) - LightningBackgroundDrawer = new PrimitiveTrail(BackgroundWidthFunction, BackgroundColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - Projectile orbToAttachTo = GetOrbToAttachTo(); if (orbToAttachTo != null) { List arcPoints = DetermineElectricArcPoints(Projectile.Center, orbToAttachTo.Center, 117); - LightningBackgroundDrawer.Draw(arcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(arcPoints, -Main.screenPosition, 90); + PrimitiveSet.Prepare(arcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveSet.Prepare(arcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Boss/ArtemisChargeTelegraph.cs b/Projectiles/Boss/ArtemisChargeTelegraph.cs index 356a3035a0..fd7e3467be 100644 --- a/Projectiles/Boss/ArtemisChargeTelegraph.cs +++ b/Projectiles/Boss/ArtemisChargeTelegraph.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; using System.IO; using Terraria; using Terraria.Graphics.Shaders; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Boss public NPC ThingToAttachTo => Main.npc.IndexInRange((int)Projectile.ai[1]) ? Main.npc[(int)Projectile.ai[1]] : null; public Vector2 OldVelocity; - public PrimitiveTrail TelegraphDrawer = null; public const float TelegraphWidth = 2000f; public override void SetStaticDefaults() @@ -89,9 +89,6 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - if (TelegraphDrawer is null) - TelegraphDrawer = new PrimitiveTrail(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, specialShader: GameShaders.Misc["CalamityMod:Flame"]); - GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.28f); Vector2[] drawPositions = new Vector2[] @@ -99,8 +96,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.Center, Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitY) * TelegraphWidth }; - - TelegraphDrawer.Draw(drawPositions, Projectile.Size * 0.5f - Main.screenPosition, 87); + PrimitiveSet.Prepare(drawPositions, new(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:Flame"]), 87); return false; } } diff --git a/Projectiles/Boss/ArtemisSpinLaserbeam.cs b/Projectiles/Boss/ArtemisSpinLaserbeam.cs index 9833e6233a..6a55ac5076 100644 --- a/Projectiles/Boss/ArtemisSpinLaserbeam.cs +++ b/Projectiles/Boss/ArtemisSpinLaserbeam.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs.ExoMechs.Artemis; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; @@ -17,11 +18,6 @@ namespace CalamityMod.Projectiles.Boss public class ArtemisSpinLaserbeam : BaseLaserbeamProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; - public PrimitiveTrail LaserDrawer - { - get; - set; - } = null; public int OwnerIndex { @@ -136,7 +132,6 @@ namespace CalamityMod.Projectiles.Boss // This should never happen, but just in case. if (Projectile.velocity == Vector2.Zero) return false; - LaserDrawer ??= new(LaserWidthFunction, LaserColorFunction, null, GameShaders.Misc["CalamityMod:ArtemisLaser"]); Vector2 laserEnd = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitY) * LaserLength; Vector2[] baseDrawPoints = new Vector2[8]; @@ -147,8 +142,7 @@ namespace CalamityMod.Projectiles.Boss GameShaders.Misc["CalamityMod:ArtemisLaser"].UseColor(Color.Cyan); GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage1("Images/Extra_189"); GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage2("Images/Misc/Perlin"); - - LaserDrawer.Draw(baseDrawPoints, -Main.screenPosition, 64); + PrimitiveSet.Prepare(baseDrawPoints, new(LaserWidthFunction, LaserColorFunction, shader: GameShaders.Misc["CalamityMod:ArtemisLaser"]), 64); return false; } diff --git a/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs b/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs index 1c5aa96e60..49bfa8f1d4 100644 --- a/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs +++ b/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs.SupremeCalamitas; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -17,7 +18,6 @@ namespace CalamityMod.Projectiles.Boss public override string Texture => "CalamityMod/Projectiles/Melee/PrismTooth"; - internal PrimitiveTrail TrailDrawer; public const int Lifetime = 80; public NPC Cirrus => Main.npc.IndexInRange((int)Projectile.ai[2]) ? Main.npc[(int)Projectile.ai[2]] : null; @@ -138,9 +138,6 @@ namespace CalamityMod.Projectiles.Boss if (Time <= 5f) return true; - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:PrismaticStreak"]); - // Variable adjustment vector used to prevent the trail for starting somewhat that isn't behind // the crystal. This may appear in small amounts, with offsets of a few pixels, but at the speed // these crystals go, it's probably not something to worry too much about. @@ -158,7 +155,7 @@ namespace CalamityMod.Projectiles.Boss Main.spriteBatch.EnterShaderRegion(); GameShaders.Misc["CalamityMod:PrismaticStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f + generalOffset - Main.screenPosition, 65); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + generalOffset, shader: GameShaders.Misc["CalamityMod:PrismaticStreak"]), 65); Main.spriteBatch.ExitShaderRegion(); return true; } diff --git a/Projectiles/Boss/DraedonSummonLaser.cs b/Projectiles/Boss/DraedonSummonLaser.cs index 530ceaae74..a14e209bfc 100644 --- a/Projectiles/Boss/DraedonSummonLaser.cs +++ b/Projectiles/Boss/DraedonSummonLaser.cs @@ -7,6 +7,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; using CalamityMod.Items.Weapons.DraedonsArsenal; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Boss { @@ -17,7 +18,6 @@ namespace CalamityMod.Projectiles.Boss public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public PrimitiveTrail RayDrawer = null; private const int Lifetime = CalamityWorld.DraedonSummonCountdownMax - 60; public override void SetStaticDefaults() @@ -80,17 +80,14 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - if (RayDrawer is null) - RayDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:Flame"]); - GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); Vector2[] basePoints = new Vector2[8]; for (int i = 0; i < basePoints.Length; i++) basePoints[i] = Projectile.Center - Vector2.UnitY * i / basePoints.Length * LaserLength; - Vector2 overallOffset = Projectile.Size * 0.5f - Main.screenPosition; - RayDrawer.Draw(basePoints, overallOffset, 92); + Vector2 overallOffset = Projectile.Size * 0.5f; + PrimitiveSet.Prepare(basePoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => overallOffset, shader: GameShaders.Misc["CalamityMod:Flame"]), 92); return false; } diff --git a/Projectiles/Boss/DyingSun.cs b/Projectiles/Boss/DyingSun.cs index 6b84165ff6..eaa8d6dbed 100644 --- a/Projectiles/Boss/DyingSun.cs +++ b/Projectiles/Boss/DyingSun.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using CalamityMod.Graphics.Primitives; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -12,7 +13,6 @@ namespace CalamityMod.Projectiles.Boss public class DyingSun : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; - public PrimitiveTrail FireDrawer; public ref float Time => ref Projectile.ai[0]; public ref float Radius => ref Projectile.ai[1]; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -51,9 +51,6 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - if (FireDrawer is null) - FireDrawer = new PrimitiveTrail(SunWidthFunction, SunColorFunction, null, GameShaders.Misc["CalamityMod:Flame"]); - GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.45f); GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); @@ -72,8 +69,7 @@ namespace CalamityMod.Projectiles.Boss rotationPoints.Add(adjustedAngle); drawPoints.Add(Vector2.Lerp(Projectile.Center - offsetDirection * Radius / 2f, Projectile.Center + offsetDirection * Radius / 2f, i / 16f)); } - - FireDrawer.Draw(drawPoints, -Main.screenPosition, 24); + PrimitiveSet.Prepare(drawPoints, new(SunWidthFunction, SunColorFunction, shader: GameShaders.Misc["CalamityMod:Flame"]), 24); } return false; } diff --git a/Projectiles/Boss/InfernadoRevenge.cs b/Projectiles/Boss/InfernadoRevenge.cs index 888954ad7f..aa22ca54c2 100644 --- a/Projectiles/Boss/InfernadoRevenge.cs +++ b/Projectiles/Boss/InfernadoRevenge.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; +using CalamityMod.Graphics.Primitives; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.IO; @@ -13,7 +14,6 @@ namespace CalamityMod.Projectiles.Boss public class InfernadoRevenge : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; - internal PrimitiveTrail TornadoDrawer; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public const int TornadoHeight = 8800; public override void SetStaticDefaults() @@ -72,9 +72,6 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - if (TornadoDrawer is null) - TornadoDrawer = new PrimitiveTrail(_ => Projectile.width * 0.5f + 16f, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:Bordernado"]); - GameShaders.Misc["CalamityMod:Bordernado"].UseSaturation(-0.2f); GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request("Terraria/Images/Misc/Perlin")); Vector2[] drawPoints = new Vector2[5]; @@ -87,7 +84,7 @@ namespace CalamityMod.Projectiles.Boss drawPoints[i] = Vector2.Lerp(top, bottom, i / (float)(drawPoints.Length - 1)); drawPoints[drawPoints.Length - 1] = bottom; - TornadoDrawer.Draw(drawPoints, -Main.screenPosition, 85); + PrimitiveSet.Prepare(drawPoints, new((_) => Projectile.width * 0.5f + 16f, ColorFunction, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 85); Texture2D vortexTexture = ModContent.Request("CalamityMod/Projectiles/Boss/OldDukeVortex").Value; for (int i = 0; i < 110; i++) diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index 972f61dcda..3707159fce 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -1,4 +1,5 @@ using CalamityMod.Dusts; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items; using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Items.Weapons.Ranged; @@ -271,7 +272,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } - internal PrimitiveTrail TrailDrawer; internal Color ColorFunction(float completionRatio) { float averageRotation = Projectile.oldRot.Take(20).Average(angle => MathHelper.WrapAngle(angle) + MathHelper.Pi); @@ -307,9 +307,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]); - GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SwordSlashTexture")); Player player = Main.player[Projectile.owner]; @@ -327,8 +324,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float angularTurn = i * swingAngularDirection * -0.09f; drawPoints[i] = Projectile.position + perpendicularDirection.RotatedBy(angularTurn) * offsetFactor; } + PrimitiveSet.Prepare(drawPoints, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + bladeOffset, shader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]), 50); - TrailDrawer.Draw(drawPoints, Projectile.Size * 0.5f + bladeOffset - Main.screenPosition, 50); Main.EntitySpriteDraw(bladeTexture, Projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, Projectile.rotation + MathHelper.PiOver2, origin, Projectile.scale, SpriteEffects.None, 0); Main.EntitySpriteDraw(hiltTexture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs b/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs index fbdbb0d135..9659a70e50 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Particles; using Microsoft.Xna.Framework; @@ -184,10 +185,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 origin = frame.Size() * 0.5f; Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); - PrimitiveTrail trail = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); - trail.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 92); - + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 92); return false; } } diff --git a/Projectiles/Enemy/GammRayBurst.cs b/Projectiles/Enemy/GammRayBurst.cs index cbc1e035da..a4e3fe6007 100644 --- a/Projectiles/Enemy/GammRayBurst.cs +++ b/Projectiles/Enemy/GammRayBurst.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs.AcidRain; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; @@ -17,11 +18,6 @@ namespace CalamityMod.Projectiles.Enemy public class GammaRayBurst : BaseLaserbeamProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Enemy"; - public PrimitiveTrail LaserDrawer - { - get; - set; - } = null; public int OwnerIndex { @@ -112,7 +108,6 @@ namespace CalamityMod.Projectiles.Enemy // This should never happen, but just in case. if (Projectile.velocity == Vector2.Zero) return false; - LaserDrawer ??= new(LaserWidthFunction, LaserColorFunction, null, GameShaders.Misc["CalamityMod:ArtemisLaser"]); Vector2 laserEnd = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitY) * LaserLength; Vector2[] baseDrawPoints = new Vector2[8]; @@ -124,7 +119,7 @@ namespace CalamityMod.Projectiles.Enemy GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage1("Images/Extra_189"); GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage2("Images/Misc/Perlin"); - LaserDrawer.Draw(baseDrawPoints, -Main.screenPosition, 64); + PrimitiveSet.Prepare(baseDrawPoints, new(LaserWidthFunction, LaserColorFunction, shader: GameShaders.Misc["CalamityMod:ArtemisLaser"]), 64); return false; } diff --git a/Projectiles/Magic/ApotheosisEnergy.cs b/Projectiles/Magic/ApotheosisEnergy.cs index eead2d2676..3b07f3cd4f 100644 --- a/Projectiles/Magic/ApotheosisEnergy.cs +++ b/Projectiles/Magic/ApotheosisEnergy.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; @@ -8,7 +9,6 @@ namespace CalamityMod.Projectiles.Magic public class ApotheosisEnergy : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - internal PrimitiveTrail TrailDrawer = null; public override void SetStaticDefaults() { @@ -88,10 +88,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction); - - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 85); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 85); return false; } } diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index 763c943aed..5df5a7651c 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Magic public class ArtAttackStar : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - public PrimitiveTrail TrailDrawer = null; public Player Owner => Main.player[Projectile.owner]; public ref float Time => ref Projectile.ai[0]; public const int StarShapeCreationDelay = 12; @@ -217,9 +217,6 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(TrailWidth, TrailColor, null, GameShaders.Misc["CalamityMod:ArtAttack"]); - Texture2D texture = ModContent.Request(Texture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Vector2 origin = texture.Size() * 0.5f; @@ -228,7 +225,7 @@ namespace CalamityMod.Projectiles.Magic GameShaders.Misc["CalamityMod:ArtAttack"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); GameShaders.Misc["CalamityMod:ArtAttack"].Apply(); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 180); + PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ArtAttack"]), 180); Main.spriteBatch.ExitShaderRegion(); Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(Color.White), Projectile.rotation, origin, Projectile.scale, 0, 0); diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index cbc6cf6de6..687f365e50 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -16,7 +17,6 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - internal PrimitiveTrail LemniscateDrawer = null; public int TargetNPCIndex { get => (int)Projectile.ai[0]; @@ -228,11 +228,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (LemniscateDrawer is null) - LemniscateDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, null, GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/EternityStreak")); - LemniscateDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 84); + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 84); return false; } } diff --git a/Projectiles/Magic/ExoVortex.cs b/Projectiles/Magic/ExoVortex.cs index e6f3720f81..6c6d692ac4 100644 --- a/Projectiles/Magic/ExoVortex.cs +++ b/Projectiles/Magic/ExoVortex.cs @@ -7,13 +7,13 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Magic { public class ExoVortex : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - public PrimitiveTrail EnergyTrail = null; public float Hue => Projectile.ai[0]; @@ -105,6 +105,8 @@ namespace CalamityMod.Projectiles.Magic return c * Utils.GetLerpValue(0.04f, 0.2f, completionRatio, true) * velocityOpacityFadeout; } + public Vector2 PrimitiveOffsetFunction(float completionRatio) => Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.Zero) * Projectile.scale * 2f; + public override bool PreDraw(ref Color lightColor) { Main.spriteBatch.EnterShaderRegion(BlendState.Additive); @@ -114,10 +116,8 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.EnterShaderRegion(); // Draw the streak trail. - EnergyTrail ??= new(PrimitiveWidthFunction, PrimitiveTrailColor, null, GameShaders.Misc["CalamityMod:SideStreakTrail"]); - GameShaders.Misc["CalamityMod:SideStreakTrail"].UseImage1("Images/Misc/Perlin"); - EnergyTrail.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.Zero) * Projectile.scale * 2f, 51); + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveTrailColor, PrimitiveOffsetFunction, shader: GameShaders.Misc["CalamityMod:SideStreakTrail"]), 51); Main.spriteBatch.EnterShaderRegion(BlendState.Additive); GameShaders.Misc["CalamityMod:ExoVortex"].Apply(); diff --git a/Projectiles/Magic/ExoVortex2.cs b/Projectiles/Magic/ExoVortex2.cs index 4702883dab..709bc151f2 100644 --- a/Projectiles/Magic/ExoVortex2.cs +++ b/Projectiles/Magic/ExoVortex2.cs @@ -7,13 +7,13 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Magic { public class ExoVortex2 : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - public PrimitiveTrail EnergyTrail = null; public float Hue => Projectile.ai[0]; @@ -109,6 +109,8 @@ namespace CalamityMod.Projectiles.Magic return c * Utils.GetLerpValue(0.04f, 0.2f, completionRatio, true) * velocityOpacityFadeout; } + public Vector2 PrimitiveOffsetFunction(float completionRatio) => Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.Zero) * Projectile.scale * 2f; + public override bool PreDraw(ref Color lightColor) { Main.spriteBatch.EnterShaderRegion(BlendState.Additive); @@ -118,10 +120,8 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.EnterShaderRegion(); // Draw the streak trail. - EnergyTrail ??= new(PrimitiveWidthFunction, PrimitiveTrailColor, null, GameShaders.Misc["CalamityMod:SideStreakTrail"]); - GameShaders.Misc["CalamityMod:SideStreakTrail"].UseImage1("Images/Misc/Perlin"); - EnergyTrail.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.Zero) * Projectile.scale * 2f, 51); + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveTrailColor, PrimitiveOffsetFunction, shader: GameShaders.Misc["CalamityMod:SideStreakTrail"]), 51); Main.spriteBatch.EnterShaderRegion(BlendState.Additive); GameShaders.Misc["CalamityMod:ExoVortex"].Apply(); diff --git a/Projectiles/Magic/FabBolt.cs b/Projectiles/Magic/FabBolt.cs index 7dde3ba8c4..aaa9f19de2 100644 --- a/Projectiles/Magic/FabBolt.cs +++ b/Projectiles/Magic/FabBolt.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -10,7 +11,6 @@ namespace CalamityMod.Projectiles.Magic public class FabBolt : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - internal PrimitiveTrail TrailDrawer; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public bool FadingOut @@ -71,11 +71,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 80, Projectile.oldRot); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, smoothen: false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 80); return false; } diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index c9823efc97..a8549dc517 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using CalamityMod.Graphics.Primitives; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -12,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic public class FabRay : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - internal PrimitiveTrail TrailDrawer; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() @@ -100,13 +101,12 @@ namespace CalamityMod.Projectiles.Magic return MathHelper.Lerp(0f, 32f * Projectile.Opacity, expansionCompletion); } + internal Vector2 OffsetFunction(float completionRatio) => Projectile.Size * 0.5f; + public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 32); + PrimitiveSet.Prepare(Projectile.oldPos, new PrimitiveSettings(WidthFunction, ColorFunction, OffsetFunction, pixelate: false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 32); return false; } diff --git a/Projectiles/Magic/RainbowRocket.cs b/Projectiles/Magic/RainbowRocket.cs index 3fd639b4f8..5f877720b9 100644 --- a/Projectiles/Magic/RainbowRocket.cs +++ b/Projectiles/Magic/RainbowRocket.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Magic { @@ -24,7 +25,6 @@ namespace CalamityMod.Projectiles.Magic Count = 7 } - internal PrimitiveTrail TrailDrawer = null; public ref float Time => ref Projectile.ai[0]; public PartyCannonExplosionType RocketType { @@ -135,11 +135,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction); - Projectile.oldPos[0] = Projectile.position + Projectile.velocity.SafeNormalize(Vector2.Zero) * 50f; - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + Projectile.velocity, 80); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity), 80); Texture2D rocketTexture = ModContent.Request(Texture).Value; Main.EntitySpriteDraw(rocketTexture, diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index 86ab25cc1b..8730747df1 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Graphics.Metaballs; +using CalamityMod.Graphics.Primitives; using CalamityMod.World; using Microsoft.Xna.Framework; using System; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Magic public class RancorLaserbeam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - public PrimitiveTrail RayDrawer = null; public Player Owner => Main.player[Projectile.owner]; public Projectile MagicCircle { @@ -162,16 +162,13 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - RayDrawer ??= new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:Flame"]); - GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); Vector2[] basePoints = new Vector2[24]; for (int i = 0; i < basePoints.Length; i++) basePoints[i] = Projectile.Center + Projectile.velocity * i / (basePoints.Length - 1f) * LaserLength; - Vector2 overallOffset = -Main.screenPosition; - RayDrawer.Draw(basePoints, overallOffset, 92); + PrimitiveSet.Prepare(basePoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, shader: GameShaders.Misc["CalamityMod:Flame"]), 92); return false; } diff --git a/Projectiles/Magic/WulfrumBolt.cs b/Projectiles/Magic/WulfrumBolt.cs index 370e1c8199..348177d500 100644 --- a/Projectiles/Magic/WulfrumBolt.cs +++ b/Projectiles/Magic/WulfrumBolt.cs @@ -9,6 +9,7 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using CalamityMod.Particles; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Magic { @@ -38,7 +39,6 @@ namespace CalamityMod.Projectiles.Magic public static float HomingRange = 250; public static float HomingAngle = MathHelper.PiOver4 * 1.65f; - internal PrimitiveTrail TrailDrawer; internal Color PrimColorMult = Color.White; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -191,20 +191,15 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 3.5f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + offset, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); - - Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/CosmicShivAura.cs b/Projectiles/Melee/CosmicShivAura.cs index 39e903edfb..ff62c67b0e 100644 --- a/Projectiles/Melee/CosmicShivAura.cs +++ b/Projectiles/Melee/CosmicShivAura.cs @@ -1,71 +1,71 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Melee -{ - public class CosmicShivAura : ModProjectile - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public readonly int SwordsAverageDelay = 40; - public readonly int SwordsRandomOffset = 15; - public int CurrentSwordTimer; - public NPC target; - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.timeLeft = 300; - } - - public override void OnSpawn(IEntitySource source) - { - if (Main.npc[(int)Projectile.ai[0]] is not null || Main.npc[(int)Projectile.ai[0]].active) - target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object - } - - // ai[0] for ID of target to follow until the end of projectile's lifespan or the target cannot be found - // ai[1] for sword timer - public override void AI() - { - // Unexist with target - if (target is null || !target.active) { - Projectile.Kill(); - } - - Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; // Stay with target - - if (Projectile.ai[1] == CurrentSwordTimer) - { - Vector2 randomDirection = Main.rand.NextFloat(0, MathHelper.TwoPi).ToRotationVector2(); - randomDirection.Normalize(); - int randomDistance = Main.rand.Next(200, 426); - Vector2 spawnPos = Projectile.Center + (randomDirection * randomDistance); - Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; // Sword moves a bit slower if spawned closer, moves faster if spawned further - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.8f, Projectile.owner, randomDistance); - Projectile.ai[1] = 0; // Reset timer - CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); // Determine when next sword will spawn - } - - Projectile.ai[1]++; - } - - // The aura itself should not do contact damage - public override bool? CanDamage() => false; - } -} +using System; +using System.Collections.Generic; +using System.Configuration; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class CosmicShivAura : ModProjectile + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public readonly int SwordsAverageDelay = 40; + public readonly int SwordsRandomOffset = 15; + public int CurrentSwordTimer; + public NPC target; + + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 2; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 300; + } + + public override void OnSpawn(IEntitySource source) + { + if (Main.npc[(int)Projectile.ai[0]] is not null || Main.npc[(int)Projectile.ai[0]].active) + target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object + } + + // ai[0] for ID of target to follow until the end of projectile's lifespan or the target cannot be found + // ai[1] for sword timer + public override void AI() + { + // Unexist with target + if (target is null || !target.active) { + Projectile.Kill(); + } + + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; // Stay with target + + if (Projectile.ai[1] == CurrentSwordTimer) + { + Vector2 randomDirection = Main.rand.NextFloat(0, MathHelper.TwoPi).ToRotationVector2(); + randomDirection.Normalize(); + int randomDistance = Main.rand.Next(200, 426); + Vector2 spawnPos = Projectile.Center + (randomDirection * randomDistance); + Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; // Sword moves a bit slower if spawned closer, moves faster if spawned further + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.8f, Projectile.owner, randomDistance); + Projectile.ai[1] = 0; // Reset timer + CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); // Determine when next sword will spawn + } + + Projectile.ai[1]++; + } + + // The aura itself should not do contact damage + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Melee/EonBolt.cs b/Projectiles/Melee/EonBolt.cs index b518b8ee34..d1ddcad5d6 100644 --- a/Projectiles/Melee/EonBolt.cs +++ b/Projectiles/Melee/EonBolt.cs @@ -7,13 +7,13 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { public class EonBolt : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - internal PrimitiveTrail TrailDrawer; public override string Texture => "CalamityMod/Projectiles/Melee/GalaxiaBolt"; @@ -102,15 +102,11 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); Texture2D texture = Request("CalamityMod/Projectiles/Melee/GalaxiaBolt").Value; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.White, 0.5f), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - return false; } } diff --git a/Projectiles/Melee/Exobeam.cs b/Projectiles/Melee/Exobeam.cs index d26bb9b959..7c8c37c4a7 100644 --- a/Projectiles/Melee/Exobeam.cs +++ b/Projectiles/Melee/Exobeam.cs @@ -11,6 +11,7 @@ using static Terraria.ModLoader.ModContent; using System; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { @@ -21,8 +22,6 @@ namespace CalamityMod.Projectiles.Melee public static float MaxWidth = 30; public ref float Time => ref Projectile.ai[0]; - public PrimitiveTrail TrailDrawer = null; - public PrimitiveTrail MiniTrailDrawer = null; public static Asset BloomTex; public static Asset SlashTex; @@ -148,10 +147,6 @@ namespace CalamityMod.Projectiles.Melee //Draw the blade. Main.EntitySpriteDraw(texture, Projectile.oldPos[2] + Projectile.Size / 2f - Main.screenPosition, null, Color.White with { A = 0 }, Projectile.rotation + MathHelper.PiOver4, texture.Size() / 2f, bladeScale * Projectile.scale, 0, 0); - - - - if (BloomTex == null) BloomTex = ModContent.Request("CalamityMod/Particles/BloomCircle"); Texture2D bloomTex = BloomTex.Value; @@ -163,10 +158,6 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(bloomTex, Projectile.oldPos[2] + Projectile.Size / 2f - Main.screenPosition, null, (mainColor * 0.1f) with { A = 0 }, 0, bloomTex.Size() / 2f, 1.3f * Projectile.scale, 0, 0); Main.EntitySpriteDraw(bloomTex, Projectile.oldPos[1] + Projectile.Size / 2f - Main.screenPosition, null, (mainColor * 0.5f) with { A = 0 }, 0, bloomTex.Size() / 2f, 0.34f * Projectile.scale, 0, 0); - - TrailDrawer ??= new(TrailWidth, TrailColor, null, GameShaders.Misc["CalamityMod:ExobladePierce"]); - MiniTrailDrawer ??= new(MiniTrailWidth, MiniTrailColor, null, GameShaders.Misc["CalamityMod:ExobladePierce"]); - Main.spriteBatch.EnterShaderRegion(); if (TrailTex == null) @@ -180,21 +171,18 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:ExobladePierce"].Apply(); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 30, Projectile.oldRot); + PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); GameShaders.Misc["CalamityMod:ExobladePierce"].UseColor(Color.White); GameShaders.Misc["CalamityMod:ExobladePierce"].UseSecondaryColor(Color.White); - MiniTrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 30, Projectile.oldRot); + PrimitiveSet.Prepare(Projectile.oldPos, new(MiniTrailWidth, MiniTrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); Main.spriteBatch.ExitShaderRegion(); //Draw the bloom above the trail Main.EntitySpriteDraw(bloomTex, Projectile.oldPos[2] + Projectile.Size / 2f - Main.screenPosition, null, (Color.White * 0.2f) with { A = 0 }, 0, bloomTex.Size() / 2f, 0.78f * Projectile.scale, 0, 0); - Main.EntitySpriteDraw(bloomTex, Projectile.oldPos[1] + Projectile.Size / 2f - Main.screenPosition, null, (Color.White * 0.5f) with { A = 0 }, 0, bloomTex.Size() / 2f, 0.2f * Projectile.scale, 0, 0); - - - + Main.EntitySpriteDraw(bloomTex, Projectile.oldPos[1] + Projectile.Size / 2f - Main.screenPosition, null, (Color.White * 0.5f) with { A = 0 }, 0, bloomTex.Size() / 2f, 0.2f * Projectile.scale, 0, 0); return false; } } diff --git a/Projectiles/Melee/ExobladeProj.cs b/Projectiles/Melee/ExobladeProj.cs index f5f53cd703..e0be4a3565 100644 --- a/Projectiles/Melee/ExobladeProj.cs +++ b/Projectiles/Melee/ExobladeProj.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; @@ -25,10 +26,6 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public Player Owner => Main.player[Projectile.owner]; - public PrimitiveTrail SlashDrawer = null; - - public PrimitiveTrail PierceAfterimageDrawer = null; - const float BladeLength = 180; public int GetSwingTime @@ -454,10 +451,6 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.Opacity <= 0f || InPostBonkStasis) return false; - // Initialize the primitives drawers. - SlashDrawer ??= new(SlashWidthFunction, SlashColorFunction, null, GameShaders.Misc["CalamityMod:ExobladeSlash"]); - PierceAfterimageDrawer ??= new(PierceWidthFunction, PierceColorFunction, null, GameShaders.Misc["CalamityMod:ExobladePierce"]); - DrawSlash(); DrawPierceTrail(); DrawBlade(); @@ -480,7 +473,7 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:ExobladeSlash"].Shader.Parameters["flipped"].SetValue(Direction == 1); GameShaders.Misc["CalamityMod:ExobladeSlash"].Apply(); - SlashDrawer.Draw(GenerateSlashPoints(), Projectile.Center - Main.screenPosition, 95); + PrimitiveSet.Prepare(GenerateSlashPoints(), new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 95); Main.spriteBatch.ExitShaderRegion(); } @@ -499,13 +492,13 @@ namespace CalamityMod.Projectiles.Melee mainColor = Color.Lerp(Color.White, mainColor, 0.4f + 0.6f * (float)Math.Pow(LungeProgression, 0.5f)); secondaryColor = Color.Lerp(Color.White, secondaryColor, 0.4f + 0.6f * (float)Math.Pow(LungeProgression, 0.5f)); - Vector2 trailOffset = (Projectile.rotation - Direction * MathHelper.PiOver4).ToRotationVector2() * 98f + Projectile.Size * 0.5f - Main.screenPosition; + Vector2 trailOffset = (Projectile.rotation - Direction * MathHelper.PiOver4).ToRotationVector2() * 98f + Projectile.Size * 0.5f; GameShaders.Misc["CalamityMod:ExobladePierce"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/EternityStreak")); GameShaders.Misc["CalamityMod:ExobladePierce"].UseImage2("Images/Extra_189"); GameShaders.Misc["CalamityMod:ExobladePierce"].UseColor(mainColor); GameShaders.Misc["CalamityMod:ExobladePierce"].UseSecondaryColor(secondaryColor); GameShaders.Misc["CalamityMod:ExobladePierce"].Apply(); - PierceAfterimageDrawer.Draw(Projectile.oldPos.Take(51), trailOffset, 53); + PrimitiveSet.Prepare(Projectile.oldPos.Take(51), new(PierceWidthFunction, PierceColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 53); Main.spriteBatch.ExitShaderRegion(); } diff --git a/Projectiles/Melee/MarniteObliteratorProj.cs b/Projectiles/Melee/MarniteObliteratorProj.cs index 6fb40c5187..a151620d7d 100644 --- a/Projectiles/Melee/MarniteObliteratorProj.cs +++ b/Projectiles/Melee/MarniteObliteratorProj.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Tools; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Tools; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -19,7 +20,6 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Items/Tools/MarniteObliterator"; public static Asset GlowmaskTex; public static Asset BloomTex; - internal PrimitiveTrail TrailDrawer; public Player Owner => Main.player[Projectile.owner]; public ref float MoveInIntervals => ref Projectile.localAI[0]; @@ -125,7 +125,6 @@ namespace CalamityMod.Projectiles.Melee return 29.4f * completionRatio; } - public void DrawBeam(Texture2D beamTex, Vector2 direction, int beamIndex) { Vector2 startPos = Owner.MountedCenter + direction * 17f + direction.RotatedBy(MathHelper.PiOver2) * (float)Math.Cos(MathHelper.TwoPi * beamIndex / 3f + SpeenBeams * 0.06f) * 13f; @@ -174,12 +173,8 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(bloomTex, Projectile.Center - Main.screenPosition, null, Color.DeepSkyBlue * 0.3f, MathHelper.PiOver2, bloomTex.Size() / 2f, 0.3f * Projectile.scale, SpriteEffects.None, 0); - - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/DoubleTrail")); - TrailDrawer.Draw(new Vector2[] { Projectile.Center , Owner.MountedCenter - normalizedVelocity * 13f}, - Main.screenPosition, 30); + PrimitiveSet.Prepare(new Vector2[] { Projectile.Center, Owner.MountedCenter - normalizedVelocity * 13f }, new(WidthFunction, ColorFunction, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/PrismTooth.cs b/Projectiles/Melee/PrismTooth.cs index 3bd6d025e7..fb8c3375b6 100644 --- a/Projectiles/Melee/PrismTooth.cs +++ b/Projectiles/Melee/PrismTooth.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -13,7 +14,6 @@ namespace CalamityMod.Projectiles.Melee public class PrismTooth : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - internal PrimitiveTrail TrailDrawer; public const int Lifetime = 80; public Player Owner => Main.player[Projectile.owner]; public ref float ShootReach => ref Projectile.ai[0]; @@ -115,9 +115,6 @@ namespace CalamityMod.Projectiles.Melee if (Time <= 5f) return true; - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:PrismaticStreak"]); - // Variable adjustment vector used to prevent the trail for starting somewhat that isn't behind // the crystal. This may appear in small amounts, with offsets of a few pixels, but at the speed // these crystals go, it's probably not something to worry too much about. @@ -135,7 +132,7 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.EnterShaderRegion(); GameShaders.Misc["CalamityMod:PrismaticStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f + generalOffset - Main.screenPosition, 65); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + generalOffset, shader: GameShaders.Misc["CalamityMod:PrismaticStreak"]), 65); Main.spriteBatch.ExitShaderRegion(); return true; } diff --git a/Projectiles/Melee/RendingNeedle.cs b/Projectiles/Melee/RendingNeedle.cs index 60ff8d71ef..b898c7ee36 100644 --- a/Projectiles/Melee/RendingNeedle.cs +++ b/Projectiles/Melee/RendingNeedle.cs @@ -8,6 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee @@ -16,7 +17,6 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; - internal PrimitiveTrail TrailDrawer; public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; @@ -85,6 +85,7 @@ namespace CalamityMod.Projectiles.Melee return MathHelper.Lerp(0f, 14f * Projectile.scale, expansionCompletion); } + public Vector2 OffsetFunction(float completionRatio) => Projectile.Size * 0.5f - Utils.SafeNormalize(Projectile.velocity, Vector2.Zero) * 30.5f; public override bool PreDraw(ref Color lightColor) { @@ -93,11 +94,8 @@ namespace CalamityMod.Projectiles.Melee Texture2D texture = Request("CalamityMod/Projectiles/Melee/RendingNeedle").Value; - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Utils.SafeNormalize(Projectile.velocity, Vector2.Zero) * 30.5f - Main.screenPosition, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, OffsetFunction, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.White, 0.5f), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); @@ -120,8 +118,6 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; } diff --git a/Projectiles/Melee/StygianShieldAttack.cs b/Projectiles/Melee/StygianShieldAttack.cs index 48381f102e..54a1ef52a0 100644 --- a/Projectiles/Melee/StygianShieldAttack.cs +++ b/Projectiles/Melee/StygianShieldAttack.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -31,7 +32,6 @@ namespace CalamityMod.Projectiles.Melee public ref float DashTime => ref Projectile.ai[1]; public Vector2 DashDestination = Vector2.Zero; - internal PrimitiveTrail TrailDrawer; // Rawest placeholder sound public static readonly SoundStyle DashSound = new("CalamityMod/Sounds/Custom/ExoMechs/ApolloMissileLaunch") { Volume = 0.6f }; @@ -221,11 +221,9 @@ namespace CalamityMod.Projectiles.Melee Color shieldColor = Color.LightSalmon; // Main trail - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f + extraOffset - (direction * 80f), 10); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + extraOffset + Main.screenPosition - direction * 80f, + shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 10); ArrowEffect.Parameters["halfSpreadAngle"].SetValue(MathHelper.ToRadians(7.5f)); ArrowEffect.Parameters["edgeColor"].SetValue(headColor.ToVector3()); diff --git a/Projectiles/Melee/TaintedBladeSlasher.cs b/Projectiles/Melee/TaintedBladeSlasher.cs index aa3684678e..95cecc3c2c 100644 --- a/Projectiles/Melee/TaintedBladeSlasher.cs +++ b/Projectiles/Melee/TaintedBladeSlasher.cs @@ -9,13 +9,13 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; using Terraria.GameContent; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { public class TaintedBladeSlasher : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - internal PrimitiveTrail TrailDrawer = null; public ref float SwordItemID => ref Projectile.ai[1]; public ref float VerticalOffset => ref Projectile.localAI[0]; public ref float Time => ref Projectile.localAI[1]; @@ -209,9 +209,6 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:FadingSolidTrail"]); - Texture2D forearmTexture = ModContent.Request("CalamityMod/Projectiles/Melee/TaintedForearm").Value; Texture2D armTexture = ModContent.Request("CalamityMod/Projectiles/Melee/TaintedArm").Value; Texture2D handTexture = ModContent.Request("CalamityMod/Projectiles/Melee/TaintedHand").Value; @@ -248,13 +245,6 @@ namespace CalamityMod.Projectiles.Melee Vector2 top = BladeCenterPosition + BladeOffsetDirection * BladeFrame.Height * 0.5f - Main.screenPosition; Vector2 offsetToBlade = (top - bottom).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2) * 5f; - TrailDrawer.OverridingStickPointStart = BladeCenterPosition - BladeOffsetDirection * BladeFrame.Height * 0.5f + offsetToBlade - Main.screenPosition; - TrailDrawer.OverridingStickPointEnd = BladeCenterPosition + BladeOffsetDirection * BladeFrame.Height * 0.5f + offsetToBlade - Main.screenPosition; - - // Swap the ends if needed so that the trail faces the right direction. - if (Owner.direction == -1) - Utils.Swap(ref TrailDrawer.OverridingStickPointStart, ref TrailDrawer.OverridingStickPointEnd); - Vector2[] drawPoints = new Vector2[Projectile.oldPos.Length]; Vector2 perpendicularDirection = BladeOffsetDirection.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.PiOver2); for (int i = 1; i < drawPoints.Length; i++) @@ -265,7 +255,15 @@ namespace CalamityMod.Projectiles.Melee drawPoints[i] = Projectile.Center + perpendicularDirection.RotatedBy(i * -0.014f * Owner.direction) * i * -Owner.direction * 6f; } - TrailDrawer.Draw(drawPoints, BladeCenterPosition - Projectile.position - Main.screenPosition, 67); + var leftVertexPosition = BladeCenterPosition - BladeOffsetDirection * BladeFrame.Height * 0.5f + offsetToBlade - Main.screenPosition; + var rightVertexPosition = BladeCenterPosition + BladeOffsetDirection * BladeFrame.Height * 0.5f + offsetToBlade - Main.screenPosition; + + // Swap the ends if needed so that the trail faces the right direction. + if (Owner.direction == -1) + Utils.Swap(ref leftVertexPosition, ref rightVertexPosition); + + PrimitiveSet.Prepare(drawPoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => BladeCenterPosition - Projectile.position, + shader: GameShaders.Misc["CalamityMod:FadingSolidTrail"], initialVertexPositionsOverride: (leftVertexPosition, rightVertexPosition)), 67); } // Draw the blade. diff --git a/Projectiles/Melee/TerratomereBeam.cs b/Projectiles/Melee/TerratomereBeam.cs index 115f4ad104..3f247b6ddb 100644 --- a/Projectiles/Melee/TerratomereBeam.cs +++ b/Projectiles/Melee/TerratomereBeam.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; using Terraria.Graphics.Shaders; using Microsoft.Xna.Framework.Graphics; using System.Collections.Generic; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { @@ -11,8 +12,6 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; public Vector2[] ControlPoints; - - public PrimitiveTrail SlashDrawer = null; public bool Flipped => Projectile.ai[0] == 1f; @@ -46,9 +45,6 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - // Initialize the primitive drawer. - SlashDrawer ??= new(SlashWidthFunction, SlashColorFunction, null, GameShaders.Misc["CalamityMod:ExobladeSlash"]); - // Draw the slash effect. Main.spriteBatch.EnterShaderRegion(); @@ -59,7 +55,7 @@ namespace CalamityMod.Projectiles.Melee points.Add(ControlPoints[i] + ControlPoints[i].SafeNormalize(Vector2.Zero) * (Projectile.scale - 1f) * 40f); for (int i = 0; i < 3; i++) - SlashDrawer.Draw(points, Projectile.Center - Main.screenPosition, 65); + PrimitiveSet.Prepare(points, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 65); Main.spriteBatch.ExitShaderRegion(); return false; diff --git a/Projectiles/Melee/TerratomereBigSlash.cs b/Projectiles/Melee/TerratomereBigSlash.cs index a156170c03..641f0fb86c 100644 --- a/Projectiles/Melee/TerratomereBigSlash.cs +++ b/Projectiles/Melee/TerratomereBigSlash.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using Terraria.Graphics.Shaders; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { @@ -12,8 +13,6 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; public int TargetIndex = -1; - - public PrimitiveTrail SlashDrawer = null; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -63,16 +62,13 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - // Initialize the slash drawer. - SlashDrawer ??= new PrimitiveTrail(SlashWidthFunction, SlashColorFunction, null, GameShaders.Misc["CalamityMod:ExobladePierce"]); - GameShaders.Misc["CalamityMod:ExobladePierce"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/BlobbyNoise")); GameShaders.Misc["CalamityMod:ExobladePierce"].UseImage2("Images/Extra_189"); GameShaders.Misc["CalamityMod:ExobladePierce"].UseColor(Terratomere.TerraColor1); GameShaders.Misc["CalamityMod:ExobladePierce"].UseSecondaryColor(Terratomere.TerraColor2); for (int i = 0; i < 4; i++) - SlashDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); return false; } diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index 64f582b1a2..8790e3996c 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -11,13 +11,13 @@ using Terraria.Graphics.Shaders; using Terraria.Audio; using static CalamityMod.CalamityUtils; using System.Linq; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { public class TerratomereHoldoutProj : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public PrimitiveTrail SlashDrawer = null; public Player Owner => Main.player[Projectile.owner]; @@ -230,9 +230,6 @@ namespace CalamityMod.Projectiles.Melee public void DrawSlash() { - // Initialize the primitive drawer. - SlashDrawer ??= new(SlashWidthFunction, SlashColorFunction, null, GameShaders.Misc["CalamityMod:ExobladeSlash"]); - // Draw the slash effect. Main.spriteBatch.EnterShaderRegion(); @@ -240,7 +237,7 @@ namespace CalamityMod.Projectiles.Melee PrepareSlashShader(Direction == 1); if (SwingCompletionAtStartOfTrail > SwingCompletionRatio) - SlashDrawer.Draw(GenerateSlashPoints(), Projectile.Center - Main.screenPosition, 95); + PrimitiveSet.Prepare(GenerateSlashPoints(), new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 95); Main.spriteBatch.ExitShaderRegion(); } diff --git a/Projectiles/Melee/ViolenceSlashProjectile.cs b/Projectiles/Melee/ViolenceSlashProjectile.cs index 6d97af7fcb..89736bbf14 100644 --- a/Projectiles/Melee/ViolenceSlashProjectile.cs +++ b/Projectiles/Melee/ViolenceSlashProjectile.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Melee public class ViolenceSlashProjectile : ModProjectile { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - internal PrimitiveTrail SliceAfterimageDrawer = null; internal Player Owner => Main.player[Projectile.owner]; internal ref float Time => ref Projectile.ai[0]; internal float SwingSine => (float)Math.Sin(MathHelper.TwoPi * Time / 50f); @@ -98,9 +98,6 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (SliceAfterimageDrawer is null) - SliceAfterimageDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]); - GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SwordSlashTexture")); Texture2D spearProjectile = ModContent.Request(Texture).Value; @@ -116,7 +113,7 @@ namespace CalamityMod.Projectiles.Melee positions.Add(position); } - SliceAfterimageDrawer.Draw(positions, Projectile.Size * 0.5f - Main.screenPosition, 50); + PrimitiveSet.Prepare(positions, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]), 50); return true; } } diff --git a/Projectiles/Melee/ViolenceThrownProjectile.cs b/Projectiles/Melee/ViolenceThrownProjectile.cs index 7afda2d432..da80a0724f 100644 --- a/Projectiles/Melee/ViolenceThrownProjectile.cs +++ b/Projectiles/Melee/ViolenceThrownProjectile.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Melee public class ViolenceThrownProjectile : ModProjectile { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - internal PrimitiveTrail StreakDrawer = null; internal Player Owner => Main.player[Projectile.owner]; internal ref float Time => ref Projectile.ai[0]; public override string Texture => "CalamityMod/Items/Weapons/Melee/Violence"; @@ -197,9 +197,6 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (StreakDrawer is null) - StreakDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); Texture2D spearProjectile = ModContent.Request(Texture).Value; @@ -218,7 +215,7 @@ namespace CalamityMod.Projectiles.Melee drawPoints[i] -= (Projectile.oldRot[i] + MathHelper.PiOver4).ToRotationVector2() * Projectile.height * 0.5f; if (Time > Projectile.oldPos.Length) - StreakDrawer.Draw(drawPoints, Projectile.Size * 0.5f - Main.screenPosition, 88); + PrimitiveSet.Prepare(drawPoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 88); Vector2 drawPosition = Projectile.Center - Main.screenPosition; for (int i = 0; i < 6; i++) diff --git a/Projectiles/Melee/WulfrumScrew.cs b/Projectiles/Melee/WulfrumScrew.cs index c7c5861ff4..d497a35f4c 100644 --- a/Projectiles/Melee/WulfrumScrew.cs +++ b/Projectiles/Melee/WulfrumScrew.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Sounds; @@ -18,7 +19,6 @@ namespace CalamityMod.Projectiles.Melee public class WulfrumScrew : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - internal PrimitiveTrail TrailDrawer; internal Color PrimColorMult = Color.White; @@ -200,17 +200,12 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Draw a trail - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + offset, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); //Draw the screw with chroma abberation diff --git a/Projectiles/Ranged/ExoCrystalArrow.cs b/Projectiles/Ranged/ExoCrystalArrow.cs index 88af4e505c..f795becc29 100644 --- a/Projectiles/Ranged/ExoCrystalArrow.cs +++ b/Projectiles/Ranged/ExoCrystalArrow.cs @@ -9,13 +9,14 @@ using CalamityMod.Particles; using Terraria.Graphics.Shaders; using Microsoft.Xna.Framework.Graphics; using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Graphics.Primitives; +using Microsoft.CodeAnalysis; namespace CalamityMod.Projectiles.Ranged { public class ExoCrystalArrow : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public PrimitiveTrail PierceAfterimageDrawer = null; public bool CreateLightning => Projectile.ai[0] == 1f; @@ -77,8 +78,6 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - PierceAfterimageDrawer ??= new(PrimitiveWidthFunction, PrimitiveColorFunction, null, GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"]); - float localIdentityOffset = Projectile.identity * 0.1372f; Color mainColor = CalamityUtils.MulticolorLerp((Main.GlobalTimeWrappedHourly * 2f + localIdentityOffset) % 1f, Color.Cyan, Color.Lime, Color.GreenYellow, Color.Goldenrod, Color.Orange); Color secondaryColor = CalamityUtils.MulticolorLerp((Main.GlobalTimeWrappedHourly * 2f + localIdentityOffset + 0.2f) % 1f, Color.Cyan, Color.Lime, Color.GreenYellow, Color.Goldenrod, Color.Orange); @@ -86,14 +85,13 @@ namespace CalamityMod.Projectiles.Ranged mainColor = Color.Lerp(Color.White, mainColor, 0.85f); secondaryColor = Color.Lerp(Color.White, secondaryColor, 0.85f); - Vector2 trailOffset = Projectile.Size * 0.5f - Main.screenPosition; + Vector2 trailOffset = Projectile.Size * 0.5f; GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/EternityStreak")); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].UseImage2("Images/Extra_189"); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].UseColor(mainColor); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].UseSecondaryColor(secondaryColor); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].Apply(); - PierceAfterimageDrawer.Draw(Projectile.oldPos, trailOffset, 53); - + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"]), 53); Texture2D tex = ModContent.Request(Texture).Value; Vector2 origin = tex.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Ranged/ExoLightningBolt.cs b/Projectiles/Ranged/ExoLightningBolt.cs index cbc45ce972..307fb9d459 100644 --- a/Projectiles/Ranged/ExoLightningBolt.cs +++ b/Projectiles/Ranged/ExoLightningBolt.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Ranged; using Microsoft.Xna.Framework; using System; @@ -17,7 +18,6 @@ namespace CalamityMod.Projectiles.Ranged public class ExoLightningBolt : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - internal PrimitiveTrail LightningDrawer; public bool HasPlayedSound; @@ -162,13 +162,10 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]); - GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].Apply(); - LightningDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 18); + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, false, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]), 18); return false; } diff --git a/Projectiles/Ranged/MarksmanShot.cs b/Projectiles/Ranged/MarksmanShot.cs index 70214893b6..b4048dfc0c 100644 --- a/Projectiles/Ranged/MarksmanShot.cs +++ b/Projectiles/Ranged/MarksmanShot.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using CalamityMod.Graphics.Primitives; using CalamityMod.Systems; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -17,7 +18,6 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; private static readonly int trailLength = 35; - private PrimitiveTrail trailDrawer; internal List trailPositions; // Lifetime of a bullet. Defined in terms of updates because Terraria's engine is trash. @@ -212,11 +212,8 @@ namespace CalamityMod.Projectiles.Ranged if (trailPositions is null) return false; - if (trailDrawer is null) - trailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); - trailDrawer.Draw(trailPositions, Projectile.Size * 0.5f - Main.screenPosition, trailLength); + PrimitiveSet.Prepare(trailPositions, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), trailLength); return false; } diff --git a/Projectiles/Ranged/MeowCreature.cs b/Projectiles/Ranged/MeowCreature.cs index 94a6ac41c4..3daeb2a679 100644 --- a/Projectiles/Ranged/MeowCreature.cs +++ b/Projectiles/Ranged/MeowCreature.cs @@ -1,3 +1,4 @@ +using CalamityMod.Graphics.Primitives; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -14,8 +15,6 @@ namespace CalamityMod.Projectiles.Ranged { public new string LocalizationCategory => "Projectiles.Ranged"; - internal PrimitiveTrail TrailDrawer; - public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; @@ -63,11 +62,7 @@ namespace CalamityMod.Projectiles.Ranged // The creature glows public override void PostDraw(Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction); - - TrailDrawer.Draw(Projectile.oldPos.Where(oldPos => oldPos != Vector2.Zero), Projectile.Size * 0.5f - Main.screenPosition, 30); - + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 30); Texture2D glow = ModContent.Request(Texture).Value; Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); } diff --git a/Projectiles/Ranged/MineralMortarProjectile.cs b/Projectiles/Ranged/MineralMortarProjectile.cs index 77b5756a05..b21bc0299c 100644 --- a/Projectiles/Ranged/MineralMortarProjectile.cs +++ b/Projectiles/Ranged/MineralMortarProjectile.cs @@ -1,4 +1,5 @@ -using CalamityMod.Particles; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -176,10 +177,8 @@ namespace CalamityMod.Projectiles.Ranged float rotation = Projectile.rotation + MathHelper.PiOver2; Vector2 origin = texture.Size() * 0.5f; - PrimitiveTrail trail = new PrimitiveTrail(TrailWidthFunction, ColorTrailFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SwordSlashTexture")); - trail.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 50); - + PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidthFunction, ColorTrailFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 50); if (CalamityConfig.Instance.Afterimages) { for (int i = 0; i < 3; i++) diff --git a/Projectiles/Ranged/PristineFire.cs b/Projectiles/Ranged/PristineFire.cs index 66e34181a0..7ac5652133 100644 --- a/Projectiles/Ranged/PristineFire.cs +++ b/Projectiles/Ranged/PristineFire.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Graphics.Primitives; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -16,9 +17,6 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Particles/MediumMist"; - // Helix trail thing - public PrimitiveTrail HelixTrail = null; - public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 20; @@ -92,9 +90,6 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - if (HelixTrail is null) - HelixTrail = new PrimitiveTrail(HelixTrailWidthFunction, HelixTrailColorFunction); - // Draw a double helix trail for (int direction = -1; direction <= 1; direction += 2) { @@ -109,7 +104,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 sinOffset = (Vector2.UnitY * direction * MathF.Sin(i * MathHelper.Pi * 0.125f) * 24f).RotatedBy(Projectile.oldRot[i]); trailPositions.Add(Projectile.oldPos[i] + sinOffset); } - HelixTrail.Draw(trailPositions, Projectile.Size * 0.5f- Main.screenPosition, 60); + PrimitiveSet.Prepare(trailPositions, new(HelixTrailWidthFunction, HelixTrailColorFunction, (_) => Projectile.Size * 0.5f), 60); } return false; } diff --git a/Projectiles/Ranged/SpeedBlasterShot.cs b/Projectiles/Ranged/SpeedBlasterShot.cs index 40755b24cf..0a3cfc47dc 100644 --- a/Projectiles/Ranged/SpeedBlasterShot.cs +++ b/Projectiles/Ranged/SpeedBlasterShot.cs @@ -1,4 +1,5 @@ using CalamityMod.Graphics.Metaballs; +using CalamityMod.Graphics.Primitives; using CalamityMod.Particles; using Microsoft.Xna.Framework; using System.Linq; @@ -18,7 +19,6 @@ namespace CalamityMod.Projectiles.Ranged public static readonly SoundStyle ShotImpact = new("CalamityMod/Sounds/Item/SplatshotImpact") { PitchVariance = 0.3f, Volume = 2.5f }; public static readonly SoundStyle ShotImpactBig = new("CalamityMod/Sounds/Item/SplatshotBigImpact") { PitchVariance = 0.3f, Volume = 4f }; - internal PrimitiveTrail TrailDrawer; public override void SetStaticDefaults() { @@ -180,10 +180,7 @@ namespace CalamityMod.Projectiles.Ranged internal Color ColorFunction(float completionRatio) => GetColor(Projectile.ai[0]) * Projectile.Opacity; public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction); - - TrailDrawer.Draw(Projectile.oldPos.Where(oldPos => oldPos != Vector2.Zero), Projectile.Size * 0.5f - Main.screenPosition, 20); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 20); return true; } } diff --git a/Projectiles/Ranged/TelluricGlareArrow.cs b/Projectiles/Ranged/TelluricGlareArrow.cs index 8b540dd328..2dab8db792 100644 --- a/Projectiles/Ranged/TelluricGlareArrow.cs +++ b/Projectiles/Ranged/TelluricGlareArrow.cs @@ -8,6 +8,7 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Ranged { @@ -16,7 +17,6 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public PrimitiveTrail TrailDrawer = null; private const int Lifetime = 180; private static Color ShaderColorOne = new Color(237, 194, 66); private static Color ShaderColorTwo = new Color(235, 227, 117); @@ -100,13 +100,10 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); - Vector2 overallOffset = Projectile.Size * 0.5f - Main.screenPosition; + Vector2 overallOffset = Projectile.Size * 0.5f; overallOffset += Projectile.velocity * 1.4f; - TrailDrawer.Draw(Projectile.oldPos, overallOffset, 92); // 58 + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => overallOffset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 92); return false; } diff --git a/Projectiles/Ranged/TheMaelstromShark.cs b/Projectiles/Ranged/TheMaelstromShark.cs index fc0f71474f..95392e0182 100644 --- a/Projectiles/Ranged/TheMaelstromShark.cs +++ b/Projectiles/Ranged/TheMaelstromShark.cs @@ -6,13 +6,13 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Ranged { public class TheMaelstromShark : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public PrimitiveTrail LightningTrailDrawer = null; public override void SetStaticDefaults() { Main.projFrames[Projectile.type] = 6; @@ -97,11 +97,8 @@ namespace CalamityMod.Projectiles.Ranged Vector2 drawPosition = Projectile.Center - Main.screenPosition; SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - if (LightningTrailDrawer is null) - LightningTrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - LightningTrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 60); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 60); Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0); return false; } diff --git a/Projectiles/Ranged/WulfrumScrapBullet.cs b/Projectiles/Ranged/WulfrumScrapBullet.cs index 2c1fd2b869..fd26a60f77 100644 --- a/Projectiles/Ranged/WulfrumScrapBullet.cs +++ b/Projectiles/Ranged/WulfrumScrapBullet.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Graphics.Primitives; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -12,7 +13,6 @@ namespace CalamityMod.Projectiles.Ranged public class WulfrumScrapBullet : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - internal PrimitiveTrail TrailDrawer; public override void SetStaticDefaults() { @@ -60,12 +60,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 30); - + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); return false; } } diff --git a/Projectiles/Rogue/DynamicPursuerElectricity.cs b/Projectiles/Rogue/DynamicPursuerElectricity.cs index 7692ecc939..307247065f 100644 --- a/Projectiles/Rogue/DynamicPursuerElectricity.cs +++ b/Projectiles/Rogue/DynamicPursuerElectricity.cs @@ -1,7 +1,6 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; using System; -using System.IO; -using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,7 +11,6 @@ namespace CalamityMod.Projectiles.Rogue public class DynamicPursuerElectricity : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - internal PrimitiveTrail LightningDrawer; public const int MaximumBranchingIterations = 3; public const float LightningTurnRandomnessFactor = 1.7f; @@ -116,7 +114,7 @@ namespace CalamityMod.Projectiles.Rogue internal float WidthFunction(float completionRatio) { - float baseWidth = MathHelper.Lerp(2f, 6f, (float)Math.Sin(MathHelper.Pi * 4f * completionRatio) * 0.5f + 0.5f) * Projectile.scale; + float baseWidth = MathHelper.Lerp(4f, 7f, (float)Math.Sin(MathHelper.Pi * 4f * completionRatio) * 0.5f + 0.5f) * Projectile.scale; return baseWidth * (float)Math.Sin(MathHelper.Pi * completionRatio); } internal Color ColorFunction(float completionRatio) @@ -126,10 +124,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - - LightningDrawer.Draw(Projectile.oldPos.Where(oldPos => oldPos != Vector2.Zero), Projectile.Size * 0.5f - Main.screenPosition, 300); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false), 90); return false; } } diff --git a/Projectiles/Rogue/FishboneBoomerangProjectile.cs b/Projectiles/Rogue/FishboneBoomerangProjectile.cs index 1d248d3f0f..b49727d24e 100644 --- a/Projectiles/Rogue/FishboneBoomerangProjectile.cs +++ b/Projectiles/Rogue/FishboneBoomerangProjectile.cs @@ -11,7 +11,6 @@ namespace CalamityMod.Projectiles.Rogue public class FishboneBoomerangProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - internal PrimitiveTrail TrailRenderer; public override string Texture => "CalamityMod/Items/Weapons/Rogue/FishboneBoomerang"; public static int ChargeupTime = 20; diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index a4f6404e97..68bfa13cb7 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -6,13 +6,13 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Rogue { public class ScarletDevilProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - internal PrimitiveTrail TrailDrawer; public ref float ShootTimer => ref Projectile.ai[0]; public override string Texture => "CalamityMod/Items/Weapons/Rogue/ScarletDevil"; @@ -175,11 +175,9 @@ namespace CalamityMod.Projectiles.Rogue } else { - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"]); - GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.Zero) * 86f, 60); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.Zero) * 86f, false, + shader: GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"]), 60); Texture2D spearTexture = ModContent.Request(Texture).Value; diff --git a/Projectiles/Rogue/StormfrontLightning.cs b/Projectiles/Rogue/StormfrontLightning.cs index 6c3cf7292f..562e292843 100644 --- a/Projectiles/Rogue/StormfrontLightning.cs +++ b/Projectiles/Rogue/StormfrontLightning.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Rogue; using CalamityMod.Sounds; @@ -21,7 +22,6 @@ namespace CalamityMod.Projectiles.Rogue public class StormfrontLightning : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - internal PrimitiveTrail LightningDrawer; private int noTileHitCounter = 81; //Using other projectile's methods to not collide until a certain time has passed, allowing use inside caves @@ -180,13 +180,11 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { //Just gonna use Dom's work on Heavenly Gale, tried to do a new one myself but I barely understand the .fx files and how they work, might revist it again eventually - Shade - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]); - GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].Apply(); - LightningDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.3f - Main.screenPosition, 10); + PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.3f, false, + shader: GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]), 10); return false; } diff --git a/Projectiles/Rogue/WulfrumKnifeProj.cs b/Projectiles/Rogue/WulfrumKnifeProj.cs index 4373aa131a..00e1882c66 100644 --- a/Projectiles/Rogue/WulfrumKnifeProj.cs +++ b/Projectiles/Rogue/WulfrumKnifeProj.cs @@ -9,13 +9,13 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Rogue { public class WulfrumKnifeProj : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - internal PrimitiveTrail TrailDrawer; internal Color PrimColorMult = Color.White; public override string Texture => "CalamityMod/Items/Weapons/Rogue/WulfrumKnife"; @@ -127,16 +127,12 @@ namespace CalamityMod.Projectiles.Rogue Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + offset, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); diff --git a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs index 4f91de5f77..571e684ea6 100644 --- a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs +++ b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs @@ -12,6 +12,7 @@ using Terraria.ID; using Terraria.ModLoader; using static CalamityMod.CalamityUtils; using static Terraria.ModLoader.ModContent; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Summon { @@ -28,8 +29,6 @@ namespace CalamityMod.Projectiles.Summon public static readonly SoundStyle ZapSound = SoundID.Item94 with { Volume = SoundID.Item94.Volume * 0.5f }; public static readonly SoundStyle SlapSound = new("CalamityMod/Sounds/Custom/WetSlap", 4); - internal PrimitiveTrail TrailRenderer; - public List Segments; public Player Owner => Main.player[Projectile.owner]; public ref float Initialized => ref Projectile.ai[0]; @@ -238,13 +237,9 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - if (TrailRenderer is null) - TrailRenderer = new PrimitiveTrail(PrimWidthFunction, PrimColorFunction); - Vector2[] segmentPositions = Segments.Select(x => x.position).ToArray(); - TrailRenderer.Draw(segmentPositions, -Main.screenPosition, 66); - + PrimitiveSet.Prepare(segmentPositions, new(PrimWidthFunction, PrimColorFunction), 66); Texture2D tex = Request(Texture).Value; diff --git a/Projectiles/Summon/CosmilampBeam.cs b/Projectiles/Summon/CosmilampBeam.cs index e4b7bb63f1..8ca0f13065 100644 --- a/Projectiles/Summon/CosmilampBeam.cs +++ b/Projectiles/Summon/CosmilampBeam.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Summon; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -12,7 +13,6 @@ namespace CalamityMod.Projectiles.Summon public class CosmilampBeam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - internal PrimitiveTrail TrailDrawer; public ref float Timer => ref Projectile.ai[0]; @@ -105,15 +105,13 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - // Initialize the trail drawer. - TrailDrawer ??= new(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - Projectile.localAI[0] = 0f; GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 42); + var primSet = PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 42); Projectile.localAI[0] = 1f; - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 42); + if (primSet.HasValue) + primSet.Value.Render(); return false; } } diff --git a/Projectiles/Summon/DaedalusLightning.cs b/Projectiles/Summon/DaedalusLightning.cs index 333bd465f0..1528615ff5 100644 --- a/Projectiles/Summon/DaedalusLightning.cs +++ b/Projectiles/Summon/DaedalusLightning.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; using System; using System.IO; using System.Linq; @@ -11,7 +12,6 @@ namespace CalamityMod.Projectiles.Summon public class DaedalusLightning : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - internal PrimitiveTrail LightningDrawer; public const int MaximumBranchingIterations = 3; public const float LightningTurnRandomnessFactor = 1.7f; @@ -137,10 +137,7 @@ namespace CalamityMod.Projectiles.Summon } public override bool PreDraw(ref Color lightColor) { - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - - LightningDrawer.Draw(Projectile.oldPos.Where(oldPos => oldPos != Vector2.Zero), Projectile.Size * 0.5f - Main.screenPosition, 300); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false), 90); return false; } #endregion diff --git a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs index c36ee78ca1..5c371e9c66 100644 --- a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs +++ b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using System; @@ -17,10 +18,6 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public ref float Time => ref Projectile.ai[1]; - public PrimitiveTrail LightningDrawer; - - public PrimitiveTrail LightningBackgroundDrawer; - public override string Texture => "CalamityMod/Projectiles/Boss/AresTeslaOrb"; public override void SetStaticDefaults() @@ -113,17 +110,12 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override bool PreDraw(ref Color lightColor) { - if (LightningDrawer is null) - LightningDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - if (LightningBackgroundDrawer is null) - LightningBackgroundDrawer = new PrimitiveTrail(BackgroundWidthFunction, BackgroundColorFunction, PrimitiveTrail.RigidPointRetreivalFunction); - Projectile orbToAttachTo = GetOrbToAttachTo(); if (orbToAttachTo != null) { List arcPoints = AresTeslaOrb.DetermineElectricArcPoints(Projectile.Center, orbToAttachTo.Center, 117); - LightningBackgroundDrawer.Draw(arcPoints, -Main.screenPosition, 90); - LightningDrawer.Draw(arcPoints, -Main.screenPosition, 90); + PrimitiveSet.Prepare(arcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveSet.Prepare(arcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index 1900e43ff9..00290cc4f6 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -15,6 +15,7 @@ using Terraria.Graphics.Effects; using static Terraria.ModLoader.ModContent; using ReLogic.Content; using System.IO; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Summon { @@ -44,7 +45,6 @@ namespace CalamityMod.Projectiles.Summon } } - internal PrimitiveTrail TrailDrawer; internal Color PrimColorMult; public Player healedPlayer; @@ -464,8 +464,6 @@ namespace CalamityMod.Projectiles.Summon Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/ZapTrail")); Vector2[] drawPos = new Vector2[] { Projectile.Center, Projectile.Center, healedPlayer.Center + (Projectile.Center - healedPlayer.Center) * 0.5f + Vector2.UnitY * 40f, healedPlayer.Center, healedPlayer.Center }; @@ -473,7 +471,7 @@ namespace CalamityMod.Projectiles.Summon CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1.8f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - TrailDrawer.Draw(drawPos, - Main.screenPosition + offset, 30); + PrimitiveSet.Prepare(drawPos, new(WidthFunction, ColorFunction, (_) => offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Summon/WulfrumEnergyBurst.cs b/Projectiles/Summon/WulfrumEnergyBurst.cs index 8e1bc1fa0d..406b4e6c84 100644 --- a/Projectiles/Summon/WulfrumEnergyBurst.cs +++ b/Projectiles/Summon/WulfrumEnergyBurst.cs @@ -10,6 +10,7 @@ using static Terraria.ModLoader.ModContent; using Terraria.Graphics.Shaders; using Terraria.Graphics.Effects; using ReLogic.Content; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Summon { @@ -39,7 +40,6 @@ namespace CalamityMod.Projectiles.Summon public static float HomingRange = 350; public static float HomingAngle = MathHelper.PiOver4 * 1f; - internal PrimitiveTrail TrailDrawer; internal Color PrimColorMult = Color.White; public override void SetStaticDefaults() @@ -180,16 +180,12 @@ namespace CalamityMod.Projectiles.Summon Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/ZapTrail")); CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1.5f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + offset, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Summon/WulfrumFusionBolt.cs b/Projectiles/Summon/WulfrumFusionBolt.cs index 3b9f7f3bc1..ac265cc5fa 100644 --- a/Projectiles/Summon/WulfrumFusionBolt.cs +++ b/Projectiles/Summon/WulfrumFusionBolt.cs @@ -9,6 +9,7 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using CalamityMod.Particles; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Summon { @@ -39,7 +40,6 @@ namespace CalamityMod.Projectiles.Summon public static float HomingRange = 250; public static float HomingAngle = MathHelper.PiOver4 * 1.65f; - internal PrimitiveTrail TrailDrawer; internal Color PrimColorMult = Color.White; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -187,15 +187,12 @@ namespace CalamityMod.Projectiles.Summon Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - if (TrailDrawer is null) - TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 0.5f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + offset, 30); + PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Typeless/GemTechArmorGem.cs b/Projectiles/Typeless/GemTechArmorGem.cs index 31fbc3ece8..ff4bf52fc6 100644 --- a/Projectiles/Typeless/GemTechArmorGem.cs +++ b/Projectiles/Typeless/GemTechArmorGem.cs @@ -6,6 +6,7 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Typeless { @@ -16,7 +17,6 @@ namespace CalamityMod.Projectiles.Typeless public ref float Variant => ref Projectile.ai[1]; public const int UpwardFlyTime = 24; public const int RedirectTime = 12; - public PrimitiveTrail FlameTrailDrawer = null; public override string Texture => "CalamityMod/Projectiles/Typeless/GemTechYellowGem"; @@ -139,9 +139,6 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - if (FlameTrailDrawer is null) - FlameTrailDrawer = new PrimitiveTrail(TrailWidth, TrailColor, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - // Prepare the flame trail shader with its map texture. GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); @@ -174,7 +171,7 @@ namespace CalamityMod.Projectiles.Typeless Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(Color.White), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); if (Projectile.ai[0] > UpwardFlyTime + RedirectTime) - FlameTrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 71); + PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 71); return false; } diff --git a/Projectiles/Typeless/MythrilFlare.cs b/Projectiles/Typeless/MythrilFlare.cs index 7d80270c08..0978506c57 100644 --- a/Projectiles/Typeless/MythrilFlare.cs +++ b/Projectiles/Typeless/MythrilFlare.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Graphics.Shaders; @@ -10,7 +11,6 @@ namespace CalamityMod.Projectiles.Typeless public class MythrilFlare : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Typeless"; - public PrimitiveTrail FlameTrailDrawer = null; public ref float Time => ref Projectile.ai[0]; public const int AttackDelay = 22; @@ -93,12 +93,9 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - if (FlameTrailDrawer is null) - FlameTrailDrawer = new PrimitiveTrail(TrailWidth, TrailColor, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - // Prepare the flame trail shader with its map texture. GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/EternityStreak")); - FlameTrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 74); + PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 74); return false; } diff --git a/Projectiles/Typeless/SuicideBomberDemon.cs b/Projectiles/Typeless/SuicideBomberDemon.cs index 95a4448cf0..b409412ca0 100644 --- a/Projectiles/Typeless/SuicideBomberDemon.cs +++ b/Projectiles/Typeless/SuicideBomberDemon.cs @@ -7,6 +7,7 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Typeless { @@ -20,7 +21,6 @@ namespace CalamityMod.Projectiles.Typeless } public ref float Time => ref Projectile.ai[1]; public Player Owner => Main.player[Projectile.owner]; - public PrimitiveTrail FlameTrailDrawer = null; public override void SetStaticDefaults() { Main.projFrames[Projectile.type] = 12; @@ -229,10 +229,6 @@ namespace CalamityMod.Projectiles.Typeless { Main.spriteBatch.EnterShaderRegion(); - // Initialize the flame trail drawer. - if (FlameTrailDrawer is null) - FlameTrailDrawer = new PrimitiveTrail(FlameTrailWidthFunction, FlameTrailColorFunction, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]); - // Prepare the flame trail shader with its map texture. GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); @@ -268,7 +264,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 trailOffset = Projectile.Size * 0.5f; trailOffset += (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 20f; - FlameTrailDrawer.Draw(Projectile.oldPos, trailOffset - Main.screenPosition, 61); + PrimitiveSet.Prepare(Projectile.oldPos, new(FlameTrailWidthFunction, FlameTrailColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 61); } Main.spriteBatch.ExitShaderRegion(); diff --git a/Projectiles/Typeless/WulfrumHook.cs b/Projectiles/Typeless/WulfrumHook.cs index 3a986703b6..cdc008c50b 100644 --- a/Projectiles/Typeless/WulfrumHook.cs +++ b/Projectiles/Typeless/WulfrumHook.cs @@ -13,6 +13,7 @@ using ReLogic.Utilities; using CalamityMod.Items.Accessories; using System.Collections.Generic; using System.Linq; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Typeless { @@ -20,7 +21,6 @@ namespace CalamityMod.Projectiles.Typeless { public new string LocalizationCategory => "Projectiles.Typeless"; public Player Owner => Main.player[Projectile.owner]; - internal PrimitiveTrail TrailRenderer; public HookState State { @@ -231,16 +231,11 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - if (TrailRenderer is null) - TrailRenderer = new PrimitiveTrail(PrimWidthFunction, PrimColorFunction); - Vector2[] segmentPositions = new Vector2[] {Projectile.Center, Owner.Center }; if (State == HookState.Grappling) segmentPositions = Owner.GetModPlayer().Segments.Select(x => x.position).ToArray(); - - TrailRenderer.Draw(segmentPositions, -Main.screenPosition, 30); - + PrimitiveSet.Prepare(new List(segmentPositions) { Owner.Center }, new(PrimWidthFunction, PrimColorFunction), 30); Texture2D texture = TextureAssets.Projectile[Type].Value; From 63649365d0fd68e5e7b53c7feb176c02658c5c40 Mon Sep 17 00:00:00 2001 From: Toasty <74939552+toasty599@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:04:05 +0000 Subject: [PATCH 029/197] Follow up to #23, Primitive System performance increase. (#24) - Increase performance via pooling, buffers, int -> short, and most linq removal. --- .../{PrimitiveSet.cs => PrimitiveRenderer.cs} | 271 +++++++++--------- NPCs/AcidRain/AcidEel.cs | 2 +- NPCs/ExoMechs/Apollo/Apollo.cs | 6 +- NPCs/ExoMechs/Ares/AresBody.cs | 16 +- NPCs/ExoMechs/Artemis/Artemis.cs | 6 +- NPCs/SupremeCalamitas/BrimstoneHeart.cs | 2 +- Projectiles/Boss/ApolloChargeTelegraph.cs | 2 +- Projectiles/Boss/AresTeslaOrb.cs | 4 +- Projectiles/Boss/ArtemisChargeTelegraph.cs | 2 +- Projectiles/Boss/ArtemisSpinLaserbeam.cs | 2 +- .../Boss/CirrusPhotonRipperPrismTooth.cs | 2 +- Projectiles/Boss/DraedonSummonLaser.cs | 2 +- Projectiles/Boss/DyingSun.cs | 2 +- Projectiles/Boss/InfernadoRevenge.cs | 2 +- .../DraedonsArsenal/PhaseslayerProjectile.cs | 2 +- .../DraedonsArsenal/SnakeEyesProjectile.cs | 2 +- Projectiles/Enemy/GammRayBurst.cs | 2 +- Projectiles/Magic/ApotheosisEnergy.cs | 2 +- Projectiles/Magic/ArtAttackStar.cs | 2 +- Projectiles/Magic/EternityHex.cs | 2 +- Projectiles/Magic/ExoVortex.cs | 2 +- Projectiles/Magic/ExoVortex2.cs | 2 +- Projectiles/Magic/FabBolt.cs | 2 +- Projectiles/Magic/FabRay.cs | 2 +- Projectiles/Magic/RainbowRocket.cs | 2 +- Projectiles/Magic/RancorLaserbeam.cs | 2 +- Projectiles/Magic/WulfrumBolt.cs | 2 +- Projectiles/Melee/EonBolt.cs | 2 +- Projectiles/Melee/Exobeam.cs | 4 +- Projectiles/Melee/ExobladeProj.cs | 6 +- Projectiles/Melee/MarniteObliteratorProj.cs | 2 +- Projectiles/Melee/PrismTooth.cs | 2 +- Projectiles/Melee/RendingNeedle.cs | 2 +- Projectiles/Melee/StygianShieldAttack.cs | 2 +- Projectiles/Melee/TaintedBladeSlasher.cs | 2 +- Projectiles/Melee/TerratomereBeam.cs | 2 +- Projectiles/Melee/TerratomereBigSlash.cs | 2 +- Projectiles/Melee/TerratomereHoldoutProj.cs | 2 +- Projectiles/Melee/ViolenceSlashProjectile.cs | 2 +- Projectiles/Melee/ViolenceThrownProjectile.cs | 2 +- Projectiles/Melee/WulfrumScrew.cs | 2 +- Projectiles/Ranged/ExoCrystalArrow.cs | 2 +- Projectiles/Ranged/ExoLightningBolt.cs | 2 +- Projectiles/Ranged/MarksmanShot.cs | 2 +- Projectiles/Ranged/MeowCreature.cs | 2 +- Projectiles/Ranged/MineralMortarProjectile.cs | 2 +- Projectiles/Ranged/PristineFire.cs | 2 +- Projectiles/Ranged/SpeedBlasterShot.cs | 2 +- Projectiles/Ranged/TelluricGlareArrow.cs | 2 +- Projectiles/Ranged/TheMaelstromShark.cs | 2 +- Projectiles/Ranged/WulfrumScrapBullet.cs | 2 +- .../Rogue/DynamicPursuerElectricity.cs | 2 +- Projectiles/Rogue/ScarletDevilProjectile.cs | 2 +- Projectiles/Rogue/StormfrontLightning.cs | 2 +- Projectiles/Rogue/WulfrumKnifeProj.cs | 2 +- .../Summon/CnidarianJellyfishOnTheString.cs | 2 +- Projectiles/Summon/CosmilampBeam.cs | 7 +- Projectiles/Summon/DaedalusLightning.cs | 2 +- .../Summon/SmallAresArms/MinionTeslaOrb.cs | 4 +- Projectiles/Summon/WulfrumDroid.cs | 2 +- Projectiles/Summon/WulfrumEnergyBurst.cs | 2 +- Projectiles/Summon/WulfrumFusionBolt.cs | 2 +- Projectiles/Typeless/GemTechArmorGem.cs | 2 +- Projectiles/Typeless/MythrilFlare.cs | 2 +- Projectiles/Typeless/SuicideBomberDemon.cs | 2 +- Projectiles/Typeless/WulfrumHook.cs | 2 +- 66 files changed, 227 insertions(+), 211 deletions(-) rename Graphics/Primitives/{PrimitiveSet.cs => PrimitiveRenderer.cs} (50%) diff --git a/Graphics/Primitives/PrimitiveSet.cs b/Graphics/Primitives/PrimitiveRenderer.cs similarity index 50% rename from Graphics/Primitives/PrimitiveSet.cs rename to Graphics/Primitives/PrimitiveRenderer.cs index a911dd3b20..1ed294efa0 100644 --- a/Graphics/Primitives/PrimitiveSet.cs +++ b/Graphics/Primitives/PrimitiveRenderer.cs @@ -9,44 +9,55 @@ using Terraria.Graphics.Shaders; namespace CalamityMod.Graphics.Primitives { /// - /// This both acts as an instanceable struct containing primitive trail data, and as a manager that creates and renders said instances.

- /// To use normally, in the draw method of an NPC or Projectile call .
+ /// This manages rendering primitives in via the provided method.

+ /// To use normally, in the draw method of an NPC or Projectile call .
/// /// The first param should be the positions to use for the trail. /// The second is a struct that allows you to choose a desired configuration of settings to use with the trail, to allow for customization. /// The third controls how many points are created for the trail, and the fourth determines whether the primitive is subsequently rendered. - /// If you do not render in , you MUST call manually on the created instance to make it actually appear. /// - /// If you wish to use pixelation, you MUST make the NPC/Projectile inherit and use instead.
+ /// If you wish to use pixelation, you MUST make the NPC/Projectile inherit and use instead of predraw..
/// You can also optionally specify a render layer with . It is by default. ///
- public readonly struct PrimitiveSet + public static class PrimitiveRenderer { - #region Instance Members - /// - /// The vertices of the set. - /// - public readonly VertexPosition2DColorTexture[] Vertices; - - /// - /// The indices of the set. - /// - public readonly int[] Indices; - - /// - /// The settings of the set. - /// - public readonly PrimitiveSettings Settings; - - private PrimitiveSet(VertexPosition2DColorTexture[] vertices, int[] indices, PrimitiveSettings settings) - { - Vertices = vertices; - Indices = indices; - Settings = settings; - } - #endregion - #region Static Members + private static DynamicVertexBuffer VertexBuffer; + + private static DynamicIndexBuffer IndexBuffer; + + private static PrimitiveSettings MainSettings; + + private static Vector2[] MainPositions; + + private static VertexPosition2DColorTexture[] MainVertices; + + private static short[] MainIndices; + + private const short MaxPositions = 1000; + + private const short MaxVertices = 3072; + + private const short MaxIndices = 8192; + + private static short PositionsIndex; + + private static short VerticesIndex; + + private static short IndicesIndex; + + static PrimitiveRenderer() + { + Main.QueueMainThreadAction(() => + { + MainPositions = new Vector2[MaxPositions]; + MainVertices = new VertexPosition2DColorTexture[MaxVertices]; + MainIndices = new short[MaxIndices]; + VertexBuffer ??= new DynamicVertexBuffer(Main.instance.GraphicsDevice, VertexPosition2DColorTexture.VertexDeclaration2D, MaxVertices, BufferUsage.WriteOnly); + IndexBuffer ??= new DynamicIndexBuffer(Main.instance.GraphicsDevice, IndexElementSize.SixteenBits, MaxIndices, BufferUsage.WriteOnly); + }); + } + private static void PerformPixelationSafetyChecks(PrimitiveSettings settings) { // Don't allow accidental screw ups with these. @@ -57,63 +68,53 @@ namespace CalamityMod.Graphics.Primitives } /// - /// Prepares a based on the provided information, and optionally renders it. + /// Renders a primitive trail. /// - /// The list of positions to use. Keep in mind that these are expected to be in world position, and is automatically subtracted from them all. + /// The list of positions to use. Keep in mind that these are expected to be in world position, and is automatically subtracted from them all.
At least 4 points are required to use smoothing. /// The primitive draw settings to use. /// The amount of points to use. More is higher detailed, but less performant. By default, is the number of positions provided. Going above 100 is NOT recommended. - /// Whether to render the set. - /// The prepared set. - public static PrimitiveSet? Prepare(IEnumerable positions, PrimitiveSettings settings, int? pointsToCreate = null, bool render = true) + public static void RenderTrail(List positions, PrimitiveSettings settings, int? pointsToCreate = null) => RenderTrail(positions.ToArray(), settings, pointsToCreate); + + /// + /// Renders a primitive trail. + /// + /// The list of positions to use. Keep in mind that these are expected to be in world position, and is automatically subtracted from them all.
At least 4 points are required to use smoothing. + /// The primitive draw settings to use. + /// The amount of points to use. More is higher detailed, but less performant. By default, is the number of positions provided. Going above 100 is NOT recommended. + public static void RenderTrail(Vector2[] positions, PrimitiveSettings settings, int? pointsToCreate = null) { PerformPixelationSafetyChecks(settings); - int positionCount = positions.Count(); - // Return if not enough to draw anything. - if (positionCount <= 2) - return null; + if (positions.Length <= 2) + return; - // Cull out any zeroed points. - positions = positions.Where(p => p != Vector2.Zero); - List trailPoints = PreparePointsRectangleTrail(positions, settings, pointsToCreate ?? positionCount).ToList(); + // Return if too many to draw anything, + if (positions.Length >= MaxPositions) + return; + + // IF this is false, a correct position trail could not be made and rendering should not continue. + if (!AssignPointsRectangleTrail(positions, settings, pointsToCreate ?? positions.Length)) + return; // A trail with only one point or less has nothing to connect to, and therefore, can't make a trail. - if (trailPoints.Count <= 2) - return null; + if (MainPositions.Length <= 2) + return; - // If the trail point has any NaN positions, don't draw anything. - if (trailPoints.Any(point => point.HasNaNs())) - return null; + MainSettings = settings; - // If the trail points are all equal, don't draw anything. - if (trailPoints.All(point => point == trailPoints[0])) - return null; + AssignVerticesRectangleTrail(); + AssignIndicesRectangleTrail(); - IEnumerable vertices = CreateVerticesRectangleTrail(trailPoints.ToList(), settings); - int[] indices = CreateIndicesRectangleTrail(trailPoints.Count); - - // Create the set, and just return it if not asked to render. - PrimitiveSet set = new(vertices.ToArray(), indices, settings); - if (!render) - return set; - - // Else render the set and return it. - return set.Render(); + // Else render without wasting resources creating a set. + PrivateRender(); + return; } - #endregion - #region Instance Methods - /// - /// Renders the provided primitive set to the screen. - /// - /// The provided set. - public PrimitiveSet Render() + private static void PrivateRender() { - PerformPixelationSafetyChecks(Settings); - - if (Indices.Length % 6 != 0 || Vertices.Length <= 3) - return this; + if (IndicesIndex % 6 != 0 || VerticesIndex <= 3) + return; // Perform screen culling, for performance reasons. Main.instance.GraphicsDevice.RasterizerState = RasterizerState.CullNone; @@ -122,65 +123,73 @@ namespace CalamityMod.Graphics.Primitives Matrix view; Matrix projection; - if (Settings.Pixelate) + if (MainSettings.Pixelate) CalcuatePixelatedPerspectiveMatrices(out view, out projection); else CalamityUtils.CalculatePerspectiveMatricies(out view, out projection); - var shaderToUse = Settings.Shader ?? GameShaders.Misc["CalamityMod:StandardPrimitiveShader"]; + var shaderToUse = MainSettings.Shader ?? GameShaders.Misc["CalamityMod:StandardPrimitiveShader"]; shaderToUse.Shader.Parameters["uWorldViewProjection"].SetValue(view * projection); shaderToUse.Apply(); - // Render the set. - Main.instance.GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, Vertices, 0, Vertices.Length, Indices, 0, Indices.Length / 3); - Main.pixelShader.CurrentTechnique.Passes[0].Apply(); - return this; + VertexBuffer.SetData(MainVertices, 0, VerticesIndex, SetDataOptions.Discard); + IndexBuffer.SetData(MainIndices, 0, IndicesIndex, SetDataOptions.Discard); + + Main.instance.GraphicsDevice.SetVertexBuffer(VertexBuffer); + Main.instance.GraphicsDevice.Indices = IndexBuffer; + Main.instance.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, VerticesIndex, 0, IndicesIndex / 3); } #endregion #region Set Preperation - private static IEnumerable PreparePointsRectangleTrail(IEnumerable positions, PrimitiveSettings settings, int pointsToCreate) + private static bool AssignPointsRectangleTrail(Vector2[] positions, PrimitiveSettings settings, int pointsToCreate) { // Don't smoothen the points unless explicitly told do so. if (!settings.Smoothen) { - List basePoints = positions.Where(originalPosition => originalPosition != Vector2.Zero).ToList(); - List endPoints = new(); + PositionsIndex = 0; - if (basePoints.Count <= 2) - return endPoints; + // Would like to remove this, but unsure how else to properly ensure that none are zero. + positions = positions.Where(originalPosition => originalPosition != Vector2.Zero).ToArray(); + + if (positions.Length <= 2) + return false; // Remap the original positions across a certain length. for (int i = 0; i < pointsToCreate; i++) { float completionRatio = i / (float)(pointsToCreate - 1f); - int currentIndex = (int)(completionRatio * (basePoints.Count - 1)); - Vector2 currentPoint = basePoints[currentIndex]; - Vector2 nextPoint = basePoints[(currentIndex + 1) % basePoints.Count]; - endPoints.Add(Vector2.Lerp(currentPoint, nextPoint, completionRatio * (basePoints.Count - 1) % 0.99999f) - Main.screenPosition); + int currentIndex = (int)(completionRatio * (positions.Length - 1)); + Vector2 currentPoint = positions[currentIndex]; + Vector2 nextPoint = positions[(currentIndex + 1) % positions.Length]; + MainPositions[PositionsIndex] = Vector2.Lerp(currentPoint, nextPoint, completionRatio * (positions.Length - 1) % 0.99999f) - Main.screenPosition; + PositionsIndex++; } - return endPoints; + return true; } + // Due to the first point being manually added, points should be added starting at the second position instead of the first. + PositionsIndex = 1; + + // Create the control points for the spline. List controlPoints = new(); - for (int i = 0; i < positions.Count(); i++) + for (int i = 0; i < positions.Length; i++) { // Don't incorporate points that are zeroed out. // They are almost certainly a result of incomplete oldPos arrays. - if (positions.ElementAt(i) == Vector2.Zero) + if (positions[i] == Vector2.Zero) continue; - float completionRatio = i / (float)positions.Count(); + float completionRatio = i / (float)positions.Length; Vector2 offset = -Main.screenPosition; if (settings.OffsetFunction != null) offset += settings.OffsetFunction(completionRatio); - controlPoints.Add(positions.ElementAt(i) + offset); + controlPoints.Add(positions[i] + offset); } - List points = new(); // Avoid stupid index errors. if (controlPoints.Count <= 4) - return controlPoints; + return false; for (int j = 0; j < pointsToCreate; j++) { @@ -211,27 +220,27 @@ namespace CalamityMod.Graphics.Primitives else farRight = controlPoints[localSplineIndex + 2]; - points.Add(Vector2.CatmullRom(farLeft, left, right, farRight, localSplineInterpolant)); + MainPositions[PositionsIndex] = Vector2.CatmullRom(farLeft, left, right, farRight, localSplineInterpolant); + PositionsIndex++; } // Manually insert the front and end points. - points.Insert(0, controlPoints.First()); - points.Add(controlPoints.Last()); - - return points; + MainPositions[0] = controlPoints.First(); + MainPositions[PositionsIndex] = controlPoints.Last(); + PositionsIndex++; + return true; } - private static IEnumerable CreateVerticesRectangleTrail(List positions, PrimitiveSettings settings) + private static void AssignVerticesRectangleTrail() { - List vertices = new(); - - for (int i = 0; i < positions.Count; i++) + VerticesIndex = 0; + for (int i = 0; i < PositionsIndex; i++) { - float completionRatio = i / (float)(positions.Count - 1); - float widthAtVertex = settings.WidthFunction(completionRatio); - Color vertexColor = settings.ColorFunction(completionRatio); - Vector2 currentPosition = positions[i]; - Vector2 directionToAhead = i == positions.Count - 1 ? (positions[i] - positions[i - 1]).SafeNormalize(Vector2.Zero) : (positions[i + 1] - positions[i]).SafeNormalize(Vector2.Zero); + float completionRatio = i / (float)(PositionsIndex - 1); + float widthAtVertex = MainSettings.WidthFunction(completionRatio); + Color vertexColor = MainSettings.ColorFunction(completionRatio); + Vector2 currentPosition = MainPositions[i]; + Vector2 directionToAhead = i == PositionsIndex - 1 ? (MainPositions[i] - MainPositions[i - 1]).SafeNormalize(Vector2.Zero) : (MainPositions[i + 1] - MainPositions[i]).SafeNormalize(Vector2.Zero); Vector2 leftCurrentTextureCoord = new(completionRatio, 0f); Vector2 rightCurrentTextureCoord = new(completionRatio, 1f); @@ -244,45 +253,51 @@ namespace CalamityMod.Graphics.Primitives Vector2 right = currentPosition + sideDirection * widthAtVertex; // Override the initial vertex positions if requested. - if (i == 0 && settings.InitialVertexPositionsOverride.HasValue && settings.InitialVertexPositionsOverride.Value.Item1 != Vector2.Zero && settings.InitialVertexPositionsOverride.Value.Item2 != Vector2.Zero) + if (i == 0 && MainSettings.InitialVertexPositionsOverride.HasValue && MainSettings.InitialVertexPositionsOverride.Value.Item1 != Vector2.Zero && MainSettings.InitialVertexPositionsOverride.Value.Item2 != Vector2.Zero) { - left = settings.InitialVertexPositionsOverride.Value.Item1; - right = settings.InitialVertexPositionsOverride.Value.Item2; + left = MainSettings.InitialVertexPositionsOverride.Value.Item1; + right = MainSettings.InitialVertexPositionsOverride.Value.Item2; } // What this is doing, at its core, is defining a rectangle based on two triangles. // These triangles are defined based on the width of the strip at that point. // The resulting rectangles combined are what make the trail itself. - vertices.Add(new VertexPosition2DColorTexture(left, vertexColor, leftCurrentTextureCoord)); - vertices.Add(new VertexPosition2DColorTexture(right, vertexColor, rightCurrentTextureCoord)); + MainVertices[VerticesIndex] = new VertexPosition2DColorTexture(left, vertexColor, leftCurrentTextureCoord); + VerticesIndex++; + MainVertices[VerticesIndex] = new VertexPosition2DColorTexture(right, vertexColor, rightCurrentTextureCoord); + VerticesIndex++; } - - return vertices; } - private static int[] CreateIndicesRectangleTrail(int pointCount) + private static void AssignIndicesRectangleTrail() { // What this is doing is basically representing each point on the vertices list as // indices. These indices should come together to create a tiny rectangle that acts // as a segment on the trail. This is achieved here by splitting the indices (or rather, points) // into 2 triangles, which requires 6 points. // The logic here basically determines which indices are connected together. - int totalIndices = (pointCount - 1) * 6; - int[] indices = new int[totalIndices]; - - for (int i = 0; i < pointCount - 2; i++) + IndicesIndex = 0; + for (short i = 0; i < PositionsIndex - 2; i++) { - int startingTriangleIndex = i * 6; - int connectToIndex = i * 2; - indices[startingTriangleIndex] = connectToIndex; - indices[startingTriangleIndex + 1] = connectToIndex + 1; - indices[startingTriangleIndex + 2] = connectToIndex + 2; - indices[startingTriangleIndex + 3] = connectToIndex + 2; - indices[startingTriangleIndex + 4] = connectToIndex + 1; - indices[startingTriangleIndex + 5] = connectToIndex + 3; - } + short connectToIndex = (short)(i * 2); + MainIndices[IndicesIndex] = connectToIndex; + IndicesIndex++; - return indices; + MainIndices[IndicesIndex] = (short)(connectToIndex + 1); + IndicesIndex++; + + MainIndices[IndicesIndex] = (short)(connectToIndex + 2); + IndicesIndex++; + + MainIndices[IndicesIndex] = (short)(connectToIndex + 2); + IndicesIndex++; + + MainIndices[IndicesIndex] = (short)(connectToIndex + 1); + IndicesIndex++; + + MainIndices[IndicesIndex] = (short)(connectToIndex + 3); + IndicesIndex++; + } } private static void CalcuatePixelatedPerspectiveMatrices(out Matrix viewMatrix, out Matrix projectionMatrix) diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index f724c32fa1..b4245e62ea 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.AcidRain Vector2 tailDrawPosition = segmentPositions[^1] - tailRotation.ToRotationVector2() * 4f; SpriteEffects tailDirection = NPC.velocity.X < 0f ? SpriteEffects.None : SpriteEffects.FlipVertically; Main.EntitySpriteDraw(tailTexture, tailDrawPosition, tailArea, NPC.GetAlpha(Color.White), tailRotation, tailArea.Size() * new Vector2(0f, 0.5f), NPC.scale, tailDirection, 0); - PrimitiveSet.Prepare(segmentPositions, new(SegmentWidthFunction, _ => NPC.GetAlpha(Color.White), pixelate: false, shader: GameShaders.Misc["CalamityMod:PrimitiveTexture"]), 36); + PrimitiveRenderer.RenderTrail(segmentPositions, new(SegmentWidthFunction, _ => NPC.GetAlpha(Color.White), pixelate: false, shader: GameShaders.Misc["CalamityMod:PrimitiveTexture"]), 36); } return false; diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index aa350c4a84..25d9ae45d9 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -1554,7 +1554,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo currentSegmentRotation += segmentRotationOffset; } - PrimitiveSet.Prepare(ribbonDrawPositions, new(RibbonTrailWidthFunction, RibbonTrailColorFunction), 66); + PrimitiveRenderer.RenderTrail(ribbonDrawPositions, new(RibbonTrailWidthFunction, RibbonTrailColorFunction), 66); } int instanceCount = (int)MathHelper.Lerp(1f, 15f, ChargeComboFlash); @@ -1619,11 +1619,11 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo for (int i = 0; i < 4; i++) { Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 8f; - PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, (_) => drawOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); + PrimitiveRenderer.RenderTrail(drawPositions, new(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, (_) => drawOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } else - PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunction, FlameTrailColorFunction, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); + PrimitiveRenderer.RenderTrail(drawPositions, new(FlameTrailWidthFunction, FlameTrailColorFunction, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 2345f31467..7a7798463c 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -1328,13 +1328,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.Opacity > 0f && !NPC.IsABestiaryIconDummy) { List arm2ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(armSegmentDrawPosition, arm2DrawPosition + arm2Rotation.ToRotationVector2() * -direction * 20f, 250290787); - PrimitiveSet.Prepare(arm2ElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); - PrimitiveSet.Prepare(arm2ElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arm2ElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arm2ElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); // Draw electricity between the final arm and the hand. List handElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm2DrawPosition - arm2Rotation.ToRotationVector2() * direction * 100f, handPosition, 27182); - PrimitiveSet.Prepare(handElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); - PrimitiveSet.Prepare(handElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(handElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(handElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } shoulderDrawPosition += Vector2.UnitY * NPC.gfxOffY - screenOffset; @@ -1390,13 +1390,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.Opacity > 0f && !NPC.IsABestiaryIconDummy) { List arm2ElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm1DrawPosition - arm2Rotation.ToRotationVector2() * direction * 10f, arm1DrawPosition + arm2Rotation.ToRotationVector2() * direction * 20f, 31416); - PrimitiveSet.Prepare(arm2ElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); - PrimitiveSet.Prepare(arm2ElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arm2ElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arm2ElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); // Draw electricity between the final arm and the hand. List handElectricArcPoints = AresTeslaOrb.DetermineElectricArcPoints(arm2DrawPosition - arm2Rotation.ToRotationVector2() * direction * 20f, handPosition, 27182); - PrimitiveSet.Prepare(handElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); - PrimitiveSet.Prepare(handElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(handElectricArcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(handElectricArcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } shoulderDrawPosition += Vector2.UnitY * NPC.gfxOffY - screenOffset; diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index b417ddd3b6..43ef3dad83 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -1448,7 +1448,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis currentSegmentRotation += segmentRotationOffset; } - PrimitiveSet.Prepare(ribbonDrawPositions, new(RibbonTrailWidthFunction, RibbonTrailColorFunction), 66); + PrimitiveRenderer.RenderTrail(ribbonDrawPositions, new(RibbonTrailWidthFunction, RibbonTrailColorFunction), 66); } int instanceCount = (int)MathHelper.Lerp(1f, 15f, ChargeFlash); @@ -1513,11 +1513,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis for (int i = 0; i < 4; i++) { Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 8f; - PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, (_) => drawOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); + PrimitiveRenderer.RenderTrail(drawPositions, new(FlameTrailWidthFunctionBig, FlameTrailColorFunctionBig, (_) => drawOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } else - PrimitiveSet.Prepare(drawPositions, new(FlameTrailWidthFunction, FlameTrailColorFunction, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); + PrimitiveRenderer.RenderTrail(drawPositions, new(FlameTrailWidthFunction, FlameTrailColorFunction, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 70); } } diff --git a/NPCs/SupremeCalamitas/BrimstoneHeart.cs b/NPCs/SupremeCalamitas/BrimstoneHeart.cs index 23144ecd84..17129ee0f2 100644 --- a/NPCs/SupremeCalamitas/BrimstoneHeart.cs +++ b/NPCs/SupremeCalamitas/BrimstoneHeart.cs @@ -123,7 +123,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.Center, ChainEndpoints[i] + NPC.DirectionTo(ChainEndpoints[i]) * 25f }; - PrimitiveSet.Prepare(points, new(PrimitiveWidthFunction, PrimitiveColorFunction), 40); + PrimitiveRenderer.RenderTrail(points, new(PrimitiveWidthFunction, PrimitiveColorFunction), 40); } return true; diff --git a/Projectiles/Boss/ApolloChargeTelegraph.cs b/Projectiles/Boss/ApolloChargeTelegraph.cs index a5bb6afc74..125a6dd6d7 100644 --- a/Projectiles/Boss/ApolloChargeTelegraph.cs +++ b/Projectiles/Boss/ApolloChargeTelegraph.cs @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Boss // It is not used anywhere else. Projectile.ai[0] = i; - PrimitiveSet.Prepare(positions, new(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, (_) => Projectile.Size * 0.5f, smoothen: false, shader: GameShaders.Misc["CalamityMod:Flame"]), 55); + PrimitiveRenderer.RenderTrail(positions, new(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, (_) => Projectile.Size * 0.5f, smoothen: false, shader: GameShaders.Misc["CalamityMod:Flame"]), 55); } return false; } diff --git a/Projectiles/Boss/AresTeslaOrb.cs b/Projectiles/Boss/AresTeslaOrb.cs index 99d55c8eba..96c7223a95 100644 --- a/Projectiles/Boss/AresTeslaOrb.cs +++ b/Projectiles/Boss/AresTeslaOrb.cs @@ -229,8 +229,8 @@ namespace CalamityMod.Projectiles.Boss if (orbToAttachTo != null) { List arcPoints = DetermineElectricArcPoints(Projectile.Center, orbToAttachTo.Center, 117); - PrimitiveSet.Prepare(arcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); - PrimitiveSet.Prepare(arcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Boss/ArtemisChargeTelegraph.cs b/Projectiles/Boss/ArtemisChargeTelegraph.cs index fd7e3467be..8c0191b771 100644 --- a/Projectiles/Boss/ArtemisChargeTelegraph.cs +++ b/Projectiles/Boss/ArtemisChargeTelegraph.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.Center, Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitY) * TelegraphWidth }; - PrimitiveSet.Prepare(drawPositions, new(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:Flame"]), 87); + PrimitiveRenderer.RenderTrail(drawPositions, new(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:Flame"]), 87); return false; } } diff --git a/Projectiles/Boss/ArtemisSpinLaserbeam.cs b/Projectiles/Boss/ArtemisSpinLaserbeam.cs index 6a55ac5076..a778ba6bb6 100644 --- a/Projectiles/Boss/ArtemisSpinLaserbeam.cs +++ b/Projectiles/Boss/ArtemisSpinLaserbeam.cs @@ -142,7 +142,7 @@ namespace CalamityMod.Projectiles.Boss GameShaders.Misc["CalamityMod:ArtemisLaser"].UseColor(Color.Cyan); GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage1("Images/Extra_189"); GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage2("Images/Misc/Perlin"); - PrimitiveSet.Prepare(baseDrawPoints, new(LaserWidthFunction, LaserColorFunction, shader: GameShaders.Misc["CalamityMod:ArtemisLaser"]), 64); + PrimitiveRenderer.RenderTrail(baseDrawPoints, new(LaserWidthFunction, LaserColorFunction, shader: GameShaders.Misc["CalamityMod:ArtemisLaser"]), 64); return false; } diff --git a/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs b/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs index 49bfa8f1d4..ab1abcbb1e 100644 --- a/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs +++ b/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs @@ -155,7 +155,7 @@ namespace CalamityMod.Projectiles.Boss Main.spriteBatch.EnterShaderRegion(); GameShaders.Misc["CalamityMod:PrismaticStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + generalOffset, shader: GameShaders.Misc["CalamityMod:PrismaticStreak"]), 65); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + generalOffset, shader: GameShaders.Misc["CalamityMod:PrismaticStreak"]), 65); Main.spriteBatch.ExitShaderRegion(); return true; } diff --git a/Projectiles/Boss/DraedonSummonLaser.cs b/Projectiles/Boss/DraedonSummonLaser.cs index a14e209bfc..aa3971225f 100644 --- a/Projectiles/Boss/DraedonSummonLaser.cs +++ b/Projectiles/Boss/DraedonSummonLaser.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Boss basePoints[i] = Projectile.Center - Vector2.UnitY * i / basePoints.Length * LaserLength; Vector2 overallOffset = Projectile.Size * 0.5f; - PrimitiveSet.Prepare(basePoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => overallOffset, shader: GameShaders.Misc["CalamityMod:Flame"]), 92); + PrimitiveRenderer.RenderTrail(basePoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => overallOffset, shader: GameShaders.Misc["CalamityMod:Flame"]), 92); return false; } diff --git a/Projectiles/Boss/DyingSun.cs b/Projectiles/Boss/DyingSun.cs index eaa8d6dbed..9696f6a6a6 100644 --- a/Projectiles/Boss/DyingSun.cs +++ b/Projectiles/Boss/DyingSun.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Boss rotationPoints.Add(adjustedAngle); drawPoints.Add(Vector2.Lerp(Projectile.Center - offsetDirection * Radius / 2f, Projectile.Center + offsetDirection * Radius / 2f, i / 16f)); } - PrimitiveSet.Prepare(drawPoints, new(SunWidthFunction, SunColorFunction, shader: GameShaders.Misc["CalamityMod:Flame"]), 24); + PrimitiveRenderer.RenderTrail(drawPoints, new(SunWidthFunction, SunColorFunction, shader: GameShaders.Misc["CalamityMod:Flame"]), 24); } return false; } diff --git a/Projectiles/Boss/InfernadoRevenge.cs b/Projectiles/Boss/InfernadoRevenge.cs index aa22ca54c2..e4dab247a0 100644 --- a/Projectiles/Boss/InfernadoRevenge.cs +++ b/Projectiles/Boss/InfernadoRevenge.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Boss drawPoints[i] = Vector2.Lerp(top, bottom, i / (float)(drawPoints.Length - 1)); drawPoints[drawPoints.Length - 1] = bottom; - PrimitiveSet.Prepare(drawPoints, new((_) => Projectile.width * 0.5f + 16f, ColorFunction, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 85); + PrimitiveRenderer.RenderTrail(drawPoints, new((_) => Projectile.width * 0.5f + 16f, ColorFunction, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 85); Texture2D vortexTexture = ModContent.Request("CalamityMod/Projectiles/Boss/OldDukeVortex").Value; for (int i = 0; i < 110; i++) diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index 3707159fce..01c8f34799 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -324,7 +324,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float angularTurn = i * swingAngularDirection * -0.09f; drawPoints[i] = Projectile.position + perpendicularDirection.RotatedBy(angularTurn) * offsetFactor; } - PrimitiveSet.Prepare(drawPoints, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + bladeOffset, shader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]), 50); + PrimitiveRenderer.RenderTrail(drawPoints, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + bladeOffset, shader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]), 50); Main.EntitySpriteDraw(bladeTexture, Projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, Projectile.rotation + MathHelper.PiOver2, origin, Projectile.scale, SpriteEffects.None, 0); Main.EntitySpriteDraw(hiltTexture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs b/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs index 9659a70e50..62dc95c8a0 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs @@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 92); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 92); return false; } } diff --git a/Projectiles/Enemy/GammRayBurst.cs b/Projectiles/Enemy/GammRayBurst.cs index a4e3fe6007..ca00fcc4c4 100644 --- a/Projectiles/Enemy/GammRayBurst.cs +++ b/Projectiles/Enemy/GammRayBurst.cs @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Enemy GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage1("Images/Extra_189"); GameShaders.Misc["CalamityMod:ArtemisLaser"].UseImage2("Images/Misc/Perlin"); - PrimitiveSet.Prepare(baseDrawPoints, new(LaserWidthFunction, LaserColorFunction, shader: GameShaders.Misc["CalamityMod:ArtemisLaser"]), 64); + PrimitiveRenderer.RenderTrail(baseDrawPoints, new(LaserWidthFunction, LaserColorFunction, shader: GameShaders.Misc["CalamityMod:ArtemisLaser"]), 64); return false; } diff --git a/Projectiles/Magic/ApotheosisEnergy.cs b/Projectiles/Magic/ApotheosisEnergy.cs index 3b07f3cd4f..409d2dcbf4 100644 --- a/Projectiles/Magic/ApotheosisEnergy.cs +++ b/Projectiles/Magic/ApotheosisEnergy.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 85); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 85); return false; } } diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index 5df5a7651c..b1b740d1b6 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -225,7 +225,7 @@ namespace CalamityMod.Projectiles.Magic GameShaders.Misc["CalamityMod:ArtAttack"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); GameShaders.Misc["CalamityMod:ArtAttack"].Apply(); - PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ArtAttack"]), 180); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ArtAttack"]), 180); Main.spriteBatch.ExitShaderRegion(); Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(Color.White), Projectile.rotation, origin, Projectile.scale, 0, 0); diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index 687f365e50..a8906062d9 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -229,7 +229,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/EternityStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 84); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 84); return false; } } diff --git a/Projectiles/Magic/ExoVortex.cs b/Projectiles/Magic/ExoVortex.cs index 6c6d692ac4..0a62500f66 100644 --- a/Projectiles/Magic/ExoVortex.cs +++ b/Projectiles/Magic/ExoVortex.cs @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Magic // Draw the streak trail. GameShaders.Misc["CalamityMod:SideStreakTrail"].UseImage1("Images/Misc/Perlin"); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveTrailColor, PrimitiveOffsetFunction, shader: GameShaders.Misc["CalamityMod:SideStreakTrail"]), 51); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveTrailColor, PrimitiveOffsetFunction, shader: GameShaders.Misc["CalamityMod:SideStreakTrail"]), 51); Main.spriteBatch.EnterShaderRegion(BlendState.Additive); GameShaders.Misc["CalamityMod:ExoVortex"].Apply(); diff --git a/Projectiles/Magic/ExoVortex2.cs b/Projectiles/Magic/ExoVortex2.cs index 709bc151f2..e9a5505221 100644 --- a/Projectiles/Magic/ExoVortex2.cs +++ b/Projectiles/Magic/ExoVortex2.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Magic // Draw the streak trail. GameShaders.Misc["CalamityMod:SideStreakTrail"].UseImage1("Images/Misc/Perlin"); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveTrailColor, PrimitiveOffsetFunction, shader: GameShaders.Misc["CalamityMod:SideStreakTrail"]), 51); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveTrailColor, PrimitiveOffsetFunction, shader: GameShaders.Misc["CalamityMod:SideStreakTrail"]), 51); Main.spriteBatch.EnterShaderRegion(BlendState.Additive); GameShaders.Misc["CalamityMod:ExoVortex"].Apply(); diff --git a/Projectiles/Magic/FabBolt.cs b/Projectiles/Magic/FabBolt.cs index aaa9f19de2..0c2fe68207 100644 --- a/Projectiles/Magic/FabBolt.cs +++ b/Projectiles/Magic/FabBolt.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, smoothen: false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 80); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, smoothen: false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 80); return false; } diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index a8549dc517..2613214198 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new PrimitiveSettings(WidthFunction, ColorFunction, OffsetFunction, pixelate: false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 32); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new PrimitiveSettings(WidthFunction, ColorFunction, OffsetFunction, pixelate: false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 32); return false; } diff --git a/Projectiles/Magic/RainbowRocket.cs b/Projectiles/Magic/RainbowRocket.cs index 5f877720b9..47fc617a81 100644 --- a/Projectiles/Magic/RainbowRocket.cs +++ b/Projectiles/Magic/RainbowRocket.cs @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { Projectile.oldPos[0] = Projectile.position + Projectile.velocity.SafeNormalize(Vector2.Zero) * 50f; - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity), 80); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity), 80); Texture2D rocketTexture = ModContent.Request(Texture).Value; Main.EntitySpriteDraw(rocketTexture, diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index 8730747df1..023978211a 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < basePoints.Length; i++) basePoints[i] = Projectile.Center + Projectile.velocity * i / (basePoints.Length - 1f) * LaserLength; - PrimitiveSet.Prepare(basePoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, shader: GameShaders.Misc["CalamityMod:Flame"]), 92); + PrimitiveRenderer.RenderTrail(basePoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, shader: GameShaders.Misc["CalamityMod:Flame"]), 92); return false; } diff --git a/Projectiles/Magic/WulfrumBolt.cs b/Projectiles/Magic/WulfrumBolt.cs index 348177d500..cfc61cf935 100644 --- a/Projectiles/Magic/WulfrumBolt.cs +++ b/Projectiles/Magic/WulfrumBolt.cs @@ -197,7 +197,7 @@ namespace CalamityMod.Projectiles.Magic { PrimColorMult = colorMod; - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Melee/EonBolt.cs b/Projectiles/Melee/EonBolt.cs index d1ddcad5d6..7dfa68a3c0 100644 --- a/Projectiles/Melee/EonBolt.cs +++ b/Projectiles/Melee/EonBolt.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); Texture2D texture = Request("CalamityMod/Projectiles/Melee/GalaxiaBolt").Value; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.White, 0.5f), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Melee/Exobeam.cs b/Projectiles/Melee/Exobeam.cs index 7c8c37c4a7..c7d6d046fd 100644 --- a/Projectiles/Melee/Exobeam.cs +++ b/Projectiles/Melee/Exobeam.cs @@ -171,12 +171,12 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:ExobladePierce"].Apply(); - PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); GameShaders.Misc["CalamityMod:ExobladePierce"].UseColor(Color.White); GameShaders.Misc["CalamityMod:ExobladePierce"].UseSecondaryColor(Color.White); - PrimitiveSet.Prepare(Projectile.oldPos, new(MiniTrailWidth, MiniTrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(MiniTrailWidth, MiniTrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); Main.spriteBatch.ExitShaderRegion(); diff --git a/Projectiles/Melee/ExobladeProj.cs b/Projectiles/Melee/ExobladeProj.cs index e0be4a3565..9084d6c121 100644 --- a/Projectiles/Melee/ExobladeProj.cs +++ b/Projectiles/Melee/ExobladeProj.cs @@ -432,7 +432,7 @@ namespace CalamityMod.Projectiles.Melee public Color PierceColorFunction(float completionRatio) => Color.Lime * Projectile.Opacity; //The trail color doesnt matter here - public IEnumerable GenerateSlashPoints() + public List GenerateSlashPoints() { List result = new(); @@ -473,7 +473,7 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:ExobladeSlash"].Shader.Parameters["flipped"].SetValue(Direction == 1); GameShaders.Misc["CalamityMod:ExobladeSlash"].Apply(); - PrimitiveSet.Prepare(GenerateSlashPoints(), new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 95); + PrimitiveRenderer.RenderTrail(GenerateSlashPoints(), new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 95); Main.spriteBatch.ExitShaderRegion(); } @@ -498,7 +498,7 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:ExobladePierce"].UseColor(mainColor); GameShaders.Misc["CalamityMod:ExobladePierce"].UseSecondaryColor(secondaryColor); GameShaders.Misc["CalamityMod:ExobladePierce"].Apply(); - PrimitiveSet.Prepare(Projectile.oldPos.Take(51), new(PierceWidthFunction, PierceColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 53); + PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(51).ToArray(), new(PierceWidthFunction, PierceColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 53); Main.spriteBatch.ExitShaderRegion(); } diff --git a/Projectiles/Melee/MarniteObliteratorProj.cs b/Projectiles/Melee/MarniteObliteratorProj.cs index a151620d7d..bf20de65ad 100644 --- a/Projectiles/Melee/MarniteObliteratorProj.cs +++ b/Projectiles/Melee/MarniteObliteratorProj.cs @@ -174,7 +174,7 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(bloomTex, Projectile.Center - Main.screenPosition, null, Color.DeepSkyBlue * 0.3f, MathHelper.PiOver2, bloomTex.Size() / 2f, 0.3f * Projectile.scale, SpriteEffects.None, 0); GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/DoubleTrail")); - PrimitiveSet.Prepare(new Vector2[] { Projectile.Center, Owner.MountedCenter - normalizedVelocity * 13f }, new(WidthFunction, ColorFunction, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(new Vector2[] { Projectile.Center, Owner.MountedCenter - normalizedVelocity * 13f }, new(WidthFunction, ColorFunction, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/PrismTooth.cs b/Projectiles/Melee/PrismTooth.cs index fb8c3375b6..0974f059dd 100644 --- a/Projectiles/Melee/PrismTooth.cs +++ b/Projectiles/Melee/PrismTooth.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.EnterShaderRegion(); GameShaders.Misc["CalamityMod:PrismaticStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + generalOffset, shader: GameShaders.Misc["CalamityMod:PrismaticStreak"]), 65); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + generalOffset, shader: GameShaders.Misc["CalamityMod:PrismaticStreak"]), 65); Main.spriteBatch.ExitShaderRegion(); return true; } diff --git a/Projectiles/Melee/RendingNeedle.cs b/Projectiles/Melee/RendingNeedle.cs index b898c7ee36..1123b48b69 100644 --- a/Projectiles/Melee/RendingNeedle.cs +++ b/Projectiles/Melee/RendingNeedle.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D texture = Request("CalamityMod/Projectiles/Melee/RendingNeedle").Value; GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, OffsetFunction, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, OffsetFunction, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.White, 0.5f), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Melee/StygianShieldAttack.cs b/Projectiles/Melee/StygianShieldAttack.cs index 54a1ef52a0..57cdbaf87d 100644 --- a/Projectiles/Melee/StygianShieldAttack.cs +++ b/Projectiles/Melee/StygianShieldAttack.cs @@ -222,7 +222,7 @@ namespace CalamityMod.Projectiles.Melee // Main trail GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + extraOffset + Main.screenPosition - direction * 80f, + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + extraOffset + Main.screenPosition - direction * 80f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 10); ArrowEffect.Parameters["halfSpreadAngle"].SetValue(MathHelper.ToRadians(7.5f)); diff --git a/Projectiles/Melee/TaintedBladeSlasher.cs b/Projectiles/Melee/TaintedBladeSlasher.cs index 95cecc3c2c..ee548fb87e 100644 --- a/Projectiles/Melee/TaintedBladeSlasher.cs +++ b/Projectiles/Melee/TaintedBladeSlasher.cs @@ -262,7 +262,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.direction == -1) Utils.Swap(ref leftVertexPosition, ref rightVertexPosition); - PrimitiveSet.Prepare(drawPoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => BladeCenterPosition - Projectile.position, + PrimitiveRenderer.RenderTrail(drawPoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => BladeCenterPosition - Projectile.position, shader: GameShaders.Misc["CalamityMod:FadingSolidTrail"], initialVertexPositionsOverride: (leftVertexPosition, rightVertexPosition)), 67); } diff --git a/Projectiles/Melee/TerratomereBeam.cs b/Projectiles/Melee/TerratomereBeam.cs index 3f247b6ddb..98e28883c2 100644 --- a/Projectiles/Melee/TerratomereBeam.cs +++ b/Projectiles/Melee/TerratomereBeam.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Melee points.Add(ControlPoints[i] + ControlPoints[i].SafeNormalize(Vector2.Zero) * (Projectile.scale - 1f) * 40f); for (int i = 0; i < 3; i++) - PrimitiveSet.Prepare(points, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 65); + PrimitiveRenderer.RenderTrail(points, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 65); Main.spriteBatch.ExitShaderRegion(); return false; diff --git a/Projectiles/Melee/TerratomereBigSlash.cs b/Projectiles/Melee/TerratomereBigSlash.cs index 641f0fb86c..7f1ccc9d30 100644 --- a/Projectiles/Melee/TerratomereBigSlash.cs +++ b/Projectiles/Melee/TerratomereBigSlash.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:ExobladePierce"].UseSecondaryColor(Terratomere.TerraColor2); for (int i = 0; i < 4; i++) - PrimitiveSet.Prepare(Projectile.oldPos, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); return false; } diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index 8790e3996c..5dee9fcaec 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -237,7 +237,7 @@ namespace CalamityMod.Projectiles.Melee PrepareSlashShader(Direction == 1); if (SwingCompletionAtStartOfTrail > SwingCompletionRatio) - PrimitiveSet.Prepare(GenerateSlashPoints(), new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 95); + PrimitiveRenderer.RenderTrail(GenerateSlashPoints().ToArray(), new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Center, shader: GameShaders.Misc["CalamityMod:ExobladeSlash"]), 95); Main.spriteBatch.ExitShaderRegion(); } diff --git a/Projectiles/Melee/ViolenceSlashProjectile.cs b/Projectiles/Melee/ViolenceSlashProjectile.cs index 89736bbf14..9158e821fd 100644 --- a/Projectiles/Melee/ViolenceSlashProjectile.cs +++ b/Projectiles/Melee/ViolenceSlashProjectile.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Melee positions.Add(position); } - PrimitiveSet.Prepare(positions, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]), 50); + PrimitiveRenderer.RenderTrail(positions, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"]), 50); return true; } } diff --git a/Projectiles/Melee/ViolenceThrownProjectile.cs b/Projectiles/Melee/ViolenceThrownProjectile.cs index da80a0724f..8900e7f882 100644 --- a/Projectiles/Melee/ViolenceThrownProjectile.cs +++ b/Projectiles/Melee/ViolenceThrownProjectile.cs @@ -215,7 +215,7 @@ namespace CalamityMod.Projectiles.Melee drawPoints[i] -= (Projectile.oldRot[i] + MathHelper.PiOver4).ToRotationVector2() * Projectile.height * 0.5f; if (Time > Projectile.oldPos.Length) - PrimitiveSet.Prepare(drawPoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 88); + PrimitiveRenderer.RenderTrail(drawPoints, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 88); Vector2 drawPosition = Projectile.Center - Main.screenPosition; for (int i = 0; i < 6; i++) diff --git a/Projectiles/Melee/WulfrumScrew.cs b/Projectiles/Melee/WulfrumScrew.cs index d497a35f4c..4487c854a8 100644 --- a/Projectiles/Melee/WulfrumScrew.cs +++ b/Projectiles/Melee/WulfrumScrew.cs @@ -205,7 +205,7 @@ namespace CalamityMod.Projectiles.Melee CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); //Draw the screw with chroma abberation diff --git a/Projectiles/Ranged/ExoCrystalArrow.cs b/Projectiles/Ranged/ExoCrystalArrow.cs index f795becc29..790353c8c0 100644 --- a/Projectiles/Ranged/ExoCrystalArrow.cs +++ b/Projectiles/Ranged/ExoCrystalArrow.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Ranged GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].UseColor(mainColor); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].UseSecondaryColor(secondaryColor); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].Apply(); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"]), 53); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"]), 53); Texture2D tex = ModContent.Request(Texture).Value; Vector2 origin = tex.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Ranged/ExoLightningBolt.cs b/Projectiles/Ranged/ExoLightningBolt.cs index 307fb9d459..4d1bc1e6f0 100644 --- a/Projectiles/Ranged/ExoLightningBolt.cs +++ b/Projectiles/Ranged/ExoLightningBolt.cs @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Ranged GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].Apply(); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, false, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]), 18); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.5f, false, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]), 18); return false; } diff --git a/Projectiles/Ranged/MarksmanShot.cs b/Projectiles/Ranged/MarksmanShot.cs index b4048dfc0c..5afea94f6a 100644 --- a/Projectiles/Ranged/MarksmanShot.cs +++ b/Projectiles/Ranged/MarksmanShot.cs @@ -213,7 +213,7 @@ namespace CalamityMod.Projectiles.Ranged return false; GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); - PrimitiveSet.Prepare(trailPositions, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), trailLength); + PrimitiveRenderer.RenderTrail(trailPositions, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), trailLength); return false; } diff --git a/Projectiles/Ranged/MeowCreature.cs b/Projectiles/Ranged/MeowCreature.cs index 3daeb2a679..c86d636e43 100644 --- a/Projectiles/Ranged/MeowCreature.cs +++ b/Projectiles/Ranged/MeowCreature.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Ranged // The creature glows public override void PostDraw(Color lightColor) { - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 30); Texture2D glow = ModContent.Request(Texture).Value; Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); } diff --git a/Projectiles/Ranged/MineralMortarProjectile.cs b/Projectiles/Ranged/MineralMortarProjectile.cs index b21bc0299c..6d9d685dfd 100644 --- a/Projectiles/Ranged/MineralMortarProjectile.cs +++ b/Projectiles/Ranged/MineralMortarProjectile.cs @@ -178,7 +178,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 origin = texture.Size() * 0.5f; GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SwordSlashTexture")); - PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidthFunction, ColorTrailFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 50); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidthFunction, ColorTrailFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 50); if (CalamityConfig.Instance.Afterimages) { for (int i = 0; i < 3; i++) diff --git a/Projectiles/Ranged/PristineFire.cs b/Projectiles/Ranged/PristineFire.cs index 7ac5652133..e2e3d4705d 100644 --- a/Projectiles/Ranged/PristineFire.cs +++ b/Projectiles/Ranged/PristineFire.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 sinOffset = (Vector2.UnitY * direction * MathF.Sin(i * MathHelper.Pi * 0.125f) * 24f).RotatedBy(Projectile.oldRot[i]); trailPositions.Add(Projectile.oldPos[i] + sinOffset); } - PrimitiveSet.Prepare(trailPositions, new(HelixTrailWidthFunction, HelixTrailColorFunction, (_) => Projectile.Size * 0.5f), 60); + PrimitiveRenderer.RenderTrail(trailPositions, new(HelixTrailWidthFunction, HelixTrailColorFunction, (_) => Projectile.Size * 0.5f), 60); } return false; } diff --git a/Projectiles/Ranged/SpeedBlasterShot.cs b/Projectiles/Ranged/SpeedBlasterShot.cs index 0a3cfc47dc..92f322dfa0 100644 --- a/Projectiles/Ranged/SpeedBlasterShot.cs +++ b/Projectiles/Ranged/SpeedBlasterShot.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Ranged internal Color ColorFunction(float completionRatio) => GetColor(Projectile.ai[0]) * Projectile.Opacity; public override bool PreDraw(ref Color lightColor) { - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 20); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 20); return true; } } diff --git a/Projectiles/Ranged/TelluricGlareArrow.cs b/Projectiles/Ranged/TelluricGlareArrow.cs index 2dab8db792..cdb20f40e5 100644 --- a/Projectiles/Ranged/TelluricGlareArrow.cs +++ b/Projectiles/Ranged/TelluricGlareArrow.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Ranged GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); Vector2 overallOffset = Projectile.Size * 0.5f; overallOffset += Projectile.velocity * 1.4f; - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => overallOffset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 92); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => overallOffset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 92); return false; } diff --git a/Projectiles/Ranged/TheMaelstromShark.cs b/Projectiles/Ranged/TheMaelstromShark.cs index 95392e0182..d560c6a9c5 100644 --- a/Projectiles/Ranged/TheMaelstromShark.cs +++ b/Projectiles/Ranged/TheMaelstromShark.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Ranged SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 60); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 60); Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0); return false; } diff --git a/Projectiles/Ranged/WulfrumScrapBullet.cs b/Projectiles/Ranged/WulfrumScrapBullet.cs index fd26a60f77..09cfa52d89 100644 --- a/Projectiles/Ranged/WulfrumScrapBullet.cs +++ b/Projectiles/Ranged/WulfrumScrapBullet.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); return false; } } diff --git a/Projectiles/Rogue/DynamicPursuerElectricity.cs b/Projectiles/Rogue/DynamicPursuerElectricity.cs index 307247065f..c684cf4d79 100644 --- a/Projectiles/Rogue/DynamicPursuerElectricity.cs +++ b/Projectiles/Rogue/DynamicPursuerElectricity.cs @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false), 90); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false), 90); return false; } } diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index 68bfa13cb7..6f47f1ddfd 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -176,7 +176,7 @@ namespace CalamityMod.Projectiles.Rogue else { GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.Zero) * 86f, false, + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.Zero) * 86f, false, shader: GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"]), 60); Texture2D spearTexture = ModContent.Request(Texture).Value; diff --git a/Projectiles/Rogue/StormfrontLightning.cs b/Projectiles/Rogue/StormfrontLightning.cs index 562e292843..6c1b3236d3 100644 --- a/Projectiles/Rogue/StormfrontLightning.cs +++ b/Projectiles/Rogue/StormfrontLightning.cs @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Rogue GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].UseImage1("Images/Misc/Perlin"); GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"].Apply(); - PrimitiveSet.Prepare(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.3f, false, + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => Projectile.Size * 0.3f, false, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleLightningArc"]), 10); return false; } diff --git a/Projectiles/Rogue/WulfrumKnifeProj.cs b/Projectiles/Rogue/WulfrumKnifeProj.cs index 00e1882c66..205b90da10 100644 --- a/Projectiles/Rogue/WulfrumKnifeProj.cs +++ b/Projectiles/Rogue/WulfrumKnifeProj.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); diff --git a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs index 571e684ea6..362bf33118 100644 --- a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs +++ b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Summon { Vector2[] segmentPositions = Segments.Select(x => x.position).ToArray(); - PrimitiveSet.Prepare(segmentPositions, new(PrimWidthFunction, PrimColorFunction), 66); + PrimitiveRenderer.RenderTrail(segmentPositions, new(PrimWidthFunction, PrimColorFunction), 66); Texture2D tex = Request(Texture).Value; diff --git a/Projectiles/Summon/CosmilampBeam.cs b/Projectiles/Summon/CosmilampBeam.cs index 8ca0f13065..87ad061d9c 100644 --- a/Projectiles/Summon/CosmilampBeam.cs +++ b/Projectiles/Summon/CosmilampBeam.cs @@ -107,11 +107,12 @@ namespace CalamityMod.Projectiles.Summon { Projectile.localAI[0] = 0f; GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - var primSet = PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 42); + var settings = new PrimitiveSettings(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, settings, 42); Projectile.localAI[0] = 1f; - if (primSet.HasValue) - primSet.Value.Render(); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, settings, 42); + return false; } } diff --git a/Projectiles/Summon/DaedalusLightning.cs b/Projectiles/Summon/DaedalusLightning.cs index 1528615ff5..42fbd834b3 100644 --- a/Projectiles/Summon/DaedalusLightning.cs +++ b/Projectiles/Summon/DaedalusLightning.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Summon } public override bool PreDraw(ref Color lightColor) { - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false), 90); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, false), 90); return false; } #endregion diff --git a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs index 5c371e9c66..566685e222 100644 --- a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs +++ b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs @@ -114,8 +114,8 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms if (orbToAttachTo != null) { List arcPoints = AresTeslaOrb.DetermineElectricArcPoints(Projectile.Center, orbToAttachTo.Center, 117); - PrimitiveSet.Prepare(arcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); - PrimitiveSet.Prepare(arcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arcPoints, new(BackgroundWidthFunction, BackgroundColorFunction, smoothen: false), 90); + PrimitiveRenderer.RenderTrail(arcPoints, new(WidthFunction, ColorFunction, smoothen: false), 90); } lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index 00290cc4f6..b603524057 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -471,7 +471,7 @@ namespace CalamityMod.Projectiles.Summon CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1.8f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - PrimitiveSet.Prepare(drawPos, new(WidthFunction, ColorFunction, (_) => offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(drawPos, new(WidthFunction, ColorFunction, (_) => offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Summon/WulfrumEnergyBurst.cs b/Projectiles/Summon/WulfrumEnergyBurst.cs index 406b4e6c84..3a042342ef 100644 --- a/Projectiles/Summon/WulfrumEnergyBurst.cs +++ b/Projectiles/Summon/WulfrumEnergyBurst.cs @@ -185,7 +185,7 @@ namespace CalamityMod.Projectiles.Summon CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1.5f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Summon/WulfrumFusionBolt.cs b/Projectiles/Summon/WulfrumFusionBolt.cs index ac265cc5fa..1208dce2db 100644 --- a/Projectiles/Summon/WulfrumFusionBolt.cs +++ b/Projectiles/Summon/WulfrumFusionBolt.cs @@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.Summon { PrimColorMult = colorMod; - PrimitiveSet.Prepare(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); Main.spriteBatch.End(); diff --git a/Projectiles/Typeless/GemTechArmorGem.cs b/Projectiles/Typeless/GemTechArmorGem.cs index ff4bf52fc6..28d9652699 100644 --- a/Projectiles/Typeless/GemTechArmorGem.cs +++ b/Projectiles/Typeless/GemTechArmorGem.cs @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.Typeless Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(Color.White), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); if (Projectile.ai[0] > UpwardFlyTime + RedirectTime) - PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 71); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 71); return false; } diff --git a/Projectiles/Typeless/MythrilFlare.cs b/Projectiles/Typeless/MythrilFlare.cs index 0978506c57..56ebc10890 100644 --- a/Projectiles/Typeless/MythrilFlare.cs +++ b/Projectiles/Typeless/MythrilFlare.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Typeless { // Prepare the flame trail shader with its map texture. GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/EternityStreak")); - PrimitiveSet.Prepare(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 74); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 74); return false; } diff --git a/Projectiles/Typeless/SuicideBomberDemon.cs b/Projectiles/Typeless/SuicideBomberDemon.cs index b409412ca0..909fa94286 100644 --- a/Projectiles/Typeless/SuicideBomberDemon.cs +++ b/Projectiles/Typeless/SuicideBomberDemon.cs @@ -264,7 +264,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 trailOffset = Projectile.Size * 0.5f; trailOffset += (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 20f; - PrimitiveSet.Prepare(Projectile.oldPos, new(FlameTrailWidthFunction, FlameTrailColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 61); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(FlameTrailWidthFunction, FlameTrailColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 61); } Main.spriteBatch.ExitShaderRegion(); diff --git a/Projectiles/Typeless/WulfrumHook.cs b/Projectiles/Typeless/WulfrumHook.cs index cdc008c50b..ec8940faf4 100644 --- a/Projectiles/Typeless/WulfrumHook.cs +++ b/Projectiles/Typeless/WulfrumHook.cs @@ -235,7 +235,7 @@ namespace CalamityMod.Projectiles.Typeless if (State == HookState.Grappling) segmentPositions = Owner.GetModPlayer().Segments.Select(x => x.position).ToArray(); - PrimitiveSet.Prepare(new List(segmentPositions) { Owner.Center }, new(PrimWidthFunction, PrimColorFunction), 30); + PrimitiveRenderer.RenderTrail(new List(segmentPositions) { Owner.Center }, new(PrimWidthFunction, PrimColorFunction, smoothen: State is HookState.Grappling), 30); Texture2D texture = TextureAssets.Projectile[Type].Value; From a0e10c0493346009d2deb73fbc83fa21f015ebbe Mon Sep 17 00:00:00 2001 From: Dominic Karma <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 3 Mar 2024 19:33:44 -0600 Subject: [PATCH 030/197] Fixing Primitive Width Function Distortions (#25) * Change width storage definitions * Update primitive shaders --- Effects/ArtAttackTrail.fx | 14 ++++++++------ Effects/ArtAttackTrail.xnb | Bin 2820 -> 2884 bytes Effects/ArtemisLaserShader.fx | 10 ++++++---- Effects/ArtemisLaserShader.xnb | Bin 3492 -> 3552 bytes Effects/BasicPrimitiveShader.fx | 7 +++---- Effects/BasicPrimitiveShader.xnb | Bin 2020 -> 2020 bytes Effects/BordernadoFire.fx | 8 +++++--- Effects/BordernadoFire.xnb | Bin 3168 -> 3228 bytes Effects/Dyes/PrismaticRayShader.fx | 9 ++++++--- Effects/Dyes/PrismaticRayShader.xnb | Bin 3128 -> 3128 bytes Effects/ExobladePierceShader.fx | 8 ++++++-- Effects/ExobladePierceShader.xnb | Bin 3584 -> 3672 bytes Effects/ExobladeSlashShader.fx | 15 +++++++++------ Effects/ExobladeSlashShader.xnb | Bin 3888 -> 3836 bytes Effects/FadedUVMapStreak.fx | 9 ++++++--- Effects/FadedUVMapStreak.xnb | Bin 2916 -> 2976 bytes Effects/FadingSolidTrail.fx | 11 +++++++---- Effects/FadingSolidTrail.xnb | Bin 2660 -> 2708 bytes Effects/Flame.fx | 8 +++++--- Effects/Flame.xnb | Bin 3272 -> 3344 bytes Effects/HeavenlyGaleLightningShader.fx | 9 ++++++--- Effects/HeavenlyGaleLightningShader.xnb | Bin 2648 -> 2696 bytes Effects/HeavenlyGaleTrailShader.fx | 9 ++++++--- Effects/HeavenlyGaleTrailShader.xnb | Bin 3724 -> 3812 bytes Effects/ImpFlameTrail.fx | 11 +++++++---- Effects/ImpFlameTrail.xnb | Bin 2848 -> 2884 bytes Effects/PhaseslayerRipShader.fx | 11 +++++++---- Effects/PhaseslayerRipShader.xnb | Bin 2192 -> 2252 bytes Effects/PrimTextureOverlayShader.fx | 17 +++++++++++------ Effects/PrimTextureOverlayShader.xnb | Bin 2796 -> 2832 bytes Effects/PrimitiveClearShader.fx | 15 ++++++++++----- Effects/PrimitiveClearShader.xnb | Bin 1176 -> 1260 bytes Effects/PrismCrystalStreak.fx | 10 ++++++---- Effects/PrismCrystalStreak.xnb | Bin 2988 -> 3048 bytes Effects/ScarletDevilStreak.fx | 10 ++++++---- Effects/ScarletDevilStreak.xnb | Bin 2988 -> 3048 bytes Effects/SideStreakTrail.fx | 15 +++++++++------ Effects/SideStreakTrail.xnb | Bin 3360 -> 3348 bytes Effects/StandardPrimitiveShader.fx | 5 ++--- Effects/StandardPrimitiveShader.xnb | Bin 2024 -> 2024 bytes Graphics/Primitives/PrimitiveRenderer.cs | 11 +++++------ .../VertexPosition2DColorTexture.cs | 11 +++++++---- 42 files changed, 143 insertions(+), 90 deletions(-) diff --git a/Effects/ArtAttackTrail.fx b/Effects/ArtAttackTrail.fx index b91dddd7ce..9580d97725 100644 --- a/Effects/ArtAttackTrail.fx +++ b/Effects/ArtAttackTrail.fx @@ -20,22 +20,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -52,6 +51,9 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float4 color = input.Color; float2 coords = input.TextureCoordinates; + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + // Read the fade map as a streak. float4 fadeMapColor = tex2D(uImage1, coords - float2(uTime * 0.6, 0)); float opacity = fadeMapColor.r; @@ -63,7 +65,7 @@ technique Technique1 { pass TrailPass { - VertexShader = compile vs_2_0 VertexShaderFunction(); - PixelShader = compile ps_2_0 PixelShaderFunction(); + VertexShader = compile vs_3_0 VertexShaderFunction(); + PixelShader = compile ps_3_0 PixelShaderFunction(); } } diff --git a/Effects/ArtAttackTrail.xnb b/Effects/ArtAttackTrail.xnb index 8c6d6b95d4e5a63e6f2539e0dcb92144fe48cb54..fae13d42ef8e8f251459cc54dceefc3887b75df7 100644 GIT binary patch delta 639 zcmYLGJxjw-6umb|le9|^rIaFwgZKlggNwG+MF&5?Ko=MPKsR;E6Z`=w+5EtWxMY*; z+QG%GdmS=ladvQPJohEkkO%jickX%T-FMUcXgY(#{$-8#M$QA@k6vzhn0EP&`7HV} zw#?UGJ8hXQvwdX}ky#Y8VwHAJd;Mj=BP=qb1G~qa=(w?wj_n}_?;v-u)cN{F_k^fs zkQYDy6x+g2z0dB{+aC*Wg70)v(aygWBBOy`A}^G>hMLLIHAEr1UTok{A_h+}lONj9 z;RjAaivqF)K#b*s^kWe6YYZg}{CH6}374q<{X`j*V84jhu+Q2jQ3!zpE%8z)V!=$F z?j_1Y1ThR^V0z*}1DyuxB$-YcmZ@!sCOBlGN>kkg7as089<_w_-Qf7btNq zKG5gaIv6haU|EJUzOun2;e#7YZA@E}DRt*y1p2^JA7E~Hb$lVEdc z4uaZ5`e8Wub zPf?OY)XU4fT&(L@yx`}B ztEl0m#+Rf$Mqx_(HbBAzp$x&K8+p1}kQkZ90TDqnI@d*l@;Ikhpz%~ANa-4_LE!dw zGO$umPL{%&=5>fjjMe;DZT!B@ojw)qk8Fzz?UR{WJ!`JceLW2#Ot3H*ohH~aSo~t! UV13Qxw>kr8gCv(<&;@#qA5&|Az5oCK diff --git a/Effects/ArtemisLaserShader.fx b/Effects/ArtemisLaserShader.fx index d642d6197f..9c814be75f 100644 --- a/Effects/ArtemisLaserShader.fx +++ b/Effects/ArtemisLaserShader.fx @@ -21,22 +21,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -55,6 +54,9 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float4 color = input.Color; float2 coords = input.TextureCoordinates; + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + // Read the fade map as a streak. float bloomFadeout = pow(sin(coords.y * 3.141), 4); float4 fadeMapColor = tex2D(uImage1, float2(frac(coords.x * 20 - uTime * 5.5), coords.y)); diff --git a/Effects/ArtemisLaserShader.xnb b/Effects/ArtemisLaserShader.xnb index 5440f33bfb7c36e637a51cb37e3bfaaab8d7c9df..af315e0e31dca0047ba8137d7ea81856d8827e3b 100644 GIT binary patch delta 638 zcmZWlJxc>o5S)Fv%OwU$VI!u{Mgm%h*rd`VU||ywJV+s0YpYSXd3RkIR)Th`dF0FRG&nc4$-A4X7=eA0U3sue zX3+q>ZSyXIUdx*?2KnB8{@Bz3Jh9fUKGIbnZfpX+hjKh9ztjiijc4Gw{@U+9>fGlX zm}}f0+WS#$r@69nux4w;9SQ7Nu_}puDlT_ulmkozgk3gqo&fNOldi``TpucqatPyW zR*1ymB-Ys!H3FTb(GTx>?uYR_?-+V0A7B(0SU!EJ=|l#htMR}s>7uwG1)8SLGz*C? z$N{*_OkHrdYmnpjWvufUB>AIDlpE`WH$viBO|Hq3sL4bIWri6=QW(XGb9Qf{vZc|~ zUSp{&!+HV^XaCSs-1Yh1Hs1>9ZlL)Q~E)MwxqP)RL`o!Xp z#gweYc5o3Y{(vqWf{T;53h~~Af}nimH4ZZdb`C*OZ8p*Y@_ z?|6hDx5S2sRCp-95HW1&D?+>&;pyC!s6Twiy8uv|*st}8y+1ktFm$jLfNB7Y>Tl!m zGr($td4u@Dxg12*PP0-ut5FSQ)$E`qZ_N_Aa%h(K5I`Vko(_@H0q7GREeMF`|NSBn z0+7zG$Gsxa-Qa((D<`>Pk$QqAfF{891VkQYBgGiyyycvv6FNHu8s*i%RqReniSsD| zZ%@w}_@u{bjfixk?`0@qmdYSU?h}-VYlhi_NW(h$+s%j_BNI0f)nWss1 zN$+aVCV6SC7kPx`nJLSRV>z@6ONn9MplE*#<)>A4(#PT}_(?p3Qvls(n0TKWJ3jhEBRApmmZfS9K XWibE%vy22z0}2D+0s!QY|Nj60hbY5Ph?k%U%xQiXbtKM#MrJ8^JC)vyUV%LIVYWfv&x-b42`En#MuBR#R3-&H<`2YX_ delta 478 zcmY+8JxBvV6olvP<#O?om?8+;Xo6T63kwSoAs6fff3OHx#xjkSXeBwVVi(!Ups+z~ zPK$%!U*k_HBw}M_W05+7f{4xe_5z}?3vcJmH?xOBuY=a=(%hCwrG4v&uJ%vr6q5xi zlO;VWiSoKkh#UzyEjB3HJQMRoXnq>sB)%fecXLxz+O35=0H=O%?Hqpu`4zwvNU4|9 zL*XSge+Lu_fa_@8U>&$~^jkCSRx9*JLfv&9+l$Uyx2yA@{br~GyE}B-P?;O{hdEK! zDfx817Qg7fJoR$3d)4ZU1}vHE8?PAt2p~A4MzNHN0DNLDQ1l6bA{13R+!Jeo+uQ3I zE<;N2evBD{2(>6W%HnGR1`zsu_WJ)hkGVi)*dwO6j7vh81OGyeUU4s&em_z4Wx^gN z$O(ItJh^O7@?5dASp%LjIJeiWF&*o1JOsgVO?hvpDI%Y3hs@?ce4A|JRiIM~0^kP? Cb#Ms) diff --git a/Effects/Dyes/PrismaticRayShader.fx b/Effects/Dyes/PrismaticRayShader.fx index 3dfb2c6ce1..e6101a07cb 100644 --- a/Effects/Dyes/PrismaticRayShader.fx +++ b/Effects/Dyes/PrismaticRayShader.fx @@ -20,14 +20,14 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) @@ -35,7 +35,6 @@ VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -49,6 +48,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float coordsFactor = 40; if (uOpacity >= 0) coordsFactor *= uOpacity; diff --git a/Effects/Dyes/PrismaticRayShader.xnb b/Effects/Dyes/PrismaticRayShader.xnb index a7d900ca9ea4ecc9aa5e2a2ceb4bd44ed504d71e..64a1fef3defc59eec45679e14e28681a9a18c761 100644 GIT binary patch delta 49 zcmV-10M7ro7`Pa)E&>8;U9&I(2>}DPN(YlX1Kk4v005I51d{;(v#7o0JAUx2>}BEZUB=!1Kk6vWCfEP1d{f}lq_8^PirAXxbcM6j^PeT0OoM1&QwNp*16 zDp>gq0%TgaX zfHWz&u4BLnV1$~#_hB|=gw8RVz8-x=-J_3Qu2SlSYCcA1p04bn@P2`%ZpmuNfHmGz za9+5eWl95TU1*qvFXDqO&HurMAVY}d851PPJk+GEQ*EgAUZ_JE3JS*A?Tx|C;|U^Q9~>Il*o4TIo)EUaINUn|jYe;;Pu`?6#!BXG4) i@TX7ak5Jgwy+XX*a&tOX{=00XCqiFq_VQHm4Jms<`Fie5*0?o!c>v5 z7QxCl2&A#tRxEsg^~}tQu*2M+@60`SS3TRy#>b;eBba4(GM+uY3g%~Wp(f{kCD)># z_B(!}-$mdL%!|ma|LR=ny@#LX5Wrwvd<@sc(c1}N3<}rp`yuNV81lA*dDT4?J^$`* zPX$nbSl;(3R@R_&8vs8|Nxkf#cDw_lge+QC@Xt!i8Z4ZU9Z?JvL2p%FyO0a>&=cnA zeKjReE}5`Ux~*tNg_>=FHeRsbxLul392)u=P31g0agef#H51)M>D|wPYkXyr{$w+ek*H3)f4rnU=LT(rIc&5ht%^T_JPtL2F2KWV} Cb7V{a diff --git a/Effects/ExobladeSlashShader.fx b/Effects/ExobladeSlashShader.fx index 5d340a58b2..2525066b8a 100644 --- a/Effects/ExobladeSlashShader.fx +++ b/Effects/ExobladeSlashShader.fx @@ -23,22 +23,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -54,6 +53,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + if (flipped) coords.y = 1 - coords.y; @@ -103,7 +106,7 @@ technique Technique1 { pass TrailPass { - VertexShader = compile vs_2_0 VertexShaderFunction(); - PixelShader = compile ps_2_0 PixelShaderFunction(); + VertexShader = compile vs_3_0 VertexShaderFunction(); + PixelShader = compile ps_3_0 PixelShaderFunction(); } } diff --git a/Effects/ExobladeSlashShader.xnb b/Effects/ExobladeSlashShader.xnb index 5a61b1bcb988a907e5fae85eaf5c80c40af6786b..6dbc5546091c930539e587c8213324c931e74258 100644 GIT binary patch delta 1295 zcmYjRziSjh7=7RF-rgiJS&V5Ef20vCY(y>Nov~36LC8W73qcdL2?QcG!fqNXi#^UJ zL2wV$;tC0*kLg6XfPE0ISb_-t1%{08o4HHw*twnW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Do^ z8^ZGwhsZ)0VyNvSr)X7ZDfRN;)83cQMjRi1^&#?t;Wta=_Kp42~ zL0mo{aO9yL4`R3qYBHxZH=*;bDL zgy&{6;vTDg65FOd#J}vw}ZOLbIY_4#0}|J*lh+Cj}^)uhF~>;DP#V;#|CGuAAw4 z1{-mMy8NCf_m5z$=8jnaCzv&+@wxK&!9AC1@LMB~H{6fnh4RQ)9Sq4`d?u#$J`*oM z;WP2H+{B0H=>GXSR)lqlExr%FH-n|dd?yCm8uPjh_B6&+iSA1NHe!tevc4m(p%l?y DPB96T diff --git a/Effects/FadedUVMapStreak.fx b/Effects/FadedUVMapStreak.fx index 906d2ded1f..2c0a1b0891 100644 --- a/Effects/FadedUVMapStreak.fx +++ b/Effects/FadedUVMapStreak.fx @@ -19,19 +19,19 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; @@ -48,6 +48,9 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float4 color = input.Color; float2 coords = input.TextureCoordinates; + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + // Read the fade map as a streak. float4 fadeMapColor = tex2D(uImage1, float2(frac(coords.x - uTime * 2.5), coords.y)); float opacity = fadeMapColor.r; diff --git a/Effects/FadedUVMapStreak.xnb b/Effects/FadedUVMapStreak.xnb index 8c734f97eec1676ae065c9e7e0e4c948d7bd67e6..b02dc3b856e6ee43eed7a54234fa19e7846203c6 100644 GIT binary patch delta 426 zcmYk1u}cFn6vn@o-1Y8UZcscob#QRf(xoo;aFGrQ4gsM!IypKxIGEj~l37R*m)PN? ztI)3g2SNoq++U!JgK)lF!5Z=)`F(lc`%xGVz$^#y`~(OEQv2{#?R!2=U-N0&op>&p zw_2?Z*H|gV?{&xXfH^Q>kHzvlG|f1phUv!JH&L+;2-f=)r@zp~49k7rIVbjP}5y|P>EL$#07;UP*MQvNdn4|bOL;Rc5h z9EJzgX7g~~7zNj0KBx|-%}TPH$-hJ%LQA-TL}hx(k>qcgr=%%4(dZ+&rln{mQ1+_| F_yumJT4DeI delta 384 zcmYk2F-XHe6o&tIm)Nu-83ZdhD2RhDDp@Ro32qLG4hMo$!P&*Z!NH6bm&y%J!WD6e z9U?(p1iQL93U%lZaM!gE-$lg2J$U@@|G)P*Q_rU=`#YN_E*)N0uIc&y)*%T%cjXLP(6#L^4=y3s7cUY&1w}$Fq`|oyu>_8Sjxc8|01x- u9%Z2_)w|V|y5LJjs4@RxM?&eV>NZmo{aIa=5=k~wJEfW&2;}Xe0Db^2MOBUf diff --git a/Effects/FadingSolidTrail.fx b/Effects/FadingSolidTrail.fx index 4aaf9c8139..c1a278309d 100644 --- a/Effects/FadingSolidTrail.fx +++ b/Effects/FadingSolidTrail.fx @@ -20,22 +20,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -48,6 +47,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + if (shouldFlip == 1) coords.y = 1 - coords.y; diff --git a/Effects/FadingSolidTrail.xnb b/Effects/FadingSolidTrail.xnb index c57e61edc435804796a5fad38e8b1ca2018b0dab..da31239f2cd56650fc355a6c9bc705f8ad8fbab0 100644 GIT binary patch delta 200 zcmYL=F%E)26b0um$`TtIwXpF77It9)-D_C1tiZ_5jYl4Lq!~(PSUd4ivJK(Y* zG5IfPz8+8=&r#gt3xwr77HEVyR&U}C^BzCX_8>B4cG?5F)1PJelzSKLY~*D7+sy diff --git a/Effects/Flame.fx b/Effects/Flame.fx index 98f17cfbf3..a987f6e0c5 100644 --- a/Effects/Flame.fx +++ b/Effects/Flame.fx @@ -19,14 +19,14 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) @@ -34,7 +34,6 @@ VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -48,6 +47,9 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float4 color = input.Color; float2 coords = input.TextureCoordinates; + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + // Read the fade map as a streak. float4 fadeMapColor = tex2D(uImage1, float2(frac(coords.y), frac(coords.x - uTime * 1.4 * uSaturation))); fadeMapColor.r *= pow(coords.x, 0.04); diff --git a/Effects/Flame.xnb b/Effects/Flame.xnb index 6c73b5e2b024b9c58bed76a4584592c3f9496ae9..e8bbede739530eb0130e4b5006f5c3fde8958012 100644 GIT binary patch delta 495 zcmYjMu}T9$5Ph?k&+}&xmvot%?l^3+%z3!3H4f+v) zUKdA%{+)OyI_sZi_K0r#pV_vk19;@Bd#}s2-uXkl1!M(^=ISfnwD`CbQB1B*M1 z1Ev9}`txYS{6OEx>LTyK^0|aZ!ZB~P6WrBra-O9AmaF9Ia^7bL7@=$V(n)9pVzUBd z2tx6JaxpQIs{%LxDMFwe*gZSjoggB<&+))#Jcm(+n<-~!dt*|}@_|bH7@OlIVoi(L z9&3qUsQwFx#4HUZQo}Tq9_Gs%oWVFORpB^<3`+-p7CcMt5pi9nR)V9%s>!=TS3SQF zn(XuqplW*e4-Zw~HqaV#(V06n%9`mHxKI7hm#f9A>+@t{cDK=((Ogf|-#flzr6oWx(CjrMB+<7w61{r`{@=sJb<2Uu P_KMr&S#JWJrc%HUN|bps diff --git a/Effects/HeavenlyGaleLightningShader.fx b/Effects/HeavenlyGaleLightningShader.fx index 449fe01b37..5cc778204b 100644 --- a/Effects/HeavenlyGaleLightningShader.fx +++ b/Effects/HeavenlyGaleLightningShader.fx @@ -19,14 +19,14 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) @@ -34,7 +34,6 @@ VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -45,6 +44,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float distortion = lerp(-1, 1, tex2D(uImage1, coords + float2(0, uTime * sign(coords.y > 0.5 ? -1 : 1) * 1.81)).r); float opacity = pow(sin((coords.y + distortion * 0.15) * 3.141), distortion * 3.95 + 7); return color * pow(opacity, 0.25) + opacity; diff --git a/Effects/HeavenlyGaleLightningShader.xnb b/Effects/HeavenlyGaleLightningShader.xnb index 6d5783ec441eb182035f6379890401f5bbf99448..c58caf86c17e7218d5e3000024614a2232545cef 100644 GIT binary patch delta 503 zcmY*VJxT*X6#m|9HoI83g%M(qDHFCbAWjOKL3AMp$SH)B zDHbg3yukXsnI+(|1MmBp_q{i}!TdCv+>akqnJ=>!*)QK#Vylr%MK)gep?WvdM1ajO z*%@<@RKMxhd^+i~hqu3eK~#~gAq_#mVqIGVs< z4HHC6vm?jLFcJnpJ*Hn!kZY{uP4H7zk2PU1-*Gx{Nv;h&;u5hhYd7oB97#38a($PO zJ2`9)`(O9eTX%IB5H>}_mug(m-Qi1+)0d3l+Baei)_&d{NAKn{f0d(bZ_q5-7We}- C+h4B$ delta 447 zcmY+Ay-LJD6ot>7F+bR(aD}z9(aOR%aF=Za3&CO_udq*Gxl>xnE~#7)W(yI5NF)#7 zQ;1ty1T1XC7s#H;L{>vCGxu=rmveKozaAv{<>We&e39HswRl(xim^-ubt!z};z>>Q z?P**O^;)TKRs2M6MD zUNn$ez`O|Ha$pA#_N^5dCn$SO^;)^2z6x{R2bQr>$NBBy2;u8zKu+uEsmNEDb#PRZ zZXlzfv643ZKmZWVVCEl0F^Go*aPaX?&tIRh+{S5Yd)<;gfU(;!#-3|}G!q>&p>zp- j`o_hqtRLcr)cl_bAKGphHd1Ko_w-SA^@l<;Z(CpkP>5JE diff --git a/Effects/HeavenlyGaleTrailShader.fx b/Effects/HeavenlyGaleTrailShader.fx index bece1e91a6..1d260d1c50 100644 --- a/Effects/HeavenlyGaleTrailShader.fx +++ b/Effects/HeavenlyGaleTrailShader.fx @@ -23,14 +23,14 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) @@ -38,7 +38,6 @@ VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -54,6 +53,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float bloomOpacity = pow(sin(coords.y * 3.141), 5.6); float noise = tex2D(uImage1, coords * 3 - float2(uTime * 2.44, 0)); float brightnessStreak = tex2D(uImage2, coords * float2(2, 1) - float2(uTime * 1.61, 0)) + noise * bloomOpacity; diff --git a/Effects/HeavenlyGaleTrailShader.xnb b/Effects/HeavenlyGaleTrailShader.xnb index fcf28f8d71bb0bfa15a652e3c83180ef175de21c..376ffea6ed54e032192f35b43dc375c12658d160 100644 GIT binary patch delta 721 zcmYjOu}Z{15PiFwWTS`ytq*Pd0I?M>UT1S?5wNqiR#33G?X@^LTVX{|xay8;Y(y=E z^9!!ANNeQ>#5bFZ3fW}d%$s>{Hdn2(We>ZZvsjha_Ev8%j~|Yd1_oAN%I8L(C=60_ zY*Z(ioSJi^+~g~{F#7;rc-r^h)y~$|BtHP+7@41C@A)j-dj;~Gbtn0RdB*w2bovae zzX5(%@;2mMoB8(OX|db0qcwoK=&LmIO{^KmfB}?aZIrNIk*A3Hy{lvGVpN{ZxT@lx2WKKaNL*l~sR)gCxoJsJh;~4NU2^-9bAOM%5^b0)MyvJ}5 zdECCPN4$;YP!lX7GB2V51k6R`_IQg{OnDZ2Q4ORJwxH-yGmY#KD4HXPnF7%(Tu?cb4H1I#y1YjjJB=g_V+zLe}v!zG1Xg|3?zp8*A DmZFK~ delta 632 zcmY+AJ4*vW6ot>7$vzCkMXZBq1Ur%RW=&@!S_INrSy(G5SY&!rL}Dw92nwk-q_GjS z6yh&PW3jE3KVUsGn~(@Q?7iPT_nFuG^{9K)z6zv&7d@!FHhw-8b+$K*)UDbLhxh72 z!eOk>HGs*bzSgoc`3Z0I@zZayPu7|xpXn?)d_Mt#0EuljCn>oB()4ROeRDh{CrgQ2 zK;r|j2aZSN)Q|zg*XmJEXIp@xH;_273tQ0^&&BZnSlY@2=-3LtPa7c5Lgbczr%?hS zE46~9R_59OBi77Ko5?`p@{Q`nxphDYTu|tj4HN~Pj5hs_-SoqFW>(^~M~oMCn?or! zWsZqC)EZwh&rxK7Z(8wj+IHQ?Dy9dF<^}zx6pZ-bH&Td2$kgjVsc1aBa1y>Lz;)JUS6tl5UaPchQ#x4$Qczwt#l)lUF RI5uh4UZkqOIq#q-fIlXCe3SqH diff --git a/Effects/ImpFlameTrail.fx b/Effects/ImpFlameTrail.fx index ea13593261..62f56b6ccf 100644 --- a/Effects/ImpFlameTrail.fx +++ b/Effects/ImpFlameTrail.fx @@ -19,22 +19,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -48,6 +47,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + // Fade out at the edges of the trail to give a blur effect. // This is very important. float flameStreakBrightness = tex2D(uImage1, float2(frac(coords.x - uTime * 2.9), coords.y)).r; diff --git a/Effects/ImpFlameTrail.xnb b/Effects/ImpFlameTrail.xnb index 9eb4fe0468bcff013da52aa3afe1680bbd4f6259..e687b0d305b211a3511f3595ddc04b86d8ced6d6 100644 GIT binary patch delta 442 zcmYjMy-LJD7@Ti&YjQRLPtH;s!OkKG+IS(@Tq9Tntn95VtmM`=$g!26up&0mB9aHt z!p3K~L$1gRh+v_``t8Q!gbeKbWSGzNU;E+lVRkO*U>x4i_0#>B1fX}t89_gaZ93Ic zu_qofy%xL^)nCCk(X{@MKePqlnK8KgwEIbt42}RP5SvN-mQLc~3ouK8G}Wuo$tbMW z0j@?tQEd1T0FeUniU70ZJz`!~9e_W_uD)n{_~q+ rr@hz(P%&=X_5Na&`EnO-6h-rq?CHyHPZF!Bueuks9L@xq!dl=LIOk!1 delta 420 zcmY+9u}TCn5QhJm+udyz1uI{|LL0d}!W~-+5wSTeBHP#q z7B)V^iCnQSAcBP!agrz~B#@c^oBy9Y^=z+ud^kGGs6Xvq()r!ZlvufXmrrS_zU2X- ze&Ic)LA{|~3C)N4B)V_jvM<`ce)szThI9Q~&h^3L5s)#o1r{YxmPJtvMMu4!pNy5; z1X!vG<=S=tIk^EUM}Q?%b}i~8J#Ug8-Y|rj=-zJ041r^>gVttp|8P#sEsIYdP%Pf! z8QIm4HAXZOXeN+1nLtRr2&FoiLqh-S)laP>3$zmnQ=0T*dD{3FlntzsjZ;`K7p8ewzMvJgU`g>F_y)l?Q;z@u diff --git a/Effects/PhaseslayerRipShader.fx b/Effects/PhaseslayerRipShader.fx index 1df56dcc69..aae9057d79 100644 --- a/Effects/PhaseslayerRipShader.fx +++ b/Effects/PhaseslayerRipShader.fx @@ -19,22 +19,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -47,6 +46,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float slashMapColor = tex2D(uImage1, coords); float opacity = 1 - slashMapColor.r; return color * pow(opacity, 3); diff --git a/Effects/PhaseslayerRipShader.xnb b/Effects/PhaseslayerRipShader.xnb index 44fa03af038724c7a7333cd9843e517684d33e53..17147153cd9655bff0e6a8356d801315e2fa8c6d 100644 GIT binary patch delta 221 zcmYLBI|{-;5Ph@x?2^Ke%F@PrC^>*#z`{TO8??&$A{cGWwm zPj~=W00kc~16W4^#QKk={bEfjHf-jI6;s-!q2Ikm2tvE_PI4M094kk8Nv#GA$0S2J=kKVV{bGU5M!1_l6p`XW96 diff --git a/Effects/PrimTextureOverlayShader.fx b/Effects/PrimTextureOverlayShader.fx index d4b7a4abed..2155a9b554 100644 --- a/Effects/PrimTextureOverlayShader.fx +++ b/Effects/PrimTextureOverlayShader.fx @@ -21,22 +21,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -46,9 +45,15 @@ VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = input.Color; - float2 coords = input.TextureCoordinates * uPrimitiveSize / uImageSize1; + float2 baseCoords = input.TextureCoordinates.xy; + + // Account for texture distortion artifacts. + baseCoords.y = (baseCoords.y - 0.5) / input.TextureCoordinates.z + 0.5; + + float2 coords = baseCoords * uPrimitiveSize / uImageSize1; + coords.x = 1 - frac(coords.x); - coords.y = saturate(input.TextureCoordinates.y); + coords.y = saturate(baseCoords.y); if (flipVertically) coords.y = 1 - coords.y; diff --git a/Effects/PrimTextureOverlayShader.xnb b/Effects/PrimTextureOverlayShader.xnb index 7f4004da661b3c945b46cf3213e5ffa0762af376..68fbd495f09cefba3d735a47c61e1b2a6b057fec 100644 GIT binary patch delta 282 zcmYLCF$%&!5S+bBV$>pvC>DYr@Bwy;HdZzg$P@Ghc6#;}k#u5l7J{TPkO%k)TgAfC z2iV2U5eV$S3^P0PZHFB&lnD79W=*e{B48#_9Hb#JA0DXYppa3r{c_k@$NUo(FOlQ?2)hcg+Pnc!E EANX7~!vFvP delta 246 zcmYj}Jqp4=5QX3DCbFhU;SYAXfCsQs#M(~C6$E=bU3-g!bipDPf}}B!tJo?QmN`Hw z*U1vlff?T8d-I}UHBjMlzICbcVs)ZLd`St(jMjW}ItrnZiFgVi8OewI7?afUMpRy% zJBeD9yUtkb^%Q>-0Gx*g{OG4;(dvklpSgep6lYNIww~A<&CglSb~GN1=d9HS78zOA hXSOOV3v5wtVF)Ab-^c76t|&Vgj=N12M>)&;>w;0JVVR88$e9_42a5gLasgE_ eLTzK6Y|7#*#(#m4;mHJuF7^jZK=%Lt3=9CDn<(f2 delta 142 zcmaFEIfIiu!q2Ikm2t*I_PIC)Y4)G6Ol2S1?XtdcrW- zj%m{592PD$<_+=;3`{_Y1_lQH2~hR~1`hrOP7Dk{4g5gyCmS}0Fl#XKvI12xLRE21 c?qu;5V}8KM@MHqe5}*nE7np$T|Nj{n0P#H^h5!Hn diff --git a/Effects/PrismCrystalStreak.fx b/Effects/PrismCrystalStreak.fx index ce7a206a52..f6a31ef4c4 100644 --- a/Effects/PrismCrystalStreak.fx +++ b/Effects/PrismCrystalStreak.fx @@ -19,22 +19,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -49,6 +48,9 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float4 color = input.Color; float2 coords = input.TextureCoordinates; + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float areaFadeGlow = lerp(1.2, 17, coords.x); if (coords.x < 0.25) areaFadeGlow = lerp(areaFadeGlow, 1.2, 1 - coords.x / 0.25); diff --git a/Effects/PrismCrystalStreak.xnb b/Effects/PrismCrystalStreak.xnb index 10e8411c269b3bc46671dcfbdb60d8b84159c564..42b0a656bc897a07dfbcdb79082a761a235ac190 100644 GIT binary patch delta 508 zcmYLFJxjw-6utK)Y5IW{>`;pcf`}i#Kq=T-CqWd4fNR13;3D|kDppY*4y}kO;u0My zMcu66B(&gON*y|M716~Zo|hIIa(VZhch0>hxl8tv_Vz|@*W%upeaYGT8L{E_3nJGf!pjo&svxH#$Qy7X;24<6cgLV(3TsXRt4=tz3co?5 zbxsvOzzqRF2JBV!T<+g#43G0a7rlhhHONu1$i$|H&Ua_v5Ccbux~`3y!UiT&A{nL- zPK|>URp3ej8yV@5Nalhxamnf+lCZHK`y6!WtycBmqvAfisLPNo(YK?H|D7YD)rAcD{bt`#c5p#||3aVZ@l z-L2pxw6jAgIAm}Y(Z%6;@=`w_H@tK1J?Ea6yq3D9e08sK>~i-af5pz-t;0-FhtKie z5Mz0^o{MJW80b@8GWF`t5%YHM&Hdto;ox+u)ocbt>b}*S4fcs#LB0kqqk@}vvq?mj zm*7YKQ+ed?JPZfB{o$Z)c?bOC$7+D;hhYdEQR?GHhhB+u(TTTKlkozPK%>E)uW^t> zo&t`UI@%$^!xp3078Fi6F_|IF;HELhnNFpcC{)#7t-)*v-l)tk)rPTvzo?PXMH|49 z{|6M3XbH1rYo7I8N^}mjh@b)su?%LUvfx=z;CAL|F=o;WW=kvff<82fVlUCfzeE&E tB$8yJ=c)M>q{Y`T6XR4&v4b$KHTVhJiRKDR_;W$wnhWwpP|`4l=o>vBanAq% diff --git a/Effects/ScarletDevilStreak.fx b/Effects/ScarletDevilStreak.fx index a037bd7333..fcddc3fb79 100644 --- a/Effects/ScarletDevilStreak.fx +++ b/Effects/ScarletDevilStreak.fx @@ -19,22 +19,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -49,6 +48,9 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float4 color = input.Color; float2 coords = input.TextureCoordinates; + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float areaFadeGlow = lerp(1.2, 17, coords.x); if (coords.x < 0.25) areaFadeGlow = lerp(areaFadeGlow, 1.2, 1 - coords.x / 0.25); diff --git a/Effects/ScarletDevilStreak.xnb b/Effects/ScarletDevilStreak.xnb index e360f61523c6ff7dc4de3e6279be6b4b0efa0c48..325f0c696c10f9e1e034a20095a4b655ee0b148f 100644 GIT binary patch delta 501 zcmYLEze~el5WV}7G--Osiy~Nb8kC;V(_4B-f*sbUuD_M@gZ}} ztBV8X=CpRqeAF!I`;5_-@ylmK)IvF(_UU@HQgL>P3_-R}BwtWDlvAx_B3=W3_Z_aO z{jU9<>)M;IYF`K6X>YYU?UM8Mv!tq}cmuray6_l3ijRTkiI2xZ@@ewnN9D~%47wRuM^>A33)@1TN4zFI1zCS%oO@l*kiI3CxN}5mDzw^BT{>AgW(ke zz#4GSP`*5zDGZJK?~7hS=xgM9$@t7pfG+eGpb#TPjQYNbn!^PqT_PD=2w#Px6b;~7 z3Ktpakx1sFG`3{#Jf1RfANO4EIzGE7;Ew-@)Wf`le4%fQ^GozzFFwyfQ%l@(!u%A} IzY0U5KX0RT8UO$Q delta 500 zcmYjOJxjw-6g~I7q>Wty7Azv7Afo;WQ;Ulrf7{^#k68ch0@%-1CyR%CJ(bAJr~x8Fq>{Vs-9&f>Bk@MGy{E zgJ4Nth%`nm>r7;S^lpF2$#inP*XwpYAb99?m%U@aR&XQYD$Be3NOu7kUX!1>&()cG z@Hm|uj;E8B;Vtq{pW7a5?E5}-K;~nIr%pu*;gz$~)bSdi*l3I6M!aai35a9CAhG}+ zF_^u+fB2BYR zW1jbIBvFC2&Y+45xr}BA^5A(;;(qRFFlVv{=1Xhlfi5*kAWjmM{}LhAOr(*9FAJ+% lOv|s4&W$rMVvAvHWAGDp5U!Lq_yfJtt(5euLefrC;2RB@Zyf*t diff --git a/Effects/SideStreakTrail.fx b/Effects/SideStreakTrail.fx index a4fcdc08e3..34203b1809 100644 --- a/Effects/SideStreakTrail.fx +++ b/Effects/SideStreakTrail.fx @@ -19,22 +19,21 @@ struct VertexShaderInput { float4 Position : POSITION0; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : SV_POSITION; float4 Color : COLOR0; - float2 TextureCoordinates : TEXCOORD0; + float3 TextureCoordinates : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput) 0; float4 pos = mul(input.Position, uWorldViewProjection); output.Position = pos; - output.Color = input.Color; output.TextureCoordinates = input.TextureCoordinates; @@ -46,6 +45,10 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 float innerBrightnessIntensity = 2.7; float4 color = input.Color; float2 coords = input.TextureCoordinates; + + // Account for texture distortion artifacts. + coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5; + float bloomOpacity = pow(cos(coords.y * 4.8 - 0.8), 55 + pow(coords.x, 4) * 700); // Create some noisy opaque blotches in the inner part of the trail. @@ -66,7 +69,7 @@ technique Technique1 { pass TrailPass { - VertexShader = compile vs_2_0 VertexShaderFunction(); - PixelShader = compile ps_2_0 PixelShaderFunction(); + VertexShader = compile vs_3_0 VertexShaderFunction(); + PixelShader = compile ps_3_0 PixelShaderFunction(); } } diff --git a/Effects/SideStreakTrail.xnb b/Effects/SideStreakTrail.xnb index 4720c1c32bc3659d8f8f40a1f637766e1d95aa53..c7637c97af39ef724070b87b2a134151849397df 100644 GIT binary patch delta 1115 zcmYjQzl#$=6n<}Ke|Z<&!UMe^+$q>;6)er=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;%vEAzv>(dzp Str3ckfbFoOB WF#v6|kOWQx3J2f<0OXMW{{R3ae-c*! delta 64 zcmaFC|AK!57ZX!n$z&d;`HT#c*Dz%=GcYi0mS9d}6k=fD2C_p^lQZ%%3rkZCf#MTb S{Fu3zA22aInehKV0|Njgdl8=i diff --git a/Graphics/Primitives/PrimitiveRenderer.cs b/Graphics/Primitives/PrimitiveRenderer.cs index 1ed294efa0..a8f360899f 100644 --- a/Graphics/Primitives/PrimitiveRenderer.cs +++ b/Graphics/Primitives/PrimitiveRenderer.cs @@ -236,14 +236,13 @@ namespace CalamityMod.Graphics.Primitives VerticesIndex = 0; for (int i = 0; i < PositionsIndex; i++) { - float completionRatio = i / (float)(PositionsIndex - 1); + float completionRatio = (i - 1f) / (float)(PositionsIndex - 1); float widthAtVertex = MainSettings.WidthFunction(completionRatio); Color vertexColor = MainSettings.ColorFunction(completionRatio); Vector2 currentPosition = MainPositions[i]; Vector2 directionToAhead = i == PositionsIndex - 1 ? (MainPositions[i] - MainPositions[i - 1]).SafeNormalize(Vector2.Zero) : (MainPositions[i + 1] - MainPositions[i]).SafeNormalize(Vector2.Zero); - - Vector2 leftCurrentTextureCoord = new(completionRatio, 0f); - Vector2 rightCurrentTextureCoord = new(completionRatio, 1f); + Vector2 leftCurrentTextureCoord = new(completionRatio, 0.5f - widthAtVertex * 0.5f); + Vector2 rightCurrentTextureCoord = new(completionRatio, 0.5f + widthAtVertex * 0.5f); // Point 90 degrees away from the direction towards the next point, and use it to mark the edges of the rectangle. // This doesn't use RotatedBy for the sake of performance (there can potentially be a lot of trail points). @@ -262,9 +261,9 @@ namespace CalamityMod.Graphics.Primitives // What this is doing, at its core, is defining a rectangle based on two triangles. // These triangles are defined based on the width of the strip at that point. // The resulting rectangles combined are what make the trail itself. - MainVertices[VerticesIndex] = new VertexPosition2DColorTexture(left, vertexColor, leftCurrentTextureCoord); + MainVertices[VerticesIndex] = new VertexPosition2DColorTexture(left, vertexColor, leftCurrentTextureCoord, widthAtVertex); VerticesIndex++; - MainVertices[VerticesIndex] = new VertexPosition2DColorTexture(right, vertexColor, rightCurrentTextureCoord); + MainVertices[VerticesIndex] = new VertexPosition2DColorTexture(right, vertexColor, rightCurrentTextureCoord, widthAtVertex); VerticesIndex++; } } diff --git a/Graphics/Primitives/VertexPosition2DColorTexture.cs b/Graphics/Primitives/VertexPosition2DColorTexture.cs index 0ac7154e44..715c4351f5 100644 --- a/Graphics/Primitives/VertexPosition2DColorTexture.cs +++ b/Graphics/Primitives/VertexPosition2DColorTexture.cs @@ -22,7 +22,10 @@ namespace CalamityMod.Graphics.Primitives /// /// The texture-coordinate of the vertex. /// - public readonly Vector2 TextureCoordinates; + /// + /// The Z component isn't actually related to 3D, it holds the width of the vertex at the given point, since arbitrary data cannot be saved on a per-vertex basis and needs to be contained within some pre-defined format. + /// + public readonly Vector3 TextureCoordinates; /// /// The vertex declaration. This declares the layout and size of the data in the vertex shader. @@ -33,14 +36,14 @@ namespace CalamityMod.Graphics.Primitives { new(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), new(8, VertexElementFormat.Color, VertexElementUsage.Color, 0), - new(12, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0), + new(12, VertexElementFormat.Vector3, VertexElementUsage.TextureCoordinate, 0) }); - public VertexPosition2DColorTexture(Vector2 position, Color color, Vector2 textureCoordinates) + public VertexPosition2DColorTexture(Vector2 position, Color color, Vector2 textureCoordinates, float widthCorrectionFactor) { Position = position; Color = color; - TextureCoordinates = textureCoordinates; + TextureCoordinates = new(textureCoordinates, widthCorrectionFactor); } } } From 248cda1855e50f31f3ba34e148bbee670bc83638 Mon Sep 17 00:00:00 2001 From: Dominic Karma <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:46:22 -0600 Subject: [PATCH 031/197] Fix Aerialite Multiplayer Problems (#26) Change aerialite generation --- NPCs/HiveMind/HiveMind.cs | 2 +- NPCs/Perforator/PerforatorHive.cs | 2 +- Systems/WorldgenManagementSystem.cs | 2 +- World/AerialiteOreGen.cs | 126 ++++++++++++++++------------ 4 files changed, 76 insertions(+), 56 deletions(-) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 0d711521f0..a92016ec05 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -1138,7 +1138,7 @@ namespace CalamityMod.NPCs.HiveMind { string key = "Mods.CalamityMod.Status.Progression.SkyOreText"; Color messageColor = Color.Cyan; - AerialiteOreGen.Generate(true); + AerialiteOreGen.Enchant(); CalamityUtils.DisplayLocalizedText(key, messageColor); } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 7eddc1ae75..3a397a365e 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -524,7 +524,7 @@ namespace CalamityMod.NPCs.Perforator { string key = "Mods.CalamityMod.Status.Progression.SkyOreText"; Color messageColor = Color.Cyan; - AerialiteOreGen.Generate(true); + AerialiteOreGen.Enchant(); CalamityUtils.DisplayLocalizedText(key, messageColor); } diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index e2eb6a6fb3..c2b973c148 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -216,7 +216,7 @@ namespace CalamityMod.Systems tasks.Insert(++currentFinalIndex, new PassLegacy("Aerialite", (progress, config) => { progress.Message = Language.GetOrRegister("Mods.CalamityMod.UI.Aerialite").Value; - AerialiteOreGen.Generate(false); + AerialiteOreGen.Generate(); })); // Draedon Labs diff --git a/World/AerialiteOreGen.cs b/World/AerialiteOreGen.cs index 467c7d153f..fa45cc4210 100644 --- a/World/AerialiteOreGen.cs +++ b/World/AerialiteOreGen.cs @@ -1,75 +1,95 @@ -using Terraria; +using CalamityMod.Tiles.Ores; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Terraria.DataStructures; -using Terraria.GameContent.Generation; using Terraria.WorldBuilding; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Linq; -using System.Collections.Generic; -using CalamityMod.DataStructures; namespace CalamityMod.World { public class AerialiteOreGen { - public static void Generate(bool Convert) + /// + /// The chance for a cloud tile the be randomly changed into a blotch of disenchanted aerialite ore during world generation. + /// + public const int CloudOreConversionChance = 365; + + public static void Generate() { - if (Main.netMode != NetmodeID.MultiplayerClient) + // Don't attempt to generate anything client-side. Only the server is allowed to do that. + if (Main.netMode == NetmodeID.MultiplayerClient) + return; + + // Loop through every tile above the world's surface, searching for potential candidates for aerialite generation. + for (int x = 5; x < Main.maxTilesX - 5; x++) { - for (int x = 5; x < Main.maxTilesX - 5; x++) + for (int y = 5; y < Main.worldSurface; y++) { - for (int y = 5; y < Main.worldSurface; y++) + Tile tile = Main.tile[x, y]; + + // The following conditions must happen in order for aerialite to generate: + // 1. The original tile ID must be that of a cloud. + // 2. The original tile must not be empty air. + // 3. A random dice-roll must land correctly, to ensure that patches of ore are occasional. + // If any of these conditions are not met, this loop iteration is skipped. + if (tile.TileType != TileID.Cloud || !tile.HasTile || !WorldGen.genRand.NextBool(CloudOreConversionChance)) + continue; + + int radius = (int)(WorldGen.genRand.Next(3, 5) * WorldGen.genRand.NextFloat(0.74f, 0.82f)); + ShapeData circle = new ShapeData(); + ShapeData biggerCircle = new ShapeData(); + GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + + // Big cloud circle. + WorldUtils.Gen(new Point(x, y), new Shapes.Circle(radius + 1), Actions.Chain(new GenAction[] { - if (!Convert) - { - Tile tile = Main.tile[x, y]; + blotchMod.Output(biggerCircle) + })); - if (WorldGen.genRand.Next(365) == 0 && tile.TileType == TileID.Cloud && tile.HasTile) - { - ShapeData circle = new ShapeData(); - ShapeData biggerCircle = new ShapeData(); - GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + WorldUtils.Gen(new Point(x, y), new ModShapes.All(biggerCircle), Actions.Chain(new GenAction[] + { + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)TileID.Cloud) + })); - int radius = (int)(WorldGen.genRand.Next(3, 5) * WorldGen.genRand.NextFloat(0.74f, 0.82f)); + // Circle of ore. + WorldUtils.Gen(new Point(x, y), new Shapes.Circle(radius), Actions.Chain(new GenAction[] + { + blotchMod.Output(circle) + })); - //big cloud circle - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(radius + 1), Actions.Chain(new GenAction[] - { - blotchMod.Output(biggerCircle) - })); + WorldUtils.Gen(new Point(x, y), new ModShapes.All(circle), Actions.Chain(new GenAction[] + { + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)ModContent.TileType()) + })); + } + } + } - WorldUtils.Gen(new Point(x, y), new ModShapes.All(biggerCircle), Actions.Chain(new GenAction[] - { - new Actions.ClearTile(), - new Actions.PlaceTile((ushort)TileID.Cloud) - })); + public static void Enchant() + { + // Don't attempt to change tile states client-side. + if (Main.netMode == NetmodeID.MultiplayerClient) + return; - //circle of ore - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(radius), Actions.Chain(new GenAction[] - { - blotchMod.Output(circle) - })); + // Loop through every tile above the world's surface, searching for aerialite to generate. + ushort disenchantedOreID = (ushort)ModContent.TileType(); + ushort enchantedOreID = (ushort)ModContent.TileType(); + for (int x = 5; x < Main.maxTilesX - 5; x++) + { + for (int y = 5; y < Main.worldSurface; y++) + { + if (Main.tile[x, y].TileType != disenchantedOreID) + continue; - WorldUtils.Gen(new Point(x, y), new ModShapes.All(circle), Actions.Chain(new GenAction[] - { - new Actions.ClearTile(), - new Actions.PlaceTile((ushort)ModContent.TileType()) - })); - } - } + // Enchant the ore and re-evaluate nearby framing. + Main.tile[x, y].TileType = enchantedOreID; + WorldGen.SquareTileFrame(x, y); - if (Convert) - { - if (Main.tile[x, y].TileType == ModContent.TileType()) - { - WorldGen.SquareTileFrame(x, y, true); - Main.tile[x, y].TileType = (ushort)ModContent.TileType(); - } - } - } + // Inform all clients of the tile change. + if (Main.netMode == NetmodeID.Server) + NetMessage.SendTileSquare(-1, x, y); } } } From 36139412a5c0a988712d3af4936dc711db9cd551 Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Thu, 21 Mar 2024 03:00:55 +0900 Subject: [PATCH 032/197] Fix truffle worm bug (#27) * Fix truffle worm bug * Removed hardcoded indices --- ILEditing/ILChangesLoading.cs | 3 ++ ILEditing/VanillaBugfixingILChanges.cs | 48 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index abd6038bb1..1e48d9ae87 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -151,6 +151,9 @@ namespace CalamityMod.ILEditing // Fix vanilla not accounting for spritebatch modification in held projectile drawing On_PlayerDrawLayers.DrawHeldProj += FixHeldProjectileBlendState; + // Fix vanilla not accounting for multiple bobbers when fishing with truffle worm + IL_Player.ItemCheck_CheckFishingBobbers += FixTruffleWormFishing; + //Additional detours that are in their own item files given they are only relevant to these specific items: //Rover drive detours on Player.DrawInfernoRings to draw its shield //Wulfrum armor hooks on Player.KeyDoubleTap and DrawPendingMouseText to activate its set bonus and spoof the mouse text to display the stats of the activated weapon if shift is held diff --git a/ILEditing/VanillaBugfixingILChanges.cs b/ILEditing/VanillaBugfixingILChanges.cs index 81b8656eca..389d9634bc 100644 --- a/ILEditing/VanillaBugfixingILChanges.cs +++ b/ILEditing/VanillaBugfixingILChanges.cs @@ -6,6 +6,7 @@ using System; using Terraria; using Terraria.DataStructures; using Terraria.Graphics.Renderers; +using Terraria.ID; namespace CalamityMod.ILEditing { @@ -69,5 +70,52 @@ namespace CalamityMod.ILEditing } } #endregion + + #region Fix Vanilla Not Accounting For Multiple Bobbers When Fishing With Truffle Worm + private void FixTruffleWormFishing(ILContext il) + { + var cursor = new ILCursor(il); + + // Initialize a flag variable whether truffle worm was used. + il.Method.Body.Variables.Add(new VariableDefinition(il.Module.TypeSystem.Boolean)); + byte truffleWormUsed = (byte) (il.Method.Body.Variables.Count - 1); + cursor.Emit(OpCodes.Ldc_I4_0); + cursor.Emit(OpCodes.Stloc_S, truffleWormUsed); + + // Move after beq.s, which is before Player.ItemCheck_CheckFishingBobber_PickAndConsumeBait gets called + if (!cursor.TryGotoNext(MoveType.After, i => i.Match(OpCodes.Beq_S))) + { + LogFailure("FixTruffleWormFishing", "Could not locate beq.s before Player.ItemCheck_CheckFishingBobber_PickAndConsumeBait."); + return; + } + + // Skip if truffle worm was already used. + var loopEnd = il.DefineLabel(); + cursor.Emit(OpCodes.Ldloc_S, truffleWormUsed); + cursor.Emit(OpCodes.Brtrue_S, loopEnd); + + // Find the call to Player.ItemCheck_CheckFishingBobber_PickAndConsumeBait. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchCall("ItemCheck_CheckFishingBobber_PickAndConsumeBait"))) + { + LogFailure("FixTruffleWormFishing", "Could not locate the call to Player.ItemCheck_CheckFishingBobber_PickAndConsumeBait."); + return; + } + + // Retrive baitTypeUsed, compare with truffle worm, and save it. + cursor.Emit(OpCodes.Ldloc_S, (byte)4); + cursor.Emit(OpCodes.Ldc_I4, ItemID.TruffleWorm); + cursor.Emit(OpCodes.Ceq); + cursor.Emit(OpCodes.Stloc_S, truffleWormUsed); + + // Move before next ldloc.0, which is the end of the loop + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdloc0())) + { + LogFailure("FixTruffleWormFishing", "Could not find the end of the loop."); + return; + } + + cursor.MarkLabel(loopEnd); + } + #endregion } } From 3c6c000ed4f1f63b742e0979c5ad219e3f6ea173 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 5 Apr 2024 16:26:35 -0400 Subject: [PATCH 033/197] Version bump to 2.0.3.011. Changes plushie message for active campaign. --- Localization/en-US/Mods.CalamityMod.Misc.hjson | 2 +- build.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index ea779ddde8..3983dd1d0d 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -25,7 +25,7 @@ MusicModReminder: "[i:MusicBoxMartians] [c/71DFF5:Remember to also install the C GimmeSwagPlushieCampaign: ''' - [i:GreenPresent] [c/3BE022:LIMITED TIME! Sign up for the Calamitas Plushie Campaign!] [c/3989FF:calamitymod.com/plush] [i:GreenPresent] + [i:GreenPresent] [c/3BE022:NOW AVAILABLE! Supreme Calamitas Plushie!] [c/3989FF:calamitymod.com/plush] [i:GreenPresent] ''' // Recipe Conditions Tier1ArsenalRecipeCondition: View an unencrypted schematic from the lab near the Sunken Sea diff --git a/build.txt b/build.txt index f696702666..dc2ea7ec07 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 2.0.3.009 +version = 2.0.3.011 displayName = Calamity Mod homepage = https://discord.gg/calamity buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, .github\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes, Effects\Compiler\* From e4c30dc3c06b2d1ced36d40d7451c792728448a7 Mon Sep 17 00:00:00 2001 From: AlienBlox <122119961+AlienBlox@users.noreply.github.com> Date: Sun, 14 Apr 2024 16:26:49 +0100 Subject: [PATCH 034/197] Updated Buff name (#29) Fixed the name of the Baby Boomer buff --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 33803350fd..8cf9d0da1d 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1517,6 +1517,6 @@ AbsorberAffliction: { } YoungDukeBuff: { - DisplayName: Young Duke Buff - Description: Mods.CalamityMod.Buffs.YoungDukeBuff.Description + DisplayName: Baby Boomer + Description: The mutated fishron will intoxicate your foes } From 08acae63b4d7cf6846e715ec848330b82705aedb Mon Sep 17 00:00:00 2001 From: JavyzTaken <36089970+JavyzTaken@users.noreply.github.com> Date: Wed, 17 Apr 2024 21:09:28 +0200 Subject: [PATCH 035/197] Made Bloody Worm Food and Teratoma only shimmerable after the respective boss is killed. (#30) --- Items/SummonItems/BloodyWormFood.cs | 2 ++ Items/SummonItems/Teratoma.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Items/SummonItems/BloodyWormFood.cs b/Items/SummonItems/BloodyWormFood.cs index 08df866136..a78f2d3142 100644 --- a/Items/SummonItems/BloodyWormFood.cs +++ b/Items/SummonItems/BloodyWormFood.cs @@ -50,11 +50,13 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { + Condition downedPerfs = new(CalamityUtils.GetText("Condition.DownedPerfs"), () => DownedBossSystem.downedPerforator); CreateRecipe(). AddIngredient(ItemID.CrimtaneBar, 3). AddIngredient(7). AddIngredient(ItemID.Vertebrae, 13). AddTile(TileID.DemonAltar). + AddDecraftCondition(downedPerfs). Register(); } } diff --git a/Items/SummonItems/Teratoma.cs b/Items/SummonItems/Teratoma.cs index 9b8193bb86..b1b9e15a89 100644 --- a/Items/SummonItems/Teratoma.cs +++ b/Items/SummonItems/Teratoma.cs @@ -50,11 +50,13 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { + Condition downedHM = new(CalamityUtils.GetText("Condition.DownedHM"), () => DownedBossSystem.downedHiveMind); CreateRecipe(). AddIngredient(ItemID.DemoniteBar, 3). AddIngredient(7). AddIngredient(ItemID.RottenChunk, 13). AddTile(TileID.DemonAltar). + AddDecraftCondition(downedHM). Register(); } } From d7ec6bf71a95721825a1ebaa995ae6ed20876e83 Mon Sep 17 00:00:00 2001 From: JavyzTaken <36089970+JavyzTaken@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:27:52 +0200 Subject: [PATCH 036/197] Prefix changes are now applied in a detour of GrantPrefixBenefits instead of in GlobalItem:UpdateAccessory (#31) --- ILEditing/BalancingILChanges.cs | 78 +++++++++++++++++++++++++++++++++ ILEditing/ILChangesLoading.cs | 3 ++ Items/CalamityGlobalItem.cs | 73 ------------------------------ 3 files changed, 81 insertions(+), 73 deletions(-) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index b2e14bc1a9..fbb1cbd80c 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -324,6 +324,84 @@ namespace CalamityMod.ILEditing } #endregion + #region Item Prefix Changes + private static void PrefixChanges(On_Player.orig_GrantPrefixBenefits orig, Player self, Item item) + { + orig(self, item); + // Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR + if (item.prefix == PrefixID.Hard) + { + /* Prehardmode = 1 + * Hardmode = 2 + * Post-Moon Lord = 3 + * Post-DoG = 4 + */ + + if (DownedBossSystem.downedDoG) + self.statDefense += 3; + else if (NPC.downedMoonlord) + self.statDefense += 2; + else if (Main.hardMode) + self.statDefense += 1; + + self.endurance += 0.0025f; + } + if (item.prefix == PrefixID.Guarding) + { + /* Prehardmode = 2 + * Hardmode = 3 + * Post-Moon Lord = 4 + * Post-DoG = 6 + */ + + if (DownedBossSystem.downedDoG) + self.statDefense += 4; + else if (NPC.downedMoonlord) + self.statDefense += 2; + else if (Main.hardMode) + self.statDefense += 1; + + self.endurance += 0.005f; + } + if (item.prefix == PrefixID.Armored) + { + /* Prehardmode = 3 + * Hardmode = 5 + * Post-Moon Lord = 6 + * Post-DoG = 8 + */ + + if (DownedBossSystem.downedDoG) + self.statDefense += 5; + else if (NPC.downedMoonlord) + self.statDefense += 3; + else if (Main.hardMode) + self.statDefense += 2; + + self.endurance += 0.0075f; + } + if (item.prefix == PrefixID.Warding) + { + /* Prehardmode = 4 + * Hardmode = 6 + * Post-Moon Lord = 8 + * Post-DoG = 10 + */ + + if (DownedBossSystem.downedDoG) + self.statDefense += 6; + else if (NPC.downedMoonlord) + self.statDefense += 4; + else if (Main.hardMode) + self.statDefense += 2; + self.endurance += 0.01f; + } + + if (item.prefix == PrefixID.Lucky) + self.luck += 0.05f; + } + #endregion + #region Damage Variance Dampening and Luck Removal private static int AdjustDamageVariance(Terraria.On_Main.orig_DamageVar_float_int_float orig, float dmg, int percent, float luck) { diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 1e48d9ae87..dc43409ef2 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -113,6 +113,9 @@ namespace CalamityMod.ILEditing IL_Player.Update += ManaRegenDelayAdjustment; IL_Player.UpdateManaRegen += ManaRegenAdjustment; + // Item prefix changes + On_Player.GrantPrefixBenefits += PrefixChanges; + // Debuff balancing IL_Projectile.StatusPlayer += RemoveFrozenInflictionFromDeerclopsIceSpikes; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 8699c788af..d1bf4f9242 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1490,79 +1490,6 @@ namespace CalamityMod.Items if (item.type == ItemID.EoCShield || item.type == ItemID.Tabi || item.type == ItemID.MasterNinjaGear) modPlayer.DashID = string.Empty; - - // Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR - if (item.prefix == PrefixID.Hard) - { - /* Prehardmode = 1 - * Hardmode = 2 - * Post-Moon Lord = 3 - * Post-DoG = 4 - */ - - if (DownedBossSystem.downedDoG) - player.statDefense += 3; - else if (NPC.downedMoonlord) - player.statDefense += 2; - else if (Main.hardMode) - player.statDefense += 1; - - player.endurance += 0.0025f; - } - if (item.prefix == PrefixID.Guarding) - { - /* Prehardmode = 2 - * Hardmode = 3 - * Post-Moon Lord = 4 - * Post-DoG = 6 - */ - - if (DownedBossSystem.downedDoG) - player.statDefense += 4; - else if (NPC.downedMoonlord) - player.statDefense += 2; - else if (Main.hardMode) - player.statDefense += 1; - - player.endurance += 0.005f; - } - if (item.prefix == PrefixID.Armored) - { - /* Prehardmode = 3 - * Hardmode = 5 - * Post-Moon Lord = 6 - * Post-DoG = 8 - */ - - if (DownedBossSystem.downedDoG) - player.statDefense += 5; - else if (NPC.downedMoonlord) - player.statDefense += 3; - else if (Main.hardMode) - player.statDefense += 2; - - player.endurance += 0.0075f; - } - if (item.prefix == PrefixID.Warding) - { - /* Prehardmode = 4 - * Hardmode = 6 - * Post-Moon Lord = 8 - * Post-DoG = 10 - */ - - if (DownedBossSystem.downedDoG) - player.statDefense += 6; - else if (NPC.downedMoonlord) - player.statDefense += 4; - else if (Main.hardMode) - player.statDefense += 2; - - player.endurance += 0.01f; - } - - if (item.prefix == PrefixID.Lucky) - player.luck += 0.05f; } #endregion From 645484a1c4a3fdbd253c7222735afec34b63a002 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Sun, 28 Apr 2024 01:38:50 +0500 Subject: [PATCH 037/197] Moved Cobalt/Palladium ore gen to hardmode gen thread (#32) --- NPCs/CalamityGlobalNPCLoot.cs | 10 ---------- Systems/WorldgenManagementSystem.cs | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 50451023f8..2e5d6215b2 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1805,16 +1805,6 @@ namespace CalamityMod.NPCs string key2 = "Mods.CalamityMod.Status.Progression.UglyBossText"; Color messageColor2 = Color.Aquamarine; CalamityUtils.DisplayLocalizedText(key2, messageColor2); - - // TODO -- this should probably be moved to a thread like Aureus meteor - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework) - { - string key3 = "Mods.CalamityMod.Status.Progression.HardmodeOreTier1Text"; - Color messageColor3 = new Color(50, 255, 130); - CalamityUtils.SpawnOre(TileID.Cobalt, 12E-05, 0.45f, 0.7f, 3, 8); - CalamityUtils.SpawnOre(TileID.Palladium, 12E-05, 0.45f, 0.7f, 3, 8); - CalamityUtils.DisplayLocalizedText(key3, messageColor3); - } } break; diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index c2b973c148..1d7bde379f 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -291,10 +291,37 @@ namespace CalamityMod.Systems } // An Astral Meteor always falls at the beginning of Hardmode. + // T1 Hardmode Ores always generate after killing Wall of Flesh. public override void ModifyHardmodeTasks(List tasks) { int announceIndex = tasks.FindIndex(match => match.Name == "Hardmode Announcement"); + // + // EARLY HARDMODE REWORK + // + { + var hardmodeOreT1Pass = new PassLegacy("CalamityMod:EarlyHMRework_HardmodeOreTier1", (progress, config) => + { + string key = CalamityMod.Instance.GetLocalization("Status.Progression.HardmodeOreTier1Text").Value; + Color messageColor = new Color(50, 255, 130); + + CalamityUtils.SpawnOre(TileID.Cobalt, 12E-05, 0.45f, 0.7f, 3, 8); + CalamityUtils.SpawnOre(TileID.Palladium, 12E-05, 0.45f, 0.7f, 3, 8); + + CalamityUtils.DisplayLocalizedText(key, messageColor); + }); + + // Disable gen pass if Early Hardmode Rework is disabled. + // Could just not add/remove gen pass, but that could lead to mod conflicts + // in case whatever mod targets this specific gen pass. + if (!CalamityConfig.Instance.EarlyHardmodeProgressionRework) + { + hardmodeOreT1Pass.Disable(); + } + + tasks.Insert(announceIndex, hardmodeOreT1Pass); + } + // Insert the Astral biome generation right before the final hardmode announcement. tasks.Insert(announceIndex, new PassLegacy("AstralMeteor", (progress, config) => { From 33942ebdd9a6643eebfdcb435d7ba961c0cb7461 Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Sun, 28 Apr 2024 05:40:45 +0900 Subject: [PATCH 038/197] Clowns now summon Chattering Teeth Bombs & Fixed Herpling AI bug (#33) --- NPCs/CalamityGlobalAI.cs | 152 ++++++++++++++++++++++++++++++-------- NPCs/CalamityGlobalNPC.cs | 1 + 2 files changed, 124 insertions(+), 29 deletions(-) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 6ca9db0a96..1bf8483ec5 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -3165,19 +3165,29 @@ namespace CalamityMod.NPCs npc.ai[2] = 0f; npc.ai[2] += 1f; - if (npc.ai[2] > (CalamityWorld.death ? 60f : 180f)) + float bombDelay = CalamityWorld.death ? 60f : 180f; + if (npc.ai[2] > bombDelay) { Vector2 spawnPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f - (float)(npc.direction * 24), npc.position.Y + 4f); - int velocityX = 3 * npc.direction; - int velocityY = -5; - int clownBomb = Projectile.NewProjectile(npc.GetSource_FromAI(), spawnPosition.X, spawnPosition.Y, velocityX, velocityY, ProjectileID.HappyBomb, 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[clownBomb].timeLeft = 300; - if (CalamityWorld.death) + if (!Main.rand.NextBool(5) || NPC.AnyNPCs(NPCID.ChatteringTeethBomb)) { - Main.projectile[clownBomb].extraUpdates += 1; - Main.projectile[clownBomb].timeLeft = 600; + int velocityX = 3 * npc.direction; + int velocityY = -5; + int clownBomb = Projectile.NewProjectile(npc.GetSource_FromAI(), spawnPosition.X, spawnPosition.Y, velocityX, velocityY, ProjectileID.HappyBomb, 0, 0f, Main.myPlayer, 0f, 0f); + Main.projectile[clownBomb].timeLeft = 300; + if (CalamityWorld.death) + { + Main.projectile[clownBomb].extraUpdates += 1; + Main.projectile[clownBomb].timeLeft = 600; + } + npc.ai[2] = 0f; + } + else + { + npc.ai[2] = -bombDelay * 2; + int chatteringTeethBomb = NPC.NewNPC(npc.GetSource_FromAI(), (int)spawnPosition.X, (int)spawnPosition.Y, NPCID.ChatteringTeethBomb); + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, chatteringTeethBomb, 0f, 0f, 0f, 0, 0, 0); } - npc.ai[2] = 0f; } } @@ -8851,11 +8861,88 @@ namespace CalamityMod.NPCs npc.spriteDirection = npc.direction; } - if (npc.wet && npc.type != NPCID.Derpling) + if (npc.type == NPCID.ChatteringTeethBomb) + { + Vector2 dustOffset = new Vector2(-6f, -10f); + dustOffset.X *= npc.spriteDirection; + if (npc.ai[1] != 5f && Main.rand.NextBool(3)) + { + npc.position += npc.netOffset; + int dustID = Dust.NewDust(npc.Center + dustOffset - Vector2.One * 5f, 4, 4, DustID.Torch); + Dust dust = Main.dust[dustID]; + dust.scale = 1.5f; + dust.noGravity = true; + dust.velocity = dust.velocity * 0.25f + Vector2.Normalize(dustOffset) * 1f; + dust.velocity = dust.velocity.RotatedBy(-(float)Math.PI / 2f * (float)npc.direction); + npc.position -= npc.netOffset; + } + if (npc.ai[1] == 5f) + { + npc.velocity = Vector2.Zero; + npc.position.X += npc.width / 2; + npc.position.Y += npc.height / 2; + npc.width = 160; + npc.height = 160; + npc.position.X -= npc.width / 2; + npc.position.Y -= npc.height / 2; + npc.dontTakeDamage = true; + npc.position += npc.netOffset; + if (npc.ai[2] > 7f) + { + for (int i = 0; i < 8; i++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f); + } + for (int i = 0; i < 32; i++) + { + int dustID = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Torch, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[dustID]; + dust.velocity *= 3f; + dust.noGravity = true; + dustID = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); + dust = Main.dust[dustID]; + dust.velocity *= 2f; + dust.noGravity = true; + } + for (int i = 0; i < 2; i++) + { + int goreID = Gore.NewGore(npc.GetSource_FromThis(), npc.position + new Vector2((float)(npc.width * Main.rand.Next(100)) / 100f, (float)(npc.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(GoreID.Smoke1, GoreID.Smoke3 + 1)); + Gore gore = Main.gore[goreID]; + gore.velocity *= 0.3f; + gore.velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f; + gore.velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f; + } + if (npc.ai[2] == 9f) + { + SoundEngine.PlaySound(SoundID.Item14, npc.position); + } + } + if (npc.ai[2] == 1f) + { + npc.life = -1; + npc.HitEffect(); + npc.active = false; + } + npc.position -= npc.netOffset; + return false; + } + } + + if (npc.type == NPCID.ChatteringTeethBomb && npc.ai[1] != 5f) + { + if (npc.wet || Vector2.Distance(npc.Center, Main.player[npc.target].Center) < 64f) + { + npc.ai[1] = 5f; + npc.ai[2] = 10f; + npc.netUpdate = true; + return false; + } + } + else if (npc.wet && npc.type != NPCID.Derpling) { if (npc.collideX) { - npc.direction *= -npc.direction; + npc.direction *= -1; // Fixed bug where herplings didn't change direction from left to right npc.spriteDirection = npc.direction; } @@ -8970,28 +9057,35 @@ namespace CalamityMod.NPCs npc.ai[1] += 1f; } } - else if (npc.ai[1] == 3f) - { - npc.velocity.Y = -9f; - npc.velocity.X = npc.velocity.X + (float)(2 * npc.direction); - if (herplingTargetDist < 350f && herplingTargetDist > 200f) - { - npc.velocity.X = npc.velocity.X + (float)npc.direction; - } - npc.ai[0] = CalamityWorld.death ? -100f : -200f; - npc.ai[1] = 0f; - npc.ai[3] = npc.position.X; - } else { - npc.velocity.Y = -5f; - npc.velocity.X = npc.velocity.X + (float)(4 * npc.direction); - if (herplingTargetDist < 350f && herplingTargetDist > 200f) + if (npc.type == NPCID.ChatteringTeethBomb) { - npc.velocity.X = npc.velocity.X + (float)npc.direction; + SoundEngine.PlaySound(SoundID.Zombie124, npc.position); + } + if (npc.ai[1] == 3f) + { + npc.velocity.Y = -9f; + npc.velocity.X = npc.velocity.X + (float)(2 * npc.direction); + if (herplingTargetDist < 350f && herplingTargetDist > 200f) + { + npc.velocity.X = npc.velocity.X + (float)npc.direction; + } + npc.ai[0] = CalamityWorld.death ? -100f : -200f; + npc.ai[1] = 0f; + npc.ai[3] = npc.position.X; + } + else + { + npc.velocity.Y = -5f; + npc.velocity.X = npc.velocity.X + (float)(4 * npc.direction); + if (herplingTargetDist < 350f && herplingTargetDist > 200f) + { + npc.velocity.X = npc.velocity.X + (float)npc.direction; + } + npc.ai[0] = CalamityWorld.death ? -60f : -120f; + npc.ai[1] += 1f; } - npc.ai[0] = CalamityWorld.death ? -60f : -120f; - npc.ai[1] += 1f; } } else if (npc.ai[0] >= -30f) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3181e0645c..32d244820c 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3621,6 +3621,7 @@ namespace CalamityMod.NPCs { case NPCID.Herpling: case NPCID.Derpling: + case NPCID.ChatteringTeethBomb: return CalamityGlobalAI.BuffedHerplingAI(npc, Mod); } } From adcc1c197676ba57913fbe9d2de06bc7c6ae351f Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Sun, 28 Apr 2024 05:48:16 +0900 Subject: [PATCH 039/197] Fix splitting worm bestiary bug (#34) --- ILEditing/ILChangesLoading.cs | 1 + ILEditing/VanillaBugfixingILChanges.cs | 12 +++++ NPCs/CalamityGlobalNPCLoot.cs | 68 ++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index dc43409ef2..4493392853 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -150,6 +150,7 @@ namespace CalamityMod.ILEditing // Fix vanilla bugs exposed by Calamity mechanics IL_NPC.NPCLoot += FixSplittingWormBannerDrops; + On_NPC.PlayerInteraction += FixSplittingWormInteraction; // Fix vanilla not accounting for spritebatch modification in held projectile drawing On_PlayerDrawLayers.DrawHeldProj += FixHeldProjectileBlendState; diff --git a/ILEditing/VanillaBugfixingILChanges.cs b/ILEditing/VanillaBugfixingILChanges.cs index 389d9634bc..3675d4c63b 100644 --- a/ILEditing/VanillaBugfixingILChanges.cs +++ b/ILEditing/VanillaBugfixingILChanges.cs @@ -46,6 +46,18 @@ namespace CalamityMod.ILEditing } #endregion Fixing Splitting Worm Banner Spam in Deathmode + #region Fixing Splitting Worm Interaction in Deathmode + // CONTEXT FOR FIX: In Death Mode, normal worms are capable of splitting similarly to the Eater of Worlds. This comes with problems with bestiary entries. The entries are incremented only when + // the killed npc is the head segment and it has been interacted at least once. These two conditions may be violated because NPC.NPCLoot only triggers once because of the above fix. + // The fix for former condition is in CalamityGlobalNPCLoot.OnKill. For the latter condition, NPC.PlayerInteraction should broadcast interaction to every other worm segments. + // This is already done for vanilla worm enemies like EOW. + private static void FixSplittingWormInteraction(On_NPC.orig_PlayerInteraction orig, NPC npc, int player) + { + orig(npc, player); + CalamityGlobalNPC.SplittingWormBroadcastInteractionWrapper(npc, player); + } + #endregion + #region Fixing Vanilla Not Accounting For Spritebatch Modification in Held Projectiles private static bool HasLoggedHeldProjectileBlendStateCatch = false; private void FixHeldProjectileBlendState(On_PlayerDrawLayers.orig_DrawHeldProj orig, PlayerDrawSet drawinfo, Projectile proj) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 2e5d6215b2..670ba70021 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1737,6 +1737,10 @@ namespace CalamityMod.NPCs if (CalamityWorld.death && !SplittingWormLootBlockWrapper(npc, Mod)) DropHelper.BlockEverything(); + // Correctly increment bestiary entries for splitting worms + if (npc.AnyInteractions()) + SplittingWormBestiaryUpdate(npc); + // Check whether bosses should be spawned naturally as a result of this NPC's death. CheckBossSpawn(npc); @@ -1993,6 +1997,70 @@ namespace CalamityMod.NPCs #endregion #region Splitting Worm Loot + internal static void SplittingWormBroadcastInteractionWrapper(NPC npc, int player) + { + if (!CalamityWorld.death) + return; + + switch (npc.type) + { + case NPCID.DiggerHead: + case NPCID.DiggerBody: + case NPCID.DiggerTail: + SplittingWormBroadcastInteraction(npc, player, NPCID.DiggerHead, NPCID.DiggerBody, NPCID.DiggerTail); + return; + case NPCID.SeekerHead: + case NPCID.SeekerBody: + case NPCID.SeekerTail: + SplittingWormBroadcastInteraction(npc, player, NPCID.SeekerHead, NPCID.SeekerBody, NPCID.SeekerTail); + return; + case NPCID.DuneSplicerHead: + case NPCID.DuneSplicerBody: + case NPCID.DuneSplicerTail: + SplittingWormBroadcastInteraction(npc, player, NPCID.DuneSplicerHead, NPCID.DuneSplicerBody, NPCID.DuneSplicerTail); + return; + } + } + + internal static void SplittingWormBroadcastInteraction(NPC npc, int player, int head, int body, int tail) + { + for (int i = 0; i < Main.maxNPCs; i++) + { + if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == head || Main.npc[i].type == body || Main.npc[i].type == tail)) + { + Main.npc[i].ApplyInteraction(player); + } + } + } + + internal static void SplittingWormBestiaryUpdate(NPC npc) + { + if (!CalamityWorld.death) + return; + + switch (npc.type) + { + case NPCID.DiggerBody: + case NPCID.DiggerTail: + NPC diggerHead = new(); + diggerHead.SetDefaults(NPCID.DiggerHead); + Main.BestiaryTracker.Kills.RegisterKill(diggerHead); + return; + case NPCID.SeekerBody: + case NPCID.SeekerTail: + NPC seekerHead = new(); + seekerHead.SetDefaults(NPCID.SeekerHead); + Main.BestiaryTracker.Kills.RegisterKill(seekerHead); + return; + case NPCID.DuneSplicerBody: + case NPCID.DuneSplicerTail: + NPC duneSplicerHead = new(); + duneSplicerHead.SetDefaults(NPCID.DuneSplicerHead); + Main.BestiaryTracker.Kills.RegisterKill(duneSplicerHead); + return; + } + } + internal static bool SplittingWormLootBlockWrapper(NPC npc, Mod mod) { if (!CalamityWorld.death) From 6b60acd841b48f9f4aa426738aad00eaa2d25a1a Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Sun, 28 Apr 2024 05:52:38 +0900 Subject: [PATCH 040/197] Fix Arid Artifact bug (#35) --- Utilities/MiscUtils.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index dd81e33cd4..3914365dd7 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -254,7 +254,11 @@ namespace CalamityMod // 0.6f is the minimum for vanilla but Calamity changes it to 0.2f // Windy days occur when wind speed is at least 0.5f (0.4f in vanilla) so this should never cause a windy day float windSpeed = 0f; - if (Main.windSpeedCurrent < 0.2f && Main.windSpeedCurrent > 0f) + if (Main.windSpeedCurrent == 0f) + { + windSpeed = Main.rand.NextFloat(0.2f, 0.4f) * (Main.rand.Next(0, 2) * 2 - 1); + } + else if (Main.windSpeedCurrent < 0.2f && Main.windSpeedCurrent > 0f) { windSpeed = Main.rand.NextFloat(0.2f, 0.4f); } From 1da1a257adf9965309ab115969f901c0f7ad6d1b Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Sun, 28 Apr 2024 06:04:56 +0900 Subject: [PATCH 041/197] Fix Baby Cannonball Jellyfish bestiary bug (#36) --- NPCs/Abyss/BabyCannonballJellyfish.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NPCs/Abyss/BabyCannonballJellyfish.cs b/NPCs/Abyss/BabyCannonballJellyfish.cs index 005e45e222..1799c81f6d 100644 --- a/NPCs/Abyss/BabyCannonballJellyfish.cs +++ b/NPCs/Abyss/BabyCannonballJellyfish.cs @@ -19,11 +19,12 @@ namespace CalamityMod.NPCs.Abyss public class BabyCannonballJellyfish : ModNPC { public bool hasBeenHit = false; + public int explosionDamage; public override void SetStaticDefaults() { Main.npcFrameCount[NPC.type] = 7; - //Main.npcCatchable[NPC.type] = true; + Main.npcCatchable[NPC.type] = true; NPCID.Sets.CountsAsCritter[NPC.type] = true; } @@ -34,7 +35,8 @@ namespace CalamityMod.NPCs.Abyss NPC.chaseable = false; NPC.aiStyle = -1; AIType = -1; - NPC.damage = 30; + NPC.damage = 0; + explosionDamage = 30; NPC.width = 28; NPC.height = 36; NPC.defense = 0; @@ -157,7 +159,7 @@ namespace CalamityMod.NPCs.Abyss NPC.position -= NPC.Size * 0.5f; //hitbox expansion + adjustments SoundEngine.PlaySound(SoundID.Item14, NPC.Center); //bomb sound foreach (Player player in Main.player.Where(player => player.active && !player.dead && NPC.Hitbox.Intersects(player.Hitbox))) - player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage, NPC.direction); + player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), explosionDamage, NPC.direction); for (int k = 0; k < 8; k++) { int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.MoonBoulder, 0f, -1f, 0, default, 1f); @@ -169,8 +171,6 @@ namespace CalamityMod.NPCs.Abyss NPC.netUpdate = true; } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) => NPC.life <= 0; - public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 2; k++) From ae69405e71ef60436ff7988bfe7f2ac55a2ce017 Mon Sep 17 00:00:00 2001 From: JavidPack Date: Thu, 2 May 2024 10:13:24 -0600 Subject: [PATCH 042/197] Fix IndexOutOfRangeException in ILChanges.ColorBlightedGel (#37) --- ILEditing/VanillaStupidityFixingILChanges.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index a6d129466d..5ce54fa4cd 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -289,7 +289,7 @@ namespace CalamityMod.ILEditing // Sync the color changes. if (colorWasChanged) - NetMessage.SendData(MessageID.ItemTweaker, -1, -1, null, itemID, 1f); + NetMessage.SendData(MessageID.ItemTweaker, -1, -1, null, itemIndex, 1f); } #endregion Color Blighted Gel From 5757d54f566382547d904e7ab5226cf0bbe52331 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Thu, 2 May 2024 22:00:59 +0500 Subject: [PATCH 043/197] Base --- CalamityConditions.cs | 96 +++++++++++++++++++++++++++++ Items/SummonItems/BloodyWormFood.cs | 15 +++-- Items/SummonItems/Teratoma.cs | 3 +- NPCs/CalamityGlobalTownNPC.cs | 14 ++--- NPCs/TownNPCs/DILF.cs | 2 +- NPCs/TownNPCs/FAP.cs | 4 +- NPCs/TownNPCs/SEAHOE.cs | 2 +- NPCs/TownNPCs/THIEF.cs | 8 +-- Tiles/Pylons/AstralPylonTile.cs | 3 +- Tiles/Pylons/CragsPylonTile.cs | 3 +- Tiles/Pylons/SulphurPylonTile.cs | 3 +- Tiles/Pylons/SunkenPylonTile.cs | 3 +- Utilities/DropHelper.cs | 68 ++++++++++---------- 13 files changed, 157 insertions(+), 67 deletions(-) create mode 100644 CalamityConditions.cs diff --git a/CalamityConditions.cs b/CalamityConditions.cs new file mode 100644 index 0000000000..41fbf295d3 --- /dev/null +++ b/CalamityConditions.cs @@ -0,0 +1,96 @@ +using System; +using CalamityMod.World; +using Terraria; +using Terraria.Localization; + +namespace CalamityMod +{ + public static class CalamityConditions + { + private static Condition Create(string key, Func predicate) + { + return new Condition( + Language.GetText($"Mods.CalamityMod.Condition.{key}"), + predicate + ); + } + + // + // Config based conditions + // + + public static readonly Condition PotionSellingConfig = Create("Drops.PotionConfig", () => CalamityConfig.Instance.PotionSelling); + + // + // Player conditions + // + + public static readonly Condition PlayerHasRogueArmor = Create("HasRogueArmor", () => Main.LocalPlayer.Calamity().rogueStealthMax > 0f && Main.LocalPlayer.Calamity().wearingRogueArmor); + public static readonly Condition PlayerHasWings = Create("HasWings", () => Main.LocalPlayer.wingTimeMax > 0); + public static readonly Condition PlayerAlcoholPoisoned = Create("AlcoholPoison", () => Main.LocalPlayer.Calamity().alcoholPoisoning); + + // + // Calamity Event Flag conditions + // + + public static readonly Condition DownedAcidRainT1 = Create("Drops.DownedT1AR", () => DownedBossSystem.downedEoCAcidRain); + public static readonly Condition DownedAcidRainT2 = Create("Drops.DownedT2AR", () => DownedBossSystem.downedAquaticScourgeAcidRain); + + // + // Calamity Boss Flag conditions + // + + public static readonly Condition DownedDesertScourge = Create("Drops.DownedDS", () => DownedBossSystem.downedDesertScourge); + public static readonly Condition DownedCrabulon = Create("Drops.DownedCrabulon", () => DownedBossSystem.downedDesertScourge); + public static readonly Condition DownedHiveMind = Create("Drops.DownedHM", () => DownedBossSystem.downedHiveMind); + public static readonly Condition DownedPerforator = Create("Drops.DownedPerfs", () => DownedBossSystem.downedPerforator); + public static readonly Condition DownedSlimeGod = Create("Drops.DownedSG", () => DownedBossSystem.downedSlimeGod); + public static readonly Condition DownedCryogen = Create("Drops.DownedCryo", () => DownedBossSystem.downedCryogen); + public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge); + public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental); + public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone); + public static readonly Condition DownedLeviathan = Create("Drops.DownedLebi", () => DownedBossSystem.downedLeviathan); + public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus); + public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer); + public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager); + public static readonly Condition DownedAstrumDeus = Create("Drops.DownedAD", () => DownedBossSystem.downedAstrumDeus); + public static readonly Condition DownedGuardians = Create("Drops.DownedGuard", () => DownedBossSystem.downedGuardians); + public static readonly Condition DownedBumblebird = Create("Drops.DownedBirb", () => DownedBossSystem.downedDragonfolly); + public static readonly Condition DownedProvidence = Create("Drops.DownedProv", () => DownedBossSystem.downedProvidence); + public static readonly Condition DownedSignus = Create("Drops.DownedSig", () => DownedBossSystem.downedSignus); + public static readonly Condition DownedStormWeaver = Create("Drops.DownedSW", () => DownedBossSystem.downedStormWeaver); + public static readonly Condition DownedCeaselessVoid = Create("Drops.DownedCV", () => DownedBossSystem.downedCeaselessVoid); + public static readonly Condition DownedPolterghast = Create("Drops.DownedPolter", () => DownedBossSystem.downedPolterghast); + public static readonly Condition DownedOldDuke = Create("Drops.DownedOD", () => DownedBossSystem.downedBoomerDuke); + public static readonly Condition DownedDevourerOfGods = Create("Drops.DownedDoG", () => DownedBossSystem.downedDoG); + public static readonly Condition DownedYharon = Create("Drops.DownedYharon", () => DownedBossSystem.downedYharon); + public static readonly Condition DownedExoMechs = Create("Drops.DownedExos", () => DownedBossSystem.downedExoMechs); + public static readonly Condition DownedSupremeCalamitas = Create("Drops.DownedSCal", () => DownedBossSystem.downedCalamitas); + public static readonly Condition DownedPrimordialWyrm = Create("Drops.DownedAEW", () => DownedBossSystem.downedPrimordialWyrm); + public static readonly Condition DownedClam = Create("Drops.DownedClam", () => DownedBossSystem.downedCLAM); + public static readonly Condition DownedBuffedClam = Create("Drops.DownedClamHM", () => DownedBossSystem.downedCLAMHardMode); + public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS); + + // Mixed + public static readonly Condition DownedHiveMindOrPerforator = Create("Drops.TODO", () => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator); + public static readonly Condition DownedCalamitasCloneOrPlantera = Create("Drops.DownedCalPlant", () => DownedBossSystem.downedCalamitasClone || Condition.DownedPlantera.IsMet()); + + // Vanilla + public static readonly Condition DownedBetsy = Create("Drops.DownedBetsy", () => DownedBossSystem.downedBetsy); + + // + // Calamity Biome conditions + // + + public static readonly Condition InAstral = Create("InAstral", () => Main.LocalPlayer.Calamity().ZoneAstral); + public static readonly Condition InCrag = Create("InCrag", () => Main.LocalPlayer.Calamity().ZoneCalamity); + public static readonly Condition InSulph = Create("InSulph", () => Main.LocalPlayer.Calamity().ZoneSulphur); + public static readonly Condition InSunken = Create("InSunken", () => Main.LocalPlayer.Calamity().ZoneSunkenSea); + + // + // World based conditions + // + + public static readonly Condition InRevengeanceMode = Create("Condition.InRev", () => CalamityWorld.revenge); + } +} diff --git a/Items/SummonItems/BloodyWormFood.cs b/Items/SummonItems/BloodyWormFood.cs index a78f2d3142..afde718345 100644 --- a/Items/SummonItems/BloodyWormFood.cs +++ b/Items/SummonItems/BloodyWormFood.cs @@ -50,14 +50,13 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { - Condition downedPerfs = new(CalamityUtils.GetText("Condition.DownedPerfs"), () => DownedBossSystem.downedPerforator); - CreateRecipe(). - AddIngredient(ItemID.CrimtaneBar, 3). - AddIngredient(7). - AddIngredient(ItemID.Vertebrae, 13). - AddTile(TileID.DemonAltar). - AddDecraftCondition(downedPerfs). - Register(); + CreateRecipe() + .AddIngredient(ItemID.CrimtaneBar, 3) + .AddIngredient(7) + .AddIngredient(ItemID.Vertebrae, 13) + .AddTile(TileID.DemonAltar) + .AddDecraftCondition(CalamityConditions.DownedPerforator) + .Register(); } } } diff --git a/Items/SummonItems/Teratoma.cs b/Items/SummonItems/Teratoma.cs index b1b9e15a89..6f5f8f3247 100644 --- a/Items/SummonItems/Teratoma.cs +++ b/Items/SummonItems/Teratoma.cs @@ -50,13 +50,12 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { - Condition downedHM = new(CalamityUtils.GetText("Condition.DownedHM"), () => DownedBossSystem.downedHiveMind); CreateRecipe(). AddIngredient(ItemID.DemoniteBar, 3). AddIngredient(7). AddIngredient(ItemID.RottenChunk, 13). AddTile(TileID.DemonAltar). - AddDecraftCondition(downedHM). + AddDecraftCondition(Condition.Hardmode). Register(); } } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index a192ded31d..9260b663af 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1067,14 +1067,14 @@ namespace CalamityMod.NPCs bool happy = Main.LocalPlayer.currentShoppingSettings.PriceAdjustment <= 0.9; - Condition potionSells = new(CalamityUtils.GetText("Condition.PotionConfig"), () => CalamityConfig.Instance.PotionSelling); + Condition potionSells = CalamityConditions.PotionSellingConfig; Condition hasFlareGunUpgrade = new(CalamityUtils.GetText("Condition.HasFlareGun"), () => (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); - Condition roguePlayer = new(CalamityUtils.GetText("Condition.HasRogueArmor"), () => Main.LocalPlayer.Calamity().rogueStealthMax > 0f && Main.LocalPlayer.Calamity().wearingRogueArmor); - Condition wingedPlayer = new(CalamityUtils.GetText("Condition.HasWings"), () => Main.LocalPlayer.wingTimeMax > 0); - Condition revengeance = new(CalamityUtils.GetText("Condition.InRev"), () => CalamityWorld.revenge); - Condition drunk = new(CalamityUtils.GetText("Condition.AlcoholPoison"), () => Main.LocalPlayer.Calamity().alcoholPoisoning); - Condition downedPolterghast = new(CalamityUtils.GetText("Condition.PostPolter"), () => DownedBossSystem.downedPolterghast); - Condition downedDoG = new(CalamityUtils.GetText("Condition.PostDoG"), () => DownedBossSystem.downedDoG); + Condition roguePlayer = CalamityConditions.PlayerHasRogueArmor; + Condition wingedPlayer = CalamityConditions.PlayerHasWings; + Condition revengeance = CalamityConditions.InRevengeanceMode; + Condition drunk = CalamityConditions.PlayerAlcoholPoisoned; + Condition downedPolterghast = CalamityConditions.DownedPolterghast; + Condition downedDoG = CalamityConditions.DownedDevourerOfGods; if (type == NPCID.Merchant) { diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index d692fdbc60..6b0f00db73 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.TownNPCs public override void AddShops() { - Condition potionSells = new(CalamityUtils.GetText("Condition.PotionConfig"), () => CalamityConfig.Instance.PotionSelling); + Condition potionSells = CalamityConditions.PotionSellingConfig; NPCShop shop = new(Type); shop.Add(ModContent.ItemType()) .Add(ModContent.ItemType()) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 2aa452a208..c8b3de85df 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -300,8 +300,8 @@ namespace CalamityMod.NPCs.TownNPCs public override void AddShops() { - Condition potionSells = new(CalamityUtils.GetText("Condition.PotionConfig"), () => CalamityConfig.Instance.PotionSelling); - Condition downedAureus = new(CalamityUtils.GetText("Condition.PostAureus"), () => DownedBossSystem.downedAstrumAureus); + Condition potionSells = CalamityConditions.PotionSellingConfig; + Condition downedAureus = CalamityConditions.DownedAstrumAureus; NPCShop shop = new(Type); shop.AddWithCustomValue(ItemID.LovePotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index 8f4b9f19ec..4678f5ae7d 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -197,7 +197,7 @@ namespace CalamityMod.NPCs.TownNPCs } public override void AddShops() { - Condition downedOldDuke = new(CalamityUtils.GetText("Condition.PostOD"), () => DownedBossSystem.downedBoomerDuke); + Condition downedOldDuke = CalamityConditions.DownedOldDuke; NPCShop shop = new(Type); shop.Add(ModContent.ItemType()) diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index ade7a0d833..29602dd9a0 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -259,10 +259,10 @@ namespace CalamityMod.NPCs.TownNPCs } public override void AddShops() { - Condition potionSells = new(CalamityUtils.GetText("Condition.PotionConfig"), () => CalamityConfig.Instance.PotionSelling); - Condition downedCalclone = new(CalamityUtils.GetText("Condition.PostCal"), () => DownedBossSystem.downedCalamitasClone); - Condition downedDoG = new(CalamityUtils.GetText("Condition.PostDoG"), () => DownedBossSystem.downedDoG); - Condition downedYharon = new(CalamityUtils.GetText("Condition.PostYharon"), () => DownedBossSystem.downedYharon); + Condition potionSells = CalamityConditions.PotionSellingConfig; + Condition downedCalclone = CalamityConditions.DownedCalamitasClone; + Condition downedDoG = CalamityConditions.DownedDevourerOfGods; + Condition downedYharon = CalamityConditions.DownedYharon; NPCShop shop = new(Type); shop.AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 9)) diff --git a/Tiles/Pylons/AstralPylonTile.cs b/Tiles/Pylons/AstralPylonTile.cs index 9a95f6053f..1aeac063ef 100644 --- a/Tiles/Pylons/AstralPylonTile.cs +++ b/Tiles/Pylons/AstralPylonTile.cs @@ -18,8 +18,7 @@ namespace CalamityMod.Tiles.Pylons public override NPCShop.Entry GetNPCShopEntry() { - Condition biomeCondition = new Condition(CalamityUtils.GetText("Condition.InAstral"), () => Main.LocalPlayer.Calamity().ZoneAstral); - return new NPCShop.Entry(AssociatedItem, Condition.AnotherTownNPCNearby, biomeCondition); + return new NPCShop.Entry(AssociatedItem, Condition.AnotherTownNPCNearby, CalamityConditions.InAstral); } diff --git a/Tiles/Pylons/CragsPylonTile.cs b/Tiles/Pylons/CragsPylonTile.cs index fa711e50a6..a4987d44d6 100644 --- a/Tiles/Pylons/CragsPylonTile.cs +++ b/Tiles/Pylons/CragsPylonTile.cs @@ -19,8 +19,7 @@ namespace CalamityMod.Tiles.Pylons public override NPCShop.Entry GetNPCShopEntry() { - Condition biomeCondition = new Condition(CalamityUtils.GetText("Condition.InCrag"), () => Main.LocalPlayer.Calamity().ZoneCalamity); - return new NPCShop.Entry(AssociatedItem, biomeCondition); + return new NPCShop.Entry(AssociatedItem, CalamityConditions.InCrag); } //Doesnt require npcs to function diff --git a/Tiles/Pylons/SulphurPylonTile.cs b/Tiles/Pylons/SulphurPylonTile.cs index 825e594738..39f2718703 100644 --- a/Tiles/Pylons/SulphurPylonTile.cs +++ b/Tiles/Pylons/SulphurPylonTile.cs @@ -18,8 +18,7 @@ namespace CalamityMod.Tiles.Pylons public override NPCShop.Entry GetNPCShopEntry() { - Condition biomeCondition = new Condition(CalamityUtils.GetText("Condition.InSulph"), () => Main.LocalPlayer.Calamity().ZoneSulphur); - return new NPCShop.Entry(AssociatedItem, Condition.AnotherTownNPCNearby, biomeCondition); + return new NPCShop.Entry(AssociatedItem, Condition.AnotherTownNPCNearby, CalamityConditions.InSulph); } public override bool ValidTeleportCheck_BiomeRequirements(TeleportPylonInfo pylonInfo, SceneMetrics sceneData) => BiomeTileCounterSystem.SulphurTiles >= 100; diff --git a/Tiles/Pylons/SunkenPylonTile.cs b/Tiles/Pylons/SunkenPylonTile.cs index 74dc1115c1..8f48db51bf 100644 --- a/Tiles/Pylons/SunkenPylonTile.cs +++ b/Tiles/Pylons/SunkenPylonTile.cs @@ -18,8 +18,7 @@ namespace CalamityMod.Tiles.Pylons public override NPCShop.Entry GetNPCShopEntry() { - Condition biomeCondition = new Condition(CalamityUtils.GetText("Condition.InSunken"), () => Main.LocalPlayer.Calamity().ZoneSunkenSea); - return new NPCShop.Entry(AssociatedItem, Condition.AnotherTownNPCNearby, biomeCondition); + return new NPCShop.Entry(AssociatedItem, Condition.AnotherTownNPCNearby, CalamityConditions.InSunken); } public override bool ValidTeleportCheck_BiomeRequirements(TeleportPylonInfo pylonInfo, SceneMetrics sceneData) => BiomeTileCounterSystem.SunkenSeaTiles >= 100; diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 5ce9c2e0bf..3e9d3800fc 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -561,13 +561,13 @@ namespace CalamityMod }); #region Boss Defeat Conditionals - public static IItemDropRuleCondition PostKS(bool ui = true) => If(() => NPC.downedSlimeKing, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedKS")); - public static IItemDropRuleCondition PostDS(bool ui = true) => If(() => DownedBossSystem.downedDesertScourge, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedDS")); + public static IItemDropRuleCondition PostKS(bool ui = true) => If(Condition.DownedKingSlime.Predicate, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedKS")); + public static IItemDropRuleCondition PostDS(bool ui = true) => CalamityConditions.DownedDesertScourge.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostEoC(bool ui = true) => If(() => NPC.downedBoss1, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedEoC")); - public static IItemDropRuleCondition PostCrab(bool ui = true) => If(() => DownedBossSystem.downedCrabulon, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedCrab")); + public static IItemDropRuleCondition PostCrab(bool ui = true) => CalamityConditions.DownedCrabulon.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostEvil1(bool ui = true) => If(() => NPC.downedBoss2, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed" + (WorldGen.crimson ? "BoC" : "EoW"))); - public static IItemDropRuleCondition PostHM(bool ui = true) => If(() => DownedBossSystem.downedHiveMind, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedHM")); - public static IItemDropRuleCondition PostPerfs(bool ui = true) => If(() => DownedBossSystem.downedPerforator, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedPerfs")); + public static IItemDropRuleCondition PostHM(bool ui = true) => CalamityConditions.DownedHiveMind.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostPerfs(bool ui = true) => CalamityConditions.DownedPerforator.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostEvil2(bool ui = true) => If(() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed" + (WorldGen.crimson ? "Perfs" : "HM"))); public static IItemDropRuleCondition PostQB(bool ui = true) => If(() => NPC.downedQueenBee, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedQB")); public static IItemDropRuleCondition PostDeer(bool ui = true) => If(() => NPC.downedDeerclops, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedDeer")); @@ -575,46 +575,46 @@ namespace CalamityMod public static IItemDropRuleCondition PostSG(bool ui = true) => If(() => DownedBossSystem.downedSlimeGod, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSG")); public static IItemDropRuleCondition Hardmode(bool ui = true) => If(() => Main.hardMode, ui, CalamityUtils.GetTextValue("Condition.Drops.Hardmode")); public static IItemDropRuleCondition PostQS(bool ui = true) => If(() => NPC.downedQueenSlime, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedQS")); - public static IItemDropRuleCondition PostCryo(bool ui = true) => If(() => DownedBossSystem.downedCryogen, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedCryo")); - public static IItemDropRuleCondition PostAS(bool ui = true) => If(() => DownedBossSystem.downedAquaticScourge, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedAS")); - public static IItemDropRuleCondition PostBrim(bool ui = true) => If(() => DownedBossSystem.downedBrimstoneElemental, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedBrim")); + public static IItemDropRuleCondition PostCryo(bool ui = true) => CalamityConditions.DownedCryogen.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostAS(bool ui = true) => CalamityConditions.DownedAquaticScourge.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostBrim(bool ui = true) => CalamityConditions.DownedBrimstoneElemental.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostDest(bool ui = true) => If(() => NPC.downedMechBoss1, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedDest")); public static IItemDropRuleCondition PostTwins(bool ui = true) => If(() => NPC.downedMechBoss2, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedTwins")); public static IItemDropRuleCondition PostSP(bool ui = true) => If(() => NPC.downedMechBoss3, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSP")); public static IItemDropRuleCondition Post1Mech(bool ui = true) => If(() => NPC.downedMechBossAny, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed1Mech")); public static IItemDropRuleCondition Post3Mechs(bool ui = true) => If(() => NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed3Mechs")); - public static IItemDropRuleCondition PostCal(bool ui = true) => If(() => DownedBossSystem.downedCalamitasClone, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedCal")); + public static IItemDropRuleCondition PostCal(bool ui = true) => CalamityConditions.DownedCalamitasClone.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostPlant(bool ui = true) => If(() => NPC.downedPlantBoss, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedPlant")); - public static IItemDropRuleCondition PostCalPlant(bool ui = true) => If(() => DownedBossSystem.downedCalamitasClone || NPC.downedPlantBoss, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedCalPlant")); - public static IItemDropRuleCondition PostLevi(bool ui = true) => If(() => DownedBossSystem.downedLeviathan, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedLebi")); - public static IItemDropRuleCondition PostAureus(bool ui = true) => If(() => DownedBossSystem.downedAstrumAureus, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedAureus")); + public static IItemDropRuleCondition PostCalPlant(bool ui = true) => CalamityConditions.DownedCalamitasCloneOrPlantera.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostLevi(bool ui = true) => CalamityConditions.DownedLeviathan.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostAureus(bool ui = true) => CalamityConditions.DownedAstrumAureus.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostGolem(bool ui = true) => If(() => NPC.downedGolemBoss, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedGolem")); - public static IItemDropRuleCondition PostPBG(bool ui = true) => If(() => DownedBossSystem.downedPlaguebringer, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedPBG")); + public static IItemDropRuleCondition PostPBG(bool ui = true) => CalamityConditions.DownedPlaguebringer.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostEoL(bool ui = true) => If(() => NPC.downedEmpressOfLight, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedEoL")); public static IItemDropRuleCondition PostFish(bool ui = true) => If(() => NPC.downedFishron, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedFish")); - public static IItemDropRuleCondition PostRav(bool ui = true) => If(() => DownedBossSystem.downedRavager, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedRav")); + public static IItemDropRuleCondition PostRav(bool ui = true) => CalamityConditions.DownedRavager.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostLC(bool ui = true) => If(() => NPC.downedAncientCultist, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedLC")); - public static IItemDropRuleCondition PostAD(bool ui = true) => If(() => DownedBossSystem.downedAstrumDeus, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedAD")); + public static IItemDropRuleCondition PostAD(bool ui = true) => CalamityConditions.DownedAstrumDeus.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostML(bool ui = true) => If(() => NPC.downedMoonlord, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedML")); - public static IItemDropRuleCondition PostGuard(bool ui = true) => If(() => DownedBossSystem.downedGuardians, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedGuard")); - public static IItemDropRuleCondition PostBirb(bool ui = true) => If(() => DownedBossSystem.downedDragonfolly, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedBirb")); - public static IItemDropRuleCondition PostProv(bool ui = true) => If(() => DownedBossSystem.downedProvidence, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedProv")); - public static IItemDropRuleCondition PostSig(bool ui = true) => If(() => DownedBossSystem.downedSignus, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSig")); - public static IItemDropRuleCondition PostSW(bool ui = true) => If(() => DownedBossSystem.downedStormWeaver, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSW")); - public static IItemDropRuleCondition PostCV(bool ui = true) => If(() => DownedBossSystem.downedCeaselessVoid, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedCV")); - public static IItemDropRuleCondition PostPolter(bool ui = true) => If(() => DownedBossSystem.downedPolterghast, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedPolter")); - public static IItemDropRuleCondition PostOD(bool ui = true) => If(() => DownedBossSystem.downedBoomerDuke, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedOD")); - public static IItemDropRuleCondition PostDoG(bool ui = true) => If(() => DownedBossSystem.downedDoG, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedDoG")); - public static IItemDropRuleCondition PostYharon(bool ui = true) => If(() => DownedBossSystem.downedYharon, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedYharon")); - public static IItemDropRuleCondition PostExos(bool ui = true) => If(() => DownedBossSystem.downedExoMechs, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedExos")); - public static IItemDropRuleCondition PostSCal(bool ui = true) => If(() => DownedBossSystem.downedCalamitas, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSCal")); - public static IItemDropRuleCondition PostAEW(bool ui = true) => If(() => DownedBossSystem.downedPrimordialWyrm, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedAEW")); - public static IItemDropRuleCondition PostClam(bool ui = true) => If(() => DownedBossSystem.downedCLAM, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedClam")); - public static IItemDropRuleCondition PostClamHM(bool ui = true) => If(() => DownedBossSystem.downedCLAMHardMode, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedClamHM")); - public static IItemDropRuleCondition PostGSS(bool ui = true) => If(() => DownedBossSystem.downedGSS, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedGSS")); - public static IItemDropRuleCondition PostBetsy(bool ui = true) => If(() => DownedBossSystem.downedBetsy, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedBetsy")); - public static IItemDropRuleCondition PostT1AR(bool ui = true) => If(() => DownedBossSystem.downedEoCAcidRain, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedT1AR")); - public static IItemDropRuleCondition PostT2AR(bool ui = true) => If(() => DownedBossSystem.downedAquaticScourgeAcidRain, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedT2AR")); + public static IItemDropRuleCondition PostGuard(bool ui = true) => CalamityConditions.DownedGuardians.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostBirb(bool ui = true) => CalamityConditions.DownedBumblebird.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostProv(bool ui = true) => CalamityConditions.DownedProvidence.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostSig(bool ui = true) => CalamityConditions.DownedSignus.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostSW(bool ui = true) => CalamityConditions.DownedStormWeaver.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostCV(bool ui = true) => CalamityConditions.DownedCeaselessVoid.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostPolter(bool ui = true) => CalamityConditions.DownedPolterghast.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostOD(bool ui = true) => CalamityConditions.DownedOldDuke.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostDoG(bool ui = true) => CalamityConditions.DownedDevourerOfGods.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostYharon(bool ui = true) => CalamityConditions.DownedYharon.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostExos(bool ui = true) => CalamityConditions.DownedExoMechs.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostSCal(bool ui = true) => CalamityConditions.DownedSupremeCalamitas.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostAEW(bool ui = true) => CalamityConditions.DownedPrimordialWyrm.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostClam(bool ui = true) => CalamityConditions.DownedClam.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostClamHM(bool ui = true) => CalamityConditions.DownedBuffedClam.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostGSS(bool ui = true) => CalamityConditions.DownedGreatSandShark.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostBetsy(bool ui = true) => CalamityConditions.DownedBetsy.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostT1AR(bool ui = true) => CalamityConditions.DownedAcidRainT1.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostT2AR(bool ui = true) => CalamityConditions.DownedAcidRainT2.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); #endregion #endregion From 161be4fe54d35cb749e2c590449d7b83b3d93518 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Thu, 2 May 2024 22:04:29 +0500 Subject: [PATCH 044/197] Fixed config condition having `Drops` prefix --- CalamityConditions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalamityConditions.cs b/CalamityConditions.cs index 41fbf295d3..fda507399c 100644 --- a/CalamityConditions.cs +++ b/CalamityConditions.cs @@ -19,7 +19,7 @@ namespace CalamityMod // Config based conditions // - public static readonly Condition PotionSellingConfig = Create("Drops.PotionConfig", () => CalamityConfig.Instance.PotionSelling); + public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityConfig.Instance.PotionSelling); // // Player conditions From bb5148e2cfca70fa15517a0ff6413978df59e53e Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Thu, 2 May 2024 23:04:09 +0500 Subject: [PATCH 045/197] Ported most/all player iterations --- CalPlayer/CalamityPlayerOnHit.cs | 7 +-- Events/AcidRainEvent.cs | 33 +++-------- Events/BossRushEvent.cs | 56 +++++++------------ Items/Accessories/ProfanedSoulArtifact.cs | 11 ++-- Items/Accessories/ProfanedSoulCrystal.cs | 5 +- Items/Accessories/RoverDrive.cs | 12 ++-- Items/Accessories/TheSponge.cs | 11 ++-- Items/Armor/LunicCorps/LunicCorpsHelmet.cs | 11 ++-- Items/Materials/WulfrumMetalScrap.cs | 4 +- Items/Mounts/AlicornMount.cs | 6 +- Items/Weapons/Rogue/Mycoroot.cs | 7 +-- NPCs/Abyss/BabyCannonballJellyfish.cs | 7 ++- NPCs/Abyss/CannonballJellyfish.cs | 10 +++- NPCs/AcidRain/BloodwormNormal.cs | 5 +- NPCs/Astral/Atlas.cs | 14 ++--- NPCs/Astral/Nova.cs | 8 +-- NPCs/CalamityAI.cs | 27 ++++----- NPCs/CalamityGlobalAI.cs | 10 ++-- NPCs/CalamityGlobalNPC.cs | 14 +---- NPCs/DesertScourge/DesertNuisanceHead.cs | 13 ++--- NPCs/DesertScourge/DesertScourgeHead.cs | 17 +++--- NPCs/DraedonLabThings/Androomba.cs | 9 +-- .../NanodroidDysfunctional.cs | 6 +- NPCs/DraedonLabThings/NanodroidPlagueGreen.cs | 6 +- NPCs/DraedonLabThings/NanodroidPlagueRed.cs | 6 +- NPCs/DraedonLabThings/RepairUnitCritter.cs | 6 +- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 16 +++--- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 14 ++--- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 16 +++--- NPCs/Leviathan/Anahita.cs | 8 +-- NPCs/NormalNPCs/ArmoredDiggerHead.cs | 13 ++--- NPCs/Perforator/PerforatorHeadLarge.cs | 13 ++--- NPCs/Perforator/PerforatorHeadSmall.cs | 13 ++--- NPCs/PlagueEnemies/PlaguebringerMiniboss.cs | 9 +-- .../PlagueHomingMissile.cs | 5 +- .../PlaguebringerGoliath.cs | 7 +-- NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 16 +++--- NPCs/Providence/Providence.cs | 6 +- NPCs/SlimeGod/CrimulanPaladin.cs | 6 +- NPCs/SlimeGod/EbonianPaladin.cs | 6 +- NPCs/SlimeGod/SplitCrimulanPaladin.cs | 6 +- NPCs/SlimeGod/SplitEbonianPaladin.cs | 6 +- NPCs/TownNPCs/AndroombaFriendly.cs | 6 +- NPCs/TownNPCs/FAP.cs | 5 +- NPCs/TownNPCs/THIEF.cs | 5 +- .../VanillaNPCOverrides/Bosses/DeerclopsAI.cs | 12 ++-- .../VanillaNPCOverrides/Bosses/DestroyerAI.cs | 13 ++--- .../Bosses/EaterOfWorldsAI.cs | 17 +++--- .../Bosses/EmpressofLightAI.cs | 11 ++-- NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs | 5 +- NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs | 4 +- Projectiles/Boss/OldDukeVortex.cs | 4 +- .../Boss/OverlyDramaticDukeSummoner.cs | 4 +- Projectiles/CalamityGlobalProjectile.cs | 5 +- Projectiles/Enemy/FlakAcid.cs | 4 +- Projectiles/Pets/LadShark.cs | 3 +- Projectiles/Rogue/IcebreakerHammer.cs | 3 +- Projectiles/Summon/WulfrumDroid.cs | 8 +-- .../Typeless/BossRushEndEffectThing.cs | 7 +-- Projectiles/Typeless/WulfrumLureSignal.cs | 6 +- Systems/WorldMiscUpdateSystem.cs | 6 +- TileEntities/TEChargingStation.cs | 5 +- TileEntities/TEHostileFireTurret.cs | 7 +-- TileEntities/TEHostileIceTurret.cs | 7 +-- TileEntities/TEHostileLabTurret.cs | 7 +-- TileEntities/TEHostileLaserTurret.cs | 7 +-- TileEntities/TEHostileOnyxTurret.cs | 7 +-- TileEntities/TEHostilePlagueTurret.cs | 7 +-- TileEntities/TEHostileWaterTurret.cs | 8 +-- TileEntities/TELabHologramProjector.cs | 13 ++--- TileEntities/TEPowerCellFactory.cs | 6 +- Utilities/DropHelper.cs | 5 +- World/AstralBiome.cs | 15 ++--- 73 files changed, 280 insertions(+), 423 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index a6e99b607d..71ae324a97 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1405,16 +1405,15 @@ namespace CalamityMod.CalPlayer float lowestHealthCheck = 0f; int healTarget = Player.whoAmI; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player otherPlayer in Main.ActivePlayers) { - Player otherPlayer = Main.player[i]; - if (otherPlayer.active && !otherPlayer.dead && ((!Player.hostile && !otherPlayer.hostile) || Player.team == otherPlayer.team)) + if (!otherPlayer.dead && ((!Player.hostile && !otherPlayer.hostile) || Player.team == otherPlayer.team)) { float playerDist = Vector2.Distance(target.Center, otherPlayer.Center); if (playerDist < 1200f && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck) { lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife; - healTarget = i; + healTarget = otherPlayer.whoAmI; } } } diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index d946bc32a9..6c7ee3be30 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -107,14 +107,8 @@ namespace CalamityMod.Events { get { - int playerCount = 0; - for (int i = 0; i < Main.player.Length; i++) - { - if (Main.player[i].active) - { - playerCount++; - } - } + int playerCount = Main.CurrentFrameFlags.ActivePlayersCount; + if (DownedBossSystem.downedPolterghast) return (int)(Math.Log(playerCount + Math.E - 1) * 170f); else if (DownedBossSystem.downedAquaticScourge) @@ -189,12 +183,7 @@ namespace CalamityMod.Events if (AcidRainEventIsOngoing || (!NPC.downedBoss1 && !Main.hardMode && !DownedBossSystem.downedAquaticScourge) || BossRushEvent.BossRushActive) return; - int playerCount = 0; - for (int i = 0; i < Main.player.Length; i++) - { - if (Main.player[i].active) - playerCount++; - } + int playerCount = Main.CurrentFrameFlags.ActivePlayersCount; if (playerCount > 0) { @@ -243,12 +232,8 @@ namespace CalamityMod.Events if (!HasStartedAcidicDownpour) { int sulphSeaWidth = SulphurousSea.BiomeWidth; - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[playerIndex]; - if (!player.active) - continue; - // An artificial biome can be made, and therefore, the event could be started by an artificial biome. // While fighting the event in an artificial biome is not bad, having it be started by a patch of Sulphurous Sand // would definitely be strange. @@ -387,11 +372,9 @@ namespace CalamityMod.Events if ((int)Main.time == (int)(Main.nightLength - 1f) && !Main.dayTime && Main.rand.NextBool(increasedEventChance ? 3 : 300)) { bool shouldNotStartEvent = false; - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player player in Main.ActivePlayers) { - if (!Main.player[playerIndex].active) - continue; - if (Main.player[playerIndex].Calamity().noStupidNaturalARSpawns) + if (player.Calamity().noStupidNaturalARSpawns) { shouldNotStartEvent = true; break; @@ -407,9 +390,9 @@ namespace CalamityMod.Events // Attempt to force an Acid Rain immediately after the EoC is dead when someone wanders to the sea. if (NPC.downedBoss1 && !DownedBossSystem.downedEoCAcidRain && !HasBeenForceStartedByEoCDefeat) { - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[playerIndex].active && Main.player[playerIndex].Calamity().ZoneSulphur) + if (player.Calamity().ZoneSulphur) { HasBeenForceStartedByEoCDefeat = true; TryStartEvent(); diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index d1bb856f19..1fcad8cc9b 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -318,14 +318,10 @@ namespace CalamityMod.Events new Boss(ModContent.NPCType(), spawnContext: type => { - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[playerIndex]; - if (p is not null && p.active) - { - if (p.FindBuffIndex(ModContent.BuffType()) > -1) - p.ClearBuff(ModContent.BuffType()); - } + if (p.FindBuffIndex(ModContent.BuffType()) > -1) + p.ClearBuff(ModContent.BuffType()); } Player player = Main.player[ClosestPlayerToWorldCenter]; @@ -413,19 +409,15 @@ namespace CalamityMod.Events BossRushDialogueSystem.StartDialogue(BossRushDialoguePhase.TierOneComplete); // Teleport players to where they came from - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[playerIndex]; - if (p is not null && p.active) + if (p.Calamity().BossRushReturnPosition.HasValue) { - if (p.Calamity().BossRushReturnPosition.HasValue) - { - CalamityPlayer.ModTeleport(p, p.Calamity().BossRushReturnPosition.Value, false, TeleportationStyleID.TeleportationPotion); - p.Calamity().BossRushReturnPosition = null; - } + CalamityPlayer.ModTeleport(p, p.Calamity().BossRushReturnPosition.Value, false, TeleportationStyleID.TeleportationPotion); p.Calamity().BossRushReturnPosition = null; - SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center); } + p.Calamity().BossRushReturnPosition = null; + SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center); } }, // Plantera: End of Tier 2 @@ -622,13 +614,9 @@ namespace CalamityMod.Events public static void End() { // Reset BossRushReturnPosition - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[playerIndex]; - if (p is not null && p.active) - { - p.Calamity().BossRushReturnPosition = null; - } + p.Calamity().BossRushReturnPosition = null; } if (Main.netMode == NetmodeID.SinglePlayer) @@ -729,18 +717,14 @@ namespace CalamityMod.Events CalamityUtils.KillAllHostileProjectiles(); HostileProjectileKillCounter = 3; - for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[playerIndex]; - if (p is not null && p.active) - { - p.Calamity().BossRushReturnPosition = p.Center; - Vector2? underworld = CalamityPlayer.GetUnderworldPosition(p); - if (!underworld.HasValue) - break; - CalamityPlayer.ModTeleport(p, underworld.Value, false, TeleportationStyleID.TeleportationPotion); - SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center); - } + p.Calamity().BossRushReturnPosition = p.Center; + Vector2? underworld = CalamityPlayer.GetUnderworldPosition(p); + if (!underworld.HasValue) + break; + CalamityPlayer.ModTeleport(p, underworld.Value, false, TeleportationStyleID.TeleportationPotion); + SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center); } } @@ -788,12 +772,12 @@ namespace CalamityMod.Events { if (Main.netMode != NetmodeID.MultiplayerClient) { - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player p in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (p.dead) continue; - int animation = Projectile.NewProjectile(new EntitySource_WorldEvent(), Main.player[i].Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, i); + int animation = Projectile.NewProjectile(new EntitySource_WorldEvent(), p.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, p.whoAmI); if (Main.projectile.IndexInRange(animation)) Main.projectile[animation].ai[0] = tier; } diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index 73435d4366..5135eb5d63 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -36,10 +36,9 @@ namespace CalamityMod.Items.Accessories get { bool result = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -110,10 +109,9 @@ namespace CalamityMod.Items.Accessories // Visibility is not net synced, for example. bool alreadyDrawnShieldForPlayer = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -127,6 +125,7 @@ namespace CalamityMod.Items.Accessories // Scale the shield is drawn at. // The "i" parameter is to make different player's shields not be perfectly synced. + int i = player.whoAmI; float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + i * 0.2f)); if (!alreadyDrawnShieldForPlayer) diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 2e1ec84035..acee5d0e7e 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -42,10 +42,9 @@ namespace CalamityMod.Items.Accessories get { bool result = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); diff --git a/Items/Accessories/RoverDrive.cs b/Items/Accessories/RoverDrive.cs index cb944d74ce..439eb1af70 100644 --- a/Items/Accessories/RoverDrive.cs +++ b/Items/Accessories/RoverDrive.cs @@ -36,10 +36,9 @@ namespace CalamityMod.Items.Accessories get { bool result = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -104,10 +103,9 @@ namespace CalamityMod.Items.Accessories // Visibility is not net synced, for example. bool alreadyDrawnShieldForPlayer = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -119,7 +117,7 @@ namespace CalamityMod.Items.Accessories continue; // The shield very gently grows and shrinks - float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + i * 0.2f)); + float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + player.whoAmI * 0.2f)); if (!alreadyDrawnShieldForPlayer) { diff --git a/Items/Accessories/TheSponge.cs b/Items/Accessories/TheSponge.cs index 0c105a0a3d..bc93e1448c 100644 --- a/Items/Accessories/TheSponge.cs +++ b/Items/Accessories/TheSponge.cs @@ -45,10 +45,9 @@ namespace CalamityMod.Items.Accessories get { bool result = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -171,10 +170,9 @@ namespace CalamityMod.Items.Accessories // Visibility is not net synced, for example. bool alreadyDrawnShieldForPlayer = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -187,6 +185,7 @@ namespace CalamityMod.Items.Accessories // Scale the shield is drawn at. The Sponge shield gently grows and shrinks; it should be largely imperceptible. // The "i" parameter is to make different player's shields not be perfectly synced. + int i = player.whoAmI; float baseScale = 0.155f; float maxExtraScale = 0.025f; float extraScalePulseInterpolant = MathF.Pow(4f, MathF.Sin(Main.GlobalTimeWrappedHourly * 0.791f + i) - 1); diff --git a/Items/Armor/LunicCorps/LunicCorpsHelmet.cs b/Items/Armor/LunicCorps/LunicCorpsHelmet.cs index 58a4fa7c33..611ea672bc 100644 --- a/Items/Armor/LunicCorps/LunicCorpsHelmet.cs +++ b/Items/Armor/LunicCorps/LunicCorpsHelmet.cs @@ -41,10 +41,9 @@ namespace CalamityMod.Items.Armor.LunicCorps get { bool result = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -112,10 +111,9 @@ namespace CalamityMod.Items.Armor.LunicCorps // Visibility is not net synced, for example. bool alreadyDrawnShieldForPlayer = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active || player.outOfRange || player.dead) + if (player.outOfRange || player.dead) continue; CalamityPlayer modPlayer = player.Calamity(); @@ -126,6 +124,7 @@ namespace CalamityMod.Items.Armor.LunicCorps // Scale the shield is drawn at. The Lunic Corps shield sticks very close to the body to mimic Halo and occasionally pulses. // The "i" parameter is to make different player's shields not be perfectly synced. + int i = player.whoAmI; float baseScale = 0.11f; float maxExtraScale = 0.013f; float extraScalePulseInterpolant = MathF.Pow(12f, MathF.Sin(Main.GlobalTimeWrappedHourly * 1.6f + i) - 1); diff --git a/Items/Materials/WulfrumMetalScrap.cs b/Items/Materials/WulfrumMetalScrap.cs index 5752684df2..1e32325171 100644 --- a/Items/Materials/WulfrumMetalScrap.cs +++ b/Items/Materials/WulfrumMetalScrap.cs @@ -44,9 +44,9 @@ namespace CalamityMod.Items.Materials bool closePlayer = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - if ((Main.player[i].Center - Item.Center).Length() < 1200 && Main.player[i].GetModPlayer().battery) + if ((player.Center - Item.Center).Length() < 1200 && player.GetModPlayer().battery) { closePlayer = true; break; diff --git a/Items/Mounts/AlicornMount.cs b/Items/Mounts/AlicornMount.cs index 3e03ae4e5b..7f363781da 100644 --- a/Items/Mounts/AlicornMount.cs +++ b/Items/Mounts/AlicornMount.cs @@ -85,12 +85,8 @@ namespace CalamityMod.Items.Mounts public override void Dismount(Player player, ref bool skipDust) { bool anyPlayerOnFabMount = false; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player2 in Main.ActivePlayers) { - Player player2 = Main.player[i]; - if (!player2.active) - continue; - // The player that is dismounting is technically not on the mount anymore. if (player2.Calamity().fab && player2.whoAmI != player.whoAmI) { diff --git a/Items/Weapons/Rogue/Mycoroot.cs b/Items/Weapons/Rogue/Mycoroot.cs index 1234245668..c168bd84f7 100644 --- a/Items/Weapons/Rogue/Mycoroot.cs +++ b/Items/Weapons/Rogue/Mycoroot.cs @@ -43,12 +43,11 @@ namespace CalamityMod.Items.Weapons.Rogue if (spore.WithinBounds(Main.maxProjectiles)) Main.projectile[spore].ai[1] = 1f; } - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player other in Main.ActivePlayers) { - Player other = Main.player[i]; - if (other is null || !other.active || other.dead) + if (other.dead) continue; - if ((other.team == player.team && player.team != 0) || player.whoAmI == i) + if ((other.team == player.team && player.team != 0) || player.whoAmI == other.whoAmI) { if (player.Distance(other.Center) <= 800f) other.AddBuff(ModContent.BuffType(), 900); diff --git a/NPCs/Abyss/BabyCannonballJellyfish.cs b/NPCs/Abyss/BabyCannonballJellyfish.cs index 1799c81f6d..f37e23f812 100644 --- a/NPCs/Abyss/BabyCannonballJellyfish.cs +++ b/NPCs/Abyss/BabyCannonballJellyfish.cs @@ -158,8 +158,13 @@ namespace CalamityMod.NPCs.Abyss NPC.height = (int)(NPC.height * 3f); NPC.position -= NPC.Size * 0.5f; //hitbox expansion + adjustments SoundEngine.PlaySound(SoundID.Item14, NPC.Center); //bomb sound - foreach (Player player in Main.player.Where(player => player.active && !player.dead && NPC.Hitbox.Intersects(player.Hitbox))) + foreach (Player player in Main.ActivePlayers) + { + if (player.dead || !NPC.Hitbox.Intersects(player.Hitbox)) + continue; + player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), explosionDamage, NPC.direction); + } for (int k = 0; k < 8; k++) { int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.MoonBoulder, 0f, -1f, 0, default, 1f); diff --git a/NPCs/Abyss/CannonballJellyfish.cs b/NPCs/Abyss/CannonballJellyfish.cs index 9ac54fa763..b13a6e1a4a 100644 --- a/NPCs/Abyss/CannonballJellyfish.cs +++ b/NPCs/Abyss/CannonballJellyfish.cs @@ -267,8 +267,14 @@ namespace CalamityMod.NPCs.Abyss NPC.width = NPC.height; NPC.position -= NPC.Size * 0.5f; //hitbox expansion + adjustments SoundEngine.PlaySound(SoundID.Item14, NPC.Center); //bomb sound - foreach (Player player in Main.player.Where(player => player.active && !player.dead && NPC.Hitbox.Intersects(player.Hitbox))) - player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage * 3, NPC.direction); //Due to how slow the jelly is, this might catch you unaware, but then you'll never get hit by it again + foreach (Player player in Main.ActivePlayers) + { + if (player.dead || !NPC.Hitbox.Intersects(player.Hitbox)) + continue; + + //Due to how slow the jelly is, this might catch you unaware, but then you'll never get hit by it again + player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage * 3, NPC.direction); + } for (int k = 0; k < 25; k++) { int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.MoonBoulder, 0f, -1f, 0, default, 2f); diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index c303aa1459..a525547dcb 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -56,10 +56,9 @@ namespace CalamityMod.NPCs.AcidRain NPC.velocity.X = xSpeed * NPC.ai[0]; NPC.spriteDirection = (int)NPC.ai[0]; bool flee = false; - for (int i = 0; i < Main.player.Length; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player.active && !player.dead && Vector2.Distance(player.Center, NPC.Center) <= 220f) + if (!player.dead && Vector2.Distance(player.Center, NPC.Center) <= 220f) { flee = true; break; diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 10abbd321b..7baa072efa 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -263,13 +263,13 @@ namespace CalamityMod.NPCs.Astral centerY - height / 2, width, height); - for (int i = 0; i < Main.player.Length; i++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[i].active && !Main.player[i].dead && Main.player[i].getRect().Intersects(hitbox)) + if (!player.dead && player.getRect().Intersects(hitbox)) { - Vector2 before = Main.player[i].velocity; - Main.player[i].Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage, NPC.direction); - Vector2 after = Main.player[i].velocity; + Vector2 before = player.velocity; + player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage, NPC.direction); + Vector2 after = player.velocity; Vector2 difference = after - before; float horMult = 3.5f; @@ -284,7 +284,7 @@ namespace CalamityMod.NPCs.Astral swingYeet = true; } - if (Main.player[i].noKnockback) + if (player.noKnockback) { horMult *= 0.5f; verMult *= 0.5f; @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.Astral difference *= new Vector2(horMult, verMult); - Main.player[i].velocity = before + difference; + player.velocity = before + difference; } } } diff --git a/NPCs/Astral/Nova.cs b/NPCs/Astral/Nova.cs index 4453eb8aea..3e29dbb6e2 100644 --- a/NPCs/Astral/Nova.cs +++ b/NPCs/Astral/Nova.cs @@ -209,12 +209,12 @@ namespace CalamityMod.NPCs.Astral if (Main.netMode != NetmodeID.MultiplayerClient) { - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[i].getRect().Intersects(myRect)) + if (player.getRect().Intersects(myRect)) { - int direction = NPC.Center.X - Main.player[i].Center.X < 0 ? -1 : 1; - Main.player[i].Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage, direction); + int direction = NPC.Center.X - player.Center.X < 0 ? -1 : 1; + player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage, direction); } } } diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 0bada01b73..a8fcf6dc2e 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -3934,16 +3934,13 @@ namespace CalamityMod.NPCs if (npc.position.Y > player.position.Y) { - for (int m = 0; m < Main.maxPlayers; m++) + foreach (Player m in Main.ActivePlayers) { - if (Main.player[m].active) + Rectangle rectangle2 = new Rectangle((int)m.position.X - noFlyZone, (int)m.position.Y - noFlyZone, noFlyZone * 2, height); + if (rectangle.Intersects(rectangle2)) { - Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - noFlyZone, (int)Main.player[m].position.Y - noFlyZone, noFlyZone * 2, height); - if (rectangle.Intersects(rectangle2)) - { - outsideNoFlyZone = false; - break; - } + outsideNoFlyZone = false; + break; } } if (outsideNoFlyZone) @@ -4522,20 +4519,20 @@ namespace CalamityMod.NPCs } float succPower = 0.125f + finalPhaseDustRatio * 0.125f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - float distance = Vector2.Distance(Main.player[i].Center, npc.Center); - if (distance < suckDistance && Main.player[i].grappling[0] == -1) + float distance = Vector2.Distance(plr.Center, npc.Center); + if (distance < suckDistance && plr.grappling[0] == -1) { - if (Collision.CanHit(npc.Center, 1, 1, Main.player[i].Center, 1, 1)) + if (Collision.CanHit(npc.Center, 1, 1, plr.Center, 1, 1)) { float distanceRatio = distance / suckDistance; float multiplier = 1f - distanceRatio; - if (Main.player[i].Center.X < npc.Center.X) - Main.player[i].velocity.X += succPower * multiplier; + if (plr.Center.X < npc.Center.X) + plr.velocity.X += succPower * multiplier; else - Main.player[i].velocity.X -= succPower * multiplier; + plr.velocity.X -= succPower * multiplier; } } } diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 1bf8483ec5..c6d2fbd8e3 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -1161,11 +1161,11 @@ namespace CalamityMod.NPCs int nailCount = Main.rand.Next(3, 6); int[] players = new int[nailCount]; int i = 0; - for (int j = 0; j < Main.player.Length; j++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[j].active && !Main.player[j].dead && Collision.CanHitLine(npc.position, npc.width, npc.height, Main.player[j].position, Main.player[j].width, Main.player[j].height)) + if (!plr.dead && Collision.CanHitLine(npc.position, npc.width, npc.height, plr.position, plr.width, plr.height)) { - players[i] = j; + players[i] = plr.whoAmI; i++; if (i == nailCount) { @@ -7637,9 +7637,9 @@ namespace CalamityMod.NPCs bool spawnTwinkle = npc.ai[1] >= (CalamityWorld.death ? 60f : 120f); if (!spawnTwinkle && npc.velocity.Y == 0f) { - for (int j = 0; j < Main.maxPlayers; j++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[j].active && !Main.player[j].dead && Main.player[j].Distance(npc.Center) < 800f && Main.player[j].Center.Y < npc.Center.Y && Math.Abs(Main.player[j].Center.X - npc.Center.X) < 20f) + if (!plr.dead && plr.Distance(npc.Center) < 800f && plr.Center.Y < npc.Center.Y && Math.Abs(plr.Center.X - npc.Center.X) < 20f) { spawnTwinkle = true; break; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 32d244820c..bee91818bf 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6230,9 +6230,9 @@ namespace CalamityMod.NPCs #region Player Counts public static bool AnyLivingPlayers() { - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[i] != null && Main.player[i].active && !Main.player[i].dead && !Main.player[i].ghost) + if (!player.dead && !player.ghost) { return true; } @@ -6247,15 +6247,7 @@ namespace CalamityMod.NPCs return 1; } - int players = 0; - for (int i = 0; i < Main.maxPlayers; i++) - { - if (Main.player[i] != null && Main.player[i].active) - { - players++; - } - } - return players; + return Main.CurrentFrameFlags.ActivePlayersCount; } #endregion diff --git a/NPCs/DesertScourge/DesertNuisanceHead.cs b/NPCs/DesertScourge/DesertNuisanceHead.cs index 9c0732dded..70af0714f8 100644 --- a/NPCs/DesertScourge/DesertNuisanceHead.cs +++ b/NPCs/DesertScourge/DesertNuisanceHead.cs @@ -167,16 +167,13 @@ namespace CalamityMod.NPCs.DesertScourge bool shouldDirectlyChase = true; if (NPC.position.Y > Main.player[NPC.target].position.Y) { - for (int m = 0; m < 255; m++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[m].active) + Rectangle rectangle2 = new Rectangle((int)plr.position.X - directChaseDistance, (int)plr.position.Y - directChaseDistance, directChaseDistance * 2, directChaseDistance * 2); + if (rectangle.Intersects(rectangle2)) { - Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - directChaseDistance, (int)Main.player[m].position.Y - directChaseDistance, directChaseDistance * 2, directChaseDistance * 2); - if (rectangle.Intersects(rectangle2)) - { - shouldDirectlyChase = false; - break; - } + shouldDirectlyChase = false; + break; } } if (shouldDirectlyChase) diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 4b558ac7d8..1ad7c807c8 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -354,18 +354,15 @@ namespace CalamityMod.NPCs.DesertScourge { int rectWidth = directChaseDistance * 2; int rectHeight = directChaseDistance * 2; - for (int m = 0; m < 255; m++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[m].active) + int rectX = (int)plr.position.X - directChaseDistance; + int rectY = (int)plr.position.Y - directChaseDistance; + Rectangle directChaseRect = new Rectangle(rectX, rectY, rectWidth, rectHeight); + if (rectangle.Intersects(directChaseRect)) { - int rectX = (int)Main.player[m].position.X - directChaseDistance; - int rectY = (int)Main.player[m].position.Y - directChaseDistance; - Rectangle directChaseRect = new Rectangle(rectX, rectY, rectWidth, rectHeight); - if (rectangle.Intersects(directChaseRect)) - { - shouldDirectlyChase = false; - break; - } + shouldDirectlyChase = false; + break; } } if (shouldDirectlyChase) diff --git a/NPCs/DraedonLabThings/Androomba.cs b/NPCs/DraedonLabThings/Androomba.cs index 99458991a0..ae09efe713 100644 --- a/NPCs/DraedonLabThings/Androomba.cs +++ b/NPCs/DraedonLabThings/Androomba.cs @@ -78,9 +78,8 @@ namespace CalamityMod.NPCs.DraedonLabThings NPC.ai[2] *= -1; } // If she sees someone, start running - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) { ChangeAI(1); @@ -143,12 +142,8 @@ namespace CalamityMod.NPCs.DraedonLabThings break; } - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active) - continue; - if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck)) { Main.BestiaryTracker.Kills.RegisterKill(NPC); diff --git a/NPCs/DraedonLabThings/NanodroidDysfunctional.cs b/NPCs/DraedonLabThings/NanodroidDysfunctional.cs index 0b710d0dda..d9c9f41edc 100644 --- a/NPCs/DraedonLabThings/NanodroidDysfunctional.cs +++ b/NPCs/DraedonLabThings/NanodroidDysfunctional.cs @@ -36,12 +36,8 @@ namespace CalamityMod.NPCs.DraedonLabThings { Lighting.AddLight(NPC.Center, 0.25f, 0.1f, 0f); } - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active) - continue; - if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck)) { NPC nPC = new NPC(); diff --git a/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs b/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs index 7063b0f70c..9d75bb45d2 100644 --- a/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs +++ b/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs @@ -36,12 +36,8 @@ namespace CalamityMod.NPCs.DraedonLabThings { Lighting.AddLight(NPC.Center, 0.03f, 0.3f, 0.05f); } - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active) - continue; - if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck)) { NPC nPC = new NPC(); diff --git a/NPCs/DraedonLabThings/NanodroidPlagueRed.cs b/NPCs/DraedonLabThings/NanodroidPlagueRed.cs index 316f219b8c..d6ccfe8717 100644 --- a/NPCs/DraedonLabThings/NanodroidPlagueRed.cs +++ b/NPCs/DraedonLabThings/NanodroidPlagueRed.cs @@ -36,12 +36,8 @@ namespace CalamityMod.NPCs.DraedonLabThings { Lighting.AddLight(NPC.Center, 0.3f, 0.03f, 0f); } - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active) - continue; - if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck)) { NPC nPC = new NPC(); diff --git a/NPCs/DraedonLabThings/RepairUnitCritter.cs b/NPCs/DraedonLabThings/RepairUnitCritter.cs index 9f8d5e76b0..0d71c27a94 100644 --- a/NPCs/DraedonLabThings/RepairUnitCritter.cs +++ b/NPCs/DraedonLabThings/RepairUnitCritter.cs @@ -131,12 +131,8 @@ namespace CalamityMod.NPCs.DraedonLabThings } Time++; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active) - continue; - if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck)) { Main.BestiaryTracker.Kills.RegisterKill(NPC); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index b262f0b856..246be4a731 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -283,16 +283,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; @@ -347,16 +347,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 8c4d93d0a7..cb09c1182b 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -281,12 +281,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { @@ -345,16 +345,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 73454ad0cf..267eed162d 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -281,16 +281,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; @@ -345,16 +345,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index 6007a3c6b1..6c045a6ae8 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -489,13 +489,7 @@ namespace CalamityMod.NPCs.Leviathan float restingPlayerDistance = (float)Math.Sqrt(restingPlayerXDist * restingPlayerXDist + restingPlayerYDist * restingPlayerYDist); NPC.ai[1] += 1f; - int activePlayerAmt = 0; - for (int i = 0; i < 255; i++) - { - if (Main.player[i].active && !Main.player[i].dead && (vector - Main.player[i].Center).Length() < 1000f) - activePlayerAmt++; - } - NPC.ai[1] += activePlayerAmt / 2; + NPC.ai[1] += Main.CurrentFrameFlags.ActivePlayersCount / 2; bool spawnedBubble = false; float bubbleDelay = 20f; diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index a97631312d..8a25c963ad 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -165,16 +165,13 @@ namespace CalamityMod.NPCs.NormalNPCs bool outsideNoFlyZone = true; if (NPC.position.Y > Main.player[NPC.target].position.Y) { - for (int m = 0; m < 255; m++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[m].active) + Rectangle noFlyArea = new Rectangle((int)player.position.X - noFlyZone, (int)player.position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2); + if (rectangle.Intersects(noFlyArea)) { - Rectangle noFlyArea = new Rectangle((int)Main.player[m].position.X - noFlyZone, (int)Main.player[m].position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2); - if (rectangle.Intersects(noFlyArea)) - { - outsideNoFlyZone = false; - break; - } + outsideNoFlyZone = false; + break; } } if (outsideNoFlyZone) diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 74c0216cc6..796db7929b 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -255,16 +255,13 @@ namespace CalamityMod.NPCs.Perforator bool outsideFlyingRadius = true; if (NPC.position.Y > player.position.Y) { - for (int m = 0; m < 255; m++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[m].active) + Rectangle rectangle2 = new Rectangle((int)plr.position.X - stopFlyingRadius, (int)plr.position.Y - stopFlyingRadius, stopFlyingRadius * 2, stopFlyingRadius * 2); + if (rectangle.Intersects(rectangle2)) { - Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - stopFlyingRadius, (int)Main.player[m].position.Y - stopFlyingRadius, stopFlyingRadius * 2, stopFlyingRadius * 2); - if (rectangle.Intersects(rectangle2)) - { - outsideFlyingRadius = false; - break; - } + outsideFlyingRadius = false; + break; } } if (outsideFlyingRadius) diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index dd79644dc6..904ddb6b9e 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -228,16 +228,13 @@ namespace CalamityMod.NPCs.Perforator bool outsideFlyRadius = true; if (NPC.position.Y > player.position.Y) { - for (int m = 0; m < 255; m++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[m].active) + Rectangle rectangle2 = new Rectangle((int)plr.position.X - stopFlyingRadius, (int)plr.position.Y - stopFlyingRadius, stopFlyingRadius * 2, stopFlyingRadius * 2); + if (rectangle.Intersects(rectangle2)) { - Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - stopFlyingRadius, (int)Main.player[m].position.Y - stopFlyingRadius, stopFlyingRadius * 2, stopFlyingRadius * 2); - if (rectangle.Intersects(rectangle2)) - { - outsideFlyRadius = false; - break; - } + outsideFlyRadius = false; + break; } } if (outsideFlyRadius) diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index 78e7b7d9d7..204bb62417 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -92,14 +92,7 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.timeLeft = 750; } } - int playerAmt = 0; - for (int i = 0; i < 255; i++) - { - if (Main.player[i].active && !Main.player[i].dead && (NPC.Center - Main.player[i].Center).Length() < 1000f) - { - playerAmt++; - } - } + int playerAmt = Main.CurrentFrameFlags.ActivePlayersCount; if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) { NPC.TargetClosest(); diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index f60f882457..e83a3eaebc 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -140,10 +140,9 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } float distanceBeforeExploding = 42f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player.active && !player.dead && Vector2.Distance(player.Center, NPC.Center) <= distanceBeforeExploding) + if (!player.dead && Vector2.Distance(player.Center, NPC.Center) <= distanceBeforeExploding) { CheckDead(); NPC.life = 0; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 6b7f5bfe78..8f6b66774c 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -202,12 +202,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Vector2 vectorCenter = NPC.Center; // Count nearby players - int activePlayers = 0; - for (int i = 0; i < Main.maxPlayers; i++) - { - if (Main.player[i].active && !Main.player[i].dead && (vectorCenter - Main.player[i].Center).Length() < 1000f) - activePlayers++; - } + int activePlayers = Main.CurrentFrameFlags.ActivePlayersCount; // Get a target if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 896e52d12c..eda8cb775b 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -601,16 +601,16 @@ namespace CalamityMod.NPCs.PrimordialWyrm int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; @@ -896,16 +896,16 @@ namespace CalamityMod.NPCs.PrimordialWyrm int numProjectiles = 0; float maxDistance = 2400f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (plr.dead) continue; - Vector2 playerCenter = Main.player[i].Center; + Vector2 playerCenter = plr.Center; float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 1b0547687b..e0cea09394 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1266,10 +1266,10 @@ namespace CalamityMod.NPCs.Providence if (NPC.ai[3] % 60f == 0f && expertMode) { List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (!plr.dead) + targets.Add(plr.whoAmI); if (targets.Count > 4) break; diff --git a/NPCs/SlimeGod/CrimulanPaladin.cs b/NPCs/SlimeGod/CrimulanPaladin.cs index 23bfbfd72c..b80fa876b4 100644 --- a/NPCs/SlimeGod/CrimulanPaladin.cs +++ b/NPCs/SlimeGod/CrimulanPaladin.cs @@ -431,10 +431,10 @@ namespace CalamityMod.NPCs.SlimeGod if (enraged && expertMode) { List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (!plr.dead) + targets.Add(plr.whoAmI); if (targets.Count > 1) break; diff --git a/NPCs/SlimeGod/EbonianPaladin.cs b/NPCs/SlimeGod/EbonianPaladin.cs index 09a2661ab7..5f1f30779b 100644 --- a/NPCs/SlimeGod/EbonianPaladin.cs +++ b/NPCs/SlimeGod/EbonianPaladin.cs @@ -444,10 +444,10 @@ namespace CalamityMod.NPCs.SlimeGod if (enraged && expertMode) { List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (!plr.dead) + targets.Add(plr.whoAmI); if (targets.Count > 1) break; diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index 344477b686..7b1e087116 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -413,10 +413,10 @@ namespace CalamityMod.NPCs.SlimeGod if (enraged && expertMode) { List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (!plr.dead) + targets.Add(plr.whoAmI); if (targets.Count > 1) break; diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index 80772fbe31..dc61e4df74 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -430,10 +430,10 @@ namespace CalamityMod.NPCs.SlimeGod if (enraged && expertMode) { List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (!plr.dead) + targets.Add(plr.whoAmI); if (targets.Count > 1) break; diff --git a/NPCs/TownNPCs/AndroombaFriendly.cs b/NPCs/TownNPCs/AndroombaFriendly.cs index 386817f6b0..843e7e3da3 100644 --- a/NPCs/TownNPCs/AndroombaFriendly.cs +++ b/NPCs/TownNPCs/AndroombaFriendly.cs @@ -96,12 +96,8 @@ namespace CalamityMod.NPCs.TownNPCs break; } - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - if (player is null || !player.active) - continue; - if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck)) { Main.BestiaryTracker.Chats.RegisterChatStartWith(NPC); diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 2aa452a208..099711abf7 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -93,11 +93,10 @@ namespace CalamityMod.NPCs.TownNPCs if (CalamityWorld.spawnedCirrus) return true; - for (int k = 0; k < Main.maxPlayers; k++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[k]; bool hasVodka = player.InventoryHas(ModContent.ItemType()) || player.PortableStorageHas(ModContent.ItemType()); - if (player.active && hasVodka) + if (hasVodka) return Main.hardMode; } return false; diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index ade7a0d833..8e93342d25 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -82,11 +82,10 @@ namespace CalamityMod.NPCs.TownNPCs if (CalamityWorld.spawnedBandit) return true; - for (int k = 0; k < Main.maxPlayers; k++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[k]; bool rich = player.InventoryHas(ItemID.PlatinumCoin) || player.PortableStorageHas(ItemID.PlatinumCoin); - if (player.active && rich) + if (rich) return NPC.downedBoss3; } return false; diff --git a/NPCs/VanillaNPCOverrides/Bosses/DeerclopsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DeerclopsAI.cs index a5e98cc159..ff0ea8bd53 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DeerclopsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DeerclopsAI.cs @@ -539,22 +539,22 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (shadowHandTimer / shadowHandSpawnRate >= 3) npc.localAI[2] = 0f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - if (npc.Boss_CanShootExtraAt(i, rotation % 3, 3, 1200f, alwaysSkipMainTarget: false)) + if (npc.Boss_CanShootExtraAt(player.whoAmI, rotation % 3, 3, 1200f, alwaysSkipMainTarget: false)) { // Normal shadow hand spawn behavior // Modified to make the shadow hand spawns fair - RandomizeInsanityShadowFor(Main.player[i], isHostile: true, out var spawnPosition, out var spawnVelocity, out var ai, out var ai2); + RandomizeInsanityShadowFor(player, isHostile: true, out var spawnPosition, out var spawnVelocity, out var ai, out var ai2); // Spawn hands to cut the player off and force them back towards Deerclops // This only happens if the player is triggering Deerclops' increased DR float minShadowHandSpawnDistanceFromPlayer = 450f; - float playerDistanceFromDeerclops = Vector2.Distance(npc.Center, Main.player[i].Center); + float playerDistanceFromDeerclops = Vector2.Distance(npc.Center, player.Center); if (playerDistanceFromDeerclops >= 450f) { - spawnPosition = (Main.player[i].Center - npc.Center).SafeNormalize(Vector2.UnitY) * (playerDistanceFromDeerclops + minShadowHandSpawnDistanceFromPlayer); - spawnVelocity = (Main.player[i].Center - spawnPosition).SafeNormalize(Vector2.UnitY) * spawnVelocity.Length(); + spawnPosition = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * (playerDistanceFromDeerclops + minShadowHandSpawnDistanceFromPlayer); + spawnVelocity = (player.Center - spawnPosition).SafeNormalize(Vector2.UnitY) * spawnVelocity.Length(); } Projectile.NewProjectile(npc.GetSource_FromAI(), spawnPosition, spawnVelocity, shadowHand, shadowHandDamage, 0f, Main.myPlayer, ai, ai2); diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index abbaa9444e..a6ff1b17e3 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -342,16 +342,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (npc.position.Y > player.position.Y) { - for (int m = 0; m < Main.maxPlayers; m++) + foreach (Player plr in Main.ActivePlayers) { - if (Main.player[m].active) + Rectangle noFlyRectangle = new Rectangle((int)plr.position.X - noFlyZone, (int)plr.position.Y - noFlyZone, noFlyZone * 2, height); + if (rectangle.Intersects(noFlyRectangle)) { - Rectangle noFlyRectangle = new Rectangle((int)Main.player[m].position.X - noFlyZone, (int)Main.player[m].position.Y - noFlyZone, noFlyZone * 2, height); - if (rectangle.Intersects(noFlyRectangle)) - { - outsideNoFlyZone = false; - break; - } + outsideNoFlyZone = false; + break; } } if (outsideNoFlyZone) diff --git a/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs index 012513d062..569bb91213 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs @@ -281,16 +281,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses noFlyZone = 100; bool freeMoveAnyway = true; - for (int k = 0; k < Main.maxPlayers; k++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[k].active) + Rectangle rectangle2 = new Rectangle((int)player.position.X - noFlyZone, (int)player.position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2); + if (rectangle.Intersects(rectangle2)) { - Rectangle rectangle2 = new Rectangle((int)Main.player[k].position.X - noFlyZone, (int)Main.player[k].position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2); - if (rectangle.Intersects(rectangle2)) - { - freeMoveAnyway = false; - break; - } + freeMoveAnyway = false; + break; } } if (freeMoveAnyway) @@ -430,9 +427,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (shouldDespawn && !bossRush) { bool everyoneDead = true; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[i].active && !Main.player[i].dead) + if (!player.dead) { everyoneDead = false; break; diff --git a/NPCs/VanillaNPCOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EmpressofLightAI.cs index eeebea7535..d304bb653c 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EmpressofLightAI.cs @@ -502,12 +502,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses continue; // Spawn extra Ethereal Lances per player. - for (int j = 0; j < Main.maxPlayers; j++) + foreach (Player player in Main.ActivePlayers) { - if (!npc.Boss_CanShootExtraAt(j, lanceFrequency % 3, 3, 2400f)) + if (!npc.Boss_CanShootExtraAt(player.whoAmI, lanceFrequency % 3, 3, 2400f)) continue; - Player extraPlayer = Main.player[j]; + Player extraPlayer = player; playerCenter = extraPlayer.Center; if (Vector2.Dot(extraPlayer.velocity.SafeNormalize(Vector2.UnitY), lanceDirection) > 0f) lanceDirection *= -1f; @@ -988,12 +988,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses continue; int multiplayerExtraStraightLances = (int)(npc.ai[1] / etherealLanceGateValue); - for (int l = 0; l < Main.maxPlayers; l++) + foreach (Player player in Main.ActivePlayers) { - if (!npc.Boss_CanShootExtraAt(l, multiplayerExtraStraightLances % 3, 3, 2400f)) + if (!npc.Boss_CanShootExtraAt(player.whoAmI, multiplayerExtraStraightLances % 3, 3, 2400f)) continue; - Player player = Main.player[l]; inverseTargetVel = -player.velocity; inverseTargetVel.SafeNormalize(-Vector2.UnitY); targetCenter = player.Center; diff --git a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs index 8efb918101..b148838e04 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs @@ -842,10 +842,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (attackTimer == 0f && Main.netMode != NetmodeID.MultiplayerClient) { Vector2 leechNPCCenter = npc.Center + leechCenterOffset; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player6 in Main.ActivePlayers) { - Player player6 = Main.player[i]; - if (player6.active && !player6.dead && Vector2.Distance(player6.Center, leechNPCCenter) <= 3000f) + if (!player6.dead && Vector2.Distance(player6.Center, leechNPCCenter) <= 3000f) { Vector2 targetLeechDist = Main.player[npc.target].Center - leechNPCCenter; if (targetLeechDist != Vector2.Zero) diff --git a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs index ef2300c683..020beef416 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs @@ -440,9 +440,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Bee spawn timer npc.ai[1] += 1f; int beeSpawnTimer = 0; - for (int i = 0; i < 255; i++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[i].active && !Main.player[i].dead && (npc.Center - Main.player[i].Center).Length() < 1000f) + if (!player.dead && (npc.Center - player.Center).Length() < 1000f) beeSpawnTimer++; } npc.ai[1] += beeSpawnTimer / 2; diff --git a/Projectiles/Boss/OldDukeVortex.cs b/Projectiles/Boss/OldDukeVortex.cs index 4aafd1b355..c3e39933e9 100644 --- a/Projectiles/Boss/OldDukeVortex.cs +++ b/Projectiles/Boss/OldDukeVortex.cs @@ -124,10 +124,8 @@ namespace CalamityMod.Projectiles.Boss float distanceRequired = 800f * Projectile.scale; float succPower = Main.zenithWorld ? 1f : 0.5f; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { - Player player = Main.player[i]; - float distance = Vector2.Distance(player.Center, Projectile.Center); if (distance < distanceRequired && player.grappling[0] == -1) { diff --git a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs index cb9ce5fdf4..a69053f2a5 100644 --- a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs +++ b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs @@ -107,9 +107,9 @@ namespace CalamityMod.Projectiles.Boss Projectile.alpha = (int)MathHelper.Lerp(0f, 255f, (Projectile.ai[0] - 600f) / 120f); bool canSpawnBoomer = false; - for (int i = 0; i < Main.player.Length; i++) + foreach (Player player in Main.ActivePlayers) { - if (!Main.player[i].dead && Projectile.Distance(Main.player[i].Center) < 12000f) + if (!player.dead && Projectile.Distance(player.Center) < 12000f) { canSpawnBoomer = true; break; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 234d740617..5e093f7fb3 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -3142,10 +3142,9 @@ namespace CalamityMod.Projectiles float lowestHealthCheck = 0f; int healTarget = projectile.owner; - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player otherPlayer in Main.ActivePlayers) { - Player otherPlayer = Main.player[i]; - if (otherPlayer.active && !otherPlayer.dead && ((!player.hostile && !otherPlayer.hostile) || player.team == otherPlayer.team)) + if (!otherPlayer.dead && ((!player.hostile && !otherPlayer.hostile) || player.team == otherPlayer.team)) { float playerDist = Vector2.Distance(projectile.Center, otherPlayer.Center); if (playerDist < distanceRequired && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck) diff --git a/Projectiles/Enemy/FlakAcid.cs b/Projectiles/Enemy/FlakAcid.cs index af856067b2..f9cb7d39bf 100644 --- a/Projectiles/Enemy/FlakAcid.cs +++ b/Projectiles/Enemy/FlakAcid.cs @@ -35,9 +35,9 @@ namespace CalamityMod.Projectiles.Enemy Projectile.velocity.Y += 0.15f; Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - for (int i = 0; i < Main.player.Length; i++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[i].Distance(Projectile.Center) < 60f) + if (player.Distance(Projectile.Center) < 60f) { Projectile.Kill(); } diff --git a/Projectiles/Pets/LadShark.cs b/Projectiles/Pets/LadShark.cs index 773fa8c408..0c086d5ec6 100644 --- a/Projectiles/Pets/LadShark.cs +++ b/Projectiles/Pets/LadShark.cs @@ -78,9 +78,8 @@ namespace CalamityMod.Projectiles.Pets npc.Calamity().ladHearts = CalamityUtils.SecondsToFrames(9f); } } - for (int k = 0; k < Main.maxPlayers; k++) + foreach (Player players in Main.ActivePlayers) { - Player players = Main.player[k]; if (!players.dead && Vector2.Distance(Projectile.Center, players.Center) <= radius) { if (players.Calamity().ladHearts <= 0) diff --git a/Projectiles/Rogue/IcebreakerHammer.cs b/Projectiles/Rogue/IcebreakerHammer.cs index 958cbf080c..c383c2a93e 100644 --- a/Projectiles/Rogue/IcebreakerHammer.cs +++ b/Projectiles/Rogue/IcebreakerHammer.cs @@ -93,10 +93,9 @@ namespace CalamityMod.Projectiles.Rogue int buffType = ModContent.BuffType(); float radius = 112f; // 7 blocks - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player player in Main.ActivePlayers) { Player owner = Main.player[Projectile.owner]; - Player player = Main.player[i]; if ((owner.team != player.team || player.team == 0) && player.hostile && owner.hostile && !player.dead && !player.buffImmune[buffType] && Vector2.Distance(Projectile.Center, player.Center) <= radius) { if (player.FindBuffIndex(buffType) == -1) diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index b603524057..4418cf5779 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -315,14 +315,14 @@ namespace CalamityMod.Projectiles.Summon if (Main.netMode == NetmodeID.MultiplayerClient && mouseDistanceToOwner > 120f) { - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player p in Main.ActivePlayers) { - if (Main.player[i].active && !Main.player[i].dead && (Main.player[i].team == Owner.team || Main.player[i].team == 0)) + if (!p.dead && (p.team == Owner.team || p.team == 0)) { - float mouseDistanceToPotentialTarget = (Main.player[i].MountedCenter - Owner.Calamity().mouseWorld).Length(); + float mouseDistanceToPotentialTarget = (p.MountedCenter - Owner.Calamity().mouseWorld).Length(); if (mouseDistanceToPotentialTarget < 120f && mouseDistanceToOwner > mouseDistanceToPotentialTarget) { - playerToBuff = Main.player[i]; + playerToBuff = p; mouseDistanceToOwner = mouseDistanceToPotentialTarget; } } diff --git a/Projectiles/Typeless/BossRushEndEffectThing.cs b/Projectiles/Typeless/BossRushEndEffectThing.cs index fdb981ba22..00d0b82485 100644 --- a/Projectiles/Typeless/BossRushEndEffectThing.cs +++ b/Projectiles/Typeless/BossRushEndEffectThing.cs @@ -45,16 +45,13 @@ namespace CalamityMod.Projectiles.Typeless public override void OnKill(int timeLeft) { BossRushEvent.End(); - for (int i = Main.maxPlayers - 1; i >= 0; i--) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (p is null || !p.active) - continue; int rock = Item.NewItem(p.GetSource_Misc("CalamityMod_BossRushRock"), (int)p.position.X, (int)p.position.Y, p.width, p.height, ModContent.ItemType()); if (Main.netMode == NetmodeID.Server) { Main.timeItemSlotCannotBeReusedFor[rock] = 54000; - NetMessage.SendData(MessageID.InstancedItem, i, -1, null, rock); + NetMessage.SendData(MessageID.InstancedItem, p.whoAmI, -1, null, rock); } } } diff --git a/Projectiles/Typeless/WulfrumLureSignal.cs b/Projectiles/Typeless/WulfrumLureSignal.cs index cdf334d20e..7d233427c4 100644 --- a/Projectiles/Typeless/WulfrumLureSignal.cs +++ b/Projectiles/Typeless/WulfrumLureSignal.cs @@ -43,13 +43,13 @@ namespace CalamityMod.Projectiles.Typeless if (Main.netMode == NetmodeID.MultiplayerClient) { float closestPlayerDistance = (Main.LocalPlayer.Center - Projectile.Center).Length(); - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player plr in Main.ActivePlayers) { - float newDistance = (Main.player[i].Center - Projectile.Center).Length(); + float newDistance = (plr.Center - Projectile.Center).Length(); if (newDistance < closestPlayerDistance) { closestPlayerDistance = newDistance; - player = Main.player[i]; + player = plr; } } } diff --git a/Systems/WorldMiscUpdateSystem.cs b/Systems/WorldMiscUpdateSystem.cs index d51e8c69bd..9283e4383a 100644 --- a/Systems/WorldMiscUpdateSystem.cs +++ b/Systems/WorldMiscUpdateSystem.cs @@ -101,12 +101,12 @@ namespace CalamityMod.Systems // Attempt to summon lab critters manually since they refuse to exist when using vanilla's spawn methods. // This needs to check all players since the method only runs server-side. - for (int i = 0; i < Main.maxPlayers; i++) + foreach (Player p in Main.ActivePlayers) { - if (!Main.player[i].active || Main.player[i].dead) + if (p.dead) continue; - CalamityGlobalNPC.AttemptToSpawnLabCritters(Main.player[i]); + CalamityGlobalNPC.AttemptToSpawnLabCritters(p); } // Make the cultist countdown happen much more quickly. diff --git a/TileEntities/TEChargingStation.cs b/TileEntities/TEChargingStation.cs index 49027f7f6a..19a318b807 100644 --- a/TileEntities/TEChargingStation.cs +++ b/TileEntities/TEChargingStation.cs @@ -140,10 +140,9 @@ namespace CalamityMod.TileEntities // If this charging station breaks, anyone's who's viewing it is no longer viewing it. public override void OnKill() { - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active) + if (p.dead) continue; // Use reflection to stop TML from spitting an error here. diff --git a/TileEntities/TEHostileFireTurret.cs b/TileEntities/TEHostileFireTurret.cs index 39f2801005..f3e47b7243 100644 --- a/TileEntities/TEHostileFireTurret.cs +++ b/TileEntities/TEHostileFireTurret.cs @@ -85,10 +85,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +95,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TEHostileIceTurret.cs b/TileEntities/TEHostileIceTurret.cs index a86f093a07..7b1a7705bd 100644 --- a/TileEntities/TEHostileIceTurret.cs +++ b/TileEntities/TEHostileIceTurret.cs @@ -85,10 +85,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +95,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TEHostileLabTurret.cs b/TileEntities/TEHostileLabTurret.cs index eaec3d3652..739e752fe4 100644 --- a/TileEntities/TEHostileLabTurret.cs +++ b/TileEntities/TEHostileLabTurret.cs @@ -85,10 +85,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +95,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TEHostileLaserTurret.cs b/TileEntities/TEHostileLaserTurret.cs index 139a7fd3c6..d1d36aa0b0 100644 --- a/TileEntities/TEHostileLaserTurret.cs +++ b/TileEntities/TEHostileLaserTurret.cs @@ -85,10 +85,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +95,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TEHostileOnyxTurret.cs b/TileEntities/TEHostileOnyxTurret.cs index 4408656a11..f3bd4e45ec 100644 --- a/TileEntities/TEHostileOnyxTurret.cs +++ b/TileEntities/TEHostileOnyxTurret.cs @@ -85,10 +85,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +95,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TEHostilePlagueTurret.cs b/TileEntities/TEHostilePlagueTurret.cs index f33c756275..3435fc73e4 100644 --- a/TileEntities/TEHostilePlagueTurret.cs +++ b/TileEntities/TEHostilePlagueTurret.cs @@ -85,10 +85,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +95,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TEHostileWaterTurret.cs b/TileEntities/TEHostileWaterTurret.cs index 5e6082e611..6634863735 100644 --- a/TileEntities/TEHostileWaterTurret.cs +++ b/TileEntities/TEHostileWaterTurret.cs @@ -2,6 +2,7 @@ using CalamityMod.Tiles.DraedonStructures; using Microsoft.Xna.Framework; using System.IO; +using System.Threading.Tasks; using Terraria; using Terraria.ModLoader; @@ -85,10 +86,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active || p.dead) + if (p.dead) continue; float distSQ = p.DistanceSQ(targetingCenter); @@ -96,7 +96,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = p.Center; - indexToSet = i; + indexToSet = p.whoAmI; } } diff --git a/TileEntities/TELabHologramProjector.cs b/TileEntities/TELabHologramProjector.cs index b61fc5d077..017ee44471 100644 --- a/TileEntities/TELabHologramProjector.cs +++ b/TileEntities/TELabHologramProjector.cs @@ -35,11 +35,10 @@ namespace CalamityMod.TileEntities // If one is, pop up. Vector2 projectorCenterPos = Center; float distSQ = PopupDistance * PopupDistance; - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active) // The lack of a dead check is intentional. Dead players keep hologram boxes on for amusement. - continue; + // The lack of a dead check is intentional. Dead players keep hologram boxes on for amusement. + if (p.DistanceSQ(projectorCenterPos) < distSQ) { PoppingUp = true; @@ -72,12 +71,8 @@ namespace CalamityMod.TileEntities // If this projector breaks, anyone who's viewing it is no longer viewing it. public override void OnKill() { - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active) - continue; - // Use reflection to stop TML from spitting an error here. // Try-catching will not stop this error, TML will print it to console anyway. The error is harmless. ModPlayer[] mpStorageArray = (ModPlayer[])typeof(Player).GetField("modPlayers", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(p); diff --git a/TileEntities/TEPowerCellFactory.cs b/TileEntities/TEPowerCellFactory.cs index da86d0bf1c..bc51f1ff86 100644 --- a/TileEntities/TEPowerCellFactory.cs +++ b/TileEntities/TEPowerCellFactory.cs @@ -103,12 +103,8 @@ namespace CalamityMod.TileEntities // If this factory breaks, anyone who's viewing it is no longer viewing it. public override void OnKill() { - for (int i = 0; i < Main.maxPlayers; ++i) + foreach (Player p in Main.ActivePlayers) { - Player p = Main.player[i]; - if (!p.active) - continue; - // Use reflection to stop TML from spitting an error here. // Try-catching will not stop this error, TML will print it to console anyway. The error is harmless. ModPlayer[] mpStorageArray = (ModPlayer[])typeof(Player).GetField("modPlayers", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(p); diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 5ce9c2e0bf..6f356ca6ac 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -1154,9 +1154,8 @@ namespace CalamityMod NPC npc = info.npc; int idx = Item.NewItem(npc.GetSource_Loot(), npc.Center, itemId, stack, true, -1); Main.timeItemSlotCannotBeReusedFor[idx] = protectionTime; - for (int i = 0; i < Main.maxPlayers; ++i) - if (Main.player[i].active) - NetMessage.SendData(MessageID.InstancedItem, i, -1, null, idx); + foreach (Player player in Main.ActivePlayers) + NetMessage.SendData(MessageID.InstancedItem, player.whoAmI, -1, null, idx); Main.item[idx].active = false; } diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index 68a534ad96..511e3caa50 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -83,13 +83,10 @@ namespace CalamityMod.World // Clients in multiplayer don't drop meteors. if (Main.netMode == NetmodeID.MultiplayerClient) return; - for (int i = 0; i < 255; i++) + foreach (Player _ in Main.ActivePlayers) { - if (Main.player[i].active) - { - meteorDropped = false; - break; - } + meteorDropped = false; + break; } // Check whether there is already too much ore. @@ -257,11 +254,11 @@ namespace CalamityMod.World } int avoidRectangleSize = 35; Rectangle rectangle = new Rectangle((i - avoidRectangleSize) * 16, (j - avoidRectangleSize) * 16, avoidRectangleSize * 2 * 16, avoidRectangleSize * 2 * 16); - for (int k = 0; k < Main.maxPlayers; k++) + foreach (Player player in Main.ActivePlayers) { - if (Main.player[k].active) + if (player.active) { - Rectangle value = new Rectangle((int)(Main.player[k].position.X + (float)(Main.player[k].width / 2) - (float)(NPC.sWidth / 2) - (float)NPC.safeRangeX), (int)(Main.player[k].position.Y + (float)(Main.player[k].height / 2) - (float)(NPC.sHeight / 2) - (float)NPC.safeRangeY), NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + Rectangle value = new Rectangle((int)(player.position.X + (float)(player.width / 2) - (float)(NPC.sWidth / 2) - (float)NPC.safeRangeX), (int)(player.position.Y + (float)(player.height / 2) - (float)(NPC.sHeight / 2) - (float)NPC.safeRangeY), NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); if (rectangle.Intersects(value)) { return false; From 2bce64b0c2a4e040b880ad742003b789d38e600a Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Fri, 3 May 2024 07:10:53 +0500 Subject: [PATCH 046/197] Finalized (seems about done) --- CalamityConditions.cs | 13 +- .../en-US/Mods.CalamityMod.Condition.hjson | 116 ++++++++---------- Utilities/DropHelper.cs | 11 +- 3 files changed, 63 insertions(+), 77 deletions(-) diff --git a/CalamityConditions.cs b/CalamityConditions.cs index fda507399c..8cce78968e 100644 --- a/CalamityConditions.cs +++ b/CalamityConditions.cs @@ -29,6 +29,13 @@ namespace CalamityMod public static readonly Condition PlayerHasWings = Create("HasWings", () => Main.LocalPlayer.wingTimeMax > 0); public static readonly Condition PlayerAlcoholPoisoned = Create("AlcoholPoison", () => Main.LocalPlayer.Calamity().alcoholPoisoning); + // + // NPC conditions + // + + /// Don't use this. It's always `true`. + public static readonly Condition TrasherTextCondition = Create("Drops.TrasherKill", () => true); + // // Calamity Event Flag conditions // @@ -72,7 +79,7 @@ namespace CalamityMod public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS); // Mixed - public static readonly Condition DownedHiveMindOrPerforator = Create("Drops.TODO", () => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator); + public static readonly Condition DownedHiveMindOrPerforator = Create("Drops.DownedHMOrPerfs",() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator); public static readonly Condition DownedCalamitasCloneOrPlantera = Create("Drops.DownedCalPlant", () => DownedBossSystem.downedCalamitasClone || Condition.DownedPlantera.IsMet()); // Vanilla @@ -91,6 +98,8 @@ namespace CalamityMod // World based conditions // - public static readonly Condition InRevengeanceMode = Create("Condition.InRev", () => CalamityWorld.revenge); + public static readonly Condition InRevengeanceMode = Create("InRev", () => CalamityWorld.revenge); + public static readonly Condition InRevengeanceModeNotMasterMode = Create("InRev", () => !Main.masterMode && CalamityWorld.revenge); + public static readonly Condition InRevengeanceModeOrMasterMode = Create("InRevOrMM", () => Main.masterMode || CalamityWorld.revenge); } } diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index b8d5dadc72..6dbe1feb52 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -1,64 +1,43 @@ // Drop conditions Drops: { - Cynosure: Drops once you have defeated both Draedon and Calamitas - DownedKS: Drops after defeating King Slime - DownedDS: Drops after defeating the Desert Scourge - DownedEoC: Drops after defeating the Eye of Cthulhu - DownedCrab: Drops after defeating Crabulon - DownedEoW: Drops after defeating the Eater of Worlds - DownedBoC: Drops after defeating the Brain of Cthulhu - DownedHM: Drops after defeating the Hive Mind - DownedPerfs: Drops after defeating the Perforators - DownedQB: Drops after defeating the Queen Bee - DownedDeer: Drops after defeating Deerclops - DownedSkele: Drops after defeating Skeletron - DownedSG: Drops after defeating the Slime God - Hardmode: Drops in Hardmode - DownedQS: Drops after defeating Queen Slime - DownedCryo: Drops after defeating Cryogen - DownedAS: Drops after defeating the Aquatic Scourge - DownedBrim: Drops after defeating the Brimstone Elemental - DownedDest: Drops after defeating the Destroyer - DownedTwins: Drops after defeating the Twins - DownedSP: Drops after defeating Skeletron Prime - Downed1Mech: Drops after defeating a Mechanical Boss - Downed3Mechs: Drops after defeating all three Mechanical Bosses - DownedCal: Drops after defeating Calamitas Clone - DownedPlant: Drops after defeating Plantera - DownedCalPlant: Drops after defeating Calamitas or Plantera - DownedLevi: Drops after defeating the Leviathan and Anahita - DownedAureus: Drops after defeating Astrum Aureus - DownedGolem: Drops after defeating Golem - DownedPBG: Drops after defeating the Plaguebringer Goliath - DownedEoL: Drops after defeating the Empress of Light - DownedFish: Drops after defeating Duke Fishron - DownedRav: Drops after defeating the Ravager - DownedLC: Drops after defeating the Lunatic Cultist - DownedAD: Drops after defeating Astrum Deus - DownedML: Drops after defeating the Moon Lord - DownedGuard: Drops after defeating the Profaned Guardians - DownedBirb: Drops after defeating the Dragonfolly - DownedProv: Drops after defeating Providence - DownedSig: Drops after defeating Signus - DownedSW: Drops after defeating the Storm Weaver - DownedCV: Drops after defeating the Ceaseless Void - DownedPolter: Drops after defeating the Polterghast - DownedOD: Drops after defeating the Old Duke - DownedDoG: Drops after defeating the Devourer of Gods - DownedYharon: Drops after defeating Yharon - DownedExos: Drops after defeating the Exo Mechs - DownedSCal: Drops after defeating Calamitas - DownedAEW: Drops after defeating the Primordial Wyrm - DownedClam: Drops after defeating the Giant Clam - DownedClamHM: Drops after defeating the Giant Clam in Hardmode - DownedGSS: Drops after defeating the Great Sand Shark - DownedBetsy: Drops after defeating Betsy - DownedT1AR: Drops after defeating the first tier of Acid Rain - DownedT2AR: Drops after defeating the second tier of Acid Rain + Cynosure: After defeating both Draedon and Calamitas + DownedDS: After defeating the Desert Scourge + DownedCrab: After defeating Crabulon + DownedHM: After defeating the Hive Mind + DownedPerfs: After defeating the Perforators + DownedHMOrPerfs: After defeating the Hive Mind or the Perforators + DownedSG: After defeating the Slime God + DownedCryo: After defeating Cryogen + DownedAS: After defeating the Aquatic Scourge + DownedBrim: After defeating the Brimstone Elemental + DownedDest: After defeating the Destroyer + DownedCal: After defeating Calamitas Clone + DownedCalPlant: After defeating Calamitas or Plantera + DownedLevi: After defeating the Leviathan and Anahita + DownedAureus: After defeating Astrum Aureus + DownedPBG: After defeating the Plaguebringer Goliath + DownedRav: After defeating the Ravager + DownedAD: After defeating Astrum Deus + DownedGuard: After defeating the Profaned Guardians + DownedBirb: After defeating the Dragonfolly + DownedProv: After defeating Providence + DownedSig: After defeating Signus + DownedSW: After defeating the Storm Weaver + DownedCV: After defeating the Ceaseless Void + DownedPolter: After defeating the Polterghast + DownedOD: After defeating the Old Duke + DownedDoG: After defeating the Devourer of Gods + DownedYharon: After defeating Yharon + DownedExos: After defeating the Exo Mechs + DownedSCal: After defeating Calamitas + DownedAEW: After defeating the Primordial Wyrm + DownedClam: After defeating the Giant Clam + DownedClamHM: After defeating the Giant Clam in Hardmode + DownedGSS: After defeating the Great Sand Shark + DownedBetsy: After defeating Betsy + DownedT1AR: After defeating the first tier of Acid Rain + DownedT2AR: After defeating the second tier of Acid Rain FirstKill: Drops only on the first kill - IsGFB: This is an Everything Seed drop rate - IsRev: This is a Revengeance Mode drop rate - IsDeath: This is a Death Mode drop rate MechBoss: Drops on the first kill of the final Mechanical Boss ProvidenceHallow: ''' @@ -84,15 +63,16 @@ PotionConfig: While the Town NPC Potion Selling configuration option is enabled HasFlareGun: While holding a Flare Gun upgrade HasRogueArmor: While wearing rogue armor HasWings: While wearing wings -InAstral: While in the Astral Infection -InCrag: While in the Brimstone Crags -InSulph: While in the Sulphurous Sea -InSunken: While in the Sunken Sea +InAstral: In the Astral Infection +InCrag: In the Brimstone Crags +InSulph: In the Sulphurous Sea +InSunken: In the Sunken Sea InRev: In Revengeance Mode +IsRevOrMM: In Revengeance Mode or in Master Mode AlcoholPoison: While inflicted with Alcohol Poisoning -PostCal: After Calamitas Clone has been defeated -PostAureus: After Astrum Aureus has been defeated -PostPolter: After Polterghast has been defeated -PostOD: After the Old Duke has been defeated -PostDoG: After the Devourer of Gods has been defeated -PostYharon: After Yharon has been defeated +PostCal: After defeating Calamitas Clone +PostAureus: After defeating Astrum Aureus +PostPolter: After defeating Polterghast +PostOD: After defeating the Old Duke +PostDoG: After defeating the Devourer of Gods +PostYharon: After defeating Yharon diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 3e9d3800fc..ad900797be 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -549,16 +549,13 @@ namespace CalamityMod return trasherNearby; }); // The text is a separate rule so it doesn't show up on the non-Trasher Fishing Rod drop which only occurs if the Angler is not fed to a Trasher - public static IItemDropRuleCondition TrasherText = If((info) => true, true, CalamityUtils.GetTextValue("Condition.Drops.TrasherKill")); + public static IItemDropRuleCondition TrasherText => CalamityConditions.TrasherTextCondition.ToDropCondition(ShowItemDropInUI.Always); // Get Fixed Boi seed drop rule - public static IItemDropRuleCondition GFB = If((info) => Main.zenithWorld, () => Main.zenithWorld, CalamityUtils.GetTextValue("Condition.Drops.IsGFB")); + public static IItemDropRuleCondition GFB => Condition.ZenithWorld.ToDropCondition(ShowItemDropInUI.WhenConditionSatisfied); - public static IItemDropRuleCondition RevNoMaster = If((info) => !Main.masterMode && CalamityWorld.revenge, () => !Main.masterMode && CalamityWorld.revenge, CalamityUtils.GetTextValue("Condition.Drops.IsRev")); - public static IItemDropRuleCondition RevAndMaster = If((info) => Main.masterMode || CalamityWorld.revenge, () => Main.masterMode || CalamityWorld.revenge, () => - { - return Main.masterMode ? Language.GetTextValue("Bestiary_ItemDropConditions.IsMasterMode") : CalamityUtils.GetTextValue("Condition.Drops.IsRev"); - }); + public static IItemDropRuleCondition RevNoMaster => CalamityConditions.InRevengeanceModeNotMasterMode.ToDropCondition(ShowItemDropInUI.WhenConditionSatisfied); + public static IItemDropRuleCondition RevAndMaster => CalamityConditions.InRevengeanceModeOrMasterMode.ToDropCondition(ShowItemDropInUI.WhenConditionSatisfied); #region Boss Defeat Conditionals public static IItemDropRuleCondition PostKS(bool ui = true) => If(Condition.DownedKingSlime.Predicate, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedKS")); From 3874d1632ba4ef6884b56f1048ad4878d6a544ed Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Fri, 3 May 2024 07:14:34 +0500 Subject: [PATCH 047/197] Oops, forgot about boss defeat conditions --- Utilities/DropHelper.cs | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index ad900797be..ee4fe58292 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -558,41 +558,41 @@ namespace CalamityMod public static IItemDropRuleCondition RevAndMaster => CalamityConditions.InRevengeanceModeOrMasterMode.ToDropCondition(ShowItemDropInUI.WhenConditionSatisfied); #region Boss Defeat Conditionals - public static IItemDropRuleCondition PostKS(bool ui = true) => If(Condition.DownedKingSlime.Predicate, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedKS")); + public static IItemDropRuleCondition PostKS(bool ui = true) => Condition.DownedKingSlime.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostDS(bool ui = true) => CalamityConditions.DownedDesertScourge.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostEoC(bool ui = true) => If(() => NPC.downedBoss1, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedEoC")); + public static IItemDropRuleCondition PostEoC(bool ui = true) => Condition.DownedEyeOfCthulhu.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostCrab(bool ui = true) => CalamityConditions.DownedCrabulon.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostEvil1(bool ui = true) => If(() => NPC.downedBoss2, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed" + (WorldGen.crimson ? "BoC" : "EoW"))); + public static IItemDropRuleCondition PostEvil1(bool ui = true) => Condition.DownedEowOrBoc.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostHM(bool ui = true) => CalamityConditions.DownedHiveMind.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostPerfs(bool ui = true) => CalamityConditions.DownedPerforator.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostEvil2(bool ui = true) => If(() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed" + (WorldGen.crimson ? "Perfs" : "HM"))); - public static IItemDropRuleCondition PostQB(bool ui = true) => If(() => NPC.downedQueenBee, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedQB")); - public static IItemDropRuleCondition PostDeer(bool ui = true) => If(() => NPC.downedDeerclops, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedDeer")); - public static IItemDropRuleCondition PostSkele(bool ui = true) => If(() => NPC.downedBoss3, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSkele")); - public static IItemDropRuleCondition PostSG(bool ui = true) => If(() => DownedBossSystem.downedSlimeGod, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSG")); - public static IItemDropRuleCondition Hardmode(bool ui = true) => If(() => Main.hardMode, ui, CalamityUtils.GetTextValue("Condition.Drops.Hardmode")); - public static IItemDropRuleCondition PostQS(bool ui = true) => If(() => NPC.downedQueenSlime, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedQS")); + public static IItemDropRuleCondition PostEvil2(bool ui = true) => CalamityConditions.DownedHiveMindOrPerforator.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostQB(bool ui = true) => Condition.DownedQueenBee.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostDeer(bool ui = true) => Condition.DownedDeerclops.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostSkele(bool ui = true) => Condition.DownedSkeletron.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostSG(bool ui = true) => CalamityConditions.DownedSlimeGod.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition Hardmode(bool ui = true) => Condition.Hardmode.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostQS(bool ui = true) => Condition.DownedQueenSlime.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostCryo(bool ui = true) => CalamityConditions.DownedCryogen.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostAS(bool ui = true) => CalamityConditions.DownedAquaticScourge.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostBrim(bool ui = true) => CalamityConditions.DownedBrimstoneElemental.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostDest(bool ui = true) => If(() => NPC.downedMechBoss1, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedDest")); - public static IItemDropRuleCondition PostTwins(bool ui = true) => If(() => NPC.downedMechBoss2, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedTwins")); - public static IItemDropRuleCondition PostSP(bool ui = true) => If(() => NPC.downedMechBoss3, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedSP")); - public static IItemDropRuleCondition Post1Mech(bool ui = true) => If(() => NPC.downedMechBossAny, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed1Mech")); - public static IItemDropRuleCondition Post3Mechs(bool ui = true) => If(() => NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3, ui, CalamityUtils.GetTextValue("Condition.Drops.Downed3Mechs")); + public static IItemDropRuleCondition PostDest(bool ui = true) => Condition.DownedDestroyer.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostTwins(bool ui = true) => Condition.DownedTwins.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostSP(bool ui = true) => Condition.DownedSkeletronPrime.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition Post1Mech(bool ui = true) => Condition.DownedMechBossAny.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition Post3Mechs(bool ui = true) => Condition.DownedMechBossAll.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostCal(bool ui = true) => CalamityConditions.DownedCalamitasClone.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostPlant(bool ui = true) => If(() => NPC.downedPlantBoss, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedPlant")); + public static IItemDropRuleCondition PostPlant(bool ui = true) => Condition.DownedPlantera.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostCalPlant(bool ui = true) => CalamityConditions.DownedCalamitasCloneOrPlantera.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostLevi(bool ui = true) => CalamityConditions.DownedLeviathan.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostAureus(bool ui = true) => CalamityConditions.DownedAstrumAureus.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostGolem(bool ui = true) => If(() => NPC.downedGolemBoss, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedGolem")); + public static IItemDropRuleCondition PostGolem(bool ui = true) => Condition.DownedGolem.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostPBG(bool ui = true) => CalamityConditions.DownedPlaguebringer.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostEoL(bool ui = true) => If(() => NPC.downedEmpressOfLight, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedEoL")); - public static IItemDropRuleCondition PostFish(bool ui = true) => If(() => NPC.downedFishron, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedFish")); + public static IItemDropRuleCondition PostEoL(bool ui = true) => Condition.DownedEmpressOfLight.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostFish(bool ui = true) => Condition.DownedDukeFishron.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostRav(bool ui = true) => CalamityConditions.DownedRavager.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostLC(bool ui = true) => If(() => NPC.downedAncientCultist, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedLC")); + public static IItemDropRuleCondition PostLC(bool ui = true) => Condition.DownedCultist.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostAD(bool ui = true) => CalamityConditions.DownedAstrumDeus.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); - public static IItemDropRuleCondition PostML(bool ui = true) => If(() => NPC.downedMoonlord, ui, CalamityUtils.GetTextValue("Condition.Drops.DownedML")); + public static IItemDropRuleCondition PostML(bool ui = true) => Condition.DownedMoonLord.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostGuard(bool ui = true) => CalamityConditions.DownedGuardians.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostBirb(bool ui = true) => CalamityConditions.DownedBumblebird.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostProv(bool ui = true) => CalamityConditions.DownedProvidence.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); From 12ea0ed131359dc50c5bbf81e155a306b853c7c9 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Fri, 3 May 2024 15:46:30 +0500 Subject: [PATCH 048/197] More progress --- CalPlayer/CalamityPlayer.cs | 5 +- CalPlayer/CalamityPlayerDashEffects.cs | 12 ++-- CalPlayer/CalamityPlayerHitHurt.cs | 22 +++---- CalPlayer/CalamityPlayerMiscEffects.cs | 65 ++++++++----------- Events/AcidRainEvent.cs | 6 +- .../Primitives/PrimitivePixelationSystem.cs | 6 +- .../MiracleBlightRenderer.cs | 6 +- ILEditing/MechanicILChanges.cs | 7 +- Items/Accessories/TheCamper.cs | 5 +- Items/Accessories/ToxicHeart.cs | 5 +- Items/Accessories/WarbanneroftheSun.cs | 10 ++- Items/AlicornonaStick.cs | 4 +- Items/Mounts/AlicornMount.cs | 8 +-- Items/SuperDummy.cs | 7 +- Items/Weapons/Ranged/ConferenceCall.cs | 7 +- Items/Weapons/Ranged/Disseminator.cs | 7 +- NPCs/Abyss/ColossalSquid.cs | 25 ++++--- NPCs/Abyss/EidolonWyrmBody.cs | 4 +- NPCs/Abyss/EidolonWyrmBodyAlt.cs | 4 +- NPCs/Abyss/EidolonWyrmTail.cs | 4 +- NPCs/Abyss/GulperEelBody.cs | 4 +- NPCs/Abyss/GulperEelBodyAlt.cs | 4 +- NPCs/Abyss/GulperEelTail.cs | 4 +- NPCs/Abyss/OarfishBody.cs | 4 +- NPCs/Abyss/OarfishTail.cs | 4 +- NPCs/Astral/HiveEnemy.cs | 2 + NPCs/AstrumAureus/AureusSpawn.cs | 25 ++++--- NPCs/AstrumDeus/AstrumDeusHead.cs | 5 +- NPCs/BrimstoneElemental/Brimling.cs | 25 ++++--- NPCs/CalClone/CalScreenShaderData.cs | 6 +- NPCs/CalClone/CalSky.cs | 6 +- NPCs/CalamityAI.cs | 48 ++++++-------- NPCs/CalamityGlobalAI.cs | 45 +++++++------ NPCs/CalamityGlobalNPCLoot.cs | 10 +-- NPCs/Crabulon/CrabShroom.cs | 25 ++++--- NPCs/DesertScourge/DesertNuisanceBody.cs | 10 +-- NPCs/DesertScourge/DesertNuisanceTail.cs | 10 +-- NPCs/DesertScourge/DesertScourgeBody.cs | 10 +-- NPCs/DesertScourge/DesertScourgeTail.cs | 10 +-- NPCs/DevourerofGods/CosmicGuardianBody.cs | 10 +-- NPCs/DevourerofGods/CosmicGuardianHead.cs | 6 +- NPCs/DevourerofGods/CosmicGuardianTail.cs | 10 +-- NPCs/DevourerofGods/DevourerofGodsBody.cs | 10 +-- NPCs/DevourerofGods/DevourerofGodsHead.cs | 36 +++++----- NPCs/DevourerofGods/DevourerofGodsTail.cs | 10 +-- NPCs/DevourerofGods/DoGScreenShaderData.cs | 6 +- NPCs/DevourerofGods/DoGSky.cs | 6 +- NPCs/ExoMechs/Apollo/Apollo.cs | 5 +- NPCs/ExoMechs/Artemis/Artemis.cs | 5 +- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 10 +-- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 10 +-- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 10 +-- NPCs/Leviathan/AquaticAberration.cs | 25 ++++--- NPCs/Leviathan/LevScreenShaderData.cs | 6 +- NPCs/Leviathan/LevSky.cs | 6 +- NPCs/NormalNPCs/ArmoredDiggerBody.cs | 5 +- 56 files changed, 252 insertions(+), 400 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 5dc5c9c044..a8c0fc5775 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2949,10 +2949,9 @@ namespace CalamityMod.CalPlayer } if (Main.netMode != NetmodeID.MultiplayerClient) { - for (int l = 0; l < Main.maxNPCs; l++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[l]; - if (npc.active && !npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f) + if (!npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f) npc.AddBuff(ModContent.BuffType(), 600, false); } } diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index 0a5cce0e2e..af2786cf88 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -72,15 +72,13 @@ namespace CalamityMod.CalPlayer if (HasCustomDash && Player.dashDelay < 0) { Rectangle hitArea = new Rectangle((int)(Player.position.X + Player.velocity.X * 0.5 - 4f), (int)(Player.position.Y + Player.velocity.Y * 0.5 - 4), Player.width + 8, Player.height + 8); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - NPC n = Main.npc[i]; - // Ignore critters with the Guide to Critter Companionship if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type]) continue; - if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) + if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) { if (hitArea.Intersects(n.getRect()) && (n.noTileCollide || Player.CanHit(n))) { @@ -541,15 +539,13 @@ namespace CalamityMod.CalPlayer public int DoMountDashDamage(Rectangle myRect, float Damage, float Knockback, int NPCImmuneTime, int PlayerImmuneTime) { int totalHurtNPCs = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - NPC n = Main.npc[i]; - // Ignore critters with the Guide to Critter Companionship if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type]) continue; - if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) + if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) { Rectangle npcHitbox = n.getRect(); if (myRect.Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height))) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index ab15a94dc9..b84a070442 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -224,10 +224,10 @@ namespace CalamityMod.CalPlayer if (hInferno) { - for (int x = 0; x < Main.maxNPCs; x++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[x].active && Main.npc[x].type == ModContent.NPCType()) - Main.npc[x].active = false; + if (n.type == ModContent.NPCType()) + n.active = false; } } @@ -1434,15 +1434,13 @@ namespace CalamityMod.CalPlayer // This also strikes the NPCs as a side effect if (gSabatonFalling) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - NPC n = Main.npc[i]; - // Ignore critters with the Guide to Critter Companionship if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type]) continue; - if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) + if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) { Rectangle npcHitbox = n.getRect(); if ((Player.getRect()).Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height))) @@ -2219,10 +2217,9 @@ namespace CalamityMod.CalPlayer if ((fBarrier || (aquaticHeart && NPC.downedBoss3)) && !areThereAnyDamnBosses) { SoundEngine.PlaySound(SoundID.Item27, Player.Center); - for (int m = 0; m < Main.maxNPCs; m++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[m]; - if (!npc.active || npc.friendly || npc.dontTakeDamage) + if (npc.friendly || npc.dontTakeDamage) continue; float npcDist = (npc.Center - Player.Center).Length(); @@ -2250,10 +2247,9 @@ namespace CalamityMod.CalPlayer // and also doesn't have random chance (why does Brain of Confusion not guarantee confusion on hit) if (aBrain || amalgam) { - for (int m = 0; m < Main.maxNPCs; m++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[m]; - if (!npc.active || npc.friendly || npc.dontTakeDamage) + if (npc.friendly || npc.dontTakeDamage) continue; float npcDist = (npc.Center - Player.Center).Length(); diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 9338322a15..b99288c74d 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -456,10 +456,9 @@ namespace CalamityMod.CalPlayer float enemyDistance = maxProxRageDistance + 1f; float bossDistance = maxProxRageDistance + 1f; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc is null || npc.type == 0 || !npc.IsAnEnemy() || !npc.Calamity().ProvidesProximityRage) + if (npc.type == 0 || !npc.IsAnEnemy() || !npc.Calamity().ProvidesProximityRage) continue; // Take the longer of the two directions for the NPC's hitbox to be generous. @@ -716,10 +715,9 @@ namespace CalamityMod.CalPlayer sigilDamage = Player.ApplyArmorAccDamageBonusesTo(sigilDamage); bool brightenedSigil = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC target in Main.ActiveNPCs) { - NPC target = Main.npc[i]; - if (!target.active || !target.Hitbox.Intersects(sigilHitbox) || target.immortal || target.dontTakeDamage || target.townNPC || NPCID.Sets.ActsLikeTownNPC[target.type] || NPCID.Sets.CountsAsCritter[target.type]) + if (!target.Hitbox.Intersects(sigilHitbox) || target.immortal || target.dontTakeDamage || target.townNPC || NPCID.Sets.ActsLikeTownNPC[target.type] || NPCID.Sets.CountsAsCritter[target.type]) continue; // Brighten the sigil because it is dealing damage. This can only happen once per hit event. @@ -731,7 +729,7 @@ namespace CalamityMod.CalPlayer // Create a direct strike to hit this specific NPC. var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); - Projectile sigilStrike = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), sigilDamage, 0f, Player.whoAmI, i); + Projectile sigilStrike = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), sigilDamage, 0f, Player.whoAmI, target.whoAmI); // Enable crits by setting the sigil's damage class to be whatever the player's strongest damage class is. sigilStrike.DamageType = Player.GetBestClass(); @@ -868,16 +866,15 @@ namespace CalamityMod.CalPlayer alreadyTargetedNPCs.Add((int)Main.projectile[i].ai[0]); } - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC target in Main.ActiveNPCs) { - NPC target = Main.npc[i]; - if (!target.active || target.friendly || target.lifeMax < 5 || alreadyTargetedNPCs.Contains(i) || target.realLife >= 0 || + if (target.friendly || target.lifeMax < 5 || alreadyTargetedNPCs.Contains(target.whoAmI) || target.realLife >= 0 || target.dontTakeDamage || target.immortal || target.townNPC || NPCID.Sets.ActsLikeTownNPC[target.type] || NPCID.Sets.CountsAsCritter[target.type]) continue; var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); - if (Main.myPlayer == Player.whoAmI && Main.npc[i].WithinRange(Player.Center, 2000f)) - Projectile.NewProjectile(source, Main.npc[i].Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, i); + if (Main.myPlayer == Player.whoAmI && target.WithinRange(Player.Center, 2000f)) + Projectile.NewProjectile(source, target.Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, target.whoAmI); if (spiritOriginBullseyeShootCountdown <= 0) spiritOriginBullseyeShootCountdown = 45; } @@ -1240,14 +1237,13 @@ namespace CalamityMod.CalPlayer { float maxDistance = 300f; int target = -1; - for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[npcIndex]; float targetDist = Vector2.Distance(npc.Center, Player.Center); if (targetDist < maxDistance && npc.Calamity().arcZapCooldown == 0 && npc.CanBeChasedBy()) { maxDistance = targetDist; - target = npcIndex; + target = npc.whoAmI; } } @@ -1821,10 +1817,9 @@ namespace CalamityMod.CalPlayer { if (Main.rand.NextBool(5)) { - for (int l = 0; l < Main.maxNPCs; l++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[l]; - if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) + if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) continue; if (!npc.buffImmune[buffType] && Vector2.Distance(Player.Center, npc.Center) <= freezeDist) @@ -2747,10 +2742,9 @@ namespace CalamityMod.CalPlayer { if (Main.netMode != NetmodeID.MultiplayerClient && !areThereAnyDamnBosses) { - for (int m = 0; m < Main.maxNPCs; m++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[m]; - if (!npc.active || npc.friendly || npc.dontTakeDamage) + if (npc.friendly || npc.dontTakeDamage) continue; float distance = (npc.Center - Player.Center).Length(); if (distance < 120f) @@ -3115,14 +3109,13 @@ namespace CalamityMod.CalPlayer var source = Player.GetSource_FromThis(TarragonHeadSummon.LifeAuraEntitySourceContext); float range = 300f; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) + if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) continue; if (Vector2.Distance(Player.Center, npc.Center) <= range) - Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, npc.whoAmI); } } } @@ -3143,14 +3136,13 @@ namespace CalamityMod.CalPlayer var source = Player.GetSource_ItemUse(Player.ActiveItem()); float range = 200f; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) + if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) continue; if (Vector2.Distance(Player.Center, npc.Center) <= range) - Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, npc.whoAmI); // Occasionally spawn cute sparks so it looks like an electrical aura if (Main.rand.NextBool(10)) @@ -3186,17 +3178,16 @@ namespace CalamityMod.CalPlayer var source = Player.GetSource_FromThis(HydrothermicArmor.InfernoPotionEntitySourceContext); float range = 300f; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) + if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage) continue; if (Vector2.Distance(Player.Center, npc.Center) <= range) { npc.AddBuff(ModContent.BuffType(), 120); if (brimLoreInfernoTimer == 0) - Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, npc.whoAmI); } } } @@ -4183,12 +4174,8 @@ namespace CalamityMod.CalPlayer if (Main.myPlayer != Player.whoAmI) return; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc is null || !npc.active) - return; - bool holdingsol = ((Player.HeldItem.type >= ItemID.GreenSolution && Player.HeldItem.type <= ItemID.RedSolution) || (Player.HeldItem.type >= ItemID.SandSolution && Player.HeldItem.type <= ItemID.DirtSolution) || Player.HeldItem.type == ModContent.ItemType()); if (npc.Hitbox.Contains(Main.MouseWorld.ToPoint()) && holdingsol && Player.Distance(npc.Center) < 450) { @@ -4268,7 +4255,7 @@ namespace CalamityMod.CalPlayer } } if (Main.netMode == NetmodeID.Server) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, i); + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, npc.whoAmI); } } } diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index 6c7ee3be30..dc9410496b 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -65,10 +65,10 @@ namespace CalamityMod.Events { get { - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - if (Main.npc[i].active && (PossibleMinibossesAS.Select(miniboss => miniboss.Key).Contains(Main.npc[i].type) || - PossibleMinibossesPolter.Select(miniboss => miniboss.Key).Contains(Main.npc[i].type))) + if ((PossibleMinibossesAS.Select(miniboss => miniboss.Key).Contains(npc.type) || + PossibleMinibossesPolter.Select(miniboss => miniboss.Key).Contains(npc.type))) { return true; } diff --git a/Graphics/Primitives/PrimitivePixelationSystem.cs b/Graphics/Primitives/PrimitivePixelationSystem.cs index 27a40a1efd..ad2a82fc40 100644 --- a/Graphics/Primitives/PrimitivePixelationSystem.cs +++ b/Graphics/Primitives/PrimitivePixelationSystem.cs @@ -84,12 +84,10 @@ namespace CalamityMod.Graphics.Primitives } // Check every active NPC. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - var npc = Main.npc[i]; - // If the NPC is active, a mod NPC, and uses the interface, add it to the list of primitives to draw this frame. - if (npc.active && npc.ModNPC != null && npc.ModNPC is IPixelatedPrimitiveRenderer pixelPrimitiveNPC) + if (npc.ModNPC != null && npc.ModNPC is IPixelatedPrimitiveRenderer pixelPrimitiveNPC) { var listToUse = pixelPrimitiveNPC.LayerToRenderTo switch { diff --git a/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs b/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs index 2f6ee9af3f..9fdab1f84a 100644 --- a/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs +++ b/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs @@ -89,14 +89,12 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers ActuallyDoPreDraw = true; // Draw every npc to a single target that should have the miracle blight visual. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { // Extra check to ensure that index errors will not occur. If not in range, something has gone wrong and the loop should terminate. - if (!Main.npc.IndexInRange(i)) + if (!Main.npc.IndexInRange(npc.whoAmI)) break; - NPC npc = Main.npc[i]; - if (ValidToDraw(npc)) Main.instance.DrawNPC(npc.whoAmI, npc.behindTiles); } diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index a36155c22a..01a4f20dc6 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -734,12 +734,9 @@ namespace CalamityMod.ILEditing } // Draw NPCs. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].active) - continue; - - if (Main.npc[i].ModNPC is IAdditiveDrawer d) + if (n.ModNPC is IAdditiveDrawer d) d.AdditiveDraw(Main.spriteBatch); } diff --git a/Items/Accessories/TheCamper.cs b/Items/Accessories/TheCamper.cs index ec7a9d6d49..bca2639277 100644 --- a/Items/Accessories/TheCamper.cs +++ b/Items/Accessories/TheCamper.cs @@ -58,13 +58,12 @@ namespace CalamityMod.Items.Accessories if (auraCounter == 9) { auraCounter = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.IsAnEnemy() && !npc.dontTakeDamage && Vector2.Distance(player.Center, npc.Center) <= range) { int campingFireDamage = (int)player.GetBestClassDamage().ApplyTo(Main.rand.Next(20, 41)); - Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), campingFireDamage, 0f, player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), campingFireDamage, 0f, player.whoAmI, npc.whoAmI); } } } diff --git a/Items/Accessories/ToxicHeart.cs b/Items/Accessories/ToxicHeart.cs index f93462c333..b1aa634f9a 100644 --- a/Items/Accessories/ToxicHeart.cs +++ b/Items/Accessories/ToxicHeart.cs @@ -40,9 +40,8 @@ namespace CalamityMod.Items.Accessories { if (random == 0) { - for (int l = 0; l < Main.maxNPCs; l++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[l]; if (nPC.IsAnEnemy() && !nPC.dontTakeDamage && !nPC.buffImmune[plagueDebuff] && Vector2.Distance(player.Center, nPC.Center) <= 300f) { if (nPC.FindBuffIndex(plagueDebuff) == -1) @@ -53,7 +52,7 @@ namespace CalamityMod.Items.Accessories { if (player.whoAmI == Main.myPlayer) { - Projectile.NewProjectileDirect(source, nPC.Center, Vector2.Zero, ModContent.ProjectileType(), auraDamage, 0f, player.whoAmI, l); + Projectile.NewProjectileDirect(source, nPC.Center, Vector2.Zero, ModContent.ProjectileType(), auraDamage, 0f, player.whoAmI, nPC.whoAmI); } } } diff --git a/Items/Accessories/WarbanneroftheSun.cs b/Items/Accessories/WarbanneroftheSun.cs index 793f4ead92..ef3d7d7d80 100644 --- a/Items/Accessories/WarbanneroftheSun.cs +++ b/Items/Accessories/WarbanneroftheSun.cs @@ -49,26 +49,24 @@ namespace CalamityMod.Items.Accessories float bonus = 0f; int closestNPC = -1; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; if (nPC.IsAnEnemy() && !nPC.dontTakeDamage) { - closestNPC = i; + closestNPC = nPC.whoAmI; break; } } float distance = -1f; - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[j]; if (nPC.IsAnEnemy() && !nPC.dontTakeDamage) { float distance2 = Math.Abs(nPC.position.X + (float)(nPC.width / 2) - (player.position.X + (float)(player.width / 2))) + Math.Abs(nPC.position.Y + (float)(nPC.height / 2) - (player.position.Y + (float)(player.height / 2))); if (distance == -1f || distance2 < distance) { distance = distance2; - closestNPC = j; + closestNPC = nPC.whoAmI; } } } diff --git a/Items/AlicornonaStick.cs b/Items/AlicornonaStick.cs index 9c3ce74d19..4f30a42f0b 100644 --- a/Items/AlicornonaStick.cs +++ b/Items/AlicornonaStick.cs @@ -26,9 +26,9 @@ namespace CalamityMod.Items { int offset = player.direction == 1 ? 5 : -Item.width - 5; Rectangle itemRect = new Rectangle((int)player.Center.X + offset, (int)player.position.Y - 10, Item.width, Item.height); - foreach (NPC npc in Main.npc) + foreach (NPC npc in Main.ActiveNPCs) { - if (npc.active && npc != null && !npc.dontTakeDamage && npc.type != ModContent.NPCType()) + if (!npc.dontTakeDamage && npc.type != ModContent.NPCType()) { if (itemRect.Intersects(npc.getRect())) { diff --git a/Items/Mounts/AlicornMount.cs b/Items/Mounts/AlicornMount.cs index 7f363781da..1a7411a2ef 100644 --- a/Items/Mounts/AlicornMount.cs +++ b/Items/Mounts/AlicornMount.cs @@ -71,12 +71,12 @@ namespace CalamityMod.Items.Mounts public override void SetMount(Player player, ref bool skipDust) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - if (Main.npc[i].type == ModContent.NPCType()) + if (npc.type == ModContent.NPCType()) { - Main.npc[i].active = false; - Main.npc[i].netUpdate = true; + npc.active = false; + npc.netUpdate = true; break; } } diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index 3e13915c33..696b377cd2 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -30,16 +30,15 @@ namespace CalamityMod.Items public static void DeleteDummies() { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc.type == ModContent.NPCType() && npc.active) + if (npc.type == ModContent.NPCType()) { npc.life = 0; npc.active = false; if (Main.netMode == NetmodeID.Server) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, i); + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, npc.whoAmI); } } } diff --git a/Items/Weapons/Ranged/ConferenceCall.cs b/Items/Weapons/Ranged/ConferenceCall.cs index 87052ebb5e..83590b12fc 100644 --- a/Items/Weapons/Ranged/ConferenceCall.cs +++ b/Items/Weapons/Ranged/ConferenceCall.cs @@ -58,16 +58,15 @@ namespace CalamityMod.Items.Weapons.Ranged int[] targets = new int[maxTargets]; int targetArrayIndex = 0; Rectangle rectangle = new Rectangle((int)player.Center.X - 960, (int)player.Center.Y - 540, 1920, 1080); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc.active && npc.chaseable && npc.lifeMax > 5 && !npc.dontTakeDamage && !npc.friendly && !npc.immortal) + if (npc.chaseable && npc.lifeMax > 5 && !npc.dontTakeDamage && !npc.friendly && !npc.immortal) { if (npc.Hitbox.Intersects(rectangle)) { if (targetArrayIndex < maxTargets) { - targets[targetArrayIndex] = i; + targets[targetArrayIndex] = npc.whoAmI; targetArrayIndex++; } else diff --git a/Items/Weapons/Ranged/Disseminator.cs b/Items/Weapons/Ranged/Disseminator.cs index d96ddb02bd..4b15251c6c 100644 --- a/Items/Weapons/Ranged/Disseminator.cs +++ b/Items/Weapons/Ranged/Disseminator.cs @@ -58,16 +58,15 @@ namespace CalamityMod.Items.Weapons.Ranged int[] targets = new int[maxTargets]; int targetArrayIndex = 0; Rectangle rectangle = new Rectangle((int)player.Center.X - 960, (int)player.Center.Y - 540, 1920, 1080); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc.active && npc.chaseable && npc.lifeMax > 5 && !npc.dontTakeDamage && !npc.friendly && !npc.immortal) + if (npc.chaseable && npc.lifeMax > 5 && !npc.dontTakeDamage && !npc.friendly && !npc.immortal) { if (npc.Hitbox.Intersects(rectangle)) { if (targetArrayIndex < maxTargets) { - targets[targetArrayIndex] = i; + targets[targetArrayIndex] = npc.whoAmI; targetArrayIndex++; } else diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index c5677cd416..13f98c04e9 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -505,24 +505,21 @@ namespace CalamityMod.NPCs.Abyss } } float pushVelocity = 0.05f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC otherNPC in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (otherNPC.whoAmI != NPC.whoAmI && otherNPC.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, otherNPC.Center) < 160f) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 160f) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; + if (NPC.position.X < otherNPC.position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } + if (NPC.position.Y < otherNPC.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } } } diff --git a/NPCs/Abyss/EidolonWyrmBody.cs b/NPCs/Abyss/EidolonWyrmBody.cs index c1a8c86b08..984675fada 100644 --- a/NPCs/Abyss/EidolonWyrmBody.cs +++ b/NPCs/Abyss/EidolonWyrmBody.cs @@ -52,9 +52,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/EidolonWyrmBodyAlt.cs b/NPCs/Abyss/EidolonWyrmBodyAlt.cs index 2cbfd9e8f6..03cee01aa1 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAlt.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAlt.cs @@ -52,9 +52,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/EidolonWyrmTail.cs b/NPCs/Abyss/EidolonWyrmTail.cs index 463c697b83..39a982ae46 100644 --- a/NPCs/Abyss/EidolonWyrmTail.cs +++ b/NPCs/Abyss/EidolonWyrmTail.cs @@ -52,9 +52,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index 8fab0776de..c36096f82a 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -57,9 +57,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/GulperEelBodyAlt.cs b/NPCs/Abyss/GulperEelBodyAlt.cs index 292bae06f1..1fcff37a05 100644 --- a/NPCs/Abyss/GulperEelBodyAlt.cs +++ b/NPCs/Abyss/GulperEelBodyAlt.cs @@ -57,9 +57,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/GulperEelTail.cs b/NPCs/Abyss/GulperEelTail.cs index 7381e75b4f..7e982bde24 100644 --- a/NPCs/Abyss/GulperEelTail.cs +++ b/NPCs/Abyss/GulperEelTail.cs @@ -57,9 +57,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/OarfishBody.cs b/NPCs/Abyss/OarfishBody.cs index 71dad1d575..9187f74332 100644 --- a/NPCs/Abyss/OarfishBody.cs +++ b/NPCs/Abyss/OarfishBody.cs @@ -54,9 +54,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Abyss/OarfishTail.cs b/NPCs/Abyss/OarfishTail.cs index f9bf228a3c..7dbde2561a 100644 --- a/NPCs/Abyss/OarfishTail.cs +++ b/NPCs/Abyss/OarfishTail.cs @@ -54,9 +54,9 @@ namespace CalamityMod.NPCs.Abyss // Check if other segments are still alive, if not, die bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; diff --git a/NPCs/Astral/HiveEnemy.cs b/NPCs/Astral/HiveEnemy.cs index 4bcb6e9171..b4afa4ad95 100644 --- a/NPCs/Astral/HiveEnemy.cs +++ b/NPCs/Astral/HiveEnemy.cs @@ -119,6 +119,8 @@ namespace CalamityMod.NPCs.Astral if (NPC.life <= 0) { int type = ModContent.NPCType(); + + // TODO: Should this use `Main.ActiveNPCs` iterator? for (int i = 0; i < Main.maxNPCs; i++) { if (Main.npc[i].type == type) diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 848c2a6de0..bfcf75df58 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -110,24 +110,21 @@ namespace CalamityMod.NPCs.AstrumAureus // Push away from each other float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < (160f + 30f * (NPC.scale - 1f))) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < (160f + 30f * (NPC.scale - 1f))) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X = NPC.velocity.X - pushVelocity; - else - NPC.velocity.X = NPC.velocity.X + pushVelocity; + if (NPC.position.X < n.position.X) + NPC.velocity.X = NPC.velocity.X - pushVelocity; + else + NPC.velocity.X = NPC.velocity.X + pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y = NPC.velocity.Y - pushVelocity; - else - NPC.velocity.Y = NPC.velocity.Y + pushVelocity; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y = NPC.velocity.Y - pushVelocity; + else + NPC.velocity.Y = NPC.velocity.Y + pushVelocity; } } } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 4e0f3ff8a2..18b8869295 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -237,10 +237,9 @@ namespace CalamityMod.NPCs.AstrumDeus return; // Killing ANY split Deus makes all other Deus heads die immediately. - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC otherWormHead in Main.ActiveNPCs) { - NPC otherWormHead = Main.npc[i]; - if (otherWormHead.active && otherWormHead.type == NPC.type) + if (otherWormHead.type == NPC.type) { // Kill the other worm head after setting it to not drop loot. otherWormHead.Calamity().newAI[0] = 0f; diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index bb7d4fa158..922f6464ed 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -196,24 +196,21 @@ namespace CalamityMod.NPCs.BrimstoneElemental // Push away from other Brimlings float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 40f * NPC.scale) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 40f * NPC.scale) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; + if (NPC.position.X < n.position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } } } diff --git a/NPCs/CalClone/CalScreenShaderData.cs b/NPCs/CalClone/CalScreenShaderData.cs index 11ee4782e0..af7b7ada08 100644 --- a/NPCs/CalClone/CalScreenShaderData.cs +++ b/NPCs/CalClone/CalScreenShaderData.cs @@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.CalClone return; } CalIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == CalType) + if (n.type == CalType) { - CalIndex = i; + CalIndex = n.whoAmI; break; } } diff --git a/NPCs/CalClone/CalSky.cs b/NPCs/CalClone/CalSky.cs index e7d242d4d0..21beea7407 100644 --- a/NPCs/CalClone/CalSky.cs +++ b/NPCs/CalClone/CalSky.cs @@ -52,11 +52,11 @@ namespace CalamityMod.NPCs.CalClone return true; } CalIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == CalType) + if (n.type == CalType) { - CalIndex = i; + CalIndex = n.whoAmI; break; } } diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index a8fcf6dc2e..e71bdad042 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -336,9 +336,9 @@ namespace CalamityMod.NPCs if (!head) { bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { shouldDespawn = false; break; @@ -3621,12 +3621,8 @@ namespace CalamityMod.NPCs // Despawns the other deus worm segments int bodyID = ModContent.NPCType(); int tailID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC wormseg in Main.ActiveNPCs) { - NPC wormseg = Main.npc[i]; - if (!wormseg.active) - continue; - if ((wormseg.type == bodyID || wormseg.type == tailID) && Main.npc[(int)wormseg.ai[2]].Calamity().newAI[0] != 3f) { wormseg.life = 0; @@ -3804,9 +3800,9 @@ namespace CalamityMod.NPCs { bool shouldDespawn = true; int headType = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].type != headType || !Main.npc[i].active) + if (n.type != headType) continue; shouldDespawn = false; break; @@ -3968,17 +3964,17 @@ namespace CalamityMod.NPCs int tailType = ModContent.NPCType(); if ((double)npc.position.Y < Main.topWorld + 16f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].type == headType || Main.npc[i].type == bodyType || Main.npc[i].type == tailType) + if (n.type == headType || n.type == bodyType || n.type == tailType) { - Main.npc[i].active = false; + n.active = false; - Main.npc[i].netUpdate = true; + n.netUpdate = true; // Prevent netUpdate from being blocked by the spam counter. - if (Main.npc[i].netSpam >= 10) - Main.npc[i].netSpam = 9; + if (n.netSpam >= 10) + n.netSpam = 9; } } } @@ -4693,10 +4689,9 @@ namespace CalamityMod.NPCs // Count up all Dark Energy HP values int totalDarkEnergyHP = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC darkEnergy in Main.ActiveNPCs) { - NPC darkEnergy = Main.npc[i]; - if (darkEnergy.active && darkEnergy.type == ModContent.NPCType()) + if (darkEnergy.type == ModContent.NPCType()) totalDarkEnergyHP += darkEnergy.life; } @@ -5798,18 +5793,17 @@ namespace CalamityMod.NPCs if (npc.ai[0] == 0f || npc.ai[0] == 1f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type) + if (n.whoAmI != npc.whoAmI && n.type == npc.type) { - Vector2 otherSwarmerDirection = Main.npc[i].Center - npc.Center; + Vector2 otherSwarmerDirection = n.Center - npc.Center; if (otherSwarmerDirection.Length() < (npc.width + npc.height)) { otherSwarmerDirection.Normalize(); otherSwarmerDirection *= -0.1f; npc.velocity += otherSwarmerDirection; - NPC nPC6 = Main.npc[i]; - nPC6.velocity -= otherSwarmerDirection; + n.velocity -= otherSwarmerDirection; } } } @@ -7779,11 +7773,11 @@ namespace CalamityMod.NPCs if (!DogPhase1) { bool noYVelocity = npc.velocity.Y == 0f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) + if (n.whoAmI != npc.whoAmI && n.active && n.type == npc.type && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { - if (npc.position.X < Main.npc[i].position.X) + if (npc.position.X < n.position.X) { npc.velocity.X -= 0.05f; } @@ -7791,7 +7785,7 @@ namespace CalamityMod.NPCs { npc.velocity.X += 0.05f; } - if (npc.position.Y < Main.npc[i].position.Y) + if (npc.position.Y < n.position.Y) { npc.velocity.Y -= 0.05f; } diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index c6d2fbd8e3..a8fc97d361 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -1963,9 +1963,9 @@ namespace CalamityMod.NPCs { npc.hide = false; // I'd assume the Drakomire is drawn by the rider if it's present - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == NPCID.SolarDrakomireRider && Main.npc[i].ai[0] == (float)npc.whoAmI) + if (n.type == NPCID.SolarDrakomireRider && n.ai[0] == (float)npc.whoAmI) { npc.hide = true; break; @@ -2065,11 +2065,11 @@ namespace CalamityMod.NPCs dust.customData = npc; } // Adjust velocity based on the other storm drivers who want to pump your face full of bullets - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npcType && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) + if (n.whoAmI != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { - if (npc.position.X < Main.npc[i].position.X) + if (npc.position.X < n.position.X) { npc.velocity.X -= 0.05f; } @@ -2077,7 +2077,7 @@ namespace CalamityMod.NPCs { npc.velocity.X += 0.05f; } - if (npc.position.Y < Main.npc[i].position.Y) + if (npc.position.Y < n.position.Y) { npc.velocity.Y -= 0.05f; } @@ -2172,11 +2172,11 @@ namespace CalamityMod.NPCs npc.velocity.Y += 0.25f; } } - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npcType && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) + if (i != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { - if (npc.position.X < Main.npc[i].position.X) + if (npc.position.X < n.position.X) { npc.velocity.X -= 0.05f; } @@ -2184,7 +2184,7 @@ namespace CalamityMod.NPCs { npc.velocity.X += 0.05f; } - if (npc.position.Y < Main.npc[i].position.Y) + if (npc.position.Y < n.position.Y) { npc.velocity.Y -= 0.05f; } @@ -2248,11 +2248,11 @@ namespace CalamityMod.NPCs { npc.velocity.Y = -8f; } - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npcType && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) + if (i != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { - if (npc.position.X < Main.npc[i].position.X) + if (npc.position.X < n.position.X) { npc.velocity.X -= 0.1f; } @@ -2260,7 +2260,7 @@ namespace CalamityMod.NPCs { npc.velocity.X += 0.1f; } - if (npc.position.Y < Main.npc[i].position.Y) + if (npc.position.Y < n.position.Y) { npc.velocity.Y -= 0.1f; } @@ -7568,11 +7568,11 @@ namespace CalamityMod.NPCs { turnAroundDelayMult = 3; bool noYVelocity = npc.velocity.Y == 0f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) + if (n.whoAmI != npc.whoAmI && n.type == npc.type && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { - if (npc.position.X < Main.npc[i].position.X) + if (npc.position.X < n.position.X) { npc.velocity.X -= 0.05f; } @@ -7580,7 +7580,7 @@ namespace CalamityMod.NPCs { npc.velocity.X += 0.05f; } - if (npc.position.Y < Main.npc[i].position.Y) + if (npc.position.Y < n.position.Y) { npc.velocity.Y -= 0.05f; } @@ -10598,12 +10598,12 @@ namespace CalamityMod.NPCs npc.noTileCollide = true; npc.knockBackResist = 0f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i == npc.whoAmI || !Main.npc[i].active || Main.npc[i].type != npc.type) + if (i == npc.whoAmI || n.type != npc.type) continue; - Vector2 targetDirection = Main.npc[i].Center - npc.Center; + Vector2 targetDirection = n.Center - npc.Center; if (!(targetDirection.Length() < 50f)) continue; @@ -10618,8 +10618,7 @@ namespace CalamityMod.NPCs targetDirection *= 0.4f; npc.velocity -= targetDirection; - NPC nPC = Main.npc[i]; - nPC.velocity += targetDirection; + n.velocity += targetDirection; } if (npc.type == NPCID.ShadowFlameApparition) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 670ba70021..042b1a19db 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -2024,11 +2024,11 @@ namespace CalamityMod.NPCs internal static void SplittingWormBroadcastInteraction(NPC npc, int player, int head, int body, int tail) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == head || Main.npc[i].type == body || Main.npc[i].type == tail)) + if (n.whoAmI != npc.whoAmI && (n.type == head || n.type == body || n.type == tail)) { - Main.npc[i].ApplyInteraction(player); + n.ApplyInteraction(player); } } } @@ -2098,9 +2098,9 @@ namespace CalamityMod.NPCs bool CheckSegments(int head, int body, int tail) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == head || Main.npc[i].type == body || Main.npc[i].type == tail)) + if (n.whoAmI != npc.whoAmI && (n.type == head || n.type == body || n.type == tail)) { return false; } diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index a4e7110938..fc200219e1 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -94,24 +94,21 @@ namespace CalamityMod.NPCs.Crabulon if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) { float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 30f * NPC.scale) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 30f * NPC.scale) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; + if (NPC.position.X < n.position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } } } diff --git a/NPCs/DesertScourge/DesertNuisanceBody.cs b/NPCs/DesertScourge/DesertNuisanceBody.cs index 0b2b291868..8e3c8e3aaf 100644 --- a/NPCs/DesertScourge/DesertNuisanceBody.cs +++ b/NPCs/DesertScourge/DesertNuisanceBody.cs @@ -59,15 +59,7 @@ namespace CalamityMod.NPCs.DesertScourge if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DesertScourge/DesertNuisanceTail.cs b/NPCs/DesertScourge/DesertNuisanceTail.cs index 4d71065aab..45b9df16d2 100644 --- a/NPCs/DesertScourge/DesertNuisanceTail.cs +++ b/NPCs/DesertScourge/DesertNuisanceTail.cs @@ -59,15 +59,7 @@ namespace CalamityMod.NPCs.DesertScourge if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index 3154b76c7e..baa9a5683b 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -75,15 +75,7 @@ namespace CalamityMod.NPCs.DesertScourge if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index cf3751c621..2a5825cfdb 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -74,15 +74,7 @@ namespace CalamityMod.NPCs.DesertScourge if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.cs b/NPCs/DevourerofGods/CosmicGuardianBody.cs index f9eda53cda..7cb2fde750 100644 --- a/NPCs/DevourerofGods/CosmicGuardianBody.cs +++ b/NPCs/DevourerofGods/CosmicGuardianBody.cs @@ -80,15 +80,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.cs b/NPCs/DevourerofGods/CosmicGuardianHead.cs index 24aa6058cd..c86d5ae48a 100644 --- a/NPCs/DevourerofGods/CosmicGuardianHead.cs +++ b/NPCs/DevourerofGods/CosmicGuardianHead.cs @@ -186,11 +186,11 @@ namespace CalamityMod.NPCs.DevourerofGods else if (increaseSpeed) velocityMult *= 2f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && (Main.npc[i].type == NPC.type || Main.npc[i].type == ModContent.NPCType()) && i != NPC.whoAmI) + if ((n.type == NPC.type || n.type == ModContent.NPCType()) && n.whoAmI != NPC.whoAmI) { - Vector2 distFromHead = Main.npc[i].Center - NPC.Center; + Vector2 distFromHead = n.Center - NPC.Center; if (distFromHead.Length() < 400f) { distFromHead.Normalize(); diff --git a/NPCs/DevourerofGods/CosmicGuardianTail.cs b/NPCs/DevourerofGods/CosmicGuardianTail.cs index f7688b5818..d17f3d3dfb 100644 --- a/NPCs/DevourerofGods/CosmicGuardianTail.cs +++ b/NPCs/DevourerofGods/CosmicGuardianTail.cs @@ -77,15 +77,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 4d138aa544..d6171d5278 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -185,15 +185,7 @@ namespace CalamityMod.NPCs.DevourerofGods Player player = Main.player[NPC.target]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index aa673bc98f..2c8849bc94 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -2392,20 +2392,20 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.netSpam >= 10) NPC.netSpam = 9; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == ModContent.NPCType())) + if (n.type == ModContent.NPCType() || n.type == ModContent.NPCType()) { - Main.npc[i].position = newPosition; + n.position = newPosition; - if (Main.npc[i].type == ModContent.NPCType()) - ((DevourerofGodsTail)Main.npc[i].ModNPC).setInvulTime(720); + if (n.type == ModContent.NPCType()) + ((DevourerofGodsTail)n.ModNPC).setInvulTime(720); - Main.npc[i].netUpdate = true; + n.netUpdate = true; // Prevent netUpdate from being blocked by the spam counter. - if (Main.npc[i].netSpam >= 10) - Main.npc[i].netSpam = 9; + if (n.netSpam >= 10) + n.netSpam = 9; } } @@ -2436,28 +2436,28 @@ namespace CalamityMod.NPCs.DevourerofGods ModContent.NPCType(), ModContent.NPCType() }; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (segments.Contains(Main.npc[i].type) && Main.npc[i].active && - (Main.npc[i].type == segments[1] || Main.npc[i].ModNPC().SegmentIndex == index)) + if (segments.Contains(n.type) && n.active && + (n.type == segments[1] || n.ModNPC().SegmentIndex == index)) { for (int j = 0; j < 20; j++) { - Dust cosmicBurst = Dust.NewDustPerfect(Main.npc[i].Center + Main.rand.NextVector2Circular(25f, 25f), 234); + Dust cosmicBurst = Dust.NewDustPerfect(n.Center + Main.rand.NextVector2Circular(25f, 25f), 234); cosmicBurst.scale = 1.7f; cosmicBurst.velocity = Main.rand.NextVector2Circular(9f, 9f); cosmicBurst.noGravity = true; } - Main.npc[i].life = 0; - Main.npc[i].HitEffect(); - Main.npc[i].active = false; + n.life = 0; + n.HitEffect(); + n.active = false; - Main.npc[i].netUpdate = true; + n.netUpdate = true; // Prevent netUpdate from being blocked by the spam counter. - if (Main.npc[i].netSpam >= 10) - Main.npc[i].netSpam = 9; + if (n.netSpam >= 10) + n.netSpam = 9; destroyedSegments++; break; diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 1387a0a641..adff984ff5 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -194,15 +194,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.takenDamageMultiplier = 1.25f; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/DevourerofGods/DoGScreenShaderData.cs b/NPCs/DevourerofGods/DoGScreenShaderData.cs index 2dd556a00a..4b61cae155 100644 --- a/NPCs/DevourerofGods/DoGScreenShaderData.cs +++ b/NPCs/DevourerofGods/DoGScreenShaderData.cs @@ -23,11 +23,11 @@ namespace CalamityMod.NPCs.DevourerofGods return; } DoGIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == DoGType) + if (n.type == DoGType) { - DoGIndex = i; + DoGIndex = n.whoAmI; break; } } diff --git a/NPCs/DevourerofGods/DoGSky.cs b/NPCs/DevourerofGods/DoGSky.cs index e6a5f12315..a904aedbbb 100644 --- a/NPCs/DevourerofGods/DoGSky.cs +++ b/NPCs/DevourerofGods/DoGSky.cs @@ -62,11 +62,11 @@ namespace CalamityMod.NPCs.DevourerofGods return true; } DoGIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == DoGType) + if (n.type == DoGType) { - DoGIndex = i; + DoGIndex = n.whoAmI; break; } } diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 25d9ae45d9..08756dcd9f 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -1744,10 +1744,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo public override bool CheckDead() { // Kill Artemis if he's still alive when Apollo dies - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; - if (nPC.active && nPC.type == ModContent.NPCType() && nPC.life > 0) + if (nPC.type == ModContent.NPCType() && nPC.life > 0) { nPC.life = 0; nPC.HitEffect(); diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index 43ef3dad83..5c4b401b65 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -1579,10 +1579,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override bool CheckDead() { // Kill Apollo if he's still alive when Artemis dies - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; - if (nPC.active && nPC.type == ModContent.NPCType() && nPC.life > 0) + if (nPC.type == ModContent.NPCType() && nPC.life > 0) { nPC.life = 0; nPC.HitEffect(); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 246be4a731..c550341121 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -141,15 +141,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos bool expertMode = Main.expertMode || bossRush; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index cb09c1182b..c8a528fe70 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -139,15 +139,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos bool expertMode = Main.expertMode || bossRush; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 267eed162d..7f9eff19e8 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -139,15 +139,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos bool expertMode = Main.expertMode || bossRush; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/Leviathan/AquaticAberration.cs b/NPCs/Leviathan/AquaticAberration.cs index 4d238e6259..1c50389895 100644 --- a/NPCs/Leviathan/AquaticAberration.cs +++ b/NPCs/Leviathan/AquaticAberration.cs @@ -223,24 +223,21 @@ namespace CalamityMod.NPCs.Leviathan if (death) { float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 80f * NPC.scale) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 80f * NPC.scale) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; + if (NPC.position.X < n.position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } } } diff --git a/NPCs/Leviathan/LevScreenShaderData.cs b/NPCs/Leviathan/LevScreenShaderData.cs index 2cd7258460..7e19bb5df7 100644 --- a/NPCs/Leviathan/LevScreenShaderData.cs +++ b/NPCs/Leviathan/LevScreenShaderData.cs @@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.Leviathan return; } LevIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == LevType) + if (n.type == LevType) { - LevIndex = i; + LevIndex = n.whoAmI; break; } } diff --git a/NPCs/Leviathan/LevSky.cs b/NPCs/Leviathan/LevSky.cs index 5ee402bbb5..034ee8f27e 100644 --- a/NPCs/Leviathan/LevSky.cs +++ b/NPCs/Leviathan/LevSky.cs @@ -67,11 +67,11 @@ namespace CalamityMod.NPCs.Leviathan return true; } LevIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == LevType) + if (n.type == LevType) { - LevIndex = i; + LevIndex = n.whoAmI; break; } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index 0a3b9e0fb0..0ee61efc05 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -77,10 +77,9 @@ namespace CalamityMod.NPCs.NormalNPCs else { // find a new npc to attatch to in gfb, it's not a bug, it's a feature:tm: - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC host in Main.ActiveNPCs) { - NPC host = Main.npc[i]; - if (host.active && !host.friendly && !host.dontTakeDamage && host.type != ModContent.NPCType() && host.type != ModContent.NPCType() && host.type != ModContent.NPCType()) + if (!host.friendly && !host.dontTakeDamage && host.type != ModContent.NPCType() && host.type != ModContent.NPCType() && host.type != ModContent.NPCType()) { NPC.ai[1] = host.whoAmI; NPC.ai[3] = host.whoAmI; From e2628cd0964b12ae20c820da489e0a0bfa44f508 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Sun, 5 May 2024 16:19:16 +0500 Subject: [PATCH 049/197] Yawn --- NPCs/CalamityAI.cs | 10 +--- NPCs/NormalNPCs/PlanterasFreeTentacle.cs | 25 ++++---- NPCs/NormalNPCs/WulfrumAmplifier.cs | 6 +- NPCs/OldDuke/OldDukeToothBall.cs | 25 ++++---- NPCs/OldDuke/SulphurousSharkron.cs | 25 ++++---- NPCs/Perforator/PerforatorBodyLarge.cs | 10 +--- NPCs/Perforator/PerforatorBodySmall.cs | 10 +--- NPCs/Perforator/PerforatorHeadMedium.cs | 5 +- NPCs/Perforator/PerforatorTailLarge.cs | 10 +--- NPCs/Perforator/PerforatorTailSmall.cs | 10 +--- .../PbGScreenShaderData.cs | 10 +--- NPCs/PlaguebringerGoliath/PbGSky.cs | 10 +--- NPCs/Polterghast/PolterPhantom.cs | 8 +-- NPCs/Polterghast/Polterghast.cs | 8 +-- NPCs/Polterghast/PolterghastHook.cs | 4 +- NPCs/PrimordialWyrm/PrimordialWyrmBody.cs | 10 +--- NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs | 10 +--- NPCs/PrimordialWyrm/PrimordialWyrmTail.cs | 10 +--- NPCs/ProfanedGuardians/ProfanedRocks.cs | 32 +++++----- NPCs/Ravager/RavagerBody.cs | 24 ++++---- NPCs/Signus/SignusScreenShaderData.cs | 12 +--- NPCs/Signus/SignusSky.cs | 10 +--- NPCs/SlimeGod/SlimeGodCore.cs | 11 ++-- NPCs/StormWeaver/StormWeaverBody.cs | 10 +--- NPCs/StormWeaver/StormWeaverTail.cs | 10 +--- NPCs/SunkenSea/SeaSerpent2.cs | 10 +--- NPCs/SunkenSea/SeaSerpent3.cs | 10 +--- NPCs/SunkenSea/SeaSerpent4.cs | 10 +--- NPCs/SunkenSea/SeaSerpent5.cs | 10 +--- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 3 +- .../Bosses/BrainOfCthulhuAI.cs | 25 ++++---- NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs | 10 ++-- .../VanillaNPCOverrides/Bosses/DestroyerAI.cs | 18 ++---- NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs | 59 ++++++++----------- NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs | 14 ++--- .../VanillaNPCOverrides/Bosses/SkeletronAI.cs | 7 +-- .../Bosses/SkeletronPrimeAI.cs | 3 +- NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs | 18 +++--- NPCs/Yharon/YScreenShader.cs | 10 +--- NPCs/Yharon/YSky.cs | 10 +--- Projectiles/CalamityGlobalProjectile.cs | 12 ++-- .../Damageable/DamageableProjectile.cs | 12 ++-- .../HydraulicVoltCrasherProjectile.cs | 12 ++-- .../DraedonsArsenal/PulsePistolShot.cs | 10 ++-- Projectiles/DraedonsArsenal/PulseRifleShot.cs | 8 +-- Projectiles/Magic/ArtAttackStar.cs | 16 ++--- Projectiles/Magic/BlindingLight.cs | 7 +-- Projectiles/Melee/AtaraxiaHoming.cs | 14 ++--- Projectiles/Melee/Cyclone.cs | 3 +- Projectiles/Rogue/AlphaSeeker.cs | 7 +-- Projectiles/Rogue/DynamicPursuerProjectile.cs | 10 ++-- Projectiles/Rogue/MeteorFistStealth.cs | 5 +- Projectiles/Summon/ApexShark.cs | 3 +- Projectiles/Summon/AquasScepterCloud.cs | 4 +- .../Typeless/ArtifactOfResilienceShards.cs | 15 +++-- UI/VanillaBossBars/AstrumDeusBossBar.cs | 21 ++----- UI/VanillaBossBars/CeaselessVoidBossBar.cs | 11 ++-- UI/VanillaBossBars/CryogenBossBar.cs | 9 ++- UI/VanillaBossBars/ExoMechsBossBar.cs | 11 ++-- UI/VanillaBossBars/LeviathanAnahitaBossBar.cs | 5 +- UI/VanillaBossBars/RavagerBossBar.cs | 21 ++----- UI/VanillaBossBars/SlimeGodBossBar.cs | 9 ++- Utilities/ProjectileUtils.cs | 20 +++---- 63 files changed, 273 insertions(+), 504 deletions(-) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index e71bdad042..2fa37d76a2 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -3664,11 +3664,8 @@ namespace CalamityMod.NPCs // Mark all existing body and tail segments as inactive. This instantly frees up their NPC slots for the freshly spawned worms. int bodyID = ModContent.NPCType(); int tailID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var wormseg in Main.ActiveNPCs) { - NPC wormseg = Main.npc[i]; - if (!wormseg.active) - continue; if (wormseg.type == bodyID || wormseg.type == tailID) { wormseg.life = 0; @@ -4707,10 +4704,9 @@ namespace CalamityMod.NPCs SoundEngine.PlaySound(SoundID.NPCDeath44, npc.Center); // Kill all Dark Energies - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var darkEnergy in Main.ActiveNPCs) { - NPC darkEnergy = Main.npc[i]; - if (darkEnergy.active && darkEnergy.type == ModContent.NPCType()) + if (darkEnergy.type == ModContent.NPCType()) { darkEnergy.HitEffect(); darkEnergy.active = false; diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs index 705e426cab..89a05197aa 100644 --- a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -163,24 +163,21 @@ namespace CalamityMod.NPCs.NormalNPCs } float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 40f * NPC.scale) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 40f * NPC.scale) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; + if (NPC.position.X < n.position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } } } diff --git a/NPCs/NormalNPCs/WulfrumAmplifier.cs b/NPCs/NormalNPCs/WulfrumAmplifier.cs index 2e889b8e30..74b070ed1b 100644 --- a/NPCs/NormalNPCs/WulfrumAmplifier.cs +++ b/NPCs/NormalNPCs/WulfrumAmplifier.cs @@ -156,12 +156,8 @@ namespace CalamityMod.NPCs.NormalNPCs } } - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var npcAtIndex in Main.ActiveNPCs) { - NPC npcAtIndex = Main.npc[i]; - if (!npcAtIndex.active) - continue; - // For some strange reason, the Wulfrum enemies are not counted when SuperchargableEnemies is a static list declared up front. // What I assume is going on is that it hasn't been loaded yet since it's later alphabetically (Amplifier is before the other enemies). if (!SuperchargableEnemies.Contains(npcAtIndex.type) && npcAtIndex.type != ModContent.NPCType()) diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index 88cd360c59..8f06afed12 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -143,24 +143,21 @@ namespace CalamityMod.NPCs.OldDuke NPC.velocity.Y = (NPC.velocity.Y * inertia + targetYDist) / (inertia + 1f); float toothBallAccel = bossRush ? 0.65f : 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 48f) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 48f) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= toothBallAccel; - else - NPC.velocity.X += toothBallAccel; + if (NPC.position.X < n.position.X) + NPC.velocity.X -= toothBallAccel; + else + NPC.velocity.X += toothBallAccel; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= toothBallAccel; - else - NPC.velocity.Y += toothBallAccel; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= toothBallAccel; + else + NPC.velocity.Y += toothBallAccel; } } } diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index d75a67bd55..befa2189c9 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -184,24 +184,21 @@ namespace CalamityMod.NPCs.OldDuke } float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 160f) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 160f) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; + if (NPC.position.X < n.position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } } } diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index b75c658e6d..23c19425d7 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -68,15 +68,7 @@ namespace CalamityMod.NPCs.Perforator if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(true); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 8cacdd5260..621ecd5f0e 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -68,15 +68,7 @@ namespace CalamityMod.NPCs.Perforator if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(true); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 5b958674a2..dd630d549e 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -484,11 +484,12 @@ namespace CalamityMod.NPCs.Perforator } } - for (int i = 0; i < Main.maxNPCs; i++) + // ???? + /*for (int i = 0; i < Main.maxNPCs; i++) { if (i != NPC.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPC.type || Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == ModContent.NPCType())) return; - } + }*/ } public override void BossLoot(ref string name, ref int potionType) diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index decd23463b..2561093d85 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -68,15 +68,7 @@ namespace CalamityMod.NPCs.Perforator if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(true); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index f64eadc007..f7dfa409d6 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -68,15 +68,7 @@ namespace CalamityMod.NPCs.Perforator if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(true); - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/PlaguebringerGoliath/PbGScreenShaderData.cs b/NPCs/PlaguebringerGoliath/PbGScreenShaderData.cs index 004be2aa36..c7c11f361a 100644 --- a/NPCs/PlaguebringerGoliath/PbGScreenShaderData.cs +++ b/NPCs/PlaguebringerGoliath/PbGScreenShaderData.cs @@ -22,15 +22,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath { return; } - PbGIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == PbGType) - { - PbGIndex = i; - break; - } - } + PbGIndex = NPC.FindFirstNPC(PbGType); } public override void Update(GameTime gameTime) diff --git a/NPCs/PlaguebringerGoliath/PbGSky.cs b/NPCs/PlaguebringerGoliath/PbGSky.cs index 7ac452626c..994450eea1 100644 --- a/NPCs/PlaguebringerGoliath/PbGSky.cs +++ b/NPCs/PlaguebringerGoliath/PbGSky.cs @@ -51,15 +51,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath { return true; } - PbGIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == PbGType) - { - PbGIndex = i; - break; - } - } + PbGIndex = NPC.FindFirstNPC(PbGType); //this.DoGIndex = DoGIndex; return PbGIndex != -1; } diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index d6f60702e6..629c998c72 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -199,12 +199,12 @@ namespace CalamityMod.NPCs.Polterghast float movementLimitX = 0f; float movementLimitY = 0f; int numHooks = 4; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { - movementLimitX += Main.npc[i].Center.X; - movementLimitY += Main.npc[i].Center.Y; + movementLimitX += n.Center.X; + movementLimitY += n.Center.Y; } } movementLimitX /= numHooks; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 05f9fa0d76..daec971879 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -446,12 +446,12 @@ namespace CalamityMod.NPCs.Polterghast float movementLimitX = 0f; float movementLimitY = 0f; int numHooks = 4; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) { - movementLimitX += Main.npc[i].Center.X; - movementLimitY += Main.npc[i].Center.Y; + movementLimitX += n.Center.X; + movementLimitY += n.Center.Y; } } movementLimitX /= numHooks; diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index 3966ad294b..d1c5cd53ad 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -220,9 +220,9 @@ namespace CalamityMod.NPCs.Polterghast if (!despawnBoost && NPC.localAI[0] <= 0f && NPC.ai[0] != 0f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (i != NPC.whoAmI && Main.npc[i].active && Main.npc[i].type == NPC.type && (Main.npc[i].velocity.X != 0f || Main.npc[i].velocity.Y != 0f)) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type && (n.velocity.X != 0f || n.velocity.Y != 0f)) NPC.localAI[0] = 180f; } } diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs b/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs index f36e27e98e..43a2b244b9 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs @@ -68,16 +68,8 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive. If not, die. - bool shouldDespawn = true; int wyrmHeadID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == wyrmHeadID) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(wyrmHeadID); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs b/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs index f4263b6cde..fd3fe2856d 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs @@ -68,16 +68,8 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive. If not, die. - bool shouldDespawn = true; int wyrmHeadID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == wyrmHeadID) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(wyrmHeadID); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs b/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs index 2a4545fa9b..1c5d5c4b9c 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs @@ -57,16 +57,8 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive. If not, die. - bool shouldDespawn = true; int wyrmHeadID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == wyrmHeadID) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(wyrmHeadID); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/ProfanedGuardians/ProfanedRocks.cs b/NPCs/ProfanedGuardians/ProfanedRocks.cs index 4919b3fdf2..64287f2492 100644 --- a/NPCs/ProfanedGuardians/ProfanedRocks.cs +++ b/NPCs/ProfanedGuardians/ProfanedRocks.cs @@ -218,29 +218,25 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (death) { float pushVelocity = bossRush ? 0.2f : 0.15f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != NPC.whoAmI && n.type == NPC.type) { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + if (Vector2.Distance(NPC.Center, n.Center) < 160f) { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 160f) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; - - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } - - // Slow down so they don't push away from each other too far + if (NPC.position.X < n.position.X) + NPC.velocity.X -= pushVelocity; else - NPC.velocity *= 0.95f; + NPC.velocity.X += pushVelocity; + + if (NPC.position.Y < n.position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; } + // Slow down so they don't push away from each other too far + else + NPC.velocity *= 0.95f; } } } diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 49b2079dd2..33aa22f20e 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -192,19 +192,19 @@ namespace CalamityMod.NPCs.Ravager bool leftClawActive = false; bool freeHeadActive = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) headActive = true; - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) rightClawActive = true; - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) leftClawActive = true; - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) rightLegActive = true; - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) leftLegActive = true; - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType()) freeHeadActive = true; } @@ -603,13 +603,13 @@ namespace CalamityMod.NPCs.Ravager if (expertMode) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].type == ModContent.NPCType() && Main.npc[i].ai[0] == 0f) + if (n.type == ModContent.NPCType() && n.ai[0] == 0f) { - Main.npc[i].ai[1] = -1f; - Main.npc[i].direction = NPC.direction; - Main.npc[i].netUpdate = true; + n.ai[1] = -1f; + n.direction = NPC.direction; + n.netUpdate = true; } } diff --git a/NPCs/Signus/SignusScreenShaderData.cs b/NPCs/Signus/SignusScreenShaderData.cs index 32af221316..a2fa44c859 100644 --- a/NPCs/Signus/SignusScreenShaderData.cs +++ b/NPCs/Signus/SignusScreenShaderData.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.Graphics.Shaders; using Terraria.ModLoader; @@ -20,15 +20,7 @@ namespace CalamityMod.NPCs.Signus { return; } - SignusIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == SignusType) - { - SignusIndex = i; - break; - } - } + SignusIndex = NPC.FindFirstNPC(SignusType); } public override void Apply() diff --git a/NPCs/Signus/SignusSky.cs b/NPCs/Signus/SignusSky.cs index fe449714bb..a128b08f8c 100644 --- a/NPCs/Signus/SignusSky.cs +++ b/NPCs/Signus/SignusSky.cs @@ -60,15 +60,7 @@ namespace CalamityMod.NPCs.Signus { return true; } - SignusIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == SignusType) - { - SignusIndex = i; - break; - } - } + SignusIndex = NPC.FindFirstNPC(SignusType); return SignusIndex != -1; } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index ca478c3440..e8fc58c69f 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -486,19 +486,16 @@ namespace CalamityMod.NPCs.SlimeGod float ignoreAllSlimesDistanceThreshold = 3200f; // Find all slimes within a generous area. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - int npcType = Main.npc[i].type; + int npcType = n.type; if (npcType != largeCrimulanPaladin && npcType != splitCrimulanPaladin && npcType != largeEbonianPaladin && npcType != splitEbonianPaladin) continue; - if (!Main.npc[i].active) + if (!NPC.WithinRange(n.Center, ignoreAllSlimesDistanceThreshold)) continue; - if (!NPC.WithinRange(Main.npc[i].Center, ignoreAllSlimesDistanceThreshold)) - continue; - - largeSlimes.Add(Main.npc[i]); + largeSlimes.Add(n); } // If no slimes were found, don't bother doing any more calculations. Just use the player's center. diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index db749693ef..5198d9fc16 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -158,15 +158,7 @@ namespace CalamityMod.NPCs.StormWeaver } // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 3ff0f7a02e..44746cc8e0 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -150,15 +150,7 @@ namespace CalamityMod.NPCs.StormWeaver } // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/SunkenSea/SeaSerpent2.cs b/NPCs/SunkenSea/SeaSerpent2.cs index fc7e14a9cb..693213f08b 100644 --- a/NPCs/SunkenSea/SeaSerpent2.cs +++ b/NPCs/SunkenSea/SeaSerpent2.cs @@ -56,15 +56,7 @@ namespace CalamityMod.NPCs.SunkenSea NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/SunkenSea/SeaSerpent3.cs b/NPCs/SunkenSea/SeaSerpent3.cs index 7c8873f0fa..56e8ecbeac 100644 --- a/NPCs/SunkenSea/SeaSerpent3.cs +++ b/NPCs/SunkenSea/SeaSerpent3.cs @@ -54,15 +54,7 @@ namespace CalamityMod.NPCs.SunkenSea NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/SunkenSea/SeaSerpent4.cs b/NPCs/SunkenSea/SeaSerpent4.cs index 9442d632d8..10f15960c0 100644 --- a/NPCs/SunkenSea/SeaSerpent4.cs +++ b/NPCs/SunkenSea/SeaSerpent4.cs @@ -54,15 +54,7 @@ namespace CalamityMod.NPCs.SunkenSea NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/SunkenSea/SeaSerpent5.cs b/NPCs/SunkenSea/SeaSerpent5.cs index 6728bd8461..996d81e0ed 100644 --- a/NPCs/SunkenSea/SeaSerpent5.cs +++ b/NPCs/SunkenSea/SeaSerpent5.cs @@ -54,15 +54,7 @@ namespace CalamityMod.NPCs.SunkenSea NPC.realLife = (int)NPC.ai[2]; // Check if other segments are still alive, if not, die - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); if (!shouldDespawn) { if (NPC.ai[1] <= 0f) diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index 9455c06678..a21e98db49 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -137,9 +137,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas int shootRate = BossRushEvent.BossRushActive ? 120 : 180; if (timer > shootRate) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC seeker in Main.ActiveNPCs) { - NPC seeker = Main.npc[i]; if (seeker.type == NPC.type) { if (seeker == NPC) diff --git a/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs index 9df41cebe8..a955f87ac5 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs @@ -649,24 +649,21 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (death) { float pushVelocity = 0.5f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != npc.whoAmI && n.type == npc.type) { - if (i != npc.whoAmI && Main.npc[i].type == npc.type) + if (Vector2.Distance(npc.Center, n.Center) < 48f) { - if (Vector2.Distance(npc.Center, Main.npc[i].Center) < 48f) - { - if (npc.position.X < Main.npc[i].position.X) - npc.velocity.X -= pushVelocity; - else - npc.velocity.X += pushVelocity; + if (npc.position.X < n.position.X) + npc.velocity.X -= pushVelocity; + else + npc.velocity.X += pushVelocity; - if (npc.position.Y < Main.npc[i].position.Y) - npc.velocity.Y -= pushVelocity; - else - npc.velocity.Y += pushVelocity; - } + if (npc.position.Y < n.position.Y) + npc.velocity.Y -= pushVelocity; + else + npc.velocity.Y += pushVelocity; } } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index c174ecf722..582442d7ef 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -500,10 +500,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if ((int)(npc.ai[1] - 4f) / fireballFireRate == 2) { List list4 = new List(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == NPCID.CultistBossClone && Main.npc[i].ai[3] == npc.whoAmI) - list4.Add(i); + if (n.type == NPCID.CultistBossClone && n.ai[3] == npc.whoAmI) + list4.Add(n.whoAmI); } if (Main.netMode != NetmodeID.MultiplayerClient) @@ -822,9 +822,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if ((int)(npc.ai[1] - 4f) / ancientLightSpawnRate == 2) { List list7 = new List(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].type == NPCID.CultistBossClone && Main.npc[i].ai[3] == npc.whoAmI) + if (n.type == NPCID.CultistBossClone && n.ai[3] == npc.whoAmI) list7.Add(i); } diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index a6ff1b17e3..169f5c1f4e 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -121,15 +121,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Check if other segments are still alive, if not, die if (npc.type > NPCID.TheDestroyer) { - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == NPCID.TheDestroyer) - { - shouldDespawn = false; - break; - } - } + bool shouldDespawn = !NPC.AnyNPCs(NPCID.TheDestroyer); if (!shouldDespawn) { if (npc.ai[1] <= 0f) @@ -696,17 +688,17 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses probeTargetY *= distanceFromTarget; } - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type) + if (n.whoAmI != npc.whoAmI && n.type == npc.type) { - Vector2 otherProbeDist = Main.npc[i].Center - npc.Center; + Vector2 otherProbeDist = n.Center - npc.Center; if (otherProbeDist.Length() < (npc.width + npc.height)) { otherProbeDist = otherProbeDist.SafeNormalize(Vector2.UnitY); otherProbeDist *= -0.1f; npc.velocity += otherProbeDist; - Main.npc[i].velocity -= otherProbeDist; + n.velocity -= otherProbeDist; } } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs index b148838e04..bd5e272b70 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs @@ -443,10 +443,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.HitEffect(0, 1337.0); npc.checkDead(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC5 in Main.ActiveNPCs) { - NPC nPC5 = Main.npc[i]; - if (nPC5.active && (nPC5.type == NPCID.MoonLordHand || nPC5.type == NPCID.MoonLordHead)) + if (nPC5.type == NPCID.MoonLordHand || nPC5.type == NPCID.MoonLordHead) { nPC5.active = false; if (Main.netMode != NetmodeID.MultiplayerClient) @@ -509,10 +508,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (npc.ai[1] >= 60f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC5 in Main.ActiveNPCs) { - NPC nPC5 = Main.npc[i]; - if (nPC5.active && (nPC5.type == NPCID.MoonLordFreeEye || nPC5.type == NPCID.MoonLordHand || nPC5.type == NPCID.MoonLordHead)) + if (nPC5.type == NPCID.MoonLordFreeEye || nPC5.type == NPCID.MoonLordHand || nPC5.type == NPCID.MoonLordHead) { nPC5.active = false; if (Main.netMode != NetmodeID.MultiplayerClient) @@ -584,13 +582,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses Main.npc[(int)npc.localAI[2]].netUpdate = true; } - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC7 in Main.ActiveNPCs) { - NPC nPC7 = Main.npc[i]; if (nPC7.active && nPC7.type == NPCID.MoonLordFreeEye) { - NPC nPC6 = nPC7; - nPC6.position += value8; + nPC7.position += value8; nPC7.netUpdate = true; } } @@ -1594,26 +1590,23 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (eyeCount > 1) { int eyesSynced = 1; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active) + if (n.whoAmI != npc.whoAmI && n.type == npc.type) { - if (i != npc.whoAmI && Main.npc[i].type == npc.type) - { - Main.npc[i].ai[0] = 0f; - Main.npc[i].ai[1] = 0f; - Main.npc[i].ai[2] = 0f; - Main.npc[i].localAI[0] = 0f; - Main.npc[i].localAI[1] = 0f; - Main.npc[i].localAI[2] = 0f; - calamityGlobalNPC.newAI[0] = 1f; - calamityGlobalNPC.newAI[1] = 0f; - npc.netUpdate = true; + n.ai[0] = 0f; + n.ai[1] = 0f; + n.ai[2] = 0f; + n.localAI[0] = 0f; + n.localAI[1] = 0f; + n.localAI[2] = 0f; + calamityGlobalNPC.newAI[0] = 1f; + calamityGlobalNPC.newAI[1] = 0f; + npc.netUpdate = true; - eyesSynced++; - if (eyesSynced >= eyeCount) - break; - } + eyesSynced++; + if (eyesSynced >= eyeCount) + break; } } } @@ -2151,14 +2144,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses int rightHandHeal = -1; int headHeal = headNPCType; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].ai[3] == k) + if (n.ai[3] == k) { - if (leftHandHeal == -1 && Main.npc[i].type == NPCID.MoonLordHand && Main.npc[i].ai[2] == 0f) - leftHandHeal = i; - if (rightHandHeal == -1 && Main.npc[i].type == NPCID.MoonLordHand && Main.npc[i].ai[2] == 1f) - rightHandHeal = i; + if (leftHandHeal == -1 && n.type == NPCID.MoonLordHand && n.ai[2] == 0f) + leftHandHeal = n.whoAmI; + if (rightHandHeal == -1 && n.type == NPCID.MoonLordHand && n.ai[2] == 1f) + rightHandHeal = n.whoAmI; if (leftHandHeal != -1 && rightHandHeal != -1 && headHeal != -1) break; } diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index c4479e2103..75c8d4c46a 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -97,13 +97,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float hookPositionX = 0f; float hookPositionY = 0f; int numHooksSpawned = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].aiStyle == NPCAIStyleID.PlanteraHook) + if (n.aiStyle == NPCAIStyleID.PlanteraHook) { - hookPositionX += Main.npc[i].Center.X; - hookPositionY += Main.npc[i].Center.Y; - hookArray[numHooksSpawned] = i; + hookPositionX += n.Center.X; + hookPositionY += n.Center.Y; + hookArray[numHooksSpawned] = n.whoAmI; numHooksSpawned++; if (numHooksSpawned >= maxHooks) @@ -846,9 +846,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Set timer to new amount if a different hook is currently moving if (!despawn && npc.localAI[0] <= 0f && npc.ai[0] != 0f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && (Main.npc[i].velocity.X != 0f || Main.npc[i].velocity.Y != 0f)) + if (n.whoAmI != npc.whoAmI && n.type == npc.type && (n.velocity.X != 0f || n.velocity.Y != 0f)) npc.localAI[0] = Main.rand.Next(60, 301); } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs index c658223715..ea8b4af0c4 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs @@ -115,12 +115,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } // Hand immunity - int numHandsAlive = 0; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == NPCID.SkeletronHand) - numHandsAlive++; - } + int numHandsAlive = NPC.CountNPCS(NPCID.SkeletronHand); bool handsDead = numHandsAlive == 0; npc.chaseable = handsDead; calamityGlobalNPC.DR = numHandsAlive > 0 ? 0.9999f : 0.05f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs index a7eb64e482..4b437c77d1 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs @@ -116,9 +116,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Kill all arms if Prime Head enters phase 2 if (phase2 && !allArmsDead) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC npc2 = Main.npc[i]; if (npc2.type == NPCID.PrimeCannon || npc2.type == NPCID.PrimeLaser || npc2.type == NPCID.PrimeSaw || npc2.type == NPCID.PrimeVice) { npc2.life = -1; diff --git a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs index 00c33bf5ac..04177a5364 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs @@ -79,10 +79,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } if (Main.netMode != NetmodeID.MultiplayerClient && !Main.dayTime && !Main.player[npc.target].dead && npc.timeLeft < 10) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism) && Main.npc[i].timeLeft - 1 > npc.timeLeft) - npc.timeLeft = Main.npc[i].timeLeft - 1; + if (n.whoAmI != npc.whoAmI && (n.type == NPCID.Retinazer || n.type == NPCID.Spazmatism) && n.timeLeft - 1 > npc.timeLeft) + npc.timeLeft = n.timeLeft - 1; } } @@ -412,10 +412,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient && !Main.player[npc.target].dead && npc.timeLeft < 10) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism) && Main.npc[i].timeLeft - 1 > npc.timeLeft) - npc.timeLeft = Main.npc[i].timeLeft - 1; + if (n.whoAmI != npc.whoAmI && (n.type == NPCID.Retinazer || n.type == NPCID.Spazmatism) && n.timeLeft - 1 > npc.timeLeft) + npc.timeLeft = n.timeLeft - 1; } } @@ -1236,10 +1236,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Despawn Twins at the same time if (Main.netMode != NetmodeID.MultiplayerClient && !Main.player[npc.target].dead && npc.timeLeft < 10) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism) && Main.npc[i].timeLeft - 1 > npc.timeLeft) - npc.timeLeft = Main.npc[i].timeLeft - 1; + if (n.whoAmI != npc.whoAmI && (n.type == NPCID.Retinazer || n.type == NPCID.Spazmatism) && n.timeLeft - 1 > npc.timeLeft) + npc.timeLeft = n.timeLeft - 1; } } diff --git a/NPCs/Yharon/YScreenShader.cs b/NPCs/Yharon/YScreenShader.cs index 5676c17ffe..3d7ab6e75a 100644 --- a/NPCs/Yharon/YScreenShader.cs +++ b/NPCs/Yharon/YScreenShader.cs @@ -23,15 +23,7 @@ namespace CalamityMod.NPCs.Yharon { return; } - YIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == YType) - { - YIndex = i; - break; - } - } + YIndex = NPC.FindFirstNPC(YType); } public override void Update(GameTime gameTime) diff --git a/NPCs/Yharon/YSky.cs b/NPCs/Yharon/YSky.cs index 8af8610893..c98cc5e47a 100644 --- a/NPCs/Yharon/YSky.cs +++ b/NPCs/Yharon/YSky.cs @@ -60,15 +60,7 @@ namespace CalamityMod.NPCs.Yharon { return true; } - YIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == YType) - { - YIndex = i; - break; - } - } + YIndex = NPC.FindFirstNPC(YType); //this.DoGIndex = DoGIndex; return YIndex != -1; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 5e093f7fb3..5a8342bd92 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2354,17 +2354,17 @@ namespace CalamityMod.Projectiles float maxDistance = 460f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(projectile, false)) + if (n.CanBeChasedBy(projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (n.height / 2); - bool canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].Center, 1, 1); + bool canHit = Collision.CanHit(projectile.Center, 1, 1, n.Center, 1, 1); - if (Vector2.Distance(Main.npc[i].Center, projectile.Center) < (maxDistance + extraDistance) && canHit) + if (Vector2.Distance(n.Center, projectile.Center) < (maxDistance + extraDistance) && canHit) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Damageable/DamageableProjectile.cs b/Projectiles/Damageable/DamageableProjectile.cs index 8e53c481f7..9fc0c55e0a 100644 --- a/Projectiles/Damageable/DamageableProjectile.cs +++ b/Projectiles/Damageable/DamageableProjectile.cs @@ -169,14 +169,14 @@ namespace CalamityMod.Projectiles.Damageable public virtual bool NPCCollisionCheck() { Player player = Main.player[Projectile.owner]; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].IsAnEnemy() && DamageSources.HasFlag(DamageSourceType.HostileNPCs)) + if (n.IsAnEnemy() && DamageSources.HasFlag(DamageSourceType.HostileNPCs)) { - if (Main.npc[i].Hitbox.Intersects(Projectile.Hitbox) && !NPCsToIgnore.Contains(Main.npc[i].type)) + if (n.Hitbox.Intersects(Projectile.Hitbox) && !NPCsToIgnore.Contains(n.type)) { - int damage = Main.DamageVar(Main.npc[i].damage); - int bannerBuffId = Item.NPCtoBanner(Main.npc[i].BannerID()); + int damage = Main.DamageVar(n.damage); + int bannerBuffId = Item.NPCtoBanner(n.BannerID()); if (bannerBuffId > 0 && player.HasNPCBannerBuff(bannerBuffId)) { if (Main.expertMode) @@ -190,7 +190,7 @@ namespace CalamityMod.Projectiles.Damageable } CombatText.NewText(new Rectangle((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height), CombatText.DamagedFriendly, damage); Life -= damage; - HitEffectNPC(damage, Main.npc[i]); + HitEffectNPC(damage, n); DamageImmunityFrames = MaxDamageImmunityFrames; NetUpdate(true); return true; diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index f750ec6e0d..69da7b233c 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -129,19 +129,19 @@ namespace CalamityMod.Projectiles.DraedonsArsenal chargeCooldown = 60; TryToSuperchargeNPC(target); int extraZaps = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i != target.whoAmI && - Main.npc[i].CanBeChasedBy(Projectile, false) && - Main.npc[i].Distance(target.Center) < 240f && + if (n.whoAmI != target.whoAmI && + n.CanBeChasedBy(Projectile, false) && + n.Distance(target.Center) < 240f && extraZaps < 3) { - if (TryToSuperchargeNPC(Main.npc[i])) + if (TryToSuperchargeNPC(n)) { for (float increment = 0f; increment <= 1f; increment += 0.05f) { - Vector2 spawnPosition = Vector2.Lerp(target.Center, Main.npc[i].Center, increment); + Vector2 spawnPosition = Vector2.Lerp(target.Center, n.Center, increment); Dust dust = Dust.NewDustPerfect(spawnPosition, 226); dust.velocity = Vector2.Zero; dust.scale = 1.6f; diff --git a/Projectiles/DraedonsArsenal/PulsePistolShot.cs b/Projectiles/DraedonsArsenal/PulsePistolShot.cs index a121b81a2c..43d6bae92e 100644 --- a/Projectiles/DraedonsArsenal/PulsePistolShot.cs +++ b/Projectiles/DraedonsArsenal/PulsePistolShot.cs @@ -90,15 +90,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float minDistance = 600f; List potentialTargets = new List(); - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - bool legalTarget = Main.npc[i] != target && Main.npc[i].active && Main.npc[i].CanBeChasedBy(null); - float distanceToTarget = Projectile.Distance(Main.npc[i].Center); - if (legalTarget && distanceToTarget < minDistance && !NPCsAlreadyHit.Contains(Main.npc[i])) + bool legalTarget = n != target && n.CanBeChasedBy(null); + float distanceToTarget = Projectile.Distance(n.Center); + if (legalTarget && distanceToTarget < minDistance && !NPCsAlreadyHit.Contains(n)) { minDistance = distanceToTarget; // The NPCs at the bottom will always be at the bottom of the list because it works via a minimum distance. - potentialTargets.Add(Main.npc[i]); + potentialTargets.Add(n); } } diff --git a/Projectiles/DraedonsArsenal/PulseRifleShot.cs b/Projectiles/DraedonsArsenal/PulseRifleShot.cs index 8f8b09c5af..f874fce325 100644 --- a/Projectiles/DraedonsArsenal/PulseRifleShot.cs +++ b/Projectiles/DraedonsArsenal/PulseRifleShot.cs @@ -96,14 +96,14 @@ namespace CalamityMod.Projectiles.DraedonsArsenal else alreadyTargetedNPCType = target.whoAmI; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].CanBeChasedBy(Projectile, false) || !Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (!n.CanBeChasedBy(Projectile, false) || !Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) continue; - if (alreadyTargetedNPCType != Main.npc[i].whoAmI && Projectile.Center.ManhattanDistance(Main.npc[i].Center) < 600f) + if (alreadyTargetedNPCType != n.whoAmI && Projectile.Center.ManhattanDistance(n.Center) < 600f) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(Main.npc[i].Center) * 5f, Projectile.type, (int)(Projectile.damage * 0.4f), 0f, Projectile.owner, Main.npc[i].whoAmI, Projectile.ai[1] + 1f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(n.Center) * 5f, Projectile.type, (int)(Projectile.damage * 0.4f), 0f, Projectile.owner, n.whoAmI, Projectile.ai[1] + 1f); break; } } diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index b1b740d1b6..a48a5d4349 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -133,9 +133,9 @@ namespace CalamityMod.Projectiles.Magic { float damageFactor = MathHelper.Lerp(1f, ArtAttack.MaxDamageBoostFactor, Utils.GetLerpValue(0f, ArtAttack.MaxDamageBoostTime, Time, true)); int damage = (int)(Projectile.damage * damageFactor); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (!Main.npc[i].CanBeChasedBy()) + if (!n.CanBeChasedBy()) continue; bool enemyIsInShape = false; @@ -158,9 +158,9 @@ namespace CalamityMod.Projectiles.Magic Rectangle shapeRectangle = Utils.CenteredRectangle(center, area); for (int j = 0; j < cleanOldPositions.Count; j++) { - Vector2 left = Main.npc[i].Center - Vector2.UnitX * 2000f; - Vector2 right = Main.npc[i].Center + Vector2.UnitX * 2000f; - bool inRangeOfStars = shapeRectangle.Intersects(Main.npc[i].Hitbox); + Vector2 left = n.Center - Vector2.UnitX * 2000f; + Vector2 right = n.Center + Vector2.UnitX * 2000f; + bool inRangeOfStars = shapeRectangle.Intersects(n.Hitbox); bool lineCheck = Collision.CheckLinevLine(left, right, cleanOldPositions[j], cleanOldPositions[(j + 1) % cleanOldPositions.Count]).Length > 0; if (lineCheck && inRangeOfStars) { @@ -172,12 +172,12 @@ namespace CalamityMod.Projectiles.Magic // Strike an enemy if it's in the shape. if (enemyIsInShape) { - SoundEngine.PlaySound(SoundID.DD2_LightningBugZap, Main.npc[i].Center); - CreateDustExplosionEffect(Main.npc[i].Center); + SoundEngine.PlaySound(SoundID.DD2_LightningBugZap, n.Center); + CreateDustExplosionEffect(n.Center); if (Main.myPlayer == Projectile.owner) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Main.npc[i].Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Projectile.owner, i); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Projectile.owner, n.whoAmI); } } } diff --git a/Projectiles/Magic/BlindingLight.cs b/Projectiles/Magic/BlindingLight.cs index 6f34a06510..2e0835f332 100644 --- a/Projectiles/Magic/BlindingLight.cs +++ b/Projectiles/Magic/BlindingLight.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.Graphics.Effects; @@ -79,10 +79,9 @@ namespace CalamityMod.Projectiles.Magic private void DivideDamageAmongstTargets() { int numTargets = 0; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (var npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc is null || !npc.active || npc.friendly || npc.dontTakeDamage || npc.immortal) + if (npc.friendly || npc.dontTakeDamage || npc.immortal) continue; if (Projectile.Colliding(default, npc.Hitbox)) ++numTargets; diff --git a/Projectiles/Melee/AtaraxiaHoming.cs b/Projectiles/Melee/AtaraxiaHoming.cs index 8391011adf..5363ce6ffa 100644 --- a/Projectiles/Melee/AtaraxiaHoming.cs +++ b/Projectiles/Melee/AtaraxiaHoming.cs @@ -52,19 +52,19 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.ai[1] == 0f) { // Find the closest target. The range decreases each time you find a closer target. - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { // Chlorophyte Bullets actually home in a diamond instead of a circle because they don't perform a square root here. - float d = Math.Abs(Projectile.Center.X - Main.npc[i].Center.X) + Math.Abs(Projectile.Center.Y - Main.npc[i].Center.Y); - if (d < homingRange && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) + float d = Math.Abs(Projectile.Center.X - n.Center.X) + Math.Abs(Projectile.Center.Y - n.Center.Y); + if (d < homingRange && Collision.CanHit(Projectile.Center, 1, 1, n.position, n.width, n.height)) { homingRange = d; - posX = Main.npc[i].Center.X; - posY = Main.npc[i].Center.Y; + posX = n.Center.X; + posY = n.Center.Y; foundTarget = true; - targetIndex = i; + targetIndex = n.whoAmI; } } } diff --git a/Projectiles/Melee/Cyclone.cs b/Projectiles/Melee/Cyclone.cs index 155fe2442c..c341cf0123 100644 --- a/Projectiles/Melee/Cyclone.cs +++ b/Projectiles/Melee/Cyclone.cs @@ -65,9 +65,8 @@ namespace CalamityMod.Projectiles.Melee } float projX = Projectile.Center.X; float projY = Projectile.Center.Y; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, npc.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) { float npcCenterX = npc.position.X + (float)(npc.width / 2); diff --git a/Projectiles/Rogue/AlphaSeeker.cs b/Projectiles/Rogue/AlphaSeeker.cs index 2363a0251d..ef808a489e 100644 --- a/Projectiles/Rogue/AlphaSeeker.cs +++ b/Projectiles/Rogue/AlphaSeeker.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using System; using Terraria; @@ -141,10 +141,9 @@ namespace CalamityMod.Projectiles.Rogue { int target = -1; float minDist = HomingStartRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (var npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.type == NPCID.TargetDummy) + if (npc.type == NPCID.TargetDummy) continue; if (npc.CanBeChasedBy(Projectile, false)) diff --git a/Projectiles/Rogue/DynamicPursuerProjectile.cs b/Projectiles/Rogue/DynamicPursuerProjectile.cs index 8272ab76b5..18373a3dfe 100644 --- a/Projectiles/Rogue/DynamicPursuerProjectile.cs +++ b/Projectiles/Rogue/DynamicPursuerProjectile.cs @@ -241,18 +241,18 @@ namespace CalamityMod.Projectiles.Rogue float targettingDistance = MaxTargetSearchDistance * 2f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var n in Main.ActiveNPCs) { - if (i == target.whoAmI) + if (n.whoAmI == target.whoAmI) continue; - if (Main.npc[i].CanBeChasedBy(Projectile)) + if (n.CanBeChasedBy(Projectile)) { - float potentialNewDistance = (Projectile.Center - Main.npc[i].Center).Length(); + float potentialNewDistance = (Projectile.Center - n.Center).Length(); if (potentialNewDistance < targettingDistance && potentialNewDistance < closestNPCDistance) { closestNPCDistance = potentialNewDistance; - newTarget = Main.npc[i]; + newTarget = n; nextTarget = newTarget; if (Projectile.timeLeft < 300) Projectile.timeLeft = 300; diff --git a/Projectiles/Rogue/MeteorFistStealth.cs b/Projectiles/Rogue/MeteorFistStealth.cs index 8abb17f4d8..8f28a51574 100644 --- a/Projectiles/Rogue/MeteorFistStealth.cs +++ b/Projectiles/Rogue/MeteorFistStealth.cs @@ -157,16 +157,15 @@ namespace CalamityMod.Projectiles.Rogue // Get the closest enemy to the fist if (Projectile.penetrate != -1) { - for (int i = 0; i < Main.npc.Length; i++) + foreach (var npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false) && npc != target) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Summon/ApexShark.cs b/Projectiles/Summon/ApexShark.cs index 583c47f688..1110f10e34 100644 --- a/Projectiles/Summon/ApexShark.cs +++ b/Projectiles/Summon/ApexShark.cs @@ -126,9 +126,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[i]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/AquasScepterCloud.cs b/Projectiles/Summon/AquasScepterCloud.cs index 29558b9a37..803c272bf6 100644 --- a/Projectiles/Summon/AquasScepterCloud.cs +++ b/Projectiles/Summon/AquasScepterCloud.cs @@ -57,10 +57,8 @@ namespace CalamityMod.Projectiles.Summon } - for (int i = 0; i < Main.maxNPCs; i++) + foreach (var npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc.CanBeChasedBy()) { float between = Vector2.Distance(npc.Center, Projectile.Center); diff --git a/Projectiles/Typeless/ArtifactOfResilienceShards.cs b/Projectiles/Typeless/ArtifactOfResilienceShards.cs index 01a4adbd88..05031e49be 100644 --- a/Projectiles/Typeless/ArtifactOfResilienceShards.cs +++ b/Projectiles/Typeless/ArtifactOfResilienceShards.cs @@ -88,17 +88,16 @@ namespace CalamityMod.Projectiles.Typeless } if (projectile.ModProjectile is ArtifactOfResilienceShard1) { - for (int i = 0; i < Main.npc.Length; i++) + foreach (var n in Main.ActiveNPCs) { - if (Main.npc[i].active && - Main.npc[i].Distance(StartingPosition) < projectile.ai[1] && - Main.npc[i].damage > 0) + if (n.Distance(StartingPosition) < projectile.ai[1] && + n.damage > 0) { - if (Main.npc[i].Calamity().relicOfResilienceCooldown <= 0) + if (n.Calamity().relicOfResilienceCooldown <= 0) { - Main.npc[i].Calamity().relicOfResilienceCooldown = 600; - Main.npc[i].Calamity().relicOfResilienceWeakness = 180; - Main.npc[i].AddBuff(ModContent.BuffType(), Main.npc[i].Calamity().relicOfResilienceWeakness); + n.Calamity().relicOfResilienceCooldown = 600; + n.Calamity().relicOfResilienceWeakness = 180; + n.AddBuff(ModContent.BuffType(), n.Calamity().relicOfResilienceWeakness); } } } diff --git a/UI/VanillaBossBars/AstrumDeusBossBar.cs b/UI/VanillaBossBars/AstrumDeusBossBar.cs index 6934616d86..3d06a16a8b 100644 --- a/UI/VanillaBossBars/AstrumDeusBossBar.cs +++ b/UI/VanillaBossBars/AstrumDeusBossBar.cs @@ -29,10 +29,9 @@ namespace CalamityMod.UI.VanillaBossBars lifeMax = 0f; // Determine the real health by finding more of itself - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC worm = Main.npc[i]; - if (worm.active && worm.type == target.type) + foreach (NPC worm in Main.ActiveNPCs) + { + if (worm.type == target.type) { // In Death Mode, every worm must be killed if (CalamityWorld.death) @@ -57,16 +56,8 @@ namespace CalamityMod.UI.VanillaBossBars public bool FindMoreWorms(ref BigProgressBarInfo info) { - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC target = Main.npc[i]; - if (target.active && target.type == NPCType()) - { - info.npcIndexToAimAt = i; - return true; - } - } - return false; + info.npcIndexToAimAt = NPC.FindFirstNPC(ModContent.NPCType()); + return info.npcIndexToAimAt != -1; } } -} \ No newline at end of file +} diff --git a/UI/VanillaBossBars/CeaselessVoidBossBar.cs b/UI/VanillaBossBars/CeaselessVoidBossBar.cs index 61eb81d341..8306531c75 100644 --- a/UI/VanillaBossBars/CeaselessVoidBossBar.cs +++ b/UI/VanillaBossBars/CeaselessVoidBossBar.cs @@ -50,15 +50,14 @@ namespace CalamityMod.UI.VanillaBossBars FalseNPCSegment.SetDefaults(NPCType(), target.GetMatchingSpawnParams()); shieldMax = (int)(FalseNPCSegment.lifeMax * ExpectedBallsCounter * (1 - RatioToCombust)); shield -= (int)(FalseNPCSegment.lifeMax * ExpectedBallsCounter * RatioToCombust); - - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC part = Main.npc[i]; - if (part.active && part.type == NPCType()) + + foreach (NPC part in Main.ActiveNPCs) + { + if (part.type == NPCType()) shield += part.life; } } return true; } } -} \ No newline at end of file +} diff --git a/UI/VanillaBossBars/CryogenBossBar.cs b/UI/VanillaBossBars/CryogenBossBar.cs index e6d5fdda42..0202bd81cc 100644 --- a/UI/VanillaBossBars/CryogenBossBar.cs +++ b/UI/VanillaBossBars/CryogenBossBar.cs @@ -39,10 +39,9 @@ namespace CalamityMod.UI.VanillaBossBars shieldMax = 0f; // Determine the shield health - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC part = Main.npc[i]; - if (part.active && part.type == NPCType()) + foreach (NPC part in Main.ActiveNPCs) + { + if (part.type == NPCType()) { shield += part.life; shieldMax += part.lifeMax; @@ -51,4 +50,4 @@ namespace CalamityMod.UI.VanillaBossBars return true; } } -} \ No newline at end of file +} diff --git a/UI/VanillaBossBars/ExoMechsBossBar.cs b/UI/VanillaBossBars/ExoMechsBossBar.cs index ebaca057f2..1dcca283e8 100644 --- a/UI/VanillaBossBars/ExoMechsBossBar.cs +++ b/UI/VanillaBossBars/ExoMechsBossBar.cs @@ -79,16 +79,15 @@ namespace CalamityMod.UI.VanillaBossBars lifeMax += FalseNPCSegment.lifeMax; // Find the others - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC ecco in Main.ActiveNPCs) { - NPC ecco = Main.npc[i]; - if (ecco.active && ecco.type == NPCType() && target.type != NPCType()) + if (ecco.type == NPCType() && target.type != NPCType()) life += ecco.life; - if (ecco.active && ecco.type == NPCType() && target.type != NPCType()) + if (ecco.type == NPCType() && target.type != NPCType()) life += ecco.life; - if (ecco.active && ecco.type == NPCType() && target.type != NPCType()) + if (ecco.type == NPCType() && target.type != NPCType()) life += ecco.life; } } @@ -152,4 +151,4 @@ namespace CalamityMod.UI.VanillaBossBars return false; } } -} \ No newline at end of file +} diff --git a/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs b/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs index 06b6d8665a..1347d038d0 100644 --- a/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs +++ b/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs @@ -36,11 +36,10 @@ namespace CalamityMod.UI.VanillaBossBars lifeMax = target.lifeMax; // Find the partner in question - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC wife in Main.ActiveNPCs) { - NPC wife = Main.npc[i]; int targetCouple = target.type == NPCType() ? NPCType() : NPCType(); - if (wife.active && wife.type == targetCouple) + if (wife.type == targetCouple) { life += wife.life; lifeMax += wife.lifeMax; diff --git a/UI/VanillaBossBars/RavagerBossBar.cs b/UI/VanillaBossBars/RavagerBossBar.cs index bc1d6fcaed..d47b95f187 100644 --- a/UI/VanillaBossBars/RavagerBossBar.cs +++ b/UI/VanillaBossBars/RavagerBossBar.cs @@ -46,10 +46,9 @@ namespace CalamityMod.UI.VanillaBossBars } // Determine the current health of the parts - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC part = Main.npc[i]; - if (part.active && RavagerParts.Contains(part.type)) + foreach (NPC part in Main.ActiveNPCs) + { + if (RavagerParts.Contains(part.type)) { life += part.life; } @@ -59,16 +58,8 @@ namespace CalamityMod.UI.VanillaBossBars public bool FindRavagerBody(ref BigProgressBarInfo info) { - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC target = Main.npc[i]; - if (target.active && target.type == NPCType()) - { - info.npcIndexToAimAt = i; - return true; - } - } - return false; + info.npcIndexToAimAt = NPC.FindFirstNPC(ModContent.NPCType()); + return info.npcIndexToAimAt != -1; } } -} \ No newline at end of file +} diff --git a/UI/VanillaBossBars/SlimeGodBossBar.cs b/UI/VanillaBossBars/SlimeGodBossBar.cs index 0d3f8b2cf3..55b4e4f7f5 100644 --- a/UI/VanillaBossBars/SlimeGodBossBar.cs +++ b/UI/VanillaBossBars/SlimeGodBossBar.cs @@ -44,10 +44,9 @@ namespace CalamityMod.UI.VanillaBossBars lifeMax += FalseNPCSegment.lifeMax; // Determine the current health of each slime - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC part = Main.npc[i]; - if (part.active && SlimeGodSlimes.Contains(part.type)) + foreach (NPC part in Main.ActiveNPCs) + { + if (SlimeGodSlimes.Contains(part.type)) { life += part.life; } @@ -55,4 +54,4 @@ namespace CalamityMod.UI.VanillaBossBars return true; } } -} \ No newline at end of file +} diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index a8840f284a..f68b178eea 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -107,15 +107,15 @@ namespace CalamityMod bool locatedTarget = false; // Find a target. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - float extraDistance = (Main.npc[i].width / 2) + (Main.npc[i].height / 2); - if (!Main.npc[i].CanBeChasedBy(projectile, false) || !projectile.WithinRange(Main.npc[i].Center, maxDistance + extraDistance)) + float extraDistance = (n.width / 2) + (n.height / 2); + if (!n.CanBeChasedBy(projectile, false) || !projectile.WithinRange(n.Center, maxDistance + extraDistance)) continue; - if (ignoreTiles || Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (ignoreTiles || Collision.CanHit(projectile.Center, 1, 1, n.Center, 1, 1)) { - destination = Main.npc[i].Center; + destination = n.Center; locatedTarget = true; break; } @@ -279,17 +279,17 @@ namespace CalamityMod int[] targetArray = new int[maxTargets]; int targetArrayIndex = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(projectile, false)) + if (n.CanBeChasedBy(projectile, false)) { - float extraDistance = (Main.npc[i].width / 2) + (Main.npc[i].height / 2); + float extraDistance = (n.width / 2) + (n.height / 2); bool canHit = true; if (extraDistance < maxDistance) - canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].Center, 1, 1); + canHit = Collision.CanHit(projectile.Center, 1, 1, n.Center, 1, 1); - if (projectile.WithinRange(Main.npc[i].Center, maxDistance + extraDistance) && canHit) + if (projectile.WithinRange(n.Center, maxDistance + extraDistance) && canHit) { if (targetArrayIndex < maxTargets) { From 7f01a503173cb08fc524b89bc6c1151aafde5322 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 7 May 2024 16:44:55 -0400 Subject: [PATCH 050/197] Flight Bar now supports Flying Carpet --- UI/FlightBar/FlightBar.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/UI/FlightBar/FlightBar.cs b/UI/FlightBar/FlightBar.cs index 40c5d6bf8c..b78ed67fcd 100644 --- a/UI/FlightBar/FlightBar.cs +++ b/UI/FlightBar/FlightBar.cs @@ -53,9 +53,10 @@ namespace CalamityMod.UI else { bool ridingLimitedFlightMount = player.mount.Active && player.mount._data.flightTimeMax > 0; + bool ridingCarpet = player.carpet && !player.canCarpet; - int currentFlight = ridingLimitedFlightMount ? player.mount._flyTime + (int)(player.mount._data.fatigueMax - player.mount._fatigue) : (int)player.wingTime; - int maxFlight = ridingLimitedFlightMount ? player.mount._data.flightTimeMax + (int)player.mount._data.fatigueMax : player.wingTimeMax; + int currentFlight = ridingCarpet ? player.carpetTime : ridingLimitedFlightMount ? player.mount._flyTime + (int)(player.mount._data.fatigueMax - player.mount._fatigue) : (int)player.wingTime; + int maxFlight = ridingCarpet ? 300 : ridingLimitedFlightMount ? player.mount._data.flightTimeMax + (int)player.mount._data.fatigueMax : player.wingTimeMax; return (Math.Min(100f * currentFlight / maxFlight, 100f)).ToString("0.00"); // why the FUCK can wingtime be higher than max wingtime????????? } @@ -105,7 +106,7 @@ namespace CalamityMod.UI CalamityPlayer modPlayer = player.Calamity(); // If not drawing the flight bar, save its latest position to config and leave. - if (CalamityConfig.Instance.FlightBar && (player.wingsLogic > 0 || (player.mount.Active && player.mount._data.flightTimeMax > 0))) + if (CalamityConfig.Instance.FlightBar && (player.wingsLogic > 0 || (player.mount.Active && player.mount._data.flightTimeMax > 0) || player.carpet && !player.canCarpet)) { DrawFlightBar(spriteBatch, modPlayer, screenPos); } @@ -140,7 +141,7 @@ namespace CalamityMod.UI if (!CalamityConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; - if (modPlayer.Player.equippedWings != null && modPlayer.Player.wingTimeMax > 0 || (player.mount.Active && modPlayer.Player.mount._data.flightTimeMax > 0)) //equipped wings or riding a flying mount and max wingtime/flighttime above 0 (so not disabled bar) + if (modPlayer.Player.equippedWings != null && modPlayer.Player.wingTimeMax > 0 || (player.mount.Active && modPlayer.Player.mount._data.flightTimeMax > 0) || player.carpet && !player.canCarpet) //equipped wings or riding a flying mount and max wingtime/flighttime above 0 (so not disabled bar) { string textToDisplay = CalamityUtils.GetText("UI.Flight").Format((GetFlightTime(modPlayer).ToString() + (modPlayer.infiniteFlight ? "" : "%"))); //the percent is here and not in localisation otherwise it looks like a dick when it's infinite flight Main.instance.MouseText(textToDisplay, 0, 0, -1, -1, -1, -1); @@ -192,7 +193,7 @@ namespace CalamityMod.UI Player player = modPlayer.Player; float flightRatio = 1; if (!modPlayer.infiniteFlight && !RidingInfiniteFlightMount(player)) - flightRatio = player.mount.Active && player.mount._data.flightTimeMax > 0 ? Math.Min((float)(player.mount._flyTime + (player.mount._data.fatigueMax - player.mount._fatigue)) / (player.mount._data.flightTimeMax + player.mount._data.fatigueMax), 1f) : Math.Min(player.wingTime / player.wingTimeMax, 1f); // why the FUCK can wingtime be higher than max wingtime????????? + flightRatio = player.carpet && !player.canCarpet ? Math.Min((float)player.carpetTime / 300f, 1f) : player.mount.Active && player.mount._data.flightTimeMax > 0 ? Math.Min((float)(player.mount._flyTime + (player.mount._data.fatigueMax - player.mount._fatigue)) / (player.mount._data.flightTimeMax + player.mount._data.fatigueMax), 1f) : Math.Min(player.wingTime / player.wingTimeMax, 1f); // why the FUCK can wingtime be higher than max wingtime????????? if (!completedAnimation && FlightAnimFrame == -1 && (modPlayer.infiniteFlight || RidingInfiniteFlightMount(modPlayer.Player))) FlightAnimFrame++; if (FlightAnimFrame > -1) //animation started, complete it. From 8c7c40ba33562dfd111e140121b30311a08af56f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 7 May 2024 18:50:22 -0400 Subject: [PATCH 051/197] Nerfed Platinum Armor. No life regen, and its own defense doesn't count for its set bonus. --- .../PlatinumArmorSetChange.cs | 16 +++++++++------- .../en-US/Mods.CalamityMod.Vanilla.Armor.hjson | 5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs index 64a39bf6cb..21e5346986 100644 --- a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float HeadDamage = 0.06f; public const float ChestCrit = 5f; public const float LegsMoveSpeed = 0.1f; - public const float SetBonusLifeRegenPerDefense = 0.1f; // 10 defense = +1 life regen public const float SetBonusDamagePerDefense = 0.001f; // 10 defense = +1% damage public const float SetBonusCritPerDefense = 0.1f; // 10 defense = +1% crit chance public const int SetBonusDefenseCap = 40; @@ -36,12 +35,15 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyArmorSetBonus(Player player) { - int defense = player.statDefense; - if (defense > SetBonusDefenseCap) - defense = SetBonusDefenseCap; - player.lifeRegen += (int)(defense * SetBonusLifeRegenPerDefense); - player.GetDamage() += defense * SetBonusDamagePerDefense; - player.GetCritChance() += defense * SetBonusCritPerDefense; + // 07MAY2024: Ozzatron: Platinum armor doesn't count its own defense for its set bonus + int defenseBesidesThisArmor = player.statDefense - (4 + 6 + 4 + 4); + if (defenseBesidesThisArmor <= 0) + return; + + if (defenseBesidesThisArmor > SetBonusDefenseCap) + defenseBesidesThisArmor = SetBonusDefenseCap; + player.GetDamage() += defenseBesidesThisArmor * SetBonusDamagePerDefense; + player.GetCritChance() += defenseBesidesThisArmor * SetBonusCritPerDefense; } } } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index dbc84a461e..c688b86e2a 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -101,8 +101,9 @@ SetBonus: { ''' Platinum: ''' - Every 10 defense gives you +0.5 HP/s life regen, 1% increased damage and 1% increased critical strike chance - These effects cap at 40 defense + Every 10 extra defense gives you 1% increased damage and 1% increased critical strike chance + The 20 defense from the Platinum Armor itself does not contribute to this effect + Bonus damage and critical strike chance cap at 40 extra defense ''' Silver: ''' From 9223a5278e626bdc2c90f871b192de7c9bea31bb Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 7 May 2024 18:55:10 -0400 Subject: [PATCH 052/197] Nerfed Gold Armor. - Now caps at +9% crit with 90 gold, instead of +10% crit with 50 gold. - Enemies have a 2% chance to drop 1 gold instead of 4%. --- Items/VanillaArmorChanges/GoldArmorSetChange.cs | 9 ++++----- Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Items/VanillaArmorChanges/GoldArmorSetChange.cs b/Items/VanillaArmorChanges/GoldArmorSetChange.cs index eb18aab587..77a0cf4733 100644 --- a/Items/VanillaArmorChanges/GoldArmorSetChange.cs +++ b/Items/VanillaArmorChanges/GoldArmorSetChange.cs @@ -1,5 +1,4 @@ using System; -using System.Text; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,10 +20,10 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float HeadDamage = 0.06f; public const float ChestDR = 0.05f; public const float LegsMoveSpeed = 0.1f; - public const float GoldDropChanceFromEnemies = 0.04f; + public const float GoldDropChanceFromEnemies = 0.02f; public const int GoldFromBosses = 3; - public const float SetBonusCritPerGoldCoin = 0.2f; // 5 gold coins = +1% crit chance - public const float MaximumCritBonus = 10f; + public const float SetBonusCritPerGoldCoin = 0.1f; // 10 gold coins = +1% crit chance + public const float MaximumCritBonus = 9f; public override void ApplyHeadPieceEffect(Player player) => player.GetDamage() += HeadDamage; @@ -50,7 +49,7 @@ namespace CalamityMod.Items.VanillaArmorChanges { // 13FEB2024: Ozzatron: this function doesn't cap at its second argument, it just stops counting if it exceeds that number // so this can give up to 100 gold coins - int goldCoins = player.CountItem(ItemID.GoldCoin, 50); + int goldCoins = player.CountItem(ItemID.GoldCoin, 90); critFromGold = Math.Max(goldCoins * SetBonusCritPerGoldCoin, MaximumCritBonus); } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index c688b86e2a..b4d2711fb7 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -55,8 +55,8 @@ SetBonus: { ''' Gold: ''' - All enemies have a 4% chance to drop 1 gold. All bosses killed drop 3 gold - You gain 1% critical strike chance for every 5 gold in your inventory, capped at 10% + All enemies have a 2% chance to drop 1 gold. All bosses killed drop 3 gold + You gain 1% critical strike chance for every 10 gold in your inventory, capped at 9% ''' Iron: ''' From 05bfa79fda069756700596850aa7f6fdf97c857f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 7 May 2024 18:57:36 -0400 Subject: [PATCH 053/197] Fixed typo causing Gold Armor to always give its full boost, ruining the point. --- Items/VanillaArmorChanges/GoldArmorSetChange.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/VanillaArmorChanges/GoldArmorSetChange.cs b/Items/VanillaArmorChanges/GoldArmorSetChange.cs index 77a0cf4733..1cd9c38894 100644 --- a/Items/VanillaArmorChanges/GoldArmorSetChange.cs +++ b/Items/VanillaArmorChanges/GoldArmorSetChange.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.VanillaArmorChanges // 13FEB2024: Ozzatron: this function doesn't cap at its second argument, it just stops counting if it exceeds that number // so this can give up to 100 gold coins int goldCoins = player.CountItem(ItemID.GoldCoin, 90); - critFromGold = Math.Max(goldCoins * SetBonusCritPerGoldCoin, MaximumCritBonus); + critFromGold = Math.Min(goldCoins * SetBonusCritPerGoldCoin, MaximumCritBonus); } player.GetCritChance() += critFromGold; From b79279f514d2f56767df05b9d18f8467f2b09fb2 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 7 May 2024 19:03:59 -0400 Subject: [PATCH 054/197] Nerfed Lead Armor. Total DR is now 10% instead of 12%. --- Items/VanillaArmorChanges/LeadArmorSetChange.cs | 7 +++---- Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Items/VanillaArmorChanges/LeadArmorSetChange.cs b/Items/VanillaArmorChanges/LeadArmorSetChange.cs index fccf0e14f1..4fc7541f41 100644 --- a/Items/VanillaArmorChanges/LeadArmorSetChange.cs +++ b/Items/VanillaArmorChanges/LeadArmorSetChange.cs @@ -1,5 +1,4 @@ -using System.Text; -using Terraria; +using Terraria; using Terraria.ID; namespace CalamityMod.Items.VanillaArmorChanges @@ -14,8 +13,8 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Lead"; - public const float ArmorPieceDR = 0.03f; - public const float SetBonusDR = 0.03f; + public const float ArmorPieceDR = 0.02f; + public const float SetBonusDR = 0.04f; public const int SetBonusLifeRegen = 1; public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR; diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index b4d2711fb7..1742a34c16 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -66,7 +66,7 @@ SetBonus: { Jungle: 10% reduced mana costs Lead: ''' - Increases damage reduction by 3% + Increases damage reduction by 4% +0.5 HP/s life regen Grants immunity to knockback ''' From 7ca2d6967d35062f6163e27db1c2377d63b72ce2 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Tue, 7 May 2024 20:00:56 -0700 Subject: [PATCH 055/197] resprited photovisc backpack + tank draw fix --- CalPlayer/CalamityPlayerDrawEffects.cs | 8 +++++++- .../DrawLayers/Backpack_Photoviscerator.png | Bin 672 -> 1073 bytes 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index eed9b2b6ea..d5326f5e54 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -471,8 +471,14 @@ namespace CalamityMod.CalPlayer SpriteEffects spriteEffects = Player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + int xOffset = 9; + // Photoviscerator's tank is extended a bit more out + if (thingToDraw == ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_Photoviscerator").Value) + { + xOffset = 16; + } DrawData howDoIDrawThings = new DrawData(thingToDraw, - new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir)), + new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (xOffset * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir + drawPlayer.gfxOffY)), new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height), drawInfo.colorArmorBody, drawPlayer.bodyRotation, diff --git a/CalPlayer/DrawLayers/Backpack_Photoviscerator.png b/CalPlayer/DrawLayers/Backpack_Photoviscerator.png index aa94ab14fd814920f69851272ca66f6052b78bea..5eb58e0d3e94658f509c708e0ad836485b493f0e 100644 GIT binary patch delta 1058 zcmV+-1l{|f1+fSriBL{Q4GJ0x0000DNk~Le0000c0000k2nGNE07PzU!;v8$e*?iu zL_t(oN9~tgNK;`L$B&!yV_D8ktr_zpy|6+Nsm#(SEW`rSgz7TuMsI=&it5gYO30|2 zq#Nm~4-hRcBtnQRLq%CaVUW)GZO#wy`>VD0|DI>Lw;e6;;%xMThyVM|&2#qKbKdiw z0BM7{v-`9>TAS-%UdkiyXyjBKe;a1(aM?rT);3CCQS7{gr2oc|gl zQ)xSJ|gvd4Z(!X8D}!mn8Xj=|Lg;D+7gQwY&tFGzHjV6aVc`ofBtY}$B21N zQz=npNaDz?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j_1Mb4)*hi_d3j{{$X2&Nk?@9{CQ;@Zf=vE zn!P>_-5Z2^-^#3rOxj;EkCKOKCB%2+PCW%jFwf2Rai-*r!!Kdhny}`CvxCXaCnkFG z2cAE$KJ|PFX@5sS9elgQzGKZN=By~cB1uV3znICt_2lT;H45Gg|MyKraIPY==>?(A@*-K3HHwvek oo}AZpvY(jf|9{Vlp~RN;5184-_+yUSyZ`_I07*qoM6N<$f_auco&W#< From 125ffb94d9b0ab665ee33ee56e88e5c52f83b3f4 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 7 May 2024 20:24:22 -0700 Subject: [PATCH 056/197] Pulse Rifle sprite+sounds New Pulse Rifle sounds and sprite --- CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs | 3 +++ Items/Weapons/DraedonsArsenal/PulseRifle.cs | 15 ++++++++++----- Items/Weapons/DraedonsArsenal/PulseRifle.png | Bin 706 -> 1218 bytes .../DraedonsArsenal/PulseRifleGlow.png | Bin 0 -> 3071 bytes Projectiles/DraedonsArsenal/PulseRifleShot.cs | 4 ++-- Sounds/Item/EnergyRifleFire.ogg | Bin 0 -> 9184 bytes Sounds/Item/PulseRifleFire.ogg | Bin 9184 -> 43551 bytes Sounds/Item/PulseSound.ogg | Bin 0 -> 31800 bytes 8 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 Items/Weapons/DraedonsArsenal/PulseRifleGlow.png create mode 100644 Sounds/Item/EnergyRifleFire.ogg create mode 100644 Sounds/Item/PulseSound.ogg diff --git a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs index cb9e490ba8..68f0754076 100644 --- a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs +++ b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using CalamityMod.Items.SummonItems; +using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; @@ -77,6 +78,8 @@ namespace CalamityMod.CalPlayer.DrawLayers glowMask = ModContent.Request("CalamityMod/Items/Weapons/Summon/PlantationStaffGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/PrismaticBreakerGlow").Value; + else if (itemType == ModContent.ItemType()) + glowMask = ModContent.Request("CalamityMod/Items/Weapons/DraedonsArsenal/PulseRifleGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow").Value; else if (itemType == ModContent.ItemType()) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index a9b060474c..efba46b663 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -6,6 +6,7 @@ using CalamityMod.Projectiles.DraedonsArsenal; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -17,7 +18,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public class PulseRifle : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; - public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/PulseRifleFire"); + public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/PulseRifleFire") { Volume = 0.8f }; private int BaseDamage = 1150; public int FiringTimer = 30; @@ -26,8 +27,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { CalamityGlobalItem modItem = Item.Calamity(); - Item.width = 62; - Item.height = 22; + Item.width = 98; + Item.height = 32; Item.DamageType = DamageClass.Ranged; Item.damage = BaseDamage; Item.knockBack = 0f; @@ -52,13 +53,17 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - SoundEngine.PlaySound(FireSound with { Volume = 0.7f, Pitch = 0.3f }); + SoundEngine.PlaySound(FireSound); Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/DraedonsArsenal/PulseRifleGlow").Value); + } - public override Vector2? HoldoutOffset() => new Vector2(-10, 0); + public override Vector2? HoldoutOffset() => new Vector2(-15, 0); public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 5); diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.png b/Items/Weapons/DraedonsArsenal/PulseRifle.png index df7ca50eb2160567ae921101e037e648940094c5..4075f9d5944f91f7c901e907b3c6a1439f1d4712 100644 GIT binary patch literal 1218 zcmV;z1U>tSP)Px#1ZP1_K>z@;j|==^1poj9Qb|NXRA@u(noCGjQ5?o+e2k7YmZME*FS2|_5mW?O zL}dg)+n{LCrdAbgY8ki)q6or-phZ+dg3E*;daWah2zqD)xkxk9$`MD$nQZ*d`C{(B zInD@Lhd95@cg~%A&pr3v|9Af9+&g~XJX2F!r%S#mturzii=j^=--b~q!=t0R^na44 z)$xz{>y9|syayG@|LDI1GJs=Zhu>A5c@#X+2}Bv^vFbA%;KJ0jzln(Hhil>_i(BatPj z^T{(Jb#E`@TI#hh`u^%|7O^O+)A zUKiUZydQEq&(Hqt-n0=)Iv+lQnw-t!xu0`{B^VvSG1lmWk_B)=eo+zXso6xvc8FXt zGeYl7dAA?-tJxDHNjiea9I&IdL6;P37NL8-rUo^eJ9hgiluj|t(j=z+Nw)jM>ohr? z$2&(@flzc@!&fn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6YaL`nt`0cP3gwxEzJM ztKKWue*omu0RWTY8K`gVHbhe);)m2VI?DCW$pLN!pq?Q_`uAv>6!QSE>MeopU9NR! z2$7Qi(77r@h-3(n3?WkMAmVymy!-;qS%(cFQtKd^nju6ogh+-E=?Jj(*TI+c0~`PV N002ovPDHLkV1ks}yIKGM literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PulseRifleShot.cs b/Projectiles/DraedonsArsenal/PulseRifleShot.cs index aabdd2c12e..abbe895460 100644 --- a/Projectiles/DraedonsArsenal/PulseRifleShot.cs +++ b/Projectiles/DraedonsArsenal/PulseRifleShot.cs @@ -123,8 +123,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { distance = 3000; - SoundStyle fire = new("CalamityMod/Sounds/Item/OpalFire"); - SoundEngine.PlaySound(fire with { Volume = 0.35f, Pitch = 1f }, Projectile.Center); + SoundStyle fire = new("CalamityMod/Sounds/Item/PulseSound"); + SoundEngine.PlaySound(fire with { Volume = 0.35f, Pitch = 0.3f, MaxInstances = -1 }, Projectile.Center); Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, mainColor, new Vector2(1f, 1f), Main.rand.NextFloat(12f, 25f), 0f, 0.5f, 15); diff --git a/Sounds/Item/EnergyRifleFire.ogg b/Sounds/Item/EnergyRifleFire.ogg new file mode 100644 index 0000000000000000000000000000000000000000..855a605b467bdfed6e96b346f5ee508a3a0ca34b GIT binary patch literal 9184 zcmeHscT`hbx9_GYA|N6vM5+WZC?2|W6i^_vLogs!=>!N!0Fll)(xg|Bs&o@6(gg%O z2O-j>BcX_t(2*K??hbnH``#PxzVVGW?w@y!m7TTMY7iXvk1@9Hwk{qpifSslpQ3y!s)kg+ zZ2(|bVG*V)wvLhee337TBj>eBI}FdI@`W!Ksv0iWDurjaR`+;PJ~`LYa)jTOquR@Fbd)dE-8>Q30D#~1*;*d6oj#GX0RZ|(*CKLd zVrCvB8URk8WczQIBStosa#?$Go3ttpZweAj-ufCT_7*<`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U%TfzBiI*Oo+L%4@mEyo^a4!^V4I+&ig*Ra<-i4j`f5?)|DVI_5a*D_*|l`u6VjVT%DpEc<|%-cu^CYCweaM`vJbS)ZM%b7C(}am5eQG zl3fOlO$NZUWD$0sh99t=xFK4Y;fh3F^a@9Cxh5Mt&;Ei9`>ZXIK4Y0MT6|7eQ+j0; z4qfffgQWY%wl);THh)M)qcp3E3kn-13eCC5J7TjvXVRF`*M95jKT;(7K$J<^uT>ONb1{G(xt_`0miXc-wg6A|#x5 z6N0=e*>?Ne#Y;0YeU&%{IxB}~&|#KPn(id8kE_aI z9Qpl`)9P-|w4U8L7u_LWEkk|J@b9}gYi} zojp$c)$?Kc)Dw>UAY3Ny;Z(P&EpjakD-wXSMxcKgTf}&xIR1uUaJnS`zBmryUR(0gWYxf!FKYMhKE8G zIfr}m;SV2jt&KhZ`Wxxp-p$386`fZ+fff~O+i(ARES?dyrn+`C=Hhj8JZfaBj4lh3 z8x#K;Kv)jA0l@J!Bm|d0t5r)0xhS|fH70I0!LBiOkgRz~z_j?OJ9Q*^bw!YXO)b4Y7NN~iF`(p3M~7yc9P@He)m@ysGnqz4pqp51KC8~Cvq6Lx?a?KIpe7|}VPZrr~LJ1q)ef3pH! zQytq>y-8*bx?%{vr4e(Ir&?G<2twnD5+!O->q;ykh_%PJ>PuGeVnZkyid#=rC>dVVO>;woERvA}OC4M`4#&H4E-po>h}w<7r~=CaAMzLT{VX6nKg zjMm?w!poF=6#T=l-^0IBz#^?*di2h-OR~Ye%Qom+6w1;edJkAC;_pIs&X{yXp=D^r+c diff --git a/Sounds/Item/PulseSound.ogg b/Sounds/Item/PulseSound.ogg new file mode 100644 index 0000000000000000000000000000000000000000..4941b20973c4ec3243c166877ef1f4107d08f884 GIT binary patch literal 31800 zcmce;by!|K(=WP^;zf!}af&;%xE0sp4#gdcyA-$LdgETacyU@Bid%sqE$;4epGBYN z{r0!_IeVY;*U6PTS0-yRNhZIU%nGYjvanDEV1a)VjQ&5BiY9I$7*ZH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WiEm8$KoHr=36~77UkQTPS*PZ|Tu6VR5=j zVqE@Kh42O$45tExO%79LwlDI)6T`&L2HA;CHAKxpQrP^4#&jMElC*+($;wgbWTVnG^eXrYu-R61Q8t1k1*ar}e>;Ogt`TqkxN=LW= literal 0 HcmV?d00001 From 6708177154a5923fa09b0a15a800dfe7034b9ffe Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 May 2024 01:23:05 -0400 Subject: [PATCH 057/197] Exo weapon glowmasks, Immaterializer resprite --- CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs | 2 ++ Items/Weapons/Melee/Exoblade.cs | 6 ++++++ Items/Weapons/Melee/ExobladeGlow.png | Bin 0 -> 2384 bytes Items/Weapons/Melee/ExobladeSquare.png | Bin 3953 -> 4948 bytes Items/Weapons/Ranged/Photoviscerator.cs | 6 ++++++ Items/Weapons/Ranged/PhotovisceratorGlow.png | Bin 0 -> 3650 bytes Items/Weapons/Rogue/Supernova.cs | 6 ++++++ Items/Weapons/Rogue/SupernovaGlow.png | Bin 0 -> 2114 bytes Items/Weapons/Summon/CosmicImmaterializer.cs | 10 ++++++++-- Items/Weapons/Summon/CosmicImmaterializer.png | Bin 818 -> 6459 bytes .../Summon/CosmicImmaterializerGlow.png | Bin 0 -> 2888 bytes Projectiles/Ranged/PhotovisceratorHoldout.cs | 12 ++++++++++++ .../Ranged/PhotovisceratorHoldoutGlow.png | Bin 0 -> 1492 bytes 13 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 Items/Weapons/Melee/ExobladeGlow.png create mode 100644 Items/Weapons/Ranged/PhotovisceratorGlow.png create mode 100644 Items/Weapons/Rogue/SupernovaGlow.png create mode 100644 Items/Weapons/Summon/CosmicImmaterializerGlow.png create mode 100644 Projectiles/Ranged/PhotovisceratorHoldoutGlow.png diff --git a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs index 68f0754076..37ad49653a 100644 --- a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs +++ b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs @@ -48,6 +48,8 @@ namespace CalamityMod.CalPlayer.DrawLayers glowMask = ModContent.Request("CalamityMod/Items/Weapons/Ranged/AuroraBlazerGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow").Value; + else if (itemType == ModContent.ItemType()) + glowMask = ModContent.Request("CalamityMod/Items/Weapons/Summon/CosmicImmaterializerGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow").Value; else if (itemType == ModContent.ItemType()) diff --git a/Items/Weapons/Melee/Exoblade.cs b/Items/Weapons/Melee/Exoblade.cs index c1c551acd5..e4e2851a5e 100644 --- a/Items/Weapons/Melee/Exoblade.cs +++ b/Items/Weapons/Melee/Exoblade.cs @@ -4,6 +4,7 @@ using CalamityMod.Projectiles.Melee; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -126,6 +127,11 @@ namespace CalamityMod.Items.Weapons.Melee return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Melee/ExobladeGlow").Value); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Melee/ExobladeGlow.png b/Items/Weapons/Melee/ExobladeGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..5529b42e135f0aabea47838996aa5c72b73e9aa4 GIT binary patch literal 2384 zcmYLLdpy(YALmy|=u{{(^*gbq#%a!qE^?`bHXX_^W{uM(*Fu#0rKFl;)P@vBa*LU0 z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=1X67k_Xt2Ue2^50x{oQC zeNEMymb`kfba3*8&>>j8^|Qhfrw79?%Wl}r*ssF$)rXzHxzI?u55WhT*{wa{P_X(M zf?JEpYfp<$WAlsGbBG-}*|#g%v2VwIX_(swF$Ie$4E`K5;E_F6c{=re(&pCMKcmHu z_&mf|%7@@p0Aw=<6>$ArjUpOJTbJ;`&(S??Fli+LL|5IAOq*^eFr&u~J9beQ!p5MX zV5xSGI9-BN5?ysoBAK+{pg$`3tAmF|(B;HEvyW~i2IMRg-hw=aR%M!lu@6Eub74Pm zx)t9O2BY)5;7AY;B*z6u+(G!gX?UoG)U6>#+n9iE;tnC>WdW^vjGt9C-;{P0rHhsa zZS87e#{Y!?5P{w|VhPHcU{hTp@7t=*d7t~("CalamityMod/Items/Weapons/Ranged/PhotovisceratorGlow").Value); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/PhotovisceratorGlow.png b/Items/Weapons/Ranged/PhotovisceratorGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..90365e976ff6d79cbf960d57915891b998b14e3d GIT binary patch literal 3650 zcmV-I4!!Y-P)Px#1ZP1_K>z@;j|==^1pojI(n&-?RCr$PoqJGJ=M}*3vhrNOT@+D7WC4*tG`^!I zD2|VyQ`1CE(xm+(nU0CAP13|Pv6IGTlIfr(P7*UFss7PvCrz9*iPomRuw$#WzKs$U zUw{t=MNn2?0fmLK=X_^}`?=S>yX;*+&u<3L{cv~hgWd19=X+g~VlXS;TrRePL*DMq zVoPav|C2Z<-0L}1Uv7c8J8up|*Ty3dePMoVjM(yz*Z;6oY^e$M`QI&QU9X;s*55Hq zM22Akz;FZYoiasiA!LL=>0}_F!$1%R42l3FojBrza$=4P&Mh(?eytoim;mwQ)foJR zM5QSj9$&BE>zxkk3-R%}i4e8WTa!`^MvuSO&BO*`7$zhJq8cCeMaH<<)CMs!8b8Bw z&Z3t^&i_EXRMrf!&f$Xn$yr2eT4WS{rf)W5jjy*g&D!S{ z#N> z7Mbj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tFqWm9xHdBRMYR%RF000hUSV?A0O#mtY000O800000 U007cclK=n!07*qoM6N<$f@?(KEdT%j literal 0 HcmV?d00001 diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index 775fcbac13..d6bef9b091 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -4,6 +4,7 @@ using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -53,6 +54,11 @@ namespace CalamityMod.Items.Weapons.Rogue return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Rogue/SupernovaGlow").Value); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Rogue/SupernovaGlow.png b/Items/Weapons/Rogue/SupernovaGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..0d383aedb312b2e03fd66205c53c97659ea41d6f GIT binary patch literal 2114 zcma)7X*3(!77le)O)W8NXwXolxnfAgR73_9gbrpcLCuO*i}FfKkW|!AB9&H}ikgSp z8md}RMS~YNrkYkKB`97SE;ZbEcfJ4bth3KPd#%0qIqTc|d?(A*87(8JCJ6ulWUv^d zn^1=dB}PJAxUNTh-8V$y+|YJ_+QFj>LPIRX7H10pG~`NcU;YgMI5><&+Mc`Nw@mYm zPzX}Ucu>S-y0!h(H7t1g^@Z4DvYzN;B&obyL=-M>%2k)hkdnt0+_^&H{)?qdIYRbf zfsYy8mLiH&XHd0LFHq=OOr~LhD08{dJFGo^vX=d8VB+^o=L+x1?di7A+F$p^otjlTH!*#W`mGHHD6Pg!(I3*|I)iq7*6S9khRqx3VZ`XF{v_q^H zblUzN2i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+t!dv6Hk-la5 zykluznRT#q#HP$HvFJ%aduWmKs6I`tJl zWS+Z$I|B;MB`U!B=dt4{?I(K<42<{Pu@=achT zjFxLO$X3Nb_*RHd@yNR1i4vrXYPdyREk*V@-d;uku_F!N0mHM2yz0Fi>>U;63A}N3 z3@qob&SInxH~DJ}q93O*;&TkVPu9rsh?wpFIe|X4sUrMLMsh+{`iAhgmksj32IFu5 Yec@h0DEnjBJ%3+e9h{N1c9+ur23}g)>i_@% literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index 477e19cd22..d7d6ac4aa8 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -4,6 +4,7 @@ using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -16,8 +17,8 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetDefaults() { - Item.width = 74; - Item.height = 72; + Item.width = 170; + Item.height = 164; Item.mana = 10; Item.damage = 560; Item.useStyle = ItemUseStyleID.Swing; @@ -43,6 +44,11 @@ namespace CalamityMod.Items.Weapons.Summon return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Summon/CosmicImmaterializerGlow").Value); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Summon/CosmicImmaterializer.png b/Items/Weapons/Summon/CosmicImmaterializer.png index aaf579725d78e44cc9d5f3a82bbfb0ccdb238c24..21ac8d7523c9903fbaffedafa4b465d4ffabfb24 100644 GIT binary patch literal 6459 zcmYj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znSW&Lff>!OS%jPrC1oWl{y}%k;`n>W#H8MRIn{``)~k%624+d~PoG$fjWX zuxb8+H3c4#D!{nAh6pS>;VR&=;iUScA}zD!tVN**$Y3 z5IuxkFx^j3Y)5|6p$#q-2)+oP91`w^M{qI@(a?Y8COzvLV9{1vteR#!X7}}4GkWN* z_t*UZRYH>xFZLV8T@a34RA!4&1MT5s%imI8qP9O2$ik56m#_gP>Wh-zF%Q*sPw6Es zBXcL!e&9c@NSrjg1|3YA%_o1q2%bHHeN5A}I+CXQX z%Z-sS*5KFIL6z1;)=>RKJ)t;&a-;O?afyA;>S{Z^B5Nve zeaPd$nlAjk*I?ti#{Ug<-sk_D?2+_oRhHDm;BaeF{e91rc>K{j`YZOau>v`-{)cDE zsqUxr+_trssT_WJWmNp+%D=gi$8zF7JS^+ZJ?b9I17@u5W{iA(ZVG?jC1>zZ*}`Ts zgnBFKoN` zV83C}<}1{`Zir$05e2C@?3{Iwyhqe1uDcT^Bfs-lbg(~Gt!bzz&+T1athYL?9~CLA zs{|l;L{yvlbNN5-j_^Qe1PrENB7fc@uWMxpPFOQgS1<5==d;=W0+J}4 AWdHyG literal 0 HcmV?d00001 diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index 14ddf60640..2b5d81ed2c 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using ReLogic.Utilities; using Terraria; using Terraria.Audio; @@ -269,5 +270,16 @@ namespace CalamityMod.Projectiles.Ranged Sound?.Stop(); PhotoTimer = 90; } + + public override void PostDraw(Color lightColor) + { + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Vector2 origin = new Vector2(85f, 33f); + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Ranged/PhotovisceratorHoldoutGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); + } } } diff --git a/Projectiles/Ranged/PhotovisceratorHoldoutGlow.png b/Projectiles/Ranged/PhotovisceratorHoldoutGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..5ad78c0e7eb89499a896073ae32ff2db783f23e9 GIT binary patch literal 1492 zcmV;_1uOcAP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1!+k{K~#8N?VNjP zm30`$kFJYdwu&(-LAO!tk}kT?WzzJ7n%f^5Nko@_3TjeIGNqhE686WIHL5>WP=o}P zcA<+#Q%5ikv=cFy~}em@}J-%s?M^B(qo z_WW*d!YbYK=MRtk@w+7EO!t$JNHfh(^9-$O5WDv7IVSzuRBFs?YngM`m=<2w`(A9m zi#S4~5)(|hMNmh&43};2esh|SNI$W&Oai9uN?#_a4GPn4EtnCLjn)GY9w8?>Ag$W%Kz&>{I~RJ*!)7H5){wi zz)F)gA2`}kE9n}&r@OX{Y37w}-%8dT>X%Fw{~@VsmY-}GA^aWyQB zN=y*hyDw~>6f`}*S5nW9VifOM+s_xt4KK@eElsASzp`#f67(JU*KY->DhWD8o3{19 zKaxAPyd`;X-!92tH@_PT!_uh41XF&uh3&!*TX|}1UoL$Y7{vqEXda_@kZZ%XrPj;! zEUp@qex`KxUF^3!U|<+^#it)hg7Ql5HwlP~VQExif}G!77`-QM8<3dMutXAIcT;a` zi6qdq=D;g&%j*ck=ag4TA1o{X*l&3Zm)1$bxZ0#(b=_*e z6$CYE|NgC#FBEK)9QFM^zF#ue^Td;dMkOZ5``x5#SnSN#CfL1TkKgie)wVD#D0}3- zyj&wj_Zn?d&7vjVN}Dz+Oj}d3K{5;&w&~z4lE7uysoobnS!h&Zg2>k=dOmeckGGNo z!$xhM6f|zz6!_eg7X??GG9CS6{xocbYNDJ{uZ!8CFA z_TOGvJx|g_SB6h^VU0>mK%5M6K%){9 z(5NIUxQtqtI3)@2TwCBe6$|i$aT=AFfJP1z%@`IBVF>-GHY@;_j=mp(awc~I=P#qKSA zB4OqtuQt_Zw=~}$`bKj48|O)4F9VHAOb~mEl+C(E?)2*VR_TL%+nfEC$G|V&(WqHK zpJdQrUoD=qJDadJ zjVClJF@YJY=$ca-6Q)EBs%z81uR0~MV#3 Date: Wed, 8 May 2024 17:34:00 +0500 Subject: [PATCH 058/197] Finished porting npc loops --- NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs | 6 +-- .../DraedonsArsenal/TeslaCannonShot.cs | 8 +-- Projectiles/Magic/BlackAnurianPlankton.cs | 12 ++--- Projectiles/Magic/EventHorizonStar.cs | 10 ++-- Projectiles/Magic/HadalUrnJellyfish.cs | 10 ++-- Projectiles/Magic/NebulaCloudCore.cs | 10 ++-- Projectiles/Magic/SHPB.cs | 8 +-- Projectiles/Magic/WulfrumBolt.cs | 4 +- Projectiles/Magic/WulfrumManaDrain.cs | 6 +-- .../Melee/BalefulHarvesterProjectile.cs | 14 +++-- Projectiles/Melee/CosmicShivTrail.cs | 7 ++- Projectiles/Melee/DivineHatchetBoomerang.cs | 9 ++-- Projectiles/Melee/DraconicSpark.cs | 8 +-- Projectiles/Melee/DragonRageStaff.cs | 5 +- Projectiles/Melee/Galaxia_AriesWrath.cs | 3 +- Projectiles/Melee/GalaxyBlast.cs | 5 +- Projectiles/Melee/GalaxyBlastType2.cs | 5 +- Projectiles/Melee/GalaxyBlastType3.cs | 5 +- .../MendedBiomeBlade_TrueGrovetendersTouch.cs | 3 +- Projectiles/Melee/StygianShieldThrown.cs | 7 ++- Projectiles/Melee/TenebreusTidesWaterSpear.cs | 5 +- Projectiles/Melee/TenebreusTidesWaterSword.cs | 5 +- Projectiles/Melee/Tornado.cs | 3 +- ...TrueBiomeBlade_LamentationsOfTheChained.cs | 3 +- Projectiles/Melee/UrchinSpikeFugu.cs | 5 +- Projectiles/Melee/VoidEssence.cs | 8 +-- Projectiles/Melee/WulfrumScrewdriverProj.cs | 4 +- Projectiles/Melee/Yoyos/ObliteratorYoyo.cs | 10 ++-- Projectiles/Melee/Yoyos/OracleYoyo.cs | 7 ++- Projectiles/Ranged/DrataliornusFlame.cs | 8 ++- Projectiles/Ranged/ExoLight.cs | 6 +-- Projectiles/Ranged/Nanomachine.cs | 12 ++--- Projectiles/Ranged/ThePackMissile.cs | 8 +-- .../Ranged/UniversalGenesisStarcaller.cs | 3 +- Projectiles/Ranged/VeriumBulletProj.cs | 3 +- Projectiles/Rogue/AuroradicalStar.cs | 11 ++-- Projectiles/Rogue/BlunderBoosterLightning.cs | 5 +- Projectiles/Rogue/BouncyBol.cs | 11 ++-- Projectiles/Rogue/CobaltEnergy.cs | 9 ++-- Projectiles/Rogue/DestructionBolt.cs | 8 +-- Projectiles/Rogue/ElementalDiskProj.cs | 3 +- Projectiles/Rogue/EnchantedAxeProj.cs | 5 +- Projectiles/Rogue/EquanimityDarkShard.cs | 7 ++- .../Rogue/FishboneBoomerangProjectile.cs | 10 ++-- Projectiles/Rogue/GildedDaggerProj.cs | 11 ++-- Projectiles/Rogue/GleamingDaggerProj.cs | 11 ++-- Projectiles/Rogue/IceStarProjectile.cs | 10 ++-- Projectiles/Rogue/IcebreakerHammer.cs | 5 +- Projectiles/Rogue/NanoblackSplit.cs | 7 ++- Projectiles/Rogue/NanoblackStealthSplit.cs | 7 ++- Projectiles/Rogue/NightsGazeStar.cs | 7 ++- Projectiles/Rogue/NychthemeronOrb.cs | 5 +- Projectiles/Rogue/RadiantStar2.cs | 22 ++++---- Projectiles/Rogue/RadiantStarKnife.cs | 3 +- Projectiles/Rogue/RealityRuptureMini.cs | 12 ++--- Projectiles/Rogue/ReaperProjectile.cs | 5 +- Projectiles/Rogue/RegulusEnergy.cs | 10 ++-- Projectiles/Rogue/ScourgeoftheDesertProj.cs | 6 +-- Projectiles/Rogue/ShatteredSunKnife.cs | 20 +++---- .../Rogue/ShatteredSunScorchedBlade.cs | 20 +++---- Projectiles/Rogue/ShockGrenadeBolt.cs | 5 +- Projectiles/Rogue/SpearofDestinyProjectile.cs | 12 ++--- Projectiles/Rogue/StellarKnifeProj.cs | 12 ++--- Projectiles/Rogue/SupernovaHoming.cs | 10 ++-- Projectiles/Rogue/TerraDiskProjectile.cs | 3 +- Projectiles/Rogue/TimeBoltKnife.cs | 10 ++-- Projectiles/Rogue/VeneratedKnife.cs | 5 +- Projectiles/Summon/AstrageldonSummon.cs | 3 +- Projectiles/Summon/BabyPlaguebringer.cs | 3 +- .../Summon/BrimstoneElementalMinion.cs | 3 +- .../Summon/CnidarianJellyfishOnTheString.cs | 8 +-- Projectiles/Summon/CosmicEnergySpiral.cs | 5 +- Projectiles/Summon/CosmicViperHomingRocket.cs | 10 ++-- Projectiles/Summon/Dreadmine.cs | 10 ++-- Projectiles/Summon/EndoCooperBody.cs | 3 +- Projectiles/Summon/EndoIceShard.cs | 6 +-- Projectiles/Summon/HowlsHeartFireball.cs | 3 +- Projectiles/Summon/IceSentry.cs | 5 +- Projectiles/Summon/OldDukeSharkVomit.cs | 8 +-- Projectiles/Summon/SakuraBullet.cs | 3 +- Projectiles/Summon/SepulcherMinion.cs | 12 ++--- Projectiles/Summon/SilvaCrystal.cs | 7 +-- Projectiles/Summon/SolarGod.cs | 3 +- Projectiles/Summon/SolarPixie.cs | 3 +- Projectiles/Summon/Spikecrag.cs | 8 +-- Projectiles/Summon/StormjawBaby.cs | 8 ++- Projectiles/Summon/Umbrella/MagicBird.cs | 8 +-- Projectiles/Summon/Umbrella/MagicUmbrella.cs | 9 ++-- Projectiles/Summon/VictideSeaSnail.cs | 3 +- .../Summon/VoidConcentrationBlackhole.cs | 12 ++--- Projectiles/Summon/WaterElementalMinion.cs | 10 ++-- Projectiles/Summon/WulfrumEnergyBurst.cs | 4 +- Projectiles/Summon/WulfrumFusionBolt.cs | 4 +- Projectiles/Typeless/CursorProj.cs | 8 +-- Projectiles/Typeless/CursorProjSplit.cs | 8 +-- Projectiles/Typeless/KelvinCatalystStar.cs | 10 ++-- Projectiles/Typeless/LunicBeam.cs | 8 +-- Projectiles/Typeless/MagnusBeam.cs | 8 +-- Projectiles/Typeless/OmegaBlueTentacle.cs | 5 +- Skies/CryogenSky.cs | 10 +--- Skies/DrunkCrabScreenShaderData.cs | 20 +------ Skies/SCalScreenShaderData.cs | 10 +--- Skies/SCalSky.cs | 10 +--- Skies/StormWeaverFlashSky.cs | 10 +--- TileEntities/TEPlayerFireTurret.cs | 7 ++- TileEntities/TEPlayerIceTurret.cs | 7 ++- TileEntities/TEPlayerLabTurret.cs | 7 ++- TileEntities/TEPlayerLaserTurret .cs | 7 ++- TileEntities/TEPlayerOnyxTurret.cs | 7 ++- TileEntities/TEPlayerPlagueTurret.cs | 7 ++- TileEntities/TEPlayerWaterTurret.cs | 7 ++- UI/BossHealthBarManager.cs | 46 ++++++++-------- UI/BossRushUI.cs | 10 ++-- .../EnchantmentManager.cs | 4 +- UI/VanillaBossBars/ExoMechsBossBar.cs | 53 +++++++++---------- UI/VanillaBossBars/LeviathanAnahitaBossBar.cs | 16 +++--- Utilities/DropHelper.cs | 12 ++--- Utilities/NPCUtils.cs | 20 +++---- Utilities/ProjectileUtils.cs | 9 ++-- 119 files changed, 424 insertions(+), 585 deletions(-) diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index 75c8d4c46a..c4b29a59c4 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -627,14 +627,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (Main.getGoodWorld) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].aiStyle == NPCAIStyleID.PlanteraHook) + if (n.aiStyle == NPCAIStyleID.PlanteraHook) { for (int j = 0; j < totalTentacles / 2 - 1; j++) { int hookIndex = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI); - Main.npc[hookIndex].ai[3] = i + 1; + Main.npc[hookIndex].ai[3] = n.whoAmI + 1; } } } diff --git a/Projectiles/DraedonsArsenal/TeslaCannonShot.cs b/Projectiles/DraedonsArsenal/TeslaCannonShot.cs index a9ac5ec782..91dfa10a9d 100644 --- a/Projectiles/DraedonsArsenal/TeslaCannonShot.cs +++ b/Projectiles/DraedonsArsenal/TeslaCannonShot.cs @@ -96,14 +96,14 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { if (arcs < 10) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].CanBeChasedBy(Projectile, false) || !Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (!n.CanBeChasedBy(Projectile, false) || !Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) continue; - if (Projectile.Center.ManhattanDistance(Main.npc[i].Center) < 600f) + if (Projectile.Center.ManhattanDistance(n.Center) < 600f) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(Main.npc[i].Center) * 2f, Projectile.type, (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.6f, Projectile.owner, 0f, -1f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(n.Center) * 2f, Projectile.type, (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.6f, Projectile.owner, 0f, -1f); Projectile.ai[1] = 60f; diff --git a/Projectiles/Magic/BlackAnurianPlankton.cs b/Projectiles/Magic/BlackAnurianPlankton.cs index e60b867d46..321fb1c5bb 100644 --- a/Projectiles/Magic/BlackAnurianPlankton.cs +++ b/Projectiles/Magic/BlackAnurianPlankton.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ModLoader; @@ -57,14 +57,14 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.ai[0] > 30f) { Projectile.ai[0] = 30f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && !Main.npc[i].wet) + if (n.CanBeChasedBy(Projectile, false) && !n.wet) { - float npcX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcX = n.position.X + (float)(n.width / 2); + float npcY = n.position.Y + (float)(n.height / 2); float npcDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcY); - if (npcDist < 800f && npcDist < homingRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) + if (npcDist < 800f && npcDist < homingRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { homingRange = npcDist; projX = npcX; diff --git a/Projectiles/Magic/EventHorizonStar.cs b/Projectiles/Magic/EventHorizonStar.cs index e5ad6b45e2..98a656a697 100644 --- a/Projectiles/Magic/EventHorizonStar.cs +++ b/Projectiles/Magic/EventHorizonStar.cs @@ -93,15 +93,15 @@ namespace CalamityMod.Projectiles.Magic float inertia = 25f; float homingSpeed = 23f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (homingRange + extraDistance)) + if (Vector2.Distance(n.Center, Projectile.Center) < (homingRange + extraDistance)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Magic/HadalUrnJellyfish.cs b/Projectiles/Magic/HadalUrnJellyfish.cs index 4d4aef0ef4..62e5e44d96 100644 --- a/Projectiles/Magic/HadalUrnJellyfish.cs +++ b/Projectiles/Magic/HadalUrnJellyfish.cs @@ -75,17 +75,17 @@ namespace CalamityMod.Projectiles.Magic //Detect if any enemies are very close int maxDistance = 10; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (Main.npc[i].width / 2) + (Main.npc[i].height / 2); + float extraDistance = (n.width / 2) + (n.height / 2); bool canHit = true; if (extraDistance < maxDistance) - canHit = Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1); + canHit = Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1); - if (Projectile.WithinRange(Main.npc[i].Center, maxDistance + extraDistance) && canHit) + if (Projectile.WithinRange(n.Center, maxDistance + extraDistance) && canHit) { neartarget = true; } diff --git a/Projectiles/Magic/NebulaCloudCore.cs b/Projectiles/Magic/NebulaCloudCore.cs index d6666420d1..ed319b9e30 100644 --- a/Projectiles/Magic/NebulaCloudCore.cs +++ b/Projectiles/Magic/NebulaCloudCore.cs @@ -169,17 +169,17 @@ namespace CalamityMod.Projectiles.Magic int npcTrack = 0; if (Projectile.ai[1] == 0f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(this)) + if (n.CanBeChasedBy(this)) { - Vector2 npcCenter = Main.npc[i].Center; - if (Projectile.Distance(npcCenter) < homingRange && Collision.CanHit(new Vector2(Projectile.position.X + Projectile.width / 2, Projectile.position.Y + Projectile.height / 2), 1, 1, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) + Vector2 npcCenter = n.Center; + if (Projectile.Distance(npcCenter) < homingRange && Collision.CanHit(new Vector2(Projectile.position.X + Projectile.width / 2, Projectile.position.Y + Projectile.height / 2), 1, 1, n.position, n.width, n.height)) { homingRange = Projectile.Distance(npcCenter); projCenter = npcCenter; isHoming = true; - npcTrack = i; + npcTrack = n.whoAmI; } } } diff --git a/Projectiles/Magic/SHPB.cs b/Projectiles/Magic/SHPB.cs index 0e15e88b72..27a7ba82ed 100644 --- a/Projectiles/Magic/SHPB.cs +++ b/Projectiles/Magic/SHPB.cs @@ -68,12 +68,12 @@ namespace CalamityMod.Projectiles.Magic float projY = Projectile.Center.Y; float explodeRange = 250f; bool canExplode = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - float npcX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcX = n.position.X + (float)(n.width / 2); + float npcY = n.position.Y + (float)(n.height / 2); float npcDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcY); if (npcDist < explodeRange) { diff --git a/Projectiles/Magic/WulfrumBolt.cs b/Projectiles/Magic/WulfrumBolt.cs index cfc61cf935..3fc17e8371 100644 --- a/Projectiles/Magic/WulfrumBolt.cs +++ b/Projectiles/Magic/WulfrumBolt.cs @@ -67,10 +67,8 @@ namespace CalamityMod.Projectiles.Magic float bestScore = 0; NPC bestTarget = null; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC potentialTarget in Main.ActiveNPCs) { - NPC potentialTarget = Main.npc[i]; - if (!potentialTarget.CanBeChasedBy(null, false)) continue; diff --git a/Projectiles/Magic/WulfrumManaDrain.cs b/Projectiles/Magic/WulfrumManaDrain.cs index 91f819ab36..94200a851e 100644 --- a/Projectiles/Magic/WulfrumManaDrain.cs +++ b/Projectiles/Magic/WulfrumManaDrain.cs @@ -94,11 +94,9 @@ namespace CalamityMod.Projectiles.Magic { float collisionPoint = 0f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC struckNPC in Main.ActiveNPCs) { - NPC struckNPC = Main.npc[i]; - - if (!struckNPC.active || struckNPC.townNPC || struckNPC.friendly) + if (struckNPC.townNPC || struckNPC.friendly) continue; float distance = struckNPC.Distance(Projectile.Center); diff --git a/Projectiles/Melee/BalefulHarvesterProjectile.cs b/Projectiles/Melee/BalefulHarvesterProjectile.cs index 6abc9e648a..b97798b738 100644 --- a/Projectiles/Melee/BalefulHarvesterProjectile.cs +++ b/Projectiles/Melee/BalefulHarvesterProjectile.cs @@ -73,21 +73,19 @@ namespace CalamityMod.Projectiles.Melee else { float homingRange = 1000f; - int inc; - for (int i = 0; i < Main.maxNPCs; i = inc + 1) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float npcX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcX = n.position.X + (float)(n.width / 2); + float npcY = n.position.Y + (float)(n.height / 2); float npcDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcY); - if (npcDist < homingRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) + if (npcDist < homingRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { homingRange = npcDist; - Projectile.ai[0] = (float)i; + Projectile.ai[0] = (float)n.whoAmI; } } - inc = i; } } diff --git a/Projectiles/Melee/CosmicShivTrail.cs b/Projectiles/Melee/CosmicShivTrail.cs index 01c7d802d6..ce3d12178f 100644 --- a/Projectiles/Melee/CosmicShivTrail.cs +++ b/Projectiles/Melee/CosmicShivTrail.cs @@ -115,10 +115,9 @@ namespace CalamityMod.Projectiles.Melee return; Player owner = Main.player[Projectile.owner]; - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC target in Main.ActiveNPCs) { - NPC target = Main.npc[i]; - if (!target.active || target.dontTakeDamage || target.friendly) + if (target.dontTakeDamage || target.friendly) continue; // Shock any valid target within range. Check all four corners of their hitbox. @@ -137,7 +136,7 @@ namespace CalamityMod.Projectiles.Melee target.StrikeNPC(target.CalculateHitInfo(damage, 0, crit, 0)); if (Main.netMode != NetmodeID.SinglePlayer) - NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, i, damage, 0f, 0f, crit ? 1 : 0, 0, 0); + NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, target.whoAmI, damage, 0f, 0f, crit ? 1 : 0, 0, 0); } } } diff --git a/Projectiles/Melee/DivineHatchetBoomerang.cs b/Projectiles/Melee/DivineHatchetBoomerang.cs index bb9734bcd1..5f92f2f2dd 100644 --- a/Projectiles/Melee/DivineHatchetBoomerang.cs +++ b/Projectiles/Melee/DivineHatchetBoomerang.cs @@ -165,21 +165,20 @@ namespace CalamityMod.Projectiles.Melee //find a nearby NPC to track float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { bool hasHitNPC = false; for (int j = 0; j < previousNPCs.Count; j++) { - if (previousNPCs[j] == i) + if (previousNPCs[j] == npc.whoAmI) { hasHitNPC = true; } } - NPC npc = Main.npc[i]; if (npc == target) { - previousNPCs.Add(i); + previousNPCs.Add(npc.whoAmI); } if (npc.CanBeChasedBy(Projectile, false) && npc != target && !hasHitNPC) { @@ -187,7 +186,7 @@ namespace CalamityMod.Projectiles.Melee if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Melee/DraconicSpark.cs b/Projectiles/Melee/DraconicSpark.cs index 0f0d594376..fc168a7351 100644 --- a/Projectiles/Melee/DraconicSpark.cs +++ b/Projectiles/Melee/DraconicSpark.cs @@ -46,12 +46,12 @@ namespace CalamityMod.Projectiles.Melee float targetY = Projectile.Center.Y; bool foundTarget = false; float maxRange = MaxHomingRange; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - float iterCenterX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float iterCenterY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float iterCenterX = n.position.X + (float)(n.width / 2); + float iterCenterY = n.position.Y + (float)(n.height / 2); float dist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - iterCenterX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - iterCenterY); if (dist < maxRange) { diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index 5973f399e6..20943dfd06 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -191,13 +191,12 @@ namespace CalamityMod.Projectiles.Melee Rectangle myRect = Projectile.Hitbox; if (Projectile.owner == Main.myPlayer) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; bool voodooDolls = Projectile.owner < Main.maxPlayers && (npc.type == NPCID.Guide && player.killGuide || npc.type == NPCID.Clothier && player.killClothier); bool friendlyProjs = Projectile.friendly && (!npc.friendly || voodooDolls); bool hostileProjs = Projectile.hostile && npc.friendly && !npc.dontTakeDamageFromHostiles; - if (npc.active && !npc.dontTakeDamage && (friendlyProjs || hostileProjs) && (Projectile.owner < 0 || npc.immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1)) + if (!npc.dontTakeDamage && (friendlyProjs || hostileProjs) && (Projectile.owner < 0 || npc.immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1)) { if (npc.noTileCollide || !Projectile.ownerHitCheck || (ProjectileLoader.CanHitNPC(Projectile, npc) ?? false)) { diff --git a/Projectiles/Melee/Galaxia_AriesWrath.cs b/Projectiles/Melee/Galaxia_AriesWrath.cs index d0e7cd2ecc..b2e1e6e179 100644 --- a/Projectiles/Melee/Galaxia_AriesWrath.cs +++ b/Projectiles/Melee/Galaxia_AriesWrath.cs @@ -88,9 +88,8 @@ namespace CalamityMod.Projectiles.Melee { float longestReach = MaxProjReach; NPC target = null; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (!excludedTargets.Contains(npc) && npc.CanBeChasedBy() && !npc.friendly && !npc.townNPC) { float distance = Vector2.Distance(hitFrom, npc.Center); diff --git a/Projectiles/Melee/GalaxyBlast.cs b/Projectiles/Melee/GalaxyBlast.cs index fffe60486e..40daf00f84 100644 --- a/Projectiles/Melee/GalaxyBlast.cs +++ b/Projectiles/Melee/GalaxyBlast.cs @@ -79,16 +79,15 @@ namespace CalamityMod.Projectiles.Melee { int npcTracker = -1; float homingRange = 60f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; if (nPC.CanBeChasedBy(Projectile, false)) { float npcDistance = Projectile.Distance(nPC.Center); if (npcDistance < homingRange && Collision.CanHitLine(Projectile.Center, 0, 0, nPC.Center, 0, 0)) { homingRange = npcDistance; - npcTracker = i; + npcTracker = nPC.whoAmI; } } } diff --git a/Projectiles/Melee/GalaxyBlastType2.cs b/Projectiles/Melee/GalaxyBlastType2.cs index d48506f7bc..972ec53f1c 100644 --- a/Projectiles/Melee/GalaxyBlastType2.cs +++ b/Projectiles/Melee/GalaxyBlastType2.cs @@ -80,16 +80,15 @@ namespace CalamityMod.Projectiles.Melee { int npcTracker = -1; float homingRange = 60f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; if (nPC.CanBeChasedBy(Projectile, false)) { float npcDistance = Projectile.Distance(nPC.Center); if (npcDistance < homingRange && Collision.CanHitLine(Projectile.Center, 0, 0, nPC.Center, 0, 0)) { homingRange = npcDistance; - npcTracker = i; + npcTracker = nPC.whoAmI; } } } diff --git a/Projectiles/Melee/GalaxyBlastType3.cs b/Projectiles/Melee/GalaxyBlastType3.cs index 42903a8258..4555006dfc 100644 --- a/Projectiles/Melee/GalaxyBlastType3.cs +++ b/Projectiles/Melee/GalaxyBlastType3.cs @@ -79,16 +79,15 @@ namespace CalamityMod.Projectiles.Melee { int npcTracker = -1; float homingRange = 60f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; if (nPC.CanBeChasedBy(Projectile, false)) { float npcDistance = Projectile.Distance(nPC.Center); if (npcDistance < homingRange && Collision.CanHitLine(Projectile.Center, 0, 0, nPC.Center, 0, 0)) { homingRange = npcDistance; - npcTracker = i; + npcTracker = nPC.whoAmI; } } } diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs index fe00ddb07e..f48f6e2a5e 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs @@ -132,9 +132,8 @@ namespace CalamityMod.Projectiles.Melee { float longestReach = MaxTangleReach; NPC target = null; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (!excludedTargets.Contains(npc) && npc.CanBeChasedBy() && !npc.friendly && !npc.townNPC) { float distance = Vector2.Distance(hitFrom, npc.Center); diff --git a/Projectiles/Melee/StygianShieldThrown.cs b/Projectiles/Melee/StygianShieldThrown.cs index bea6327383..72d22920b4 100644 --- a/Projectiles/Melee/StygianShieldThrown.cs +++ b/Projectiles/Melee/StygianShieldThrown.cs @@ -115,17 +115,16 @@ namespace CalamityMod.Projectiles.Melee // Find the closest NPC targetable float range = MaxHomingRange; int targetNPC = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC target in Main.ActiveNPCs) { - NPC target = Main.npc[i]; - if (!target.CanBeChasedBy(Projectile) || PreviousNPCs.Contains(i)) + if (!target.CanBeChasedBy(Projectile) || PreviousNPCs.Contains(target.whoAmI)) continue; float distance = Vector2.Distance(target.Center, Projectile.Center); if (distance < range && Collision.CanHit(Projectile, target)) { range = distance; - targetNPC = i; + targetNPC = target.whoAmI; } } diff --git a/Projectiles/Melee/TenebreusTidesWaterSpear.cs b/Projectiles/Melee/TenebreusTidesWaterSpear.cs index 05a3840fc4..ed67f22819 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSpear.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSpear.cs @@ -121,9 +121,8 @@ namespace CalamityMod.Projectiles.Melee int whoAmI = -1; Vector2 targetSpot = Projectile.Center; float detectRange = 700f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(npc.Center, Projectile.Center); @@ -131,7 +130,7 @@ namespace CalamityMod.Projectiles.Melee { detectRange = targetDist; targetSpot = npc.Center; - whoAmI = i; + whoAmI = npc.whoAmI; } } } diff --git a/Projectiles/Melee/TenebreusTidesWaterSword.cs b/Projectiles/Melee/TenebreusTidesWaterSword.cs index f4b305e391..b4227689fc 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSword.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSword.cs @@ -103,9 +103,8 @@ namespace CalamityMod.Projectiles.Melee int whoAmI = -1; Vector2 targetSpot = Projectile.Center; float detectRange = 700f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(npc.Center, Projectile.Center); @@ -113,7 +112,7 @@ namespace CalamityMod.Projectiles.Melee { detectRange = targetDist; targetSpot = npc.Center; - whoAmI = i; + whoAmI = npc.whoAmI; } } } diff --git a/Projectiles/Melee/Tornado.cs b/Projectiles/Melee/Tornado.cs index 8a0fe3f3eb..6e1b19a6df 100644 --- a/Projectiles/Melee/Tornado.cs +++ b/Projectiles/Melee/Tornado.cs @@ -82,9 +82,8 @@ namespace CalamityMod.Projectiles.Melee } float projX = Projectile.Center.X; float projY = Projectile.Center.Y; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, npc.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) { float npcCenterX = npc.position.X + (float)(npc.width / 2); diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index 34e6c90b6f..cde782bee1 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -142,9 +142,8 @@ namespace CalamityMod.Projectiles.Melee { float longestReach = MaxTangleReach; NPC target = null; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (!excludedTargets.Contains(npc) && npc.CanBeChasedBy() && !npc.friendly && !npc.townNPC) { float distance = Vector2.Distance(hitFrom, npc.Center); diff --git a/Projectiles/Melee/UrchinSpikeFugu.cs b/Projectiles/Melee/UrchinSpikeFugu.cs index 32fa5908ae..301d95a46a 100644 --- a/Projectiles/Melee/UrchinSpikeFugu.cs +++ b/Projectiles/Melee/UrchinSpikeFugu.cs @@ -29,15 +29,14 @@ namespace CalamityMod.Projectiles.Melee { float maxRange = 100f; int npcIndex = -1; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, npc.position, npc.width, npc.height)) { float targetDist = (npc.Center - Projectile.Center).Length(); if (targetDist < maxRange) { - npcIndex = i; + npcIndex = npc.whoAmI; maxRange = targetDist; } } diff --git a/Projectiles/Melee/VoidEssence.cs b/Projectiles/Melee/VoidEssence.cs index f04b58b948..692aea191f 100644 --- a/Projectiles/Melee/VoidEssence.cs +++ b/Projectiles/Melee/VoidEssence.cs @@ -88,19 +88,15 @@ namespace CalamityMod.Projectiles.Melee int targetIdx = -1; float maxHomingRange = 400f; bool hasHomingTarget = false; - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc == null || !npc.active) - continue; - // Won't home in through walls and won't chase invulnerable targets. if (npc.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, npc.Center, 1, 1)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < maxHomingRange) { - targetIdx = i; + targetIdx = npc.whoAmI; maxHomingRange = dist; hasHomingTarget = true; } diff --git a/Projectiles/Melee/WulfrumScrewdriverProj.cs b/Projectiles/Melee/WulfrumScrewdriverProj.cs index 055f9e5eaf..e06f69f78e 100644 --- a/Projectiles/Melee/WulfrumScrewdriverProj.cs +++ b/Projectiles/Melee/WulfrumScrewdriverProj.cs @@ -132,10 +132,8 @@ namespace CalamityMod.Projectiles.Melee float bestScore = 0; NPC bestTarget = null; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC potentialTarget in Main.ActiveNPCs) { - NPC potentialTarget = Main.npc[i]; - if (!potentialTarget.CanBeChasedBy(null, false)) continue; diff --git a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs index d630b7e18f..216ed1159c 100644 --- a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs @@ -65,19 +65,15 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { List targets = new List(); float laserRange = 300f; - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC n in Main.ActiveNPCs) { - ref NPC n = ref Main.npc[i]; - if (n is null || !n.active) - continue; - if (n.CanBeChasedBy(Projectile, false) && (n.Center - Projectile.Center).Length() <= laserRange && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - targets.Add(i); + targets.Add(n.whoAmI); // Bosses are added 5 times instead of 1 so that they are preferentially but not exclusively targeted. if (n.boss) for (int j = 0; j < 4; ++j) - targets.Add(i); + targets.Add(n.whoAmI); } } if (targets.Count == 0) diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index 7c0b87a262..54db87c83f 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -221,10 +221,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos return; Player owner = Main.player[Projectile.owner]; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC target in Main.ActiveNPCs) { - NPC target = Main.npc[i]; - if (!target.active || target.dontTakeDamage || target.friendly) + if (target.dontTakeDamage || target.friendly) continue; // Shock any valid target within range. Check all four corners of their hitbox. @@ -241,7 +240,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos int finalDamage = (int)owner.GetTotalDamage().ApplyTo(baseDamage); if (Projectile.owner == Main.myPlayer) { - Projectile p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), finalDamage, 0f, Projectile.owner, i); + Projectile p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), finalDamage, 0f, Projectile.owner, target.whoAmI); if (p.whoAmI.WithinBounds(Main.maxProjectiles)) p.DamageType = DamageClass.MeleeNoSpeed; } diff --git a/Projectiles/Ranged/DrataliornusFlame.cs b/Projectiles/Ranged/DrataliornusFlame.cs index c80e073847..d898a477a0 100644 --- a/Projectiles/Ranged/DrataliornusFlame.cs +++ b/Projectiles/Ranged/DrataliornusFlame.cs @@ -73,11 +73,9 @@ namespace CalamityMod.Projectiles.Ranged int possibleTarget = -1; float closestDistance = 700f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - - if (npc.active && npc.chaseable && npc.lifeMax > 5 && !npc.dontTakeDamage && !npc.friendly && + if (npc.chaseable && npc.lifeMax > 5 && !npc.dontTakeDamage && !npc.friendly && !npc.immortal && Collision.CanHit(Projectile.Center, 0, 0, npc.Center, 0, 0)) { float distance = Vector2.Distance(Projectile.Center, npc.Center); @@ -85,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged if (closestDistance > distance) { closestDistance = distance; - possibleTarget = i; + possibleTarget = npc.whoAmI; } } } diff --git a/Projectiles/Ranged/ExoLight.cs b/Projectiles/Ranged/ExoLight.cs index 25dc0f5244..0971c27bc8 100644 --- a/Projectiles/Ranged/ExoLight.cs +++ b/Projectiles/Ranged/ExoLight.cs @@ -71,10 +71,10 @@ namespace CalamityMod.Projectiles.Ranged Projectile.scale = MathHelper.Lerp(0.001f, 1f, Utils.GetLerpValue(0f, 25f, Time, true)); if (Projectile.localAI[0] == 0f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile.GetSource_FromThis(), false)) - NPCDestination = Main.npc[i].Center + Main.npc[i].velocity * 5f; + if (n.CanBeChasedBy(Projectile.GetSource_FromThis(), false)) + NPCDestination = n.Center + n.velocity * 5f; } InitialCenter = Projectile.Center; Projectile.localAI[0] = 1f; diff --git a/Projectiles/Ranged/Nanomachine.cs b/Projectiles/Ranged/Nanomachine.cs index 75f9d5c6a7..d6410d7a2a 100644 --- a/Projectiles/Ranged/Nanomachine.cs +++ b/Projectiles/Ranged/Nanomachine.cs @@ -84,20 +84,20 @@ namespace CalamityMod.Projectiles.Ranged int targetID = 0; if (Projectile.ai[1] == 0f) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && (Projectile.ai[1] == 0f || Projectile.ai[1] == (float)(i + 1))) + if (n.CanBeChasedBy(Projectile, false) && (Projectile.ai[1] == 0f || Projectile.ai[1] == (float)(i + 1))) { - float targetX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float targetY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float targetX = n.position.X + (float)(n.width / 2); + float targetY = n.position.Y + (float)(n.height / 2); float targetDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - targetX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - targetY); - if (targetDist < constant && Collision.CanHit(new Vector2(Projectile.position.X + (float)(Projectile.width / 2), Projectile.position.Y + (float)(Projectile.height / 2)), 1, 1, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) + if (targetDist < constant && Collision.CanHit(new Vector2(Projectile.position.X + (float)(Projectile.width / 2), Projectile.position.Y + (float)(Projectile.height / 2)), 1, 1, n.position, n.width, n.height)) { constant = targetDist; projX = targetX; projY = targetY; canHit = true; - targetID = i; + targetID = n.whoAmI; } } } diff --git a/Projectiles/Ranged/ThePackMissile.cs b/Projectiles/Ranged/ThePackMissile.cs index 4275d0a5f7..75b884a75a 100644 --- a/Projectiles/Ranged/ThePackMissile.cs +++ b/Projectiles/Ranged/ThePackMissile.cs @@ -36,11 +36,11 @@ namespace CalamityMod.Projectiles.Ranged Vector2 targetCenter = Projectile.Center; float minTargetDistance = 2500f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - float distanceFromTarget = Projectile.Center.ManhattanDistance(Main.npc[i].Center); + float distanceFromTarget = Projectile.Center.ManhattanDistance(n.Center); if (distanceFromTarget < 200f) { if (Projectile.owner == Main.myPlayer) @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged else if (distanceFromTarget < minTargetDistance) { minTargetDistance = distanceFromTarget; - targetCenter = Main.npc[i].Center; + targetCenter = n.Center; homeIn = true; } } diff --git a/Projectiles/Ranged/UniversalGenesisStarcaller.cs b/Projectiles/Ranged/UniversalGenesisStarcaller.cs index 8fedbd47d4..3fe690c60b 100644 --- a/Projectiles/Ranged/UniversalGenesisStarcaller.cs +++ b/Projectiles/Ranged/UniversalGenesisStarcaller.cs @@ -87,9 +87,8 @@ namespace CalamityMod.Projectiles.Ranged bool bossFound = false; int life = 0; Vector2 targetVec = Projectile.Center; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (bossFound && !npc.IsABoss()) continue; if (npc.CanBeChasedBy(Projectile, false)) diff --git a/Projectiles/Ranged/VeriumBulletProj.cs b/Projectiles/Ranged/VeriumBulletProj.cs index c88c124d7d..58860907cd 100644 --- a/Projectiles/Ranged/VeriumBulletProj.cs +++ b/Projectiles/Ranged/VeriumBulletProj.cs @@ -84,9 +84,8 @@ namespace CalamityMod.Projectiles.Ranged if (!homeIn) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float extraDistance = (npc.width / 2) + (npc.height / 2); diff --git a/Projectiles/Rogue/AuroradicalStar.cs b/Projectiles/Rogue/AuroradicalStar.cs index 30c8ad5c1c..e68ea44f36 100644 --- a/Projectiles/Rogue/AuroradicalStar.cs +++ b/Projectiles/Rogue/AuroradicalStar.cs @@ -72,16 +72,15 @@ namespace CalamityMod.Projectiles.Rogue //Home in float maxDistance = 800f; int targetIndex = -1; - int i; - for (i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (Main.npc[i].width / 2) + (Main.npc[i].height / 2); + float extraDistance = (n.width / 2) + (n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance)) { - targetIndex = i; + targetIndex = n.whoAmI; break; } } diff --git a/Projectiles/Rogue/BlunderBoosterLightning.cs b/Projectiles/Rogue/BlunderBoosterLightning.cs index a6c2dfa5ae..191a430104 100644 --- a/Projectiles/Rogue/BlunderBoosterLightning.cs +++ b/Projectiles/Rogue/BlunderBoosterLightning.cs @@ -57,16 +57,15 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = -1; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/BouncyBol.cs b/Projectiles/Rogue/BouncyBol.cs index 0d312c0f8d..35e9a14dd2 100644 --- a/Projectiles/Rogue/BouncyBol.cs +++ b/Projectiles/Rogue/BouncyBol.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; using Terraria.ID; @@ -47,21 +47,20 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { bool hasHitNPC = false; for (int j = 0; j < previousNPCs.Count; j++) { - if (previousNPCs[j] == i) + if (previousNPCs[j] == npc.whoAmI) { hasHitNPC = true; } } - NPC npc = Main.npc[i]; if (npc == target) { - previousNPCs.Add(i); + previousNPCs.Add(npc.whoAmI); } if (npc.CanBeChasedBy(Projectile, false) && npc != target && !hasHitNPC) { @@ -69,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/CobaltEnergy.cs b/Projectiles/Rogue/CobaltEnergy.cs index 69d3ed5d4e..eab8edce99 100644 --- a/Projectiles/Rogue/CobaltEnergy.cs +++ b/Projectiles/Rogue/CobaltEnergy.cs @@ -59,21 +59,20 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { bool hasHitNPC = false; for (int j = 0; j < previousNPCs.Count; j++) { - if (previousNPCs[j] == i) + if (previousNPCs[j] == npc.whoAmI) { hasHitNPC = true; } } - NPC npc = Main.npc[i]; if (npc == target) { - previousNPCs.Add(i); + previousNPCs.Add(npc.whoAmI); } if (npc.CanBeChasedBy(Projectile, false) && npc != target && !hasHitNPC) { @@ -81,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/DestructionBolt.cs b/Projectiles/Rogue/DestructionBolt.cs index d7dad8bd93..fd67b5fbff 100644 --- a/Projectiles/Rogue/DestructionBolt.cs +++ b/Projectiles/Rogue/DestructionBolt.cs @@ -55,16 +55,16 @@ namespace CalamityMod.Projectiles.Rogue { int index = -1; float otherConstant = 300f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - Vector2 npcCenter = Main.npc[i].Center; + Vector2 npcCenter = n.Center; float targetDist = Vector2.Distance(npcCenter, Projectile.Center); if (targetDist < otherConstant && index == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, npcCenter, 1, 1)) { otherConstant = targetDist; - index = i; + index = n.whoAmI; } } } diff --git a/Projectiles/Rogue/ElementalDiskProj.cs b/Projectiles/Rogue/ElementalDiskProj.cs index 8f2c0c7268..3f90caa6b7 100644 --- a/Projectiles/Rogue/ElementalDiskProj.cs +++ b/Projectiles/Rogue/ElementalDiskProj.cs @@ -116,9 +116,8 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = 300f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float extraDistance = npc.width / 2 + npc.height / 2; diff --git a/Projectiles/Rogue/EnchantedAxeProj.cs b/Projectiles/Rogue/EnchantedAxeProj.cs index e983fd061d..9501976f77 100644 --- a/Projectiles/Rogue/EnchantedAxeProj.cs +++ b/Projectiles/Rogue/EnchantedAxeProj.cs @@ -73,16 +73,15 @@ namespace CalamityMod.Projectiles.Rogue float minDist = 999f; int index = 0; // Get the closest enemy to the axe - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/EquanimityDarkShard.cs b/Projectiles/Rogue/EquanimityDarkShard.cs index 46fcc5ab9f..5b056ca4a0 100644 --- a/Projectiles/Rogue/EquanimityDarkShard.cs +++ b/Projectiles/Rogue/EquanimityDarkShard.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; @@ -30,16 +30,15 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/FishboneBoomerangProjectile.cs b/Projectiles/Rogue/FishboneBoomerangProjectile.cs index b49727d24e..5786c00fd0 100644 --- a/Projectiles/Rogue/FishboneBoomerangProjectile.cs +++ b/Projectiles/Rogue/FishboneBoomerangProjectile.cs @@ -168,18 +168,18 @@ namespace CalamityMod.Projectiles.Rogue float closestNPCDistance = 10000f; float targettingDistance = 400f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (i == target.whoAmI) + if (n.whoAmI == target.whoAmI) continue; - if (Main.npc[i].CanBeChasedBy(Projectile)) + if (n.CanBeChasedBy(Projectile)) { - float potentialNewDistance = (Projectile.Center - Main.npc[i].Center).Length(); + float potentialNewDistance = (Projectile.Center - n.Center).Length(); if (potentialNewDistance < targettingDistance && potentialNewDistance < closestNPCDistance) { closestNPCDistance = potentialNewDistance; - newTarget = Main.npc[i]; + newTarget = n; } } } diff --git a/Projectiles/Rogue/GildedDaggerProj.cs b/Projectiles/Rogue/GildedDaggerProj.cs index 56a0f11ac7..1c85297dee 100644 --- a/Projectiles/Rogue/GildedDaggerProj.cs +++ b/Projectiles/Rogue/GildedDaggerProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.Collections.Generic; using Terraria; @@ -70,21 +70,20 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { bool hasHitNPC = false; for (int j = 0; j < previousNPCs.Count; j++) { - if (previousNPCs[j] == i) + if (previousNPCs[j] == npc.whoAmI) { hasHitNPC = true; } } - NPC npc = Main.npc[i]; if (npc == target) { - previousNPCs.Add(i); + previousNPCs.Add(npc.whoAmI); } if (npc.CanBeChasedBy(Projectile, false) && npc != target && !hasHitNPC) { @@ -92,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/GleamingDaggerProj.cs b/Projectiles/Rogue/GleamingDaggerProj.cs index ad36a49670..447bf599d0 100644 --- a/Projectiles/Rogue/GleamingDaggerProj.cs +++ b/Projectiles/Rogue/GleamingDaggerProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.Collections.Generic; using Terraria; @@ -70,21 +70,20 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { bool hasHitNPC = false; for (int j = 0; j < previousNPCs.Count; j++) { - if (previousNPCs[j] == i) + if (previousNPCs[j] == npc.whoAmI) { hasHitNPC = true; } } - NPC npc = Main.npc[i]; if (npc == target) { - previousNPCs.Add(i); + previousNPCs.Add(npc.whoAmI); } if (npc.CanBeChasedBy(Projectile, false) && npc != target && !hasHitNPC) { @@ -92,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/IceStarProjectile.cs b/Projectiles/Rogue/IceStarProjectile.cs index 1756a355ab..549445eefe 100644 --- a/Projectiles/Rogue/IceStarProjectile.cs +++ b/Projectiles/Rogue/IceStarProjectile.cs @@ -51,15 +51,15 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = Projectile.Calamity().stealthStrike ? 800f : 400f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Rogue/IcebreakerHammer.cs b/Projectiles/Rogue/IcebreakerHammer.cs index c383c2a93e..cfc9332937 100644 --- a/Projectiles/Rogue/IcebreakerHammer.cs +++ b/Projectiles/Rogue/IcebreakerHammer.cs @@ -64,10 +64,9 @@ namespace CalamityMod.Projectiles.Rogue int buffType = ModContent.BuffType(); float radius = 112f; // 7 blocks - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[i]; - if (nPC.active && !nPC.dontTakeDamage && !nPC.buffImmune[buffType] && Vector2.Distance(Projectile.Center, nPC.Center) <= radius) + if (!nPC.dontTakeDamage && !nPC.buffImmune[buffType] && Vector2.Distance(Projectile.Center, nPC.Center) <= radius) { if (nPC.FindBuffIndex(buffType) == -1) nPC.AddBuff(buffType, 60, false); diff --git a/Projectiles/Rogue/NanoblackSplit.cs b/Projectiles/Rogue/NanoblackSplit.cs index 02acd5659f..5b5b9e37f4 100644 --- a/Projectiles/Rogue/NanoblackSplit.cs +++ b/Projectiles/Rogue/NanoblackSplit.cs @@ -128,10 +128,9 @@ namespace CalamityMod.Projectiles.Rogue bool bossFound = false; int target = -1; float minDist = HomingStartRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.type == NPCID.TargetDummy) + if (npc.type == NPCID.TargetDummy) continue; // If we've found a valid boss target, ignore ALL targets which aren't bosses. @@ -149,7 +148,7 @@ namespace CalamityMod.Projectiles.Rogue if (npc.boss) bossFound = true; minDist = distToNPC; - target = i; + target = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/NanoblackStealthSplit.cs b/Projectiles/Rogue/NanoblackStealthSplit.cs index f47d6f7550..4881561c22 100644 --- a/Projectiles/Rogue/NanoblackStealthSplit.cs +++ b/Projectiles/Rogue/NanoblackStealthSplit.cs @@ -137,10 +137,9 @@ namespace CalamityMod.Projectiles.Rogue bool bossFound = false; int target = -1; float minDist = HomingStartRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.type == NPCID.TargetDummy) + if (npc.type == NPCID.TargetDummy) continue; // If we've found a valid boss target, ignore ALL targets which aren't bosses. @@ -158,7 +157,7 @@ namespace CalamityMod.Projectiles.Rogue if (npc.boss) bossFound = true; minDist = distToNPC; - target = i; + target = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/NightsGazeStar.cs b/Projectiles/Rogue/NightsGazeStar.cs index b44f27a51d..33284710b1 100644 --- a/Projectiles/Rogue/NightsGazeStar.cs +++ b/Projectiles/Rogue/NightsGazeStar.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Terraria; @@ -65,16 +65,15 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/NychthemeronOrb.cs b/Projectiles/Rogue/NychthemeronOrb.cs index 367c0c5c4e..2927406455 100644 --- a/Projectiles/Rogue/NychthemeronOrb.cs +++ b/Projectiles/Rogue/NychthemeronOrb.cs @@ -64,16 +64,15 @@ namespace CalamityMod.Projectiles.Rogue // Follow Enemy float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/RadiantStar2.cs b/Projectiles/Rogue/RadiantStar2.cs index 91ef243b35..7b46365b10 100644 --- a/Projectiles/Rogue/RadiantStar2.cs +++ b/Projectiles/Rogue/RadiantStar2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; using CalamityMod.Dusts; using Microsoft.Xna.Framework; @@ -41,30 +41,30 @@ namespace CalamityMod.Projectiles.Rogue float projY = Projectile.Center.Y; float homeRange = Projectile.Calamity().stealthStrike ? 1800f : 600f; float homingSpeed = 0.25f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) { - float npcCenterX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcCenterY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcCenterX = n.position.X + (float)(n.width / 2); + float npcCenterY = n.position.Y + (float)(n.height / 2); float targetDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcCenterX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcCenterY); if (targetDist < homeRange) { - if (Main.npc[i].position.X < projX) + if (n.position.X < projX) { - Main.npc[i].velocity.X += homingSpeed; + n.velocity.X += homingSpeed; } else { - Main.npc[i].velocity.X -= homingSpeed; + n.velocity.X -= homingSpeed; } - if (Main.npc[i].position.Y < projY) + if (n.position.Y < projY) { - Main.npc[i].velocity.Y += homingSpeed; + n.velocity.Y += homingSpeed; } else { - Main.npc[i].velocity.Y -= homingSpeed; + n.velocity.Y -= homingSpeed; } } } diff --git a/Projectiles/Rogue/RadiantStarKnife.cs b/Projectiles/Rogue/RadiantStarKnife.cs index 2486e3c7eb..bcf0aae582 100644 --- a/Projectiles/Rogue/RadiantStarKnife.cs +++ b/Projectiles/Rogue/RadiantStarKnife.cs @@ -41,9 +41,8 @@ namespace CalamityMod.Projectiles.Rogue float projY = Projectile.Center.Y; float homeRange = Projectile.Calamity().stealthStrike ? 1800f : 600f; float homingSpeed = 0.25f; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, npc.Center, 1, 1) && !npc.boss) { float npcX = npc.position.X + (float)(npc.width / 2); diff --git a/Projectiles/Rogue/RealityRuptureMini.cs b/Projectiles/Rogue/RealityRuptureMini.cs index 3e7ae26d62..60e8562298 100644 --- a/Projectiles/Rogue/RealityRuptureMini.cs +++ b/Projectiles/Rogue/RealityRuptureMini.cs @@ -53,16 +53,16 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = 350f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); - bool canHit = Projectile.Calamity().stealthStrike || Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); + bool canHit = Projectile.Calamity().stealthStrike || Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && canHit) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && canHit) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Rogue/ReaperProjectile.cs b/Projectiles/Rogue/ReaperProjectile.cs index f716ff8824..14e9786b1a 100644 --- a/Projectiles/Rogue/ReaperProjectile.cs +++ b/Projectiles/Rogue/ReaperProjectile.cs @@ -87,10 +87,9 @@ namespace CalamityMod.Projectiles.Rogue Vector2 homingTarget = Projectile.Center; bool foundTarget = false; Vector2 targetVelocity = new Vector2(0f); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC potentialTarget in Main.ActiveNPCs) { - NPC potentialTarget = Main.npc[i]; - if (potentialTarget.CanBeChasedBy(Projectile, false) && Projectile.WithinRange(Main.npc[i].Center, homingRange)) + if (potentialTarget.CanBeChasedBy(Projectile, false) && Projectile.WithinRange(potentialTarget.Center, homingRange)) { if (!foundTarget) { diff --git a/Projectiles/Rogue/RegulusEnergy.cs b/Projectiles/Rogue/RegulusEnergy.cs index abfca67bbe..542fdcb0f4 100644 --- a/Projectiles/Rogue/RegulusEnergy.cs +++ b/Projectiles/Rogue/RegulusEnergy.cs @@ -54,15 +54,15 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = 500f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Rogue/ScourgeoftheDesertProj.cs b/Projectiles/Rogue/ScourgeoftheDesertProj.cs index 1f708cbb8c..169e781b77 100644 --- a/Projectiles/Rogue/ScourgeoftheDesertProj.cs +++ b/Projectiles/Rogue/ScourgeoftheDesertProj.cs @@ -101,10 +101,10 @@ namespace CalamityMod.Projectiles.Rogue } if (InsideTiles) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile.GetSource_FromThis(), false)) - NPCDestination = Main.npc[i].Center + Main.npc[i].velocity * 5f; + if (n.CanBeChasedBy(Projectile.GetSource_FromThis(), false)) + NPCDestination = n.Center + n.velocity * 5f; } TimeUnderground++; diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index e27b3b368d..1f44a9e1ef 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -90,30 +90,30 @@ namespace CalamityMod.Projectiles.Rogue { float projX = Projectile.Center.X; float projY = Projectile.Center.Y; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) { - float npcCenterX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcCenterY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcCenterX = n.position.X + (float)(n.width / 2); + float npcCenterY = n.position.Y + (float)(n.height / 2); float targetDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcCenterX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcCenterY); if (targetDist < 600f) { - if (Main.npc[i].position.X < projX) + if (n.position.X < projX) { - Main.npc[i].velocity.X += 0.25f; + n.velocity.X += 0.25f; } else { - Main.npc[i].velocity.X -= 0.25f; + n.velocity.X -= 0.25f; } - if (Main.npc[i].position.Y < projY) + if (n.position.Y < projY) { - Main.npc[i].velocity.Y += 0.25f; + n.velocity.Y += 0.25f; } else { - Main.npc[i].velocity.Y -= 0.25f; + n.velocity.Y -= 0.25f; } } } diff --git a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs index 36deeca44d..3f7f5fd760 100644 --- a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs +++ b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs @@ -112,30 +112,30 @@ namespace CalamityMod.Projectiles.Rogue { float projX = Projectile.Center.X; float projY = Projectile.Center.Y; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) { - float npcCenterX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcCenterY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcCenterX = n.position.X + (float)(n.width / 2); + float npcCenterY = n.position.Y + (float)(n.height / 2); float targetDistance = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcCenterX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcCenterY); if (targetDistance < 600f) { - if (Main.npc[i].position.X < projX) + if (n.position.X < projX) { - Main.npc[i].velocity.X += 0.25f; + n.velocity.X += 0.25f; } else { - Main.npc[i].velocity.X -= 0.25f; + n.velocity.X -= 0.25f; } - if (Main.npc[i].position.Y < projY) + if (n.position.Y < projY) { - Main.npc[i].velocity.Y += 0.25f; + n.velocity.Y += 0.25f; } else { - Main.npc[i].velocity.Y -= 0.25f; + n.velocity.Y -= 0.25f; } } } diff --git a/Projectiles/Rogue/ShockGrenadeBolt.cs b/Projectiles/Rogue/ShockGrenadeBolt.cs index 6433576e54..e33e28c6db 100644 --- a/Projectiles/Rogue/ShockGrenadeBolt.cs +++ b/Projectiles/Rogue/ShockGrenadeBolt.cs @@ -54,16 +54,15 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/SpearofDestinyProjectile.cs b/Projectiles/Rogue/SpearofDestinyProjectile.cs index ff055dbf9b..7caa8c056a 100644 --- a/Projectiles/Rogue/SpearofDestinyProjectile.cs +++ b/Projectiles/Rogue/SpearofDestinyProjectile.cs @@ -63,16 +63,16 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = 200f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); - bool canHit = Projectile.Calamity().stealthStrike || Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); + bool canHit = Projectile.Calamity().stealthStrike || Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && canHit) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && canHit) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Rogue/StellarKnifeProj.cs b/Projectiles/Rogue/StellarKnifeProj.cs index e9a8c194d0..7d70ca9c02 100644 --- a/Projectiles/Rogue/StellarKnifeProj.cs +++ b/Projectiles/Rogue/StellarKnifeProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using System.IO; @@ -69,15 +69,15 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = 600f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Rogue/SupernovaHoming.cs b/Projectiles/Rogue/SupernovaHoming.cs index a9793a17b9..21dc29bd9d 100644 --- a/Projectiles/Rogue/SupernovaHoming.cs +++ b/Projectiles/Rogue/SupernovaHoming.cs @@ -47,15 +47,15 @@ namespace CalamityMod.Projectiles.Rogue float maxDistance = 500f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Rogue/TerraDiskProjectile.cs b/Projectiles/Rogue/TerraDiskProjectile.cs index e68019dd05..6fec82862f 100644 --- a/Projectiles/Rogue/TerraDiskProjectile.cs +++ b/Projectiles/Rogue/TerraDiskProjectile.cs @@ -143,9 +143,8 @@ namespace CalamityMod.Projectiles.Rogue const float maxDistance = 300f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float extraDistance = npc.width / 2 + npc.height / 2; diff --git a/Projectiles/Rogue/TimeBoltKnife.cs b/Projectiles/Rogue/TimeBoltKnife.cs index 6f82034099..88aafef7fb 100644 --- a/Projectiles/Rogue/TimeBoltKnife.cs +++ b/Projectiles/Rogue/TimeBoltKnife.cs @@ -132,9 +132,8 @@ namespace CalamityMod.Projectiles.Rogue int whoAmI = -1; Vector2 targetSpot = Projectile.Center; float detectRange = 1000f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(npc.Center, Projectile.Center); @@ -142,7 +141,7 @@ namespace CalamityMod.Projectiles.Rogue { detectRange = targetDist; targetSpot = npc.Center; - whoAmI = i; + whoAmI = npc.whoAmI; } } } @@ -304,10 +303,9 @@ namespace CalamityMod.Projectiles.Rogue int buffType = ModContent.BuffType(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.buffImmune[buffType] && Vector2.Distance(Projectile.Center, npc.Center) <= radius) + if (!npc.dontTakeDamage && !npc.buffImmune[buffType] && Vector2.Distance(Projectile.Center, npc.Center) <= radius) { if (npc.FindBuffIndex(buffType) == -1) npc.AddBuff(buffType, 60, false); diff --git a/Projectiles/Rogue/VeneratedKnife.cs b/Projectiles/Rogue/VeneratedKnife.cs index 1e98831f53..b1762f4465 100644 --- a/Projectiles/Rogue/VeneratedKnife.cs +++ b/Projectiles/Rogue/VeneratedKnife.cs @@ -37,16 +37,15 @@ namespace CalamityMod.Projectiles.Rogue { float minDist = 999f; int index = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < minDist) { minDist = dist; - index = i; + index = npc.whoAmI; } } } diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs index 5bb58587ae..bc1610fa94 100644 --- a/Projectiles/Summon/AstrageldonSummon.cs +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -123,9 +123,8 @@ namespace CalamityMod.Projectiles.Summon } else { - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { bool lineOfSight = Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, npc.position, npc.width, npc.height); diff --git a/Projectiles/Summon/BabyPlaguebringer.cs b/Projectiles/Summon/BabyPlaguebringer.cs index c2e73d0f19..10230156e1 100644 --- a/Projectiles/Summon/BabyPlaguebringer.cs +++ b/Projectiles/Summon/BabyPlaguebringer.cs @@ -100,9 +100,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[i]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/BrimstoneElementalMinion.cs b/Projectiles/Summon/BrimstoneElementalMinion.cs index 26c28e707c..5dfabdaa7b 100644 --- a/Projectiles/Summon/BrimstoneElementalMinion.cs +++ b/Projectiles/Summon/BrimstoneElementalMinion.cs @@ -117,9 +117,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack && !passive) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[i]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs index 362bf33118..ed6e82f054 100644 --- a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs +++ b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs @@ -143,16 +143,16 @@ namespace CalamityMod.Projectiles.Summon int[] targetArray = new int[maxTargets]; int targetsAquired = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { if (targetsAquired == maxTargets) break; - if (Main.npc[i].CanBeChasedBy(Projectile)) + if (n.CanBeChasedBy(Projectile)) { - if ((CnidarianPos - Main.npc[i].Center).Length() < targettingDistance) + if ((CnidarianPos - n.Center).Length() < targettingDistance) { - targetArray[targetsAquired] = i; + targetArray[targetsAquired] = n.whoAmI; targetsAquired++; } } diff --git a/Projectiles/Summon/CosmicEnergySpiral.cs b/Projectiles/Summon/CosmicEnergySpiral.cs index c62e9bcf6b..1de027a696 100644 --- a/Projectiles/Summon/CosmicEnergySpiral.cs +++ b/Projectiles/Summon/CosmicEnergySpiral.cs @@ -76,9 +76,8 @@ namespace CalamityMod.Projectiles.Summon } else { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[i]; if (nPC2.CanBeChasedBy(Projectile, false)) { float maxTargetDist = Vector2.Distance(nPC2.Center, Projectile.Center); @@ -87,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon targetDist = maxTargetDist; projPos = nPC2.Center; canAttack = true; - target = i; + target = nPC2.whoAmI; } } } diff --git a/Projectiles/Summon/CosmicViperHomingRocket.cs b/Projectiles/Summon/CosmicViperHomingRocket.cs index fb259bdc3e..9ef293710e 100644 --- a/Projectiles/Summon/CosmicViperHomingRocket.cs +++ b/Projectiles/Summon/CosmicViperHomingRocket.cs @@ -86,15 +86,15 @@ namespace CalamityMod.Projectiles.Summon } if (!homeIn) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Summon/Dreadmine.cs b/Projectiles/Summon/Dreadmine.cs index 51b9079b8c..e5a621e983 100644 --- a/Projectiles/Summon/Dreadmine.cs +++ b/Projectiles/Summon/Dreadmine.cs @@ -140,17 +140,17 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float npcX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float npcY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float npcX = n.position.X + (float)(n.width / 2); + float npcY = n.position.Y + (float)(n.height / 2); float npcDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcY); if (npcDist < attackDistance) { attackDistance = npcDist; - center12 = Main.npc[i].Center; + center12 = n.Center; canAttack = true; } } diff --git a/Projectiles/Summon/EndoCooperBody.cs b/Projectiles/Summon/EndoCooperBody.cs index 259fe2c373..d86a78e584 100644 --- a/Projectiles/Summon/EndoCooperBody.cs +++ b/Projectiles/Summon/EndoCooperBody.cs @@ -173,9 +173,8 @@ namespace CalamityMod.Projectiles.Summon } if (!gotoenemy) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[i]; if (nPC2.CanBeChasedBy(Projectile, false)) { float disttoobjective = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/EndoIceShard.cs b/Projectiles/Summon/EndoIceShard.cs index 968df25c26..1ae45e4685 100644 --- a/Projectiles/Summon/EndoIceShard.cs +++ b/Projectiles/Summon/EndoIceShard.cs @@ -80,12 +80,8 @@ namespace CalamityMod.Projectiles.Summon } if (!hasHomingTarget) { - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc == null || !npc.active) - continue; - if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); diff --git a/Projectiles/Summon/HowlsHeartFireball.cs b/Projectiles/Summon/HowlsHeartFireball.cs index 1d30b2da43..d87d06d379 100644 --- a/Projectiles/Summon/HowlsHeartFireball.cs +++ b/Projectiles/Summon/HowlsHeartFireball.cs @@ -82,9 +82,8 @@ namespace CalamityMod.Projectiles.Summon } if (!homeIn) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float extraDistance = (npc.width / 2) + (npc.height / 2); diff --git a/Projectiles/Summon/IceSentry.cs b/Projectiles/Summon/IceSentry.cs index 170aa4b52c..e6532ff2ba 100644 --- a/Projectiles/Summon/IceSentry.cs +++ b/Projectiles/Summon/IceSentry.cs @@ -117,16 +117,15 @@ namespace CalamityMod.Projectiles.Summon float maxDistance = 1000f; int possibleTarget = -1; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile)) { float npcDistance = Projectile.Distance(npc.Center); if (npcDistance < maxDistance) { maxDistance = npcDistance; - possibleTarget = i; + possibleTarget = npc.whoAmI; } } } diff --git a/Projectiles/Summon/OldDukeSharkVomit.cs b/Projectiles/Summon/OldDukeSharkVomit.cs index ac6ea79da9..e0133fd23e 100644 --- a/Projectiles/Summon/OldDukeSharkVomit.cs +++ b/Projectiles/Summon/OldDukeSharkVomit.cs @@ -73,18 +73,14 @@ namespace CalamityMod.Projectiles.Summon } if (!hasHomingTarget) { - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc is null || !npc.active) - continue; - if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < maxHomingRange && Collision.CanHit(Projectile.Center, Projectile.width, Projectile.height, npc.Center, npc.width, npc.height)) { - targetIdx = i; + targetIdx = npc.whoAmI; maxHomingRange = dist; hasHomingTarget = true; } diff --git a/Projectiles/Summon/SakuraBullet.cs b/Projectiles/Summon/SakuraBullet.cs index f6b29e3023..ccc5cff891 100644 --- a/Projectiles/Summon/SakuraBullet.cs +++ b/Projectiles/Summon/SakuraBullet.cs @@ -65,9 +65,8 @@ namespace CalamityMod.Projectiles.Summon } if (!homeIn) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if ((npc.CanBeChasedBy(Projectile, false) || (npc.type == NPCID.DukeFishron && (!npc.dontTakeDamage || npc.ai[0] > 9f))) && npc.active) { float extraDistance = (npc.width / 2) + (npc.height / 2); diff --git a/Projectiles/Summon/SepulcherMinion.cs b/Projectiles/Summon/SepulcherMinion.cs index 131c073214..48a9ab090f 100644 --- a/Projectiles/Summon/SepulcherMinion.cs +++ b/Projectiles/Summon/SepulcherMinion.cs @@ -503,16 +503,16 @@ namespace CalamityMod.Projectiles.Summon } float distance = searchDistance * searchDistance; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy() && Main.npc[i].type != heartType) + if (n.CanBeChasedBy() && n.type != heartType) { - float extraDistance = (Main.npc[i].width / 2) + (Main.npc[i].height / 2); + float extraDistance = (n.width / 2) + (n.height / 2); - if (Main.npc[i].WithinRange(Projectile.Center, distance + extraDistance)) + if (n.WithinRange(Projectile.Center, distance + extraDistance)) { - distance = Main.npc[i].DistanceSQ(Projectile.Center); - closestTarget = Main.npc[i]; + distance = n.DistanceSQ(Projectile.Center); + closestTarget = n; } } } diff --git a/Projectiles/Summon/SilvaCrystal.cs b/Projectiles/Summon/SilvaCrystal.cs index 2df2ba0adb..c1779f7474 100644 --- a/Projectiles/Summon/SilvaCrystal.cs +++ b/Projectiles/Summon/SilvaCrystal.cs @@ -114,20 +114,17 @@ namespace CalamityMod.Projectiles.Summon } if (targetID < 0) { - int targetIDCopy; - for (int i = 0; i < Main.maxNPCs; i = targetIDCopy + 1) + foreach (NPC target in Main.ActiveNPCs) { - NPC target = Main.npc[i]; if (target.CanBeChasedBy(Projectile, false)) { float targetDistance = Projectile.Distance(target.Center); if (targetDistance < attackRange && Collision.CanHitLine(Projectile.Center, 0, 0, target.Center, 0, 0)) { attackRange = targetDistance; - targetID = i; + targetID = target.whoAmI; } } - targetIDCopy = i; } } if (targetID != -1) diff --git a/Projectiles/Summon/SolarGod.cs b/Projectiles/Summon/SolarGod.cs index e6564dbf6f..86c0d50238 100644 --- a/Projectiles/Summon/SolarGod.cs +++ b/Projectiles/Summon/SolarGod.cs @@ -100,9 +100,8 @@ namespace CalamityMod.Projectiles.Summon } if (!foundTarget) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float npcDist = Vector2.Distance(Projectile.Center, npc.Center); diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index 2f85317f15..e812f41623 100644 --- a/Projectiles/Summon/SolarPixie.cs +++ b/Projectiles/Summon/SolarPixie.cs @@ -100,9 +100,8 @@ namespace CalamityMod.Projectiles.Summon } if (!foundTarget) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float npcDist = Vector2.Distance(Projectile.Center, npc.Center); diff --git a/Projectiles/Summon/Spikecrag.cs b/Projectiles/Summon/Spikecrag.cs index 1390798a71..8c274335b4 100644 --- a/Projectiles/Summon/Spikecrag.cs +++ b/Projectiles/Summon/Spikecrag.cs @@ -58,13 +58,13 @@ namespace CalamityMod.Projectiles.Summon float maxDistance = 1000f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, Projectile.width, Projectile.height, Main.npc[i].Center, Main.npc[i].width, Main.npc[i].height)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, Projectile.width, Projectile.height, n.Center, n.width, n.height)) { homeIn = true; break; diff --git a/Projectiles/Summon/StormjawBaby.cs b/Projectiles/Summon/StormjawBaby.cs index 2f8b3a1654..a3e4514dda 100644 --- a/Projectiles/Summon/StormjawBaby.cs +++ b/Projectiles/Summon/StormjawBaby.cs @@ -111,15 +111,14 @@ namespace CalamityMod.Projectiles.Summon } if (targetIndex < 0) { - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { float num1 = (npc.Center - Projectile.Center).Length(); if (num1 < maxDistance) { - targetIndex = i; + targetIndex = npc.whoAmI; maxDistance = num1; } } @@ -309,9 +308,8 @@ namespace CalamityMod.Projectiles.Summon else { Rectangle rectangle = new Rectangle((int)(Projectile.position.X + Projectile.velocity.X * 0.5f - 4f), (int)(Projectile.position.Y + Projectile.velocity.Y * 0.5f - 4f), Projectile.width + 8, Projectile.height + 8); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false) && npc.immune[Projectile.owner] <= 0) { Rectangle rect = npc.getRect(); diff --git a/Projectiles/Summon/Umbrella/MagicBird.cs b/Projectiles/Summon/Umbrella/MagicBird.cs index 84ee27ffa4..960cbb188e 100644 --- a/Projectiles/Summon/Umbrella/MagicBird.cs +++ b/Projectiles/Summon/Umbrella/MagicBird.cs @@ -88,18 +88,14 @@ namespace CalamityMod.Projectiles.Summon.Umbrella } if (!hasHomingTarget) { - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (npc is null || !npc.active) - continue; - if (npc.CanBeChasedBy(Projectile, false)) { float dist = (Projectile.Center - npc.Center).Length(); if (dist < maxHomingRange) { - targetIdx = i; + targetIdx = npc.whoAmI; maxHomingRange = dist; hasHomingTarget = true; } diff --git a/Projectiles/Summon/Umbrella/MagicUmbrella.cs b/Projectiles/Summon/Umbrella/MagicUmbrella.cs index 718cd70589..18ec15c00a 100644 --- a/Projectiles/Summon/Umbrella/MagicUmbrella.cs +++ b/Projectiles/Summon/Umbrella/MagicUmbrella.cs @@ -255,16 +255,15 @@ namespace CalamityMod.Projectiles.Summon.Umbrella return selectedTarget.whoAmI; } - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC npc = Main.npc[i]; - if (npc.CanBeChasedBy(this) && (npc.boss || !blackListedTargets.Contains(i))) + foreach (NPC npc in Main.ActiveNPCs) + { + if (npc.CanBeChasedBy(this) && (npc.boss || !blackListedTargets.Contains(npc.whoAmI))) { float npcDist = npc.Distance(center); if (npcDist <= MagicHat.Range && (npcDist <= closestDist || closestDist == -1f)) { closestDist = npcDist; - target = i; + target = npc.whoAmI; } } } diff --git a/Projectiles/Summon/VictideSeaSnail.cs b/Projectiles/Summon/VictideSeaSnail.cs index 235ee2837f..67314786a2 100644 --- a/Projectiles/Summon/VictideSeaSnail.cs +++ b/Projectiles/Summon/VictideSeaSnail.cs @@ -154,9 +154,8 @@ namespace CalamityMod.Projectiles.Summon bool foundTarget = false; float maxDist = 300f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile, false)) { if (Vector2.Distance(Projectile.Center, npc.Center) < maxDist && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, npc.position, npc.width, npc.height)) diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.cs b/Projectiles/Summon/VoidConcentrationBlackhole.cs index 058c45b90f..68a08c994f 100644 --- a/Projectiles/Summon/VoidConcentrationBlackhole.cs +++ b/Projectiles/Summon/VoidConcentrationBlackhole.cs @@ -166,14 +166,14 @@ namespace CalamityMod.Projectiles.Summon } Projectile.frameCounter++; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) + { + if (!n.friendly && CalamityGlobalNPC.ShouldAffectNPC(n)) { - if (Main.npc[i].active && !Main.npc[i].friendly && CalamityGlobalNPC.ShouldAffectNPC(Main.npc[i])) - { - if (Vector2.Distance(Projectile.Center, Main.npc[i].Center) <= radius) - ApplySucc(Main.npc[i]); - } + if (Vector2.Distance(Projectile.Center, n.Center) <= radius) + ApplySucc(n); } + } if (Projectile.scale >= 2.5f) //it's boom o' clock diff --git a/Projectiles/Summon/WaterElementalMinion.cs b/Projectiles/Summon/WaterElementalMinion.cs index 1e3faffa33..2681d5dc12 100644 --- a/Projectiles/Summon/WaterElementalMinion.cs +++ b/Projectiles/Summon/WaterElementalMinion.cs @@ -125,14 +125,14 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float targetX = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float targetY = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); + float targetX = n.position.X + (float)(n.width / 2); + float targetY = n.position.Y + (float)(n.height / 2); float targetDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - targetX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - targetY); - if (targetDist < attackRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) + if (targetDist < attackRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { attackRange = targetDist; projX = targetX; diff --git a/Projectiles/Summon/WulfrumEnergyBurst.cs b/Projectiles/Summon/WulfrumEnergyBurst.cs index 3a042342ef..e5237425b9 100644 --- a/Projectiles/Summon/WulfrumEnergyBurst.cs +++ b/Projectiles/Summon/WulfrumEnergyBurst.cs @@ -65,10 +65,8 @@ namespace CalamityMod.Projectiles.Summon float bestScore = 0; NPC bestTarget = null; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC potentialTarget in Main.ActiveNPCs) { - NPC potentialTarget = Main.npc[i]; - if (!potentialTarget.CanBeChasedBy(null, false)) continue; diff --git a/Projectiles/Summon/WulfrumFusionBolt.cs b/Projectiles/Summon/WulfrumFusionBolt.cs index 1208dce2db..292eb5a80a 100644 --- a/Projectiles/Summon/WulfrumFusionBolt.cs +++ b/Projectiles/Summon/WulfrumFusionBolt.cs @@ -68,10 +68,8 @@ namespace CalamityMod.Projectiles.Summon float bestScore = 0; NPC bestTarget = null; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC potentialTarget in Main.ActiveNPCs) { - NPC potentialTarget = Main.npc[i]; - if (!potentialTarget.CanBeChasedBy(null, false)) continue; diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index 059f41d89a..6cdd482946 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -57,16 +57,16 @@ namespace CalamityMod.Projectiles.Typeless { int targetID = -1; float hitDistance = 300f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - Vector2 targetCenter = Main.npc[i].Center; + Vector2 targetCenter = n.Center; float targetDist = Vector2.Distance(targetCenter, Projectile.Center); if (targetDist < hitDistance && targetID == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, targetCenter, 1, 1)) { hitDistance = targetDist; - targetID = i; + targetID = n.whoAmI; } } } diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index f107778b0b..72409defed 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -58,16 +58,16 @@ namespace CalamityMod.Projectiles.Typeless { int targetID = -1; float hitDistance = 300f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - Vector2 targetCenter = Main.npc[i].Center; + Vector2 targetCenter = n.Center; float targetDist = Vector2.Distance(targetCenter, Projectile.Center); if (targetDist < hitDistance && targetID == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, targetCenter, 1, 1)) { hitDistance = targetDist; - targetID = i; + targetID = n.whoAmI; } } } diff --git a/Projectiles/Typeless/KelvinCatalystStar.cs b/Projectiles/Typeless/KelvinCatalystStar.cs index 7945edcc91..e4dceba154 100644 --- a/Projectiles/Typeless/KelvinCatalystStar.cs +++ b/Projectiles/Typeless/KelvinCatalystStar.cs @@ -41,15 +41,15 @@ namespace CalamityMod.Projectiles.Typeless float maxDistance = 500f; bool homeIn = false; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + float extraDistance = (float)(n.width / 2) + (float)(n.height / 2); - if (Vector2.Distance(Main.npc[i].Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) + if (Vector2.Distance(n.Center, Projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) { - center = Main.npc[i].Center; + center = n.Center; homeIn = true; break; } diff --git a/Projectiles/Typeless/LunicBeam.cs b/Projectiles/Typeless/LunicBeam.cs index cdcbcd0404..fd41325c2a 100644 --- a/Projectiles/Typeless/LunicBeam.cs +++ b/Projectiles/Typeless/LunicBeam.cs @@ -46,16 +46,16 @@ namespace CalamityMod.Projectiles.Typeless { int targetID = -1; float hitDistance = 150f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - Vector2 targetCenter = Main.npc[i].Center; + Vector2 targetCenter = n.Center; float targetDist = Vector2.Distance(targetCenter, Projectile.Center); if (targetDist < hitDistance && targetID == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, targetCenter, 1, 1)) { hitDistance = targetDist; - targetID = i; + targetID = n.whoAmI; } } } diff --git a/Projectiles/Typeless/MagnusBeam.cs b/Projectiles/Typeless/MagnusBeam.cs index 5c1004dc87..65c993b872 100644 --- a/Projectiles/Typeless/MagnusBeam.cs +++ b/Projectiles/Typeless/MagnusBeam.cs @@ -37,16 +37,16 @@ namespace CalamityMod.Projectiles.Typeless { int targetIdx = -1; float npcRange = 150f; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - Vector2 npcPos = Main.npc[i].Center; + Vector2 npcPos = n.Center; float npcDist = Vector2.Distance(npcPos, Projectile.Center); if (npcDist < npcRange && targetIdx == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, npcPos, 1, 1)) { npcRange = npcDist; - targetIdx = i; + targetIdx = n.whoAmI; } } } diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index 43a84d9e1f..3aa52f4ea3 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -95,16 +95,15 @@ namespace CalamityMod.Projectiles.Typeless Projectile.ai[0] = 10 + Main.rand.Next(10); float maxDistance = hentai ? 900f : 600f; int target = -1; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(Projectile)) { float npcDistance = Projectile.Distance(npc.Center); if (npcDistance < maxDistance) { maxDistance = npcDistance; - target = i; + target = npc.whoAmI; } } } diff --git a/Skies/CryogenSky.cs b/Skies/CryogenSky.cs index 1bbd055d07..cca9964898 100644 --- a/Skies/CryogenSky.cs +++ b/Skies/CryogenSky.cs @@ -101,15 +101,7 @@ namespace CalamityMod.Skies if (CryogenIndex >= 0 && Main.npc[CryogenIndex].active && Main.npc[CryogenIndex].type == cryogenType) return true; - CryogenIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == cryogenType) - { - CryogenIndex = i; - break; - } - } + CryogenIndex = NPC.FindFirstNPC(cryogenType); return CryogenIndex != -1; } diff --git a/Skies/DrunkCrabScreenShaderData.cs b/Skies/DrunkCrabScreenShaderData.cs index 6eee00117e..2d67cb7706 100644 --- a/Skies/DrunkCrabScreenShaderData.cs +++ b/Skies/DrunkCrabScreenShaderData.cs @@ -47,14 +47,7 @@ namespace CalamityMod.Skies if (!shouldForceDeactivateCirrusShader) { - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == CirrusType) - { - CirrusIndex = i; - break; - } - } + CirrusIndex = NPC.FindFirstNPC(CirrusType); } } else @@ -62,16 +55,7 @@ namespace CalamityMod.Skies if (CrabIndex >= 0 && Main.npc[CrabIndex].active && Main.npc[CrabIndex].type == CrabType) return; - CrabIndex = -1; - - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == CrabType) - { - CrabIndex = i; - break; - } - } + CrabIndex = NPC.FindFirstNPC(CrabType); } } diff --git a/Skies/SCalScreenShaderData.cs b/Skies/SCalScreenShaderData.cs index c8541d92ea..9282bb4878 100644 --- a/Skies/SCalScreenShaderData.cs +++ b/Skies/SCalScreenShaderData.cs @@ -24,15 +24,7 @@ namespace CalamityMod.Skies { return; } - SCalIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == SCalType) - { - SCalIndex = i; - break; - } - } + SCalIndex = NPC.FindFirstNPC(SCalType); } public override void Update(GameTime gameTime) diff --git a/Skies/SCalSky.cs b/Skies/SCalSky.cs index dd3e8ed6ae..078a00fefc 100644 --- a/Skies/SCalSky.cs +++ b/Skies/SCalSky.cs @@ -196,15 +196,7 @@ namespace CalamityMod.Skies if (SCalIndex >= 0 && Main.npc[SCalIndex].active && Main.npc[SCalIndex].type == SCalType) return true; - SCalIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == SCalType) - { - SCalIndex = i; - break; - } - } + SCalIndex = NPC.FindFirstNPC(SCalType); return SCalIndex != -1; } diff --git a/Skies/StormWeaverFlashSky.cs b/Skies/StormWeaverFlashSky.cs index 42471c402e..82de86c339 100644 --- a/Skies/StormWeaverFlashSky.cs +++ b/Skies/StormWeaverFlashSky.cs @@ -18,15 +18,7 @@ namespace CalamityMod.Skies if (StormWeaverHeadIndex >= 0 && Main.npc[StormWeaverHeadIndex].active && Main.npc[StormWeaverHeadIndex].type == weaverType) return; - StormWeaverHeadIndex = -1; - for (int i = 0; i < Main.npc.Length; i++) - { - if (Main.npc[i].active && Main.npc[i].type == weaverType) - { - StormWeaverHeadIndex = i; - break; - } - } + StormWeaverHeadIndex = NPC.FindFirstNPC(weaverType); } public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) diff --git a/TileEntities/TEPlayerFireTurret.cs b/TileEntities/TEPlayerFireTurret.cs index ab3c4b4289..5b7e5eec73 100644 --- a/TileEntities/TEPlayerFireTurret.cs +++ b/TileEntities/TEPlayerFireTurret.cs @@ -88,10 +88,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -99,7 +98,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/TileEntities/TEPlayerIceTurret.cs b/TileEntities/TEPlayerIceTurret.cs index 70c2a4695f..392f479ad8 100644 --- a/TileEntities/TEPlayerIceTurret.cs +++ b/TileEntities/TEPlayerIceTurret.cs @@ -88,10 +88,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -99,7 +98,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/TileEntities/TEPlayerLabTurret.cs b/TileEntities/TEPlayerLabTurret.cs index 3fe6b8dcf0..c6a0f41649 100644 --- a/TileEntities/TEPlayerLabTurret.cs +++ b/TileEntities/TEPlayerLabTurret.cs @@ -88,10 +88,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -99,7 +98,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/TileEntities/TEPlayerLaserTurret .cs b/TileEntities/TEPlayerLaserTurret .cs index 04da3948c7..d59516f463 100644 --- a/TileEntities/TEPlayerLaserTurret .cs +++ b/TileEntities/TEPlayerLaserTurret .cs @@ -88,10 +88,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -99,7 +98,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/TileEntities/TEPlayerOnyxTurret.cs b/TileEntities/TEPlayerOnyxTurret.cs index be4a48643a..89b1cfe8d9 100644 --- a/TileEntities/TEPlayerOnyxTurret.cs +++ b/TileEntities/TEPlayerOnyxTurret.cs @@ -88,10 +88,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -99,7 +98,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/TileEntities/TEPlayerPlagueTurret.cs b/TileEntities/TEPlayerPlagueTurret.cs index 4e32a901c3..fc089f89f5 100644 --- a/TileEntities/TEPlayerPlagueTurret.cs +++ b/TileEntities/TEPlayerPlagueTurret.cs @@ -69,10 +69,9 @@ namespace CalamityMod.TileEntities //This turret can switch targets at any time - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -80,7 +79,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/TileEntities/TEPlayerWaterTurret.cs b/TileEntities/TEPlayerWaterTurret.cs index 25768063d9..c4b2d4b3f8 100644 --- a/TileEntities/TEPlayerWaterTurret.cs +++ b/TileEntities/TEPlayerWaterTurret.cs @@ -88,10 +88,9 @@ namespace CalamityMod.TileEntities Vector2 ret = InvalidTarget; float distSQToBeat = MaxRange * MaxRange; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; - if (!npc.active || npc.friendly || npc.CountsAsACritter) + if (npc.friendly || npc.CountsAsACritter) continue; float distSQ = npc.DistanceSQ(targetingCenter); @@ -99,7 +98,7 @@ namespace CalamityMod.TileEntities { distSQToBeat = distSQ; ret = npc.Center; - indexToSet = i; + indexToSet = npc.whoAmI; } } diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 6c8057c280..f800dada03 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -331,17 +331,17 @@ namespace CalamityMod.UI if (npc.ai[0] == 2f) life = 0L; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - bool isMoonLordPiece = Main.npc[i].type == NPCID.MoonLordHand || Main.npc[i].type == NPCID.MoonLordHead; - if (!Main.npc[i].active || !isMoonLordPiece || Main.npc[i].ai[3] != npc.whoAmI) + bool isMoonLordPiece = n.type == NPCID.MoonLordHand || n.type == NPCID.MoonLordHead; + if (!isMoonLordPiece || n.ai[3] != npc.whoAmI) continue; // Don't count HP towards the total if the NPC is in its dead state. - if (Main.npc[i].Calamity().newAI[0] == 1f) + if (n.Calamity().newAI[0] == 1f) continue; - life += checkingForMaxLife ? Main.npc[i].lifeMax : Main.npc[i].life; + life += checkingForMaxLife ? n.lifeMax : n.life; } return life; @@ -365,15 +365,15 @@ namespace CalamityMod.UI public override void Update(IBigProgressBar currentBar, ref BigProgressBarInfo info) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - // Ignore inactive NPCs and NPCs that should not be given a bar, even if it meets other criteria. - if (!Main.npc[i].active || BossExclusionList.Contains(Main.npc[i].type)) + // Ignore NPCs that should not be given a bar, even if it meets other criteria. + if (BossExclusionList.Contains(n.type)) continue; - bool isEoWSegment = Main.npc[i].type == NPCID.EaterofWorldsBody || Main.npc[i].type == NPCID.EaterofWorldsTail; - if ((Main.npc[i].IsABoss() && !isEoWSegment) || MinibossHPBarList.Contains(Main.npc[i].type) || Main.npc[i].Calamity().CanHaveBossHealthBar) - AttemptToAddBar(i); + bool isEoWSegment = n.type == NPCID.EaterofWorldsBody || n.type == NPCID.EaterofWorldsTail; + if ((n.IsABoss() && !isEoWSegment) || MinibossHPBarList.Contains(n.type) || n.Calamity().CanHaveBossHealthBar) + AttemptToAddBar(n.whoAmI); } for (int i = 0; i < Bars.Count; i++) @@ -467,12 +467,12 @@ namespace CalamityMod.UI return life; // Otherwise, check if any of said relationship NPCs are enraged. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].active || Main.npc[i].life <= 0 || !OneToMany[NPCType].Contains(Main.npc[i].type)) + if (n.life <= 0 || !OneToMany[NPCType].Contains(n.type)) continue; - life += Main.npc[i].life; + life += n.life; } return life; @@ -499,12 +499,12 @@ namespace CalamityMod.UI return maxLife; // Otherwise, check if any of said relationship NPCs are enraged. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].active || Main.npc[i].life <= 0 || !OneToMany[NPCType].Contains(Main.npc[i].type)) + if (n.life <= 0 || !OneToMany[NPCType].Contains(n.type)) continue; - maxLife += Main.npc[i].lifeMax; + maxLife += n.lifeMax; } return maxLife; @@ -525,12 +525,12 @@ namespace CalamityMod.UI return false; // Otherwise, check if any of said relationship NPCs are enraged. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].active || Main.npc[i].life <= 0 || !OneToMany[NPCType].Contains(Main.npc[i].type)) + if (n.life <= 0 || !OneToMany[NPCType].Contains(n.type)) continue; - if (Main.npc[i].Calamity().CurrentlyEnraged) + if (n.Calamity().CurrentlyEnraged) return true; } return false; @@ -551,12 +551,12 @@ namespace CalamityMod.UI return false; // Otherwise, check if any of said relationship NPCs are increasing their defense or DR. - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].active || Main.npc[i].life <= 0 || !OneToMany[NPCType].Contains(Main.npc[i].type)) + if (n.life <= 0 || !OneToMany[NPCType].Contains(n.type)) continue; - if (Main.npc[i].Calamity().CurrentlyIncreasingDefenseOrDR) + if (n.Calamity().CurrentlyIncreasingDefenseOrDR) return true; } return false; diff --git a/UI/BossRushUI.cs b/UI/BossRushUI.cs index 57742fa04f..59fe2b7009 100644 --- a/UI/BossRushUI.cs +++ b/UI/BossRushUI.cs @@ -39,14 +39,12 @@ namespace CalamityMod.UI { int totalLife = 0; int totalLifeMax = 0; - for (int i = 0; i < Main.npc.Length; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!Main.npc[i].active) - continue; - if (types.Contains(Main.npc[i].type)) + if (types.Contains(n.type)) { - totalLife += Main.npc[i].life; - totalLifeMax += Main.npc[i].lifeMax; + totalLife += n.life; + totalLifeMax += n.lifeMax; } } diff --git a/UI/CalamitasEnchantments/EnchantmentManager.cs b/UI/CalamitasEnchantments/EnchantmentManager.cs index 3f76bf1485..bae63dcc0b 100644 --- a/UI/CalamitasEnchantments/EnchantmentManager.cs +++ b/UI/CalamitasEnchantments/EnchantmentManager.cs @@ -282,9 +282,9 @@ namespace CalamityMod.UI.CalamitasEnchants bool orbIsPresent = false; int orbType = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[i].type != orbType || Main.npc[i].target != player.whoAmI || !Main.npc[i].active) + if (n.type != orbType || n.target != player.whoAmI) continue; orbIsPresent = true; diff --git a/UI/VanillaBossBars/ExoMechsBossBar.cs b/UI/VanillaBossBars/ExoMechsBossBar.cs index 1dcca283e8..fe9edf9c4e 100644 --- a/UI/VanillaBossBars/ExoMechsBossBar.cs +++ b/UI/VanillaBossBars/ExoMechsBossBar.cs @@ -96,9 +96,8 @@ namespace CalamityMod.UI.VanillaBossBars public void ValidateAllMechs(ref BigProgressBarInfo info) { - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC target = Main.npc[i]; + foreach (NPC target in Main.ActiveNPCs) + { // Find out first whether or not each of the mechs are in hiding if (target.type == NPCType()) HideAres = target.Opacity < 0.5f; @@ -119,33 +118,29 @@ namespace CalamityMod.UI.VanillaBossBars public bool FindMechsAgain(ref BigProgressBarInfo info) { - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC target = Main.npc[i]; - if (target.active) + foreach (NPC target in Main.ActiveNPCs) + { + // Get the index of the mech that's not hiding + if (target.type == NPCType() && !HideAres) { - // Get the index of the mech that's not hiding - if (target.type == NPCType() && !HideAres) - { - info.npcIndexToAimAt = i; - return true; - } - else if (target.type == NPCType() && !HideArtemis) - { - info.npcIndexToAimAt = i; - return true; - } - else if (target.type == NPCType() && !HideThanatos) - { - info.npcIndexToAimAt = i; - return true; - } - // Failsafe - else if (target.type == NPCType() || target.type == NPCType() || target.type == NPCType()) - { - info.npcIndexToAimAt = i; - return true; - } + info.npcIndexToAimAt = target.whoAmI; + return true; + } + else if (target.type == NPCType() && !HideArtemis) + { + info.npcIndexToAimAt = target.whoAmI; + return true; + } + else if (target.type == NPCType() && !HideThanatos) + { + info.npcIndexToAimAt = target.whoAmI; + return true; + } + // Failsafe + else if (target.type == NPCType() || target.type == NPCType() || target.type == NPCType()) + { + info.npcIndexToAimAt = target.whoAmI; + return true; } } return false; diff --git a/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs b/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs index 1347d038d0..8394d9a395 100644 --- a/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs +++ b/UI/VanillaBossBars/LeviathanAnahitaBossBar.cs @@ -52,11 +52,10 @@ namespace CalamityMod.UI.VanillaBossBars // Determine Anahita's shield health only if she's solo (she can't just block Leviathan out of existence) if (target.type == NPCType() && !NPC.AnyNPCs(NPCType())) - { - for (int i = 0; i < Main.maxNPCs; i++) + { + foreach (NPC part in Main.ActiveNPCs) { - NPC part = Main.npc[i]; - if (part.active && part.type == NPCType()) + if (part.type == NPCType()) { shield += part.life; shieldMax += part.lifeMax; @@ -68,17 +67,16 @@ namespace CalamityMod.UI.VanillaBossBars public bool FindTheRightFish(ref BigProgressBarInfo info) { - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC target = Main.npc[i]; + foreach (NPC target in Main.ActiveNPCs) + { if (target.active && target.type == NPCType()) { - info.npcIndexToAimAt = i; + info.npcIndexToAimAt = target.whoAmI; return true; } else if (target.active && target.type == NPCType()) { - info.npcIndexToAimAt = i; + info.npcIndexToAimAt = target.whoAmI; return true; } } diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 6f356ca6ac..7b78e5db41 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -212,16 +212,15 @@ namespace CalamityMod int r = wormHead.whoAmI; float minDist = 1E+06f; - for (int i = 0; i < Main.npc.Length; ++i) + foreach (NPC n in Main.ActiveNPCs) { - NPC n = Main.npc[i]; - if (n != null && n.active && idsToCheck.Contains(n.type)) + if (idsToCheck.Contains(n.type)) { float dist = (n.Center - playerPos).Length(); if (dist < minDist) { minDist = dist; - r = i; + r = n.whoAmI; } } } @@ -535,10 +534,9 @@ namespace CalamityMod public static IItemDropRuleCondition AnglerFedToTrasherCondition = If((info) => { bool trasherNearby = false; - for (int i = 0; i < Main.maxNPCs; ++i) + foreach (NPC nearby in Main.ActiveNPCs) { - NPC nearby = Main.npc[i]; - if (nearby is null || !nearby.active || nearby.type != ModContent.NPCType()) + if (nearby.type != ModContent.NPCType()) continue; if (info.npc.Distance(nearby.Center) < TrasherEatDistance) { diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index 84565bea36..59af3caafa 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -38,9 +38,9 @@ namespace CalamityMod return 0; int count = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { - if (!typesToCheck.Contains(Main.npc[i].type) || !Main.npc[i].active) + if (!typesToCheck.Contains(n.type)) continue; count++; @@ -174,18 +174,14 @@ namespace CalamityMod public static bool AnyBossNPCS(bool checkForMechs = false) { - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - if (Main.npc[i] != null) + if (npc.IsABoss()) { - NPC npc = Main.npc[i]; - if (npc.IsABoss()) - { - // Added due to the new mech boss ore progression, return true if any mech is alive and checkForMechs is true, reduces mech boss projectile damage if true. - if (checkForMechs) - return npc.type == NPCID.TheDestroyer || npc.type == NPCID.SkeletronPrime || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer; - return true; - } + // Added due to the new mech boss ore progression, return true if any mech is alive and checkForMechs is true, reduces mech boss projectile damage if true. + if (checkForMechs) + return npc.type == NPCID.TheDestroyer || npc.type == NPCID.SkeletronPrime || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer; + return true; } } return FindFirstProjectile(ProjectileType()) != -1; diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index f68b178eea..528ec0c0fb 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -233,9 +233,8 @@ namespace CalamityMod int[] array = new int[Main.maxNPCs]; int targetArrayA = 0; int targetArrayB = 0; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(projectile, false)) { float enemyDist = Vector2.Distance(projectile.Center, npc.Center); @@ -243,12 +242,12 @@ namespace CalamityMod { if (Collision.CanHit(projectile.position, 1, 1, npc.position, npc.width, npc.height) && enemyDist > 50f) { - array[targetArrayB] = i; + array[targetArrayB] = npc.whoAmI; targetArrayB++; } else if (targetArrayB == 0) { - array[targetArrayA] = i; + array[targetArrayA] = npc.whoAmI; targetArrayA++; } } @@ -293,7 +292,7 @@ namespace CalamityMod { if (targetArrayIndex < maxTargets) { - targetArray[targetArrayIndex] = i; + targetArray[targetArrayIndex] = n.whoAmI; targetArrayIndex++; homeIn = true; } From e2c261e69ef37ffb0e522bb39331e72f7eb34f3c Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Wed, 8 May 2024 18:07:24 +0500 Subject: [PATCH 059/197] Some of the projectile iterators --- CalPlayer/CalamityPlayer.cs | 12 ++--- CalPlayer/CalamityPlayerHitHurt.cs | 6 +-- CalPlayer/CalamityPlayerMiscEffects.cs | 29 ++++++----- CalPlayer/DrawLayers/AndromedaMechLayer.cs | 4 +- .../Primitives/PrimitivePixelationSystem.cs | 6 +-- ILEditing/MechanicILChanges.cs | 7 +-- Items/Accessories/NebulousCore.cs | 4 +- Items/Accessories/WulfrumAcrobaticsPack.cs | 15 +++--- Items/CalamityGlobalItem.cs | 50 +++++++++---------- Items/Tools/WulfrumDiggingTurtle.cs | 5 +- Items/Weapons/DraedonsArsenal/PoleWarper.cs | 12 ++--- Items/Weapons/Melee/BladecrestOathsword.cs | 6 +-- Items/Weapons/Melee/Exoblade.cs | 17 +++++-- Items/Weapons/Ranged/ChickenCannon.cs | 5 +- Items/Weapons/Ranged/Hydra.cs | 12 ++--- Items/Weapons/Rogue/Nychthemeron.cs | 12 ++--- Items/Weapons/Rogue/Sacrifice.cs | 14 +++--- Items/Weapons/Summon/AresExoskeleton.cs | 8 +-- Items/Weapons/Summon/BrittleStarStaff.cs | 10 ++-- 19 files changed, 115 insertions(+), 119 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a8c0fc5775..075c4c06a7 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4715,23 +4715,23 @@ namespace CalamityMod.CalPlayer if (Player.whoAmI == Main.myPlayer && !endoCooper && randAmt > 0 && Main.rand.NextBool(randAmt) && chaseable) { int spearsFired = 0; - - for (int i = 0; i < Main.projectile.Length; i++) + + foreach (Projectile p in Main.ActiveProjectiles) { if (spearsFired == 2) break; - if (Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].friendly) + if (p.owner == Player.whoAmI && p.friendly) { - bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType(); + bool attack = p.type == ModContent.ProjectileType(); if (attack) { int numSpears = profanedCrystalBuffs ? 12 : 6; - int dam = (int)(Main.projectile[i].originalDamage * (profanedCrystalBuffs ? 1f : 0.25f)); + int dam = (int)(p.originalDamage * (profanedCrystalBuffs ? 1f : 0.25f)); for (int x = 0; x < numSpears; x++) { float angle = MathHelper.TwoPi / numSpears * x; - int proj = Projectile.NewProjectile(source, Main.projectile[i].Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType(), dam, 0f, Player.whoAmI, pscState, 0f); + int proj = Projectile.NewProjectile(source, p.Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType(), dam, 0f, Player.whoAmI, pscState, 0f); Main.projectile[proj].originalDamage = dam; } spearsFired++; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index b84a070442..8f86221423 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2307,11 +2307,11 @@ namespace CalamityMod.CalPlayer if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach(Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == Player.whoAmI) + if (p.type == ModContent.ProjectileType() && p.owner == Player.whoAmI) { - Main.projectile[i].Kill(); + p.Kill(); break; } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index b99288c74d..c1be6e8b04 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -858,12 +858,12 @@ namespace CalamityMod.CalPlayer { int bullseyeType = ModContent.ProjectileType(); List alreadyTargetedNPCs = new List(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != bullseyeType || !Main.projectile[i].active || Main.projectile[i].owner != Player.whoAmI) + if (p.type != bullseyeType || p.owner != Player.whoAmI) continue; - alreadyTargetedNPCs.Add((int)Main.projectile[i].ai[0]); + alreadyTargetedNPCs.Add((int)p.ai[0]); } foreach (NPC target in Main.ActiveNPCs) @@ -1131,10 +1131,9 @@ namespace CalamityMod.CalPlayer if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < 6 && Main.myPlayer == Player.whoAmI) { bool[] tentaclesPresent = new bool[6]; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - Projectile projectile = Main.projectile[i]; - if (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.owner == Main.myPlayer && projectile.ai[1] >= 0f && projectile.ai[1] < 6f) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Main.myPlayer && projectile.ai[1] >= 0f && projectile.ai[1] < 6f) tentaclesPresent[(int)projectile.ai[1]] = true; } @@ -3347,11 +3346,11 @@ namespace CalamityMod.CalPlayer { if (Player.whoAmI == Main.myPlayer) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == Player.whoAmI) + if (p.type == ModContent.ProjectileType() && p.owner == Player.whoAmI) { - Main.projectile[i].Kill(); + p.Kill(); break; } } @@ -3383,12 +3382,12 @@ namespace CalamityMod.CalPlayer if (Player.whoAmI == Main.myPlayer) { int auraType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != auraType || !Main.projectile[i].active || Main.projectile[i].owner != Player.whoAmI) + if (p.type != auraType || p.owner != Player.whoAmI) continue; - Main.projectile[i].Kill(); + p.Kill(); break; } } @@ -3406,12 +3405,12 @@ namespace CalamityMod.CalPlayer else if (Player.whoAmI == Main.myPlayer) { int shieldType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != shieldType || !Main.projectile[i].active || Main.projectile[i].owner != Player.whoAmI) + if (p.type != shieldType || p.owner != Player.whoAmI) continue; - Main.projectile[i].Kill(); + p.Kill(); break; } } diff --git a/CalPlayer/DrawLayers/AndromedaMechLayer.cs b/CalPlayer/DrawLayers/AndromedaMechLayer.cs index 49ec26064a..e15b7c80df 100644 --- a/CalPlayer/DrawLayers/AndromedaMechLayer.cs +++ b/CalPlayer/DrawLayers/AndromedaMechLayer.cs @@ -34,9 +34,9 @@ namespace CalamityMod.CalPlayer.DrawLayers int robot = -1; int andromedaMechID = ModContent.ProjectileType(); - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == andromedaMechID && Main.projectile[i].owner == drawPlayer.whoAmI) + if (p.type == andromedaMechID && p.owner == drawPlayer.whoAmI) { robot = i; break; diff --git a/Graphics/Primitives/PrimitivePixelationSystem.cs b/Graphics/Primitives/PrimitivePixelationSystem.cs index ad2a82fc40..19d5fb1b5c 100644 --- a/Graphics/Primitives/PrimitivePixelationSystem.cs +++ b/Graphics/Primitives/PrimitivePixelationSystem.cs @@ -65,12 +65,10 @@ namespace CalamityMod.Graphics.Primitives var afterProjectiles = new List(); // Check every active projectile. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - // If the projectile is active, a mod projectile, and uses the interface, add it to the list of primitives to draw this frame. - if (projectile.active && projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile) + if (projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile) { var listToUse = pixelPrimitiveProjectile.LayerToRenderTo switch { diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 01a4f20dc6..620eefd8f0 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -724,12 +724,9 @@ namespace CalamityMod.ILEditing Main.spriteBatch.SetBlendState(BlendState.Additive); // Draw Projectiles. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!Main.projectile[i].active) - continue; - - if (Main.projectile[i].ModProjectile is IAdditiveDrawer d) + if (p.ModProjectile is IAdditiveDrawer d) d.AdditiveDraw(Main.spriteBatch); } diff --git a/Items/Accessories/NebulousCore.cs b/Items/Accessories/NebulousCore.cs index bc9c165501..b5fc4b712e 100644 --- a/Items/Accessories/NebulousCore.cs +++ b/Items/Accessories/NebulousCore.cs @@ -39,9 +39,9 @@ namespace CalamityMod.Items.Accessories if (Main.rand.NextBool(15)) { int numProj = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType()) + if (p.owner == player.whoAmI && p.type == ModContent.ProjectileType()) { numProj++; } diff --git a/Items/Accessories/WulfrumAcrobaticsPack.cs b/Items/Accessories/WulfrumAcrobaticsPack.cs index c25f090ead..a03fba6af5 100644 --- a/Items/Accessories/WulfrumAcrobaticsPack.cs +++ b/Items/Accessories/WulfrumAcrobaticsPack.cs @@ -361,10 +361,9 @@ namespace CalamityMod.Items.Accessories if (bestGrapplePos != Point.Zero) { //Clear any hooks that might have been flying before then. - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (!p.active || p.owner != Player.whoAmI || p.type != ProjectileType()) + if (p.owner != Player.whoAmI || p.type != ProjectileType()) continue; if (p.ModProjectile is WulfrumHook) @@ -412,10 +411,9 @@ namespace CalamityMod.Items.Accessories if (triggersSet.Grapple && Player.releaseHook) { //Clear any previous non-wulfrum hooks / Any hooks that just got shot (should already be handled by the global proj - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (!p.active || p.owner != Player.whoAmI || p.aiStyle != 7 || p.type == ProjectileType()) + if (p.owner != Player.whoAmI || p.aiStyle != 7 || p.type == ProjectileType()) continue; p.Kill(); @@ -443,10 +441,9 @@ namespace CalamityMod.Items.Accessories //Jumping out of the hook if (triggersSet.Jump && Player.releaseJump) { - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (!p.active || p.owner != Player.whoAmI || p.type != ProjectileType()) + if (p.owner != Player.whoAmI || p.type != ProjectileType()) continue; //Only clear hooks that are attached to stuff diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index d1bf4f9242..151fc33d72 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -531,11 +531,11 @@ namespace CalamityMod.Items } if (item.type == ItemID.PearlwoodBow) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && (Main.projectile[i].type == ModContent.ProjectileType() || Main.projectile[i].type == ModContent.ProjectileType()) && Main.projectile[i].owner == player.whoAmI) + if ((p.type == ModContent.ProjectileType() || p.type == ModContent.ProjectileType()) && p.owner == player.whoAmI) { - Main.projectile[i].Kill(); + p.Kill(); } } for (int i = -8; i <= 8; i += 8) @@ -674,9 +674,9 @@ namespace CalamityMod.Items if (player.ActiveItem().type == ModContent.ItemType()) { bool hasBlades = false; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + if (p.type == ModContent.ProjectileType() && p.owner == player.whoAmI && p.localAI[1] == 0f) { hasBlades = true; break; @@ -684,22 +684,22 @@ namespace CalamityMod.Items } if (hasBlades) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].ModProjectile is IgneousBlade) + if (p.ModProjectile is IgneousBlade) { - if (Main.projectile[i].ModProjectile().Firing) + if (p.ModProjectile().Firing) continue; } - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + if (p.type == ModContent.ProjectileType() && p.owner == player.whoAmI && p.localAI[1] == 0f) { - Main.projectile[i].rotation = MathHelper.PiOver2 + MathHelper.PiOver4; - Main.projectile[i].velocity = Main.projectile[i].SafeDirectionTo(Main.MouseWorld, Vector2.UnitY) * 22f; - Main.projectile[i].rotation += Main.projectile[i].velocity.ToRotation(); - Main.projectile[i].ai[0] = 180f; - Main.projectile[i].ModProjectile().Firing = true; - Main.projectile[i].tileCollide = true; - Main.projectile[i].netUpdate = true; + p.rotation = MathHelper.PiOver2 + MathHelper.PiOver4; + p.velocity = p.SafeDirectionTo(Main.MouseWorld, Vector2.UnitY) * 22f; + p.rotation += p.velocity.ToRotation(); + p.ai[0] = 180f; + p.ModProjectile().Firing = true; + p.tileCollide = true; + p.netUpdate = true; } } } @@ -707,13 +707,13 @@ namespace CalamityMod.Items } if (player.ActiveItem().type == ModContent.ItemType() && player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].ModProjectile is VoidConcentrationAura) + if (p.ModProjectile is VoidConcentrationAura) { - if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (p.owner == player.whoAmI) { - Main.projectile[i].ModProjectile().HandleRightClick(); + p.ModProjectile().HandleRightClick(); break; } } @@ -724,18 +724,18 @@ namespace CalamityMod.Items { bool canContinue = true; int count = 0; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI) + if (p.type == ModContent.ProjectileType() && p.owner == player.whoAmI) { - if (Main.projectile[i].ai[1] > 1f) + if (p.ai[1] > 1f) { canContinue = false; break; } - else if (Main.projectile[i].ai[1] == 0f) + else if (p.ai[1] == 0f) { - if (((GlacialEmbracePointyThing)Main.projectile[i].ModProjectile).circlingPlayer) + if (((GlacialEmbracePointyThing)p.ModProjectile).circlingPlayer) count++; } } diff --git a/Items/Tools/WulfrumDiggingTurtle.cs b/Items/Tools/WulfrumDiggingTurtle.cs index 95718e8b63..7018324832 100644 --- a/Items/Tools/WulfrumDiggingTurtle.cs +++ b/Items/Tools/WulfrumDiggingTurtle.cs @@ -53,10 +53,9 @@ namespace CalamityMod.Items.Tools { bool explodedAny = false; - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (!p.active || p.owner != player.whoAmI || p.type != Item.shoot) + if (p.owner != player.whoAmI || p.type != Item.shoot) continue; p.ai[1] = 1f; diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index dede135af4..2e8d1edb0a 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -56,9 +56,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal float magnetCount = 0f; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (p.type == type && p.owner == player.whoAmI) { magnetCount++; } @@ -67,12 +67,12 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal // Adjust the offset of all existing magnets such that they form a psuedo-circle. // This offset is used when determining where a magnet should move to relative to its true destination (such as the player or an enemy). int magnetIndex = 0; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (p.type == type && p.owner == player.whoAmI) { - ((PoleWarperSummon)Main.projectile[i].ModProjectile).Time = 0f; - ((PoleWarperSummon)Main.projectile[i].ModProjectile).AngularOffset = MathHelper.TwoPi * magnetIndex / magnetCount; + ((PoleWarperSummon)p.ModProjectile).Time = 0f; + ((PoleWarperSummon)p.ModProjectile).AngularOffset = MathHelper.TwoPi * magnetIndex / magnetCount; magnetIndex++; } } diff --git a/Items/Weapons/Melee/BladecrestOathsword.cs b/Items/Weapons/Melee/BladecrestOathsword.cs index 931e3562c0..5c78b117de 100644 --- a/Items/Weapons/Melee/BladecrestOathsword.cs +++ b/Items/Weapons/Melee/BladecrestOathsword.cs @@ -35,12 +35,12 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { int bladeProjID = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != bladeProjID || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI) + if (p.type != bladeProjID || p.owner != player.whoAmI) continue; - return Main.projectile[i].ModProjectile().PostSwingRepositionDelay <= 0f; + return p.ModProjectile().PostSwingRepositionDelay <= 0f; } return base.CanUseItem(player); diff --git a/Items/Weapons/Melee/Exoblade.cs b/Items/Weapons/Melee/Exoblade.cs index 0576af4659..743d745de3 100644 --- a/Items/Weapons/Melee/Exoblade.cs +++ b/Items/Weapons/Melee/Exoblade.cs @@ -100,15 +100,24 @@ namespace CalamityMod.Items.Weapons.Melee float state = 0; //If there are any exoblades in "stasis" after a bonk, the attack should be an empowered slash instead - if (Main.projectile.Any(n => n.active && n.owner == player.whoAmI && n.type == ProjectileType() && n.ai[0] == 1 && n.ai[1] == 1 && n.timeLeft > LungeCooldown)) + bool empoweredSlash = false; + foreach (Projectile p in Main.ActiveProjectiles) + { + if (p.owner == player.whoAmI && p.type == Item.shoot && p.ai[0] == 1 && p.ai[1] == 1 && p.timeLeft > LungeCooldown) + { + empoweredSlash = true; + break; + } + } + + if (empoweredSlash) { state = 2; //Put all the "post bonk" stasised exoblades into regular cooldown for the right click ljunge - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (!p.active || p.owner != player.whoAmI || p.type != Item.shoot || p.ai[0] != 1 || p.ai[1] != 1) + if (p.owner != player.whoAmI || p.type != Item.shoot || p.ai[0] != 1 || p.ai[1] != 1) continue; p.timeLeft = LungeCooldown; diff --git a/Items/Weapons/Ranged/ChickenCannon.cs b/Items/Weapons/Ranged/ChickenCannon.cs index d87044c85b..bd9e55241f 100644 --- a/Items/Weapons/Ranged/ChickenCannon.cs +++ b/Items/Weapons/Ranged/ChickenCannon.cs @@ -66,10 +66,9 @@ namespace CalamityMod.Items.Weapons.Ranged private void DetonateRockets(Player player) { - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (!p.active || p.owner != player.whoAmI || p.type != Item.shoot) + if (p.owner != player.whoAmI || p.type != Item.shoot) continue; // All rockets will instantly explode on the next frame and send packets to indicate as such. diff --git a/Items/Weapons/Ranged/Hydra.cs b/Items/Weapons/Ranged/Hydra.cs index e3605d5f86..24683fe27e 100644 --- a/Items/Weapons/Ranged/Hydra.cs +++ b/Items/Weapons/Ranged/Hydra.cs @@ -68,11 +68,11 @@ namespace CalamityMod.Items.Weapons.Ranged } else if (player.ActiveItem().type != Item.type || player.dead || !player.active) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { //Destroy all heads - if (Main.projectile[i].type == HeadID && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) - Main.projectile[i].Kill(); + if (p.type == HeadID && p.owner == player.whoAmI) + p.Kill(); } HeadSpawnTimer = 0; } @@ -111,11 +111,11 @@ namespace CalamityMod.Items.Weapons.Ranged Projectile.NewProjectile(source, newPos, spreadVelocity * spreadDirection, Item.shoot, damage, knockback, player.whoAmI); } - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { //Force all heads to shoot - if (Main.projectile[i].type == HeadID && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) - Main.projectile[i].ai[1] = 1f; + if (p.type == HeadID && p.owner == player.whoAmI) + p.ai[1] = 1f; } return false; } diff --git a/Items/Weapons/Rogue/Nychthemeron.cs b/Items/Weapons/Rogue/Nychthemeron.cs index c2ea5bae27..55c9228905 100644 --- a/Items/Weapons/Rogue/Nychthemeron.cs +++ b/Items/Weapons/Rogue/Nychthemeron.cs @@ -32,10 +32,9 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool AltFunctionUse(Player player) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.type == ModContent.ProjectileType() && p.owner == player.whoAmI) + if (p.type == Item.shoot && p.owner == player.whoAmI) { p.ai[0] = 1f; } @@ -93,12 +92,11 @@ namespace CalamityMod.Items.Weapons.Rogue // Ideally new projectiles will fill in the most recently vacated spots in the pattern int[] activeSlots = new int[10] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj.type == ModContent.ProjectileType() && proj.owner == player.whoAmI && proj.active && proj.localAI[0] == 0f && activeSlots[(int)proj.localAI[1]] == -1) + if (proj.type == ModContent.ProjectileType() && proj.owner == player.whoAmI && proj.localAI[0] == 0f && activeSlots[(int)proj.localAI[1]] == -1) { - activeSlots[(int)proj.localAI[1]] = i; + activeSlots[(int)proj.localAI[1]] = proj.whoAmI; } } diff --git a/Items/Weapons/Rogue/Sacrifice.cs b/Items/Weapons/Rogue/Sacrifice.cs index 87a880fec0..922f06a10f 100644 --- a/Items/Weapons/Rogue/Sacrifice.cs +++ b/Items/Weapons/Rogue/Sacrifice.cs @@ -39,18 +39,18 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.altFunctionUse == 2) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != type || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI) + if (p.type != type || p.owner != player.whoAmI) continue; - if (Main.projectile[i].ai[0] != 1f) + if (p.ai[0] != 1f) continue; - NPC attachedNPC = Main.npc[(int)Main.projectile[i].ai[1]]; - Main.projectile[i].ai[0] = 2f; - Main.projectile[i].ModProjectile().AbleToHealOwner = attachedNPC.type != NPCID.TargetDummy && attachedNPC.type != ModContent.NPCType(); - Main.projectile[i].netUpdate = true; + NPC attachedNPC = Main.npc[(int)p.ai[1]]; + p.ai[0] = 2f; + p.ModProjectile().AbleToHealOwner = attachedNPC.type != NPCID.TargetDummy && attachedNPC.type != ModContent.NPCType(); + p.netUpdate = true; } //TODO: Add something here to avoid stealth being consumed return false; diff --git a/Items/Weapons/Summon/AresExoskeleton.cs b/Items/Weapons/Summon/AresExoskeleton.cs index cbf43d0fc4..2734afd15e 100644 --- a/Items/Weapons/Summon/AresExoskeleton.cs +++ b/Items/Weapons/Summon/AresExoskeleton.cs @@ -113,13 +113,13 @@ namespace CalamityMod.Items.Weapons.Summon // If the player owns a panel, make it fade away. if (player.ownedProjectileCounts[panelID] >= 1) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != panelID || Main.projectile[i].owner != player.whoAmI || !Main.projectile[i].active) + if (p.type != panelID || p.owner != player.whoAmI) continue; - Main.projectile[i].ai[0] = 1f; - Main.projectile[i].netUpdate = true; + p.ai[0] = 1f; + p.netUpdate = true; } } diff --git a/Items/Weapons/Summon/BrittleStarStaff.cs b/Items/Weapons/Summon/BrittleStarStaff.cs index 662054a9d7..01a536adff 100644 --- a/Items/Weapons/Summon/BrittleStarStaff.cs +++ b/Items/Weapons/Summon/BrittleStarStaff.cs @@ -53,13 +53,13 @@ namespace CalamityMod.Items.Weapons.Summon Item.noUseGraphic = true; } int bladeIndex = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (p.type == type && p.owner == player.whoAmI) { - Main.projectile[i].ModProjectile().StarIndex = bladeIndex++; - Main.projectile[i].ModProjectile().AITimer = 0f; - Main.projectile[i].netUpdate = true; + p.ModProjectile().StarIndex = bladeIndex++; + p.ModProjectile().AITimer = 0f; + p.netUpdate = true; } } return false; From c785259f2d419cf840da764836ad4c36791c37c0 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 8 May 2024 08:17:21 -0500 Subject: [PATCH 060/197] Hydra sound issue fix. --- Items/Weapons/Ranged/Hydra.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/Hydra.cs b/Items/Weapons/Ranged/Hydra.cs index 600a509958..bdc1828846 100644 --- a/Items/Weapons/Ranged/Hydra.cs +++ b/Items/Weapons/Ranged/Hydra.cs @@ -85,9 +85,9 @@ namespace CalamityMod.Items.Weapons.Ranged return false; //Otherwise, launch the guns + SoundEngine.PlaySound(LaunchSound, player.Center); for (int i = 0; i < Main.maxProjectiles; i++) { - SoundEngine.PlaySound(LaunchSound, player.Center); if (Main.projectile[i].type == HeadID && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) Main.projectile[i].ai[1] = -1f; } From 77847a7e01577b8982b03c13a058dea502e639a6 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Wed, 8 May 2024 19:31:35 +0500 Subject: [PATCH 061/197] Ported projectile iterators --- Items/Weapons/Summon/Cosmilamp.cs | 8 ++--- Items/Weapons/Summon/DazzlingStabberStaff.cs | 8 ++--- Items/Weapons/Summon/DormantBrimseeker.cs | 6 ++-- Items/Weapons/Summon/EndoHydraStaff.cs | 6 ++-- Items/Weapons/Summon/FlamsteedRing.cs | 18 +++++------ Items/Weapons/Summon/GlacialEmbrace.cs | 24 +++++++------- Items/Weapons/Summon/IgneousExaltation.cs | 24 +++++++------- Items/Weapons/Summon/StaffoftheMechworm.cs | 17 +++++----- Items/Weapons/Summon/StarspawnHelixStaff.cs | 10 +++--- Items/Weapons/Summon/ViralSprout.cs | 8 ++--- Items/Weapons/Summon/ViridVanguard.cs | 10 +++--- Items/Weapons/Typeless/RelicOfResilience.cs | 8 ++--- NPCs/AcidRain/SulphurousSkater.cs | 14 ++++---- NPCs/CalamityAI.cs | 14 +++----- NPCs/CalamityGlobalNPC.cs | 15 ++++----- NPCs/DevourerofGods/DevourerofGodsBody.cs | 4 +-- NPCs/DevourerofGods/DevourerofGodsHead.cs | 3 +- NPCs/ExoMechs/Artemis/Artemis.cs | 6 ++-- NPCs/Other/DemonPortal.cs | 10 +++--- NPCs/Other/THELORDE.cs | 3 +- NPCs/Providence/Providence.cs | 6 ++-- NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs | 30 +++++++---------- .../BaseIdleHoldoutProjectile.cs | 4 +-- Projectiles/Boss/AresTeslaOrb.cs | 8 ++--- .../Damageable/DamageableProjectile.cs | 16 +++++----- .../HydraulicVoltCrasherProjectile.cs | 9 +++--- .../DraedonsArsenal/PoleWarperSummon.cs | 20 ++++++------ .../DraedonsArsenal/SnakeEyesSummon.cs | 5 ++- Projectiles/Magic/BlindingLight.cs | 5 ++- Projectiles/Magic/EternityHex.cs | 5 +-- Projectiles/Magic/GranitePulse.cs | 7 ++-- Projectiles/Magic/IceBlock.cs | 3 +- Projectiles/Magic/RancorLaserbeam.cs | 6 ++-- Projectiles/Magic/SmallSpirit.cs | 8 ++--- Projectiles/Melee/MicrowaveAura.cs | 5 ++- Projectiles/Melee/OrderbringerAura.cs | 10 +++--- Projectiles/Melee/StygianShieldAttack.cs | 5 ++- Projectiles/Melee/WulfrumScrewdriverProj.cs | 3 +- .../Melee/Yoyos/SulphurousGrabberYoyo.cs | 5 ++- Projectiles/Ranged/MagnomalyAura.cs | 5 ++- Projectiles/Ranged/PrismMine.cs | 5 ++- Projectiles/Rogue/AlphaSeeker.cs | 7 ++-- Projectiles/Rogue/FinalDawnThrow2.cs | 6 ++-- Projectiles/Rogue/FrostyFlareProj.cs | 10 +++--- Projectiles/Rogue/FrostyFlareStealth.cs | 10 +++--- Projectiles/Rogue/MalachiteStealth.cs | 10 +++--- Projectiles/Rogue/NychthemeronOrb.cs | 5 ++- Projectiles/Rogue/SearedPanProjectile.cs | 32 +++++++++---------- Projectiles/Rogue/TerraDiskProjectile2.cs | 5 ++- .../Summon/AtlasMunitionsAutocannon.cs | 20 ++++++------ .../Summon/AtlasMunitionsAutocannonHeld.cs | 8 ++--- Projectiles/Summon/BlackDragonBody.cs | 12 +++---- Projectiles/Summon/BlackDragonTail.cs | 12 +++---- Projectiles/Summon/DormantBrimseekerAura.cs | 24 +++++++------- Projectiles/Summon/DreadmineTurret.cs | 4 +-- Projectiles/Summon/GiantIbanRobotOfDoom.cs | 27 +++++++--------- .../Summon/GlacialEmbracePointyThing.cs | 8 ++--- Projectiles/Summon/LanternSoul.cs | 4 +-- Projectiles/Summon/MK2FlaskSummon.cs | 6 ++-- Projectiles/Summon/MechwormBody.cs | 6 ++-- Projectiles/Summon/MechwormHead.cs | 10 +++--- Projectiles/Summon/MutatedTruffleMinion.cs | 5 ++- Projectiles/Summon/PlantationStaffTentacle.cs | 6 ++-- Projectiles/Summon/SeekerSummonProj.cs | 3 +- Projectiles/Summon/SkeletalDragonMother.cs | 10 +++--- .../Summon/SmallAresArms/ExoskeletonPanel.cs | 24 +++++++------- .../Summon/SmallAresArms/MinionTeslaOrb.cs | 8 ++--- Projectiles/Summon/WhiteDragonBody.cs | 12 +++---- Projectiles/Summon/WhiteDragonTail.cs | 12 +++---- Projectiles/Summon/WulfrumDroid.cs | 5 ++- .../EnchantmentManager.cs | 4 +-- Utilities/NPCUtils.cs | 7 ++-- Utilities/ProjectileUtils.cs | 25 +++++++-------- Utilities/RicoshotUtils.cs | 15 ++++----- 74 files changed, 343 insertions(+), 405 deletions(-) diff --git a/Items/Weapons/Summon/Cosmilamp.cs b/Items/Weapons/Summon/Cosmilamp.cs index 7d9a868889..64fab450d3 100644 --- a/Items/Weapons/Summon/Cosmilamp.cs +++ b/Items/Weapons/Summon/Cosmilamp.cs @@ -45,12 +45,12 @@ namespace CalamityMod.Items.Weapons.Summon if (player.altFunctionUse != 2) { // Reset the timer for all lamps, to re-align the formation. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) + if (pro.type == type && pro.owner == player.whoAmI) { - Main.projectile[i].ModProjectile().Timer = 0f; - Main.projectile[i].netUpdate = true; + pro.ModProjectile().Timer = 0f; + pro.netUpdate = true; } } diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index 63e9915dff..4355ba8e85 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -48,12 +48,12 @@ namespace CalamityMod.Items.Weapons.Summon angleMax += MathHelper.ToRadians((player.ownedProjectileCounts[Item.shoot] - 8) * 2.5f); } angleMax = angleMax > MathHelper.ToRadians(105f) ? MathHelper.ToRadians(105f) : angleMax; // More intuative than using a min function - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI) + if (p.type == type && p.owner == player.whoAmI) { - Main.projectile[i].ai[1] = (index / CalamityUtils.CountProjectiles(type)) * angleMax - angleMax / 2f; - Main.projectile[i].netUpdate = true; + p.ai[1] = (index / CalamityUtils.CountProjectiles(type)) * angleMax - angleMax / 2f; + p.netUpdate = true; index++; } } diff --git a/Items/Weapons/Summon/DormantBrimseeker.cs b/Items/Weapons/Summon/DormantBrimseeker.cs index 4c2bb3a4ce..9d632037a1 100644 --- a/Items/Weapons/Summon/DormantBrimseeker.cs +++ b/Items/Weapons/Summon/DormantBrimseeker.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { float totalSlots = 0f; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].minion && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (p.minion && p.owner == player.whoAmI) { - totalSlots += Main.projectile[i].minionSlots; + totalSlots += p.minionSlots; } } if (totalSlots < player.maxMinions) diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index 496a0f5c8e..f4699f3de1 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -39,11 +39,11 @@ namespace CalamityMod.Items.Weapons.Summon { bool bodyExists = false; int bodyIndex = -1; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI) + if (p.type == type && p.owner == player.whoAmI) { - bodyIndex = i; + bodyIndex = p.whoAmI; bodyExists = true; break; } diff --git a/Items/Weapons/Summon/FlamsteedRing.cs b/Items/Weapons/Summon/FlamsteedRing.cs index e3b102d464..e1fa8a389c 100644 --- a/Items/Weapons/Summon/FlamsteedRing.cs +++ b/Items/Weapons/Summon/FlamsteedRing.cs @@ -122,13 +122,12 @@ namespace CalamityMod.Items.Weapons.Summon // If the player has any robots, kill them all. if (player.ownedProjectileCounts[Item.shoot] > 0) { - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && - Main.projectile[i].type == Item.shoot && - Main.projectile[i].owner == player.whoAmI) + if (p.type == Item.shoot && + p.owner == player.whoAmI) { - Main.projectile[i].Kill(); + p.Kill(); } } if (CalamityPlayer.areThereAnyDamnBosses) @@ -151,13 +150,12 @@ namespace CalamityMod.Items.Weapons.Summon int robotIndex = -1; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && - Main.projectile[i].type == ModContent.ProjectileType() && - Main.projectile[i].owner == player.whoAmI) + if (p.type == ModContent.ProjectileType() && + p.owner == player.whoAmI) { - robotIndex = i; + robotIndex = p.whoAmI; break; } } diff --git a/Items/Weapons/Summon/GlacialEmbrace.cs b/Items/Weapons/Summon/GlacialEmbrace.cs index ce81847306..4cb39665a5 100644 --- a/Items/Weapons/Summon/GlacialEmbrace.cs +++ b/Items/Weapons/Summon/GlacialEmbrace.cs @@ -35,11 +35,11 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { float totalMinionSlots = 0f; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].minion && Main.projectile[i].owner == player.whoAmI) + if (pro.minion && pro.owner == player.whoAmI) { - totalMinionSlots += Main.projectile[i].minionSlots; + totalMinionSlots += pro.minionSlots; } } if (player.altFunctionUse != 2 && totalMinionSlots < player.maxMinions) @@ -50,29 +50,29 @@ namespace CalamityMod.Items.Weapons.Summon if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; int pointyThingCount = 0; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI) + if (pro.type == type && pro.owner == player.whoAmI) { - if (!(Main.projectile[i].ModProjectile as GlacialEmbracePointyThing).circlingPlayer) + if (!(pro.ModProjectile as GlacialEmbracePointyThing).circlingPlayer) continue; pointyThingCount++; } } float angleVariance = MathHelper.TwoPi / pointyThingCount; float angle = 0f; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].ai[1] == 0f) + if (pro.type == type && pro.owner == player.whoAmI && pro.ai[1] == 0f) { - if (!(Main.projectile[i].ModProjectile as GlacialEmbracePointyThing).circlingPlayer) + if (!(pro.ModProjectile as GlacialEmbracePointyThing).circlingPlayer) continue; - Main.projectile[i].ai[0] = angle; - Main.projectile[i].netUpdate = true; + pro.ai[0] = angle; + pro.netUpdate = true; angle += angleVariance; for (int j = 0; j < 22; j++) { - Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, DustID.Ice); + Dust dust = Dust.NewDustDirect(pro.position, pro.width, pro.height, DustID.Ice); dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt(); dust.noGravity = true; } diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index f30bc2b7d8..dc354b4b21 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -37,11 +37,11 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { float totalMinionSlots = 0f; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].minion && Main.projectile[i].owner == player.whoAmI) + if (pro.minion && pro.owner == player.whoAmI) { - totalMinionSlots += Main.projectile[i].minionSlots; + totalMinionSlots += pro.minionSlots; } } if (player.altFunctionUse != 2 && totalMinionSlots < player.maxMinions) @@ -51,16 +51,16 @@ namespace CalamityMod.Items.Weapons.Summon if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; int swordCount = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI) + if (pro.type == type && pro.owner == player.whoAmI) { - if ((Main.projectile[i].ModProjectile as IgneousBlade).Firing) + if ((pro.ModProjectile as IgneousBlade).Firing) continue; swordCount++; for (int j = 0; j < 22; j++) { - Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 6); + Dust dust = Dust.NewDustDirect(pro.position, pro.width, pro.height, 6); dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt(); dust.noGravity = true; } @@ -68,17 +68,17 @@ namespace CalamityMod.Items.Weapons.Summon } float angleVariance = MathHelper.TwoPi / swordCount; float angle = 0f; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + if (pro.type == type && pro.owner == player.whoAmI && pro.localAI[1] == 0f) { - if ((Main.projectile[i].ModProjectile as IgneousBlade).Firing) + if ((pro.ModProjectile as IgneousBlade).Firing) continue; - Main.projectile[i].ai[0] = angle; + pro.ai[0] = angle; angle += angleVariance; for (int j = 0; j < 22; j++) { - Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 6); + Dust dust = Dust.NewDustDirect(pro.position, pro.width, pro.height, 6); dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt(); dust.noGravity = true; } diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/StaffoftheMechworm.cs index 5cc6fe5d08..1edb8a11f6 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/StaffoftheMechworm.cs @@ -37,10 +37,9 @@ namespace CalamityMod.Items.Weapons.Summon { float neededSlots = 1; float foundSlotsCount = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.active && p.minion && p.owner == player.whoAmI) + if (p.minion && p.owner == player.whoAmI) { foundSlotsCount += p.minionSlots; if (foundSlotsCount + neededSlots > player.maxMinions) @@ -102,17 +101,17 @@ namespace CalamityMod.Items.Weapons.Summon { int head = -1; int tail = -1; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer) + if (p.owner == Main.myPlayer) { - if (head == -1 && Main.projectile[i].type == ModContent.ProjectileType()) + if (head == -1 && p.type == ModContent.ProjectileType()) { - head = i; + head = p.whoAmI; } - if (tail == -1 && Main.projectile[i].type == ModContent.ProjectileType()) + if (tail == -1 && p.type == ModContent.ProjectileType()) { - tail = i; + tail = p.whoAmI; } if (head != -1 && tail != -1) { diff --git a/Items/Weapons/Summon/StarspawnHelixStaff.cs b/Items/Weapons/Summon/StarspawnHelixStaff.cs index fd98d1a8b1..decd5b5389 100644 --- a/Items/Weapons/Summon/StarspawnHelixStaff.cs +++ b/Items/Weapons/Summon/StarspawnHelixStaff.cs @@ -44,13 +44,13 @@ namespace CalamityMod.Items.Weapons.Summon } int bladeIndex = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (pro.type == type && pro.owner == player.whoAmI) { - Main.projectile[i].ModProjectile().ProbeIndex = bladeIndex++; - Main.projectile[i].ModProjectile().AITimer = 0f; - Main.projectile[i].netUpdate = true; + pro.ModProjectile().ProbeIndex = bladeIndex++; + pro.ModProjectile().AITimer = 0f; + pro.netUpdate = true; } } } diff --git a/Items/Weapons/Summon/ViralSprout.cs b/Items/Weapons/Summon/ViralSprout.cs index 822d0453c7..1d69d843a1 100644 --- a/Items/Weapons/Summon/ViralSprout.cs +++ b/Items/Weapons/Summon/ViralSprout.cs @@ -39,13 +39,13 @@ namespace CalamityMod.Items.Weapons.Summon Main.projectile[p].originalDamage = Item.damage; int minionCount = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].type != type || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI) + if (pro.type != type || pro.owner != player.whoAmI) continue; - Main.projectile[i].localAI[0] = minionCount; - Main.projectile[i].netUpdate = true; + pro.localAI[0] = minionCount; + pro.netUpdate = true; minionCount++; } } diff --git a/Items/Weapons/Summon/ViridVanguard.cs b/Items/Weapons/Summon/ViridVanguard.cs index 64781b3446..4ce5120c19 100644 --- a/Items/Weapons/Summon/ViridVanguard.cs +++ b/Items/Weapons/Summon/ViridVanguard.cs @@ -63,13 +63,13 @@ namespace CalamityMod.Items.Weapons.Summon } int bladeIndex = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + if (pro.type == type && pro.owner == player.whoAmI) { - Main.projectile[i].ModProjectile().BladeIndex = bladeIndex++; - Main.projectile[i].ModProjectile().AITimer = 0f; - Main.projectile[i].netUpdate = true; + pro.ModProjectile().BladeIndex = bladeIndex++; + pro.ModProjectile().AITimer = 0f; + pro.netUpdate = true; } } } diff --git a/Items/Weapons/Typeless/RelicOfResilience.cs b/Items/Weapons/Typeless/RelicOfResilience.cs index db7549197f..4f699b7e5e 100644 --- a/Items/Weapons/Typeless/RelicOfResilience.cs +++ b/Items/Weapons/Typeless/RelicOfResilience.cs @@ -56,12 +56,12 @@ namespace CalamityMod.Items.Weapons.Typeless }; if (player.ownedProjectileCounts[Item.shoot] > 0) { - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == Item.shoot) + if (p.type == Item.shoot) { - Main.projectile[i].Center = Main.MouseWorld; - Main.projectile[i].netUpdate = true; + p.Center = Main.MouseWorld; + p.netUpdate = true; } } } diff --git a/NPCs/AcidRain/SulphurousSkater.cs b/NPCs/AcidRain/SulphurousSkater.cs index d5502e57d5..ffca1f65e9 100644 --- a/NPCs/AcidRain/SulphurousSkater.cs +++ b/NPCs/AcidRain/SulphurousSkater.cs @@ -178,20 +178,20 @@ namespace CalamityMod.NPCs.AcidRain float minimumDistance = 2400f; Projectile closestBubble = null; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != bubbleType || !Main.projectile[i].active) + if (p.type != bubbleType) continue; - if (Math.Abs(NPC.Center.X - Main.projectile[i].Center.X) >= minimumDistance || - Main.projectile[i].Center.Y <= NPC.Bottom.Y || - !Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height)) + if (Math.Abs(NPC.Center.X - p.Center.X) >= minimumDistance || + p.Center.Y <= NPC.Bottom.Y || + !Collision.CanHit(NPC.position, NPC.width, NPC.height, p.position, p.width, p.height)) { continue; } - minimumDistance = NPC.Distance(Main.projectile[i].Center); - closestBubble = Main.projectile[i]; + minimumDistance = NPC.Distance(p.Center); + closestBubble = p; } distanceToBubble = minimumDistance; diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 2fa37d76a2..a4f92a3e10 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -4884,17 +4884,13 @@ namespace CalamityMod.NPCs } // Despawn potentially hazardous projectiles when entering a new phase - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - Projectile projectile = Main.projectile[i]; - if (projectile.active) + if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || - projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - if (projectile.timeLeft > 30) - projectile.timeLeft = 30; - } + if (projectile.timeLeft > 30) + projectile.timeLeft = 30; } } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index bee91818bf..eda47898f4 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4520,15 +4520,15 @@ namespace CalamityMod.NPCs { int bullseyeType = ProjectileType(); Projectile bullseye = null; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != bullseyeType || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI) + if (p.type != bullseyeType || p.owner != player.whoAmI) continue; // Only choose a bullseye if it is attached to the NPC that is being hit. - if (npc.whoAmI == (int)Main.projectile[i].ai[0]) + if (npc.whoAmI == (int)p.ai[0]) { - bullseye = Main.projectile[i]; + bullseye = p; break; } } @@ -6313,12 +6313,11 @@ namespace CalamityMod.NPCs return; Projectile proj = null; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - proj = Main.projectile[i]; - if (Main.projectile[i].active && Main.projectile[i].bobber && Main.projectile[i].owner == player.whoAmI) + proj = p; + if (p.bobber && p.owner == player.whoAmI) { - proj = Main.projectile[i]; break; } } diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index d6171d5278..430d0602a7 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -326,9 +326,9 @@ namespace CalamityMod.NPCs.DevourerofGods private bool AnyTeleportRifts() { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == ModContent.ProjectileType()) + if (p.type == ModContent.ProjectileType()) return true; } return false; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 2c8849bc94..f785d79e08 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -2526,9 +2526,8 @@ namespace CalamityMod.NPCs.DevourerofGods private Vector2 GetRiftLocation(bool spawnDust) { Vector2 realSpot = default; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; if (proj.type == ModContent.ProjectileType()) { if (!spawnDust) diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index 5c4b401b65..db6cb20f0e 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -1122,11 +1122,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis { calamityGlobalNPC.newAI[3] = 0f; AIState = (float)Phase.Deathray; - for (int i = 0; i < Main.maxProjectiles; i ++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == ModContent.ProjectileType()) + if (p.type == ModContent.ProjectileType()) { - Main.projectile[i].active = false; + p.active = false; continue; } } diff --git a/NPCs/Other/DemonPortal.cs b/NPCs/Other/DemonPortal.cs index 7e64b7d563..90319a3abb 100644 --- a/NPCs/Other/DemonPortal.cs +++ b/NPCs/Other/DemonPortal.cs @@ -47,14 +47,14 @@ namespace CalamityMod.NPCs.Other NPC.dontTakeDamage = true; NPC.netUpdate = true; int demonType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != demonType || !Main.projectile[i].active || Main.projectile[i].hostile) + if (p.type != demonType || p.hostile) continue; - Main.projectile[i].hostile = true; - Main.projectile[i].friendly = false; - Main.projectile[i].netUpdate = true; + p.hostile = true; + p.friendly = false; + p.netUpdate = true; } } diff --git a/NPCs/Other/THELORDE.cs b/NPCs/Other/THELORDE.cs index 73744b4cd2..29f99b26c2 100644 --- a/NPCs/Other/THELORDE.cs +++ b/NPCs/Other/THELORDE.cs @@ -312,9 +312,8 @@ namespace CalamityMod.NPCs.Other NPC.ai[3] = 0f; NPC.aiStyle = (urAMemeNow ? -1 : aiChoice); NPC.netUpdate = true; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; if (proj.type == ModContent.ProjectileType() || proj.type == ModContent.ProjectileType()) { proj.Kill(); diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index e0cea09394..ae5c7802f9 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1749,11 +1749,11 @@ namespace CalamityMod.NPCs.Providence DespawnSpecificProjectiles(); int laserType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!Main.projectile[i].active || Main.projectile[i].type != laserType) + if (p.type != laserType) continue; - Main.projectile[i].Kill(); + p.Kill(); } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs index bd5e272b70..3bf3234916 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs @@ -315,19 +315,17 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (npc.ai[1] == 60f) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - Projectile projectile = Main.projectile[i]; - if (projectile.active && (projectile.type == ProjectileID.MoonLeech || projectile.type == ProjectileID.PhantasmalBolt || + if ((projectile.type == ProjectileID.MoonLeech || projectile.type == ProjectileID.PhantasmalBolt || projectile.type == ProjectileID.PhantasmalDeathray || projectile.type == ProjectileID.PhantasmalEye || projectile.type == ProjectileID.PhantasmalSphere)) projectile.Kill(); } - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC3 in Main.ActiveNPCs) { - NPC nPC3 = Main.npc[j]; - if (nPC3.active && nPC3.type == NPCID.MoonLordFreeEye) + if (nPC3.type == NPCID.MoonLordFreeEye) { nPC3.HitEffect(0, 9999.0); nPC3.active = false; @@ -846,7 +844,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (targetLeechDist != Vector2.Zero) targetLeechDist.Normalize(); - Projectile.NewProjectile(npc.GetSource_FromAI(), leechNPCCenter.X, leechNPCCenter.Y, targetLeechDist.X, targetLeechDist.Y, ProjectileID.MoonLeech, 0, 0f, Main.myPlayer, npc.whoAmI + 1, i); + Projectile.NewProjectile(npc.GetSource_FromAI(), leechNPCCenter.X, leechNPCCenter.Y, targetLeechDist.X, targetLeechDist.Y, ProjectileID.MoonLeech, 0, 0f, Main.myPlayer, npc.whoAmI + 1, player6.whoAmI); } } } @@ -1384,10 +1382,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } sphereVelocity *= velocity; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile currentProjectile in Main.ActiveProjectiles) { - Projectile currentProjectile = Main.projectile[i]; - if (currentProjectile.active && currentProjectile.type == ProjectileID.PhantasmalSphere && currentProjectile.ai[1] == npc.whoAmI && currentProjectile.ai[0] != -1f) + if (currentProjectile.type == ProjectileID.PhantasmalSphere && currentProjectile.ai[1] == npc.whoAmI && currentProjectile.ai[0] != -1f) { currentProjectile.ai[0] = -1f; currentProjectile.velocity = sphereVelocity; @@ -1895,13 +1892,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.velocity = Vector2.UnitY * -7f; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile trueEyeSpheres in Main.ActiveProjectiles) { - Projectile trueEyeSpheres = Main.projectile[i]; - if (trueEyeSpheres.active && trueEyeSpheres.type == type && trueEyeSpheres.ai[1] == npc.whoAmI && trueEyeSpheres.ai[0] != -1f) + if (trueEyeSpheres.type == type && trueEyeSpheres.ai[1] == npc.whoAmI && trueEyeSpheres.ai[0] != -1f) { - Projectile trueEyeSphereVel = trueEyeSpheres; - trueEyeSphereVel.velocity += npc.velocity; + trueEyeSpheres.velocity += npc.velocity; trueEyeSpheres.netUpdate = true; } } @@ -1927,10 +1922,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses Vector2 trueEyeSphereVelocity = (npc.ai[2] - MathHelper.PiOver2).ToRotationVector2() * velocity; npc.velocity = trueEyeSphereVelocity * 2f; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile trueEyeSphereProj in Main.ActiveProjectiles) { - Projectile trueEyeSphereProj = Main.projectile[i]; - if (trueEyeSphereProj.active && trueEyeSphereProj.type == type && trueEyeSphereProj.ai[1] == npc.whoAmI && trueEyeSphereProj.ai[0] != -1f) + if (trueEyeSphereProj.type == type && trueEyeSphereProj.ai[1] == npc.whoAmI && trueEyeSphereProj.ai[0] != -1f) { trueEyeSphereProj.ai[0] = -1f; trueEyeSphereProj.damage = damage; diff --git a/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs index 0674196684..17102dbbe6 100644 --- a/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs @@ -49,9 +49,9 @@ namespace CalamityMod.Projectiles.BaseProjectiles bool bladeIsPresent = false; int holdoutType = ItemProjectileRelationship[itemID]; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != holdoutType || Main.projectile[i].owner != player.whoAmI || !Main.projectile[i].active) + if (p.type != holdoutType || p.owner != player.whoAmI) continue; bladeIsPresent = true; diff --git a/Projectiles/Boss/AresTeslaOrb.cs b/Projectiles/Boss/AresTeslaOrb.cs index 96c7223a95..4d6bd2cb5b 100644 --- a/Projectiles/Boss/AresTeslaOrb.cs +++ b/Projectiles/Boss/AresTeslaOrb.cs @@ -155,15 +155,15 @@ namespace CalamityMod.Projectiles.Boss bool expertMode = Main.expertMode || bossRush; float detachDistance = bossRush ? 1600f : death ? 1360f : revenge ? 1280f : expertMode ? 1200f : 960f; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != Projectile.type || Main.projectile[i].ai[0] != Identity + 1f || !Main.projectile[i].active || Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Calamity().newAI[0] == (float)AresBody.Phase.Deathrays) + if (p.type != Projectile.type || p.ai[0] != Identity + 1f || Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Calamity().newAI[0] == (float)AresBody.Phase.Deathrays) continue; - if (Vector2.Distance(Projectile.Center, Main.projectile[i].Center) > detachDistance) + if (Vector2.Distance(Projectile.Center, p.Center) > detachDistance) continue; - return Main.projectile[i]; + return p; } return null; diff --git a/Projectiles/Damageable/DamageableProjectile.cs b/Projectiles/Damageable/DamageableProjectile.cs index 9fc0c55e0a..ad9730fc6b 100644 --- a/Projectiles/Damageable/DamageableProjectile.cs +++ b/Projectiles/Damageable/DamageableProjectile.cs @@ -201,20 +201,20 @@ namespace CalamityMod.Projectiles.Damageable } public virtual bool ProjectileCollisionCheck() { - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - bool canBeHit = (Main.projectile[i].friendly && DamageSources.HasFlag(DamageSourceType.FriendlyProjectiles) || - Main.projectile[i].hostile && DamageSources.HasFlag(DamageSourceType.HostileProjectiles)) && - i != Projectile.whoAmI; - if (Main.projectile[i].active && canBeHit && Main.projectile[i].damage > 0) + bool canBeHit = (p.friendly && DamageSources.HasFlag(DamageSourceType.FriendlyProjectiles) || + p.hostile && DamageSources.HasFlag(DamageSourceType.HostileProjectiles)) && + p.whoAmI != Projectile.whoAmI; + if (canBeHit && p.damage > 0) { - if (Main.projectile[i].Colliding(Main.projectile[i].Hitbox, Projectile.Hitbox)) + if (p.Colliding(p.Hitbox, Projectile.Hitbox)) { - int damage = Main.DamageVar(Main.projectile[i].damage) * 2; + int damage = Main.DamageVar(p.damage) * 2; damage = Main.expertMode ? (int)(damage * Main.RegisteredGameModes[GameModeID.Expert].EnemyDamageMultiplier) : damage; CombatText.NewText(new Rectangle((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height), CombatText.DamagedFriendly, damage); Life -= damage; - HitEffectProjectile(damage, Main.projectile[i]); + HitEffectProjectile(damage, p); DamageImmunityFrames = MaxDamageImmunityFrames; if (Projectile.usesIDStaticNPCImmunity) DamageImmunityFrames = Projectile.idStaticNPCHitCooldown; diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index 69da7b233c..da7aece0f7 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -160,13 +160,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // No more than 3 enemies with streams if (Owner.ownedProjectileCounts[attackType] > 3) return false; - + // Prevent supercharging an enemy twice. - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && - Main.projectile[i].type == attackType && - Main.projectile[i].ai[1] == i) + if (p.type == attackType && + p.ai[1] == p.whoAmI) { return false; } diff --git a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs index 93fab2bf0e..b09d4808c0 100644 --- a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs +++ b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs @@ -116,13 +116,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public void NPCMovement(NPC npc) { - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == Projectile.type && - Main.projectile[i].active && + if (p.type == Projectile.type && Projectile.owner == Projectile.owner) { - PoleWarperSummon otherPole = (PoleWarperSummon)Main.projectile[i].ModProjectile; + PoleWarperSummon otherPole = (PoleWarperSummon)p.ModProjectile; if (otherPole.Time != Time && otherPole.Time != Time + 1) { otherPole.Time = Time; @@ -152,22 +151,21 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public void RepelMovement() { // This does not incorporate attraction on purpose. Doing so causes the minions to very easily become distracted. - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == Projectile.type && - Main.projectile[i].active && - Projectile.Distance(Main.projectile[i].Center) < 40f) + if (p.type == Projectile.type && + Projectile.Distance(p.Center) < 40f) { - PoleWarperSummon otherPole = (PoleWarperSummon)Main.projectile[i].ModProjectile; + PoleWarperSummon otherPole = (PoleWarperSummon)p.ModProjectile; if (otherPole.North != North) { - float distanceFromOtherPole = Projectile.Distance(Main.projectile[i].Center) + 1f; + float distanceFromOtherPole = Projectile.Distance(p.Center) + 1f; if (float.IsNaN(distanceFromOtherPole) || distanceFromOtherPole < 1f) { distanceFromOtherPole = 1f; } float repulsionSpeed = MaximumRepulsionSpeed * (float)Math.Pow(3f, -distanceFromOtherPole / 27f); - Projectile.velocity -= (Main.projectile[i].Center - Projectile.Center).SafeNormalize(Vector2.UnitY) * repulsionSpeed; + Projectile.velocity -= (p.Center - Projectile.Center).SafeNormalize(Vector2.UnitY) * repulsionSpeed; } } } diff --git a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs index a789a53b17..ae7191de5e 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs @@ -139,10 +139,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // so it looks like the minion deflected his own projectile. if (HasShot) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj is not null && proj.active && proj.type == ModContent.ProjectileType() && proj.owner == Owner.whoAmI && proj.ModProjectile().MinionID == Projectile.whoAmI && proj.ModProjectile().HasRedirected) + if (proj.type == ModContent.ProjectileType() && proj.owner == Owner.whoAmI && proj.ModProjectile().MinionID == Projectile.whoAmI && proj.ModProjectile().HasRedirected) { Projectile.Center = proj.Center; SwitchAIState(AIState.Redirecting); diff --git a/Projectiles/Magic/BlindingLight.cs b/Projectiles/Magic/BlindingLight.cs index 2e0835f332..764b5c32d6 100644 --- a/Projectiles/Magic/BlindingLight.cs +++ b/Projectiles/Magic/BlindingLight.cs @@ -61,10 +61,9 @@ namespace CalamityMod.Projectiles.Magic { int lightBlade = ModContent.ProjectileType(); int extraDamage = 0; - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile otherProj in Main.ActiveProjectiles) { - Projectile otherProj = Main.projectile[i]; - if (otherProj is null || !otherProj.active || otherProj.owner != Projectile.owner || otherProj.type != lightBlade) + if (otherProj.owner != Projectile.owner || otherProj.type != lightBlade) continue; // Can only consume blades within the flash radius (which should be most if not all of them anyway) diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index a8906062d9..0480e672e8 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -177,11 +177,8 @@ namespace CalamityMod.Projectiles.Magic TargetNPCIndex = newTarget.whoAmI; // Adjust the target index for the other components of the projectile. - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (!proj.active) - continue; if (proj.owner != Projectile.owner) continue; if (proj.type != ModContent.ProjectileType() && proj.type != ModContent.ProjectileType()) diff --git a/Projectiles/Magic/GranitePulse.cs b/Projectiles/Magic/GranitePulse.cs index ed6cc4df7c..cee8512730 100644 --- a/Projectiles/Magic/GranitePulse.cs +++ b/Projectiles/Magic/GranitePulse.cs @@ -67,15 +67,14 @@ namespace CalamityMod.Projectiles.Magic int index = 0; float findOldest = 0f; int projType = Projectile.type; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj.active && proj.owner == Projectile.owner && proj.type == projType && proj.ai[1] < 3600f) + if (proj.owner == Projectile.owner && proj.type == projType && proj.ai[1] < 3600f) { projCount++; if (proj.ai[1] > findOldest) { - index = i; + index = proj.whoAmI; findOldest = proj.ai[1]; } } diff --git a/Projectiles/Magic/IceBlock.cs b/Projectiles/Magic/IceBlock.cs index 47f2706639..79f3da1091 100644 --- a/Projectiles/Magic/IceBlock.cs +++ b/Projectiles/Magic/IceBlock.cs @@ -35,9 +35,8 @@ namespace CalamityMod.Projectiles.Magic { Projectile.alpha = 20; } - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; if (proj.type == ModContent.ProjectileType() && proj.owner == Main.myPlayer) { Vector2 pos1 = new Vector2(proj.Center.X, proj.Center.Y - (proj.height * 0.5f) - 44f); diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index 023978211a..9c52b27a05 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -21,12 +21,12 @@ namespace CalamityMod.Projectiles.Magic { get { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].identity != Projectile.ai[0] || !Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner) + if (p.identity != Projectile.ai[0] || p.owner != Projectile.owner) continue; - return Main.projectile[i]; + return p; } return null; } diff --git a/Projectiles/Magic/SmallSpirit.cs b/Projectiles/Magic/SmallSpirit.cs index 3c24b7b56c..c341c337cf 100644 --- a/Projectiles/Magic/SmallSpirit.cs +++ b/Projectiles/Magic/SmallSpirit.cs @@ -15,15 +15,15 @@ namespace CalamityMod.Projectiles.Magic get { int spiritType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != spiritType || Main.projectile[i].identity != Projectile.ai[0] || - Main.projectile[i].owner != Projectile.owner) + if (p.type != spiritType || p.identity != Projectile.ai[0] || + p.owner != Projectile.owner) { continue; } - return Main.projectile[i]; + return p; } return null; } diff --git a/Projectiles/Melee/MicrowaveAura.cs b/Projectiles/Melee/MicrowaveAura.cs index f0249d327c..b907c07003 100644 --- a/Projectiles/Melee/MicrowaveAura.cs +++ b/Projectiles/Melee/MicrowaveAura.cs @@ -66,10 +66,9 @@ namespace CalamityMod.Projectiles.Melee private Projectile FindParent() { Projectile parent = null; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.identity == Projectile.ai[0] && p.active && p.type == ModContent.ProjectileType() && p.owner == Projectile.owner) + if (p.identity == Projectile.ai[0] && p.type == ModContent.ProjectileType() && p.owner == Projectile.owner) { parent = p; break; diff --git a/Projectiles/Melee/OrderbringerAura.cs b/Projectiles/Melee/OrderbringerAura.cs index ebf5317dae..bdc5e8c106 100644 --- a/Projectiles/Melee/OrderbringerAura.cs +++ b/Projectiles/Melee/OrderbringerAura.cs @@ -52,15 +52,15 @@ namespace CalamityMod.Projectiles.Melee int incTracker = 0; float aiTracker = 0f; int theProjectile = Projectile.type; - for (int i = 0; i < 1000; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && Main.projectile[i].type == theProjectile && Main.projectile[i].ai[1] < 3600f) + if (p.owner == Projectile.owner && p.type == theProjectile && p.ai[1] < 3600f) { projTimer++; - if (Main.projectile[i].ai[1] > aiTracker) + if (p.ai[1] > aiTracker) { - incTracker = i; - aiTracker = Main.projectile[i].ai[1]; + incTracker = p.whoAmI; + aiTracker = p.ai[1]; } } } diff --git a/Projectiles/Melee/StygianShieldAttack.cs b/Projectiles/Melee/StygianShieldAttack.cs index 57cdbaf87d..c34bdc48cf 100644 --- a/Projectiles/Melee/StygianShieldAttack.cs +++ b/Projectiles/Melee/StygianShieldAttack.cs @@ -69,10 +69,9 @@ namespace CalamityMod.Projectiles.Melee // Detach the owner from any mounts/hooks if (Owner.mount != null) Owner.mount.Dismount(Owner); - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (!proj.active || proj.owner != Owner.whoAmI || proj.aiStyle != ProjAIStyleID.Hook) + if (proj.owner != Owner.whoAmI || proj.aiStyle != ProjAIStyleID.Hook) continue; if (proj.aiStyle == ProjAIStyleID.Hook) proj.Kill(); diff --git a/Projectiles/Melee/WulfrumScrewdriverProj.cs b/Projectiles/Melee/WulfrumScrewdriverProj.cs index e06f69f78e..92bfebfb76 100644 --- a/Projectiles/Melee/WulfrumScrewdriverProj.cs +++ b/Projectiles/Melee/WulfrumScrewdriverProj.cs @@ -88,9 +88,8 @@ namespace CalamityMod.Projectiles.Melee //Check for launchable screws. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; if (proj.ModProjectile != null && proj.owner == Projectile.owner && proj.ModProjectile is WulfrumScrew screw && screw.BazingaTime == 0) { float collisionPoint = 0f; diff --git a/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs b/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs index cd27228e10..b965c8a191 100644 --- a/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs +++ b/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs @@ -59,10 +59,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (bubbleStronkCounter >= 180) bubbleStronk = false; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj.active && proj.type == ModContent.ProjectileType() && proj.ai[0] >= 40f && proj.owner == Projectile.owner) + if (proj.type == ModContent.ProjectileType() && proj.ai[0] >= 40f && proj.owner == Projectile.owner) { if (Projectile.Hitbox.Intersects(proj.Hitbox)) { diff --git a/Projectiles/Ranged/MagnomalyAura.cs b/Projectiles/Ranged/MagnomalyAura.cs index 7b2ba4cdc3..44c91fe234 100644 --- a/Projectiles/Ranged/MagnomalyAura.cs +++ b/Projectiles/Ranged/MagnomalyAura.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -30,9 +30,8 @@ namespace CalamityMod.Projectiles.Ranged { Projectile parent = Main.projectile[0]; bool active = false; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; if (p.identity == Projectile.ai[0] && p.active && p.type == ModContent.ProjectileType()) { parent = p; diff --git a/Projectiles/Ranged/PrismMine.cs b/Projectiles/Ranged/PrismMine.cs index e37bcf7ee2..28c0e2866d 100644 --- a/Projectiles/Ranged/PrismMine.cs +++ b/Projectiles/Ranged/PrismMine.cs @@ -68,10 +68,9 @@ namespace CalamityMod.Projectiles.Ranged public List LocateOtherMines() { List mines = new List(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj.type != Projectile.type || !proj.active || proj.timeLeft <= 12 || i == Projectile.whoAmI) + if (proj.type != Projectile.type || proj.timeLeft <= 12 || proj.whoAmI == Projectile.whoAmI) continue; if (!Projectile.WithinRange(proj.Center, MineConnectDistanceMax)) continue; diff --git a/Projectiles/Rogue/AlphaSeeker.cs b/Projectiles/Rogue/AlphaSeeker.cs index ef808a489e..abb4c2339c 100644 --- a/Projectiles/Rogue/AlphaSeeker.cs +++ b/Projectiles/Rogue/AlphaSeeker.cs @@ -50,10 +50,9 @@ namespace CalamityMod.Projectiles.Rogue Projectile parent = Main.projectile[0]; bool active = false; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.identity == Projectile.ai[1] && p.active) + if (p.identity == Projectile.ai[1]) { parent = p; active = true; @@ -154,7 +153,7 @@ namespace CalamityMod.Projectiles.Rogue if (distToNPC < minDist) { minDist = distToNPC; - target = i; + target = npc.whoAmI; } } } diff --git a/Projectiles/Rogue/FinalDawnThrow2.cs b/Projectiles/Rogue/FinalDawnThrow2.cs index cfd96f4688..18f60e41a7 100644 --- a/Projectiles/Rogue/FinalDawnThrow2.cs +++ b/Projectiles/Rogue/FinalDawnThrow2.cs @@ -77,11 +77,9 @@ namespace CalamityMod.Projectiles.Rogue } // Kill any hooks from the projectile owner. - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - - if (!proj.active || proj.owner != player.whoAmI || proj.aiStyle != ProjAIStyleID.Hook) + if (proj.owner != player.whoAmI || proj.aiStyle != ProjAIStyleID.Hook) continue; if (proj.aiStyle == ProjAIStyleID.Hook) diff --git a/Projectiles/Rogue/FrostyFlareProj.cs b/Projectiles/Rogue/FrostyFlareProj.cs index 6a15281be3..c83f9145c7 100644 --- a/Projectiles/Rogue/FrostyFlareProj.cs +++ b/Projectiles/Rogue/FrostyFlareProj.cs @@ -97,15 +97,15 @@ namespace CalamityMod.Projectiles.Rogue int flaresFound = 0; int oldestFlare = -1; int oldestFlareTimeLeft = 300; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == Projectile.type && i != Projectile.whoAmI && Main.projectile[i].ai[1] == target.whoAmI) + if (p.owner == Main.myPlayer && p.type == Projectile.type && p.whoAmI != Projectile.whoAmI && p.ai[1] == target.whoAmI) { flaresFound++; - if (Main.projectile[i].timeLeft < oldestFlareTimeLeft) + if (p.timeLeft < oldestFlareTimeLeft) { - oldestFlareTimeLeft = Main.projectile[i].timeLeft; - oldestFlare = Main.projectile[i].whoAmI; + oldestFlareTimeLeft = p.timeLeft; + oldestFlare = p.whoAmI; } if (flaresFound >= maxFlares) break; diff --git a/Projectiles/Rogue/FrostyFlareStealth.cs b/Projectiles/Rogue/FrostyFlareStealth.cs index d955ef43a1..964df5d3b7 100644 --- a/Projectiles/Rogue/FrostyFlareStealth.cs +++ b/Projectiles/Rogue/FrostyFlareStealth.cs @@ -106,15 +106,15 @@ namespace CalamityMod.Projectiles.Rogue int flaresFound = 0; int oldestFlare = -1; int oldestFlareTimeLeft = 300; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == Projectile.type && i != Projectile.whoAmI && Main.projectile[i].ai[1] == target.whoAmI) + if (p.owner == Main.myPlayer && p.type == Projectile.type && p.whoAmI != Projectile.whoAmI && p.ai[1] == target.whoAmI) { flaresFound++; - if (Main.projectile[i].timeLeft < oldestFlareTimeLeft) + if (p.timeLeft < oldestFlareTimeLeft) { - oldestFlareTimeLeft = Main.projectile[i].timeLeft; - oldestFlare = Main.projectile[i].whoAmI; + oldestFlareTimeLeft = p.timeLeft; + oldestFlare = p.whoAmI; } if (flaresFound >= maxFlares) break; diff --git a/Projectiles/Rogue/MalachiteStealth.cs b/Projectiles/Rogue/MalachiteStealth.cs index 871fb68e9a..a643060480 100644 --- a/Projectiles/Rogue/MalachiteStealth.cs +++ b/Projectiles/Rogue/MalachiteStealth.cs @@ -121,15 +121,15 @@ namespace CalamityMod.Projectiles.Rogue int kunaiFound = 0; int oldestKunai = -1; int oldestKunaiTimeLeft = lifeSpan; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == Projectile.type && i != Projectile.whoAmI && Main.projectile[i].ai[1] == target.whoAmI) + if (p.owner == Main.myPlayer && p.type == Projectile.type && p.whoAmI != Projectile.whoAmI && p.ai[1] == target.whoAmI) { kunaiFound++; - if (Main.projectile[i].timeLeft < oldestKunaiTimeLeft) + if (p.timeLeft < oldestKunaiTimeLeft) { - oldestKunaiTimeLeft = Main.projectile[i].timeLeft; - oldestKunai = Main.projectile[i].whoAmI; + oldestKunaiTimeLeft = p.timeLeft; + oldestKunai = p.whoAmI; } if (kunaiFound >= maxKunai) break; diff --git a/Projectiles/Rogue/NychthemeronOrb.cs b/Projectiles/Rogue/NychthemeronOrb.cs index 2927406455..022d104f1e 100644 --- a/Projectiles/Rogue/NychthemeronOrb.cs +++ b/Projectiles/Rogue/NychthemeronOrb.cs @@ -30,10 +30,9 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { bool isActive = false; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.identity == Projectile.ai[1] && p.active) + if (p.identity == Projectile.ai[1]) { isActive = true; } diff --git a/Projectiles/Rogue/SearedPanProjectile.cs b/Projectiles/Rogue/SearedPanProjectile.cs index 28d7ba76c3..1d5d1dbe8e 100644 --- a/Projectiles/Rogue/SearedPanProjectile.cs +++ b/Projectiles/Rogue/SearedPanProjectile.cs @@ -129,18 +129,18 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner) + if (p.owner != Projectile.owner) continue; - if (Main.projectile[i].ModProjectile is NiceCock) + if (p.ModProjectile is NiceCock) { if (!activate) - Main.projectile[i].Kill(); + p.Kill(); else { - Main.projectile[i].ModProjectile().homing = true; - Main.projectile[i].extraUpdates += 2; + p.ModProjectile().homing = true; + p.extraUpdates += 2; } } } @@ -151,14 +151,14 @@ namespace CalamityMod.Projectiles.Rogue { int fireballCount = 0; // Count how many fireballs exist already around the given target - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { // Keep the loop as short as possible - if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].CountsAsClass() || targetIndex != (int)Main.projectile[i].ai[1]) + if (p.owner != Projectile.owner || !p.CountsAsClass() || targetIndex != (int)p.ai[1]) continue; - if (Main.projectile[i].ModProjectile is NiceCock) + if (p.ModProjectile is NiceCock) { - if (Main.projectile[i].ModProjectile().homing) + if (p.ModProjectile().homing) continue; fireballCount++; } @@ -166,16 +166,16 @@ namespace CalamityMod.Projectiles.Rogue // Adjust the angle of the existing fireballs around a target float angleVariance = MathHelper.TwoPi / fireballCount; float angle = 0f; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].CountsAsClass() || targetIndex != (int)Main.projectile[i].ai[1]) + if (p.owner != Projectile.owner || !p.CountsAsClass() || targetIndex != (int)p.ai[1]) continue; - if (Main.projectile[i].ModProjectile is NiceCock) + if (p.ModProjectile is NiceCock) { - if (Main.projectile[i].ModProjectile().homing) + if (p.ModProjectile().homing) continue; - Main.projectile[i].ai[0] = angle; - Main.projectile[i].netUpdate = true; + p.ai[0] = angle; + p.netUpdate = true; angle += angleVariance; } } diff --git a/Projectiles/Rogue/TerraDiskProjectile2.cs b/Projectiles/Rogue/TerraDiskProjectile2.cs index 9ef33c60a2..5061370417 100644 --- a/Projectiles/Rogue/TerraDiskProjectile2.cs +++ b/Projectiles/Rogue/TerraDiskProjectile2.cs @@ -47,10 +47,9 @@ namespace CalamityMod.Projectiles.Rogue Projectile parent = Main.projectile[0]; bool active = false; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.identity == Projectile.ai[0] && p.active && p.type == ModContent.ProjectileType()) + if (p.identity == Projectile.ai[0] && p.type == ModContent.ProjectileType()) { parent = p; active = true; diff --git a/Projectiles/Summon/AtlasMunitionsAutocannon.cs b/Projectiles/Summon/AtlasMunitionsAutocannon.cs index 87dcd21d35..badccb7cf3 100644 --- a/Projectiles/Summon/AtlasMunitionsAutocannon.cs +++ b/Projectiles/Summon/AtlasMunitionsAutocannon.cs @@ -203,20 +203,20 @@ namespace CalamityMod.Projectiles.Summon if (!CannonIsMounted) { int detachedCannonID = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != detachedCannonID || !Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner) + if (p.type != detachedCannonID || p.owner != Projectile.owner) continue; - if (!Main.projectile[i].Hitbox.Intersects(Projectile.Hitbox)) + if (!p.Hitbox.Intersects(Projectile.Hitbox)) continue; - if (Main.projectile[i].ModProjectile().BeingHeld) + if (p.ModProjectile().BeingHeld) continue; - Main.projectile[i].Kill(); + p.Kill(); CannonIsMounted = true; - HeatInterpolant = Main.projectile[i].ModProjectile().HeatInterpolant; + HeatInterpolant = p.ModProjectile().HeatInterpolant; Projectile.netUpdate = true; break; } @@ -227,11 +227,11 @@ namespace CalamityMod.Projectiles.Summon { int podID = ModContent.ProjectileType(); int podUpperID = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - bool validID = Main.projectile[i].type == podID || Main.projectile[i].type == podUpperID; - if (Main.projectile[i].active && validID && Main.projectile[i].owner == Projectile.owner) - Main.projectile[i].Kill(); + bool validID = p.type == podID || p.type == podUpperID; + if (validID && p.owner == Projectile.owner) + p.Kill(); } Projectile.Kill(); diff --git a/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs b/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs index 64bafe200f..95f60aedc5 100644 --- a/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs +++ b/Projectiles/Summon/AtlasMunitionsAutocannonHeld.cs @@ -172,11 +172,11 @@ namespace CalamityMod.Projectiles.Summon int podID = ModContent.ProjectileType(); int podUpperID = ModContent.ProjectileType(); int cannonID = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - bool validID = Main.projectile[i].type == podID || Main.projectile[i].type == podUpperID || Main.projectile[i].type == cannonID; - if (Main.projectile[i].active && validID && Main.projectile[i].owner == Projectile.owner) - Main.projectile[i].Kill(); + bool validID = p.type == podID || p.type == podUpperID || p.type == cannonID; + if (validID && p.owner == Projectile.owner) + p.Kill(); } Projectile.Kill(); diff --git a/Projectiles/Summon/BlackDragonBody.cs b/Projectiles/Summon/BlackDragonBody.cs index 5640b97608..70d9f98792 100644 --- a/Projectiles/Summon/BlackDragonBody.cs +++ b/Projectiles/Summon/BlackDragonBody.cs @@ -63,10 +63,9 @@ namespace CalamityMod.Projectiles.Summon var live = false; Projectile nextSegment = new Projectile(); BlackDragonHead head = new BlackDragonHead(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == Type && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == Type && projectile.owner == Projectile.owner) { if (projectile.ModProjectile().segmentIndex == segmentIndex - 1) { @@ -74,7 +73,7 @@ namespace CalamityMod.Projectiles.Summon nextSegment = projectile; } } - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { if (segmentIndex == 1) { @@ -108,10 +107,9 @@ namespace CalamityMod.Projectiles.Summon { if (Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] > 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { projectile.Kill(); } diff --git a/Projectiles/Summon/BlackDragonTail.cs b/Projectiles/Summon/BlackDragonTail.cs index 9cdd238f9f..0b9be2eff1 100644 --- a/Projectiles/Summon/BlackDragonTail.cs +++ b/Projectiles/Summon/BlackDragonTail.cs @@ -50,10 +50,9 @@ namespace CalamityMod.Projectiles.Summon Projectile nextSegment = new Projectile(); BlackDragonHead head = new BlackDragonHead(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { if (projectile.ModProjectile().segmentIndex == segmentIndex - 1) { @@ -61,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon nextSegment = projectile; } } - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { if (segmentIndex == 1) { @@ -96,10 +95,9 @@ namespace CalamityMod.Projectiles.Summon { if (Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] > 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { projectile.Kill(); } diff --git a/Projectiles/Summon/DormantBrimseekerAura.cs b/Projectiles/Summon/DormantBrimseekerAura.cs index 95a7453c4e..55c8759a40 100644 --- a/Projectiles/Summon/DormantBrimseekerAura.cs +++ b/Projectiles/Summon/DormantBrimseekerAura.cs @@ -71,20 +71,20 @@ namespace CalamityMod.Projectiles.Summon if (Main.rand.NextBool(360)) dust.scale = 1.5f; } - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && - Main.projectile[i].owner == Projectile.owner && Main.projectile[i].localAI[1] == 0f) + if (p.type == ModContent.ProjectileType() && + p.owner == Projectile.owner && p.localAI[1] == 0f) { - if (Main.projectile[i].Distance(Projectile.Center) < Projectile.localAI[1]) + if (p.Distance(Projectile.Center) < Projectile.localAI[1]) { for (int j = 0; j < 30; j++) { - Dust dust = Dust.NewDustPerfect(Main.projectile[i].Center, (int)CalamityDusts.Brimstone); + Dust dust = Dust.NewDustPerfect(p.Center, (int)CalamityDusts.Brimstone); dust.velocity = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * 7f; } - Main.projectile[i].localAI[1] = 1f; - SoundEngine.PlaySound(SoundID.Item45, Main.projectile[i].Center); + p.localAI[1] = 1f; + SoundEngine.PlaySound(SoundID.Item45, p.Center); } } } @@ -99,18 +99,18 @@ namespace CalamityMod.Projectiles.Summon } public override void OnKill(int timeLeft) { - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && - Main.projectile[i].owner == Projectile.owner && Main.projectile[i].localAI[1] == 1f) + if (p.type == ModContent.ProjectileType() && + p.owner == Projectile.owner && p.localAI[1] == 1f) { for (int j = 0; j < 30; j++) { Dust dust = Dust.NewDustPerfect(Projectile.Center, (int)CalamityDusts.Brimstone); dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 7f; } - SoundEngine.PlaySound(SoundID.Item29, Main.projectile[i].Center); - Main.projectile[i].localAI[1] = 0f; + SoundEngine.PlaySound(SoundID.Item29, p.Center); + p.localAI[1] = 0f; } } } diff --git a/Projectiles/Summon/DreadmineTurret.cs b/Projectiles/Summon/DreadmineTurret.cs index 9bcb120628..09e7382078 100644 --- a/Projectiles/Summon/DreadmineTurret.cs +++ b/Projectiles/Summon/DreadmineTurret.cs @@ -50,9 +50,9 @@ namespace CalamityMod.Projectiles.Summon if (Main.rand.NextBool(15)) { int mineAmt = 0; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == ModContent.ProjectileType()) + if (p.owner == Main.myPlayer && p.type == ModContent.ProjectileType()) { mineAmt++; } diff --git a/Projectiles/Summon/GiantIbanRobotOfDoom.cs b/Projectiles/Summon/GiantIbanRobotOfDoom.cs index b99c8babf8..790f430e9c 100644 --- a/Projectiles/Summon/GiantIbanRobotOfDoom.cs +++ b/Projectiles/Summon/GiantIbanRobotOfDoom.cs @@ -156,13 +156,12 @@ namespace CalamityMod.Projectiles.Summon // If the player has any existing UIs, kill them all. if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) { - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && - Main.projectile[i].type == ModContent.ProjectileType() && - Main.projectile[i].owner == player.whoAmI) + if (p.type == ModContent.ProjectileType() && + p.owner == player.whoAmI) { - Main.projectile[i].Kill(); + p.Kill(); } } } @@ -289,13 +288,12 @@ namespace CalamityMod.Projectiles.Summon } int slashIndex = -1; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && - Main.projectile[i].type == ModContent.ProjectileType() && - Main.projectile[i].owner == Projectile.owner) + if (p.type == ModContent.ProjectileType() && + p.owner == Projectile.owner) { - slashIndex = i; + slashIndex = p.whoAmI; break; } } @@ -310,13 +308,12 @@ namespace CalamityMod.Projectiles.Summon int laserBeamIndex = -1; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && - Main.projectile[i].type == ModContent.ProjectileType() && - Main.projectile[i].owner == Projectile.owner) + if (p.type == ModContent.ProjectileType() && + p.owner == Projectile.owner) { - laserBeamIndex = i; + laserBeamIndex = p.whoAmI; break; } } diff --git a/Projectiles/Summon/GlacialEmbracePointyThing.cs b/Projectiles/Summon/GlacialEmbracePointyThing.cs index c91831d4a8..1c1d96346b 100644 --- a/Projectiles/Summon/GlacialEmbracePointyThing.cs +++ b/Projectiles/Summon/GlacialEmbracePointyThing.cs @@ -240,12 +240,12 @@ namespace CalamityMod.Projectiles.Summon { target.AddBuff(BuffID.Frostburn2, 300); int circlers = 0; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && Main.projectile[i].type == Projectile.type) + if (p.owner == Projectile.owner && p.type == Projectile.type) { - GlacialEmbracePointyThing pointy = (GlacialEmbracePointyThing)Main.projectile[i].ModProjectile; - if (Main.projectile[i].ai[1] > 2f) + GlacialEmbracePointyThing pointy = (GlacialEmbracePointyThing)p.ModProjectile; + if (p.ai[1] > 2f) circlers += Main.rand.Next(1, 4); } } diff --git a/Projectiles/Summon/LanternSoul.cs b/Projectiles/Summon/LanternSoul.cs index bc29b7a921..34e89c889a 100644 --- a/Projectiles/Summon/LanternSoul.cs +++ b/Projectiles/Summon/LanternSoul.cs @@ -53,9 +53,9 @@ namespace CalamityMod.Projectiles.Summon } int flameCount = 0; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == ModContent.ProjectileType()) + if (p.owner == Main.myPlayer && p.type == ModContent.ProjectileType()) { flameCount++; } diff --git a/Projectiles/Summon/MK2FlaskSummon.cs b/Projectiles/Summon/MK2FlaskSummon.cs index 4b04ec3c16..cb1b5a60a2 100644 --- a/Projectiles/Summon/MK2FlaskSummon.cs +++ b/Projectiles/Summon/MK2FlaskSummon.cs @@ -51,11 +51,11 @@ namespace CalamityMod.Projectiles.Summon Main.projectile[p].originalDamage = Projectile.originalDamage; int beeArrayIndex = 0; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile pro in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && Main.projectile[i].type == ModContent.ProjectileType()) + if (pro.owner == Projectile.owner && pro.type == ModContent.ProjectileType()) { - Main.projectile[i].ai[1] = beeArrayIndex; + pro.ai[1] = beeArrayIndex; beeArrayIndex++; } } diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 74715086f7..c215ebf707 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -174,11 +174,11 @@ namespace CalamityMod.Projectiles.Summon public static Projectile LocateHead(Projectile projectile) { int headType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != headType || !Main.projectile[i].active || Main.projectile[i].owner != projectile.owner) + if (p.type != headType || p.owner != projectile.owner) continue; - return Main.projectile[i]; + return p; } return null; } diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index db5c081c62..d69ac7f037 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -338,10 +338,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.Center = TeleportStartingPoint; // Reset the alpha and position across the entire worm for the next charge. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile otherProj in Main.ActiveProjectiles) { - Projectile otherProj = Main.projectile[i]; - if (!otherProj.active || otherProj.owner != Projectile.owner || i == Projectile.whoAmI) + if (otherProj.owner != Projectile.owner || otherProj.whoAmI == Projectile.whoAmI) continue; if (otherProj.type == ModContent.ProjectileType() || otherProj.type == ModContent.ProjectileType()) @@ -377,10 +376,9 @@ namespace CalamityMod.Projectiles.Summon private void CleanUpMechwormPortals() { int portalType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj.type != portalType || !proj.active || proj.owner != Projectile.owner) + if (proj.type != portalType || proj.owner != Projectile.owner) continue; proj.Kill(); diff --git a/Projectiles/Summon/MutatedTruffleMinion.cs b/Projectiles/Summon/MutatedTruffleMinion.cs index 6b7a38f393..e7e1f7df40 100644 --- a/Projectiles/Summon/MutatedTruffleMinion.cs +++ b/Projectiles/Summon/MutatedTruffleMinion.cs @@ -193,10 +193,9 @@ namespace CalamityMod.Projectiles.Summon if (Target is not null) { // Find the vortex that it shot. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj is null || !proj.active || proj.type != ModContent.ProjectileType() || proj.owner != Owner.whoAmI || proj.timeLeft < MutatedTruffle.VortexTimeUntilNextState) + if (proj.type != ModContent.ProjectileType() || proj.owner != Owner.whoAmI || proj.timeLeft < MutatedTruffle.VortexTimeUntilNextState) continue; // Spin around the vortex. diff --git a/Projectiles/Summon/PlantationStaffTentacle.cs b/Projectiles/Summon/PlantationStaffTentacle.cs index e39fc24de4..bb70aaef9e 100644 --- a/Projectiles/Summon/PlantationStaffTentacle.cs +++ b/Projectiles/Summon/PlantationStaffTentacle.cs @@ -101,11 +101,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.Center = Vector2.Lerp(Projectile.Center, MainMinion.Center + DesiredLocation, interpolant); Projectile.rotation = (Projectile.Center - MainMinion.Center).ToRotation(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - - if (proj is null || !proj.active || proj.owner != Owner.whoAmI || proj.type != ModContent.ProjectileType() || proj.ModProjectile().State == PlantationStaffSummon.AIState.Ramming) + if (proj.owner != Owner.whoAmI || proj.type != ModContent.ProjectileType() || proj.ModProjectile().State == PlantationStaffSummon.AIState.Ramming) continue; State = AIState.Seeking; diff --git a/Projectiles/Summon/SeekerSummonProj.cs b/Projectiles/Summon/SeekerSummonProj.cs index 56d49731cc..c295da262a 100644 --- a/Projectiles/Summon/SeekerSummonProj.cs +++ b/Projectiles/Summon/SeekerSummonProj.cs @@ -101,9 +101,8 @@ namespace CalamityMod.Projectiles.Summon // Make an imp laugh sound every so often if you're the first seeker in the projectile array. if (Main.rand.NextBool(1600)) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile seeker in Main.ActiveProjectiles) { - Projectile seeker = Main.projectile[i]; if (seeker.type == Projectile.type) { if (seeker == Projectile) diff --git a/Projectiles/Summon/SkeletalDragonMother.cs b/Projectiles/Summon/SkeletalDragonMother.cs index 6a33794efb..b8864fe285 100644 --- a/Projectiles/Summon/SkeletalDragonMother.cs +++ b/Projectiles/Summon/SkeletalDragonMother.cs @@ -112,13 +112,13 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.Distance(player.Center) > 3250f) { Projectile.Center = player.Center; - for (int i = 0; i < Main.projectile.Length; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && - Main.projectile[i].type == ModContent.ProjectileType()) + if (p.owner == Projectile.owner && + p.type == ModContent.ProjectileType()) { - Main.projectile[i].Center = player.Center; - Main.projectile[i].netUpdate = true; + p.Center = player.Center; + p.netUpdate = true; } } Projectile.netUpdate = true; diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs index f570f49734..3daf18b25f 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs @@ -160,22 +160,22 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms // Dynamically update panel icons. for (int i = 0; i < 4; i++) PanelIcons[i].CurrentState = IconType.Inactive; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!arms.Contains(Main.projectile[i].type) || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].active) + if (!arms.Contains(p.type) || p.owner != Projectile.owner) continue; IconType stateFromID = IconType.Inactive; - if (Main.projectile[i].type == plasmaCannonID) + if (p.type == plasmaCannonID) stateFromID = IconType.Plasma; - if (Main.projectile[i].type == teslaCannonID) + if (p.type == teslaCannonID) stateFromID = IconType.Tesla; - if (Main.projectile[i].type == laserCannonID) + if (p.type == laserCannonID) stateFromID = IconType.Laser; - if (Main.projectile[i].type == gaussNukeID) + if (p.type == gaussNukeID) stateFromID = IconType.Gauss; - PanelIcons[(int)Main.projectile[i].ai[0]].CurrentState = stateFromID; + PanelIcons[(int)p.ai[0]].CurrentState = stateFromID; } // Handle fade effects. @@ -195,9 +195,9 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms if (ArmIDToSpawn >= 0) { bool armAlreadyExists = false; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!arms.Contains(Main.projectile[i].type) || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].active || Main.projectile[i].ai[0] != ArmIndex) + if (!arms.Contains(p.type) || p.owner != Projectile.owner || p.ai[0] != ArmIndex) continue; armAlreadyExists = true; @@ -215,12 +215,12 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms if (ShouldDeleteArmIndex) { SoundEngine.PlaySound(SoundID.Item74, Projectile.Center); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (!arms.Contains(Main.projectile[i].type) || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].active || Main.projectile[i].ai[0] != ArmIndex) + if (!arms.Contains(p.type) || p.owner != Projectile.owner || p.ai[0] != ArmIndex) continue; - Main.projectile[i].Kill(); + p.Kill(); } } diff --git a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs index 566685e222..629640cdb5 100644 --- a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs +++ b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs @@ -74,15 +74,15 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public Projectile GetOrbToAttachTo() { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != Projectile.type || Main.projectile[i].ai[0] != Identity + 1f || !Main.projectile[i].active) + if (p.type != Projectile.type || p.ai[0] != Identity + 1f) continue; - if (!Main.projectile[i].WithinRange(Projectile.Center, AresExoskeleton.TeslaOrbDetatchDistance)) + if (!p.WithinRange(Projectile.Center, AresExoskeleton.TeslaOrbDetatchDistance)) continue; - return Main.projectile[i]; + return p; } return null; diff --git a/Projectiles/Summon/WhiteDragonBody.cs b/Projectiles/Summon/WhiteDragonBody.cs index 0e27f7d625..3ff567bfa6 100644 --- a/Projectiles/Summon/WhiteDragonBody.cs +++ b/Projectiles/Summon/WhiteDragonBody.cs @@ -61,10 +61,9 @@ namespace CalamityMod.Projectiles.Summon var live = false; Projectile nextSegment = new Projectile(); WhiteDragonHead head = new WhiteDragonHead(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == Type && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == Type && projectile.owner == Projectile.owner) { if (projectile.ModProjectile().segmentIndex == segmentIndex - 1) { @@ -72,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon nextSegment = projectile; } } - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { if (segmentIndex == 1) { @@ -105,10 +104,9 @@ namespace CalamityMod.Projectiles.Summon { if (Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] > 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { projectile.Kill(); } diff --git a/Projectiles/Summon/WhiteDragonTail.cs b/Projectiles/Summon/WhiteDragonTail.cs index 0dbbdb3352..8a14b34937 100644 --- a/Projectiles/Summon/WhiteDragonTail.cs +++ b/Projectiles/Summon/WhiteDragonTail.cs @@ -51,10 +51,9 @@ namespace CalamityMod.Projectiles.Summon Projectile nextSegment = new Projectile(); WhiteDragonHead head = new WhiteDragonHead(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { if (projectile.ModProjectile().segmentIndex == segmentIndex - 1) { @@ -62,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon nextSegment = projectile; } } - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { if (segmentIndex == 1) { @@ -97,10 +96,9 @@ namespace CalamityMod.Projectiles.Summon { if (Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] > 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - var projectile = Main.projectile[i]; - if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner && projectile.active) + if (projectile.type == ModContent.ProjectileType() && projectile.owner == Projectile.owner) { projectile.Kill(); } diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index 4418cf5779..a00ca3037b 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -32,10 +32,9 @@ namespace CalamityMod.Projectiles.Summon get { int minionCount = 1; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj.active && proj.owner == Owner.whoAmI && proj.type == Type && proj.whoAmI != Projectile.whoAmI) + if (proj.owner == Owner.whoAmI && proj.type == Type && proj.whoAmI != Projectile.whoAmI) { minionCount++; } diff --git a/UI/CalamitasEnchantments/EnchantmentManager.cs b/UI/CalamitasEnchantments/EnchantmentManager.cs index bae63dcc0b..358683ba33 100644 --- a/UI/CalamitasEnchantments/EnchantmentManager.cs +++ b/UI/CalamitasEnchantments/EnchantmentManager.cs @@ -222,9 +222,9 @@ namespace CalamityMod.UI.CalamitasEnchants player.Calamity().bladeArmEnchant = true; bool armsArePresent = false; int armType = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type != armType || Main.projectile[i].owner != player.whoAmI || !Main.projectile[i].active) + if (p.type != armType || p.owner != player.whoAmI) continue; armsArePresent = true; diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index 59af3caafa..2ba264abc0 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -474,12 +474,11 @@ namespace CalamityMod return; Projectile projectile = null; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - projectile = Main.projectile[i]; - if (Main.projectile[i].active && Main.projectile[i].bobber && Main.projectile[i].owner == playerIndex) + if (p.bobber && p.owner == playerIndex) { - projectile = Main.projectile[i]; + projectile = p; break; } } diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index 528ec0c0fb..e5178baf2d 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -22,10 +22,9 @@ namespace CalamityMod { // Efficiently loop through all projectiles, using a specially designed continue continue that attempts to minimize the amount of OR // checks per iteration. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.type != projectileID || !p.active) + if (p.type != projectileID) continue; return true; @@ -37,10 +36,9 @@ namespace CalamityMod public static IEnumerable AllProjectilesByID(int projectileID) { // This uses the same efficient loop idea as AnyProjectiles. - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p.type != projectileID || !p.active) + if (p.type != projectileID) continue; yield return p; @@ -71,12 +69,12 @@ namespace CalamityMod if (Main.netMode == NetmodeID.SinglePlayer) return Main.projectile[identity]; - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].identity != identity || Main.projectile[i].owner != ownerIndex || !Main.projectile[i].active) + if (p.identity != identity || p.owner != ownerIndex) continue; - return Main.projectile[i]; + return p; } return null; } @@ -530,13 +528,12 @@ namespace CalamityMod int existingTurrets = player.ownedProjectileCounts[Type]; if (existingTurrets > 0) { - for (int i = 0; i < Main.maxProjectiles; i++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[i].type == Type && - Main.projectile[i].owner == player.whoAmI && - Main.projectile[i].active) + if (p.type == Type && + p.owner == player.whoAmI) { - Main.projectile[i].Kill(); + p.Kill(); existingTurrets--; if (existingTurrets <= 0) break; diff --git a/Utilities/RicoshotUtils.cs b/Utilities/RicoshotUtils.cs index 390c58c4c0..33e84c4c35 100644 --- a/Utilities/RicoshotUtils.cs +++ b/Utilities/RicoshotUtils.cs @@ -32,10 +32,9 @@ namespace CalamityMod int count = 0; int id = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile p = Main.projectile[i]; - if (p is null || !p.active || p.owner != player.whoAmI) + if (p.owner != player.whoAmI) continue; if (p.type == id) ++count; @@ -98,10 +97,9 @@ namespace CalamityMod // Search for all nearby coins. // Coins do not necessarily have to be owned by the same player as the searching projectile! int coinID = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (!proj.active || proj.ModProjectile is null || proj.type != coinID) + if (proj.ModProjectile is null || proj.type != coinID) continue; // Coins that have already been struck are ignored. @@ -173,10 +171,9 @@ namespace CalamityMod bool foundAnyBullseye = false; float closestBullseyeDistance = DaawnlightSpiritOrigin.RicoshotSearchDistance; int bullseyeID = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; ++i) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[i]; - if (proj is null || !proj.active || proj.ModProjectile is null || proj.type != bullseyeID || proj.owner != theShot.owner) + if (proj.ModProjectile is null || proj.type != bullseyeID || proj.owner != theShot.owner) continue; // Do a distance check. From 1042ab2393153ff7753bea8feb447451d736eded Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Wed, 8 May 2024 19:39:59 +0500 Subject: [PATCH 062/197] More npc iterators --- NPCs/CalamityGlobalNPC.cs | 5 ++-- NPCs/StormWeaver/StormWeaverHead.cs | 20 +++++++------- NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs | 18 ++++++------- NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs | 27 +++++++++---------- .../Bosses/WallOfFleshAI.cs | 6 ++--- Projectiles/Melee/AmidiasWhirlpool.cs | 12 ++++----- Projectiles/Melee/MourningSkull.cs | 14 +++++----- Projectiles/Pets/LadShark.cs | 5 ++-- Projectiles/Rogue/RadiantExplosion.cs | 20 +++++++------- .../Rogue/ShatteredSunScorchedBlade.cs | 3 +-- Projectiles/Summon/CosmicEnergySpiral.cs | 8 +++--- Projectiles/Summon/DaedalusCrystal.cs | 10 +++---- Projectiles/Summon/DankCreeperMinion.cs | 10 +++---- Projectiles/Summon/ForbiddenCircletEater.cs | 3 +-- Projectiles/Summon/HermitCrabMinion.cs | 3 +-- Projectiles/Summon/Hive.cs | 5 ++-- Projectiles/Summon/PhantomGuy.cs | 3 +-- Projectiles/Summon/PinkButterfly.cs | 7 +++-- Projectiles/Summon/ProfanedEnergy.cs | 12 ++++----- Projectiles/Summon/SandElementalMinion.cs | 3 +-- Projectiles/Summon/VileFeederProjectile.cs | 3 +-- Projectiles/Typeless/DemonshadeRedDevil.cs | 3 +-- Scenes/MusicScenes/BaseMusicSceneEffect.cs | 8 ++---- 23 files changed, 93 insertions(+), 115 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index eda47898f4..443433a04f 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4846,10 +4846,9 @@ namespace CalamityMod.NPCs if (Main.netMode != NetmodeID.MultiplayerClient) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC in Main.ActiveNPCs) { - NPC nPC = Main.npc[j]; - if (nPC.active && !nPC.buffImmune[BuffType()] && npc.Distance(nPC.Center) < 100f && !nPC.dontTakeDamage && nPC.lifeMax > 5 && !nPC.friendly && !nPC.townNPC) + if (!nPC.buffImmune[BuffType()] && npc.Distance(nPC.Center) < 100f && !nPC.dontTakeDamage && nPC.lifeMax > 5 && !nPC.friendly && !nPC.townNPC) nPC.AddBuff(BuffType(), 300); } } diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 14a4949b6a..5b16e9aea5 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -292,13 +292,13 @@ namespace CalamityMod.NPCs.StormWeaver if ((double)NPC.position.Y < Main.topWorld + 16f) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].active && (Main.npc[j].type == ModContent.NPCType() - || Main.npc[j].type == ModContent.NPCType() - || Main.npc[j].type == ModContent.NPCType())) + if ((n.type == ModContent.NPCType() + || n.type == ModContent.NPCType() + || n.type == ModContent.NPCType())) { - Main.npc[j].active = false; + n.active = false; } } } @@ -306,13 +306,13 @@ namespace CalamityMod.NPCs.StormWeaver if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 10000f && NPC.life > 0) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].type == ModContent.NPCType() - || Main.npc[j].type == ModContent.NPCType() - || Main.npc[j].type == ModContent.NPCType()) + if (n.type == ModContent.NPCType() + || n.type == ModContent.NPCType() + || n.type == ModContent.NPCType()) { - Main.npc[j].active = false; + n.active = false; } } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index 582442d7ef..49f4d90ce7 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -164,13 +164,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, npc.whoAmI, -1f, 0f, 0f, 0, 0, 0); - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].active && Main.npc[j].type == NPCID.CultistBossClone && Main.npc[j].ai[3] == npc.whoAmI) + if (n.type == NPCID.CultistBossClone && n.ai[3] == npc.whoAmI) { - Main.npc[j].life = 0; - Main.npc[j].HitEffect(0, 10.0); - Main.npc[j].active = false; + n.life = 0; + n.HitEffect(0, 10.0); + n.active = false; if (Main.netMode != NetmodeID.MultiplayerClient) NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, npc.whoAmI, -1f, 0f, 0f, 0, 0, 0); @@ -568,10 +568,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if ((npc.ai[1] == 20f & isCultist) && Main.netMode != NetmodeID.MultiplayerClient) { List list5 = new List(); - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].active && Main.npc[j].type == NPCID.CultistBossClone && Main.npc[j].ai[3] == npc.whoAmI) - list5.Add(j); + if (n.type == NPCID.CultistBossClone && n.ai[3] == npc.whoAmI) + list5.Add(n.whoAmI); } foreach (int current5 in list5) @@ -825,7 +825,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses foreach (NPC n in Main.ActiveNPCs) { if (n.type == NPCID.CultistBossClone && n.ai[3] == npc.whoAmI) - list7.Add(i); + list7.Add(n.whoAmI); } foreach (int current6 in list7) diff --git a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs index 3bf3234916..04cdd9132e 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs @@ -1726,24 +1726,21 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Fly towards Moon Lord Head and stay away from other True Eyes float freeEyeAccel = 0.5f; - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].active) + if (n.whoAmI != npc.whoAmI && n.type == npc.type) { - if (j != npc.whoAmI && Main.npc[j].type == npc.type) + if (Vector2.Distance(npc.Center, n.Center) < 150f) { - if (Vector2.Distance(npc.Center, Main.npc[j].Center) < 150f) - { - if (npc.position.X < Main.npc[j].position.X) - npc.velocity.X = npc.velocity.X - freeEyeAccel; - else - npc.velocity.X = npc.velocity.X + freeEyeAccel; - - if (npc.position.Y < Main.npc[j].position.Y) - npc.velocity.Y = npc.velocity.Y - freeEyeAccel; - else - npc.velocity.Y = npc.velocity.Y + freeEyeAccel; - } + if (npc.position.X < n.position.X) + npc.velocity.X = npc.velocity.X - freeEyeAccel; + else + npc.velocity.X = npc.velocity.X + freeEyeAccel; + + if (npc.position.Y < n.position.Y) + npc.velocity.Y = npc.velocity.Y - freeEyeAccel; + else + npc.velocity.Y = npc.velocity.Y + freeEyeAccel; } } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs index a904b3cf91..6cc4b85821 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs @@ -402,11 +402,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { int hungryAmt = 0; float[] array = new float[10]; - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (hungryAmt < 10 && Main.npc[j].active && Main.npc[j].type == NPCID.TheHungry) + if (hungryAmt < 10 && n.type == NPCID.TheHungry) { - array[hungryAmt] = Main.npc[j].ai[0]; + array[hungryAmt] = n.ai[0]; hungryAmt++; } } diff --git a/Projectiles/Melee/AmidiasWhirlpool.cs b/Projectiles/Melee/AmidiasWhirlpool.cs index 1d14113510..2fd27aa019 100644 --- a/Projectiles/Melee/AmidiasWhirlpool.cs +++ b/Projectiles/Melee/AmidiasWhirlpool.cs @@ -68,7 +68,6 @@ namespace CalamityMod.Projectiles.Melee } else if (homeTracker == 1) { - int inc; Projectile.rotation -= 0.104719758f; Vector2 projCenter = Projectile.Center; float homingRange = 150f; @@ -76,21 +75,20 @@ namespace CalamityMod.Projectiles.Melee int npcTracker = 0; if (Projectile.ai[1] == 0f) { - for (int j = 0; j < Main.maxNPCs; j = inc + 1) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - Vector2 npcCenter = Main.npc[j].Center; - if (Projectile.Distance(npcCenter) < homingRange && Collision.CanHit(new Vector2(Projectile.position.X + (float)(Projectile.width / 2), Projectile.position.Y + (float)(Projectile.height / 2)), 1, 1, Main.npc[j].position, Main.npc[j].width, Main.npc[j].height)) + Vector2 npcCenter = n.Center; + if (Projectile.Distance(npcCenter) < homingRange && Collision.CanHit(new Vector2(Projectile.position.X + (float)(Projectile.width / 2), Projectile.position.Y + (float)(Projectile.height / 2)), 1, 1, n.position, n.width, n.height)) { homingRange = Projectile.Distance(npcCenter); projCenter = npcCenter; isHoming = true; - npcTracker = j; + npcTracker = n.whoAmI; break; } } - inc = j; } if (isHoming) { diff --git a/Projectiles/Melee/MourningSkull.cs b/Projectiles/Melee/MourningSkull.cs index 6f056934c1..308824f444 100644 --- a/Projectiles/Melee/MourningSkull.cs +++ b/Projectiles/Melee/MourningSkull.cs @@ -74,21 +74,19 @@ namespace CalamityMod.Projectiles.Melee else { float homingRange = 1000f; - int inc; - for (int j = 0; j < Main.maxNPCs; j = inc + 1) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float targetX = Main.npc[j].position.X + (float)(Main.npc[j].width / 2); - float targetY = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2); + float targetX = n.position.X + (float)(n.width / 2); + float targetY = n.position.Y + (float)(n.height / 2); float targetDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - targetX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - targetY); - if (targetDist < homingRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[j].position, Main.npc[j].width, Main.npc[j].height)) + if (targetDist < homingRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { homingRange = targetDist; - Projectile.ai[0] = (float)j; + Projectile.ai[0] = (float)n.whoAmI; } } - inc = j; } } diff --git a/Projectiles/Pets/LadShark.cs b/Projectiles/Pets/LadShark.cs index 0c086d5ec6..5549bba071 100644 --- a/Projectiles/Pets/LadShark.cs +++ b/Projectiles/Pets/LadShark.cs @@ -69,10 +69,9 @@ namespace CalamityMod.Projectiles.Pets SoundEngine.PlaySound(SoundID.Zombie15, Projectile.position); //mouse squeak sound float radius = 240f; // 15 blocks - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[j]; - if (npc.active && !npc.dontTakeDamage && Vector2.Distance(Projectile.Center, npc.Center) <= radius) + if (!npc.dontTakeDamage && Vector2.Distance(Projectile.Center, npc.Center) <= radius) { if (npc.Calamity().ladHearts <= 0) npc.Calamity().ladHearts = CalamityUtils.SecondsToFrames(9f); diff --git a/Projectiles/Rogue/RadiantExplosion.cs b/Projectiles/Rogue/RadiantExplosion.cs index eb5a206d36..90dd1a23ba 100644 --- a/Projectiles/Rogue/RadiantExplosion.cs +++ b/Projectiles/Rogue/RadiantExplosion.cs @@ -60,30 +60,30 @@ namespace CalamityMod.Projectiles.Rogue { float projX = Projectile.Center.X; float projY = Projectile.Center.Y; - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, Main.npc[j].Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) + if (n.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) { - float npcCenterX = Main.npc[j].position.X + (float)(Main.npc[j].width / 2); - float npcCenterY = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2); + float npcCenterX = n.position.X + (float)(n.width / 2); + float npcCenterY = n.position.Y + (float)(n.height / 2); float targetDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcCenterX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcCenterY); if (targetDist < 600f) { - if (Main.npc[j].position.X < projX) + if (n.position.X < projX) { - Main.npc[j].velocity.X += 0.25f; + n.velocity.X += 0.25f; } else { - Main.npc[j].velocity.X -= 0.25f; + n.velocity.X -= 0.25f; } - if (Main.npc[j].position.Y < projY) + if (n.position.Y < projY) { - Main.npc[j].velocity.Y += 0.25f; + n.velocity.Y += 0.25f; } else { - Main.npc[j].velocity.Y -= 0.25f; + n.velocity.Y -= 0.25f; } } } diff --git a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs index 3f7f5fd760..3755f8669a 100644 --- a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs +++ b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs @@ -76,9 +76,8 @@ namespace CalamityMod.Projectiles.Rogue float targetDistStore; Vector2 homingPos = Projectile.position; bool isHoming = false; - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[j]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/CosmicEnergySpiral.cs b/Projectiles/Summon/CosmicEnergySpiral.cs index 1de027a696..e1ba5e3f27 100644 --- a/Projectiles/Summon/CosmicEnergySpiral.cs +++ b/Projectiles/Summon/CosmicEnergySpiral.cs @@ -179,12 +179,12 @@ namespace CalamityMod.Projectiles.Summon float projY = Projectile.position.Y; float homeDistance = 1200f; bool isInRange = false; - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float npcX = Main.npc[j].position.X + (float)(Main.npc[j].width / 2); - float npcY = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2); + float npcX = n.position.X + (float)(n.width / 2); + float npcY = n.position.Y + (float)(n.height / 2); float npcDistance = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcY); if (npcDistance < homeDistance) { diff --git a/Projectiles/Summon/DaedalusCrystal.cs b/Projectiles/Summon/DaedalusCrystal.cs index 7e43adef7d..aac2c3f685 100644 --- a/Projectiles/Summon/DaedalusCrystal.cs +++ b/Projectiles/Summon/DaedalusCrystal.cs @@ -111,14 +111,14 @@ namespace CalamityMod.Projectiles.Summon } if (!isInRange) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float otherNPCX = Main.npc[j].position.X + (float)(Main.npc[j].width / 2); - float otherNPCY = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2); + float otherNPCX = n.position.X + (float)(n.width / 2); + float otherNPCY = n.position.Y + (float)(n.height / 2); float otherNPCDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - otherNPCX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - otherNPCY); - if (otherNPCDist < attackRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[j].position, Main.npc[j].width, Main.npc[j].height)) + if (otherNPCDist < attackRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { attackRange = otherNPCDist; projX = otherNPCX; diff --git a/Projectiles/Summon/DankCreeperMinion.cs b/Projectiles/Summon/DankCreeperMinion.cs index 07c506c085..7029149f40 100644 --- a/Projectiles/Summon/DankCreeperMinion.cs +++ b/Projectiles/Summon/DankCreeperMinion.cs @@ -103,14 +103,14 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float otherNPCX = Main.npc[j].position.X + (float)(Main.npc[j].width / 2); - float otherNPCY = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2); + float otherNPCX = n.position.X + (float)(n.width / 2); + float otherNPCY = n.position.Y + (float)(n.height / 2); float otherNPCDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - otherNPCX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - otherNPCY); - if (otherNPCDist < attackRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[j].position, Main.npc[j].width, Main.npc[j].height)) + if (otherNPCDist < attackRange && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { attackRange = otherNPCDist; projX = otherNPCX; diff --git a/Projectiles/Summon/ForbiddenCircletEater.cs b/Projectiles/Summon/ForbiddenCircletEater.cs index 6263c0dca4..16dc09a5c1 100644 --- a/Projectiles/Summon/ForbiddenCircletEater.cs +++ b/Projectiles/Summon/ForbiddenCircletEater.cs @@ -89,9 +89,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[j]; if (npc.CanBeChasedBy(Projectile, false)) { float npcX = npc.position.X + (float)(npc.width / 2); diff --git a/Projectiles/Summon/HermitCrabMinion.cs b/Projectiles/Summon/HermitCrabMinion.cs index dff0a079d2..f454140c76 100644 --- a/Projectiles/Summon/HermitCrabMinion.cs +++ b/Projectiles/Summon/HermitCrabMinion.cs @@ -117,9 +117,8 @@ namespace CalamityMod.Projectiles.Summon } if (!chaseNPC) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC npcTarget in Main.ActiveNPCs) { - NPC npcTarget = Main.npc[j]; if (npcTarget.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(npcTarget.Center, Projectile.Center); diff --git a/Projectiles/Summon/Hive.cs b/Projectiles/Summon/Hive.cs index 609038c0ef..1dc594d2ef 100644 --- a/Projectiles/Summon/Hive.cs +++ b/Projectiles/Summon/Hive.cs @@ -69,9 +69,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[j]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); @@ -80,7 +79,7 @@ namespace CalamityMod.Projectiles.Summon attackDist = targetDist; projPos = nPC2.Center; canAttack = true; - target = j; + target = nPC2.whoAmI; } } } diff --git a/Projectiles/Summon/PhantomGuy.cs b/Projectiles/Summon/PhantomGuy.cs index bedbe64fb8..54c83ddaf7 100644 --- a/Projectiles/Summon/PhantomGuy.cs +++ b/Projectiles/Summon/PhantomGuy.cs @@ -90,9 +90,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[j]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/PinkButterfly.cs b/Projectiles/Summon/PinkButterfly.cs index 4fcfccd7bd..d948314f43 100644 --- a/Projectiles/Summon/PinkButterfly.cs +++ b/Projectiles/Summon/PinkButterfly.cs @@ -106,10 +106,9 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[j]; - if ((nPC2.CanBeChasedBy(Projectile, false) || nPC2.type == NPCID.DukeFishron) && nPC2.active) + if (nPC2.CanBeChasedBy(Projectile, false) || nPC2.type == NPCID.DukeFishron) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); if (!canAttack && targetDist < attackRange) @@ -117,7 +116,7 @@ namespace CalamityMod.Projectiles.Summon attackRange = targetDist; projPos = nPC2.Center; canAttack = true; - targetIndex = j; + targetIndex = nPC2.whoAmI; } } } diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index 723a7e324f..2b7628cd89 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -102,20 +102,20 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC n in Main.ActiveNPCs) { - if (Main.npc[j].CanBeChasedBy(Projectile, false)) + if (n.CanBeChasedBy(Projectile, false)) { - float npcX = Main.npc[j].position.X + (float)(Main.npc[j].width / 2); - float npcY = Main.npc[j].position.Y + (float)(Main.npc[j].height / 2); + float npcX = n.position.X + (float)(n.width / 2); + float npcY = n.position.Y + (float)(n.height / 2); float npcDist = Math.Abs(Projectile.position.X + (float)(Projectile.width / 2) - npcX) + Math.Abs(Projectile.position.Y + (float)(Projectile.height / 2) - npcY); - if (npcDist < attackDistance && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[j].position, Main.npc[j].width, Main.npc[j].height)) + if (npcDist < attackDistance && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, n.position, n.width, n.height)) { attackDistance = npcDist; projX = npcX; projY = npcY; canAttack = true; - target = j; + target = n.whoAmI; } } } diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index d8a45cdf7c..6880bae54f 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -106,9 +106,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack && !passive) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[j]; if (nPC2.CanBeChasedBy(Projectile, false)) { float targetDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Projectiles/Summon/VileFeederProjectile.cs b/Projectiles/Summon/VileFeederProjectile.cs index bc93e881e2..d92563efc7 100644 --- a/Projectiles/Summon/VileFeederProjectile.cs +++ b/Projectiles/Summon/VileFeederProjectile.cs @@ -90,9 +90,8 @@ namespace CalamityMod.Projectiles.Summon } if (!canAttack) { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC npc in Main.ActiveNPCs) { - NPC npc = Main.npc[j]; if (npc.CanBeChasedBy(Projectile, false)) { float npcX = npc.position.X + (float)(npc.width / 2); diff --git a/Projectiles/Typeless/DemonshadeRedDevil.cs b/Projectiles/Typeless/DemonshadeRedDevil.cs index 8d2b584ef3..5056300ba8 100644 --- a/Projectiles/Typeless/DemonshadeRedDevil.cs +++ b/Projectiles/Typeless/DemonshadeRedDevil.cs @@ -132,9 +132,8 @@ namespace CalamityMod.Projectiles.Typeless } else { - for (int j = 0; j < Main.maxNPCs; j++) + foreach (NPC nPC2 in Main.ActiveNPCs) { - NPC nPC2 = Main.npc[j]; if (nPC2.CanBeChasedBy(Projectile, false)) { float npcDist = Vector2.Distance(nPC2.Center, Projectile.Center); diff --git a/Scenes/MusicScenes/BaseMusicSceneEffect.cs b/Scenes/MusicScenes/BaseMusicSceneEffect.cs index 03b7271f85..921411b0ae 100644 --- a/Scenes/MusicScenes/BaseMusicSceneEffect.cs +++ b/Scenes/MusicScenes/BaseMusicSceneEffect.cs @@ -71,12 +71,8 @@ namespace CalamityMod.Systems Rectangle screenRect = new Rectangle((int)Main.screenPosition.X, (int)Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); int musicDistance = MusicDistance * 2; - for (int j = 0; j < Main.maxNPCs; j++) - { - NPC npc = Main.npc[j]; - if (!npc.active) - continue; - + foreach (NPC npc in Main.ActiveNPCs) + { bool inList = false; if (npc.type == NPCType) { From 3227606723664d14d643c461770c62a313bcae7a Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Wed, 8 May 2024 19:40:55 +0500 Subject: [PATCH 063/197] Item iterator --- CalPlayer/CalamityPlayerMiscEffects.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c1be6e8b04..f5acf6e2d9 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1864,10 +1864,9 @@ namespace CalamityMod.CalPlayer // Ceaseless Hunger Potion buff if (ceaselessHunger) { - for (int j = 0; j < Main.maxItems; j++) + foreach (Item item in Main.ActiveItems) { - Item item = Main.item[j]; - if (item.active && item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Player.whoAmI) + if (item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Player.whoAmI) { item.beingGrabbed = true; if (Player.Center.X > item.Center.X) From c667616b69cc79763acdcce657fa2d8162379c40 Mon Sep 17 00:00:00 2001 From: BasicallyIAmFox <65787578+BasicallyIAmFox@users.noreply.github.com> Date: Wed, 8 May 2024 19:44:49 +0500 Subject: [PATCH 064/197] More proj iterators --- Items/Weapons/Summon/AbandonedSlimeStaff.cs | 5 ++- NPCs/CalamityGlobalNPC.cs | 35 +++++++++---------- NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs | 14 ++++---- Projectiles/Boss/FlareBomb.cs | 27 +++++++------- Projectiles/Melee/WhiteBoltAura.cs | 12 +++---- Projectiles/Summon/BabyBloodCrawler.cs | 5 ++- 6 files changed, 45 insertions(+), 53 deletions(-) diff --git a/Items/Weapons/Summon/AbandonedSlimeStaff.cs b/Items/Weapons/Summon/AbandonedSlimeStaff.cs index ef5fe4c6ab..e70213af12 100644 --- a/Items/Weapons/Summon/AbandonedSlimeStaff.cs +++ b/Items/Weapons/Summon/AbandonedSlimeStaff.cs @@ -38,10 +38,9 @@ namespace CalamityMod.Items.Weapons.Summon player.jumpSpeedBoost += 0.5f; double minionCount = 0; - for (int j = 0; j < Main.projectile.Length; j++) + foreach (Projectile projectile in Main.ActiveProjectiles) { - Projectile projectile = Main.projectile[j]; - if (projectile.active && projectile.owner == player.whoAmI && projectile.minion && projectile.type != ModContent.ProjectileType()) + if (projectile.owner == player.whoAmI && projectile.minion && projectile.type != ModContent.ProjectileType()) { minionCount += projectile.minionSlots; } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 443433a04f..f6ee79b786 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -588,11 +588,10 @@ namespace CalamityMod.NPCs npc.lifeRegen = 0; int projectileCount = 0; - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active && - (Main.projectile[j].type == ProjectileType() || Main.projectile[j].type == ProjectileType() || Main.projectile[j].type == ProjectileType()) && - Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) + if ((p.type == ProjectileType() || p.type == ProjectileType() || p.type == ProjectileType()) && + p.ai[0] == 1f && p.ai[1] == npc.whoAmI) { projectileCount++; } @@ -613,10 +612,10 @@ namespace CalamityMod.NPCs npc.lifeRegen = 0; int projectileCount = 0; - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active && Main.projectile[j].type == ProjectileType() && - Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) + if (p.type == ProjectileType() && + p.ai[0] == 1f && p.ai[1] == npc.whoAmI) { projectileCount++; } @@ -635,12 +634,12 @@ namespace CalamityMod.NPCs { int projectileCount = 0; int owner = 255; - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active && Main.projectile[j].type == ProjectileType() && - Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) + if (p.type == ProjectileType() && + p.ai[0] == 1f && p.ai[1] == npc.whoAmI) { - owner = Main.projectile[j].owner; + owner = p.owner; projectileCount++; if (projectileCount >= 5) { @@ -677,13 +676,13 @@ namespace CalamityMod.NPCs if (clamDebuff > 0) { int projectileCount = 0; - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active && Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) + if (p.ai[0] == 1f && p.ai[1] == npc.whoAmI) { - if (Main.projectile[j].type == ProjectileType()) + if (p.type == ProjectileType()) projectileCount += 2; - if (Main.projectile[j].type == ProjectileType()) + if (p.type == ProjectileType()) projectileCount++; } } @@ -694,10 +693,10 @@ namespace CalamityMod.NPCs if (irradiated > 0) { int projectileCount = 0; - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active && Main.projectile[j].type == ProjectileType() && - Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) + if (p.type == ProjectileType() && + p.ai[0] == 1f && p.ai[1] == npc.whoAmI) { projectileCount++; } diff --git a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs index 04cdd9132e..6880b1b798 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs @@ -472,16 +472,15 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (npc.ai[1] == 40f) { - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile projectile2 in Main.ActiveProjectiles) { - Projectile projectile2 = Main.projectile[j]; - if (projectile2.active && (projectile2.type == ProjectileID.MoonLeech || projectile2.type == ProjectileID.PhantasmalBolt || + if ((projectile2.type == ProjectileID.MoonLeech || projectile2.type == ProjectileID.PhantasmalBolt || projectile2.type == ProjectileID.PhantasmalDeathray || projectile2.type == ProjectileID.PhantasmalEye || projectile2.type == ProjectileID.PhantasmalSphere)) { projectile2.active = false; if (Main.netMode != NetmodeID.MultiplayerClient) - NetMessage.SendData(MessageID.SyncProjectile, -1, -1, null, j, 0f, 0f, 0f, 0, 0, 0); + NetMessage.SendData(MessageID.SyncProjectile, -1, -1, null, projectile2.whoAmI, 0f, 0f, 0f, 0, 0, 0); } } @@ -851,16 +850,15 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if ((attackTimer == 120f || attackTimer == 150f || attackTimer == 180f || attackTimer == 210f || attackTimer == 240f) && Main.netMode != NetmodeID.MultiplayerClient) { - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile projectile6 in Main.ActiveProjectiles) { - Projectile projectile6 = Main.projectile[j]; - if (projectile6.active && projectile6.type == ProjectileID.MoonLeech && Main.player[(int)projectile6.ai[1]].FindBuffIndex(BuffID.MoonLeech) != -1) + if (projectile6.type == ProjectileID.MoonLeech && Main.player[(int)projectile6.ai[1]].FindBuffIndex(BuffID.MoonLeech) != -1) { Vector2 targetCenter = Main.player[npc.target].Center; int moonLeech = NPC.NewNPC(npc.GetSource_FromAI(), (int)targetCenter.X, (int)targetCenter.Y, NPCID.MoonLordLeechBlob); Main.npc[moonLeech].netUpdate = true; Main.npc[moonLeech].ai[0] = npc.whoAmI + 1; - Main.npc[moonLeech].ai[1] = j; + Main.npc[moonLeech].ai[1] = projectile6.whoAmI; } } } diff --git a/Projectiles/Boss/FlareBomb.cs b/Projectiles/Boss/FlareBomb.cs index 78ea47fe01..c60376c6d7 100644 --- a/Projectiles/Boss/FlareBomb.cs +++ b/Projectiles/Boss/FlareBomb.cs @@ -80,24 +80,21 @@ namespace CalamityMod.Projectiles.Boss return; float acceleration = 0.5f; - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active) + if (p.whoAmI != Projectile.whoAmI && p.type == Projectile.type) { - if (j != Projectile.whoAmI && Main.projectile[j].type == Projectile.type) + if (Vector2.Distance(Projectile.Center, p.Center) < 24f) { - if (Vector2.Distance(Projectile.Center, Main.projectile[j].Center) < 24f) - { - if (Projectile.position.X < Main.projectile[j].position.X) - Projectile.velocity.X -= acceleration; - else - Projectile.velocity.X += acceleration; - - if (Projectile.position.Y < Main.projectile[j].position.Y) - Projectile.velocity.Y -= acceleration; - else - Projectile.velocity.Y += acceleration; - } + if (Projectile.position.X < p.position.X) + Projectile.velocity.X -= acceleration; + else + Projectile.velocity.X += acceleration; + + if (Projectile.position.Y < p.position.Y) + Projectile.velocity.Y -= acceleration; + else + Projectile.velocity.Y += acceleration; } } } diff --git a/Projectiles/Melee/WhiteBoltAura.cs b/Projectiles/Melee/WhiteBoltAura.cs index 195648c6bc..d361a79873 100644 --- a/Projectiles/Melee/WhiteBoltAura.cs +++ b/Projectiles/Melee/WhiteBoltAura.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { @@ -51,15 +51,15 @@ namespace CalamityMod.Projectiles.Melee int incTracker = 0; float aiTracker = 0f; int theProjectile = Projectile.type; - for (int j = 0; j < 1000; j++) + foreach (Projectile p in Main.ActiveProjectiles) { - if (Main.projectile[j].active && Main.projectile[j].owner == Projectile.owner && Main.projectile[j].type == theProjectile && Main.projectile[j].ai[1] < 3600f) + if (p.owner == Projectile.owner && p.type == theProjectile && p.ai[1] < 3600f) { projTimer++; - if (Main.projectile[j].ai[1] > aiTracker) + if (p.ai[1] > aiTracker) { - incTracker = j; - aiTracker = Main.projectile[j].ai[1]; + incTracker = p.whoAmI; + aiTracker = p.ai[1]; } } } diff --git a/Projectiles/Summon/BabyBloodCrawler.cs b/Projectiles/Summon/BabyBloodCrawler.cs index 93babecfea..9b14867e46 100644 --- a/Projectiles/Summon/BabyBloodCrawler.cs +++ b/Projectiles/Summon/BabyBloodCrawler.cs @@ -48,11 +48,10 @@ namespace CalamityMod.Projectiles.Summon Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - for (int j = 0; j < Main.maxProjectiles; j++) + foreach (Projectile proj in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[j]; // Short circuits to make the loop as fast as possible - if (!proj.active || proj.owner != Projectile.owner || !proj.minion || proj.Calamity().lineColor != 1) + if (proj.owner != Projectile.owner || !proj.minion || proj.Calamity().lineColor != 1) continue; if (proj.type == Projectile.type) { From 6c3c0d14ff404f43f7bf020632a216be5d2203f1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 May 2024 15:32:05 -0400 Subject: [PATCH 065/197] Vivid Clarity resprite --- CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs | 2 ++ Items/Weapons/Magic/VividClarity.cs | 10 ++++++++-- Items/Weapons/Magic/VividClarity.png | Bin 3446 -> 5052 bytes Items/Weapons/Magic/VividClarityGlow.png | Bin 0 -> 2860 bytes 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Items/Weapons/Magic/VividClarityGlow.png diff --git a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs index 37ad49653a..6e956ede84 100644 --- a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs +++ b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs @@ -92,6 +92,8 @@ namespace CalamityMod.CalPlayer.DrawLayers glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Ranged/VernalBolterGlow").Value; + else if (itemType == ModContent.ItemType()) + glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/VividClarityGlow").Value; if (glowMask == default) return; diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index b51b21e2f5..0180a48fb2 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Magic; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -24,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.width = 90; - Item.height = 112; + Item.width = 140; + Item.height = 140; Item.damage = 133; Item.DamageType = DamageClass.Magic; Item.mana = 42; @@ -71,6 +72,11 @@ namespace CalamityMod.Items.Weapons.Magic return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Magic/VividClarityGlow").Value); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Magic/VividClarity.png b/Items/Weapons/Magic/VividClarity.png index a09e59afd7b9a53bcaea6257bec1f1304076622d..e0f181f0ed963fc6e951b4c9d164e220484a566a 100644 GIT binary patch literal 5052 zcmYjV2RK{Z{|{=^YH3RBq9sZ-_NJ5?H5#o~)eIVqS$o&&o0g_Vtk*f zt%f4DP;G1}ihsQC?|q*CeV%jAz4y82e815C=mP*%DI9-b%mBbSb5le8J7G@0@;HKQ7Bf57 zG9QN;h(1m|d+}5nkd5yi>-$)B1A!0Uzgs^`)>P~tx_2WxBr6#!yc$$}hd-}J&K~&# zMX>Z4O#XfC@}iv+-#k;#O*Zk_NOn>uqupKD_%wG4~cK zFzcM*mA-6tw;UFMKK8?hsdQUlJ;Az=c_6`1tmWvt*kNw5;Ej#Pg0G(JHF5^#n_A1t zEK#i2eH_&m;-%7B<*fLzX{v`a6yPW%NqPjrJ#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wlB0E-nRW^CvrArKyAlk|kHI@5pEiSJ9`{(IZ4IJJsl+bbS^M4duWQfW7pL8Pd4Q7nTW*e;hA)(um^7I&P zM#ePI7NR3obTMQY;3{3RcByRX=J(>HM-0Fpu^74FwcDhBASPc;c|A!LF|m#ADCSAAsI7{UXHlD7jg)- z$1P`Vkw$V-8SV{@*KvFqaBHqI>a41YQ)*X2P2AX@>%~JpqH_Y;dGXu0>6=-SKCy$92vx<||$W-JX&?PV*N3 zowb(}x8FO75UwA=X~)f9y_|qbymiG?E(s}m^L|9~?~IV@ zfb%mc(;Bk;N?d--zm%)QU*eX!_hyAOa_82XslFerU;`5zlmRJ5S(04^C#XNHU%~+5 zTQCjl^TdC%*EM|<$x&Jr?!)2fG;XiK_fHuTUs&!j!7Sc7`EuJk<#5)8$jQPa$)Bzv zva|R(bKpznIgp{`V)Y&qH_z~#JWD65=?qG~uZ{_gCWv`0rpPe*_P-euN|m=T81Co} z$G%}hlpbUZ9=cr|nDB^E_H*;}-TZ&0M3pc4oubS?tSxRS9Gk>#Z!w{%tM@UDAiTP0 zDU31AAvsvl;*>`iV9R@p$+@;FVa0ZXQlM3qjqobesL_oDIIx#%m`>Z2^NaJNHqQ#X z*16KzQ$tsmExtuUsg?tGKN!LCy$kz~TZT)Ab=r_}!UJ|T^Fo1fg-7Sg$CgqU1)D+o zSnY^y)jlxM8mXq^cqz14M6|UezT_)&f8jfl4Ol4&O=XO;BGs!})eEMSDG(MZR6=W) z^eflR;d@b5u_1+G3Jl;en)rJ&G1?kVNi#iAjl;OfDg0|G9lqJALcT2<2I`11}$tiDN?F4RyRIBoqU?ApYy@fN$5U z2`lLibJZc!10e>;8tY~?Vu_Q-HC7nSR+7=ZOCS Dg=n`4 diff --git a/Items/Weapons/Magic/VividClarityGlow.png b/Items/Weapons/Magic/VividClarityGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..f404339f684e544862da48355f048f449a07b5bd GIT binary patch literal 2860 zcmZuzdpMKrAD5CGMsjGT!knT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jGIrIC=IU2x2cnVL%fH}bi zRv!FHDy{=~$82ZOsem}xO1UzRv-Y%kRi2ZEmid}yHNstkZ_Lga1OZ2{oYn z?kws@g{GLX$*wI(Yl~WmgxobidbilYz^7V(47lT!< zQZx&TaXUHhM)mR!Io5`$UY5A{$T$h8)8e*l>~?Wg)?qHfLZXj4bnImkBL;5g+2Xv6 zsPNjsGmiGnOIBiPPXvzf!x;m*^+!^U|KO)^f`%K73QYL2ajhH7C_n5mOo5s7aB~VN zL(uyZ;LUvdTy!yxsux68Bhz*C(EPRiROCgJ`EK z!Z5V^o)5*M8@!7wdh+_Wu|$R&5$p84EMmTevt+bEn?D}A_vhmMFq8Y2HDzudW1EL51Uxe4+G7|muG3xAxKo)h&eyu8Cc+~+$}dBcPG8li~ZDN0+SOM^Q24(D>O zNMoEvbF8PkXMnf&wuZe9|N@JVNe5V-#8YrFET3K zA;`gkSyUS42J#e7;bE#@ShNKc>o@RZ*9;E4{RbCoY+}kgqZWe~Ya6n(w~hSc74fa& z(S(gS4rP0ny-6xR2Su-F)t6#bSr(K;kqPuWiXv7D=5={ruUBHh+j8&AK0`0X`* zq?&!KQrT_sIpf~D9lkYHSG=4DHep2u-%0d|K$EPJANho&%sHGmWB;Nt`qU&ZxN&4+ z;05IT8|vk^bbVRi45#{M zs6%CGelDj4&7=W%tr?~aI9E|BIyVX5PsWYQj%Zjlzi%~GBg`W@;TiMOV=>-1y1Cp_ zGO?-O*j!JfSZSXzHw)5ZwcS7e0gq9N^oenU>70f0Vn>5PBffQT4tPgLF$2-_F45S!xW8v@1qZYfsv2=F@juD&T*3eV literal 0 HcmV?d00001 From fe41711d97609d69310214298774f3620126fb79 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 May 2024 17:58:59 -0400 Subject: [PATCH 066/197] Heavenly Gale rebalance * Has minor nerf when paired with DSO --- Items/Accessories/DaawnlightSpiritOrigin.cs | 6 +++--- Items/Weapons/Ranged/HeavenlyGale.cs | 4 ++-- Projectiles/Ranged/ExoLightningBolt.cs | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Items/Accessories/DaawnlightSpiritOrigin.cs b/Items/Accessories/DaawnlightSpiritOrigin.cs index e6a42c5c25..e37ec2dcc2 100644 --- a/Items/Accessories/DaawnlightSpiritOrigin.cs +++ b/Items/Accessories/DaawnlightSpiritOrigin.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories // Regular crits are intentionally weak, especially because they rarely happen (your crit chance gets murdered). // Bullseyes should be doing all the work. private const float OriginBullseyeCritRatio = 3.5f; // Bullseye crits deal x3.5 damage instead of x2. - private const float RicoshotBullseyeCritRatio = 2.4f; // If you use Ricoshot mechanics to "force" a bullseye, you get less of a reward. + private const float ForcedCritBullseyeCritRatio = 2.4f; // If your projectile is forced to crit, you get less of a reward. private const float StoredCritConversionRatio = 0.01f; // Add +1% more damage to crits for every 1% critical chance the player would have had. private const float MinUseTimeForSlowBonus = 11f; @@ -39,8 +39,8 @@ namespace CalamityMod.Items.Accessories if (hitBullseye) { // Bullseye crits are weaker if the projectile was already a forced crit. - // This currently only occurs due to ULTRAKILL-style ricoshots. - baseCritMult = wasForcedCrit ? RicoshotBullseyeCritRatio : OriginBullseyeCritRatio; + // This is currently implemented for ULTRAKILL-style ricoshots and for Heavenly Gale's lightning. + baseCritMult = wasForcedCrit ? ForcedCritBullseyeCritRatio : OriginBullseyeCritRatio; } // Factor in the critical strike chance the player isn't getting to use. diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index 543b09b5a3..3c3643b112 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged public const float ArrowTargetingRange = 1100f; - public const float MaxChargeDamageBoost = 4.5f; + public const float MaxChargeDamageBoost = 3.5f; public const float LightningDamageFactor = 0.36f; @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 138; Item.height = 176; - Item.damage = 215; + Item.damage = 256; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = ArrowShootTime; // 40 Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Projectiles/Ranged/ExoLightningBolt.cs b/Projectiles/Ranged/ExoLightningBolt.cs index 9bf2ca9680..1a3338f0af 100644 --- a/Projectiles/Ranged/ExoLightningBolt.cs +++ b/Projectiles/Ranged/ExoLightningBolt.cs @@ -86,6 +86,10 @@ namespace CalamityMod.Projectiles.Ranged HasPlayedSound = true; } + // This projectile is forced to critically strike. + // This technically is a nerf, as it makes DSO's crits deal less damage. + Projectile.Calamity().forcedCrit = true; + Lighting.AddLight(Projectile.Center, Color.White.ToVector3()); if (Projectile.frameCounter >= Projectile.extraUpdates * 2) { From 99982336f15d3e178cc66e4e2c2560c506b770f6 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 8 May 2024 17:14:31 -0500 Subject: [PATCH 067/197] Desert Scourge sand dive splash (it works on more than just sand because I'm not doing that wack tile type detect shit just to make it only happen on sand tiles). --- .../Mods.CalamityMod.Projectiles.Boss.hjson | 1 + NPCs/DesertScourge/DesertScourgeHead.cs | 95 ++++++++++++++++++ Projectiles/Boss/DesertScourgeDiveSplash.cs | 50 +++++++++ Projectiles/Boss/DesertScourgeDiveSplash.png | Bin 0 -> 12651 bytes 4 files changed, 146 insertions(+) create mode 100644 Projectiles/Boss/DesertScourgeDiveSplash.cs create mode 100644 Projectiles/Boss/DesertScourgeDiveSplash.png diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 7a682b6ca9..b9a91f0fb0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -43,6 +43,7 @@ CirrusVolatileVodkaBottle.DisplayName: Volatile Vodka Bottle DarkEnergyBall.DisplayName: Dark Energy DarkEnergyBall2.DisplayName: Dark Energy DarkOrb.DisplayName: Dark Orb +DesertScourgeDiveSplash.DisplayName: Desert Scourge Dive Splash DesertScourgeSpit.DisplayName: Scourge Spit DestroyerCursedLaser.DisplayName: Cursed Laser DestroyerElectricLaser.DisplayName: Electric Laser diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 3fbde7a525..e19d6dd912 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -139,6 +139,7 @@ namespace CalamityMod.NPCs.DesertScourge writer.Write(biomeEnrageTimer); writer.Write(playRoarSound); writer.Write(NPC.localAI[2]); + writer.Write(NPC.localAI[3]); for (int i = 0; i < 4; i++) writer.Write(NPC.Calamity().newAI[i]); } @@ -150,6 +151,7 @@ namespace CalamityMod.NPCs.DesertScourge biomeEnrageTimer = reader.ReadInt32(); playRoarSound = reader.ReadBoolean(); NPC.localAI[2] = reader.ReadSingle(); + NPC.localAI[3] = reader.ReadSingle(); for (int i = 0; i < 4; i++) NPC.Calamity().newAI[i] = reader.ReadSingle(); } @@ -169,6 +171,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.Calamity().newAI[0] = 0f; NPC.Calamity().newAI[1] = 0f; NPC.Calamity().newAI[3] = 0f; + NPC.localAI[3] = 0f; playRoarSound = false; } @@ -249,6 +252,94 @@ namespace CalamityMod.NPCs.DesertScourge turnSpeed *= 1.2f; } + // Sand splash + if (!quickFall) + { + if (lungeUpward) + { + if (NPC.localAI[3] == 0f) + { + Vector2 topCenter = new Vector2(NPC.Center.X, NPC.Top.Y); + Point headTileCenter = topCenter.ToTileCoordinates(); + Tile tileSafely = Framing.GetTileSafely(headTileCenter); + bool inSolidTile = tileSafely.HasUnactuatedTile; + bool finsInSolidTile = Framing.GetTileSafely(Main.npc[(int)NPC.ai[0]].Center.ToTileCoordinates()).HasUnactuatedTile; + if (!inSolidTile && finsInSolidTile && Collision.CanHit(topCenter, 1, 1, player.Center, 1, 1)) + { + NPC.localAI[3] = 1f; + SoundEngine.PlaySound(SoundID.Item74, NPC.Center); + + int bestY = headTileCenter.Y; + for (int j = 0; j < 20; j++) + { + if (bestY < 10) + break; + + if (!WorldGen.SolidTile(headTileCenter.X, bestY)) + break; + + bestY--; + } + + for (int k = 0; k < 20; k++) + { + if (bestY > Main.maxTilesY - 10) + break; + + if (WorldGen.ActiveAndWalkableTile(headTileCenter.X, bestY)) + break; + + bestY++; + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(NPC.GetSource_FromAI(), new Vector2(headTileCenter.X * 16 + 8, bestY * 16 - 40), Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + } + } + } + else if (burrow) + { + if (NPC.localAI[3] == 0f) + { + Vector2 topCenter = new Vector2(NPC.Center.X, NPC.Top.Y); + Point headTileCenter = new Vector2(NPC.Center.X, NPC.Bottom.Y).ToTileCoordinates(); + Tile tileSafely = Framing.GetTileSafely(headTileCenter); + bool inSolidTile = tileSafely.HasUnactuatedTile; + if (inSolidTile && Collision.CanHit(topCenter, 1, 1, player.Center, 1, 1)) + { + NPC.localAI[3] = 1f; + SoundEngine.PlaySound(SoundID.Item74, NPC.Center); + + int bestY = headTileCenter.Y; + for (int j = 0; j < 20; j++) + { + if (bestY < 10) + break; + + if (!WorldGen.SolidTile(headTileCenter.X, bestY)) + break; + + bestY--; + } + + for (int k = 0; k < 20; k++) + { + if (bestY > Main.maxTilesY - 10) + break; + + if (WorldGen.ActiveAndWalkableTile(headTileCenter.X, bestY)) + break; + + bestY++; + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(NPC.GetSource_FromAI(), new Vector2(headTileCenter.X * 16 + 8, bestY * 16 - 40), Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + } + } + } + } + if (lungeUpward || burrow || hide) { speed *= 1.5f; @@ -451,6 +542,7 @@ namespace CalamityMod.NPCs.DesertScourge if (burrow && NPC.Center.Y >= burrowTarget - 16f) { NPC.Calamity().newAI[1] = 1f; + NPC.localAI[3] = 0f; if (!playRoarSound) { SoundEngine.PlaySound(RoarSound, player.Center); @@ -486,6 +578,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.TargetClosest(); NPC.Calamity().newAI[1] = 2f; + NPC.localAI[3] = 0f; playRoarSound = false; } @@ -498,6 +591,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.Calamity().newAI[0] = 0f; NPC.Calamity().newAI[1] = 0f; NPC.Calamity().newAI[3] = 0f; + NPC.localAI[3] = 0f; playRoarSound = false; } } @@ -507,6 +601,7 @@ namespace CalamityMod.NPCs.DesertScourge { NPC.Calamity().newAI[0] = 0f; NPC.Calamity().newAI[1] = 0f; + NPC.localAI[3] = 0f; } if (!shouldFly) diff --git a/Projectiles/Boss/DesertScourgeDiveSplash.cs b/Projectiles/Boss/DesertScourgeDiveSplash.cs new file mode 100644 index 0000000000..39d9946a5f --- /dev/null +++ b/Projectiles/Boss/DesertScourgeDiveSplash.cs @@ -0,0 +1,50 @@ +using System; +using System.IO; +using CalamityMod.Dusts; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class DesertScourgeDiveSplash : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Boss"; + + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 14; + } + + public override void SetDefaults() + { + Projectile.width = 84; + Projectile.height = 84; + Projectile.hostile = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + } + + public override void AI() + { + Projectile.frameCounter++; + if (Projectile.frameCounter > 4) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Projectile.type]) + Projectile.Kill(); + } + + public override bool PreDraw(ref Color lightColor) + { + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + return false; + } + } +} diff --git a/Projectiles/Boss/DesertScourgeDiveSplash.png b/Projectiles/Boss/DesertScourgeDiveSplash.png new file mode 100644 index 0000000000000000000000000000000000000000..cbb230d69499e24cae3d440c71aba743273a85f4 GIT binary patch literal 12651 zcmbVy2UL?;*RGB;RuECdNF9oUC`CX(N?;TLQ4py?T7*!gNtY6EMnFmc0RfRV(t7|A zkP=idC{d6aAP`gxfrNmRfJq>^Cph!Zckf#Fzw5tQD=W!+k~gR9{p@EydnequZpeF3 z=-{qhyLgSRTs8-(lEd;f?&s_2UU%BpLw z*l2PKu`zN|Y9Ifey2=EIk743?li^{>z4jKzl%l>*``KbbsMghKl4WljBA4<;No34- z)m)v$c*vb(dFPI`jnJX4$N`;A(mFc)eDjs?#b0%!F==bZgKMWdJcDyC%jJrN)C^if zNA-K|RVT&sZ+Z~oT4hcj6);O(yzR|@R>;dz{=rCXdGisaPq(4Y6}@?3b0=}+?5qH& zlNWNj`SZqeFSS~+M+=@W7_)189a80;S8Swo(CJQVZ%DOvraltRFI{Wvc_(4S7g5uz zMJj3f?nhJtmWQ`e<>kh=bO}>I*@VnS+AuZ2emXn9A(^_cUV2S!dhGH2_}#F&(UeQ9 zE3`FoR+bzdV=j-WaHrB=ywN9=(UN&{uZxV|cNvn56RDrJ?l0+3OMA5W^6d$HAy$My zrK&+Gj0_0aG^`|+k9haZY9q4b5uGO|ddr`HtxeU{sW&vy%si`*YFV3F6h1mWy9N)R zC^O`4LqmKTO6d%JzA8}5wTOf>b*PV| zZEps2ksPFRW+x%kgYW?pj-tje+S5cxLYkz$ahjA{9SvZfqD&6xGhTU{?8{%Dw-6VSQvMHR>$C)J=?!X=7w=U7N!JLIJ6KpQ+3B zuR8aQ5=6K^ZE%VabM3q>AYmRO5bjnMnqrI_ULB53ElOKeOOD@-mrhZt*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r=%u9H4j4IAo8SuA}q`fg3p;duf^6SP|&{u|6u z4_=QKZ6Xw&f`T(aEL}q=ZOSa+A818zVerqpZP@^SlYLO17l%z?tZzo*h#&_pWVLxf zjy3S{L6`p`!Zw(Y;2j(T7oEh3gf$tx`4S8W=5!31y>hlIgPpl)r^s<)!gK-3YT5>M z$Q@HwM%PeQIH0}Dm@`Q(=)L=y;yYe`)m-X4tWJC=>$n!39{zSLX&6jFI%gZ9k=QWcsMNcP6;^k`JqRKG2z zV@XFwxu}eI`X(l5WtAi~QNk%-OSZ5fzopjRNNJ?EqP@awqxSSQ7a#Z6c(fiZ$?ehq zA3k{hyDgu6dPFu{{9^3CX*}3|vxF4m@YMgjbRjkEV)w3HsESS22p-+>7;N26jewb; zwAY@+KMQ(T+?e>6leKnP;?1n1%A2sSJ)}F5`b$wf2~vimBvZ{yE(61n0^wUvNZ_D0 zK-$Y#`@3Yb++9O?o_ZJKG!uGyVQq|D$j;@8zyDv4-^E2u)`;P2qh}Z3h8sgul&_5J zy2;CM(QARfKKM6Z0QY`5zL@%2rFX4Nv3F&s?s0ZGwi;a;ZPHRSkY9YXwUJjUk1;&a zrBk$(vwBSF(}jSqoIMAcE-ocXxZuF=54+kJxtW;kIs@MC|9h@O78%@kM*7z;*Il~x G=l=pHE?iIm literal 0 HcmV?d00001 From 87ba64f83956e4a77e8513643ea0da69a889121d Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 8 May 2024 16:52:02 -0700 Subject: [PATCH 068/197] Small Supernova Visual Update --- Projectiles/Rogue/SupernovaStealthBoom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Rogue/SupernovaStealthBoom.cs b/Projectiles/Rogue/SupernovaStealthBoom.cs index 9ddb03c9b1..aaa399a2cc 100644 --- a/Projectiles/Rogue/SupernovaStealthBoom.cs +++ b/Projectiles/Rogue/SupernovaStealthBoom.cs @@ -285,7 +285,7 @@ namespace CalamityMod.Projectiles.Rogue _ => Color.LawnGreen, }; - Particle pulse2 = new CustomPulse(Projectile.Center, Vector2.Zero, randomColor * 0.7f, "CalamityMod/Particles/HighResHollowCircleHardEdge", new Vector2(1f, 1f), 0f, 0f, 4f - i * 0.28f, 50); + Particle pulse2 = new CustomPulse(Projectile.Center, Vector2.Zero, randomColor * 0.7f, "CalamityMod/Particles/FlameExplosion", new Vector2(1f, 1f), Main.rand.NextFloat(-20, 20), 0f, 4f - i * 0.28f, 50); GeneralParticleHandler.SpawnParticle(pulse2); } From c7cb2bcad437a83ab03626687294a918bc422f79 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 May 2024 01:03:39 -0400 Subject: [PATCH 069/197] Lion Heart and The Last Mourning balance --- Balancing/BalancingChangesManager.cs | 4 ---- Items/Weapons/Melee/LionHeart.cs | 2 +- Items/Weapons/Melee/TheLastMourning.cs | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 8bd7f64dfe..1fae88c626 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -321,10 +321,6 @@ namespace CalamityMod.Balancing #endregion #region Old Duke - // 60% resist to The Last Mourning's projectiles. - // This will technically catch pumpkins from The Horseman's Blade but that shouldn't really matter. - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.4f, ProjectileType(), ProjectileID.FlamingJack))); - // 20% resist to Time Bolt. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType()))); #endregion diff --git a/Items/Weapons/Melee/LionHeart.cs b/Items/Weapons/Melee/LionHeart.cs index dd0b0df4ed..5b06e0992b 100644 --- a/Items/Weapons/Melee/LionHeart.cs +++ b/Items/Weapons/Melee/LionHeart.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 60; Item.height = 62; - Item.damage = 323; + Item.damage = 960; Item.knockBack = 5.5f; Item.useStyle = ItemUseStyleID.Swing; Item.useAnimation = 15; diff --git a/Items/Weapons/Melee/TheLastMourning.cs b/Items/Weapons/Melee/TheLastMourning.cs index 3cc6fe5c75..19f4ae60b0 100644 --- a/Items/Weapons/Melee/TheLastMourning.cs +++ b/Items/Weapons/Melee/TheLastMourning.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 94; Item.height = 94; Item.DamageType = DamageClass.Melee; - Item.damage = 360; + Item.damage = 550; Item.knockBack = 8.5f; Item.useAnimation = 20; Item.useTime = 20; From 0a0a1a9e4c18dcc4b937984ba851115e0af944c3 Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 9 May 2024 11:06:12 -0700 Subject: [PATCH 070/197] Fixed a bug with pulse rifle and nerfed it to compensate Only one pulse rifle orb was doing intended damage, the other 3 were doing half of that --- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 6 +++--- Projectiles/DraedonsArsenal/PulseRifleShot.cs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index efba46b663..21190b3ab9 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/PulseRifleFire") { Volume = 0.8f }; - private int BaseDamage = 1150; + private int BaseDamage = 990; public int FiringTimer = 30; public override void SetDefaults() @@ -32,8 +32,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.DamageType = DamageClass.Ranged; Item.damage = BaseDamage; Item.knockBack = 0f; - Item.useTime = 45; - Item.useAnimation = 45; + Item.useTime = 55; + Item.useAnimation = 55; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Projectiles/DraedonsArsenal/PulseRifleShot.cs b/Projectiles/DraedonsArsenal/PulseRifleShot.cs index abbe895460..1f7f997a7a 100644 --- a/Projectiles/DraedonsArsenal/PulseRifleShot.cs +++ b/Projectiles/DraedonsArsenal/PulseRifleShot.cs @@ -4,6 +4,7 @@ using System.Net.Sockets; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Particles; using CalamityMod.Projectiles.Ranged; +using Humanizer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -242,9 +243,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // These should do a large fraction of the beam's damage so they will easily kill even some decently bulky enemies regular enemies in one hit // This is so it can better proc its on kill effect int numProj = 4; + int projectileDamage = (int)(Projectile.damage * 0.5f); for (int i = 0; i < numProj; i++) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.velocity.SafeNormalize(Vector2.Zero) * (14f - i * 0.7f)) * ((i + 1) * 0.25f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 1f + i); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.velocity.SafeNormalize(Vector2.Zero) * (14f - i * 0.7f)) * ((i + 1) * 0.25f), ModContent.ProjectileType(), projectileDamage, Projectile.knockBack, Projectile.owner, 0f, 1f + i); } } // Split projectile on hit effects From f95ef6d65136821c172f54bce4b4b196958520ed Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Thu, 9 May 2024 11:32:39 -0700 Subject: [PATCH 071/197] Heavenfallen from grace (balancing) --- Items/CalamityGlobalItemTooltip.cs | 2 +- .../PlatinumArmorSetChange.cs | 2 +- Items/Weapons/Rogue/HeavenfallenStardisk.cs | 30 +++++++++++++------ ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 4 +-- .../Mods.CalamityMod.Vanilla.Armor.hjson | 1 + .../Rogue/HeavenfallenStardiskBoomerang.cs | 13 ++++---- 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index c0ae5fd933..141680d6f9 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -820,7 +820,7 @@ namespace CalamityMod.Items if (item.type == ItemID.PlatinumHelmet) AddTooltip("6% increased damage"); if (item.type == ItemID.PlatinumChainmail) - AddTooltip("5% increased critical strike chance"); + AddTooltip("3% increased critical strike chance"); if (item.type == ItemID.PlatinumGreaves) AddTooltip("10% increased movement speed"); diff --git a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs index 21e5346986..5a02506e4f 100644 --- a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Platinum"; public const float HeadDamage = 0.06f; - public const float ChestCrit = 5f; + public const float ChestCrit = 0.03f; public const float LegsMoveSpeed = 0.1f; public const float SetBonusDamagePerDefense = 0.001f; // 10 defense = +1% damage public const float SetBonusCritPerDefense = 0.1f; // 10 defense = +1% crit chance diff --git a/Items/Weapons/Rogue/HeavenfallenStardisk.cs b/Items/Weapons/Rogue/HeavenfallenStardisk.cs index feedf4ed5c..0e0263c937 100644 --- a/Items/Weapons/Rogue/HeavenfallenStardisk.cs +++ b/Items/Weapons/Rogue/HeavenfallenStardisk.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 44; Item.height = 48; - Item.damage = 90; + Item.damage = 155; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 40; @@ -28,16 +28,28 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int proj = Projectile.NewProjectile(source, position, velocity.Length() * -Vector2.UnitY, type, damage, knockback, player.whoAmI); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); - - return false; + { + int proj = Projectile.NewProjectile(source, position, velocity.Length() * -Vector2.UnitY, type, damage, knockback, player.whoAmI); + if (proj.WithinBounds(Main.maxProjectiles)) + Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int spread = 15; + for (int i = 0; i < 2; i++) + { + Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-8, 8), velocity.Y + Main.rand.Next(-2, 3)).RotatedBy(MathHelper.ToRadians(spread)); + Projectile.NewProjectile(source, position, perturbedspeed.Length() * -Vector2.UnitY, type, (int)(damage * 0.3), knockback, player.whoAmI); + if (proj.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); + } + spread -= Main.rand.Next(5, 8); + } + } + return false; + } } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 03a00d6437..d92ae3dc73 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -538,8 +538,8 @@ HeavenfallenStardisk: { Tooltip: ''' Throws a stardisk upwards which then launches itself towards your mouse cursor - Explodes into 5 astral energy bolts if the thrower is moving vertically when throwing it - Stealth strikes rain astral energy bolts from the sky + Explodes into a star of astral bolts on hit + Stealth strikes throw three disks that rain astral energy bolts from the sky ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 1742a34c16..c5259da203 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -99,6 +99,7 @@ SetBonus: { Increases minion damage by 15% Grants immunity to fire blocks and temporary immunity to lava ''' + PlatinumChainmail: 3% increased critical strike chance Platinum: ''' Every 10 extra defense gives you 1% increased damage and 1% increased critical strike chance diff --git a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs index 1b8beb43bd..2916cc6b65 100644 --- a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs +++ b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs @@ -30,14 +30,14 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ignoreWater = true; Projectile.netImportant = true; Projectile.penetrate = 1; - Projectile.timeLeft = 300; + Projectile.timeLeft = 150; Projectile.DamageType = RogueDamageClass.Instance; } public override void AI() { - if (Projectile.Calamity().stealthStrike && Projectile.timeLeft % 5f == 4f) // every 5 frames - CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner); + if (Projectile.Calamity().stealthStrike && Projectile.timeLeft % 20f == 4f) // every 5 frames + CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType(), Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); if (Projectile.alpha > 0) { @@ -63,9 +63,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.rotation += 0.5f; - if (Owner.position.Y != Owner.oldPosition.Y && Projectile.ai[0] == 0f) - Projectile.ai[1]++; - Projectile.ai[0]++; if (Main.myPlayer == Projectile.owner && Projectile.ai[0] == 20f) @@ -158,12 +155,12 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[dusty].velocity *= 0f; } - if (Projectile.owner == Main.myPlayer && Projectile.ai[1] > 0) + if (Projectile.owner == Main.myPlayer) { for (int i = 0; i < 5; i++) { Vector2 velocity = ((MathHelper.TwoPi * i / 5f) - MathHelper.PiOver2).ToRotationVector2() * 4f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 1f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 1f); } } } From bcc40f5c49400ca1afc874f8ef70e0cb791750c1 Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Thu, 9 May 2024 11:34:49 -0700 Subject: [PATCH 072/197] Typo Fix --- Items/VanillaArmorChanges/PlatinumArmorSetChange.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs index 5a02506e4f..d709df88d2 100644 --- a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Platinum"; public const float HeadDamage = 0.06f; - public const float ChestCrit = 0.03f; + public const float ChestCrit = 3f; public const float LegsMoveSpeed = 0.1f; public const float SetBonusDamagePerDefense = 0.001f; // 10 defense = +1% damage public const float SetBonusCritPerDefense = 0.1f; // 10 defense = +1% crit chance From adea6fda6f7fdcde5e0478e241569a2febd0bf73 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Thu, 9 May 2024 14:38:47 -0500 Subject: [PATCH 073/197] 1 - Bloodletting Servant charge. 2 - Cirrus vanity = girl noises. 3 - Scourge sand splash correction. --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- NPCs/DesertScourge/DesertScourgeHead.cs | 10 +- NPCs/NormalNPCs/BloodlettingServant.cs | 240 +++++++++++++++++------- 3 files changed, 182 insertions(+), 70 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 367f3910e9..975677a7ba 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1621,7 +1621,7 @@ namespace CalamityMod.CalPlayer SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center); //metal hit noise hurtSoundTimer = 10; } - else if ((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide) + else if (((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide) || Player.GetModPlayer().vanityEquipped) { modifiers.DisableSound(); SoundEngine.PlaySound(SoundID.FemaleHit, Player.Center); //female hit noise diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index e19d6dd912..ab6c03fc94 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -259,12 +259,11 @@ namespace CalamityMod.NPCs.DesertScourge { if (NPC.localAI[3] == 0f) { - Vector2 topCenter = new Vector2(NPC.Center.X, NPC.Top.Y); - Point headTileCenter = topCenter.ToTileCoordinates(); + Point headTileCenter = NPC.Top.ToTileCoordinates(); Tile tileSafely = Framing.GetTileSafely(headTileCenter); bool inSolidTile = tileSafely.HasUnactuatedTile; bool finsInSolidTile = Framing.GetTileSafely(Main.npc[(int)NPC.ai[0]].Center.ToTileCoordinates()).HasUnactuatedTile; - if (!inSolidTile && finsInSolidTile && Collision.CanHit(topCenter, 1, 1, player.Center, 1, 1)) + if (!inSolidTile && finsInSolidTile && Collision.CanHit(NPC.Top, 1, 1, player.Center, 1, 1)) { NPC.localAI[3] = 1f; SoundEngine.PlaySound(SoundID.Item74, NPC.Center); @@ -301,11 +300,10 @@ namespace CalamityMod.NPCs.DesertScourge { if (NPC.localAI[3] == 0f) { - Vector2 topCenter = new Vector2(NPC.Center.X, NPC.Top.Y); - Point headTileCenter = new Vector2(NPC.Center.X, NPC.Bottom.Y).ToTileCoordinates(); + Point headTileCenter = NPC.Bottom.ToTileCoordinates(); Tile tileSafely = Framing.GetTileSafely(headTileCenter); bool inSolidTile = tileSafely.HasUnactuatedTile; - if (inSolidTile && Collision.CanHit(topCenter, 1, 1, player.Center, 1, 1)) + if (inSolidTile && Collision.CanHit(NPC.Top, 1, 1, player.Center, 1, 1)) { NPC.localAI[3] = 1f; SoundEngine.PlaySound(SoundID.Item74, NPC.Center); diff --git a/NPCs/NormalNPCs/BloodlettingServant.cs b/NPCs/NormalNPCs/BloodlettingServant.cs index 92d49c536e..522b8b7b69 100644 --- a/NPCs/NormalNPCs/BloodlettingServant.cs +++ b/NPCs/NormalNPCs/BloodlettingServant.cs @@ -4,8 +4,10 @@ using CalamityMod.NPCs.VanillaNPCAIOverrides.RegularEnemies; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -15,9 +17,15 @@ namespace CalamityMod.NPCs.NormalNPCs { public override string Texture => $"Terraria/Images/NPC_{NPCID.WanderingEye}"; + private const float ChargeGateValue = 180f; + private const float ChargeTelegraphGateValue = 90f; + private const float ChargeDuration = 60f; + private const float ChargeDuration_Death = 50f; + public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); } @@ -52,25 +60,15 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { + Lighting.AddLight(NPC.Center, 0.8f, 0f, 0f); + NPC.TargetClosest(); Player target = Main.player[NPC.target]; - - Vector2 lookAt = target.Center - NPC.Center; - if (lookAt.X > 0f) - { - NPC.spriteDirection = 1; - NPC.rotation = (float)Math.Atan2(lookAt.Y, lookAt.X); - } - if (lookAt.X < 0f) - { - NPC.spriteDirection = -1; - NPC.rotation = (float)Math.Atan2(lookAt.Y, lookAt.X) + MathHelper.Pi; - } - - Lighting.AddLight(NPC.Center, 0.8f, 0f, 0f); + bool targetDead = target.dead; bool phase2 = NPC.life < NPC.lifeMax * 0.5; float enrageScale = 1f + NPC.ai[2]; + float enrageScaleMaxSpeedBonus = 2f * enrageScale; float maxSpeedX = (phase2 ? (CalamityWorld.death ? 10f : 8f) : (CalamityWorld.death ? 8f : 6f)) + enrageScaleMaxSpeedBonus; float maxSpeedY = (phase2 ? (CalamityWorld.death ? 8f : 6f) : (CalamityWorld.death ? 4f : 3f)) + enrageScaleMaxSpeedBonus; @@ -81,43 +79,140 @@ namespace CalamityMod.NPCs.NormalNPCs float yAccelBoost1 = maxSpeedY * 0.01f; float yAccelBoost2 = maxSpeedY * 0.0075f; - if (target.dead) + float chargeVelocity = 12f + enrageScaleMaxSpeedBonus * 2f; + bool attemptingToCharge = NPC.ai[0] >= ChargeGateValue; + bool farEnoughForCharge = NPC.Distance(target.Center) >= 320f; + bool closeEnoughForCharge = NPC.Distance(target.Center) < 480f; + bool charging = (attemptingToCharge && farEnoughForCharge && closeEnoughForCharge) || NPC.ai[1] > 0f; + + float projectileShootGateValue = CalamityWorld.death ? 180f : 270f; + if (Main.getGoodWorld) + projectileShootGateValue *= 0.5f; + + Vector2 lookAt = target.Center - NPC.Center; + float rateOfRotation = charging ? 0f : 0.1f; + float chargeDuration = CalamityWorld.death ? ChargeDuration_Death : ChargeDuration; + if (charging) + { + if (NPC.ai[1] == 0f) + { + SoundEngine.PlaySound(SoundID.NPCDeath9, NPC.Center); + NPC.velocity = lookAt.SafeNormalize(Vector2.UnitY) * chargeVelocity; + NPC.spriteDirection = lookAt.X < 0f ? -1 : 1; + NPC.rotation = NPC.velocity.ToRotation() + (lookAt.X < 0f ? MathHelper.Pi : 0f); + + NPC.ai[1] = 1f; + if (NPC.ai[3] > projectileShootGateValue * 0.5f) + NPC.ai[3] = projectileShootGateValue * 0.5f; + + NPC.netUpdate = true; + NPC.netSpam = 0; + } + + if (NPC.ai[1] < ChargeDuration + 1f) + { + NPC.ai[1] += 1f; + if (NPC.ai[1] > ChargeDuration + 1f - 10f) + NPC.velocity *= 0.8f; + + if (NPC.ai[1] >= ChargeDuration + 1f) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.netUpdate = true; + NPC.netSpam = 0; + } + } + } + else + { + if (lookAt.X > 0f) + { + NPC.spriteDirection = 1; + NPC.rotation = (float)Math.Atan2(lookAt.Y, lookAt.X); + } + if (lookAt.X < 0f) + { + NPC.spriteDirection = -1; + NPC.rotation = (float)Math.Atan2(lookAt.Y, lookAt.X) + MathHelper.Pi; + } + } + + if (phase2) + { + NPC.damage = (int)Math.Round(NPC.defDamage * 1.3); + + if (NPC.ai[0] < ChargeGateValue && !targetDead) + { + NPC.ai[0] += 1f; + if (NPC.ai[0] == ChargeGateValue) + { + NPC.netUpdate = true; + NPC.netSpam = 0; + } + } + } + else + NPC.damage = NPC.defDamage; + + if (targetDead) { NPC.velocity.Y -= 0.04f; if (NPC.timeLeft > 10) NPC.timeLeft = 10; } - else + else if (!attemptingToCharge) + { DemonEyeAI.DemonEyeBatMovement(NPC, maxSpeedX, maxSpeedY, xAccel, xAccelBoost1, xAccelBoost2, yAccel, yAccelBoost1, yAccelBoost2); - if (phase2) - NPC.damage = (int)Math.Round(NPC.defDamage * 1.3); - else - NPC.damage = NPC.defDamage; - - if (!target.dead) NPC.ai[3] += enrageScale; - - float projectileShootGateValue = CalamityWorld.death ? 180f : 270f; - if (Main.getGoodWorld) - projectileShootGateValue *= 0.5f; - - bool shootProjectile = Collision.CanHitLine(NPC.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(NPC.Center, target.Center) > 240f; - if (NPC.ai[3] >= projectileShootGateValue && shootProjectile) - { - NPC.ai[3] = 0f; - float projectileSpeed = CalamityWorld.death ? 16f : 12f; - Vector2 projectileVelocity = NPC.SafeDirectionTo(target.Center) * projectileSpeed; - if (Main.netMode != NetmodeID.MultiplayerClient) + bool shootProjectile = Collision.CanHitLine(NPC.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(NPC.Center, target.Center) > 240f; + if (NPC.ai[3] >= projectileShootGateValue && shootProjectile) { - int projType = ProjectileID.BloodShot; - int projDamage = NPC.GetProjectileDamage(projType); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 10f, projectileVelocity, projType, projDamage, 0f, Main.myPlayer); - Main.projectile[proj].timeLeft = 600; + NPC.ai[3] = 0f; + float projectileSpeed = CalamityWorld.death ? 16f : 12f; + Vector2 projectileVelocity = NPC.SafeDirectionTo(target.Center) * projectileSpeed; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int projType = ProjectileID.BloodShot; + int projDamage = NPC.GetProjectileDamage(projType); + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 10f, projectileVelocity, projType, projDamage, 0f, Main.myPlayer); + Main.projectile[proj].timeLeft = 600; + } + + NPC.netUpdate = true; + NPC.netSpam = 0; } - NPC.netUpdate = true; + float pushVelocity = 0.2f * enrageScale; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active) + { + if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) + { + if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 48f * NPC.scale) + { + if (NPC.position.X < Main.npc[i].position.X) + NPC.velocity.X -= pushVelocity; + else + NPC.velocity.X += pushVelocity; + + if (NPC.position.Y < Main.npc[i].position.Y) + NPC.velocity.Y -= pushVelocity; + else + NPC.velocity.Y += pushVelocity; + } + } + } + } + } + else if (!charging) + { + Vector2 destination = target.Center + new Vector2(-280f * NPC.spriteDirection, -280f); + Vector2 desiredVelocity = NPC.SafeDirectionTo(destination, -Vector2.UnitY) * chargeVelocity; + NPC.SimpleFlyMovement(desiredVelocity, enrageScale); } if (Main.rand.NextBool(20)) @@ -127,29 +222,6 @@ namespace CalamityMod.NPCs.NormalNPCs blood.velocity.X *= 0.5f; blood.velocity.Y *= 0.1f; } - - float pushVelocity = 0.2f * enrageScale; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active) - { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) - { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 48f * NPC.scale) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; - - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } - } - } - } } public override void FindFrame(int frameHeight) @@ -169,6 +241,48 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y += frameHeight * 2; } + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + if (NPC.ai[0] >= ChargeTelegraphGateValue) + { + Texture2D npcTexture = TextureAssets.Npc[NPC.type].Value; + Color originalColor = NPC.GetAlpha(drawColor); + Color newColor = new Color(255, 128, 128, 255 - NPC.alpha); + Vector2 drawPosition = NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY); + Vector2 origin = NPC.frame.Size() / 2; + + SpriteEffects spriteEffects = SpriteEffects.None; + if (NPC.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + float telegraphScalar = MathHelper.Clamp((NPC.ai[0] - ChargeTelegraphGateValue) / ChargeTelegraphGateValue, 0f, 1f); + Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar); + + if (CalamityConfig.Instance.Afterimages && NPC.ai[1] > 0f) + { + int afterimageAmount = 10; + int afterImageIncrement = 2; + for (int j = 0; j < afterimageAmount; j += afterImageIncrement) + { + Color afterimageColor = telegraphColor; + afterimageColor = Color.Lerp(afterimageColor, originalColor, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (afterimageAmount - j) / 15f; + Vector2 afterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2(npcTexture.Width, npcTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(npcTexture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + } + } + + spriteBatch.Draw(npcTexture, drawPosition, NPC.frame, telegraphColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + + return false; + } + + return true; + } + public override Color? GetAlpha(Color drawColor) => new Color(128, 0, 0, 255 - NPC.alpha); public override void HitEffect(NPC.HitInfo hit) From 28072239058af465fa5aecbb5403d7a0ff72cbe5 Mon Sep 17 00:00:00 2001 From: Memes Date: Thu, 9 May 2024 22:14:53 +0200 Subject: [PATCH 074/197] Made Lilies of Finality's summons walk faster. --- Projectiles/Summon/LiliesOfFinalityAriane.cs | 4 ++-- Projectiles/Summon/LiliesOfFinalityElster.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projectiles/Summon/LiliesOfFinalityAriane.cs b/Projectiles/Summon/LiliesOfFinalityAriane.cs index 4d094e340a..1da87b762c 100644 --- a/Projectiles/Summon/LiliesOfFinalityAriane.cs +++ b/Projectiles/Summon/LiliesOfFinalityAriane.cs @@ -216,7 +216,7 @@ namespace CalamityMod.Projectiles.Summon if (!Projectile.getRect().Intersects(Elster.getRect())) { int walkDirection = Sign(Elster.Center.X - Projectile.Center.X); - float maxSpeed = Utils.Remap(Abs(Elster.Center.X - Projectile.Center.X), 160f, 0f, 6f, 0f); + float maxSpeed = Utils.Remap(Abs(Elster.Center.X - Projectile.Center.X), 160f, 0f, 8f, 0f); Projectile.velocity.X += 0.08f * walkDirection; if (Abs(Projectile.velocity.X) > maxSpeed) Projectile.velocity.X = maxSpeed * walkDirection; @@ -257,7 +257,7 @@ namespace CalamityMod.Projectiles.Summon return; } - FlyTowardsPlace(Owner.velocity.Length() + 6f, Owner.Center, Sign(Projectile.velocity.X)); + FlyTowardsPlace(Owner.velocity.Length() + 8f, Owner.Center, Sign(Projectile.velocity.X)); Animation = AnimationState.Fly; } diff --git a/Projectiles/Summon/LiliesOfFinalityElster.cs b/Projectiles/Summon/LiliesOfFinalityElster.cs index f226867adb..a34bfd5172 100644 --- a/Projectiles/Summon/LiliesOfFinalityElster.cs +++ b/Projectiles/Summon/LiliesOfFinalityElster.cs @@ -201,7 +201,7 @@ namespace CalamityMod.Projectiles.Summon if (!Projectile.WithinRange(idlePosition, 8f)) { int walkDirection = Sign(idlePosition.X - Projectile.Center.X); - float maxSpeed = Utils.Remap(Abs(idlePosition.X - Projectile.Center.X), 160f, 0f, 6f, 0f); + float maxSpeed = Utils.Remap(Abs(idlePosition.X - Projectile.Center.X), 160f, 0f, 8f, 0f); Projectile.velocity.X += 0.08f * walkDirection; if (Abs(Projectile.velocity.X) > maxSpeed) Projectile.velocity.X = maxSpeed * walkDirection; @@ -234,7 +234,7 @@ namespace CalamityMod.Projectiles.Summon return; } - FlyTowardsPlace(Owner.velocity.Length() + 6f, Owner.Center, Sign(Projectile.velocity.X), AnimationState.Fly); + FlyTowardsPlace(Owner.velocity.Length() + 8f, Owner.Center, Sign(Projectile.velocity.X), AnimationState.Fly); Projectile.rotation = MathHelper.ToRadians(Projectile.velocity.Length()) * Sign(Projectile.velocity.X); ElevationDust(false); } From 4bf9023deb2e87c16355a015abcb38f8dfeebe42 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 May 2024 16:30:01 -0400 Subject: [PATCH 075/197] Stardust -> Starblight Soot --- Items/Accessories/InfectedJewel.cs | 2 +- Items/Fishing/AstralCatches/AstralCrate.cs | 2 +- Items/Materials/AstralBar.cs | 2 +- Items/Materials/MeldConstruct.cs | 2 +- Items/Materials/{Stardust.cs => StarblightSoot.cs} | 2 +- .../Materials/{Stardust.png => StarblightSoot.png} | Bin Items/PermanentBoosters/CometShard.cs | 2 +- Items/Placeables/CelestialRemains.cs | 2 +- Items/Placeables/Furniture/AstralBeaconItem.cs | 2 +- Items/Placeables/Furniture/AstralTorch.cs | 2 +- Items/Placeables/NovaeSlag.cs | 2 +- Items/Potions/AstralInjection.cs | 2 +- Items/SummonItems/AstralChunk.cs | 2 +- Items/SummonItems/Starcore.cs | 2 +- Items/TreasureBags/AstrumAureusBag.cs | 2 +- Items/TreasureBags/AstrumDeusBag.cs | 2 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 2 +- Items/Weapons/Ranged/Auralis.cs | 2 +- Items/Weapons/Rogue/RadiantStar.cs | 2 +- Items/Weapons/Typeless/LunicEye.cs | 2 +- Items/Weapons/Typeless/StarStruckWater.cs | 2 +- NPCs/Astral/Aries.cs | 2 +- NPCs/Astral/AstralProbe.cs | 2 +- NPCs/Astral/AstralSlime.cs | 2 +- NPCs/Astral/AstralachneaWall.cs | 4 ++-- NPCs/Astral/Atlas.cs | 2 +- NPCs/Astral/FusionFeeder.cs | 2 +- NPCs/Astral/Hadarian.cs | 2 +- NPCs/Astral/HiveEnemy.cs | 2 +- NPCs/Astral/Mantis.cs | 2 +- NPCs/Astral/Nova.cs | 2 +- NPCs/Astral/SightseerCollider.cs | 2 +- NPCs/Astral/SightseerSpitter.cs | 2 +- NPCs/Astral/StellarCulex.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHead.cs | 4 ++-- Tiles/Astral/AstralTree.cs | 2 +- Tiles/AstralDesert/AstralPalmTree.cs | 2 +- Tiles/AstralSnow/AstralSnowTree.cs | 2 +- Utilities/CalamityRecipes.cs | 2 +- World/MiscWorldgenRoutines.cs | 2 +- 40 files changed, 41 insertions(+), 41 deletions(-) rename Items/Materials/{Stardust.cs => StarblightSoot.cs} (90%) rename Items/Materials/{Stardust.png => StarblightSoot.png} (100%) diff --git a/Items/Accessories/InfectedJewel.cs b/Items/Accessories/InfectedJewel.cs index 86c11199ca..c5c18c08f6 100644 --- a/Items/Accessories/InfectedJewel.cs +++ b/Items/Accessories/InfectedJewel.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(10). - AddIngredient(25). + AddIngredient(25). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Fishing/AstralCatches/AstralCrate.cs b/Items/Fishing/AstralCatches/AstralCrate.cs index 9c5c6ec6db..690c4c8e8b 100644 --- a/Items/Fishing/AstralCatches/AstralCrate.cs +++ b/Items/Fishing/AstralCatches/AstralCrate.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches var postAstrumDeus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus); // Materials - itemLoot.Add(ModContent.ItemType(), 1, 5, 10); + itemLoot.Add(ModContent.ItemType(), 1, 5, 10); itemLoot.Add(ItemID.FallenStar, 1, 5, 10); itemLoot.Add(ItemID.Meteorite, 5, 10, 20); itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3); diff --git a/Items/Materials/AstralBar.cs b/Items/Materials/AstralBar.cs index 2bf49e1fb2..d9b21326f3 100644 --- a/Items/Materials/AstralBar.cs +++ b/Items/Materials/AstralBar.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { CreateRecipe(). - AddIngredient(3). + AddIngredient(3). AddIngredient(2). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Materials/MeldConstruct.cs b/Items/Materials/MeldConstruct.cs index b49062f647..feded67f84 100644 --- a/Items/Materials/MeldConstruct.cs +++ b/Items/Materials/MeldConstruct.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Materials { CreateRecipe(3). AddIngredient(6). - AddIngredient(3). + AddIngredient(3). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Materials/Stardust.cs b/Items/Materials/StarblightSoot.cs similarity index 90% rename from Items/Materials/Stardust.cs rename to Items/Materials/StarblightSoot.cs index a7a658f3f7..063e76ad5d 100644 --- a/Items/Materials/Stardust.cs +++ b/Items/Materials/StarblightSoot.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Materials { - public class Stardust : ModItem, ILocalizedModType + public class StarblightSoot : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Materials"; public override void SetStaticDefaults() diff --git a/Items/Materials/Stardust.png b/Items/Materials/StarblightSoot.png similarity index 100% rename from Items/Materials/Stardust.png rename to Items/Materials/StarblightSoot.png diff --git a/Items/PermanentBoosters/CometShard.cs b/Items/PermanentBoosters/CometShard.cs index 1f308af6b8..90cd2c4417 100644 --- a/Items/PermanentBoosters/CometShard.cs +++ b/Items/PermanentBoosters/CometShard.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.PermanentBoosters CreateRecipe(). AddIngredient(ItemID.MeteoriteBar, 10). AddIngredient(ItemID.FallenStar, 10). - AddIngredient(50). + AddIngredient(50). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Placeables/CelestialRemains.cs b/Items/Placeables/CelestialRemains.cs index 2dd1b4e2d6..c597021aad 100644 --- a/Items/Placeables/CelestialRemains.cs +++ b/Items/Placeables/CelestialRemains.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Items.Placeables } else if (val < 68.03f) { - resultType = ModContent.ItemType(); + resultType = ModContent.ItemType(); resultStack = Main.rand.Next(1, 11); } else if (val < 69.03f) diff --git a/Items/Placeables/Furniture/AstralBeaconItem.cs b/Items/Placeables/Furniture/AstralBeaconItem.cs index 3e5a720a0e..0abe100357 100644 --- a/Items/Placeables/Furniture/AstralBeaconItem.cs +++ b/Items/Placeables/Furniture/AstralBeaconItem.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Placeables.Furniture { CreateRecipe(). AddIngredient(5). - AddIngredient(20). + AddIngredient(20). AddIngredient(30). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Placeables/Furniture/AstralTorch.cs b/Items/Placeables/Furniture/AstralTorch.cs index fe74ba5bc3..4a537b11e8 100644 --- a/Items/Placeables/Furniture/AstralTorch.cs +++ b/Items/Placeables/Furniture/AstralTorch.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Placeables.Furniture { CreateRecipe(3). AddIngredient(ItemID.Torch, 3). - AddIngredient(). + AddIngredient(). Register(); } } diff --git a/Items/Placeables/NovaeSlag.cs b/Items/Placeables/NovaeSlag.cs index 37415c3674..78983dd0f0 100644 --- a/Items/Placeables/NovaeSlag.cs +++ b/Items/Placeables/NovaeSlag.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Items.Placeables } else if (val < 58.03f) { - resultType = ModContent.ItemType(); + resultType = ModContent.ItemType(); resultStack = Main.rand.Next(1, 21); } else if (val < 61.03f) diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index fd3aed69f5..682a341ce2 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Potions { CreateRecipe(15). AddIngredient(ItemID.BottledWater, 15). - AddIngredient(4). + AddIngredient(4). AddIngredient(). AddTile(TileID.AlchemyTable). AddConsumeItemCallback(Recipe.ConsumptionRules.Alchemy). diff --git a/Items/SummonItems/AstralChunk.cs b/Items/SummonItems/AstralChunk.cs index dc9a0d9b4b..c5094efa77 100644 --- a/Items/SummonItems/AstralChunk.cs +++ b/Items/SummonItems/AstralChunk.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(30). + AddIngredient(30). AddIngredient(ItemID.FallenStar, 20). AddTile(TileID.Anvils). Register(); diff --git a/Items/SummonItems/Starcore.cs b/Items/SummonItems/Starcore.cs index e405deae7f..c1fb8b87ce 100644 --- a/Items/SummonItems/Starcore.cs +++ b/Items/SummonItems/Starcore.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(25). + AddIngredient(25). AddIngredient(8). AddIngredient(4). AddTile(TileID.LunarCraftingStation). diff --git a/Items/TreasureBags/AstrumAureusBag.cs b/Items/TreasureBags/AstrumAureusBag.cs index cb7ede8821..b94f45c744 100644 --- a/Items/TreasureBags/AstrumAureusBag.cs +++ b/Items/TreasureBags/AstrumAureusBag.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.TreasureBags // Materials itemLoot.Add(ModContent.ItemType(), 1, 12, 16); - itemLoot.Add(ModContent.ItemType(), 1, 30, 40); + itemLoot.Add(ModContent.ItemType(), 1, 30, 40); itemLoot.Add(ItemID.FallenStar, 1, 20, 30); // Weapons diff --git a/Items/TreasureBags/AstrumDeusBag.cs b/Items/TreasureBags/AstrumDeusBag.cs index c1f50152be..0edb610266 100644 --- a/Items/TreasureBags/AstrumDeusBag.cs +++ b/Items/TreasureBags/AstrumDeusBag.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.TreasureBags itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType())); // Materials - itemLoot.Add(ModContent.ItemType(), 1, 60, 90); + itemLoot.Add(ModContent.ItemType(), 1, 60, 90); itemLoot.Add(ItemID.FallenStar, 1, 30, 50); // Weapons diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index c562f63b80..d465084ed8 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -388,7 +388,7 @@ namespace CalamityMod.Items.Weapons.Melee AddIngredient(ItemID.SoulofMight). AddIngredient(ItemID.SoulofSight). AddIngredient(ItemID.PixieDust, 2). - AddIngredient(10). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/Auralis.cs b/Items/Weapons/Ranged/Auralis.cs index a346b19b08..b65b6d0d34 100644 --- a/Items/Weapons/Ranged/Auralis.cs +++ b/Items/Weapons/Ranged/Auralis.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Ranged AddIngredient(ItemID.SniperRifle). AddIngredient(5). AddIngredient(5). - AddIngredient(50). + AddIngredient(50). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Rogue/RadiantStar.cs b/Items/Weapons/Rogue/RadiantStar.cs index 8fafb6889e..16e52c9fc5 100644 --- a/Items/Weapons/Rogue/RadiantStar.cs +++ b/Items/Weapons/Rogue/RadiantStar.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Rogue CreateRecipe(). AddIngredient(). AddIngredient(10). - AddIngredient(15). + AddIngredient(15). AddIngredient(ItemID.FallenStar, 10). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Weapons/Typeless/LunicEye.cs b/Items/Weapons/Typeless/LunicEye.cs index c1382ea084..83600706cf 100644 --- a/Items/Weapons/Typeless/LunicEye.cs +++ b/Items/Weapons/Typeless/LunicEye.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Typeless { CreateRecipe(). AddRecipeGroup("AnyCobaltBar", 10). - AddIngredient(20). + AddIngredient(20). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Typeless/StarStruckWater.cs b/Items/Weapons/Typeless/StarStruckWater.cs index 9ab9498f8f..110edb02eb 100644 --- a/Items/Weapons/Typeless/StarStruckWater.cs +++ b/Items/Weapons/Typeless/StarStruckWater.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Typeless { CreateRecipe(10). AddIngredient(ItemID.BottledWater, 10). - AddIngredient(2). + AddIngredient(2). AddIngredient(). Register(); } diff --git a/NPCs/Astral/Aries.cs b/NPCs/Astral/Aries.cs index ce94a721d9..76984fe721 100644 --- a/NPCs/Astral/Aries.cs +++ b/NPCs/Astral/Aries.cs @@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 1, 3)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 1, 3)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); } } diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index bce7d6cf7d..337b44f461 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 1, 3)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 1, 3)); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/Astral/AstralSlime.cs b/NPCs/Astral/AstralSlime.cs index 46e1cb2284..bd9d700934 100644 --- a/NPCs/Astral/AstralSlime.cs +++ b/NPCs/Astral/AstralSlime.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 1, 3)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 1, 3)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); var postDeus = npcLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus); diff --git a/NPCs/Astral/AstralachneaWall.cs b/NPCs/Astral/AstralachneaWall.cs index 008bf67d41..988cf850db 100644 --- a/NPCs/Astral/AstralachneaWall.cs +++ b/NPCs/Astral/AstralachneaWall.cs @@ -155,8 +155,8 @@ namespace CalamityMod.NPCs.Astral public static void ModifyAstralachneaLoot(NPCLoot npcLoot) { - npcLoot.AddIf(() => !Main.expertMode, ModContent.ItemType(), 2, 2, 3); - npcLoot.AddIf(() => Main.expertMode, ModContent.ItemType(), 1, 1, 4); + npcLoot.AddIf(() => !Main.expertMode, ModContent.ItemType(), 2, 2, 3); + npcLoot.AddIf(() => Main.expertMode, ModContent.ItemType(), 1, 1, 4); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); } diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 8f159e4f43..5089169c16 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -657,7 +657,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ModContent.ItemType()); - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 6, 8, 7, 9)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 6, 8, 7, 9)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); } } diff --git a/NPCs/Astral/FusionFeeder.cs b/NPCs/Astral/FusionFeeder.cs index e5a53cbf34..49a6b73e71 100644 --- a/NPCs/Astral/FusionFeeder.cs +++ b/NPCs/Astral/FusionFeeder.cs @@ -322,7 +322,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ItemID.SharkFin, 8); - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); } } } diff --git a/NPCs/Astral/Hadarian.cs b/NPCs/Astral/Hadarian.cs index 4ad21f25b4..f71ed2a2df 100644 --- a/NPCs/Astral/Hadarian.cs +++ b/NPCs/Astral/Hadarian.cs @@ -221,7 +221,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 3, 1, 4)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 3, 1, 4)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 10); } } diff --git a/NPCs/Astral/HiveEnemy.cs b/NPCs/Astral/HiveEnemy.cs index 7529bb4fc6..75d9527c5d 100644 --- a/NPCs/Astral/HiveEnemy.cs +++ b/NPCs/Astral/HiveEnemy.cs @@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 3, 1, 4)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 3, 1, 4)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); } } diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index a1c1558071..f2abb227c0 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -250,7 +250,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 2, 1, 3)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 2, 1, 3)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); } } diff --git a/NPCs/Astral/Nova.cs b/NPCs/Astral/Nova.cs index 7869fe2cb7..3eec7f005b 100644 --- a/NPCs/Astral/Nova.cs +++ b/NPCs/Astral/Nova.cs @@ -297,7 +297,7 @@ namespace CalamityMod.NPCs.Astral var exploded = npcLoot.DefineConditionalDropSet((info) => info.npc.ai[3] <= -10000f); // 2-3 Stardust (3-4 Expert+) - exploded.OnFailedConditions(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); + exploded.OnFailedConditions(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); exploded.OnFailedConditions(ItemDropRule.ByCondition(DropHelper.If(() => DownedBossSystem.downedAstrumAureus), ModContent.ItemType(), 7)); // If exploded, then have a chance to drop Glorious End and nothing else diff --git a/NPCs/Astral/SightseerCollider.cs b/NPCs/Astral/SightseerCollider.cs index be6958cc53..9e8dc3fec8 100644 --- a/NPCs/Astral/SightseerCollider.cs +++ b/NPCs/Astral/SightseerCollider.cs @@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 2, 1, 3)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 2, 1, 3)); } } } diff --git a/NPCs/Astral/SightseerSpitter.cs b/NPCs/Astral/SightseerSpitter.cs index 9bc3205ed2..018a3f7efe 100644 --- a/NPCs/Astral/SightseerSpitter.cs +++ b/NPCs/Astral/SightseerSpitter.cs @@ -186,7 +186,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 2, 3, 3, 4)); } } diff --git a/NPCs/Astral/StellarCulex.cs b/NPCs/Astral/StellarCulex.cs index 87f8f9eebe..7cdb6f1050 100644 --- a/NPCs/Astral/StellarCulex.cs +++ b/NPCs/Astral/StellarCulex.cs @@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.Astral public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 2, 1, 3)); + npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 1, 2, 1, 3)); npcLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 7); } } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 181b292122..ed43b0fe56 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -229,7 +229,7 @@ namespace CalamityMod.NPCs.AstrumDeus } } - public override void BossLoot(ref string name, ref int potionType) => potionType = ModContent.ItemType(); + public override void BossLoot(ref string name, ref int potionType) => potionType = ModContent.ItemType(); public static bool ShouldNotDropThings(NPC npc) => npc.Calamity().newAI[0] == 0f || ((CalamityWorld.death || BossRushEvent.BossRushActive) && npc.Calamity().newAI[0] != 3f); @@ -311,7 +311,7 @@ namespace CalamityMod.NPCs.AstrumDeus // Materials normalOnly.Add(ItemID.FallenStar, 1, 25, 40); - normalOnly.Add(ModContent.ItemType(), 1, 50, 80); + normalOnly.Add(ModContent.ItemType(), 1, 50, 80); } npcLoot.DefineConditionalDropSet(() => true).Add(DropHelper.PerPlayer(ItemID.SuperHealingPotion, 1, 5, 15), hideLootReport: true); // Healing Potions don't show up in the Bestiary diff --git a/Tiles/Astral/AstralTree.cs b/Tiles/Astral/AstralTree.cs index 37d8204aae..9bc4e6c1d6 100644 --- a/Tiles/Astral/AstralTree.cs +++ b/Tiles/Astral/AstralTree.cs @@ -115,7 +115,7 @@ namespace CalamityMod.Tiles.Astral else if (Main.rand.NextBool(15)) { createLeaves = true; - int type = ModContent.ItemType(); + int type = ModContent.ItemType(); if (!Main.dayTime && Main.rand.NextBool()) type = ItemID.FallenStar; Item.NewItem(WorldGen.GetItemSource_FromTreeShake(x, y), new Vector2(x, y) * 16, type, randAmt); diff --git a/Tiles/AstralDesert/AstralPalmTree.cs b/Tiles/AstralDesert/AstralPalmTree.cs index c5b9c46c13..4ccdbe2be0 100644 --- a/Tiles/AstralDesert/AstralPalmTree.cs +++ b/Tiles/AstralDesert/AstralPalmTree.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Tiles.AstralDesert else if (Main.rand.NextBool(15)) { createLeaves = true; - int type = ModContent.ItemType(); + int type = ModContent.ItemType(); if (!Main.dayTime && Main.rand.NextBool()) type = ItemID.FallenStar; Item.NewItem(WorldGen.GetItemSource_FromTreeShake(x, y), new Vector2(x, y) * 16, type, randAmt); diff --git a/Tiles/AstralSnow/AstralSnowTree.cs b/Tiles/AstralSnow/AstralSnowTree.cs index b9d738433f..f36ecac3c4 100644 --- a/Tiles/AstralSnow/AstralSnowTree.cs +++ b/Tiles/AstralSnow/AstralSnowTree.cs @@ -117,7 +117,7 @@ namespace CalamityMod.Tiles.AstralSnow else if (Main.rand.NextBool(15)) { createLeaves = true; - int type = ModContent.ItemType(); + int type = ModContent.ItemType(); if (!Main.dayTime && Main.rand.NextBool()) type = ItemID.FallenStar; Item.NewItem(WorldGen.GetItemSource_FromTreeShake(x, y), new Vector2(x, y) * 16, type, randAmt); diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index b309b9055d..aecfb2bfc3 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -528,7 +528,7 @@ namespace CalamityMod // Fallen Stars from Stardust Recipe.Create(ItemID.FallenStar). - AddIngredient(5). + AddIngredient(5). AddTile(TileID.Anvils). Register() .DisableDecraft(); diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index cb1e3dd3ea..f413f99e1e 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -77,7 +77,7 @@ namespace CalamityMod.World // Astral Chest has completely different loot in it if (type == ModContent.TileType()) { - PutItemInChest(ref chest, ModContent.ItemType(), 30, 80); + PutItemInChest(ref chest, ModContent.ItemType(), 30, 80); PutItemInChest(ref chest, ModContent.ItemType(), 10, 14); PutItemInChest(ref chest, ModContent.ItemType(), 8); PutItemInChest(ref chest, ModContent.ItemType(), 3, 5); From 8a041d5406cff019fb3c07b508bd7b827521d6f8 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 May 2024 16:33:01 -0400 Subject: [PATCH 076/197] Solar Flare -> Burning Revelation --- Items/TreasureBags/ProvidenceBag.cs | 2 +- .../{SolarFlare.cs => BurningRevelation.cs} | 2 +- .../{SolarFlare.png => BurningRevelation.png} | Bin Items/Weapons/Melee/TheOracle.cs | 2 +- .../Mods.CalamityMod.Items.Materials.hjson | 4 ++-- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 18 +++++++++--------- NPCs/Providence/Providence.cs | 2 +- Projectiles/Melee/Yoyos/SolarFlareYoyo.cs | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) rename Items/Weapons/Melee/{SolarFlare.cs => BurningRevelation.cs} (95%) rename Items/Weapons/Melee/{SolarFlare.png => BurningRevelation.png} (100%) diff --git a/Items/TreasureBags/ProvidenceBag.cs b/Items/TreasureBags/ProvidenceBag.cs index 7445639905..4feb1ba07a 100644 --- a/Items/TreasureBags/ProvidenceBag.cs +++ b/Items/TreasureBags/ProvidenceBag.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.TreasureBags itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[] { ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Items/Weapons/Melee/SolarFlare.cs b/Items/Weapons/Melee/BurningRevelation.cs similarity index 95% rename from Items/Weapons/Melee/SolarFlare.cs rename to Items/Weapons/Melee/BurningRevelation.cs index 8bf48025bc..cb02f432d7 100644 --- a/Items/Weapons/Melee/SolarFlare.cs +++ b/Items/Weapons/Melee/BurningRevelation.cs @@ -5,7 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { - public class SolarFlare : ModItem, ILocalizedModType + public class BurningRevelation : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() diff --git a/Items/Weapons/Melee/SolarFlare.png b/Items/Weapons/Melee/BurningRevelation.png similarity index 100% rename from Items/Weapons/Melee/SolarFlare.png rename to Items/Weapons/Melee/BurningRevelation.png diff --git a/Items/Weapons/Melee/TheOracle.cs b/Items/Weapons/Melee/TheOracle.cs index 985ac51930..6708ca7991 100644 --- a/Items/Weapons/Melee/TheOracle.cs +++ b/Items/Weapons/Melee/TheOracle.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(5). AddTile(). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson index 3832adc9b4..6c23f21453 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson @@ -302,8 +302,8 @@ SolarVeil: { Tooltip: Sunlight cannot penetrate the fabric of this cloth } -Stardust: { - DisplayName: Stardust +StarblightSoot: { + DisplayName: Starblight Soot Tooltip: "" } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index d42b8a42b1..58ce679f5b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -239,6 +239,15 @@ BrokenBiomeBlade: { DefaultFunction: Does nothing... yet } +BurningRevelation: { + DisplayName: Burning Revelation + Tooltip: + ''' + Emits large holy explosions on hit + An exceptionally agile yoyo + ''' +} + BurntSienna: { DisplayName: Burnt Sienna Tooltip: Causes enemies to erupt into healing projectiles on death @@ -1040,15 +1049,6 @@ SmokingComet: { Tooltip: Rains stars from the sky } -SolarFlare: { - DisplayName: Solar Flare - Tooltip: - ''' - Emits large holy explosions on hit - An exceptionally agile yoyo - ''' -} - SolsticeClaymore: { DisplayName: Solstice Claymore Tooltip: diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 0619b23fc4..79471eeab9 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -2071,7 +2071,7 @@ namespace CalamityMod.NPCs.Providence int[] weapons = new int[] { ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs index e05dd23d09..7f7d716cda 100644 --- a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs +++ b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { public class SolarFlareYoyo : ModProjectile { - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); + public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public const int MaxUpdates = 3; public override void SetStaticDefaults() From f8fad999c385fab32b5d4747d48606b6f2436dce Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 May 2024 16:40:32 -0400 Subject: [PATCH 077/197] Purity -> Radiance --- Items/Accessories/{Purity.cs => Radiance.cs} | 2 +- .../Accessories/{Purity.png => Radiance.png} | Bin .../Mods.CalamityMod.Items.Accessories.hjson | 26 +++++++++--------- ModSupport/WeakReferenceSupport.cs | 1 - ...rFlareYoyo.cs => BurningRevelationYoyo.cs} | 2 +- ...lareYoyo.png => BurningRevelationYoyo.png} | Bin 6 files changed, 15 insertions(+), 16 deletions(-) rename Items/Accessories/{Purity.cs => Radiance.cs} (97%) rename Items/Accessories/{Purity.png => Radiance.png} (100%) rename Projectiles/Melee/Yoyos/{SolarFlareYoyo.cs => BurningRevelationYoyo.cs} (97%) rename Projectiles/Melee/Yoyos/{SolarFlareYoyo.png => BurningRevelationYoyo.png} (100%) diff --git a/Items/Accessories/Purity.cs b/Items/Accessories/Radiance.cs similarity index 97% rename from Items/Accessories/Purity.cs rename to Items/Accessories/Radiance.cs index 4bdeeaa82d..af773f79c2 100644 --- a/Items/Accessories/Purity.cs +++ b/Items/Accessories/Radiance.cs @@ -11,7 +11,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { [LegacyName("AstralArcanum")] - public class Purity : ModItem, ILocalizedModType + public class Radiance : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; public override void SetStaticDefaults() diff --git a/Items/Accessories/Purity.png b/Items/Accessories/Radiance.png similarity index 100% rename from Items/Accessories/Purity.png rename to Items/Accessories/Radiance.png diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 329846ae88..5a2ee1af9e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1316,8 +1316,19 @@ ProfanedSoulCrystal: { ''' } -Purity: { - DisplayName: Purity +QuiverofNihility: { + DisplayName: Quiver of Nihility + Tooltip: + ''' + 5% increased ranged critical strike chance + Summons a ring of four void fields to orbit you + Arrows that pass through these fields gain a 75% damage boost and double the speed + 'Filled with a substance darker than the night sky' + ''' +} + +Radiance: { + DisplayName: Radiance Tooltip: ''' +100 max life @@ -1335,17 +1346,6 @@ Purity: { ''' } -QuiverofNihility: { - DisplayName: Quiver of Nihility - Tooltip: - ''' - 5% increased ranged critical strike chance - Summons a ring of four void fields to orbit you - Arrows that pass through these fields gain a 75% damage boost and double the speed - 'Filled with a substance darker than the night sky' - ''' -} - RadiantOoze: { DisplayName: Radiant Ooze Tooltip: diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 3d31d57f06..32f4280027 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -235,7 +235,6 @@ namespace CalamityMod ItemRedirect(ItemType(), "Pineapple (calamity)"); ItemRedirect(ItemType(), "Trash Can (pet)"); ItemRedirect(ItemType(), "Butcher (weapon)"); - ItemRedirect(ItemType(), "Purity (accessory)"); ItemRedirect(ItemType(), "Sandstorm (weapon)"); ItemRedirect(ItemType(), "Thunderstorm (weapon)"); // Lore items diff --git a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs similarity index 97% rename from Projectiles/Melee/Yoyos/SolarFlareYoyo.cs rename to Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs index 7f7d716cda..c1b176f8e6 100644 --- a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs +++ b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs @@ -9,7 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee.Yoyos { - public class SolarFlareYoyo : ModProjectile + public class BurningRevelationYoyo : ModProjectile { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public const int MaxUpdates = 3; diff --git a/Projectiles/Melee/Yoyos/SolarFlareYoyo.png b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.png similarity index 100% rename from Projectiles/Melee/Yoyos/SolarFlareYoyo.png rename to Projectiles/Melee/Yoyos/BurningRevelationYoyo.png From 715e3674010fe77647b2649aa9d67fd119c67eb4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 May 2024 16:40:44 -0400 Subject: [PATCH 078/197] Update BurningRevelation.cs --- Items/Weapons/Melee/BurningRevelation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/BurningRevelation.cs b/Items/Weapons/Melee/BurningRevelation.cs index cb02f432d7..6e21f5d474 100644 --- a/Items/Weapons/Melee/BurningRevelation.cs +++ b/Items/Weapons/Melee/BurningRevelation.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noUseGraphic = true; Item.noMelee = true; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; From 0c076e09c5c1e91e80267379e7b154905d7a52e9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 May 2024 16:44:57 -0400 Subject: [PATCH 079/197] LEGACY NAME AAAAAAAAAAAAAAAA --- Items/Accessories/Radiance.cs | 2 +- Items/Materials/StarblightSoot.cs | 1 + Items/Weapons/Melee/BurningRevelation.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Items/Accessories/Radiance.cs b/Items/Accessories/Radiance.cs index af773f79c2..b8f71335c4 100644 --- a/Items/Accessories/Radiance.cs +++ b/Items/Accessories/Radiance.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - [LegacyName("AstralArcanum")] + [LegacyName("AstralArcanum", "Purity")] public class Radiance : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; diff --git a/Items/Materials/StarblightSoot.cs b/Items/Materials/StarblightSoot.cs index 063e76ad5d..a22b09e580 100644 --- a/Items/Materials/StarblightSoot.cs +++ b/Items/Materials/StarblightSoot.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Materials { + [LegacyName("Stardust")] public class StarblightSoot : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Materials"; diff --git a/Items/Weapons/Melee/BurningRevelation.cs b/Items/Weapons/Melee/BurningRevelation.cs index 6e21f5d474..85c2b4d6e8 100644 --- a/Items/Weapons/Melee/BurningRevelation.cs +++ b/Items/Weapons/Melee/BurningRevelation.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { + [LegacyName("SolarFlare")] public class BurningRevelation : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; From cc0bdd56741b38885982e8f9b21075c47545cd49 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Thu, 9 May 2024 18:21:14 -0500 Subject: [PATCH 080/197] Sapphire Jewel dust line to clarify that it's buffing King Slime. --- NPCs/NormalNPCs/KingSlimeJewel2.cs | 52 ++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/NPCs/NormalNPCs/KingSlimeJewel2.cs b/NPCs/NormalNPCs/KingSlimeJewel2.cs index d1df10f218..32d5cacb53 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel2.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel2.cs @@ -1,4 +1,5 @@ -using CalamityMod.CalPlayer; +using System; +using CalamityMod.CalPlayer; using CalamityMod.Events; using CalamityMod.Projectiles.Boss; using CalamityMod.World; @@ -118,6 +119,8 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.ai[0] = 0f; + SoundEngine.PlaySound(SoundID.Item8, NPC.Center); + for (int dusty = 0; dusty < 10; dusty++) { Vector2 dustVel = Main.rand.NextVector2CircularEdge(5f, 5f); @@ -131,7 +134,52 @@ namespace CalamityMod.NPCs.NormalNPCs } } - SoundEngine.PlaySound(SoundID.Item8, NPC.Center); + int distanceFromKingSlime = 1; + Vector2 kingSlimeCenter = NPC.Center; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == NPCID.KingSlime) + { + distanceFromKingSlime = (int)NPC.Distance(Main.npc[i].Center); + kingSlimeCenter = Main.npc[i].Center; + break; + } + } + + int maxDustIterations = distanceFromKingSlime; + int maxDust = 100; + int dustDivisor = maxDustIterations / maxDust; + if (dustDivisor < 2) + dustDivisor = 2; + + Vector2 dustLineStart = NPC.Center; + Vector2 dustLineEnd = kingSlimeCenter; + Vector2 currentDustPos = default; + Vector2 spinningpoint = new Vector2(0f, -1f).RotatedByRandom(MathHelper.Pi); + int dustSpawned = 0; + for (int i = 0; i < maxDustIterations; i++) + { + if (i % dustDivisor == 0) + { + currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxDustIterations); + int dust = Dust.NewDust(currentDustPos, 0, 0, DustID.GemSapphire, 0f, 0f, 100, default, 1f); + Main.dust[dust].position = currentDustPos; + Main.dust[dust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxDustIterations) * (0.9f + Main.rand.NextFloat() * 0.2f); + Main.dust[dust].noGravity = true; + if (Main.rand.NextBool()) + { + Main.dust[dust].scale = 0.5f; + Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + } + + Dust dust2 = Dust.CloneDust(dust); + Dust dust3 = dust2; + dust3.scale *= 0.5f; + dust3 = dust2; + dust3.fadeIn *= 0.5f; + dustSpawned++; + } + } NPC.netUpdate = true; } From 1e1e09cab56ec64ffa2d2d624df8db5eb40ee85c Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Thu, 9 May 2024 19:13:08 -0700 Subject: [PATCH 081/197] (live bug) fix accursed mono not dropping while active --- Tiles/FurnitureSacrilegious/MonolithOfTheAccursedTile.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Tiles/FurnitureSacrilegious/MonolithOfTheAccursedTile.cs b/Tiles/FurnitureSacrilegious/MonolithOfTheAccursedTile.cs index 72d25b9ae3..2a52e46a60 100644 --- a/Tiles/FurnitureSacrilegious/MonolithOfTheAccursedTile.cs +++ b/Tiles/FurnitureSacrilegious/MonolithOfTheAccursedTile.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious { public override void SetStaticDefaults() { + RegisterItemDrop(ModContent.ItemType()); Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; Main.tileNoAttach[Type] = true; From 5995640793d189cec02dde2596d8234ef564eff5 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Thu, 9 May 2024 19:19:55 -0700 Subject: [PATCH 082/197] fix br monolith playing music --- Events/BossRushEvent.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 07e1b805da..212fab1226 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -489,6 +489,10 @@ namespace CalamityMod.Events { get { + if (!BossRushActive) + { + return -1; + } int tier = CurrentTier; if (CalamityMod.Instance.musicMod != null) { From 24b8e8641a61ede04cbbcd38025c49c0eb3f021d Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Thu, 9 May 2024 19:33:17 -0700 Subject: [PATCH 083/197] fixed exo obelisk symbols not appearing --- Tiles/Furniture/Monoliths/AstralProjectorTile.cs | 6 +++--- Tiles/Furniture/Monoliths/BossRushMonolithTile.cs | 6 +++--- Tiles/Furniture/Monoliths/DraconicIncenseTile.cs | 6 +++--- Tiles/Furniture/Monoliths/ExoObeliskTile.cs | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Tiles/Furniture/Monoliths/AstralProjectorTile.cs b/Tiles/Furniture/Monoliths/AstralProjectorTile.cs index a13d71494f..5c63390b42 100644 --- a/Tiles/Furniture/Monoliths/AstralProjectorTile.cs +++ b/Tiles/Furniture/Monoliths/AstralProjectorTile.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Tiles.Furniture.Monoliths { public class AstralProjectorTile : ModTile { - public static Texture2D Glow; + public static Asset Glow; public override void SetStaticDefaults() { if (!Main.dedServ) { - Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/AstralProjectorTile_Glow", AssetRequestMode.AsyncLoad).Value; + Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/AstralProjectorTile_Glow", AssetRequestMode.AsyncLoad); } RegisterItemDrop(ModContent.ItemType()); Main.tileFrameImportant[Type] = true; @@ -140,7 +140,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths } Main.spriteBatch.Draw(texture, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Lighting.GetColor(i, j), 0f, default(Vector2), 1f, SpriteEffects.None, 0f); if (Glow != null) - Main.spriteBatch.Draw(Glow, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Glow.Value, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); return false; } } diff --git a/Tiles/Furniture/Monoliths/BossRushMonolithTile.cs b/Tiles/Furniture/Monoliths/BossRushMonolithTile.cs index 37a929204c..9abede9eaa 100644 --- a/Tiles/Furniture/Monoliths/BossRushMonolithTile.cs +++ b/Tiles/Furniture/Monoliths/BossRushMonolithTile.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Tiles.Furniture.Monoliths { public class BossRushMonolithTile : ModTile { - public static Texture2D Glow; + public static Asset Glow; public override void SetStaticDefaults() { if (!Main.dedServ) { - Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/BossRushMonolithTile_Glow", AssetRequestMode.AsyncLoad).Value; + Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/BossRushMonolithTile_Glow", AssetRequestMode.AsyncLoad); } RegisterItemDrop(ModContent.ItemType()); Main.tileFrameImportant[Type] = true; @@ -140,7 +140,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths } Main.spriteBatch.Draw(texture, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Lighting.GetColor(i, j), 0f, default(Vector2), 1f, SpriteEffects.None, 0f); if (Glow != null) - Main.spriteBatch.Draw(Glow, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Glow.Value, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); return false; } } diff --git a/Tiles/Furniture/Monoliths/DraconicIncenseTile.cs b/Tiles/Furniture/Monoliths/DraconicIncenseTile.cs index 1537d8e7d6..d598a4f1bf 100644 --- a/Tiles/Furniture/Monoliths/DraconicIncenseTile.cs +++ b/Tiles/Furniture/Monoliths/DraconicIncenseTile.cs @@ -16,12 +16,12 @@ namespace CalamityMod.Tiles.Furniture.Monoliths { public class DraconicIncenseTile : ModTile { - public static Texture2D Glow; + public static Asset Glow; public override void SetStaticDefaults() { if (!Main.dedServ) { - Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/DraconicIncenseTile_Glow", AssetRequestMode.AsyncLoad).Value; + Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/DraconicIncenseTile_Glow", AssetRequestMode.AsyncLoad); } RegisterItemDrop(ModContent.ItemType()); Main.tileFrameImportant[Type] = true; @@ -138,7 +138,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths } Main.spriteBatch.Draw(texture, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Lighting.GetColor(i, j), 0f, default(Vector2), 1f, SpriteEffects.None, 0f); if (Glow != null) - Main.spriteBatch.Draw(Glow, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Glow.Value, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); return false; } } diff --git a/Tiles/Furniture/Monoliths/ExoObeliskTile.cs b/Tiles/Furniture/Monoliths/ExoObeliskTile.cs index 90c6b4a01e..9712a5da57 100644 --- a/Tiles/Furniture/Monoliths/ExoObeliskTile.cs +++ b/Tiles/Furniture/Monoliths/ExoObeliskTile.cs @@ -20,14 +20,14 @@ namespace CalamityMod.Tiles.Furniture.Monoliths { public class ExoObeliskTile : ModTile { - public static Texture2D Glow; - public static Texture2D Numbers; + public static Asset Glow; + public static Asset Numbers; public override void SetStaticDefaults() { if (!Main.dedServ) { - Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/ExoObeliskTile_Glow", AssetRequestMode.AsyncLoad).Value; - Numbers = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/ExoObeliskText", AssetRequestMode.AsyncLoad).Value; + Glow = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/ExoObeliskTile_Glow", AssetRequestMode.AsyncLoad); + Numbers = ModContent.Request("CalamityMod/Tiles/Furniture/Monoliths/ExoObeliskText", AssetRequestMode.AsyncLoad); } RegisterItemDrop(ModContent.ItemType()); Main.tileFrameImportant[Type] = true; @@ -144,7 +144,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths } Main.spriteBatch.Draw(texture, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Lighting.GetColor(i, j), 0f, default(Vector2), 1f, SpriteEffects.None, 0f); if (Glow != null) - Main.spriteBatch.Draw(Glow, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Glow.Value, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); ; if (Numbers != null) { int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 0.5 % CalamityUtils.ExoPalette.Length); @@ -152,7 +152,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths Color nextColor = CalamityUtils.ExoPalette[(colorIndex + 1) % CalamityUtils.ExoPalette.Length]; Color exoColors = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 0.5f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f); - Main.spriteBatch.Draw(Numbers, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), exoColors, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Numbers.Value, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), exoColors, 0f, default(Vector2), 1f, SpriteEffects.None, 0f); } return false; From d40e3c0514f3d2607a607cc2e6a0aeedf71b71e7 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Thu, 9 May 2024 19:38:06 -0700 Subject: [PATCH 084/197] astral projector fix maybe??? --- Tiles/Furniture/Monoliths/AstralProjectorTile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tiles/Furniture/Monoliths/AstralProjectorTile.cs b/Tiles/Furniture/Monoliths/AstralProjectorTile.cs index 5c63390b42..d44aa7b562 100644 --- a/Tiles/Furniture/Monoliths/AstralProjectorTile.cs +++ b/Tiles/Furniture/Monoliths/AstralProjectorTile.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths { int x = i - Main.tile[i, j].TileFrameX / 18 % 2; int y = j - Main.tile[i, j].TileFrameY / 18 % 3; - int tileXX18 = 54; + int tileXX18 = 56; for (int l = x; l < x + 2; l++) { for (int m = y; m < y + 3; m++) From d75aa673aa57328c63c3a5b5679adf3280d2d0d0 Mon Sep 17 00:00:00 2001 From: AquaSG Date: Thu, 9 May 2024 23:55:09 -0400 Subject: [PATCH 085/197] draeting scrolling fix "Whatever it takes" --- .../CodebreakerUI.Communication.cs | 21 ++++++++++++++----- UI/DraedonSummoning/CodebreakerUI.cs | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index 09d52baba0..3323354a0b 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -109,6 +109,7 @@ namespace CalamityMod.UI.DraedonSummoning get; set; } + public static float DialogOffYCache = 0; /// /// The vertical offset as a result of scrolling for the topic options. @@ -486,7 +487,7 @@ namespace CalamityMod.UI.DraedonSummoning // Ensure that the player starts at the bottom of the scoller, now that new text is generating there. Texture2D dialogOutline = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonDialogOutline").Value; Rectangle dialogArea = Utils.CenteredRectangle(selectionCenter, dialogOutline.Size() * panelScale); - DialogVerticalOffset = dialogArea.Height - DialogHeight * GeneralScale; + DialogVerticalOffset = -DialogHeight * GeneralScale; DialogScroller.PositionYInterpolant = 1f; if (DialogVerticalOffset > 0f) DialogVerticalOffset = 0f; @@ -555,7 +556,10 @@ namespace CalamityMod.UI.DraedonSummoning // Shift the text downward if it exceeds the current bottom. if (DialogHeight * 1.2f >= textCutoffRegion.Height && !string.IsNullOrEmpty(nextLetter.ToString()) && LatestDialogHeightIncrease > 0f) + { DialogVerticalOffset -= LatestDialogHeightIncrease; + DialogVerticalOffset += DialogOffYCache; + } // Move to the next index in the dialog history once Draedon is finished speaking. if (WrittenDraedonText.Length >= FullDraedonText.Length) @@ -566,12 +570,19 @@ namespace CalamityMod.UI.DraedonSummoning } // Play a small dialog sound, similar to that of Undertale. - if (DialogSoundDelay <= 0 && nextLetter != ' ' && nextLetter != '\n') + if (DialogSoundDelay <= 0 && nextLetter != ' ') { - SoundStyle playThisSound = Main.rand.Next(DraedonTalks); - SoundEngine.PlaySound(playThisSound with { Volume = 0.4f }, Main.LocalPlayer.Center); + if (nextLetter != '\n') + { + DialogHeight -= DialogOffYCache; + DialogOffYCache = 0; + SoundStyle playThisSound = Main.rand.Next(DraedonTalks); + SoundEngine.PlaySound(playThisSound with { Volume = 0.4f }, Main.LocalPlayer.Center); - DialogSoundDelay = 4; + DialogSoundDelay = 4; + } + else + DialogOffYCache += panelScale.Y * 10f; } } diff --git a/UI/DraedonSummoning/CodebreakerUI.cs b/UI/DraedonSummoning/CodebreakerUI.cs index a5052a90e3..57d0df228e 100644 --- a/UI/DraedonSummoning/CodebreakerUI.cs +++ b/UI/DraedonSummoning/CodebreakerUI.cs @@ -117,6 +117,7 @@ namespace CalamityMod.UI.DraedonSummoning DialogScroller.Reset(); TopicOptionsScroller.Reset(); DialogVerticalOffset = 0f; + DialogOffYCache = 0; OptionsTextVerticalOffset = 0f; DialogHeight = 0f; LatestDialogHeightIncrease = 0f; From 9e7065a66d39d37a63769bd7efecb03b5d549eb4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 May 2024 00:10:43 -0400 Subject: [PATCH 086/197] Add a hard reference to Calamity Music Mod. It is no longer possible to play Calamity without its soundtrack. TML May Stable features allow users to seamlessly install it as a dependency. --- build.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.txt b/build.txt index 4ae2df0d93..e72a263356 100644 --- a/build.txt +++ b/build.txt @@ -1,6 +1,7 @@ author = Fabsol and the Dev Team version = 2.0.3.011 displayName = Calamity Mod +modReferences = CalamityModMusic homepage = https://discord.gg/calamity buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, .github\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes, Effects\Compiler\* hideCode = false From 3da06db952e48d355216f92e4ae70f50c6bac223 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 May 2024 00:37:57 -0400 Subject: [PATCH 087/197] Properly localized Draedon's openers. --- Localization/en-US/Mods.CalamityMod.UI.hjson | 3 +++ UI/DraedonSummoning/CodebreakerUI.Communication.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index 9d2b324962..3e88bfe11f 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -159,6 +159,9 @@ DebuffSystem: { // Draedon Contact UI. Repeated newlines indicate pauses in Draedon's speaking. As a result, newline characters may be explicitly defined. // The code that interprets these strings will transform them. +CommunicationStart: ... +CommunicationStartRepeat: State your inquiry. + Communication: { WhoAreYou: { Inquiry: Introduction diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index 3323354a0b..29d6133274 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -183,7 +183,7 @@ namespace CalamityMod.UI.DraedonSummoning /// /// The text Draedon starts off with when you interact with the codebreaker. The first time you see him he says nothing, but in successive calls he asks what your inquiry is. /// - public static string InquiryText => Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker ? "State your inquiry." : "..."; + public static string InquiryText => CalamityUtils.GetTextValue(Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker ? "UI.CommunicationStartRepeat" : "UI.CommunicationStart"); /// /// The text of the previously hovered topic option. This is used to ensure hover clicking sounds only play if the sound type changes. From 8a0b14e57d72b7c31f1cf39010abfc6d111703ae Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 May 2024 00:54:55 -0400 Subject: [PATCH 088/197] Added a reminder to Draedon's introduction to use Draedon's Forge. --- Localization/en-US/Mods.CalamityMod.UI.hjson | 5 +++-- UI/DraedonSummoning/CodebreakerUI.Communication.cs | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index 3e88bfe11f..ede9fc3c6a 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -159,8 +159,9 @@ DebuffSystem: { // Draedon Contact UI. Repeated newlines indicate pauses in Draedon's speaking. As a result, newline characters may be explicitly defined. // The code that interprets these strings will transform them. -CommunicationStart: ... -CommunicationStartRepeat: State your inquiry. +CommunicationStartInitial: ... +CommunicationStartNoForge: Craft something using my Forge, then return. +CommunicationStartNormal: State your inquiry. Communication: { WhoAreYou: { diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index 29d6133274..5c508b6d85 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -183,7 +183,15 @@ namespace CalamityMod.UI.DraedonSummoning /// /// The text Draedon starts off with when you interact with the codebreaker. The first time you see him he says nothing, but in successive calls he asks what your inquiry is. /// - public static string InquiryText => CalamityUtils.GetTextValue(Main.LocalPlayer.Calamity().HasTalkedAtCodebreaker ? "UI.CommunicationStartRepeat" : "UI.CommunicationStart"); + public static string InquiryText + { + get + { + var mp = Main.LocalPlayer.Calamity(); + string key = mp.HasTalkedAtCodebreaker ? (mp.HasCraftedDraedonsForge ? "UI.CommunicationStartNormal" : "UI.CommunicationStartNoForge") : "UI.CommunicationStartInitial"; + return CalamityUtils.GetTextValue(key); + } + } /// /// The text of the previously hovered topic option. This is used to ensure hover clicking sounds only play if the sound type changes. From 00ff97167ee2a7916659ff9dee0be99d232660f5 Mon Sep 17 00:00:00 2001 From: AquaSG Date: Fri, 10 May 2024 00:58:42 -0400 Subject: [PATCH 089/197] draedon yapping limit increased --- UI/DraedonSummoning/CodebreakerUI.Communication.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index 3323354a0b..cc1714ac74 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -581,7 +581,7 @@ namespace CalamityMod.UI.DraedonSummoning DialogSoundDelay = 4; } - else + else if (WrittenDraedonText.Length < FullDraedonText.Length - 1 && FullDraedonText[WrittenDraedonText.Length] == '\n') DialogOffYCache += panelScale.Y * 10f; } } @@ -615,7 +615,7 @@ namespace CalamityMod.UI.DraedonSummoning foreach (var entry in dialogEntries) { int lineIndex = 0; - foreach (string line in Utils.WordwrapString(entry.Dialog, DialogFont, 336, 100, out _)) + foreach (string line in Utils.WordwrapString(entry.Dialog, DialogFont, 336, 1000, out _)) { if (string.IsNullOrEmpty(line)) continue; From 2e27ebf52f536fe206ec5b95a3c43b4429a8dc1a Mon Sep 17 00:00:00 2001 From: AquaSG Date: Fri, 10 May 2024 09:37:03 -0400 Subject: [PATCH 090/197] scroll wheel support for draeting --- UI/DraedonSummoning/CodebreakerUI.Communication.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index dbaf034117..3e6f63c17c 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -5,11 +5,13 @@ using CalamityMod.NPCs.ExoMechs; using log4net; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; using ReLogic.Content; using ReLogic.Graphics; using Terraria; using Terraria.Audio; using Terraria.GameContent; +using Terraria.GameInput; using Terraria.Graphics.Shaders; using Terraria.ModLoader; using Terraria.UI.Chat; @@ -382,6 +384,8 @@ namespace CalamityMod.UI.DraedonSummoning float cutoffDistance = OptionsTextHeight / GeneralScale - selectionOutline.Height; if (cutoffDistance > 0f && OptionsTextOpacity > 0f) { + if (MouseScreenArea.Intersects(selectionArea)) + OptionsTextVerticalOffset += PlayerInput.ScrollWheelDeltaForUI * 0.1f; TopicOptionsScroller.PositionYInterpolant = MathHelper.Clamp(OptionsTextVerticalOffset / -cutoffDistance, 0f, 1f); TopicOptionsScroller.Draw(selectionArea.Top + GeneralScale * 62f, selectionArea.Bottom - GeneralScale * 62f, selectionArea.Right - GeneralScale * 12f, GeneralScale * 0.8f, OptionsTextOpacity); OptionsTextVerticalOffset = TopicOptionsScroller.PositionYInterpolant * -cutoffDistance; @@ -599,6 +603,8 @@ namespace CalamityMod.UI.DraedonSummoning float cutoffDistance = DialogHeight - dialogOutline.Height; if (cutoffDistance > 0f && OptionsTextOpacity > 0f) { + if (MouseScreenArea.Intersects(dialogArea)) + DialogVerticalOffset += PlayerInput.ScrollWheelDeltaForUI * 0.2f; DialogScroller.PositionYInterpolant = MathHelper.Clamp(DialogVerticalOffset / -cutoffDistance, 0f, 1f); DialogScroller.Draw(dialogArea.Top + GeneralScale * 66f, dialogArea.Bottom - GeneralScale * 66f, dialogArea.Right - GeneralScale * 12f, GeneralScale * 0.8f, OptionsTextOpacity); DialogVerticalOffset = DialogScroller.PositionYInterpolant * -cutoffDistance; From d540ad340dbe9c126be91abde1af67143fd4b26c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 May 2024 11:38:43 -0400 Subject: [PATCH 091/197] Removed configuration option and music mod reminder message. --- CalPlayer/CalamityPlayer.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 5 ----- CalamityConfig.cs | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 00d0ec34c4..2e69160705 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4866,7 +4866,7 @@ namespace CalamityMod.CalPlayer // Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display bool plushieMessage = true; - if (plushieMessage || (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) || CalamityConfig.Instance.WikiStatusMessage) + if (plushieMessage || CalamityConfig.Instance.WikiStatusMessage) { startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1); } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f421d2bacc..af23fad7f5 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -4165,11 +4165,6 @@ namespace CalamityMod.CalPlayer CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2"); } - if (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) - { - CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.MusicModReminder"); - } - // 04JAN2024: Ozzatron: Plushie message always appears. CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.GimmeSwagPlushieCampaign"); } diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 371af0690c..eedd4de7ed 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -66,10 +66,6 @@ namespace CalamityMod #region UI Changes [Header("UI")] - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - public bool MusicModReminderMessage { get; set; } - [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] public bool WikiStatusMessage { get; set; } From 589be1d1a7990f1c6ade145a76a9cde6292f4088 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 May 2024 11:52:13 -0400 Subject: [PATCH 092/197] Changed descriptions to indicate that music mod is mandatory --- description.txt | 4 ++-- description_workshop.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/description.txt b/description.txt index 85d9d9d4bc..e72ac9e99c 100644 --- a/description.txt +++ b/description.txt @@ -20,5 +20,5 @@ A more detailed breakdown of the content available in Calamity: - 450+ tweaks and improvements to vanilla items - Cross-mod support for the Thorium Mod -PLEASE NOTE THAT THIS MOD DOES NOT INCLUDE THE CALAMITY SOUNDTRACK. -You need to install the Calamity Music Mod if you want Calamity music. +PLEASE NOTE THAT THIS MOD REQUIRES THE CALAMITY MUSIC MOD. +You will need to install "Calamity Mod Music" from the Mod Browser or the Workshop. diff --git a/description_workshop.txt b/description_workshop.txt index 0c12ea169a..5841686264 100644 --- a/description_workshop.txt +++ b/description_workshop.txt @@ -13,7 +13,7 @@ The mod additionally tweaks tons of vanilla features whilst adding new ones to a [*] Dozens more quality of life and balance changes! [/olist] -[i]Please note that this mod does [b]NOT[/b] include Calamity's soundtrack! You will need to download the music mod for the full intended experience![/i] +[i]Please note that this mod [b]REQUIRES[/b] Calamity's soundtrack! You will need to download the music mod to be able to play![/i] https://steamcommunity.com/sharedfiles/filedetails/?id=2824688266 [b]Be sure to join our Discord server linked above to keep up with the latest news about upcoming updates and features.[/b] From 73cdbfb927a4c56a48e46f6ad363cb580e3158c3 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 May 2024 11:56:05 -0400 Subject: [PATCH 093/197] Version bump to 2.0.4.001 --- build.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.txt b/build.txt index e72a263356..f6d015e792 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 2.0.3.011 +version = 2.0.4.001 displayName = Calamity Mod modReferences = CalamityModMusic homepage = https://discord.gg/calamity From a9d7504fa8435139a7791a65e64876e4c2691937 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Fri, 10 May 2024 11:01:20 -0500 Subject: [PATCH 094/197] 1 - Desert Scourge done (for now). 2 - Anahita dust spam fix. 3 - Bloodletting Servant defense damage while charging. 4 - Sapphire and Emerald Jewel dust polish. --- NPCs/DesertScourge/DesertNuisanceBody.cs | 3 +- NPCs/DesertScourge/DesertNuisanceBodyYoung.cs | 3 +- NPCs/DesertScourge/DesertNuisanceHead.cs | 21 ++- NPCs/DesertScourge/DesertNuisanceHeadYoung.cs | 30 ++++- NPCs/DesertScourge/DesertNuisanceTail.cs | 3 +- NPCs/DesertScourge/DesertNuisanceTailYoung.cs | 3 +- NPCs/DesertScourge/DesertScourgeBody.cs | 18 ++- NPCs/DesertScourge/DesertScourgeHead.cs | 125 ++++++++++++++---- NPCs/DesertScourge/DesertScourgeTail.cs | 18 ++- NPCs/Leviathan/Anahita.cs | 2 +- NPCs/NormalNPCs/BloodlettingServant.cs | 1 + NPCs/NormalNPCs/KingSlimeJewel2.cs | 26 ++-- NPCs/NormalNPCs/KingSlimeJewel3.cs | 2 +- Projectiles/Boss/DesertScourgeSpit.cs | 1 - 14 files changed, 191 insertions(+), 65 deletions(-) diff --git a/NPCs/DesertScourge/DesertNuisanceBody.cs b/NPCs/DesertScourge/DesertNuisanceBody.cs index c4d0d59040..a37c59a5c8 100644 --- a/NPCs/DesertScourge/DesertNuisanceBody.cs +++ b/NPCs/DesertScourge/DesertNuisanceBody.cs @@ -217,8 +217,9 @@ namespace CalamityMod.NPCs.DesertScourge Main.getGoodWorld ? DesertNuisanceHead.SegmentVelocity_GoodWorld : masterMode ? DesertNuisanceHead.SegmentVelocity_Master : DesertNuisanceHead.SegmentVelocity_Expert; + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (masterMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs index 2094ce55fe..86b3514232 100644 --- a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs @@ -217,8 +217,9 @@ namespace CalamityMod.NPCs.DesertScourge Main.getGoodWorld ? DesertNuisanceHeadYoung.SegmentVelocity_GoodWorld : masterMode ? DesertNuisanceHeadYoung.SegmentVelocity_Master : DesertNuisanceHeadYoung.SegmentVelocity_Expert; + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (masterMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceHead.cs b/NPCs/DesertScourge/DesertNuisanceHead.cs index fc4b6f42e7..b6cdd5e965 100644 --- a/NPCs/DesertScourge/DesertNuisanceHead.cs +++ b/NPCs/DesertScourge/DesertNuisanceHead.cs @@ -19,10 +19,10 @@ namespace CalamityMod.NPCs.DesertScourge public bool flies = false; private bool tailSpawned = false; - public const float SegmentVelocity_Expert = 12f; - public const float SegmentVelocity_Master = 15f; - public const float SegmentVelocity_GoodWorld = 18f; - public const float SegmentVelocity_ZenithSeed = 21f; + public const float SegmentVelocity_Expert = 14f; + public const float SegmentVelocity_Master = 16.5f; + public const float SegmentVelocity_GoodWorld = 19f; + public const float SegmentVelocity_ZenithSeed = 21.5f; public const float OpenMouthForBiteDistance = 220f; @@ -115,7 +115,7 @@ namespace CalamityMod.NPCs.DesertScourge bool death = CalamityWorld.death || bossRush; // Become angry when the other Nuisance dies. - bool getMad = !NPC.AnyNPCs(ModContent.NPCType()) && expertMode; + bool getMad = (!NPC.AnyNPCs(ModContent.NPCType()) && revenge) || death; // Enrage if (!Main.player[NPC.target].ZoneDesert && !bossRush) @@ -140,6 +140,8 @@ namespace CalamityMod.NPCs.DesertScourge float speed = death ? 0.2f : 0.17f; float turnSpeed = death ? 0.3f : 0.25f; + speed += speed * 0.4f * (1f - lifeRatio); + turnSpeed += turnSpeed * 0.4f * (1f - lifeRatio); speed += 0.17f * enrageScale; turnSpeed += 0.25f * enrageScale; @@ -243,7 +245,7 @@ namespace CalamityMod.NPCs.DesertScourge { NPC.localAI[1] = 1f; Rectangle rectangle = new Rectangle((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height); - int directChaseDistance = 1000; + int directChaseDistance = revenge ? 500 : 1000; bool shouldDirectlyChase = true; if (NPC.position.Y > Main.player[NPC.target].position.Y) { @@ -276,8 +278,9 @@ namespace CalamityMod.NPCs.DesertScourge Main.getGoodWorld ? SegmentVelocity_GoodWorld : masterMode ? SegmentVelocity_Master : SegmentVelocity_Expert; + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (masterMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (Main.player[NPC.target].dead) { @@ -451,6 +454,10 @@ namespace CalamityMod.NPCs.DesertScourge } } + Vector2 destination = Main.player[NPC.target].Center; + if (NPC.Distance(destination) > 1000f) + NPC.velocity += (destination - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; + // Calculate contact damage based on velocity float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs index 00c006ffab..9a3e19a915 100644 --- a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Projectiles.Boss; using CalamityMod.World; @@ -20,10 +21,10 @@ namespace CalamityMod.NPCs.DesertScourge public bool flies = false; private bool tailSpawned = false; - public const float SegmentVelocity_Expert = 10f; - public const float SegmentVelocity_Master = 12.5f; - public const float SegmentVelocity_GoodWorld = 15f; - public const float SegmentVelocity_ZenithSeed = 17.5f; + public const float SegmentVelocity_Expert = 12f; + public const float SegmentVelocity_Master = 14f; + public const float SegmentVelocity_GoodWorld = 16f; + public const float SegmentVelocity_ZenithSeed = 18f; public const float SpitGateValue = 180f; @@ -110,7 +111,7 @@ namespace CalamityMod.NPCs.DesertScourge bool death = CalamityWorld.death || bossRush; // Become angry when the other Nuisance dies. - bool getMad = !NPC.AnyNPCs(ModContent.NPCType()) && expertMode; + bool getMad = (!NPC.AnyNPCs(ModContent.NPCType()) && revenge) || death; // Enrage if (!Main.player[NPC.target].ZoneDesert && !bossRush) @@ -135,6 +136,8 @@ namespace CalamityMod.NPCs.DesertScourge float speed = death ? 0.22f : 0.19f; float turnSpeed = death ? 0.32f : 0.27f; + speed += speed * 0.4f * (1f - lifeRatio); + turnSpeed += turnSpeed * 0.4f * (1f - lifeRatio); speed += 0.19f * enrageScale; turnSpeed += 0.27f * enrageScale; @@ -162,6 +165,7 @@ namespace CalamityMod.NPCs.DesertScourge if (NPC.Calamity().newAI[0] >= SpitGateValue) { NPC.Calamity().newAI[0] = 0f; + SoundEngine.PlaySound(SoundID.NPCDeath11, NPC.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * (revenge ? 10f : 8f); @@ -179,6 +183,13 @@ namespace CalamityMod.NPCs.DesertScourge for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); + + for (int k = 0; k < 10; k++) + { + int dust = Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, (int)CalamityDusts.SulphurousSeaAcid); + Main.dust[dust].velocity = perturbedSpeed; + } + if (Main.netMode != NetmodeID.MultiplayerClient) { int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer); @@ -274,7 +285,7 @@ namespace CalamityMod.NPCs.DesertScourge { NPC.localAI[1] = 1f; Rectangle rectangle = new Rectangle((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height); - int directChaseDistance = 1000; + int directChaseDistance = revenge ? 500 : 1000; bool shouldDirectlyChase = true; if (NPC.position.Y > Main.player[NPC.target].position.Y) { @@ -307,8 +318,9 @@ namespace CalamityMod.NPCs.DesertScourge Main.getGoodWorld ? SegmentVelocity_GoodWorld : masterMode ? SegmentVelocity_Master : SegmentVelocity_Expert; + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (masterMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (Main.player[NPC.target].dead) { @@ -482,6 +494,10 @@ namespace CalamityMod.NPCs.DesertScourge } } + Vector2 destination = Main.player[NPC.target].Center; + if (NPC.Distance(destination) > 1000f) + NPC.velocity += (destination - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; + // Calculate contact damage based on velocity float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceTail.cs b/NPCs/DesertScourge/DesertNuisanceTail.cs index f5ffaa7224..285b6f2806 100644 --- a/NPCs/DesertScourge/DesertNuisanceTail.cs +++ b/NPCs/DesertScourge/DesertNuisanceTail.cs @@ -146,8 +146,9 @@ namespace CalamityMod.NPCs.DesertScourge Main.getGoodWorld ? DesertNuisanceHead.SegmentVelocity_GoodWorld : masterMode ? DesertNuisanceHead.SegmentVelocity_Master : DesertNuisanceHead.SegmentVelocity_Expert; + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (masterMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceTailYoung.cs b/NPCs/DesertScourge/DesertNuisanceTailYoung.cs index 1f2e632dc6..df82733592 100644 --- a/NPCs/DesertScourge/DesertNuisanceTailYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceTailYoung.cs @@ -146,8 +146,9 @@ namespace CalamityMod.NPCs.DesertScourge Main.getGoodWorld ? DesertNuisanceHeadYoung.SegmentVelocity_GoodWorld : masterMode ? DesertNuisanceHeadYoung.SegmentVelocity_Master : DesertNuisanceHeadYoung.SegmentVelocity_Expert; + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (masterMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index c44d91cf26..628434af56 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -176,6 +176,9 @@ namespace CalamityMod.NPCs.DesertScourge // Percent life remaining float lifeRatio = NPC.life / (float)NPC.lifeMax; + // Phases + bool phase2 = lifeRatio < 0.5f; + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); @@ -210,7 +213,18 @@ namespace CalamityMod.NPCs.DesertScourge NPC.alpha = 0; } else + { NPC.alpha = Main.npc[(int)NPC.ai[1]].alpha; + if (NPC.alpha != 255 && NPC.dontTakeDamage) + { + for (int dustIndex = 0; dustIndex < 2; dustIndex++) + { + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 2f); + Main.dust[dust].noGravity = true; + Main.dust[dust].noLight = true; + } + } + } if (Main.player[NPC.target].dead) NPC.TargetClosest(false); @@ -230,7 +244,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.spriteDirection = (directionToNextSegment.X > 0).ToDirectionInt(); NPC head = Main.npc[(int)NPC.ai[2]]; - float burrowTimeGateValue = (CalamityWorld.death || BossRushEvent.BossRushActive) ? DesertScourgeHead.BurrowTimeGateValue_Death : DesertScourgeHead.BurrowTimeGateValue; + float burrowTimeGateValue = DesertScourgeHead.BurrowTimeGateValue; bool burrow = head.Calamity().newAI[0] >= burrowTimeGateValue; bool lungeUpward = burrow && head.Calamity().newAI[1] == 1f; bool quickFall = head.Calamity().newAI[1] == 2f; @@ -244,7 +258,7 @@ namespace CalamityMod.NPCs.DesertScourge if (burrow || lungeUpward) maxChaseSpeed *= 1.5f; if (expertMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index ab6c03fc94..c0aa4509c0 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -44,9 +44,11 @@ namespace CalamityMod.NPCs.DesertScourge public const float SegmentVelocity_GoodWorld = 21f; public const float SegmentVelocity_ZenithSeed = 24f; - public const float BurrowTimeGateValue = 720f; - public const float BurrowTimeGateValue_Death = 600f; - public const float BurrowResetTimeGateValue = 600f; + public const float SpitGateValue = 300f; + public const float SpitGateValue_Death = 180f; + + public const float BurrowTimeGateValue = 600f; + public const float BurrowResetTimeGateValue = BurrowTimeGateValue + 600f; public const float LungeUpwardDistanceOffset = 600f; public const float LungeUpwardCutoffDistance = 420f; @@ -165,7 +167,7 @@ namespace CalamityMod.NPCs.DesertScourge bool death = CalamityWorld.death || bossRush; // Check for Nuisances - bool hide = NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()); + bool hide = (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType())) && !masterMode; if (hide) { NPC.Calamity().newAI[0] = 0f; @@ -208,8 +210,11 @@ namespace CalamityMod.NPCs.DesertScourge // Percent life remaining. float lifeRatio = NPC.life / (float)NPC.lifeMax; + // Phases + bool phase2 = lifeRatio < 0.5f; + // Summon the Nuisances. - if (lifeRatio < 0.5f) + if (phase2 && expertMode) { if (NPC.localAI[2] == 0f) { @@ -219,16 +224,15 @@ namespace CalamityMod.NPCs.DesertScourge } } - // Only increment the burrow timer if the head is beneath the player. - if (NPC.Center.Y > Main.player[NPC.target].Center.Y) + // Only increment the burrow timer if the head is beneath the player, OR if the X distance is greater than a specified value. + if (NPC.Center.Y > Main.player[NPC.target].Center.Y || Math.Abs(NPC.Center.X - player.Center.X) > 480f) { if (revenge || lifeRatio < (expertMode ? 0.75f : 0.5f)) NPC.Calamity().newAI[0] += 1f; } - float burrowTimeGateValue = death ? BurrowTimeGateValue_Death : BurrowTimeGateValue; - bool burrow = NPC.Calamity().newAI[0] >= burrowTimeGateValue; - bool resetTime = NPC.Calamity().newAI[0] >= burrowTimeGateValue + BurrowResetTimeGateValue; + bool burrow = NPC.Calamity().newAI[0] >= BurrowTimeGateValue; + bool resetTime = NPC.Calamity().newAI[0] >= BurrowResetTimeGateValue; bool lungeUpward = burrow && NPC.Calamity().newAI[1] == 1f; bool quickFall = NPC.Calamity().newAI[1] == 2f; @@ -237,6 +241,12 @@ namespace CalamityMod.NPCs.DesertScourge float speed = death ? 0.18f : 0.15f; float turnSpeed = death ? 0.36f : 0.3f; + if (expertMode) + { + speed += speed * 0.2f * (1f - lifeRatio); + turnSpeed += turnSpeed * 0.2f * (1f - lifeRatio); + } + if (revenge) { speed += (death ? 0.06f : 0.05f) * (1f - lifeRatio); @@ -252,6 +262,47 @@ namespace CalamityMod.NPCs.DesertScourge turnSpeed *= 1.2f; } + // Projectile spit (unused, for now) + /*if ((phase2 || death) && revenge && NPC.Distance(Main.player[NPC.target].Center) > 400f && (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) + { + if (NPC.Calamity().newAI[0] % (death ? SpitGateValue_Death : SpitGateValue) == 0f) + { + SoundEngine.PlaySound(SoundID.NPCDeath11, NPC.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * (masterMode ? 10f : 8f); + int numProj = death ? 9 : 6; + int spread = masterMode ? 49 : 35; + if (masterMode) + { + numProj += 3; + spread += 14; + } + + float rotation = MathHelper.ToRadians(spread); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); + + for (int k = 0; k < 10; k++) + { + int dust = Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, (int)CalamityDusts.SulphurousSeaAcid); + Main.dust[dust].velocity = perturbedSpeed; + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer); + Main.projectile[proj].aiStyle = -1; + Main.projectile[proj].netUpdate = true; + } + } + } + } + }*/ + // Sand splash if (!quickFall) { @@ -300,7 +351,7 @@ namespace CalamityMod.NPCs.DesertScourge { if (NPC.localAI[3] == 0f) { - Point headTileCenter = NPC.Bottom.ToTileCoordinates(); + Point headTileCenter = NPC.Center.ToTileCoordinates(); Tile tileSafely = Framing.GetTileSafely(headTileCenter); bool inSolidTile = tileSafely.HasUnactuatedTile; if (inSolidTile && Collision.CanHit(NPC.Top, 1, 1, player.Center, 1, 1)) @@ -338,7 +389,7 @@ namespace CalamityMod.NPCs.DesertScourge } } - if (lungeUpward || burrow || hide) + if (lungeUpward || burrow) { speed *= 1.5f; turnSpeed *= 1.5f; @@ -354,7 +405,18 @@ namespace CalamityMod.NPCs.DesertScourge { NPC.alpha += 3; if (NPC.alpha > 255) + { NPC.alpha = 255; + } + else + { + for (int dustIndex = 0; dustIndex < 2; dustIndex++) + { + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 2f); + Main.dust[dust].noGravity = true; + Main.dust[dust].noLight = true; + } + } } else { @@ -431,7 +493,7 @@ namespace CalamityMod.NPCs.DesertScourge if (tileWidthPosY > Main.maxTilesY) tileWidthPosY = Main.maxTilesY; - bool shouldFly = lungeUpward || hide; + bool shouldFly = lungeUpward; if (!shouldFly) { for (int k = tilePositionX; k < tileWidthPosX; k++) @@ -457,7 +519,7 @@ namespace CalamityMod.NPCs.DesertScourge { NPC.localAI[1] = 1f; Rectangle rectangle = new Rectangle((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height); - int directChaseDistance = 1000; + int directChaseDistance = expertMode ? 800 : 1000; if (enrageScale > 0f) directChaseDistance = 100; @@ -498,10 +560,10 @@ namespace CalamityMod.NPCs.DesertScourge masterMode ? SegmentVelocity_Master : expertMode ? SegmentVelocity_Expert : SegmentVelocity_Normal; - if (burrow || lungeUpward || hide) + if (burrow || lungeUpward) maxChaseSpeed *= 1.5f; if (expertMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); if (player.dead) { @@ -527,7 +589,7 @@ namespace CalamityMod.NPCs.DesertScourge float lungeTarget = NPC.Calamity().newAI[3]; Vector2 npcCenter = NPC.Center; float playerX = player.Center.X; - float targettingPosition = lungeUpward ? lungeTarget : (burrow || hide) ? burrowTarget : player.Center.Y; + float targettingPosition = lungeUpward ? lungeTarget : burrow ? burrowTarget : player.Center.Y; playerX = (float)((int)(playerX / 16f) * 16); targettingPosition = (float)((int)(targettingPosition / 16f) * 16); npcCenter.X = (float)((int)(npcCenter.X / 16f) * 16); @@ -553,11 +615,11 @@ namespace CalamityMod.NPCs.DesertScourge { // Spit a huge spread of sand upwards that falls down SoundEngine.PlaySound(SoundID.NPCDeath13, NPC.Center); - float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 16f : bossRush ? 9f : death ? 7f : 6f; + float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 16f : bossRush ? 10f : death ? 8.5f : revenge ? 8f : expertMode ? 7.5f : 6f; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - Vector2 projectileVelocity = Vector2.Normalize(NPC.Center + NPC.velocity * 10f - NPC.Center) * velocity; - int numProj = bossRush ? 30 : death ? 24 : revenge ? 20 : expertMode ? 16 : 12; + Vector2 projectileVelocity = (NPC.Center + NPC.velocity * 10f - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity; + int numProj = bossRush ? 30 : death ? 24 : revenge ? 21 : expertMode ? 18 : 12; if (Main.getGoodWorld) numProj *= 2; @@ -568,7 +630,10 @@ namespace CalamityMod.NPCs.DesertScourge Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); for (int k = 0; k < 10; k++) - Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, (int)CalamityDusts.SulphurousSeaAcid, perturbedSpeed.X, perturbedSpeed.Y); + { + int dust = Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, (int)CalamityDusts.SulphurousSeaAcid); + Main.dust[dust].velocity = perturbedSpeed; + } if (Main.netMode != NetmodeID.MultiplayerClient) Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer); @@ -602,7 +667,11 @@ namespace CalamityMod.NPCs.DesertScourge NPC.localAI[3] = 0f; } - if (!shouldFly) + if (hide && !player.dead) + { + NPC.SimpleFlyMovement((new Vector2(player.Center.X, burrowTarget) - NPC.Center).SafeNormalize(Vector2.UnitY) * maxChaseSpeed, turnSpeed); + } + else if (!shouldFly) { NPC.TargetClosest(); NPC.velocity.Y += 0.15f; @@ -737,10 +806,11 @@ namespace CalamityMod.NPCs.DesertScourge } } - if (!burrow && !quickFall && !hide) + if ((!burrow || lungeUpward) && !quickFall && !hide) { - if (NPC.Distance(player.Center) > 2000f) - NPC.velocity += (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; + Vector2 destination = lungeUpward ? new Vector2(player.Center.X, lungeTarget) : player.Center; + if (NPC.Distance(destination) > (lungeUpward ? 1000f : 2000f)) + NPC.velocity += (destination - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; } // Calculate contact damage based on velocity @@ -784,6 +854,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.netUpdate = true; } + public override bool CheckActive() => false; + public override bool CanHitPlayer(Player target, ref int cooldownSlot) { Rectangle targetHitbox = target.Hitbox; @@ -808,8 +880,7 @@ namespace CalamityMod.NPCs.DesertScourge { // Open mouth to prepare for a nibble ;3 // Also open mouth if about to spit a projectile spread - float burrowTimeGateValue = (CalamityWorld.death || BossRushEvent.BossRushActive) ? BurrowTimeGateValue_Death : BurrowTimeGateValue; - bool burrow = NPC.Calamity().newAI[0] >= burrowTimeGateValue; + bool burrow = NPC.Calamity().newAI[0] >= BurrowTimeGateValue; bool lungeUpward = burrow && NPC.Calamity().newAI[1] == 1f; bool aboutToSpitSpread = lungeUpward && NPC.Center.Y <= NPC.Calamity().newAI[3] + LungeUpwardDistanceOffset - LungeUpwardCutoffDistance * 0.25f; diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index a9fcfafe36..abf6aca169 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -85,6 +85,9 @@ namespace CalamityMod.NPCs.DesertScourge // Percent life remaining float lifeRatio = NPC.life / (float)NPC.lifeMax; + // Phases + bool phase2 = lifeRatio < 0.5f; + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); @@ -119,7 +122,18 @@ namespace CalamityMod.NPCs.DesertScourge NPC.alpha = 0; } else + { NPC.alpha = Main.npc[(int)NPC.ai[1]].alpha; + if (NPC.alpha != 255 && NPC.dontTakeDamage) + { + for (int dustIndex = 0; dustIndex < 2; dustIndex++) + { + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 2f); + Main.dust[dust].noGravity = true; + Main.dust[dust].noLight = true; + } + } + } if (Main.player[NPC.target].dead) NPC.TargetClosest(false); @@ -163,7 +177,7 @@ namespace CalamityMod.NPCs.DesertScourge } NPC head = Main.npc[(int)NPC.ai[2]]; - float burrowTimeGateValue = (CalamityWorld.death || BossRushEvent.BossRushActive) ? DesertScourgeHead.BurrowTimeGateValue_Death : DesertScourgeHead.BurrowTimeGateValue; + float burrowTimeGateValue = DesertScourgeHead.BurrowTimeGateValue; bool burrow = head.Calamity().newAI[0] >= burrowTimeGateValue; bool lungeUpward = burrow && head.Calamity().newAI[1] == 1f; bool quickFall = head.Calamity().newAI[1] == 2f; @@ -177,7 +191,7 @@ namespace CalamityMod.NPCs.DesertScourge if (burrow || lungeUpward) maxChaseSpeed *= 1.5f; if (expertMode) - maxChaseSpeed += maxChaseSpeed * 0.5f * (1f - lifeRatio); + maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); float minimalContactDamageVelocity = maxChaseSpeed * 0.25f; float minimalDamageVelocity = maxChaseSpeed * 0.5f; diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index b9f23d68ed..84462774fc 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -324,7 +324,7 @@ namespace CalamityMod.NPCs.Leviathan { NPC.alpha = 255; } - else + else if (NPC.alpha < 255) { for (int k = 0; k < 3; k++) { diff --git a/NPCs/NormalNPCs/BloodlettingServant.cs b/NPCs/NormalNPCs/BloodlettingServant.cs index 522b8b7b69..3ec7e710f1 100644 --- a/NPCs/NormalNPCs/BloodlettingServant.cs +++ b/NPCs/NormalNPCs/BloodlettingServant.cs @@ -92,6 +92,7 @@ namespace CalamityMod.NPCs.NormalNPCs Vector2 lookAt = target.Center - NPC.Center; float rateOfRotation = charging ? 0f : 0.1f; float chargeDuration = CalamityWorld.death ? ChargeDuration_Death : ChargeDuration; + NPC.Calamity().canBreakPlayerDefense = charging; if (charging) { if (NPC.ai[1] == 0f) diff --git a/NPCs/NormalNPCs/KingSlimeJewel2.cs b/NPCs/NormalNPCs/KingSlimeJewel2.cs index 32d5cacb53..d18df61e1d 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel2.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel2.cs @@ -121,19 +121,6 @@ namespace CalamityMod.NPCs.NormalNPCs SoundEngine.PlaySound(SoundID.Item8, NPC.Center); - for (int dusty = 0; dusty < 10; dusty++) - { - Vector2 dustVel = Main.rand.NextVector2CircularEdge(5f, 5f); - int sapphire = Dust.NewDust(NPC.Center, NPC.width, NPC.height, DustID.GemSapphire, 0f, 0f, 100, default, 2f); - Main.dust[sapphire].velocity = dustVel * Main.rand.NextFloat(1f, 2f); - Main.dust[sapphire].noGravity = true; - if (Main.rand.NextBool()) - { - Main.dust[sapphire].scale = 0.5f; - Main.dust[sapphire].fadeIn = 1f + Main.rand.Next(10) * 0.1f; - } - } - int distanceFromKingSlime = 1; Vector2 kingSlimeCenter = NPC.Center; for (int i = 0; i < Main.maxNPCs; i++) @@ -146,6 +133,19 @@ namespace CalamityMod.NPCs.NormalNPCs } } + for (int dusty = 0; dusty < 10; dusty++) + { + Vector2 dustVel = (kingSlimeCenter - NPC.Center).SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(2f, 4f); + int sapphire = Dust.NewDust(NPC.Center, NPC.width, NPC.height, DustID.GemSapphire, 0f, 0f, 100, default, 2f); + Main.dust[sapphire].velocity = dustVel * Main.rand.NextFloat(1f, 2f); + Main.dust[sapphire].noGravity = true; + if (Main.rand.NextBool()) + { + Main.dust[sapphire].scale = 0.5f; + Main.dust[sapphire].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + } + } + int maxDustIterations = distanceFromKingSlime; int maxDust = 100; int dustDivisor = maxDustIterations / maxDust; diff --git a/NPCs/NormalNPCs/KingSlimeJewel3.cs b/NPCs/NormalNPCs/KingSlimeJewel3.cs index df9125952b..91668e6b70 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel3.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel3.cs @@ -85,7 +85,7 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int dusty = 0; dusty < 10; dusty++) { - Vector2 dustVel = Main.rand.NextVector2CircularEdge(5f, 5f); + Vector2 dustVel = NPC.SafeDirectionTo(Main.player[NPC.target].Center + Main.player[NPC.target].velocity * 20f, -Vector2.UnitY) * Main.rand.NextFloat(-4f, -1f); int emerald = Dust.NewDust(NPC.Center, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f); Main.dust[emerald].velocity = dustVel * Main.rand.NextFloat(1f, 2f); Main.dust[emerald].noGravity = true; diff --git a/Projectiles/Boss/DesertScourgeSpit.cs b/Projectiles/Boss/DesertScourgeSpit.cs index a73e39caac..66d6e6d8e8 100644 --- a/Projectiles/Boss/DesertScourgeSpit.cs +++ b/Projectiles/Boss/DesertScourgeSpit.cs @@ -89,7 +89,6 @@ namespace CalamityMod.Projectiles.Boss Main.dust[killSand].noLight = true; Main.dust[killSand].velocity = dustDirection * 0.5f; } - Projectile.Damage(); } public override void OnHitPlayer(Player target, Player.HurtInfo info) From 5539c49fd1cf0ac430d7f78bf19d253ac57c2a3a Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Fri, 10 May 2024 13:27:24 -0700 Subject: [PATCH 095/197] polterplasm my b --- Items/Materials/Necroplasm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Materials/Necroplasm.cs b/Items/Materials/Necroplasm.cs index 95dceb3057..4a64871a61 100644 --- a/Items/Materials/Necroplasm.cs +++ b/Items/Materials/Necroplasm.cs @@ -6,7 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Materials { - [LegacyName("Phantoplasm")] + [LegacyName("Phantoplasm", "Polterplasm")] public class Necroplasm : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Materials"; From 1a14ef72995ca63c4a062691d78741ec313a1083 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 10 May 2024 16:29:09 -0400 Subject: [PATCH 096/197] Necroplasmic Dye too --- Items/Dyes/NecroplasmicDye.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Dyes/NecroplasmicDye.cs b/Items/Dyes/NecroplasmicDye.cs index 7591885281..8c9c1dd00d 100644 --- a/Items/Dyes/NecroplasmicDye.cs +++ b/Items/Dyes/NecroplasmicDye.cs @@ -9,7 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Dyes { - [LegacyName("PhantoplasmDye")] + [LegacyName("PhantoplasmDye", "PolterplasmDye")] public class NecroplasmicDye : BaseDye { public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request("Effects/Dyes/NecroplasmicDyeShader"), "DyePass"). From ceeeade57c0ebfc97fb65929449c76abcf3b7a46 Mon Sep 17 00:00:00 2001 From: AquaSG Date: Sat, 11 May 2024 00:46:47 -0400 Subject: [PATCH 097/197] slight draeting fix? --- Localization/en-US/Mods.CalamityMod.UI.hjson | 4 ++-- UI/DraedonSummoning/CodebreakerUI.Communication.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index ede9fc3c6a..87f29c96e3 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -251,7 +251,7 @@ Communication: { I forged its armor using a process inspired by how Silva created Braelor's axe: by using particle jets to slowly and carefully fuse many elements together into a nanocomposite, the invincible armor organically "grows" over Thanatos' structure like a chrysalis. Regrettably, the plating's immense weight makes Thanatos notably slower than its siblings.\n When designing the third, Apollo, my goal was to downscale significantly; to make something powerful, yet compact. Reviewing the most compact forms of destructive potential I knew, I elected to simulate the Witch's flames.\n - + Apollo's searing exoplasma is fueled by unstable nanomachines that constantly shed a deluge of ultra high energy particles. This both heats the plasma to incredible temperatures and causes radiation burns of a severity on par with those inflicted by the Witch. The craft had little capability beyond its nanomachine plasma projector, but there was no worry. Apollo was never meant to fight alone.\n The final to begin construction was Artemis. Rather than being founded on raw power, it was made to be the apex of speed and accuracy. There is elegance in simplicity, for all of Artemis' combat efficacy comes from an onboard predictive AI and a battery of hard-light bolt emitters.\n @@ -337,7 +337,7 @@ Communication: { Even if I dared to evoke Yharim's wrath, I cannot survey the Aerie. My attempts at locating it have been fruitless despite having surveyed this world's surface and skies many times over. Perhaps it avoids observation, as per some manner of cloaking. It is also possible it simply exists outside of conventional space, in a pocket dimension of sorts. Either case would make detecting it via my current methods drastically more difficult.\n What I do know is that the Dragon Aerie is an unusually large sky island that acted as the sacred home of the Auric dragons. Few others were ever allowed to tread there, as a sort of religious sanctuary or holy ground.\n - + It is also where Auric dragons would be laid to rest in preparation for their revival by Yharon. As their revival on the Aerie was a commonly accepted fact even at the start of recorded history, the sky island must be at least 2,000 years old, with Yharon himself being a similar age.\n Considering the extraordinary power of the Auric dragons and the sanctity of the Dragon Aerie, I am left to ponder: did the Aerie make the Auric dragons powerful, or is the Aerie inundated with power due to their extended presence? Perhaps more importantly, what made them leave the safety of the Aerie even as their kind were being slain? I eagerly await the uncovering of such mysteries. diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index 3e6f63c17c..5224045c0d 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -571,6 +571,8 @@ namespace CalamityMod.UI.DraedonSummoning { DialogVerticalOffset -= LatestDialogHeightIncrease; DialogVerticalOffset += DialogOffYCache; + DialogHeight -= DialogOffYCache; + DialogOffYCache = 0; } // Move to the next index in the dialog history once Draedon is finished speaking. From 4aecf227aaab3f0b21e21570fb57d0a05d330862 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 11 May 2024 00:55:41 -0400 Subject: [PATCH 098/197] Reduced how much Elemental Lance splits --- Projectiles/Melee/SpatialSpear.cs | 4 ++-- Projectiles/Melee/SpatialSpear2.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Melee/SpatialSpear.cs b/Projectiles/Melee/SpatialSpear.cs index 0d3f9d7f29..8d06a0e6d5 100644 --- a/Projectiles/Melee/SpatialSpear.cs +++ b/Projectiles/Melee/SpatialSpear.cs @@ -13,11 +13,11 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; - private const int TimeLeft = 300; + private const int TimeLeft = 180; private const int TimeToFall = TimeLeft / 2; - private const int TotalSplits = 30; + private const int TotalSplits = 6; private const int SplitTime = TimeLeft / TotalSplits; diff --git a/Projectiles/Melee/SpatialSpear2.cs b/Projectiles/Melee/SpatialSpear2.cs index 013bdb2914..bcf1a5c36b 100644 --- a/Projectiles/Melee/SpatialSpear2.cs +++ b/Projectiles/Melee/SpatialSpear2.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Melee private const int TimeToFall = TimeLeft / 2; - private const int TotalSplits = 4; + private const int TotalSplits = 3; private const int SplitTime = TimeLeft / TotalSplits; From 1166e81a92b9164ec25e17d5c89aceed8f29f900 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 11 May 2024 02:39:55 -0400 Subject: [PATCH 099/197] Several Boss Rush changes: * Fixed first-time end dialogue not playing because the event got ended on it * Decreased Tier 4 & 5 between-boss delay from 6 seconds to 4 * Decreased delay of all dialogues by 0.5 seconds --- Events/BossRushEvent.cs | 2 +- .../Typeless/BossRushEndEffectThing.cs | 9 ++- Systems/BossRushDialogueSystem.cs | 77 ++++++++++--------- 3 files changed, 50 insertions(+), 38 deletions(-) diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 212fab1226..628a809bcf 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -593,7 +593,7 @@ namespace CalamityMod.Events // Increase cooldown post-Moon Lord. if (BossRushStage >= Bosses.FindIndex(boss => boss.EntityID == NPCID.MoonLordCore)) - BossRushSpawnCountdown += 300; + BossRushSpawnCountdown += 180; // Override the spawn countdown if specified. if (BossRushStage < Bosses.Count - 1 && Bosses[BossRushStage + 1].SpecialSpawnCountdown != -1) diff --git a/Projectiles/Typeless/BossRushEndEffectThing.cs b/Projectiles/Typeless/BossRushEndEffectThing.cs index 06c25dedcc..b45a3230c2 100644 --- a/Projectiles/Typeless/BossRushEndEffectThing.cs +++ b/Projectiles/Typeless/BossRushEndEffectThing.cs @@ -1,5 +1,6 @@ using CalamityMod.Events; using CalamityMod.Items; +using CalamityMod.Systems; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -35,10 +36,16 @@ namespace CalamityMod.Projectiles.Typeless BossRushEvent.SyncEndTimer((int)Time); float currentShakePower = MathHelper.Lerp(1f, 20f, Utils.GetLerpValue(140f, 180f, Time, true) * Utils.GetLerpValue(10f, 40f, Projectile.timeLeft, true)); - Main.LocalPlayer.Calamity().GeneralScreenShakePower = currentShakePower; + if (Projectile.timeLeft > 5) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = currentShakePower; MoonlordDeathDrama.RequestLight(Utils.GetLerpValue(220f, 265f, Time, true) * Utils.GetLerpValue(10f, 30f, Projectile.timeLeft, true), Main.LocalPlayer.Center); + // Bit of an ugly solution, but this code prevents the end effect projectile from despawning while the end dialogue is playing. + // This fixes a bug where the first-time end dialogue did not play as intended. + if (Projectile.timeLeft < 5 && BossRushDialogueSystem.CurrentDialogueDelay != 0) + Projectile.timeLeft = 5; + Time++; } diff --git a/Systems/BossRushDialogueSystem.cs b/Systems/BossRushDialogueSystem.cs index 71dbd2a52b..518221d65e 100644 --- a/Systems/BossRushDialogueSystem.cs +++ b/Systems/BossRushDialogueSystem.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Systems public static BossRushDialoguePhase Phase = BossRushDialoguePhase.None; private static BossRushDialogueEvent[] currentSequence = null; - private static int currentSequenceIndex = 0; + public static int currentSequenceIndex = 0; public static int CurrentDialogueDelay = 0; @@ -59,80 +59,81 @@ namespace CalamityMod.Systems { // // Dialogue times were timed by Ozzatron reading them aloud with a stopwatch. + // CIT 11MAY2024: I decided to decrease all of these dialogue delays by 30 frames, in an attempt to cut down on unnecessary waiting around. // // Dialogue that occurs the first time you start Boss Rush BossRushDialogueEvent[] startDialogues = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushStartText_1", 360), - new("Mods.CalamityMod.Events.BossRushStartText_2", 435), - new("Mods.CalamityMod.Events.BossRushStartText_3", 240), - new("Mods.CalamityMod.Events.BossRushStartText_4", 435), - new("Mods.CalamityMod.Events.BossRushStartText_5", 480), - new("Mods.CalamityMod.Events.BossRushStartText_6", 270), - new("Mods.CalamityMod.Events.BossRushStartText_7", 465), - new("Mods.CalamityMod.Events.BossRushStartText_8", 480), - new("Mods.CalamityMod.Events.BossRushStartText_9", 330), - new("Mods.CalamityMod.Events.BossRushStartText_DoG", 180, skipFunc: () => !DownedBossSystem.downedDoG), - new("Mods.CalamityMod.Events.BossRushStartText_Yharon", 240, skipFunc: () => !DownedBossSystem.downedYharon), - new("Mods.CalamityMod.Events.BossRushStartText_DraedonSCal", 315, skipFunc: () => !DownedBossSystem.downedExoMechs || !DownedBossSystem.downedCalamitas), - new("Mods.CalamityMod.Events.BossRushStartText_10", 420), - new("Mods.CalamityMod.Events.BossRushStartText_11", 420), - new("Mods.CalamityMod.Events.BossRushStartText_12", 270), + new("Mods.CalamityMod.Events.BossRushStartText_1", 330), + new("Mods.CalamityMod.Events.BossRushStartText_2", 405), + new("Mods.CalamityMod.Events.BossRushStartText_3", 210), + new("Mods.CalamityMod.Events.BossRushStartText_4", 405), + new("Mods.CalamityMod.Events.BossRushStartText_5", 450), + new("Mods.CalamityMod.Events.BossRushStartText_6", 240), + new("Mods.CalamityMod.Events.BossRushStartText_7", 435), + new("Mods.CalamityMod.Events.BossRushStartText_8", 450), + new("Mods.CalamityMod.Events.BossRushStartText_9", 300), + new("Mods.CalamityMod.Events.BossRushStartText_DoG", 150, skipFunc: () => !DownedBossSystem.downedDoG), + new("Mods.CalamityMod.Events.BossRushStartText_Yharon", 210, skipFunc: () => !DownedBossSystem.downedYharon), + new("Mods.CalamityMod.Events.BossRushStartText_DraedonSCal", 285, skipFunc: () => !DownedBossSystem.downedExoMechs || !DownedBossSystem.downedCalamitas), + new("Mods.CalamityMod.Events.BossRushStartText_10", 390), + new("Mods.CalamityMod.Events.BossRushStartText_11", 390), + new("Mods.CalamityMod.Events.BossRushStartText_12", 240), }; // Dialogue that occurs when starting Boss Rush on repeat attempts BossRushDialogueEvent[] startDialoguesShort = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushStartText_Repeat", 120), + new("Mods.CalamityMod.Events.BossRushStartText_Repeat", 90), }; // Dialogue that occurs when beating Tier 1 of Boss Rush BossRushDialogueEvent[] tierOneDialogues = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushTierOneEndText_1", 360), - new("Mods.CalamityMod.Events.BossRushTierOneEndText_2", 255), + new("Mods.CalamityMod.Events.BossRushTierOneEndText_1", 330), + new("Mods.CalamityMod.Events.BossRushTierOneEndText_2", 225), }; // Dialogue that occurs when beating Tier 2 of Boss Rush BossRushDialogueEvent[] tierTwoDialogues = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushTierTwoEndText_1", 255), - new("Mods.CalamityMod.Events.BossRushTierTwoEndText_2", 300), + new("Mods.CalamityMod.Events.BossRushTierTwoEndText_1", 225), + new("Mods.CalamityMod.Events.BossRushTierTwoEndText_2", 270), }; // Dialogue that occurs when beating Tier 3 of Boss Rush BossRushDialogueEvent[] tierThreeDialogues = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushTierThreeEndText_1", 465), - new("Mods.CalamityMod.Events.BossRushTierThreeEndText_2", 330), + new("Mods.CalamityMod.Events.BossRushTierThreeEndText_1", 435), + new("Mods.CalamityMod.Events.BossRushTierThreeEndText_2", 300), }; // Dialogue that occurs when beating Tier 4 of Boss Rush BossRushDialogueEvent[] tierFourDialogues = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushTierFourEndText_1", 165), - new("Mods.CalamityMod.Events.BossRushTierFourEndText_2", 330), - new("Mods.CalamityMod.Events.BossRushTierFourEndText_3", 300), + new("Mods.CalamityMod.Events.BossRushTierFourEndText_1", 135), + new("Mods.CalamityMod.Events.BossRushTierFourEndText_2", 300), + new("Mods.CalamityMod.Events.BossRushTierFourEndText_3", 270), }; // Dialogue that occurs the first time you beat Boss Rush BossRushDialogueEvent[] endDialogues = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushEndText_1", 540), - new("Mods.CalamityMod.Events.BossRushEndText_2", 465), - new("Mods.CalamityMod.Events.BossRushEndText_3", 360), - new("Mods.CalamityMod.Events.BossRushEndText_4", 285), - new("Mods.CalamityMod.Events.BossRushEndText_5", 420), - new("Mods.CalamityMod.Events.BossRushEndText_6", 420), - new("Mods.CalamityMod.Events.BossRushEndText_7", 225), - new("Mods.CalamityMod.Events.BossRushEndText_8", 135), + new("Mods.CalamityMod.Events.BossRushEndText_1", 510), + new("Mods.CalamityMod.Events.BossRushEndText_2", 435), + new("Mods.CalamityMod.Events.BossRushEndText_3", 330), + new("Mods.CalamityMod.Events.BossRushEndText_4", 255), + new("Mods.CalamityMod.Events.BossRushEndText_5", 390), + new("Mods.CalamityMod.Events.BossRushEndText_6", 390), + new("Mods.CalamityMod.Events.BossRushEndText_7", 195), + new("Mods.CalamityMod.Events.BossRushEndText_8", 105), }; - // Dialogue that occurs the first time you beat Boss Rush + // Dialogue that occurs on subsequent times you beat Boss Rush BossRushDialogueEvent[] endDialoguesShort = new BossRushDialogueEvent[] { - new("Mods.CalamityMod.Events.BossRushEndText_Repeat", 510), + new("Mods.CalamityMod.Events.BossRushEndText_Repeat", 480), }; BossRushDialogue = new Dictionary() @@ -207,6 +208,10 @@ namespace CalamityMod.Systems if (GottaGoFast && CurrentDialogueDelay > GottaGoFastSpeed) CurrentDialogueDelay = GottaGoFastSpeed; } + else + { + CurrentDialogueDelay = 0; + } // If the end of a sequence has been reached, stay in this state indefinitely. // Allow the boss spawn countdown to hit zero and the next boss to appear without showing any dialogue or causing any delays. From 31b16d30a2b182f64165f74b8c1b6ec088a1cefc Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 11 May 2024 02:09:28 -0700 Subject: [PATCH 100/197] Norfleet Says No --- CalPlayer/CalamityPlayer.cs | 1 + CalPlayer/CalamityPlayerHitHurt.cs | 2 ++ Items/Weapons/Ranged/Norfleet.cs | 14 +++++++++++- Projectiles/Ranged/NorfleetCannon.cs | 27 ++++++++++++++++-------- Projectiles/Ranged/NorfleetComet.cs | 26 +++++++++++++++++++++-- Projectiles/Ranged/NorfleetExplosion.cs | 8 +++++-- Sounds/Item/NuhUhUh.ogg | Bin 0 -> 77977 bytes 7 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 Sounds/Item/NuhUhUh.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2e69160705..24a84b1926 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -190,6 +190,7 @@ namespace CalamityMod.CalPlayer public int PHAThammer = 0; public int StellarHammer = 0; public int GalaxyHammer = 0; + public int NorfleetCounter = 0; public int hideOfDeusMeleeBoostTimer = 0; public int alcoholPoisonLevel = 0; public int modStealthTimer; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 975677a7ba..468f6701bd 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -490,6 +490,8 @@ namespace CalamityMod.CalPlayer if (Main.zenithWorld) SoundEngine.PlaySound(LeonDeathNoiseRE4_ForGFB, Player.Center); + NorfleetCounter = 0; + if (NPC.AnyNPCs(ModContent.NPCType())) { if (sCalDeathCount < 51) diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index 80cfc81ac5..9521be1ca9 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -2,6 +2,7 @@ using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -45,14 +46,25 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, loadedShots); + if (player.Calamity().NorfleetCounter >= 3) + { + SoundStyle fire = new("CalamityMod/Sounds/Item/NuhUhUh"); + SoundEngine.PlaySound(fire, player.Center); + } + + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, (player.Calamity().NorfleetCounter >= 3 ? 1000 : 0), loadedShots); // We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out. holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); + player.Calamity().NorfleetCounter++; loadedShots--; + if (loadedShots <= 0) + { loadedShots = 3; + player.Calamity().NorfleetCounter = 0; + } return false; } } diff --git a/Projectiles/Ranged/NorfleetCannon.cs b/Projectiles/Ranged/NorfleetCannon.cs index 82638e84c5..503d3cbffb 100644 --- a/Projectiles/Ranged/NorfleetCannon.cs +++ b/Projectiles/Ranged/NorfleetCannon.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Ranged public Color mainColor = Color.White; public Color randomColor = Color.White; public int colorTimer = 0; + public bool PUNISHMENTMODE = false; public override void SetDefaults() { @@ -50,7 +51,10 @@ namespace CalamityMod.Projectiles.Ranged { Item heldItem = Owner.ActiveItem(); - randomColor = Main.rand.Next(3) switch + if (Owner.dead || Owner is null) + Projectile.Kill(); + + randomColor = Main.rand.Next(3) switch { 0 => Color.OrangeRed, 1 => Color.Aqua, @@ -59,6 +63,8 @@ namespace CalamityMod.Projectiles.Ranged if (mainColor == Color.White) { mainColor = randomColor; + if (Projectile.ai[1] == 1000) + PUNISHMENTMODE = true; } if (ShootingTimer % 15 == 0) @@ -86,16 +92,16 @@ namespace CalamityMod.Projectiles.Ranged if (loadedShots > 1) { ShootRocket(heldItem); - PostFireCooldown = 55; + PostFireCooldown = PUNISHMENTMODE ? 1000 : 55; ShootingTimer = 1; - mainColor = Color.MediumOrchid; + mainColor = PUNISHMENTMODE ? Color.Red : Color.MediumOrchid; } else { ShootRocket(heldItem); - PostFireCooldown = 262; + PostFireCooldown = PUNISHMENTMODE ? 1000 : 262; ShootingTimer = 1; - mainColor = Color.MediumOrchid; + mainColor = PUNISHMENTMODE ? Color.Red : Color.MediumOrchid; } @@ -183,7 +189,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 3; i++) { Vector2 firingVelocity = shootDirection.RotatedByRandom((0.2f * i) + 0.02f) * 5f * Main.rand.NextFloat(0.7f, 1.3f); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, i); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, i, PUNISHMENTMODE ? 1 : 0); } NetUpdate(); @@ -218,6 +224,9 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 73f; + if (PUNISHMENTMODE) + PostFireCooldown = 1000; + if (PostFireCooldown == 207) { OffsetLength -= 24f; @@ -228,12 +237,12 @@ namespace CalamityMod.Projectiles.Ranged if (PostFireCooldown > 0 && !recharging) { Vector2 smokeVel = new Vector2(0, -8) * Main.rand.NextFloat(0.1f, 1.1f); - Particle smoke = new HeavySmokeParticle(tipPosition, smokeVel, StaticEffectsColor, Main.rand.Next(40, 60 + 1), Main.rand.NextFloat(0.3f, 0.6f), 0.5f, Main.rand.NextFloat(-0.2f, 0.2f), Main.rand.NextBool(), required: true); + Particle smoke = new HeavySmokeParticle(tipPosition, smokeVel, PUNISHMENTMODE ? Color.Red : StaticEffectsColor, Main.rand.Next(40, 60 + 1), Main.rand.NextFloat(0.3f, 0.6f), 0.5f, Main.rand.NextFloat(-0.2f, 0.2f), Main.rand.NextBool(), required: true); GeneralParticleHandler.SpawnParticle(smoke); Dust dust = Dust.NewDustPerfect(tipPosition, 303, smokeVel.RotatedByRandom(0.1f), 80, default, Main.rand.NextFloat(0.4f, 1.3f)); dust.noGravity = false; - dust.color = Color.White; + dust.color = PUNISHMENTMODE ? Color.Red : Color.White; } else if (!recharging) { @@ -336,7 +345,7 @@ namespace CalamityMod.Projectiles.Ranged Texture2D rechargeTexture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); - Main.EntitySpriteDraw(glowTexture, drawPosition, null, mainColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); + Main.EntitySpriteDraw(glowTexture, drawPosition, null, PUNISHMENTMODE ? Color.Red : mainColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); if (PostFireCooldown > 15 && recharging) { float randSize = Main.rand.NextFloat(0.8f, 1.2f); diff --git a/Projectiles/Ranged/NorfleetComet.cs b/Projectiles/Ranged/NorfleetComet.cs index ef0dbb752f..e10696a580 100644 --- a/Projectiles/Ranged/NorfleetComet.cs +++ b/Projectiles/Ranged/NorfleetComet.cs @@ -39,15 +39,37 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + Player player = Main.player[Projectile.owner]; float rotationRando = Main.rand.NextFloat(-0.02f, 0.02f); Projectile.velocity = Projectile.velocity.RotatedBy(rotationRando); Projectile.rotation += 0.05f; + if (Projectile.ai[2] == 1) + { + Projectile.friendly = false; + if (time >= 75) + { + Projectile.hostile = true; + + float distanceFromPlayer = Projectile.Distance(player.Center); + + // This is done instead of a Normalize or DirectionTo call because the variables needed are already present and calculating the square root again would be unnecessary. + Vector2 idealVelocity = (player.Center - Projectile.Center) / distanceFromPlayer * 8f; + + Projectile.velocity.X += Math.Sign(idealVelocity.X - Projectile.velocity.X) * (0.0005f * time); + Projectile.velocity.Y += Math.Sign(idealVelocity.Y - Projectile.velocity.Y) * (0.0005f * time); + + if (Projectile.Hitbox.Intersects(player.Hitbox)) + Projectile.Kill(); + + Projectile.timeLeft = 5; + } + } if (time > 25) { for (int i = 0; i < 2; i++) { Vector2 dustPos = Projectile.Center + (i * MathHelper.Pi + Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 30f; - Dust dust = Dust.NewDustPerfect(dustPos, Main.rand.NextBool(3) ? 272 : 86, (i * MathHelper.Pi + Projectile.rotation * Math.Sign(Projectile.velocity.X)).ToRotationVector2() * 3f); + Dust dust = Dust.NewDustPerfect(dustPos, (Projectile.ai[2] == 1 ? 219 : Main.rand.NextBool(3) ? 272 : 86), (i * MathHelper.Pi + Projectile.rotation * Math.Sign(Projectile.velocity.X)).ToRotationVector2() * 3f); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.6f, 0.9f); } @@ -67,7 +89,7 @@ namespace CalamityMod.Projectiles.Ranged public override void OnKill(int timeLeft) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner, 0, Projectile.ai[1]); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner, 0, Projectile.ai[1], Projectile.ai[2] == 1 ? 1 : 0); if (Projectile.ai[1] == 0) { diff --git a/Projectiles/Ranged/NorfleetExplosion.cs b/Projectiles/Ranged/NorfleetExplosion.cs index d0a0bf3fde..66a58bd95a 100644 --- a/Projectiles/Ranged/NorfleetExplosion.cs +++ b/Projectiles/Ranged/NorfleetExplosion.cs @@ -40,9 +40,13 @@ namespace CalamityMod.Projectiles.Ranged Projectile.damage = 1; } - public override void OnKill(int timeLeft) + public override void AI() { - + if (Projectile.ai[2] == 1) + { + Projectile.friendly = false; + Projectile.hostile = true; + } } public override bool PreDraw(ref Color lightColor) diff --git a/Sounds/Item/NuhUhUh.ogg b/Sounds/Item/NuhUhUh.ogg new file mode 100644 index 0000000000000000000000000000000000000000..2d9dcf16c5e4fc68408dcc6ffccaa5cbf81d4dfa GIT binary patch literal 77977 zcmce;cT`i)*Ebq^M?wt<7!WX_NmW2l2!s-90zpEPUP6(speUWtJ3<7cmr$fv>Agy? ziWHG1R!~Hd8}$1t&vVy$-}~1+YciQVXZD^mdp>*5KEnikM@K^dDd3;$F8|*`@kOyl z5?&I&yIwZV-se@MY8C%9*&+K=XeQA==lu6|&PhU~xch;@K*zKHc?ppHl_W!KVB+lI zB(Cq}2zGV0G5#YTtOb^mkdlzNE+GSkpzQ5@ZJpg6!Ekp!XRo{NZuagz&~w3;h#z}* z+q-u5UP?OFezvl5;<7U0k`fZ=|PIF%Ozu}`yoHy%5 z&_H$wI53{lhLx|FFNN19fiWdlatK<;8yByRC<`?}ab79%3HdW}FaQw7^asWN%Kkw4 zFNzD3qlHHxbz@SaqUTvf?}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^SL7mksZy1YBw_`Wu0NYkefm_~6+L=b@qnAOE{B564 zs9SPz;fbAs*VgU(JL9P96yIURC2h~9cBO*QIu?gl95>}mv@FX?9Mx5nLyFu-Q!p@B zI#!T_NvBq z-n%;rAkwAAjuP_-&w>-=!15bM_v#10ocFPTxGl9AMctltBcdqQQ5}Rv9Zp8alencb zxrn?$M@`z6D_PjO@{D@A&Dr4btZ{R}!NbJq5`|I5(ATC8v4-eBw=n1r7Im)hZYOkr zcdJVIkiG@)^dPj@p^Xs*LxcoA6?|>C-z0^`wuPun1wXdy7o%YBV*@Q>S>))g-u|qS ztzp*Iuo9^OOKt!>xvRAkfve>4qV_e99 zv+lUGuA5F&ZI!lAv~K} zqTPB2nA7BbvA%6tgwwcOk&%|70~Iwj6oF9*ISJW}an`v?6fZpjX%zsbhjS4zIybbg zlO5Q`5QY$9LcIMJg<&H#7ywUaXHx(KDg^=n00000Zz2Ey6951J1h}XI1OF8s{sg>l zk9W%z!~46@@dSLG>$?U4_xo7U$OAB^1n?XT?v$BiCYhN@000005N%fIUo+Qiu!If{ z1|utnT`@s4b$et<4mbb-$VQVMs-97?bfE@zBS(^sRKs11WMFzM7 tT-brp5HJK!02EXJJ_X$TY+n$-0j7YPpX~<%H~;_u0000000000001mE2RQ%$ literal 0 HcmV?d00001 From 72e657cd79a0b476e32b277b54fa1fae2feba573 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 11 May 2024 13:12:38 -0500 Subject: [PATCH 101/197] 1 - Target index is used instead of player variables for exo mechs and master rev+ prime. 2 - Master Rev+ Prime Destroyer and Twins leave at 75% instead of 70% HP. 3 - Master Rev+ Prime Destroyer turns slower while it's offscreen. 4 - Master Rev+ Prime Twins no longer enter phase 2. --- NPCs/ExoMechs/Apollo/Apollo.cs | 85 +++++++-------- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 52 ++++----- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 54 +++++---- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 54 +++++---- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 52 ++++----- NPCs/ExoMechs/Artemis/Artemis.cs | 103 +++++++++--------- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 65 +++++------ NPCs/NormalNPCs/SkeletronPrime2.cs | 65 +++++------ .../Bosses/DestroyerAI.cs | 5 +- .../Bosses/SkeletronPrimeAI.cs | 1 + NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 8 +- 11 files changed, 250 insertions(+), 294 deletions(-) diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index b21243039f..eba4711d38 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -250,7 +250,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo NPC.TargetClosest(); // Target variable - Player player = Main.player[NPC.target]; + int targetIndex = NPC.target; // Check if the other exo mechs are alive int otherExoMechsAlive = 0; @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active) { // Set target to Thanatos' target if Thanatos is alive - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target]; + targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target; otherExoMechsAlive++; exoWormAlive = true; @@ -286,7 +286,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) { // Set target to Ares' target if Ares is alive - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; otherExoMechsAlive++; exoPrimeAlive = true; @@ -366,7 +366,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo { NPC.ai[0] += 1f; if (NPC.ai[0] == 10f && !NPC.AnyNPCs(ModContent.NPCType())) - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); } else { @@ -465,13 +465,13 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo // Default vector to fly to bool flyRight = NPC.ai[0] % 2f == 0f || NPC.ai[0] < 10f || !revenge; float destinationX = flyRight ? 750f : -750f; - float destinationY = player.Center.Y; + float destinationY = Main.player[targetIndex].Center.Y; float chargeComboXOffset = flyRight ? -600f : 600f; float chargeComboYOffset = NPC.ai[2] % 2f == 0f ? 480f : -480f; - Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + destinationX * 1.6f, destinationY) : - SecondaryAIState == (float)SecondaryPhase.Passive ? new Vector2(player.Center.X + destinationX, destinationY + 360f) : - AIState == (float)Phase.LineUpChargeCombo ? new Vector2(player.Center.X + destinationX * 1.2f, destinationY + chargeComboYOffset) : - new Vector2(player.Center.X + destinationX, destinationY); + Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(Main.player[targetIndex].Center.X + destinationX * 1.6f, destinationY) : + SecondaryAIState == (float)SecondaryPhase.Passive ? new Vector2(Main.player[targetIndex].Center.X + destinationX, destinationY + 360f) : + AIState == (float)Phase.LineUpChargeCombo ? new Vector2(Main.player[targetIndex].Center.X + destinationX * 1.2f, destinationY + chargeComboYOffset) : + new Vector2(Main.player[targetIndex].Center.X + destinationX, destinationY); // Add some random distance to the destination after certain attacks if (pickNewLocation) @@ -523,9 +523,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo bool canFire = distanceFromDestination.Length() <= 320f; // Rotation - Vector2 aimedVector = player.Center - NPC.Center; + Vector2 aimedVector = Main.player[targetIndex].Center - NPC.Center; float rateOfRotation = 0.1f; - Vector2 rotateTowards = player.Center - NPC.Center; + Vector2 rotateTowards = Main.player[targetIndex].Center - NPC.Center; bool readyToCharge = AIState == (float)Phase.LineUpChargeCombo && (Vector2.Distance(NPC.Center, destination) <= chargeLocationDistanceGateValue || calamityGlobalNPC.newAI[2] > 0f); if (AIState == (int)Phase.ChargeCombo) { @@ -540,8 +540,8 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo } else { - float x = player.Center.X - NPC.Center.X; - float y = player.Center.Y - NPC.Center.Y; + float x = Main.player[targetIndex].Center.X - NPC.Center.X; + float y = Main.player[targetIndex].Center.Y - NPC.Center.Y; rotateTowards = Vector2.Normalize(new Vector2(x, y)) * baseVelocity; } @@ -550,42 +550,37 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo NPC.rotation = NPC.rotation.AngleTowards((float)Math.Atan2(rotateTowards.Y, rotateTowards.X) + MathHelper.PiOver2, rateOfRotation); // Despawn if target is dead - if (player.dead) + if (Main.player[targetIndex].dead) { - NPC.TargetClosest(false); - player = Main.player[NPC.target]; - if (player.dead) - { - AIState = (float)Phase.Normal; - NPC.localAI[0] = 0f; - NPC.localAI[1] = 0f; - NPC.localAI[2] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - for (int i = 0; i < maxCharges; i++) - chargeLocations[i] = default; + AIState = (float)Phase.Normal; + NPC.localAI[0] = 0f; + NPC.localAI[1] = 0f; + NPC.localAI[2] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + for (int i = 0; i < maxCharges; i++) + chargeLocations[i] = default; - NPC.dontTakeDamage = true; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } - - return; } + + return; } // Cause the charge visual effects to begin while performing or preparing for a combo @@ -673,8 +668,8 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (Main.netMode != NetmodeID.MultiplayerClient) { // Spawn the fuckers - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); } } } @@ -989,7 +984,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo int damage = NPC.GetProjectileDamage(type); Vector2 plasmaVelocity = Vector2.Normalize(aimedVector) * projectileVelocity; Vector2 offset = Vector2.Normalize(plasmaVelocity) * 70f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, plasmaVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, plasmaVelocity, type, damage, 0f, Main.myPlayer, Main.player[targetIndex].Center.X, Main.player[targetIndex].Center.Y); } } } @@ -1053,7 +1048,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo int damage = NPC.GetProjectileDamage(type); Vector2 rocketVelocity = Vector2.Normalize(aimedVector) * projectileVelocity * 1.2f; Vector2 offset = Vector2.Normalize(rocketVelocity) * 70f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, rocketVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, rocketVelocity, type, damage, 0f, Main.myPlayer, 0f, Main.player[targetIndex].Center.Y); } } diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index b10fa96e8e..dec6dd8459 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -196,8 +196,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Whether Ares should be buffed while in berserk phase bool shouldGetBuffedByBerserkPhase = berserk && !otherMechIsBerserk; - // Target variable - Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + // Target variables + int targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; if (NPC.ai[2] > 0f) NPC.realLife = (int)NPC.ai[2]; @@ -237,8 +237,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (passivePhase) predictionAmt *= 0.5f; - Vector2 predictionVector = player.velocity * predictionAmt; - Vector2 rotationVector = player.Center + predictionVector - NPC.Center; + Vector2 predictionVector = Main.player[targetIndex].velocity * predictionAmt; + Vector2 rotationVector = Main.player[targetIndex].Center + predictionVector - NPC.Center; float projectileVelocity = passivePhase ? 9.6f : 12f; if (lastMechAlive) @@ -260,7 +260,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.rotation = NPC.rotation.AngleTowards(rotation, rateOfRotation); // Direction - int direction = Math.Sign(player.Center.X - NPC.Center.X); + int direction = Math.Sign(Main.player[targetIndex].Center.X - NPC.Center.X); if (direction != 0) { NPC.direction = direction; @@ -272,35 +272,31 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } // Despawn if target is dead - if (player.dead) + if (Main.player[targetIndex].dead) { - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; - if (player.dead) - { - AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - NPC.dontTakeDamage = true; + AIState = (float)Phase.Nothing; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } - - return; } + + return; } // Default vector to fly to @@ -424,7 +420,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); float offset = 40f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(gaussNukeVelocity) * offset, gaussNukeVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(gaussNukeVelocity) * offset, gaussNukeVelocity, type, damage, 0f, Main.myPlayer, 0f, Main.player[targetIndex].Center.Y); } // Recoil diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 6622b7d54c..cbaacc311a 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -199,8 +199,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Whether Ares should be buffed while in berserk phase bool shouldGetBuffedByBerserkPhase = berserk && !otherMechIsBerserk; - // Target variable - Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + // Target variables + int targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; if (NPC.ai[2] > 0f) NPC.realLife = (int)NPC.ai[2]; @@ -266,7 +266,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares bool horizontalLaserSweep = calamityGlobalNPC.newAI[3] == 0f; float rateOfRotation = AIState == (int)Phase.Deathray ? 0.08f : 0.04f; float lookAtX = flyLeft ? 1000f : -1000f; - Vector2 lookAt = AIState == (int)Phase.Deathray && !fireNormalLasers ? (horizontalLaserSweep ? new Vector2(NPC.Center.X, NPC.Center.Y + 1000f) : new Vector2(NPC.Center.X + lookAtX, NPC.Center.Y)) : player.Center; + Vector2 lookAt = AIState == (int)Phase.Deathray && !fireNormalLasers ? (horizontalLaserSweep ? new Vector2(NPC.Center.X, NPC.Center.Y + 1000f) : new Vector2(NPC.Center.X + lookAtX, NPC.Center.Y)) : Main.player[targetIndex].Center; float rotation = (float)Math.Atan2(lookAt.Y - NPC.Center.Y, lookAt.X - NPC.Center.X); if (NPC.spriteDirection == 1) @@ -279,7 +279,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.rotation = NPC.rotation.AngleTowards(rotation, rateOfRotation); // Direction - int direction = Math.Sign(((AIState == (int)Phase.Deathray && !horizontalLaserSweep) || fireNormalLasers ? lookAt.X : player.Center.X) - NPC.Center.X); + int direction = Math.Sign(((AIState == (int)Phase.Deathray && !horizontalLaserSweep) || fireNormalLasers ? lookAt.X : Main.player[targetIndex].Center.X) - NPC.Center.X); if (direction != 0) { NPC.direction = direction; @@ -291,35 +291,31 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } // Despawn if target is dead - if (player.dead) + if (Main.player[targetIndex].dead) { - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; - if (player.dead) - { - AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - NPC.dontTakeDamage = true; + AIState = (float)Phase.Nothing; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } - - return; } + + return; } // Velocity and acceleration values @@ -351,7 +347,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares deathrayPhaseVelocity *= 1.1f; // If Laser Cannon can fire normal lasers, cannot fire if too close to the target and in deathray spiral phase - bool canFire = Vector2.Distance(NPC.Center, player.Center) > 320f || !fireNormalLasers; + bool canFire = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center) > 320f || !fireNormalLasers; // Telegraph duration for deathray spiral float deathraySpiralTelegraphDuration = bossRush ? AresBody.deathrayTelegraphDuration_BossRush : death ? AresBody.deathrayTelegraphDuration_Death : @@ -454,9 +450,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - Vector2 laserVelocity = Vector2.Normalize(player.Center - NPC.Center); + Vector2 laserVelocity = Vector2.Normalize(Main.player[targetIndex].Center - NPC.Center); Vector2 offset = laserVelocity * 70f + Vector2.UnitY * 16f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, player.Center, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, Main.player[targetIndex].Center, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); } } } diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 7a649370d7..9aef9f09fb 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -195,8 +195,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Whether Ares should be buffed while in berserk phase bool shouldGetBuffedByBerserkPhase = berserk && !otherMechIsBerserk; - // Target variable - Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + // Target variables + int targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; if (NPC.ai[2] > 0f) NPC.realLife = (int)NPC.ai[2]; @@ -236,8 +236,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (passivePhase) predictionAmt *= 0.5f; - Vector2 predictionVector = player.velocity * predictionAmt; - Vector2 rotationVector = player.Center + predictionVector - NPC.Center; + Vector2 predictionVector = Main.player[targetIndex].velocity * predictionAmt; + Vector2 rotationVector = Main.player[targetIndex].Center + predictionVector - NPC.Center; float projectileVelocity = passivePhase ? 9.6f : 12f; if (lastMechAlive) @@ -259,7 +259,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.rotation = NPC.rotation.AngleTowards(rotation, rateOfRotation); // Direction - int direction = Math.Sign(player.Center.X - NPC.Center.X); + int direction = Math.Sign(Main.player[targetIndex].Center.X - NPC.Center.X); if (direction != 0) { NPC.direction = direction; @@ -284,35 +284,31 @@ namespace CalamityMod.NPCs.ExoMechs.Ares float setTimerTo = (int)(plasmaBoltPhaseGateValue * 0.95f) - 1; // Despawn if target is dead - if (player.dead) + if (Main.player[targetIndex].dead) { - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; - if (player.dead) - { - AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = setTimerTo; - calamityGlobalNPC.newAI[2] = 0f; - NPC.dontTakeDamage = true; + AIState = (float)Phase.Nothing; + calamityGlobalNPC.newAI[1] = setTimerTo; + calamityGlobalNPC.newAI[2] = 0f; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } - - return; } + + return; } // Default vector to fly to @@ -351,7 +347,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares bool boltsSplitLess = fireMoreBolts && !lastMechAlive; // If Plasma Cannon can fire projectiles, cannot fire if too close to the target and in deathray spiral phase - bool canFire = Vector2.Distance(NPC.Center, player.Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays; + bool canFire = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays; // Telegraph duration for deathray spiral float deathrayTelegraphDuration = bossRush ? AresBody.deathrayTelegraphDuration_BossRush : death ? AresBody.deathrayTelegraphDuration_Death : @@ -450,7 +446,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (boltsSplitLess) Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, -1f); else - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, Main.player[targetIndex].Center.X, Main.player[targetIndex].Center.Y); } // Recoil diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index 5c2f2b8e2c..09d77162ed 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -194,8 +194,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Whether Ares should be buffed while in berserk phase bool shouldGetBuffedByBerserkPhase = berserk && !otherMechIsBerserk; - // Target variable - Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + // Target variables + int targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; if (NPC.ai[2] > 0f) NPC.realLife = (int)NPC.ai[2]; @@ -237,8 +237,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (lastMechAlive) predictionAmt *= 1.5f; - Vector2 predictionVector = player.velocity * predictionAmt; - Vector2 rotationVector = player.Center + predictionVector - NPC.Center; + Vector2 predictionVector = Main.player[targetIndex].velocity * predictionAmt; + Vector2 rotationVector = Main.player[targetIndex].Center + predictionVector - NPC.Center; bool fireMoreOrbs = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; float projectileVelocity = (passivePhase || fireMoreOrbs) ? 5.2f : 7.8f; @@ -261,7 +261,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.rotation = NPC.rotation.AngleTowards(rotation, rateOfRotation); // Direction - int direction = Math.Sign(player.Center.X - NPC.Center.X); + int direction = Math.Sign(Main.player[targetIndex].Center.X - NPC.Center.X); if (direction != 0) { NPC.direction = direction; @@ -285,35 +285,31 @@ namespace CalamityMod.NPCs.ExoMechs.Ares float setTimerTo = (int)(teslaOrbPhaseGateValue * 0.3f) - 1; // Despawn if target is dead - if (player.dead) + if (Main.player[targetIndex].dead) { - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; - if (player.dead) - { - AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = setTimerTo; - calamityGlobalNPC.newAI[2] = 0f; - NPC.dontTakeDamage = true; + AIState = (float)Phase.Nothing; + calamityGlobalNPC.newAI[1] = setTimerTo; + calamityGlobalNPC.newAI[2] = 0f; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } - - return; } + + return; } // Default vector to fly to @@ -349,7 +345,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares float movementDistanceGateValue = 50f; // If Tesla Cannon can fire projectiles, cannot fire if too close to the target and in deathray spiral phase - bool canFire = Vector2.Distance(NPC.Center, player.Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays; + bool canFire = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays; // Telegraph duration for deathray spiral float deathrayTelegraphDuration = bossRush ? AresBody.deathrayTelegraphDuration_BossRush : death ? AresBody.deathrayTelegraphDuration_Death : diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index d346637495..705b0c02f0 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -286,7 +286,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis NPC.TargetClosest(); // Target variable - Player player = Main.player[NPC.target]; + int targetIndex = NPC.target; // Check if the other exo mechs are alive int otherExoMechsAlive = 0; @@ -299,7 +299,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) { // Set target to Apollo's target if Apollo is alive - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].target]; + targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].target; // Link the HP of both twins if (NPC.life > Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].life) @@ -314,7 +314,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active) { // Set target to Thanatos' target if Thanatos is alive - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target]; + targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target; otherExoMechsAlive++; exoWormAlive = true; @@ -325,7 +325,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) { // Set target to Ares' target if Ares is alive - player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; otherExoMechsAlive++; exoPrimeAlive = true; @@ -409,7 +409,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis { NPC.ai[0] += 1f; if (NPC.ai[0] == 10f && !NPC.AnyNPCs(ModContent.NPCType())) - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); } else { @@ -465,7 +465,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Spin variables float spinRadius = 500f; float spinLocationDistance = 50f; - Vector2 spinLocation = player.Center; + Vector2 spinLocation = Main.player[targetIndex].Center; switch ((int)NPC.ai[3]) { // Laser from top @@ -557,11 +557,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Default vector to fly to bool flyLeft = NPC.ai[0] % 2f == 0f || NPC.ai[0] < 10f || !revenge; float destinationX = flyLeft ? -750f : 750f; - float destinationY = player.Center.Y; - Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + destinationX * 1.6f, destinationY) : - SecondaryAIState == (float)SecondaryPhase.Passive ? new Vector2(player.Center.X + destinationX, destinationY + 360f) : + float destinationY = Main.player[targetIndex].Center.Y; + Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(Main.player[targetIndex].Center.X + destinationX * 1.6f, destinationY) : + SecondaryAIState == (float)SecondaryPhase.Passive ? new Vector2(Main.player[targetIndex].Center.X + destinationX, destinationY + 360f) : AIState == (float)Phase.Deathray ? spinLocation : - new Vector2(player.Center.X + destinationX, destinationY); + new Vector2(Main.player[targetIndex].Center.X + destinationX, destinationY); // Add a bit of randomness to the destination, but only in specific phases where it's necessary if (AIState == (float)Phase.Normal || AIState == (float)Phase.LaserShotgun || AIState == (float)Phase.PhaseTransition) @@ -588,10 +588,10 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis bool canFire = distanceFromDestination.Length() <= 320f && canFireLasers; // Rotation - Vector2 predictionVector = AIState == (float)Phase.Deathray ? Vector2.Zero : player.velocity * predictionAmt; - Vector2 aimedVector = player.Center + predictionVector - NPC.Center; + Vector2 predictionVector = AIState == (float)Phase.Deathray ? Vector2.Zero : Main.player[targetIndex].velocity * predictionAmt; + Vector2 aimedVector = Main.player[targetIndex].Center + predictionVector - NPC.Center; float rateOfRotation = 0.1f; - Vector2 rotateTowards = player.Center - NPC.Center; + Vector2 rotateTowards = Main.player[targetIndex].Center - NPC.Center; bool stopRotatingAndSlowDown = !phase2 && AIState == (float)Phase.Normal && lineUpAttack; if (!stopRotatingAndSlowDown) { @@ -616,8 +616,8 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis } else { - float x = player.Center.X + predictionVector.X - NPC.Center.X; - float y = player.Center.Y + predictionVector.Y - NPC.Center.Y; + float x = Main.player[targetIndex].Center.X + predictionVector.X - NPC.Center.X; + float y = Main.player[targetIndex].Center.Y + predictionVector.Y - NPC.Center.Y; rotateTowards = Vector2.Normalize(new Vector2(x, y)) * baseVelocity; } @@ -627,45 +627,40 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis } // Despawn if target is dead - if (player.dead) + if (Main.player[targetIndex].dead) { - NPC.TargetClosest(false); - player = Main.player[NPC.target]; - if (player.dead) - { - AIState = (float)Phase.Normal; - NPC.ai[1] = 0f; - NPC.ai[2] = 0f; - NPC.localAI[0] = 0f; - NPC.localAI[1] = 0f; - NPC.localAI[2] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - rotationDirection = 0; - chargeVelocityNormalized = default; - spinningPoint = default; - spinVelocity = default; - NPC.dontTakeDamage = true; + AIState = (float)Phase.Normal; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.localAI[0] = 0f; + NPC.localAI[1] = 0f; + NPC.localAI[2] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + rotationDirection = 0; + chargeVelocityNormalized = default; + spinningPoint = default; + spinVelocity = default; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } - - return; } + + return; } // Duration of deathray spin to do a full circle @@ -778,7 +773,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis else { Vector2 laserVelocity = Vector2.Normalize(aimedVector); - Vector2 projectileDestination = player.Center + predictionVector; + Vector2 projectileDestination = Main.player[targetIndex].Center + predictionVector; pointToLookAt = projectileDestination; SoundEngine.PlaySound(CommonCalamitySounds.ExoLaserShootSound, NPC.Center); if (Main.netMode != NetmodeID.MultiplayerClient) @@ -948,9 +943,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis int baseSpread = ((nerfedAttacks || nerfedLaserShotgun) ? 9 : lastMechAlive ? 20 : 15) + numLasersAddedByDifficulty * 2; int spread = baseSpread + (int)(calamityGlobalNPC.newAI[2] / divisor2) * (baseSpread / 4); float rotation = MathHelper.ToRadians(spread); - float distanceFromTarget = Vector2.Distance(NPC.Center, player.Center + predictionVector); + float distanceFromTarget = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center + predictionVector); float setVelocityInAI = death ? 6.5f : revenge ? 6.25f : expertMode ? 6f : 5.5f; - pointToLookAt = player.Center + predictionVector; + pointToLookAt = Main.player[targetIndex].Center + predictionVector; for (int i = 0; i < numLasersPerSpread + 1; i++) { @@ -1049,7 +1044,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Laser from top case 0: case 1: - if (player.Center.X >= NPC.Center.X) + if (Main.player[targetIndex].Center.X >= NPC.Center.X) rotationDirection = 1; else rotationDirection = -1; @@ -1057,7 +1052,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Laser from bottom case 2: - if (player.Center.X >= NPC.Center.X) + if (Main.player[targetIndex].Center.X >= NPC.Center.X) rotationDirection = -1; else rotationDirection = 1; @@ -1066,7 +1061,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Laser from left case 3: - if (player.Center.Y >= NPC.Center.Y) + if (Main.player[targetIndex].Center.Y >= NPC.Center.Y) rotationDirection = -1; else rotationDirection = 1; @@ -1075,7 +1070,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Laser from right case 4: - if (player.Center.Y >= NPC.Center.Y) + if (Main.player[targetIndex].Center.Y >= NPC.Center.Y) rotationDirection = 1; else rotationDirection = -1; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 8ca44fe51a..3c7d01279b 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -250,7 +250,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public float GetSlowdownAreaEdgeRadius(bool lastMechAlive) => (BossRushEvent.BossRushActive ? 400f : CalamityWorld.death ? 600f : CalamityWorld.revenge ? 700f : Main.expertMode ? 800f : 1000f) * (lastMechAlive ? 0.6f : 1f) * (Main.zenithWorld && !exoMechdusa ? 2 : Main.getGoodWorld ? 0.5f : 1f); - public int CheckForOtherMechs(ref Player target, out bool exoPrimeAlive, out bool exoTwinsAlive) + public int CheckForOtherMechs(ref int targetIndex, out bool exoPrimeAlive, out bool exoTwinsAlive) { exoPrimeAlive = false; exoTwinsAlive = false; @@ -260,7 +260,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) { // Set target to Ares' target if Ares is alive. - target = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; + targetIndex = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target; otherExoMechsAlive++; exoPrimeAlive = true; @@ -303,10 +303,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.TargetClosest(); // Target variable - Player player = Main.player[NPC.target]; + int targetIndex = NPC.target; // Check if the other exo mechs are alive - int otherExoMechsAlive = CheckForOtherMechs(ref player, out bool exoPrimeAlive, out bool exoTwinsAlive); + int otherExoMechsAlive = CheckForOtherMechs(ref targetIndex, out bool exoPrimeAlive, out bool exoTwinsAlive); // These are 5 by default to avoid triggering passive phases after the other mechs are dead float exoPrimeLifeRatio = defaultLifeRatio; @@ -438,36 +438,31 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Despawn if target is dead bool targetDead = false; - if (player.dead) + if (Main.player[targetIndex].dead) { - NPC.TargetClosest(false); - player = Main.player[NPC.target]; - if (player.dead) - { - targetDead = true; - AIState = (float)Phase.Charge; - NPC.localAI[0] = 0f; - NPC.localAI[2] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - chargeVelocityScalar = 0f; - NPC.dontTakeDamage = true; + targetDead = true; + AIState = (float)Phase.Charge; + NPC.localAI[0] = 0f; + NPC.localAI[2] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + NPC.dontTakeDamage = true; + NPC.velocity.Y -= 1f; + if ((double)NPC.position.Y < Main.topWorld + 16f) NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) - NPC.velocity.Y -= 1f; - if ((double)NPC.position.Y < Main.topWorld + 16f) + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int a = 0; a < Main.maxNPCs; a++) { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || - Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } + if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || + Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; } } } @@ -480,7 +475,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.netUpdate = true; // Default vector to fly to - Vector2 destination = player.Center; + Vector2 destination = Main.player[targetIndex].Center; // Move destination to somewhere far below the target for the first 3 seconds so that Thanatos can fully uncoil quickly bool speedUp = false; @@ -577,9 +572,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (Main.netMode != NetmodeID.MultiplayerClient) { // Spawn the fuckers - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(Main.player[targetIndex].whoAmI, ModContent.NPCType()); } } } @@ -993,7 +988,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { // Increase velocity if velocity is ever zero if (NPC.velocity == Vector2.Zero) - NPC.velocity = Vector2.Normalize(player.Center - NPC.Center).SafeNormalize(Vector2.Zero) * baseVelocity; + NPC.velocity = Vector2.Normalize(Main.player[targetIndex].Center - NPC.Center).SafeNormalize(Vector2.Zero) * baseVelocity; // Acceleration if (!((destination - NPC.Center).Length() < turnDistance)) @@ -1143,7 +1138,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float lifeRatio = NPC.life / (float)NPC.lifeMax; // Yes, this is bizarre as fuck. - Player completelyUseless = null; + int completelyUseless = 0; int otherExoMechsAlive = CheckForOtherMechs(ref completelyUseless, out _, out _); // A general factor for the aura. diff --git a/NPCs/NormalNPCs/SkeletronPrime2.cs b/NPCs/NormalNPCs/SkeletronPrime2.cs index f98e80ad41..6164daf879 100644 --- a/NPCs/NormalNPCs/SkeletronPrime2.cs +++ b/NPCs/NormalNPCs/SkeletronPrime2.cs @@ -100,14 +100,6 @@ namespace CalamityMod.NPCs.NormalNPCs bool bossRush = BossRushEvent.BossRushActive; bool death = CalamityWorld.death || bossRush; - // Get a target - if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) - NPC.TargetClosest(); - - // Despawn safety, make sure to target another player if the current player target is too far away - if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) - NPC.TargetClosest(); - // Percent life remaining float lifeRatio = NPC.life / (float)NPC.lifeMax; @@ -145,9 +137,6 @@ namespace CalamityMod.NPCs.NormalNPCs } else { - // Set target to the lead head's target - Main.player[NPC.target] = Main.player[Main.npc[(int)NPC.ai[0]].target]; - // Link the HP of both heads if (NPC.life > Main.npc[(int)NPC.ai[0]].life) NPC.life = Main.npc[(int)NPC.ai[0]].life; @@ -231,12 +220,8 @@ namespace CalamityMod.NPCs.NormalNPCs } // Despawn - if (Main.player[NPC.target].dead || Math.Abs(NPC.Center.X - Main.player[NPC.target].Center.X) > 6000f || Math.Abs(NPC.Center.Y - Main.player[NPC.target].Center.Y) > 6000f) - { - NPC.TargetClosest(); - if (Main.player[NPC.target].dead || Math.Abs(NPC.Center.X - Main.player[NPC.target].Center.X) > 6000f || Math.Abs(NPC.Center.Y - Main.player[NPC.target].Center.Y) > 6000f) - NPC.ai[1] = 3f; - } + if (Main.npc[(int)NPC.ai[0]].ai[1] == 3f) + NPC.ai[1] = 3f; // Activate daytime enrage if (Main.IsItDay() && !bossRush && NPC.ai[1] != 3f && NPC.ai[1] != 2f) @@ -273,7 +258,7 @@ namespace CalamityMod.NPCs.NormalNPCs bool normalLaserRotation = NPC.localAI[1] % 2f == 0f; // Prevents cheap hits - bool canUseAttackInMaster = NPC.position.Y < Main.player[NPC.target].position.Y - 350f; + bool canUseAttackInMaster = NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - 350f; // Float near player if (NPC.ai[1] == 0f || NPC.ai[1] == 4f) @@ -289,8 +274,8 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.ai[2] += phase3 ? 1.2f : 0.8f; if (NPC.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f)) && (!otherHeadChargingOrSpinning || phase3) && canUseAttackInMaster) { - bool shouldSpinAround = NPC.ai[1] == 4f && NPC.position.Y < Main.player[NPC.target].position.Y - 400f && - Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 400f; + bool shouldSpinAround = NPC.ai[1] == 4f && NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - 400f && + Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) > 400f; if (shouldSpinAround || NPC.ai[1] != 4f) { @@ -337,7 +322,7 @@ namespace CalamityMod.NPCs.NormalNPCs float headDecelerationUpDist = 0f; float headDecelerationDownDist = 0f; float headDecelerationHorizontalDist = 0f; - int headHorizontalDirection = ((!(Main.player[NPC.target].Center.X < NPC.Center.X)) ? 1 : (-1)); + int headHorizontalDirection = ((!(Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X < NPC.Center.X)) ? 1 : (-1)); if (NPC.IsMechQueenUp) { headDecelerationHorizontalDist = -150f * (float)headHorizontalDirection; @@ -345,7 +330,7 @@ namespace CalamityMod.NPCs.NormalNPCs headDecelerationDownDist = 50f; } - if (NPC.position.Y > Main.player[NPC.target].position.Y - (400f + headDecelerationUpDist)) + if (NPC.position.Y > Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - (400f + headDecelerationUpDist)) { if (NPC.velocity.Y > 0f) NPC.velocity.Y *= deceleration; @@ -355,7 +340,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.velocity.Y > topVelocity) NPC.velocity.Y = topVelocity; } - else if (NPC.position.Y < Main.player[NPC.target].position.Y - (450f + headDecelerationDownDist)) + else if (NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - (450f + headDecelerationDownDist)) { if (NPC.velocity.Y < 0f) NPC.velocity.Y *= deceleration; @@ -366,7 +351,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.velocity.Y = -topVelocity; } - if (NPC.Center.X > Main.player[NPC.target].Center.X + (400f + headDecelerationHorizontalDist)) + if (NPC.Center.X > Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X + (400f + headDecelerationHorizontalDist)) { if (NPC.velocity.X > 0f) NPC.velocity.X *= deceleration; @@ -376,7 +361,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.velocity.X > topVelocity) NPC.velocity.X = topVelocity; } - if (NPC.Center.X < Main.player[NPC.target].Center.X - (400f + headDecelerationHorizontalDist)) + if (NPC.Center.X < Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - (400f + headDecelerationHorizontalDist)) { if (NPC.velocity.X < 0f) NPC.velocity.X *= deceleration; @@ -459,8 +444,8 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.rotation += NPC.direction * 0.3f; Vector2 headPosition = NPC.Center; - float headTargetX = Main.player[NPC.target].Center.X - headPosition.X; - float headTargetY = Main.player[NPC.target].Center.Y - headPosition.Y; + float headTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headPosition.X; + float headTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headPosition.Y; float headTargetDistance = (float)Math.Sqrt(headTargetX * headTargetX + headTargetY * headTargetY); float speed = bossRush ? 12f : 8f; @@ -487,7 +472,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.IsMechQueenUp) { - float mechdusaAccelMult = Vector2.Distance(NPC.Center, Main.player[NPC.target].Center); + float mechdusaAccelMult = Vector2.Distance(NPC.Center, Main.player[Main.npc[(int)NPC.ai[0]].target].Center); if (mechdusaAccelMult < 0.1f) mechdusaAccelMult = 0f; @@ -512,8 +497,8 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.rotation += NPC.direction * 0.3f; Vector2 enragedHeadPosition = NPC.Center; - float enragedHeadTargetX = Main.player[NPC.target].Center.X - enragedHeadPosition.X; - float enragedHeadTargetY = Main.player[NPC.target].Center.Y - enragedHeadPosition.Y; + float enragedHeadTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - enragedHeadPosition.X; + float enragedHeadTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - enragedHeadPosition.Y; float enragedHeadTargetDist = (float)Math.Sqrt(enragedHeadTargetX * enragedHeadTargetX + enragedHeadTargetY * enragedHeadTargetY); float enragedHeadSpeed = 10f; @@ -534,11 +519,11 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.localAI[0] = 0f; Vector2 headCenter = NPC.Center; - if (Collision.CanHit(headCenter, 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) + if (Collision.CanHit(headCenter, 1, 1, Main.player[Main.npc[(int)NPC.ai[0]].target].position, Main.player[Main.npc[(int)NPC.ai[0]].target].width, Main.player[Main.npc[(int)NPC.ai[0]].target].height)) { enragedHeadSpeed = 7f; - float enragedHeadSkullTargetX = Main.player[NPC.target].Center.X - headCenter.X + Main.rand.Next(-20, 21); - float enragedHeadSkullTargetY = Main.player[NPC.target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21); + float enragedHeadSkullTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headCenter.X + Main.rand.Next(-20, 21); + float enragedHeadSkullTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21); float enragedHeadSkullTargetDist = (float)Math.Sqrt(enragedHeadSkullTargetX * enragedHeadSkullTargetX + enragedHeadSkullTargetY * enragedHeadSkullTargetY); enragedHeadSkullTargetDist = enragedHeadSpeed / enragedHeadSkullTargetDist; enragedHeadSkullTargetX *= enragedHeadSkullTargetDist; @@ -627,12 +612,12 @@ namespace CalamityMod.NPCs.NormalNPCs SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); // Set spin direction - if (Main.player[NPC.target].velocity.X > 0f) + if (Main.player[Main.npc[(int)NPC.ai[0]].target].velocity.X > 0f) calamityGlobalNPC.newAI[0] = 1f; - else if (Main.player[NPC.target].velocity.X < 0f) + else if (Main.player[Main.npc[(int)NPC.ai[0]].target].velocity.X < 0f) calamityGlobalNPC.newAI[0] = -1f; else - calamityGlobalNPC.newAI[0] = Main.player[NPC.target].direction; + calamityGlobalNPC.newAI[0] = Main.player[Main.npc[(int)NPC.ai[0]].target].direction; // Set spin velocity NPC.velocity.X = MathHelper.Pi * NPC.localAI[3] / spinVelocity; @@ -652,7 +637,7 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.localAI[0] += 1f; - if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 64f) + if (Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) > 64f) { SoundEngine.PlaySound(SoundID.Item61, NPC.Center); CreateParticles(NPC, new Vector2(NPC.Center.X + Main.rand.Next(NPC.width / 2), NPC.Center.Y + 4f)); @@ -661,8 +646,8 @@ namespace CalamityMod.NPCs.NormalNPCs { Vector2 headCenter = NPC.Center; float enragedHeadSpeed = 6f + (death ? 2f * (1f - lifeRatio) : 0f); - float enragedHeadBombTargetX = Main.player[NPC.target].Center.X - headCenter.X + Main.rand.Next(-20, 21); - float enragedHeadBombTargetY = Main.player[NPC.target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21); + float enragedHeadBombTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headCenter.X + Main.rand.Next(-20, 21); + float enragedHeadBombTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21); float enragedHeadBombTargetDist = (float)Math.Sqrt(enragedHeadBombTargetX * enragedHeadBombTargetX + enragedHeadBombTargetY * enragedHeadBombTargetY); enragedHeadBombTargetDist = enragedHeadSpeed / enragedHeadBombTargetDist; enragedHeadBombTargetX *= enragedHeadBombTargetDist; @@ -724,7 +709,7 @@ namespace CalamityMod.NPCs.NormalNPCs float flightVelocity = bossRush ? 32f : death ? 28f : 24f; float flightAcceleration = bossRush ? 1.28f : death ? 1.12f : 0.96f; - Vector2 destination = new Vector2(Main.player[NPC.target].Center.X, Main.player[NPC.target].Center.Y - 500f); + Vector2 destination = new Vector2(Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X, Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - 500f); NPC.SimpleFlyMovement((destination - NPC.Center).SafeNormalize(Vector2.UnitY) * flightVelocity, flightAcceleration); // Spit bombs and then go to floating phase diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index e3c8676753..8872b6bebe 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -800,7 +800,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Despawn bool oblivionWasAlive = npc.localAI[3] == 1f && !oblivionAlive; - bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.7f) || oblivionWasAlive; + bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.75f) || oblivionWasAlive; if (player.dead || oblivionFightDespawn) { shouldFly = false; @@ -1064,10 +1064,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Force the fucker to turn around in ground phase in Master + // Turns slower if Oblivion is alive, for fairness if (npc.type == NPCID.TheDestroyer && masterMode && !flyAtTarget) { if (npc.Distance(player.Center) > 2000f) - npc.velocity += (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; + npc.velocity += (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? speed : turnSpeed); } if (NPC.IsMechQueenUp && npc.type == NPCID.TheDestroyer) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index a062ee9db8..96febd4b2a 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -49,6 +49,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { int head = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType(), npc.whoAmI); Main.npc[head].ai[0] = npc.whoAmI; + Main.npc[head].target = npc.target; Main.npc[head].netUpdate = true; npc.ai[0] = head; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index 9391dd89e0..7f270bebca 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Phase HP ratios - float phase2LifeRatio = masterMode ? 0.85f : 0.7f; + float phase2LifeRatio = oblivionAlive ? 0.5f : masterMode ? 0.85f : 0.7f; float finalPhaseLifeRatio = masterMode ? 0.4f : 0.25f; // Movement variables @@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Despawn bool oblivionWasAlive = npc.localAI[3] == 1f && !oblivionAlive; - bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.7f) || oblivionWasAlive || (oblivionAlive && !spazAlive && lifeRatio < 0.9f); + bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.75f) || oblivionWasAlive || (oblivionAlive && !spazAlive && lifeRatio < 0.95f); if (Main.player[npc.target].dead || oblivionFightDespawn) { npc.velocity.Y -= 0.04f; @@ -1108,7 +1108,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Phase HP ratios - float phase2LifeRatio = masterMode ? 0.85f : 0.7f; + float phase2LifeRatio = oblivionAlive ? 0.5f : masterMode ? 0.85f : 0.7f; float finalPhaseLifeRatio = masterMode ? 0.4f : 0.25f; // Movement variables @@ -1151,7 +1151,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Despawn bool oblivionWasAlive = npc.localAI[3] == 1f && !oblivionAlive; - bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.7f) || oblivionWasAlive || (oblivionAlive && !retAlive && lifeRatio < 0.9f); + bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.75f) || oblivionWasAlive || (oblivionAlive && !retAlive && lifeRatio < 0.95f); if (Main.player[npc.target].dead || oblivionFightDespawn) { npc.velocity.Y -= 0.04f; From fcc95fb7327a986bbb008f39d299b101cc872a6e Mon Sep 17 00:00:00 2001 From: tomat Date: Fri, 10 May 2024 22:27:42 -0700 Subject: [PATCH 102/197] Re-eanble merge frames. --- Utilities/TileFraming.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 74c5cee36f..ca178b0822 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -1938,11 +1938,6 @@ namespace CalamityMod ///

internal static void DrawUniversalMergeFrames(int x, int y, byte[,] adjacencyData, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) { - // 02OCT2023: MishiroUsui: The below code resulted in 30 fps drops in sulph sea, and general performance issues across the board in cal biomes - // DO NOT RE-ENABLE UNTIL THE ISSUE IS RESOLVED AND VERIFIED. - return; -#pragma warning disable CS0162 // Disable unreachable code errors while this code is disabled - Texture2D blendLayer = ModContent.Request(blendSheetPath).Value; Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(x * 16 - Main.screenPosition.X, y * 16 - Main.screenPosition.Y) + zero; @@ -2301,7 +2296,6 @@ namespace CalamityMod Main.spriteBatch.Draw(blendLayer, drawOffset, new Rectangle?(new Rectangle(18 + randomFrameX36 + subFrameX, 54 + subFrameY, 18, 18)), shadingColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } #endregion -#pragma warning restore CS0162 // Disable unreachable code errors while this code is disabled } /// From f4fdd8896f3f3f4ba8c0b739854a1f80138040a0 Mon Sep 17 00:00:00 2001 From: tomat Date: Fri, 10 May 2024 22:39:49 -0700 Subject: [PATCH 103/197] Cache asset request. --- Utilities/TileFraming.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index ca178b0822..2598030aeb 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -11,6 +11,7 @@ using CalamityMod.Tiles.Ores; using CalamityMod.Tiles.SunkenSea; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,6 +28,8 @@ namespace CalamityMod // CONSIDER -- This is a triangle array, but does it need to be? Main.tileMerge is a triangle array as well public static bool[][] tileMergeTypes; + private static Dictionary> cachedBlendSheets = new(); + #region Similarity Enum private enum Similarity { @@ -1938,7 +1941,13 @@ namespace CalamityMod /// internal static void DrawUniversalMergeFrames(int x, int y, byte[,] adjacencyData, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) { - Texture2D blendLayer = ModContent.Request(blendSheetPath).Value; + if (!cachedBlendSheets.TryGetValue(blendSheetPath, out var blendLayerAsset)) + { + blendLayerAsset = cachedBlendSheets[blendSheetPath] = ModContent.Request(blendSheetPath); + } + + var blendLayer = blendLayerAsset.Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(x * 16 - Main.screenPosition.X, y * 16 - Main.screenPosition.Y) + zero; From 0f0f37ec8768c98c86be140be7e6d0af58643133 Mon Sep 17 00:00:00 2001 From: tomat Date: Fri, 10 May 2024 22:48:23 -0700 Subject: [PATCH 104/197] Begin working on some more efficient handling. --- Tiles/Abyss/AbyssGravel.cs | 3 +-- Tiles/Abyss/HardenedSulphurousSandstone.cs | 4 +--- Tiles/Abyss/PlantyMush.cs | 4 +--- Utilities/TileFraming.cs | 24 +++++++++++++++++----- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Tiles/Abyss/AbyssGravel.cs b/Tiles/Abyss/AbyssGravel.cs index 8544a7dcce..12abf602d0 100644 --- a/Tiles/Abyss/AbyssGravel.cs +++ b/Tiles/Abyss/AbyssGravel.cs @@ -160,8 +160,7 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, new TileFraming.MergeFrameData(secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"), new TileFraming.MergeFrameData(tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge")); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.cs b/Tiles/Abyss/HardenedSulphurousSandstone.cs index c8becd91c8..5172243e41 100644 --- a/Tiles/Abyss/HardenedSulphurousSandstone.cs +++ b/Tiles/Abyss/HardenedSulphurousSandstone.cs @@ -45,9 +45,7 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SulphurousShaleMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, new TileFraming.MergeFrameData(thirdTileAdjacency, "CalamityMod/Tiles/Merges/SulphurousShaleMerge"), new TileFraming.MergeFrameData(secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"), new TileFraming.MergeFrameData(tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge")); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/Abyss/PlantyMush.cs b/Tiles/Abyss/PlantyMush.cs index bb9c985a8a..af6526cf96 100644 --- a/Tiles/Abyss/PlantyMush.cs +++ b/Tiles/Abyss/PlantyMush.cs @@ -204,9 +204,7 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, new TileFraming.MergeFrameData(thirdTileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"), new TileFraming.MergeFrameData(secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"), new TileFraming.MergeFrameData(tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge")); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 2598030aeb..9b2bd1def6 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -22,6 +22,8 @@ namespace CalamityMod // OnModLoad is guaranteed to be run after all content has autoloaded. public static class TileFraming { + internal record struct MergeFrameData(byte[,] AdjacencyData, string BlendSheetPath, int FrameOffsetX = 0, int FrameOffsetY = 0); + private static int[][] PlantCheckAgainst; private static Dictionary VineToGrass; @@ -1939,8 +1941,24 @@ namespace CalamityMod /// /// Call this in PostDraw. Uses adjacency data generated by GetAdjacencyData to draw the correct blend state over a given tile, regardless of what tile frame that tile is using /// - internal static void DrawUniversalMergeFrames(int x, int y, byte[,] adjacencyData, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) + internal static void DrawUniversalMergeFrames(int x, int y, params MergeFrameData[] mergeFrames) { + Color shadingColour = Lighting.GetColor(x, y); + Tile myTile = Main.tile[x, y]; + + foreach (var frame in mergeFrames) + { + DrawUniversalMergeFrames(x, y, frame, shadingColour, myTile); + } + } + + internal static void DrawUniversalMergeFrames(int x, int y, MergeFrameData mergeFrameData, Color shadingColour, Tile myTile) + { + byte[,] adjacencyData = mergeFrameData.AdjacencyData; + string blendSheetPath = mergeFrameData.BlendSheetPath; + int frameOffsetX = mergeFrameData.FrameOffsetX; + int frameOffsetY = mergeFrameData.FrameOffsetY; + if (!cachedBlendSheets.TryGetValue(blendSheetPath, out var blendLayerAsset)) { blendLayerAsset = cachedBlendSheets[blendSheetPath] = ModContent.Request(blendSheetPath); @@ -1955,10 +1973,6 @@ namespace CalamityMod int subFrameX = frameOffsetX * 270; int subFrameY = frameOffsetY * 198; - Color shadingColour = Lighting.GetColor(x, y); - - Tile myTile = Main.tile[x, y]; - byte thisTileData = adjacencyData[x, y]; // Get tile variant number From 132ccb55e527b6f402f90c9db16660d71253b9ee Mon Sep 17 00:00:00 2001 From: tomat Date: Fri, 10 May 2024 23:24:59 -0700 Subject: [PATCH 105/197] Turn MergeFrameData into a class and use it in appropriate places. --- Tiles/Abyss/AbyssGravel.cs | 14 +++---- Tiles/Abyss/HardenedSulphurousSandstone.cs | 20 +++++----- Tiles/Abyss/PlantyMush.cs | 20 +++++----- Tiles/Abyss/PyreMantle.cs | 22 +++++----- Tiles/Abyss/PyreMantleMolten.cs | 29 ++++++-------- Tiles/Abyss/SulphurousSand.cs | 29 ++++++-------- Tiles/Abyss/SulphurousSandstone.cs | 22 +++++----- Tiles/Abyss/SulphurousShale.cs | 22 +++++----- Tiles/Abyss/Voidstone.cs | 22 +++++----- Tiles/AerialiteBrick.cs | 15 ++++--- Tiles/Astral/AstralClay.cs | 8 ++-- Tiles/Astral/AstralDirt.cs | 15 ++++--- Tiles/Astral/AstralMonolith.cs | 8 ++-- Tiles/Astral/AstralStone.cs | 22 +++++----- Tiles/Astral/NovaeSlag.cs | 22 +++++----- Tiles/AstralBrick.cs | 15 ++++--- Tiles/AstralDesert/AstralSand.cs | 29 ++++++-------- Tiles/AstralDesert/AstralSandstone.cs | 29 ++++++-------- Tiles/AstralDesert/CelestialRemains.cs | 15 ++++--- Tiles/AstralDesert/HardenedAstralSand.cs | 36 ++++++++--------- Tiles/AstralSnow/AstralIce.cs | 15 ++++--- Tiles/AstralSnow/AstralSnow.cs | 15 ++++--- Tiles/Crags/BrimstoneSlab.cs | 15 ++++--- Tiles/Crags/BrimstoneSlag.cs | 8 ++-- Tiles/Crags/ScorchedBone.cs | 15 ++++--- Tiles/Crags/ScorchedRemains.cs | 15 ++++--- Tiles/Crags/ScorchedRemainsGrass.cs | 15 ++++--- Tiles/CryonicBrick.cs | 15 ++++--- Tiles/DraedonStructures/LaboratoryPanels.cs | 15 ++++--- .../LaboratoryPipePlating.cs | 15 ++++--- Tiles/DraedonStructures/LaboratoryPlating.cs | 15 ++++--- Tiles/DraedonStructures/RustedPlating.cs | 16 ++++---- Tiles/Ores/AerialiteOre.cs | 29 ++++++-------- Tiles/Ores/AerialiteOreDisenchanted.cs | 29 ++++++-------- Tiles/Ores/AstralOre.cs | 8 ++-- Tiles/Ores/AuricOre.cs | 17 ++++---- Tiles/Ores/ExodiumOre.cs | 15 ++++--- Tiles/Ores/HallowedOre.cs | 8 ++-- Tiles/Ores/InfernalSuevite.cs | 15 ++++--- Tiles/Ores/PerennialOre.cs | 22 +++++----- Tiles/Ores/ScoriaOre.cs | 15 ++++--- Tiles/Ores/UelibloomOre.cs | 22 +++++----- Tiles/PerennialBrick.cs | 22 +++++----- Tiles/ScoriaBrick.cs | 15 ++++--- Tiles/SunkenSea/EutrophicSand.cs | 22 +++++----- Tiles/SunkenSea/HardenedEutrophicSand.cs | 36 ++++++++--------- Tiles/SunkenSea/Navystone.cs | 29 ++++++-------- Tiles/SunkenSea/SeaPrism.cs | 8 ++-- Tiles/UelibloomBrick.cs | 22 +++++----- Tiles/VernalSoil.cs | 22 +++++----- Utilities/TileFraming.cs | 40 +++++++++++++------ 51 files changed, 463 insertions(+), 521 deletions(-) diff --git a/Tiles/Abyss/AbyssGravel.cs b/Tiles/Abyss/AbyssGravel.cs index 12abf602d0..0a1f7e3e69 100644 --- a/Tiles/Abyss/AbyssGravel.cs +++ b/Tiles/Abyss/AbyssGravel.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Tiles.Abyss { int animationFrameWidth = 234; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AbyssGravelMine", 3); @@ -31,8 +31,8 @@ namespace CalamityMod.Tiles.Abyss HitSound = MineSound; DustType = 33; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) @@ -160,13 +160,13 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, new TileFraming.MergeFrameData(secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"), new TileFraming.MergeFrameData(tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge")); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return true; } } diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.cs b/Tiles/Abyss/HardenedSulphurousSandstone.cs index 5172243e41..b6564cc824 100644 --- a/Tiles/Abyss/HardenedSulphurousSandstone.cs +++ b/Tiles/Abyss/HardenedSulphurousSandstone.cs @@ -9,9 +9,9 @@ namespace CalamityMod.Tiles.Abyss { public class HardenedSulphurousSandstone : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -24,9 +24,9 @@ namespace CalamityMod.Tiles.Abyss DustType = 32; AddMapEntry(new Color(76, 58, 59)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/SulphurousShaleMerge", out thirdTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -45,14 +45,14 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, new TileFraming.MergeFrameData(thirdTileAdjacency, "CalamityMod/Tiles/Merges/SulphurousShaleMerge"), new TileFraming.MergeFrameData(secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"), new TileFraming.MergeFrameData(tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge")); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } diff --git a/Tiles/Abyss/PlantyMush.cs b/Tiles/Abyss/PlantyMush.cs index af6526cf96..793328cb92 100644 --- a/Tiles/Abyss/PlantyMush.cs +++ b/Tiles/Abyss/PlantyMush.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Tiles.Abyss { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/PlantyMushMine", 3); - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -35,9 +35,9 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(84, 102, 39), CalamityUtils.GetItemName()); HitSound = MineSound; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); } int animationFrameWidth = 234; @@ -204,14 +204,14 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, new TileFraming.MergeFrameData(thirdTileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"), new TileFraming.MergeFrameData(secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"), new TileFraming.MergeFrameData(tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge")); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } } diff --git a/Tiles/Abyss/PyreMantle.cs b/Tiles/Abyss/PyreMantle.cs index 7531b8f91c..c942f61aa1 100644 --- a/Tiles/Abyss/PyreMantle.cs +++ b/Tiles/Abyss/PyreMantle.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.Abyss { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -33,9 +33,9 @@ namespace CalamityMod.Tiles.Abyss MinPick = 180; AddMapEntry(new Color(19, 20, 32)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -73,16 +73,14 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } } diff --git a/Tiles/Abyss/PyreMantleMolten.cs b/Tiles/Abyss/PyreMantleMolten.cs index c14d9aae02..1807a5f898 100644 --- a/Tiles/Abyss/PyreMantleMolten.cs +++ b/Tiles/Abyss/PyreMantleMolten.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Tiles.Abyss public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; internal static Texture2D GlowTexture; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { @@ -39,10 +39,10 @@ namespace CalamityMod.Tiles.Abyss MinPick = 180; AddMapEntry(new Color(113, 49, 16)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge", out fourthTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -98,10 +98,7 @@ namespace CalamityMod.Tiles.Abyss TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawOffset, null, GetDrawColour(i, j, drawColour), default); glowbrightness += 0.3f; - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/PyreMantleMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) @@ -120,10 +117,10 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out fourthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), fourthTileAdjacency); return true; } diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index 6fb2c179e3..f782fe72ac 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -17,10 +17,10 @@ namespace CalamityMod.Tiles.Abyss [LegacyName("SulphurousSandNoWater")] public class SulphurousSand : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { @@ -37,10 +37,10 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(150, 100, 50)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/SulphurousSandstoneMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fourthTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -179,18 +179,15 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SulphurousSandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, out fourthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, fourthTileAdjacency); return true; } } diff --git a/Tiles/Abyss/SulphurousSandstone.cs b/Tiles/Abyss/SulphurousSandstone.cs index a619209223..87a33f72eb 100644 --- a/Tiles/Abyss/SulphurousSandstone.cs +++ b/Tiles/Abyss/SulphurousSandstone.cs @@ -9,9 +9,9 @@ namespace CalamityMod.Tiles.Abyss { public class SulphurousSandstone : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(113, 90, 71)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/HardenedSulphurousSandstoneMerge", out thirdTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -46,16 +46,14 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSulphurousSandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } diff --git a/Tiles/Abyss/SulphurousShale.cs b/Tiles/Abyss/SulphurousShale.cs index a76fb75138..08420b4377 100644 --- a/Tiles/Abyss/SulphurousShale.cs +++ b/Tiles/Abyss/SulphurousShale.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Tiles.Abyss public class SulphurousShale : ModTile { int animationFrameWidth = 234; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AbyssGravelMine", 3); @@ -35,9 +35,9 @@ namespace CalamityMod.Tiles.Abyss MinPick = 65; HitSound = MineSound; DustType = 33; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); } public override bool CanExplode(int i, int j) @@ -220,16 +220,14 @@ namespace CalamityMod.Tiles.Abyss public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } } diff --git a/Tiles/Abyss/Voidstone.cs b/Tiles/Abyss/Voidstone.cs index 4c47acb550..04d76cc971 100644 --- a/Tiles/Abyss/Voidstone.cs +++ b/Tiles/Abyss/Voidstone.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.Abyss { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; internal static Texture2D GlowTexture; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -36,9 +36,9 @@ namespace CalamityMod.Tiles.Abyss MinPick = 180; AddMapEntry(new Color(15, 15, 15)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge", out thirdTileAdjacency); } int animationFrameWidth = 234; @@ -276,16 +276,14 @@ namespace CalamityMod.Tiles.Abyss drawColour *= brightness; TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawOffset, null, GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/PyreMantleMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } diff --git a/Tiles/AerialiteBrick.cs b/Tiles/AerialiteBrick.cs index 87b06b2cc6..7739ee7f46 100644 --- a/Tiles/AerialiteBrick.cs +++ b/Tiles/AerialiteBrick.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Tiles { public class AerialiteBrick : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -17,19 +17,18 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(68, 58, 145)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } diff --git a/Tiles/Astral/AstralClay.cs b/Tiles/Astral/AstralClay.cs index 4d43e6e647..31c5b1f44f 100644 --- a/Tiles/Astral/AstralClay.cs +++ b/Tiles/Astral/AstralClay.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.Astral { public class AstralClay : ModTile { - public byte[,] tileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -29,16 +29,16 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.CanBeDugByShovel[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out tileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); return true; } diff --git a/Tiles/Astral/AstralDirt.cs b/Tiles/Astral/AstralDirt.cs index 6ea70a8551..33e9495283 100644 --- a/Tiles/Astral/AstralDirt.cs +++ b/Tiles/Astral/AstralDirt.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Tiles.Astral { public class AstralDirt : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -35,20 +35,19 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return true; } diff --git a/Tiles/Astral/AstralMonolith.cs b/Tiles/Astral/AstralMonolith.cs index 6650ec3613..7559465207 100644 --- a/Tiles/Astral/AstralMonolith.cs +++ b/Tiles/Astral/AstralMonolith.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.Astral private static int sheetWidth = 216; private static int sheetHeight = 72; - public byte[,] tileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; public override void SetStaticDefaults() { @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(45, 36, 63)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out tileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -87,13 +87,13 @@ namespace CalamityMod.Tiles.Astral Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); TileFraming.CompactFraming(i, j, resetFrame); return false; } diff --git a/Tiles/Astral/AstralStone.cs b/Tiles/Astral/AstralStone.cs index 8516bb4c0d..feb347924f 100644 --- a/Tiles/Astral/AstralStone.cs +++ b/Tiles/Astral/AstralStone.cs @@ -10,9 +10,9 @@ namespace CalamityMod.Tiles.Astral { public class AstralStone : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -33,23 +33,21 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.Conversion.Stone[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out thirdTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } diff --git a/Tiles/Astral/NovaeSlag.cs b/Tiles/Astral/NovaeSlag.cs index 51265047de..f0f5006103 100644 --- a/Tiles/Astral/NovaeSlag.cs +++ b/Tiles/Astral/NovaeSlag.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Tiles.Astral [LegacyName("AstralSilt")] public class NovaeSlag : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -33,9 +33,9 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; TileID.Sets.CanBeDugByShovel[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out thirdTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -47,16 +47,14 @@ namespace CalamityMod.Tiles.Astral public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); return true; } diff --git a/Tiles/AstralBrick.cs b/Tiles/AstralBrick.cs index 8fe7e2c801..238d566933 100644 --- a/Tiles/AstralBrick.cs +++ b/Tiles/AstralBrick.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Tiles private const short subsheetWidth = 324; private const short subsheetHeight = 90; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -22,8 +22,8 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(128, 128, 158)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out secondTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -34,8 +34,8 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } @@ -65,8 +65,7 @@ namespace CalamityMod.Tiles TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index 56e1f6fb34..c5ef51c6fd 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -12,10 +12,10 @@ namespace CalamityMod.Tiles.AstralDesert { public class AstralSand : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -39,10 +39,10 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.Falling[Type] = true; TileID.Sets.FallingBlockProjectile[Type] = new TileID.Sets.FallingBlockProjectileInfo(ModContent.ProjectileType(), 15); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fourthTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -51,17 +51,14 @@ namespace CalamityMod.Tiles.AstralDesert } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, out fourthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, fourthTileAdjacency); return true; } diff --git a/Tiles/AstralDesert/AstralSandstone.cs b/Tiles/AstralDesert/AstralSandstone.cs index c64c5bb851..60521b29dd 100644 --- a/Tiles/AstralDesert/AstralSandstone.cs +++ b/Tiles/AstralDesert/AstralSandstone.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Tiles.AstralDesert { public class AstralSandstone : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -30,24 +30,21 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.Conversion.Sandstone[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, fourthTileAdjacency); return true; } diff --git a/Tiles/AstralDesert/CelestialRemains.cs b/Tiles/AstralDesert/CelestialRemains.cs index 03db9266b1..ccc1a9386b 100644 --- a/Tiles/AstralDesert/CelestialRemains.cs +++ b/Tiles/AstralDesert/CelestialRemains.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Tiles.AstralDesert [LegacyName("AstralFossil")] public class CelestialRemains : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -28,18 +28,17 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandstoneMerge", out secondTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AstralSandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); return true; } diff --git a/Tiles/AstralDesert/HardenedAstralSand.cs b/Tiles/AstralDesert/HardenedAstralSand.cs index 452b866c98..18f82c387d 100644 --- a/Tiles/AstralDesert/HardenedAstralSand.cs +++ b/Tiles/AstralDesert/HardenedAstralSand.cs @@ -9,11 +9,11 @@ namespace CalamityMod.Tiles.AstralDesert { public class HardenedAstralSand : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; - public byte[,] fifthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; + public TileFraming.MergeFrameData fifthTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -31,28 +31,24 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.Conversion.HardenedSand[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fourthTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out fifthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandstoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fifthTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AstralSandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fifthTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency, thirdTileAdjacency, fourthTileAdjacency, fifthTileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out fourthTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, out fifthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, fourthTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, fifthTileAdjacency); return true; } diff --git a/Tiles/AstralSnow/AstralIce.cs b/Tiles/AstralSnow/AstralIce.cs index ed69e681c5..387d740651 100644 --- a/Tiles/AstralSnow/AstralIce.cs +++ b/Tiles/AstralSnow/AstralIce.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Tiles.AstralSnow { public class AstralIce : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -36,8 +36,8 @@ namespace CalamityMod.Tiles.AstralSnow TileID.Sets.Conversion.Ice[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSnowMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out secondTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -53,14 +53,13 @@ namespace CalamityMod.Tiles.AstralSnow public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralSnowMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); return true; } diff --git a/Tiles/AstralSnow/AstralSnow.cs b/Tiles/AstralSnow/AstralSnow.cs index 517e16d03d..0163f674c3 100644 --- a/Tiles/AstralSnow/AstralSnow.cs +++ b/Tiles/AstralSnow/AstralSnow.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Tiles.AstralSnow { public class AstralSnow : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -33,8 +33,8 @@ namespace CalamityMod.Tiles.AstralSnow TileID.Sets.ChecksForMerge[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowBlock, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.SnowBlock, "CalamityMod/Tiles/Merges/SnowMerge", out secondTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -43,14 +43,13 @@ namespace CalamityMod.Tiles.AstralSnow } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SnowMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.SnowBlock, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.SnowBlock, secondTileAdjacency); return true; } diff --git a/Tiles/Crags/BrimstoneSlab.cs b/Tiles/Crags/BrimstoneSlab.cs index 34af2e0fef..4ef25e2170 100644 --- a/Tiles/Crags/BrimstoneSlab.cs +++ b/Tiles/Crags/BrimstoneSlab.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Tiles.Crags private int subsheetWidth = 450; private int subsheetHeight = 198; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { @@ -30,8 +30,8 @@ namespace CalamityMod.Tiles.Crags HitSound = SoundID.Tink; DustType = 235; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) @@ -51,13 +51,12 @@ namespace CalamityMod.Tiles.Crags } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AshMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/Crags/BrimstoneSlag.cs b/Tiles/Crags/BrimstoneSlag.cs index a76237ed86..0cfba5440a 100644 --- a/Tiles/Crags/BrimstoneSlag.cs +++ b/Tiles/Crags/BrimstoneSlag.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Tiles.Crags { private const short subsheetWidth = 450; private const short subsheetHeight = 198; - public byte[,] TileAdjacency; + public TileFraming.MergeFrameData TileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,7 +25,7 @@ namespace CalamityMod.Tiles.Crags MineResist = 2f; MinPick = 100; AddMapEntry(new Color(53, 33, 56)); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, out TileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out TileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -48,11 +48,11 @@ namespace CalamityMod.Tiles.Crags public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency, "CalamityMod/Tiles/Merges/AshMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Ash, out TileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Ash, TileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } diff --git a/Tiles/Crags/ScorchedBone.cs b/Tiles/Crags/ScorchedBone.cs index 9f45f7b514..a3dd52a4e5 100644 --- a/Tiles/Crags/ScorchedBone.cs +++ b/Tiles/Crags/ScorchedBone.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Tiles.Crags private int sheetWidth = 450; private int sheetHeight = 198; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -28,8 +28,8 @@ namespace CalamityMod.Tiles.Crags MinPick = 100; AddMapEntry(new Color(87, 62, 67)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) @@ -44,13 +44,12 @@ namespace CalamityMod.Tiles.Crags } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AshMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/Crags/ScorchedRemains.cs b/Tiles/Crags/ScorchedRemains.cs index addfd5e85a..aad8514842 100644 --- a/Tiles/Crags/ScorchedRemains.cs +++ b/Tiles/Crags/ScorchedRemains.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Tiles.Crags private int sheetWidth = 234; private int sheetHeight = 90; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -28,8 +28,8 @@ namespace CalamityMod.Tiles.Crags MinPick = 100; AddMapEntry(new Color(57, 52, 72)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); } public override void RandomUpdate(int i, int j) @@ -63,13 +63,12 @@ namespace CalamityMod.Tiles.Crags } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AshMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return true; } } diff --git a/Tiles/Crags/ScorchedRemainsGrass.cs b/Tiles/Crags/ScorchedRemainsGrass.cs index 827664346e..5b048175b9 100644 --- a/Tiles/Crags/ScorchedRemainsGrass.cs +++ b/Tiles/Crags/ScorchedRemainsGrass.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Tiles.Crags private int extraFrameHeight = 36; private int extraFrameWidth = 90; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { @@ -34,8 +34,8 @@ namespace CalamityMod.Tiles.Crags RegisterItemDrop(ModContent.ItemType()); AddMapEntry(new Color(212, 82, 227)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) @@ -160,13 +160,12 @@ namespace CalamityMod.Tiles.Crags } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AshMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return true; } diff --git a/Tiles/CryonicBrick.cs b/Tiles/CryonicBrick.cs index 5c8fae2e15..f54729df77 100644 --- a/Tiles/CryonicBrick.cs +++ b/Tiles/CryonicBrick.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Tiles int subsheetHeight = 90; int subsheetWidth = 234; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -24,8 +24,8 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(99, 131, 199)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowBlock, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.SnowBlock, "CalamityMod/Tiles/Merges/SnowMerge", out secondTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -36,8 +36,8 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.SnowBlock, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.SnowBlock, secondTileAdjacency); return true; } @@ -51,8 +51,7 @@ namespace CalamityMod.Tiles public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SnowMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } } } diff --git a/Tiles/DraedonStructures/LaboratoryPanels.cs b/Tiles/DraedonStructures/LaboratoryPanels.cs index c51ba3ebb3..359d896c74 100644 --- a/Tiles/DraedonStructures/LaboratoryPanels.cs +++ b/Tiles/DraedonStructures/LaboratoryPanels.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures { public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -26,22 +26,21 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(36, 35, 37)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) => false; public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return true; } } diff --git a/Tiles/DraedonStructures/LaboratoryPipePlating.cs b/Tiles/DraedonStructures/LaboratoryPipePlating.cs index a9eff7d263..7049d9a5fa 100644 --- a/Tiles/DraedonStructures/LaboratoryPipePlating.cs +++ b/Tiles/DraedonStructures/LaboratoryPipePlating.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures { public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,22 +25,21 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(91, 64, 56)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) => false; public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false); return false; } diff --git a/Tiles/DraedonStructures/LaboratoryPlating.cs b/Tiles/DraedonStructures/LaboratoryPlating.cs index f6bcdb2f40..9f3cfaf47f 100644 --- a/Tiles/DraedonStructures/LaboratoryPlating.cs +++ b/Tiles/DraedonStructures/LaboratoryPlating.cs @@ -9,8 +9,8 @@ namespace CalamityMod.Tiles.DraedonStructures { public class LaboratoryPlating : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); public override void SetStaticDefaults() @@ -25,22 +25,21 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(162, 157, 150)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) => false; public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } } diff --git a/Tiles/DraedonStructures/RustedPlating.cs b/Tiles/DraedonStructures/RustedPlating.cs index 475200035e..1821f57e93 100644 --- a/Tiles/DraedonStructures/RustedPlating.cs +++ b/Tiles/DraedonStructures/RustedPlating.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Tiles.DraedonStructures { public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { @@ -26,21 +26,21 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(128, 90, 77)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool CanExplode(int i, int j) => false; public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } } diff --git a/Tiles/Ores/AerialiteOre.cs b/Tiles/Ores/AerialiteOre.cs index 7b151a6aba..6755bfbc93 100644 --- a/Tiles/Ores/AerialiteOre.cs +++ b/Tiles/Ores/AerialiteOre.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Tiles.Ores public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/MagicalRockMine", 3); internal static Texture2D GlowTexture; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { if (!Main.dedServ) @@ -47,10 +47,10 @@ namespace CalamityMod.Tiles.Ores HitSound = MineSound; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Cloud, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.RainCloud, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowCloud, out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Cloud, "CalamityMod/Tiles/Merges/CloudMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.RainCloud, "CalamityMod/Tiles/Merges/RainCloudMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.SnowCloud, "CalamityMod/Tiles/Merges/SnowCloudMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out fourthTileAdjacency); } public override void PostSetDefaults() { @@ -65,10 +65,10 @@ namespace CalamityMod.Tiles.Ores } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Cloud, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.RainCloud, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.SnowCloud, out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out fourthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Cloud, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.RainCloud, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.SnowCloud, thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, fourthTileAdjacency); return true; } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) @@ -276,10 +276,7 @@ namespace CalamityMod.Tiles.Ores Main.spriteBatch.Draw(GlowTexture, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/CloudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/RainCloudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SnowCloudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) { diff --git a/Tiles/Ores/AerialiteOreDisenchanted.cs b/Tiles/Ores/AerialiteOreDisenchanted.cs index e8c281a20b..4ffed6529d 100644 --- a/Tiles/Ores/AerialiteOreDisenchanted.cs +++ b/Tiles/Ores/AerialiteOreDisenchanted.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Tiles.Ores { private const int AnimationFrameWidth = 234; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { @@ -41,10 +41,10 @@ namespace CalamityMod.Tiles.Ores HitSound = SoundID.Tink; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Cloud, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.RainCloud, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowCloud, out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Cloud, "CalamityMod/Tiles/Merges/CloudMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.RainCloud, "CalamityMod/Tiles/Merges/RainCloudMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.SnowCloud, "CalamityMod/Tiles/Merges/SnowCloudMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out fourthTileAdjacency); } public override void PostSetDefaults() { @@ -63,10 +63,10 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Cloud, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.RainCloud, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.SnowCloud, out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out fourthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Cloud, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.RainCloud, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.SnowCloud, thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, fourthTileAdjacency); return true; } public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) @@ -161,10 +161,7 @@ namespace CalamityMod.Tiles.Ores } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/CloudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/RainCloudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SnowCloudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); } } } diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index 6e3c1d1153..0dae9e292a 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Tiles.Ores { public class AstralOre : ModTile { - public byte[,] TileAdjacency; + public TileFraming.MergeFrameData TileAdjacency; public override void SetStaticDefaults() { Main.tileLighted[Type] = true; @@ -37,7 +37,7 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.ChecksForMerge[Type] = true; TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out TileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out TileAdjacency); } public override void NearbyEffects(int i, int j, bool closer) { @@ -87,12 +87,12 @@ namespace CalamityMod.Tiles.Ores } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out TileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), TileAdjacency); return true; } } diff --git a/Tiles/Ores/AuricOre.cs b/Tiles/Ores/AuricOre.cs index 9a8ee4c3e2..a95fdf532a 100644 --- a/Tiles/Ores/AuricOre.cs +++ b/Tiles/Ores/AuricOre.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Tiles.Ores public static bool Animate; internal static Texture2D GlowTexture; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { if (!Main.dedServ) @@ -44,9 +44,9 @@ namespace CalamityMod.Tiles.Ores MineResist = 5f; MinPick = 250; HitSound = MineSound; - - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) @@ -96,13 +96,12 @@ namespace CalamityMod.Tiles.Ores double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return true; } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/Ores/ExodiumOre.cs b/Tiles/Ores/ExodiumOre.cs index 214713bca4..d2049c3de3 100644 --- a/Tiles/Ores/ExodiumOre.cs +++ b/Tiles/Ores/ExodiumOre.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Tiles.Ores { public class ExodiumOre : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -35,19 +35,18 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.ChecksForMerge[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.LunarOre, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.LunarOre, "CalamityMod/Tiles/Merges/LuminiteMerge", out secondTileAdjacency); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/LuminiteMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.LunarOre, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.LunarOre, secondTileAdjacency); return true; } diff --git a/Tiles/Ores/HallowedOre.cs b/Tiles/Ores/HallowedOre.cs index 366aa12c8a..0a0945d708 100644 --- a/Tiles/Ores/HallowedOre.cs +++ b/Tiles/Ores/HallowedOre.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.Ores { public class HallowedOre : ModTile { - public byte[,] tileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; public override void SetStaticDefaults() { Main.tileLighted[Type] = true; @@ -32,7 +32,7 @@ namespace CalamityMod.Tiles.Ores HitSound = SoundID.Tink; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Pearlstone, out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Pearlstone, "CalamityMod/Tiles/Merges/PearlstoneMerge", out tileAdjacency); } public override bool CanExplode(int i, int j) @@ -46,11 +46,11 @@ namespace CalamityMod.Tiles.Ores } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/PearlstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Pearlstone, out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Pearlstone, tileAdjacency); return true; } diff --git a/Tiles/Ores/InfernalSuevite.cs b/Tiles/Ores/InfernalSuevite.cs index 55134067c2..5fdfc2f42a 100644 --- a/Tiles/Ores/InfernalSuevite.cs +++ b/Tiles/Ores/InfernalSuevite.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles.Ores private int sheetWidth = 234; private int sheetHeight = 90; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { @@ -36,8 +36,8 @@ namespace CalamityMod.Tiles.Ores DustType = 235; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); } public override bool CanExplode(int i, int j) @@ -65,14 +65,13 @@ namespace CalamityMod.Tiles.Ores public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AshMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return true; } } diff --git a/Tiles/Ores/PerennialOre.cs b/Tiles/Ores/PerennialOre.cs index e21b28eba0..832f0a2a85 100644 --- a/Tiles/Ores/PerennialOre.cs +++ b/Tiles/Ores/PerennialOre.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.Ores { internal static Texture2D GlowTexture; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -41,9 +41,9 @@ namespace CalamityMod.Tiles.Ores HitSound = SoundID.Tink; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); } int animationFrameWidth = 234; @@ -298,16 +298,14 @@ namespace CalamityMod.Tiles.Ores Tile trackTile = Main.tile[i, j]; TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawOffset, null, GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/MudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); return true; } diff --git a/Tiles/Ores/ScoriaOre.cs b/Tiles/Ores/ScoriaOre.cs index c5473a9310..3eed42ea62 100644 --- a/Tiles/Ores/ScoriaOre.cs +++ b/Tiles/Ores/ScoriaOre.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Tiles.Ores [LegacyName("ChaoticOre")] public class ScoriaOre : ModTile { - public byte[,] TileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData TileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { @@ -34,8 +34,8 @@ namespace CalamityMod.Tiles.Ores MinPick = 210; HitSound = SoundID.Tink; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out TileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out TileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge", out secondTileAdjacency); } public override void NearbyEffects(int i, int j, bool closer) @@ -91,8 +91,8 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out TileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), TileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); return true; } @@ -109,8 +109,7 @@ namespace CalamityMod.Tiles.Ores double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/PyreMantleMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency, "CalamityMod/Tiles/Merges/AbyssGravelMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, TileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/Ores/UelibloomOre.cs b/Tiles/Ores/UelibloomOre.cs index 71546e0505..f7e98c0a9f 100644 --- a/Tiles/Ores/UelibloomOre.cs +++ b/Tiles/Ores/UelibloomOre.cs @@ -10,9 +10,9 @@ namespace CalamityMod.Tiles.Ores { public class UelibloomOre : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -31,9 +31,9 @@ namespace CalamityMod.Tiles.Ores Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); } public override bool CanExplode(int i, int j) @@ -47,16 +47,14 @@ namespace CalamityMod.Tiles.Ores } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/MudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); return true; } } diff --git a/Tiles/PerennialBrick.cs b/Tiles/PerennialBrick.cs index 06851d630d..889a62fb6d 100644 --- a/Tiles/PerennialBrick.cs +++ b/Tiles/PerennialBrick.cs @@ -9,9 +9,9 @@ namespace CalamityMod.Tiles { public class PerennialBrick : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,9 +25,9 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(17, 133, 46)); AnimationFrameHeight = 90; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -38,15 +38,13 @@ namespace CalamityMod.Tiles } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/MudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); return true; } diff --git a/Tiles/ScoriaBrick.cs b/Tiles/ScoriaBrick.cs index f06c246f7b..1026b69d5c 100644 --- a/Tiles/ScoriaBrick.cs +++ b/Tiles/ScoriaBrick.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles int subsheetHeight = 72; internal static Texture2D GlowTexture; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; public override void SetStaticDefaults() { if (!Main.dedServ) @@ -29,8 +29,8 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(85, 87, 101)); HitSound = SoundID.Tink; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -53,8 +53,8 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); TileFraming.CompactFraming(i, j, resetFrame); return false; } @@ -73,8 +73,7 @@ namespace CalamityMod.Tiles Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) { diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index 9956357a86..76b304999b 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Tiles.SunkenSea { public class EutrophicSand : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -33,9 +33,9 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 108; AddMapEntry(new Color(92, 145, 167)); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out thirdTileAdjacency); } public override void RandomUpdate(int i, int j) @@ -67,16 +67,14 @@ namespace CalamityMod.Tiles.SunkenSea public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, thirdTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/SunkenSea/HardenedEutrophicSand.cs b/Tiles/SunkenSea/HardenedEutrophicSand.cs index 575f9bb7c8..53551c2470 100644 --- a/Tiles/SunkenSea/HardenedEutrophicSand.cs +++ b/Tiles/SunkenSea/HardenedEutrophicSand.cs @@ -9,11 +9,11 @@ namespace CalamityMod.Tiles.SunkenSea { public class HardenedEutrophicSand : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; - public byte[,] fifthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; + public TileFraming.MergeFrameData fifthTileAdjacency; public override void SetStaticDefaults() { @@ -32,11 +32,11 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 108; AddMapEntry(new Color(67, 107, 143)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fourthTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out fifthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fifthTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -46,20 +46,16 @@ namespace CalamityMod.Tiles.SunkenSea public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/NavystoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/EutrophicSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fifthTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency, thirdTileAdjacency, fourthTileAdjacency, fifthTileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out fourthTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, out fifthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, fourthTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, fifthTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index 74044959e9..a3aeacc993 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -9,10 +9,10 @@ namespace CalamityMod.Tiles.SunkenSea { public class Navystone : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; - public byte[,] fourthTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; + public TileFraming.MergeFrameData fourthTileAdjacency; public override void SetStaticDefaults() { @@ -27,10 +27,10 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(31, 92, 114)); HitSound = SoundID.Tink; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -40,18 +40,15 @@ namespace CalamityMod.Tiles.SunkenSea public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/EutrophicSandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, out thirdTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, thirdTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, thirdTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/SunkenSea/SeaPrism.cs b/Tiles/SunkenSea/SeaPrism.cs index 0b027a5498..ba13529eb1 100644 --- a/Tiles/SunkenSea/SeaPrism.cs +++ b/Tiles/SunkenSea/SeaPrism.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.SunkenSea { public class SeaPrism : ModTile { - public byte[,] tileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; private const short subsheetWidth = 450; private const short subsheetHeight = 198; @@ -32,7 +32,7 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileSpelunker[Type] = true; MinPick = 55; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge", out tileAdjacency); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -48,12 +48,12 @@ namespace CalamityMod.Tiles.SunkenSea public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/NavystoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index 654fb1b1b5..ec3ea3c715 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles private int extraFrameHeight = 36; private int extraFrameWidth = 90; - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { @@ -32,9 +32,9 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(174, 108, 46)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); } public override bool CreateDust(int i, int j, ref int type) @@ -71,16 +71,14 @@ namespace CalamityMod.Tiles public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/MudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } diff --git a/Tiles/VernalSoil.cs b/Tiles/VernalSoil.cs index 145e6acf38..88278f7e13 100644 --- a/Tiles/VernalSoil.cs +++ b/Tiles/VernalSoil.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Tiles { public class VernalSoil : ModTile { - public byte[,] tileAdjacency; - public byte[,] secondTileAdjacency; - public byte[,] thirdTileAdjacency; + public TileFraming.MergeFrameData tileAdjacency; + public TileFraming.MergeFrameData secondTileAdjacency; + public TileFraming.MergeFrameData thirdTileAdjacency; public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -29,9 +29,9 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(80, 120, 0)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); } public override void RandomUpdate(int i, int j) @@ -152,16 +152,14 @@ namespace CalamityMod.Tiles public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/MudMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/StoneMerge"); - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, out secondTileAdjacency[i, j]); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); + TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); return true; } diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 9b2bd1def6..aee60029f2 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Abyss.AbyssAmbient; @@ -22,7 +23,26 @@ namespace CalamityMod // OnModLoad is guaranteed to be run after all content has autoloaded. public static class TileFraming { - internal record struct MergeFrameData(byte[,] AdjacencyData, string BlendSheetPath, int FrameOffsetX = 0, int FrameOffsetY = 0); + public sealed class MergeFrameData + { + public byte[,] AdjacencyData { get; } + + public int FrameOffsetX { get; } + + public int FrameOffsetY { get; } + + public Asset BlendSheet => blendSheet.Value; + + private readonly Lazy> blendSheet; + + public MergeFrameData(byte[,] adjacencyData, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) + { + AdjacencyData = adjacencyData; + FrameOffsetX = frameOffsetX; + FrameOffsetY = frameOffsetY; + blendSheet = new Lazy>(() => ModContent.Request(blendSheetPath)); + } + } private static int[][] PlantCheckAgainst; private static Dictionary VineToGrass; @@ -1932,10 +1952,10 @@ namespace CalamityMod /// /// Call this in SetStaticDefaults. Used to set up the adjacency data array with the correct dimensions. /// - internal static void SetUpUniversalMerge(int myType, int mergeType, out byte[,] adjacencyData) + internal static void SetUpUniversalMerge(int myType, int mergeType, string blendSheetPath, out MergeFrameData adjacencyData) { CalamityUtils.SetMerge(myType, mergeType, true); - adjacencyData = new byte[Main.tile.Width, Main.tile.Height]; + adjacencyData = new MergeFrameData(new byte[Main.tile.Width, Main.tile.Height], blendSheetPath); } /// @@ -1955,16 +1975,9 @@ namespace CalamityMod internal static void DrawUniversalMergeFrames(int x, int y, MergeFrameData mergeFrameData, Color shadingColour, Tile myTile) { byte[,] adjacencyData = mergeFrameData.AdjacencyData; - string blendSheetPath = mergeFrameData.BlendSheetPath; + var blendLayer = mergeFrameData.BlendSheet.Value; int frameOffsetX = mergeFrameData.FrameOffsetX; int frameOffsetY = mergeFrameData.FrameOffsetY; - - if (!cachedBlendSheets.TryGetValue(blendSheetPath, out var blendLayerAsset)) - { - blendLayerAsset = cachedBlendSheets[blendSheetPath] = ModContent.Request(blendSheetPath); - } - - var blendLayer = blendLayerAsset.Value; Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(x * 16 - Main.screenPosition.X, y * 16 - Main.screenPosition.Y) + zero; @@ -2324,13 +2337,14 @@ namespace CalamityMod /// /// Call this in TileFrame. Used to generate adjacency data used in DrawUniversalMergeFrames. Tiles using this need a 2d byte array /// - internal static void GetAdjacencyData(int x, int y, int blendType, out byte adjacencyData) + internal static void GetAdjacencyData(int x, int y, int blendType, MergeFrameData data) { // bit to relative tile pos for reference // 4 0 5 // 3 X 1 // 7 2 6 // 01234567 + ref byte adjacencyData = ref data.AdjacencyData[x, y]; adjacencyData = 0b00000000; if (x < 0 || x >= Main.maxTilesX) From 595954aa070a5d7cdb0e31e1c7cb7663e02adef3 Mon Sep 17 00:00:00 2001 From: tomat Date: Fri, 10 May 2024 23:25:34 -0700 Subject: [PATCH 106/197] Minor null safety. --- Utilities/TileFraming.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index aee60029f2..d1706a93b3 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -1968,6 +1968,10 @@ namespace CalamityMod foreach (var frame in mergeFrames) { + // If it hasn't yet been initialized somehow... for some reason. + if (frame is null) + continue; + DrawUniversalMergeFrames(x, y, frame, shadingColour, myTile); } } From d0ba65a5ba613bac21fc2c793293f4ffad45d07e Mon Sep 17 00:00:00 2001 From: tomat Date: Fri, 10 May 2024 23:26:49 -0700 Subject: [PATCH 107/197] Reuse cache in MergeFrameData constructor. --- Utilities/TileFraming.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index d1706a93b3..302abec9a0 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -30,17 +30,21 @@ namespace CalamityMod public int FrameOffsetX { get; } public int FrameOffsetY { get; } - - public Asset BlendSheet => blendSheet.Value; - - private readonly Lazy> blendSheet; + + public Asset BlendSheet { get; } public MergeFrameData(byte[,] adjacencyData, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) { AdjacencyData = adjacencyData; FrameOffsetX = frameOffsetX; FrameOffsetY = frameOffsetY; - blendSheet = new Lazy>(() => ModContent.Request(blendSheetPath)); + + if (!cachedBlendSheets.TryGetValue(blendSheetPath, out var blendSheet)) + { + blendSheet = cachedBlendSheets[blendSheetPath] = ModContent.Request(blendSheetPath); + } + + BlendSheet = blendSheet; } } From 76e42f7f748f5ebb99d411a2680c272b560b3b29 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 11 May 2024 12:47:22 -0700 Subject: [PATCH 108/197] Norfleet menu bug fix --- Items/Weapons/Ranged/Norfleet.cs | 13 ++-- Projectiles/Ranged/NorfleetCannon.cs | 92 ++++++++++++++++------------ 2 files changed, 63 insertions(+), 42 deletions(-) diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index 9521be1ca9..a2196adcf7 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; @@ -46,13 +47,16 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.Calamity().NorfleetCounter >= 3) + // Funny punishment for trying to cheeese with Norfleet + bool cheater = (player.Calamity().NorfleetCounter >= 3 && player.Calamity().NorfleetCounter < 1000); + + if (cheater) { SoundStyle fire = new("CalamityMod/Sounds/Item/NuhUhUh"); SoundEngine.PlaySound(fire, player.Center); } - Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, (player.Calamity().NorfleetCounter >= 3 ? 1000 : 0), loadedShots); + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, (cheater ? 1000 : 0), loadedShots); // We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out. holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); @@ -63,7 +67,8 @@ namespace CalamityMod.Items.Weapons.Ranged if (loadedShots <= 0) { loadedShots = 3; - player.Calamity().NorfleetCounter = 0; + if (player.Calamity().NorfleetCounter < 1000) + player.Calamity().NorfleetCounter = 0; } return false; } diff --git a/Projectiles/Ranged/NorfleetCannon.cs b/Projectiles/Ranged/NorfleetCannon.cs index 503d3cbffb..ef613d8622 100644 --- a/Projectiles/Ranged/NorfleetCannon.cs +++ b/Projectiles/Ranged/NorfleetCannon.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.Intrinsics.X86; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using Humanizer; @@ -37,6 +38,7 @@ namespace CalamityMod.Projectiles.Ranged public Color mainColor = Color.White; public Color randomColor = Color.White; public int colorTimer = 0; + public bool hasFired = false; public bool PUNISHMENTMODE = false; public override void SetDefaults() @@ -176,49 +178,62 @@ namespace CalamityMod.Projectiles.Ranged private void ShootRocket(Item item) { - // We use the velocity of this projectile as its direction vector. - Vector2 shootDirection = Projectile.velocity.SafeNormalize(Vector2.Zero); - - // The position of the tip of the gun. - Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 73f; - - // Spawns the projectile. - SoundStyle fire = new("CalamityMod/Sounds/Item/NorfleetFire"); - SoundEngine.PlaySound(fire with { Volume = 0.9f, PitchVariance = 0.25f }, Projectile.Center); - - for (int i = 0; i < 3; i++) + if (hasFired == false) { - Vector2 firingVelocity = shootDirection.RotatedByRandom((0.2f * i) + 0.02f) * 5f * Main.rand.NextFloat(0.7f, 1.3f); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, i, PUNISHMENTMODE ? 1 : 0); + // We use the velocity of this projectile as its direction vector. + Vector2 shootDirection = Projectile.velocity.SafeNormalize(Vector2.Zero); + + // The position of the tip of the gun. + Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 73f; + + // Spawns the projectile. + SoundStyle fire = new("CalamityMod/Sounds/Item/NorfleetFire"); + SoundEngine.PlaySound(fire with { Volume = 0.9f, PitchVariance = 0.25f }, Projectile.Center); + + for (int i = 0; i < 3; i++) + { + Vector2 firingVelocity = shootDirection.RotatedByRandom((0.2f * i) + 0.02f) * 5f * Main.rand.NextFloat(0.7f, 1.3f); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, i, PUNISHMENTMODE ? 1 : 0); + } + + NetUpdate(); + + // Inside here go all the things that dedicated servers shouldn't spend resources on. + // Like visuals and sounds. + if (Main.dedServ) + return; + + for (int k = 0; k < 30; k++) + { + Vector2 shootVel = (shootDirection * 10).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 1.8f); + + Dust dust2 = Dust.NewDustPerfect(tipPosition, Main.rand.NextBool(4) ? 264 : 66, shootVel); + dust2.scale = Main.rand.NextFloat(1.15f, 1.45f); + dust2.noGravity = true; + if (dust2.type == 66) + dust2.color = Main.rand.NextBool() ? Color.DarkViolet : Color.MediumOrchid; + else + dust2.color = Color.White; + } + for (int k = 0; k < 15; k++) + { + Particle pulse = new GlowSparkParticle((tipPosition - shootDirection * 14) + Main.rand.NextVector2Circular(12, 12), shootDirection * 17 * Main.rand.NextFloat(0.35f, 1.35f), false, Main.rand.Next(7, 11 + 1), 0.025f * Main.rand.NextFloat(0.45f, 1.25f), Color.MediumOrchid, new Vector2(1.5f, 0.9f), true); + GeneralParticleHandler.SpawnParticle(pulse); + } + + // By decreasing the offset length of the gun from the arms, we give an effect of recoil. + OffsetLength -= 34f; + hasFired = true; } - - NetUpdate(); - - // Inside here go all the things that dedicated servers shouldn't spend resources on. - // Like visuals and sounds. - if (Main.dedServ) - return; - - for (int k = 0; k < 30; k++) + else { - Vector2 shootVel = (shootDirection * 10).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 1.8f); - - Dust dust2 = Dust.NewDustPerfect(tipPosition, Main.rand.NextBool(4) ? 264 : 66, shootVel); - dust2.scale = Main.rand.NextFloat(1.15f, 1.45f); - dust2.noGravity = true; - if (dust2.type == 66) - dust2.color = Main.rand.NextBool() ? Color.DarkViolet : Color.MediumOrchid; + if (Owner.Calamity().NorfleetCounter >= 1000) + Owner.Calamity().NorfleetCounter = 3; else - dust2.color = Color.White; - } - for (int k = 0; k < 15; k++) - { - Particle pulse = new GlowSparkParticle((tipPosition - shootDirection * 14) + Main.rand.NextVector2Circular(12, 12), shootDirection * 17 * Main.rand.NextFloat(0.35f, 1.35f), false, Main.rand.Next(7, 11 + 1), 0.025f * Main.rand.NextFloat(0.45f, 1.25f), Color.MediumOrchid, new Vector2(1.5f, 0.9f), true); - GeneralParticleHandler.SpawnParticle(pulse); - } + Owner.Calamity().NorfleetCounter = 1000; - // By decreasing the offset length of the gun from the arms, we give an effect of recoil. - OffsetLength -= 34f; + Projectile.Kill(); + } } private void PostFiringCooldown() { @@ -277,6 +292,7 @@ namespace CalamityMod.Projectiles.Ranged SoundStyle click = new("CalamityMod/Sounds/Item/DudFire"); SoundEngine.PlaySound(click with { Volume = 1f, Pitch = 0.7f }, Projectile.Center); + Owner.Calamity().NorfleetCounter = 0; } if (PostFireCooldown > 15) { From 3ff6ff94e7871199b6f2a58cbc6101eb0ba15655 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 11 May 2024 13:15:13 -0700 Subject: [PATCH 109/197] Norfleet death message --- CalPlayer/CalamityPlayerHitHurt.cs | 2 ++ Items/Weapons/Ranged/Norfleet.cs | 2 ++ Localization/en-US/Mods.CalamityMod.Status.Death.hjson | 1 + 3 files changed, 5 insertions(+) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 468f6701bd..9a80787960 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -490,6 +490,8 @@ namespace CalamityMod.CalPlayer if (Main.zenithWorld) SoundEngine.PlaySound(LeonDeathNoiseRE4_ForGFB, Player.Center); + if (NorfleetCounter >= 3 && NorfleetCounter < 1000) + damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Norfleet").Format(Player.name)); NorfleetCounter = 0; if (NPC.AnyNPCs(ModContent.NPCType())) diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index a2196adcf7..39084761b7 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -49,6 +49,8 @@ namespace CalamityMod.Items.Weapons.Ranged { // Funny punishment for trying to cheeese with Norfleet bool cheater = (player.Calamity().NorfleetCounter >= 3 && player.Calamity().NorfleetCounter < 1000); + if (player.Calamity().NorfleetCounter >= 1000) + loadedShots = 1; if (cheater) { diff --git a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson index cfc9b69a4a..7a65173f13 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson @@ -73,6 +73,7 @@ MiracleBlight1: "{0} was blown away by miraculous technological advancements." MiracleBlight2: "{0} disintegrated from the overpowering exotic resonance." MiracleBlight3: "{0}'s constituent atoms rearranged themselves... poorly." NecroRevive: "{0} fell to the inevitable." +Norfleet: Norfleet showed {0} what happens to cheaters. Nightwither: "{0} was enervated by lunar rays." Plague1: "{0}'s flesh was melted by the plague." Plague2: "{0} couldn't vaccinate against the plague." From f3a5aba9ca29b561eaf93427ba8eb0f3562aa0e5 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 11 May 2024 14:12:26 -0700 Subject: [PATCH 110/197] Fixed holdouts with endlag breaking when using menu items --- .../BaseProjectiles/BaseGunHoldoutProjectile.cs | 2 +- Projectiles/Magic/OmicronHoldout.cs | 4 ++-- Projectiles/Ranged/NorfleetCannon.cs | 2 +- Projectiles/Ranged/TheHiveHoldout.cs | 10 +++------- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs index 847d09ec5d..f231b4f8d2 100644 --- a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles /// public virtual void KillHoldoutLogic() { - if (Owner.CantUseHoldout() || HeldItem.type != AssociatedItemID) + if (Owner.CantUseHoldout()) { Projectile.netUpdate = true; Projectile.Kill(); diff --git a/Projectiles/Magic/OmicronHoldout.cs b/Projectiles/Magic/OmicronHoldout.cs index 98e9b76c57..35fe35a888 100644 --- a/Projectiles/Magic/OmicronHoldout.cs +++ b/Projectiles/Magic/OmicronHoldout.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Magic public override void KillHoldoutLogic() { - if (HeldItem.type != Owner.ActiveItem().type || Owner is null || !Owner.active || Owner.CCed || Owner.dead || Owner.noItems) + if (Owner is null || !Owner.active || Owner.CCed || Owner.dead || Owner.noItems) { if (PostFireCooldown <= 0) Projectile.Kill(); @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic Item heldItem = Owner.ActiveItem(); // Fire if the owner stops channeling or otherwise cannot use the weapon. - if (Owner.CantUseHoldout() || heldItem.type != ModContent.ItemType()) + if (Owner.CantUseHoldout()) { if (PostFireCooldown <= 0) Projectile.Kill(); diff --git a/Projectiles/Ranged/NorfleetCannon.cs b/Projectiles/Ranged/NorfleetCannon.cs index ef613d8622..4963bd6007 100644 --- a/Projectiles/Ranged/NorfleetCannon.cs +++ b/Projectiles/Ranged/NorfleetCannon.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Ranged mainColor = Color.Lerp(mainColor, variedColor, (PostFireCooldown <= 20 || recharging) ? 0.07f : 0); // If there's no player, or the player is the server, or the owner's stunned, there'll be no holdout. - if (Owner.CantUseHoldout() && !HasLetGo || heldItem.type != ModContent.ItemType()) + if (Owner.CantUseHoldout() && !HasLetGo) { if (SoundEngine.TryGetActiveSound(NorfleetRecharge, out var hum) && hum.IsPlaying) { diff --git a/Projectiles/Ranged/TheHiveHoldout.cs b/Projectiles/Ranged/TheHiveHoldout.cs index 6d2e6234a6..80d1f8a77f 100644 --- a/Projectiles/Ranged/TheHiveHoldout.cs +++ b/Projectiles/Ranged/TheHiveHoldout.cs @@ -36,18 +36,13 @@ namespace CalamityMod.Projectiles.Ranged public override void KillHoldoutLogic() { - if (HeldItem.type != ItemType()) - { - Projectile.Kill(); - Projectile.netUpdate = true; - } - if (HasLetGo) PostFiringCooldown(); } public override void HoldoutAI() { + FireNuke = ShootingTimer > MaxCharge; // If there's no player, or the player is the server, or the owner's stunned, there'll be no holdout. @@ -57,7 +52,8 @@ namespace CalamityMod.Projectiles.Ranged { hum?.Stop(); } - ShootRocket(); + if (HeldItem.type == ItemType()) + ShootRocket(); NetUpdate(); HasLetGo = true; } From f78d9b7c882c207c0900749ff0b1af6ecfcc488e Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 11 May 2024 17:32:13 -0500 Subject: [PATCH 111/197] Nerfed Festive Wings ornament projectiles. --- Items/CalamityGlobalItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 6c0d570a95..b743273ca7 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1443,7 +1443,7 @@ namespace CalamityMod.Items player.AddBuff(BuffID.DryadsWard, 5, true); // Dryad's Blessing } } - else if (item.type == ItemID.FestiveWings) // Drop powerful homing christmas tree bulbs while in flight + else if (item.type == ItemID.FestiveWings) // Drop homing christmas tree bulbs while in flight { player.noFallDmg = true; player.statLifeMax2 += 40; @@ -1452,13 +1452,13 @@ namespace CalamityMod.Items var source = player.GetSource_Accessory(item); if (player.controlJump && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart) { - int ornamentDamage = (int)player.GetBestClassDamage().ApplyTo(100); + int ornamentDamage = (int)player.GetBestClassDamage().ApplyTo(50); int p = Projectile.NewProjectile(source, player.Center, Vector2.UnitY * 2f, ProjectileID.OrnamentFriendly, ornamentDamage, 5f, player.whoAmI); if (p.WithinBounds(Main.maxProjectiles)) { Main.projectile[p].DamageType = DamageClass.Generic; Main.projectile[p].Calamity().lineColor = 1; - modPlayer.icicleCooldown = 10; + modPlayer.icicleCooldown = 15; } } } From 889ae7b046d33166fffc070282e7f14a1b86202e Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 11 May 2024 17:57:40 -0500 Subject: [PATCH 112/197] Decreased Master Rev+ Destroyer laser fire rate. --- NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 8872b6bebe..476adb1eda 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -489,8 +489,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Laser rate of fire - float shootProjectileTime = death ? (masterMode ? (phase5 ? 30f : phase4 ? 60f : 90f) : 270f) : (masterMode ? (phase5 ? 90f : phase4 ? 120f : 150f) : 450f); - float bodySegmentTime = npc.ai[0] * (masterMode ? 15f : 30f); + float shootProjectileTime = death ? (masterMode ? (phase5 ? 120f : phase4 ? 150f : 180f) : 270f) : (masterMode ? (phase5 ? 150f : phase4 ? 210f : 270f) : 450f); + float bodySegmentTime = npc.ai[0] * (masterMode ? 20f : 30f); float shootProjectileGateValue = bodySegmentTime + shootProjectileTime; float laserTimerIncrement = (calamityGlobalNPC.newAI[0] > shootProjectileGateValue - LaserTelegraphTime) ? 1f : 2f; if (ableToFireLaser) From 5a506556b6aeade7b4143b20deae9fe89b99af81 Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 16:40:39 -0700 Subject: [PATCH 113/197] Implement IVisibleThroughWater interface and associated helper class. --- Walls/IVisibleThroughWater.cs | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Walls/IVisibleThroughWater.cs diff --git a/Walls/IVisibleThroughWater.cs b/Walls/IVisibleThroughWater.cs new file mode 100644 index 0000000000..1514e9137f --- /dev/null +++ b/Walls/IVisibleThroughWater.cs @@ -0,0 +1,51 @@ +using System; +using System.Diagnostics; +using Microsoft.Xna.Framework; +using Terraria.Localization; +using Terraria.Map; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + /// + /// Walls that implement this interface may be revealed on the map through + /// water. This allows them to show on the map despite always being + /// submerged. + /// + public interface IVisibleThroughWater : ILoadable + { + int WaterMapEntry { get; set; } + } + + internal static class VisibleThroughWater + { + public const float WaterTransparency = 0.5f; + public static readonly Color WaterColor = new Color(9, 61, 191); + + public static void AddEntries(this IVisibleThroughWater visibleThroughWater, Color baseColor, LocalizedText text = null) + { + AssertIsWall(visibleThroughWater, out var wall); + wall.AddMapEntry(baseColor, text); + wall.AddMapEntry(Color.Lerp(baseColor, WaterColor, WaterTransparency), text); + } + + public static void InitializeWaterMapEntryLookups() + { + foreach (var visibleThroughWater in CalamityMod.Instance.GetContent()) + { + AssertIsWall(visibleThroughWater, out var wall); + visibleThroughWater.WaterMapEntry = MapHelper.wallLookup[wall.Type] + 1; + } + } + + [DebuggerStepThrough] + [StackTraceHidden] + private static void AssertIsWall(IVisibleThroughWater visibleThroughWater, out ModWall wall) + { + if (visibleThroughWater is not ModWall theWall) + throw new InvalidCastException($"{nameof(IVisibleThroughWater)} is implemented on type {visibleThroughWater.GetType().FullName}; said type should inherit from {nameof(ModWall)}"); + + wall = theWall; + } + } +} From 195eb51b2dd484ed76e0802fb03445022f6930bc Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 16:54:52 -0700 Subject: [PATCH 114/197] Associated IL edit for showing the waterlogged wall map entry. --- ILEditing/ILChangesLoading.cs | 4 ++ ILEditing/VanillaStupidityFixingILChanges.cs | 59 ++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 04892f9102..2c8fb20700 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -13,6 +13,7 @@ using Terraria.GameContent.Liquid; using Terraria.GameContent.UI.Elements; using Terraria.GameContent.UI.States; using Terraria.Graphics.Light; +using Terraria.Map; using Terraria.ModLoader; namespace CalamityMod.ILEditing @@ -160,6 +161,9 @@ namespace CalamityMod.ILEditing // Fix vanilla not accounting for multiple bobbers when fishing with truffle worm IL_Player.ItemCheck_CheckFishingBobbers += FixTruffleWormFishing; + + // Allow specified walls to be visible through water on the map + IL_MapHelper.CreateMapTile += UseVisibleThroughWaterMapTile; //Additional detours that are in their own item files given they are only relevant to these specific items: //Rover drive detours on Player.DrawInfernoRings to draw its shield diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index 379e93326d..11e06f825f 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -7,12 +7,14 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.TreasureBags.MiscGrabBags; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.Walls; using Microsoft.Xna.Framework; using Mono.Cecil.Cil; using MonoMod.Cil; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Map; using Terraria.ModLoader; namespace CalamityMod.ILEditing @@ -898,5 +900,62 @@ namespace CalamityMod.ILEditing } } #endregion + + #region Render Special Map Colors + private static void UseVisibleThroughWaterMapTile(ILContext il) + { + var c = new ILCursor(il); + + if (!c.TryGotoNext(x => x.MatchCall("get_Item"))) + { + LogFailure("Use VisibleThroughWater Map Tile", "Could not locate call to Terraria.Map.TileMap::get_Item."); + return; + } + + int tileIndex = -1; + if (!c.TryGotoNext(x => x.MatchStloc(out tileIndex)) || tileIndex == -1) + { + LogFailure("Use VisibleThroughWater Map Tile", "Could not determine the local variable index tile is pushed to."); + return; + } + + if (!c.TryGotoNext(x => x.MatchCall("liquidType"))) + { + LogFailure("Use VisibleThroughWater Map Tile", "Could not locate call to Terraria.Tile::liquidType."); + return; + } + + int liquidTypeIndex = -1; + if (!c.TryGotoNext(x => x.MatchStloc(out liquidTypeIndex)) || liquidTypeIndex == -1) + { + LogFailure("Use VisibleThroughWater Map Tile", "Could not determine the local variable index liquidType is pushed to."); + return; + } + + int relativeMapTypeIndex = -1; + if (!c.TryGotoNext(MoveType.After, x => x.MatchStloc(out relativeMapTypeIndex)) || relativeMapTypeIndex == -1) + { + LogFailure("Use VisibleThroughWater Map Tile", "Could not determine the local variable index of the relative map type."); + return; + } + + c.Emit(OpCodes.Ldloc_0); + c.Emit(OpCodes.Ldloc, relativeMapTypeIndex); + c.Emit(OpCodes.Ldloc, liquidTypeIndex); + c.EmitDelegate( + (Tile tile, int relativeMapType, int liquidType) => + { + if (liquidType != LiquidID.Water) + return relativeMapType; + + if (WallLoader.GetWall(tile.WallType) is IVisibleThroughWater visibleThroughWater) + return visibleThroughWater.WaterMapEntry; + + return relativeMapType; + } + ); + c.Emit(OpCodes.Stloc, relativeMapTypeIndex); + } + #endregion } } From bbb2f52c855ad0e700cbb28bbee450fd8f814731 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 11 May 2024 16:55:14 -0700 Subject: [PATCH 115/197] Made sure Norfleet kills you so you dont get stuck if you dodge the counter hit with a dodge you still die --- Projectiles/Ranged/NorfleetCannon.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Projectiles/Ranged/NorfleetCannon.cs b/Projectiles/Ranged/NorfleetCannon.cs index 4963bd6007..8035830c5c 100644 --- a/Projectiles/Ranged/NorfleetCannon.cs +++ b/Projectiles/Ranged/NorfleetCannon.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.Intrinsics.X86; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using Humanizer; @@ -240,7 +241,13 @@ namespace CalamityMod.Projectiles.Ranged Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 73f; if (PUNISHMENTMODE) - PostFireCooldown = 1000; + { + PostFireCooldown = 1000; + Owner.AddBuff(ModContent.BuffType(), 900); + Owner.AddBuff(ModContent.BuffType(), 900); + if (Owner.statLife > 1) + Owner.statLife = (int)(Owner.statLife * 0.99f); + } if (PostFireCooldown == 207) { From def3fe933b9dc21784034c5287cf06e3a06dc6f1 Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 16:57:25 -0700 Subject: [PATCH 116/197] Apply IVisibleThroughWater to all existing walls that it was applied to on the branch. --- Walls/IVisibleThroughWater.cs | 2 +- Walls/NavystoneWall.cs | 6 ++++-- Walls/NavystoneWallSafe.cs | 6 ++++-- Walls/SmoothNavystoneWall.cs | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Walls/IVisibleThroughWater.cs b/Walls/IVisibleThroughWater.cs index 1514e9137f..6beb43fcb2 100644 --- a/Walls/IVisibleThroughWater.cs +++ b/Walls/IVisibleThroughWater.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Walls public const float WaterTransparency = 0.5f; public static readonly Color WaterColor = new Color(9, 61, 191); - public static void AddEntries(this IVisibleThroughWater visibleThroughWater, Color baseColor, LocalizedText text = null) + public static void AddMapEntryWithWaterVisibility(this IVisibleThroughWater visibleThroughWater, Color baseColor, LocalizedText text = null) { AssertIsWall(visibleThroughWater, out var wall); wall.AddMapEntry(baseColor, text); diff --git a/Walls/NavystoneWall.cs b/Walls/NavystoneWall.cs index 80c3b49708..500df762c1 100644 --- a/Walls/NavystoneWall.cs +++ b/Walls/NavystoneWall.cs @@ -2,12 +2,14 @@ using Terraria.ModLoader; namespace CalamityMod.Walls { - public class NavystoneWall : ModWall + public class NavystoneWall : ModWall, IVisibleThroughWater { + int IVisibleThroughWater.WaterMapEntry { get; set; } + public override void SetStaticDefaults() { DustType = 96; - AddMapEntry(new Color(16, 45, 48)); + this.AddMapEntryWithWaterVisibility(new Color(16, 45, 48)); } public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; diff --git a/Walls/NavystoneWallSafe.cs b/Walls/NavystoneWallSafe.cs index 4690d5bddf..ef276c3a45 100644 --- a/Walls/NavystoneWallSafe.cs +++ b/Walls/NavystoneWallSafe.cs @@ -4,13 +4,15 @@ using Terraria.ModLoader; namespace CalamityMod.Walls { - public class NavystoneWallSafe : ModWall + public class NavystoneWallSafe : ModWall, IVisibleThroughWater { + int IVisibleThroughWater.WaterMapEntry { get; set; } + public override void SetStaticDefaults() { Main.wallHouse[Type] = true; DustType = 96; - AddMapEntry(new Color(0, 50, 50)); + this.AddMapEntryWithWaterVisibility(new Color(0, 50, 50)); } public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; diff --git a/Walls/SmoothNavystoneWall.cs b/Walls/SmoothNavystoneWall.cs index efffbffede..09dcbd2e6d 100644 --- a/Walls/SmoothNavystoneWall.cs +++ b/Walls/SmoothNavystoneWall.cs @@ -5,13 +5,15 @@ using Terraria.ModLoader; namespace CalamityMod.Walls { - public class SmoothNavystoneWall : ModWall + public class SmoothNavystoneWall : ModWall, IVisibleThroughWater { + int IVisibleThroughWater.WaterMapEntry { get; set; } + public override void SetStaticDefaults() { Main.wallHouse[Type] = true; - AddMapEntry(new Color(27, 35, 36)); + this.AddMapEntryWithWaterVisibility(new Color(27, 35, 36)); } public override bool CreateDust(int i, int j, ref int type) From b2974a7735f191ca9637c11bcd298f9745bedc6b Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 17:06:07 -0700 Subject: [PATCH 117/197] Actually call InitializeWateRMapEntryLookups. --- Walls/IVisibleThroughWater.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Walls/IVisibleThroughWater.cs b/Walls/IVisibleThroughWater.cs index 6beb43fcb2..189038f712 100644 --- a/Walls/IVisibleThroughWater.cs +++ b/Walls/IVisibleThroughWater.cs @@ -19,6 +19,14 @@ namespace CalamityMod.Walls internal static class VisibleThroughWater { + private sealed class VisibleThroughWaterSystem : ModSystem + { + public override void AddRecipes() + { + InitializeWaterMapEntryLookups(); + } + } + public const float WaterTransparency = 0.5f; public static readonly Color WaterColor = new Color(9, 61, 191); From 5884ec3c3f7eace6928a2bccf53776f1997d1d60 Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 17:06:36 -0700 Subject: [PATCH 118/197] Prefer PostSetupContent. --- Walls/IVisibleThroughWater.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Walls/IVisibleThroughWater.cs b/Walls/IVisibleThroughWater.cs index 189038f712..4fb76f80ca 100644 --- a/Walls/IVisibleThroughWater.cs +++ b/Walls/IVisibleThroughWater.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Walls { private sealed class VisibleThroughWaterSystem : ModSystem { - public override void AddRecipes() + public override void PostSetupContent() { InitializeWaterMapEntryLookups(); } From 92c2c1044e86ed52d39140f0eaafac514c60a8f7 Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 17:10:57 -0700 Subject: [PATCH 119/197] Revert "Prefer PostSetupContent." This reverts commit 5884ec3c3f7eace6928a2bccf53776f1997d1d60. --- Walls/IVisibleThroughWater.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Walls/IVisibleThroughWater.cs b/Walls/IVisibleThroughWater.cs index 4fb76f80ca..189038f712 100644 --- a/Walls/IVisibleThroughWater.cs +++ b/Walls/IVisibleThroughWater.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Walls { private sealed class VisibleThroughWaterSystem : ModSystem { - public override void PostSetupContent() + public override void AddRecipes() { InitializeWaterMapEntryLookups(); } From 63e024615e92a241a007691bd4b7ecc52a5272ce Mon Sep 17 00:00:00 2001 From: tomat Date: Sat, 11 May 2024 18:02:06 -0700 Subject: [PATCH 120/197] Add `IMergreableTile`, rewrite universal merging some more. Abstracted away boilerplate code for tile framing and drawing. Registration now handles set-up. --- Tiles/Abyss/AbyssGravel.cs | 26 +++----- Tiles/Abyss/HardenedSulphurousSandstone.cs | 28 +++------ Tiles/Abyss/PlantyMush.cs | 30 +++------ Tiles/Abyss/PyreMantle.cs | 26 ++------ Tiles/Abyss/PyreMantleMolten.cs | 27 +++----- Tiles/Abyss/SulphurousSand.cs | 33 +++------- Tiles/Abyss/SulphurousSandstone.cs | 28 +++------ Tiles/Abyss/SulphurousShale.cs | 29 +++------ Tiles/Abyss/Voidstone.cs | 23 +++---- Tiles/AerialiteBrick.cs | 19 +++--- Tiles/Astral/AstralClay.cs | 18 ++---- Tiles/Astral/AstralDirt.cs | 25 +++----- Tiles/Astral/AstralMonolith.cs | 11 ++-- Tiles/Astral/AstralStone.cs | 27 +++----- Tiles/Astral/NovaeSlag.cs | 29 +++------ Tiles/AstralBrick.cs | 17 +++-- Tiles/AstralDesert/AstralSand.cs | 31 +++------- Tiles/AstralDesert/AstralSandstone.cs | 29 +++------ Tiles/AstralDesert/CelestialRemains.cs | 23 +++---- Tiles/AstralDesert/HardenedAstralSand.cs | 34 +++------- Tiles/AstralSnow/AstralIce.cs | 25 +++----- Tiles/AstralSnow/AstralSnow.cs | 24 +++---- Tiles/Crags/BrimstoneSlab.cs | 19 +++--- Tiles/Crags/BrimstoneSlag.cs | 17 +++-- Tiles/Crags/ScorchedBone.cs | 20 +++--- Tiles/Crags/ScorchedRemains.cs | 23 +++---- Tiles/Crags/ScorchedRemainsGrass.cs | 22 ++----- Tiles/CryonicBrick.cs | 25 +++----- Tiles/DraedonStructures/LaboratoryPanels.cs | 25 +++----- .../LaboratoryPipePlating.cs | 20 +++--- Tiles/DraedonStructures/LaboratoryPlating.cs | 22 +++---- Tiles/DraedonStructures/RustedPlating.cs | 19 ++---- Tiles/IMergeableTile.cs | 62 +++++++++++++++++++ Tiles/Ores/AerialiteOre.cs | 28 +++------ Tiles/Ores/AerialiteOreDisenchanted.cs | 32 +++------- Tiles/Ores/AstralOre.cs | 18 ++---- Tiles/Ores/AuricOre.cs | 22 +++---- Tiles/Ores/ExodiumOre.cs | 22 ++----- Tiles/Ores/HallowedOre.cs | 17 ++--- Tiles/Ores/InfernalSuevite.cs | 24 ++----- Tiles/Ores/PerennialOre.cs | 23 ++----- Tiles/Ores/ScoriaOre.cs | 24 +++---- Tiles/Ores/UelibloomOre.cs | 26 +++----- Tiles/PerennialBrick.cs | 25 +++----- Tiles/ScoriaBrick.cs | 16 +++-- Tiles/SunkenSea/EutrophicSand.cs | 23 +++---- Tiles/SunkenSea/HardenedEutrophicSand.cs | 31 +++------- Tiles/SunkenSea/Navystone.cs | 27 +++----- Tiles/SunkenSea/SeaPrism.cs | 23 +++---- Tiles/UelibloomBrick.cs | 23 +++---- Tiles/VernalSoil.cs | 29 +++------ Utilities/TileFraming.cs | 13 ++-- 52 files changed, 428 insertions(+), 854 deletions(-) create mode 100644 Tiles/IMergeableTile.cs diff --git a/Tiles/Abyss/AbyssGravel.cs b/Tiles/Abyss/AbyssGravel.cs index 0a1f7e3e69..1754b7fc58 100644 --- a/Tiles/Abyss/AbyssGravel.cs +++ b/Tiles/Abyss/AbyssGravel.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Abyss.AbyssAmbient; +using System.Collections.Generic; +using CalamityMod.Tiles.Abyss.AbyssAmbient; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,14 +9,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class AbyssGravel : ModTile + public class AbyssGravel : ModTile, IMergeableTile { int animationFrameWidth = 234; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AbyssGravelMine", 3); + + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -31,8 +31,8 @@ namespace CalamityMod.Tiles.Abyss HitSound = MineSound; DustType = 33; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override bool CanExplode(int i, int j) @@ -157,17 +157,5 @@ namespace CalamityMod.Tiles.Abyss } frameXOffset = uniqueAnimationFrameX * animationFrameWidth; } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - return true; - } } } diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.cs b/Tiles/Abyss/HardenedSulphurousSandstone.cs index b6564cc824..e7f7eeb788 100644 --- a/Tiles/Abyss/HardenedSulphurousSandstone.cs +++ b/Tiles/Abyss/HardenedSulphurousSandstone.cs @@ -1,4 +1,5 @@ -using CalamityMod.World; +using System.Collections.Generic; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,11 +8,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class HardenedSulphurousSandstone : ModTile + public class HardenedSulphurousSandstone : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -24,9 +23,9 @@ namespace CalamityMod.Tiles.Abyss DustType = 32; AddMapEntry(new Color(76, 58, 59)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/SulphurousShaleMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/SulphurousShaleMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -43,19 +42,6 @@ namespace CalamityMod.Tiles.Abyss } } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; - } - public override void RandomUpdate(int i, int j) { int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); diff --git a/Tiles/Abyss/PlantyMush.cs b/Tiles/Abyss/PlantyMush.cs index 793328cb92..f80d61113a 100644 --- a/Tiles/Abyss/PlantyMush.cs +++ b/Tiles/Abyss/PlantyMush.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Abyss.AbyssAmbient; +using System.Collections.Generic; +using CalamityMod.Tiles.Abyss.AbyssAmbient; using CalamityMod.Walls; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -13,13 +14,11 @@ namespace CalamityMod.Tiles.Abyss { // Transforms any and all Tenebris in old worlds into planty mush. [LegacyName("Tenebris")] - public class PlantyMush : ModTile + public class PlantyMush : ModTile, IMergeableTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/PlantyMushMine", 3); - - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -35,9 +34,9 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(84, 102, 39), CalamityUtils.GetItemName()); HitSound = MineSound; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge"); } int animationFrameWidth = 234; @@ -201,18 +200,5 @@ namespace CalamityMod.Tiles.Abyss } } } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; - } } } diff --git a/Tiles/Abyss/PyreMantle.cs b/Tiles/Abyss/PyreMantle.cs index c942f61aa1..12d1cd6f9c 100644 --- a/Tiles/Abyss/PyreMantle.cs +++ b/Tiles/Abyss/PyreMantle.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using CalamityMod.Tiles.Abyss.AbyssAmbient; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -10,13 +11,11 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class PyreMantle : ModTile + public class PyreMantle : ModTile, IMergeableTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -33,9 +32,9 @@ namespace CalamityMod.Tiles.Abyss MinPick = 180; AddMapEntry(new Color(19, 20, 32)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -70,18 +69,5 @@ namespace CalamityMod.Tiles.Abyss NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None); } } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; - } } } diff --git a/Tiles/Abyss/PyreMantleMolten.cs b/Tiles/Abyss/PyreMantleMolten.cs index 1807a5f898..74c659b73f 100644 --- a/Tiles/Abyss/PyreMantleMolten.cs +++ b/Tiles/Abyss/PyreMantleMolten.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using CalamityMod.Tiles.Abyss.AbyssAmbient; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -10,15 +11,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class PyreMantleMolten : ModTile + public class PyreMantleMolten : ModTile, IMergeableTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; internal static Texture2D GlowTexture; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -39,10 +37,10 @@ namespace CalamityMod.Tiles.Abyss MinPick = 180; AddMapEntry(new Color(113, 49, 16)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge", out fourthTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -97,8 +95,6 @@ namespace CalamityMod.Tiles.Abyss TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawOffset, null, GetDrawColour(i, j, drawColour), default); glowbrightness += 0.3f; - - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) @@ -115,15 +111,6 @@ namespace CalamityMod.Tiles.Abyss b *= brightness; } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), fourthTileAdjacency); - return true; - } - private Color GetDrawColour(int i, int j, Color colour) { int colType = Main.tile[i, j].TileColor; diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index f782fe72ac..c0e83d585a 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -1,4 +1,5 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; +using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Enemy; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -15,12 +16,9 @@ namespace CalamityMod.Tiles.Abyss // It would create block swap issues with regular sulphurous sand and was rendered obsolete with the removal of this tile's water emission mechanic. // For compatibility reasons (including with schematics), however, that tile is converted into this one. [LegacyName("SulphurousSandNoWater")] - public class SulphurousSand : ModTile + public class SulphurousSand : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -37,10 +35,10 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(150, 100, 50)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/SulphurousSandstoneMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fourthTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/SulphurousSandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -175,20 +173,5 @@ namespace CalamityMod.Tiles.Abyss } } } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, fourthTileAdjacency); - return true; - } } } diff --git a/Tiles/Abyss/SulphurousSandstone.cs b/Tiles/Abyss/SulphurousSandstone.cs index 87a33f72eb..5b2c948dfe 100644 --- a/Tiles/Abyss/SulphurousSandstone.cs +++ b/Tiles/Abyss/SulphurousSandstone.cs @@ -1,4 +1,5 @@ -using CalamityMod.World; +using System.Collections.Generic; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,11 +8,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class SulphurousSandstone : ModTile + public class SulphurousSandstone : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -25,9 +24,9 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(113, 90, 71)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/HardenedSulphurousSandstoneMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/HardenedSulphurousSandstoneMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -44,19 +43,6 @@ namespace CalamityMod.Tiles.Abyss } } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; - } - public override void RandomUpdate(int i, int j) { int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); diff --git a/Tiles/Abyss/SulphurousShale.cs b/Tiles/Abyss/SulphurousShale.cs index 08420b4377..a3bb8abaf3 100644 --- a/Tiles/Abyss/SulphurousShale.cs +++ b/Tiles/Abyss/SulphurousShale.cs @@ -1,5 +1,6 @@ //using CalamityMod.Tiles.Abyss.AbyssAmbient; using System; +using System.Collections.Generic; using CalamityMod.Tiles.Abyss.AbyssAmbient; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -12,15 +13,14 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class SulphurousShale : ModTile + public class SulphurousShale : ModTile, IMergeableTile { int animationFrameWidth = 234; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AbyssGravelMine", 3); - + + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -35,9 +35,9 @@ namespace CalamityMod.Tiles.Abyss MinPick = 65; HitSound = MineSound; DustType = 33; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge"); } public override bool CanExplode(int i, int j) @@ -217,18 +217,5 @@ namespace CalamityMod.Tiles.Abyss } frameXOffset = uniqueAnimationFrameX * animationFrameWidth; } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; - } } } diff --git a/Tiles/Abyss/Voidstone.cs b/Tiles/Abyss/Voidstone.cs index 04d76cc971..45f6f30719 100644 --- a/Tiles/Abyss/Voidstone.cs +++ b/Tiles/Abyss/Voidstone.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using CalamityMod.Tiles.Abyss.AbyssAmbient; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -10,13 +11,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss { - public class Voidstone : ModTile + public class Voidstone : ModTile, IMergeableTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; internal static Texture2D GlowTexture; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -36,9 +36,9 @@ namespace CalamityMod.Tiles.Abyss MinPick = 180; AddMapEntry(new Color(15, 15, 15)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge"); } int animationFrameWidth = 234; @@ -276,15 +276,6 @@ namespace CalamityMod.Tiles.Abyss drawColour *= brightness; TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawOffset, null, GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/AerialiteBrick.cs b/Tiles/AerialiteBrick.cs index 7739ee7f46..73a3990d3f 100644 --- a/Tiles/AerialiteBrick.cs +++ b/Tiles/AerialiteBrick.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -6,10 +7,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { - public class AerialiteBrick : ModTile + public class AerialiteBrick : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -17,18 +18,12 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(68, 58, 145)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } diff --git a/Tiles/Astral/AstralClay.cs b/Tiles/Astral/AstralClay.cs index 31c5b1f44f..d5afdd919e 100644 --- a/Tiles/Astral/AstralClay.cs +++ b/Tiles/Astral/AstralClay.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -8,9 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Astral { - public class AstralClay : ModTile + public class AstralClay : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -29,17 +31,7 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.CanBeDugByShovel[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out tileAdjacency); - } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - return true; + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Astral/AstralDirt.cs b/Tiles/Astral/AstralDirt.cs index 33e9495283..4cd269dab8 100644 --- a/Tiles/Astral/AstralDirt.cs +++ b/Tiles/Astral/AstralDirt.cs @@ -1,4 +1,5 @@ -using CalamityMod.Dusts; +using System.Collections.Generic; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,10 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Astral { - public class AstralDirt : ModTile + public class AstralDirt : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -35,20 +36,8 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - return true; + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override void RandomUpdate(int i, int j) diff --git a/Tiles/Astral/AstralMonolith.cs b/Tiles/Astral/AstralMonolith.cs index 7559465207..9724660bfb 100644 --- a/Tiles/Astral/AstralMonolith.cs +++ b/Tiles/Astral/AstralMonolith.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,12 +10,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Astral { - public class AstralMonolith : ModTile + public class AstralMonolith : ModTile, IMergeableTile { private static int sheetWidth = 216; private static int sheetHeight = 72; - public TileFraming.MergeFrameData tileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -31,7 +32,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(45, 36, 63)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out tileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -86,14 +87,10 @@ namespace CalamityMod.Tiles.Astral { Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } - - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); TileFraming.CompactFraming(i, j, resetFrame); return false; } diff --git a/Tiles/Astral/AstralStone.cs b/Tiles/Astral/AstralStone.cs index feb347924f..5d4eb9f993 100644 --- a/Tiles/Astral/AstralStone.cs +++ b/Tiles/Astral/AstralStone.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -8,11 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Astral { - public class AstralStone : ModTile + public class AstralStone : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -33,22 +33,9 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.Conversion.Stone[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out thirdTileAdjacency); - } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Astral/NovaeSlag.cs b/Tiles/Astral/NovaeSlag.cs index f0f5006103..60fd932b1d 100644 --- a/Tiles/Astral/NovaeSlag.cs +++ b/Tiles/Astral/NovaeSlag.cs @@ -1,4 +1,5 @@ -using CalamityMod.Dusts; +using System.Collections.Generic; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -10,11 +11,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Astral { [LegacyName("AstralSilt")] - public class NovaeSlag : ModTile + public class NovaeSlag : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -33,9 +33,9 @@ namespace CalamityMod.Tiles.Astral TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; TileID.Sets.CanBeDugByShovel[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -45,19 +45,6 @@ namespace CalamityMod.Tiles.Astral return false; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - return true; - } - public override void NumDust(int i, int j, bool fail, ref int num) { num = fail ? 1 : 3; diff --git a/Tiles/AstralBrick.cs b/Tiles/AstralBrick.cs index 238d566933..3af5cfe613 100644 --- a/Tiles/AstralBrick.cs +++ b/Tiles/AstralBrick.cs @@ -1,4 +1,5 @@ -using CalamityMod.Dusts; +using System.Collections.Generic; +using CalamityMod.Dusts; using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -8,13 +9,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { - public class AstralBrick : ModTile + public class AstralBrick : ModTile, IMergeableTile { private const short subsheetWidth = 324; private const short subsheetHeight = 90; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -22,8 +23,8 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(128, 128, 158)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -34,8 +35,6 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } @@ -64,8 +63,6 @@ namespace CalamityMod.Tiles Tile trackTile = Main.tile[i, j]; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); - - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index c5ef51c6fd..b93e3e27db 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Typeless; +using System.Collections.Generic; +using CalamityMod.Projectiles.Typeless; using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -10,12 +11,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralDesert { - public class AstralSand : ModTile + public class AstralSand : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -39,28 +38,16 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.Falling[Type] = true; TileID.Sets.FallingBlockProjectile[Type] = new TileID.Sets.FallingBlockProjectileInfo(ModContent.ProjectileType(), 15); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fourthTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) { num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, fourthTileAdjacency); - return true; - } public override bool HasWalkDust() { diff --git a/Tiles/AstralDesert/AstralSandstone.cs b/Tiles/AstralDesert/AstralSandstone.cs index 60521b29dd..026c0bf2df 100644 --- a/Tiles/AstralDesert/AstralSandstone.cs +++ b/Tiles/AstralDesert/AstralSandstone.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -8,12 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralDesert { - public class AstralSandstone : ModTile + public class AstralSandstone : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -30,22 +29,10 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.Conversion.Sandstone[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); - } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, fourthTileAdjacency); - return true; + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/AstralDesert/CelestialRemains.cs b/Tiles/AstralDesert/CelestialRemains.cs index ccc1a9386b..515e549546 100644 --- a/Tiles/AstralDesert/CelestialRemains.cs +++ b/Tiles/AstralDesert/CelestialRemains.cs @@ -1,4 +1,5 @@ -using CalamityMod.Dusts; +using System.Collections.Generic; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -9,10 +10,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralDesert { [LegacyName("AstralFossil")] - public class CelestialRemains : ModTile + public class CelestialRemains : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -28,18 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandstoneMerge", out secondTileAdjacency); - } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); - return true; + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandstoneMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/AstralDesert/HardenedAstralSand.cs b/Tiles/AstralDesert/HardenedAstralSand.cs index 18f82c387d..0918cabd0a 100644 --- a/Tiles/AstralDesert/HardenedAstralSand.cs +++ b/Tiles/AstralDesert/HardenedAstralSand.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,13 +8,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralDesert { - public class HardenedAstralSand : ModTile + public class HardenedAstralSand : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; - public TileFraming.MergeFrameData fifthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -31,25 +29,11 @@ namespace CalamityMod.Tiles.AstralDesert TileID.Sets.Conversion.HardenedSand[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandstoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fifthTileAdjacency); - } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency, thirdTileAdjacency, fourthTileAdjacency, fifthTileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, fourthTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, fifthTileAdjacency); - return true; + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/AstralSnow/AstralIce.cs b/Tiles/AstralSnow/AstralIce.cs index 387d740651..a339f14e98 100644 --- a/Tiles/AstralSnow/AstralIce.cs +++ b/Tiles/AstralSnow/AstralIce.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Astral; +using System.Collections.Generic; +using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,10 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralSnow { - public class AstralIce : ModTile + public class AstralIce : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -36,8 +37,8 @@ namespace CalamityMod.Tiles.AstralSnow TileID.Sets.Conversion.Ice[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSnowMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralSnowMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -51,18 +52,6 @@ namespace CalamityMod.Tiles.AstralSnow base.FloorVisuals(player); } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); - return true; - } - public override bool IsTileBiomeSightable(int i, int j, ref Color sightColor) { sightColor = Color.Cyan; diff --git a/Tiles/AstralSnow/AstralSnow.cs b/Tiles/AstralSnow/AstralSnow.cs index 0163f674c3..6ab01d8390 100644 --- a/Tiles/AstralSnow/AstralSnow.cs +++ b/Tiles/AstralSnow/AstralSnow.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Astral; +using System.Collections.Generic; +using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,10 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralSnow { - public class AstralSnow : ModTile + public class AstralSnow : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -33,25 +34,14 @@ namespace CalamityMod.Tiles.AstralSnow TileID.Sets.ChecksForMerge[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowBlock, "CalamityMod/Tiles/Merges/SnowMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); + this.RegisterUniversalMerge(TileID.SnowBlock, "CalamityMod/Tiles/Merges/SnowMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) { num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.SnowBlock, secondTileAdjacency); - return true; - } public override bool IsTileBiomeSightable(int i, int j, ref Color sightColor) { diff --git a/Tiles/Crags/BrimstoneSlab.cs b/Tiles/Crags/BrimstoneSlab.cs index 4ef25e2170..04d2cd4666 100644 --- a/Tiles/Crags/BrimstoneSlab.cs +++ b/Tiles/Crags/BrimstoneSlab.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Crags; +using System.Collections.Generic; +using CalamityMod.Tiles.Crags; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,13 +9,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Crags { - public class BrimstoneSlab : ModTile + public class BrimstoneSlab : ModTile, IMergeableTile { private int subsheetWidth = 450; private int subsheetHeight = 198; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -30,8 +30,8 @@ namespace CalamityMod.Tiles.Crags HitSound = SoundID.Tink; DustType = 235; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); } public override bool CanExplode(int i, int j) @@ -49,14 +49,9 @@ namespace CalamityMod.Tiles.Crags frameXOffset = i % 2 * subsheetWidth; frameYOffset = j % 2 * subsheetHeight; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/Crags/BrimstoneSlag.cs b/Tiles/Crags/BrimstoneSlag.cs index 0cfba5440a..3a1a485968 100644 --- a/Tiles/Crags/BrimstoneSlag.cs +++ b/Tiles/Crags/BrimstoneSlag.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Ores; +using System.Collections.Generic; +using CalamityMod.Tiles.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,11 +8,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Crags { - public class BrimstoneSlag : ModTile + public class BrimstoneSlag : ModTile, IMergeableTile { private const short subsheetWidth = 450; private const short subsheetHeight = 198; - public TileFraming.MergeFrameData TileAdjacency; + + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,7 +28,7 @@ namespace CalamityMod.Tiles.Crags MineResist = 2f; MinPick = 100; AddMapEntry(new Color(53, 33, 56)); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out TileAdjacency); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -45,14 +48,8 @@ namespace CalamityMod.Tiles.Crags frameXOffset = i % 2 * subsheetWidth; frameYOffset = j % 2 * subsheetHeight; } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency); - } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Ash, TileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } diff --git a/Tiles/Crags/ScorchedBone.cs b/Tiles/Crags/ScorchedBone.cs index a3dd52a4e5..9a875a0ff7 100644 --- a/Tiles/Crags/ScorchedBone.cs +++ b/Tiles/Crags/ScorchedBone.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Ores; +using System.Collections.Generic; +using CalamityMod.Tiles.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,13 +8,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Crags { - public class ScorchedBone : ModTile + public class ScorchedBone : ModTile, IMergeableTile { private int sheetWidth = 450; private int sheetHeight = 198; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -28,8 +29,8 @@ namespace CalamityMod.Tiles.Crags MinPick = 100; AddMapEntry(new Color(87, 62, 67)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); } public override bool CanExplode(int i, int j) @@ -42,14 +43,9 @@ namespace CalamityMod.Tiles.Crags frameXOffset = i % 3 * sheetWidth; frameYOffset = j % 3 * sheetHeight; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/Crags/ScorchedRemains.cs b/Tiles/Crags/ScorchedRemains.cs index aad8514842..74f47d6744 100644 --- a/Tiles/Crags/ScorchedRemains.cs +++ b/Tiles/Crags/ScorchedRemains.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Ores; +using System.Collections.Generic; +using CalamityMod.Tiles.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,13 +8,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Crags { - public class ScorchedRemains : ModTile + public class ScorchedRemains : ModTile, IMergeableTile { private int sheetWidth = 234; private int sheetHeight = 90; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -28,8 +29,8 @@ namespace CalamityMod.Tiles.Crags MinPick = 100; AddMapEntry(new Color(57, 52, 72)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); } public override void RandomUpdate(int i, int j) @@ -61,15 +62,5 @@ namespace CalamityMod.Tiles.Crags frameXOffset = i % 3 * sheetWidth; frameYOffset = j % 3 * sheetHeight; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); - return true; - } } } diff --git a/Tiles/Crags/ScorchedRemainsGrass.cs b/Tiles/Crags/ScorchedRemainsGrass.cs index 5b048175b9..a83fa18de3 100644 --- a/Tiles/Crags/ScorchedRemainsGrass.cs +++ b/Tiles/Crags/ScorchedRemainsGrass.cs @@ -1,4 +1,5 @@ -using CalamityMod.Dusts; +using System.Collections.Generic; +using CalamityMod.Dusts; using CalamityMod.Tiles.Crags.Lily; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,15 +10,14 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Crags { - public class ScorchedRemainsGrass : ModTile + public class ScorchedRemainsGrass : ModTile, IMergeableTile { private const short subsheetWidth = 234; private const short subsheetHeight = 90; private int extraFrameHeight = 36; private int extraFrameWidth = 90; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -34,8 +34,8 @@ namespace CalamityMod.Tiles.Crags RegisterItemDrop(ModContent.ItemType()); AddMapEntry(new Color(212, 82, 227)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) @@ -158,16 +158,6 @@ namespace CalamityMod.Tiles.Crags DrawExtraWallEnds(i, j, leaves, drawOffset, drawColour); DrawExtraDrapes(i, j, leaves, drawOffset, drawColour); } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); - return true; - } #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) diff --git a/Tiles/CryonicBrick.cs b/Tiles/CryonicBrick.cs index f54729df77..96c010298a 100644 --- a/Tiles/CryonicBrick.cs +++ b/Tiles/CryonicBrick.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -6,13 +7,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { - public class CryonicBrick : ModTile + public class CryonicBrick : ModTile, IMergeableTile { int subsheetHeight = 90; int subsheetWidth = 234; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -24,8 +25,8 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(99, 131, 199)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowBlock, "CalamityMod/Tiles/Merges/SnowMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.SnowBlock, "CalamityMod/Tiles/Merges/SnowMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -34,13 +35,6 @@ namespace CalamityMod.Tiles return false; } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.SnowBlock, secondTileAdjacency); - return true; - } - public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { int xPos = i % 2; @@ -48,10 +42,5 @@ namespace CalamityMod.Tiles frameXOffset = xPos * subsheetWidth; frameYOffset = yPos * subsheetHeight; } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } } } diff --git a/Tiles/DraedonStructures/LaboratoryPanels.cs b/Tiles/DraedonStructures/LaboratoryPanels.cs index 359d896c74..61724a0d54 100644 --- a/Tiles/DraedonStructures/LaboratoryPanels.cs +++ b/Tiles/DraedonStructures/LaboratoryPanels.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; @@ -7,12 +8,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.DraedonStructures { - public class LaboratoryPanels : ModTile + public class LaboratoryPanels : ModTile, IMergeableTile { public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -26,22 +27,10 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(36, 35, 37)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override bool CanExplode(int i, int j) => false; - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - return true; - } } } diff --git a/Tiles/DraedonStructures/LaboratoryPipePlating.cs b/Tiles/DraedonStructures/LaboratoryPipePlating.cs index 7049d9a5fa..963d4ed162 100644 --- a/Tiles/DraedonStructures/LaboratoryPipePlating.cs +++ b/Tiles/DraedonStructures/LaboratoryPipePlating.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; @@ -7,12 +8,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.DraedonStructures { - public class LaboratoryPipePlating : ModTile + public class LaboratoryPipePlating : ModTile, IMergeableTile { public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,21 +26,14 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(91, 64, 56)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override bool CanExplode(int i, int j) => false; - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false); return false; } diff --git a/Tiles/DraedonStructures/LaboratoryPlating.cs b/Tiles/DraedonStructures/LaboratoryPlating.cs index 9f3cfaf47f..9f6e1c8f72 100644 --- a/Tiles/DraedonStructures/LaboratoryPlating.cs +++ b/Tiles/DraedonStructures/LaboratoryPlating.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; @@ -7,12 +8,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.DraedonStructures { - public class LaboratoryPlating : ModTile + public class LaboratoryPlating : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); + + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,21 +26,14 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(162, 157, 150)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override bool CanExplode(int i, int j) => false; - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } } diff --git a/Tiles/DraedonStructures/RustedPlating.cs b/Tiles/DraedonStructures/RustedPlating.cs index 1821f57e93..44eff8e23b 100644 --- a/Tiles/DraedonStructures/RustedPlating.cs +++ b/Tiles/DraedonStructures/RustedPlating.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; @@ -7,12 +8,11 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.DraedonStructures { - public class RustedPlating : ModTile + public class RustedPlating : ModTile, IMergeableTile { public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -26,21 +26,14 @@ namespace CalamityMod.Tiles.DraedonStructures MinPick = 30; AddMapEntry(new Color(128, 90, 77)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override bool CanExplode(int i, int j) => false; public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } } diff --git a/Tiles/IMergeableTile.cs b/Tiles/IMergeableTile.cs new file mode 100644 index 0000000000..9455c50bcc --- /dev/null +++ b/Tiles/IMergeableTile.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles +{ + /// + /// Interface for tiles that specify custom universal merge data. + /// + internal interface IMergeableTile + { + List TileAdjacencies { get; } + } + + internal static class MergeableTile + { + private sealed class MergeableTileGlobalTile : GlobalTile + { + public override void PostDraw(int i, int j, int type, SpriteBatch spriteBatch) + { + if (!TryGetMergeableTile(type, out var mergeableTile)) + return; + + TileFraming.DrawUniversalMergeFrames(i, j, mergeableTile.TileAdjacencies); + } + + public override bool TileFrame(int i, int j, int type, ref bool resetFrame, ref bool noBreak) + { + if (!TryGetMergeableTile(type, out var mergeableTile)) + return base.TileFrame(i, j, type, ref resetFrame, ref noBreak); + + foreach (var adjacency in mergeableTile.TileAdjacencies) + TileFraming.GetAdjacencyData(i, j, adjacency); + + return base.TileFrame(i, j, type, ref resetFrame, ref noBreak); + } + + private static bool TryGetMergeableTile(int type, [NotNullWhen(returnValue: true)] out IMergeableTile mergeableTile) + { + if (TileLoader.GetTile(type) is IMergeableTile theMergeableTile) + { + mergeableTile = theMergeableTile; + return true; + } + + mergeableTile = null; + return false; + } + } + + public static void RegisterUniversalMerge(this IMergeableTile mergeableTile, int tileId, string blendSheetPath) + { + if (mergeableTile is not ModTile tile) + throw new InvalidCastException($"{nameof(IMergeableTile)} is implemented on type {mergeableTile.GetType().FullName}; said type should inherit from {nameof(ModTile)}"); + + TileFraming.SetUpUniversalMerge(tile.Type, tileId, blendSheetPath, out var data); + mergeableTile.TileAdjacencies.Add(data); + } + } +} diff --git a/Tiles/Ores/AerialiteOre.cs b/Tiles/Ores/AerialiteOre.cs index 6755bfbc93..427c90d2b2 100644 --- a/Tiles/Ores/AerialiteOre.cs +++ b/Tiles/Ores/AerialiteOre.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -10,15 +11,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class AerialiteOre : ModTile + public class AerialiteOre : ModTile, IMergeableTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/MagicalRockMine", 3); internal static Texture2D GlowTexture; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { if (!Main.dedServ) @@ -47,10 +46,10 @@ namespace CalamityMod.Tiles.Ores HitSound = MineSound; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Cloud, "CalamityMod/Tiles/Merges/CloudMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.RainCloud, "CalamityMod/Tiles/Merges/RainCloudMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowCloud, "CalamityMod/Tiles/Merges/SnowCloudMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out fourthTileAdjacency); + this.RegisterUniversalMerge(TileID.Cloud, "CalamityMod/Tiles/Merges/CloudMerge"); + this.RegisterUniversalMerge(TileID.RainCloud, "CalamityMod/Tiles/Merges/RainCloudMerge"); + this.RegisterUniversalMerge(TileID.SnowCloud, "CalamityMod/Tiles/Merges/SnowCloudMerge"); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); } public override void PostSetDefaults() { @@ -63,14 +62,7 @@ namespace CalamityMod.Tiles.Ores { num = fail ? 1 : 3; } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Cloud, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.RainCloud, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.SnowCloud, thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, fourthTileAdjacency); - return true; - } + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) { r = 0.14f; @@ -275,8 +267,6 @@ namespace CalamityMod.Tiles.Ores { Main.spriteBatch.Draw(GlowTexture, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } - - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) { diff --git a/Tiles/Ores/AerialiteOreDisenchanted.cs b/Tiles/Ores/AerialiteOreDisenchanted.cs index 4ffed6529d..4780b063e0 100644 --- a/Tiles/Ores/AerialiteOreDisenchanted.cs +++ b/Tiles/Ores/AerialiteOreDisenchanted.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -6,14 +7,11 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class AerialiteOreDisenchanted : ModTile + public class AerialiteOreDisenchanted : ModTile, IMergeableTile { private const int AnimationFrameWidth = 234; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -41,10 +39,10 @@ namespace CalamityMod.Tiles.Ores HitSound = SoundID.Tink; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Cloud, "CalamityMod/Tiles/Merges/CloudMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.RainCloud, "CalamityMod/Tiles/Merges/RainCloudMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.SnowCloud, "CalamityMod/Tiles/Merges/SnowCloudMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out fourthTileAdjacency); + this.RegisterUniversalMerge(TileID.Cloud, "CalamityMod/Tiles/Merges/CloudMerge"); + this.RegisterUniversalMerge(TileID.RainCloud, "CalamityMod/Tiles/Merges/RainCloudMerge"); + this.RegisterUniversalMerge(TileID.SnowCloud, "CalamityMod/Tiles/Merges/SnowCloudMerge"); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); } public override void PostSetDefaults() { @@ -60,15 +58,7 @@ namespace CalamityMod.Tiles.Ores { return false; } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Cloud, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.RainCloud, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.SnowCloud, thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, fourthTileAdjacency); - return true; - } + public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { int uniqueAnimationFrameX = 0; @@ -159,9 +149,5 @@ namespace CalamityMod.Tiles.Ores } frameXOffset = uniqueAnimationFrameX * AnimationFrameWidth; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); - } } } diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index 0dae9e292a..c2e220d120 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using CalamityMod.Dusts; using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; @@ -9,9 +10,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class AstralOre : ModTile + public class AstralOre : ModTile, IMergeableTile { - public TileFraming.MergeFrameData TileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileLighted[Type] = true; @@ -37,7 +39,7 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.ChecksForMerge[Type] = true; TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge", out TileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AstralDirtMerge"); } public override void NearbyEffects(int i, int j, bool closer) { @@ -85,15 +87,5 @@ namespace CalamityMod.Tiles.Ores g *= brightness; b *= brightness; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, TileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), TileAdjacency); - return true; - } } } diff --git a/Tiles/Ores/AuricOre.cs b/Tiles/Ores/AuricOre.cs index a95fdf532a..8d5facedb2 100644 --- a/Tiles/Ores/AuricOre.cs +++ b/Tiles/Ores/AuricOre.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.DamageOverTime; +using System.Collections.Generic; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -13,14 +14,14 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.Ores { - public class AuricOre : ModTile + public class AuricOre : ModTile, IMergeableTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AuricMine", 3); public static bool Animate; internal static Texture2D GlowTexture; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { if (!Main.dedServ) @@ -45,8 +46,8 @@ namespace CalamityMod.Tiles.Ores MinPick = 250; HitSound = MineSound; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override bool CanExplode(int i, int j) @@ -95,15 +96,8 @@ namespace CalamityMod.Tiles.Ores Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); + } - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - return true; - } private Color GetDrawColour(int i, int j, Color colour) { int colType = Main.tile[i, j].TileColor; diff --git a/Tiles/Ores/ExodiumOre.cs b/Tiles/Ores/ExodiumOre.cs index d2049c3de3..41fc92d67f 100644 --- a/Tiles/Ores/ExodiumOre.cs +++ b/Tiles/Ores/ExodiumOre.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,10 +10,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class ExodiumOre : ModTile + public class ExodiumOre : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -35,19 +36,8 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.ChecksForMerge[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.LunarOre, "CalamityMod/Tiles/Merges/LuminiteMerge", out secondTileAdjacency); - } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.LunarOre, secondTileAdjacency); - return true; + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.LunarOre, "CalamityMod/Tiles/Merges/LuminiteMerge"); } public override bool CanExplode(int i, int j) => false; diff --git a/Tiles/Ores/HallowedOre.cs b/Tiles/Ores/HallowedOre.cs index 0a0945d708..049ca594f2 100644 --- a/Tiles/Ores/HallowedOre.cs +++ b/Tiles/Ores/HallowedOre.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,9 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class HallowedOre : ModTile + public class HallowedOre : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileLighted[Type] = true; @@ -32,7 +34,7 @@ namespace CalamityMod.Tiles.Ores HitSound = SoundID.Tink; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Pearlstone, "CalamityMod/Tiles/Merges/PearlstoneMerge", out tileAdjacency); + this.RegisterUniversalMerge(TileID.Pearlstone, "CalamityMod/Tiles/Merges/PearlstoneMerge"); } public override bool CanExplode(int i, int j) @@ -44,15 +46,6 @@ namespace CalamityMod.Tiles.Ores { num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Pearlstone, tileAdjacency); - return true; - } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) { diff --git a/Tiles/Ores/InfernalSuevite.cs b/Tiles/Ores/InfernalSuevite.cs index 5fdfc2f42a..4d00e3d10c 100644 --- a/Tiles/Ores/InfernalSuevite.cs +++ b/Tiles/Ores/InfernalSuevite.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Crags; +using System.Collections.Generic; +using CalamityMod.Tiles.Crags; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -9,13 +10,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { [LegacyName("CharredOre")] - public class InfernalSuevite : ModTile + public class InfernalSuevite : ModTile, IMergeableTile { private int sheetWidth = 234; private int sheetHeight = 90; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -36,8 +36,8 @@ namespace CalamityMod.Tiles.Ores DustType = 235; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/BrimstoneSlagMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); } public override bool CanExplode(int i, int j) @@ -62,17 +62,5 @@ namespace CalamityMod.Tiles.Ores g = 0f; b = 0f; } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Ash, secondTileAdjacency); - return true; - } } } diff --git a/Tiles/Ores/PerennialOre.cs b/Tiles/Ores/PerennialOre.cs index 832f0a2a85..08d732e51e 100644 --- a/Tiles/Ores/PerennialOre.cs +++ b/Tiles/Ores/PerennialOre.cs @@ -1,5 +1,6 @@  using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -10,13 +11,11 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class PerennialOre : ModTile + public class PerennialOre : ModTile, IMergeableTile { internal static Texture2D GlowTexture; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -41,9 +40,9 @@ namespace CalamityMod.Tiles.Ores HitSound = SoundID.Tink; Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge"); } int animationFrameWidth = 234; @@ -297,16 +296,6 @@ namespace CalamityMod.Tiles.Ores Color drawColour = GetDrawColour(i, j, new Color(175, 175, 175, 175)); Tile trackTile = Main.tile[i, j]; TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawOffset, null, GetDrawColour(i, j, drawColour), default); - - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); - return true; } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/Ores/ScoriaOre.cs b/Tiles/Ores/ScoriaOre.cs index 3eed42ea62..238f5f1cd4 100644 --- a/Tiles/Ores/ScoriaOre.cs +++ b/Tiles/Ores/ScoriaOre.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Environment; +using System.Collections.Generic; +using CalamityMod.Projectiles.Environment; using CalamityMod.Tiles.Abyss; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -11,10 +12,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { [LegacyName("ChaoticOre")] - public class ScoriaOre : ModTile + public class ScoriaOre : ModTile, IMergeableTile { - public TileFraming.MergeFrameData TileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -34,8 +34,8 @@ namespace CalamityMod.Tiles.Ores MinPick = 210; HitSound = SoundID.Tink; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge", out TileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/PyreMantleMerge"); } public override void NearbyEffects(int i, int j, bool closer) @@ -88,15 +88,7 @@ namespace CalamityMod.Tiles.Ores g = 0.00f; b = 0.00f; } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), TileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); - return true; - } - - + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { int xPos = Main.tile[i, j].TileFrameX; @@ -108,8 +100,6 @@ namespace CalamityMod.Tiles.Ores Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); - - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, TileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) diff --git a/Tiles/Ores/UelibloomOre.cs b/Tiles/Ores/UelibloomOre.cs index f7e98c0a9f..14ab406efd 100644 --- a/Tiles/Ores/UelibloomOre.cs +++ b/Tiles/Ores/UelibloomOre.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,11 +9,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Ores { - public class UelibloomOre : ModTile + public class UelibloomOre : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -31,9 +31,9 @@ namespace CalamityMod.Tiles.Ores Main.tileSpelunker[Type] = true; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge"); } public override bool CanExplode(int i, int j) @@ -45,17 +45,5 @@ namespace CalamityMod.Tiles.Ores { num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); - return true; - } } } diff --git a/Tiles/PerennialBrick.cs b/Tiles/PerennialBrick.cs index 889a62fb6d..9133c5f6cb 100644 --- a/Tiles/PerennialBrick.cs +++ b/Tiles/PerennialBrick.cs @@ -1,4 +1,5 @@  +using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -7,11 +8,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { - public class PerennialBrick : ModTile + public class PerennialBrick : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -25,9 +25,9 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(17, 133, 46)); AnimationFrameHeight = 90; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -36,17 +36,6 @@ namespace CalamityMod.Tiles Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.RedTorch, 0f, 0f, 1, new Color(255, 255, 255), 1f); return false; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); - return true; - } public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { diff --git a/Tiles/ScoriaBrick.cs b/Tiles/ScoriaBrick.cs index 1026b69d5c..800e5d6d57 100644 --- a/Tiles/ScoriaBrick.cs +++ b/Tiles/ScoriaBrick.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; @@ -9,13 +10,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { [LegacyName("ChaoticBrick")] - public class ScoriaBrick : ModTile + public class ScoriaBrick : ModTile, IMergeableTile { int subsheetHeight = 72; internal static Texture2D GlowTexture; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { if (!Main.dedServ) @@ -29,8 +30,8 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(85, 87, 101)); HitSound = SoundID.Tink; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -53,8 +54,6 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); TileFraming.CompactFraming(i, j, resetFrame); return false; } @@ -73,7 +72,6 @@ namespace CalamityMod.Tiles Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; TileFraming.SlopedGlowmask(i, j, 0, GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), GetDrawColour(i, j, drawColour), default); - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency); } private Color GetDrawColour(int i, int j, Color colour) { diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index 76b304999b..c9ef48f1f5 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Placeables; +using System.Collections.Generic; +using CalamityMod.Items.Placeables; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -9,11 +10,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.SunkenSea { - public class EutrophicSand : ModTile + public class EutrophicSand : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -33,9 +32,9 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 108; AddMapEntry(new Color(92, 145, 167)); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); } public override void RandomUpdate(int i, int j) @@ -65,16 +64,8 @@ namespace CalamityMod.Tiles.SunkenSea num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, thirdTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/SunkenSea/HardenedEutrophicSand.cs b/Tiles/SunkenSea/HardenedEutrophicSand.cs index 53551c2470..209e0a22cd 100644 --- a/Tiles/SunkenSea/HardenedEutrophicSand.cs +++ b/Tiles/SunkenSea/HardenedEutrophicSand.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -7,13 +8,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.SunkenSea { - public class HardenedEutrophicSand : ModTile + public class HardenedEutrophicSand : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; - public TileFraming.MergeFrameData fifthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -32,11 +29,11 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 108; AddMapEntry(new Color(67, 107, 143)); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out fifthTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -44,18 +41,8 @@ namespace CalamityMod.Tiles.SunkenSea num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, tileAdjacency, thirdTileAdjacency, fourthTileAdjacency, fifthTileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, fourthTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, fifthTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index a3aeacc993..8799172e30 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -7,12 +8,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.SunkenSea { - public class Navystone : ModTile + public class Navystone : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; - public TileFraming.MergeFrameData fourthTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -27,10 +25,10 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(31, 92, 114)); HitSound = SoundID.Tink; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge", out thirdTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge", out fourthTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -38,17 +36,8 @@ namespace CalamityMod.Tiles.SunkenSea num = fail ? 1 : 3; } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, secondTileAdjacency, thirdTileAdjacency, fourthTileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Sand, thirdTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, thirdTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/SunkenSea/SeaPrism.cs b/Tiles/SunkenSea/SeaPrism.cs index ba13529eb1..83d6da7082 100644 --- a/Tiles/SunkenSea/SeaPrism.cs +++ b/Tiles/SunkenSea/SeaPrism.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -7,13 +8,13 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.SunkenSea { - public class SeaPrism : ModTile + public class SeaPrism : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - private const short subsheetWidth = 450; - private const short subsheetHeight = 198; - + private const short subsheetHeight = 198; + + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -32,7 +33,7 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileSpelunker[Type] = true; MinPick = 55; - TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge", out tileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -45,15 +46,9 @@ namespace CalamityMod.Tiles.SunkenSea frameXOffset = i % 2 * subsheetWidth; frameYOffset = j % 2 * subsheetHeight; } - - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency); - } - + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), tileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } } diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index ec3ea3c715..ee453b6ab0 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -1,4 +1,5 @@ -using CalamityMod.Dusts.Furniture; +using System.Collections.Generic; +using CalamityMod.Dusts.Furniture; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -9,14 +10,12 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { - public class UelibloomBrick : ModTile + public class UelibloomBrick : ModTile, IMergeableTile { private int extraFrameHeight = 36; private int extraFrameWidth = 90; - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; public override void SetStaticDefaults() { @@ -32,9 +31,9 @@ namespace CalamityMod.Tiles HitSound = SoundID.Tink; AddMapEntry(new Color(174, 108, 46)); - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge"); } public override bool CreateDust(int i, int j, ref int type) @@ -69,16 +68,8 @@ namespace CalamityMod.Tiles DrawExtraDrapes(i, j, leaves, drawOffset, drawColour); } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); return TileFraming.BrimstoneFraming(i, j, resetFrame); } diff --git a/Tiles/VernalSoil.cs b/Tiles/VernalSoil.cs index 88278f7e13..eb4e766460 100644 --- a/Tiles/VernalSoil.cs +++ b/Tiles/VernalSoil.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; @@ -10,11 +11,10 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles { - public class VernalSoil : ModTile + public class VernalSoil : ModTile, IMergeableTile { - public TileFraming.MergeFrameData tileAdjacency; - public TileFraming.MergeFrameData secondTileAdjacency; - public TileFraming.MergeFrameData thirdTileAdjacency; + List IMergeableTile.TileAdjacencies { get; } = []; + public override void SetStaticDefaults() { Main.tileSolid[Type] = true; @@ -29,9 +29,9 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(80, 120, 0)); HitSound = SoundID.Dig; - TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge", out tileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge", out secondTileAdjacency); - TileFraming.SetUpUniversalMerge(Type, TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge", out thirdTileAdjacency); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge"); } public override void RandomUpdate(int i, int j) @@ -150,19 +150,6 @@ namespace CalamityMod.Tiles } } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, secondTileAdjacency, tileAdjacency); - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - TileFraming.GetAdjacencyData(i, j, TileID.Dirt, tileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Stone, secondTileAdjacency); - TileFraming.GetAdjacencyData(i, j, TileID.Mud, thirdTileAdjacency); - return true; - } - public override void NumDust(int i, int j, bool fail, ref int num) { num = fail ? 1 : 3; diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 302abec9a0..a657958050 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -27,15 +27,18 @@ namespace CalamityMod { public byte[,] AdjacencyData { get; } + public int TileID { get; } + public int FrameOffsetX { get; } public int FrameOffsetY { get; } public Asset BlendSheet { get; } - public MergeFrameData(byte[,] adjacencyData, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) + public MergeFrameData(byte[,] adjacencyData, int tileId, string blendSheetPath, int frameOffsetX = 0, int frameOffsetY = 0) { AdjacencyData = adjacencyData; + TileID = tileId; FrameOffsetX = frameOffsetX; FrameOffsetY = frameOffsetY; @@ -1959,13 +1962,13 @@ namespace CalamityMod internal static void SetUpUniversalMerge(int myType, int mergeType, string blendSheetPath, out MergeFrameData adjacencyData) { CalamityUtils.SetMerge(myType, mergeType, true); - adjacencyData = new MergeFrameData(new byte[Main.tile.Width, Main.tile.Height], blendSheetPath); + adjacencyData = new MergeFrameData(new byte[Main.tile.Width, Main.tile.Height], mergeType, blendSheetPath); } /// /// Call this in PostDraw. Uses adjacency data generated by GetAdjacencyData to draw the correct blend state over a given tile, regardless of what tile frame that tile is using /// - internal static void DrawUniversalMergeFrames(int x, int y, params MergeFrameData[] mergeFrames) + internal static void DrawUniversalMergeFrames(int x, int y, List mergeFrames) { Color shadingColour = Lighting.GetColor(x, y); Tile myTile = Main.tile[x, y]; @@ -2345,8 +2348,10 @@ namespace CalamityMod /// /// Call this in TileFrame. Used to generate adjacency data used in DrawUniversalMergeFrames. Tiles using this need a 2d byte array /// - internal static void GetAdjacencyData(int x, int y, int blendType, MergeFrameData data) + internal static void GetAdjacencyData(int x, int y, MergeFrameData data) { + int blendType = data.TileID; + // bit to relative tile pos for reference // 4 0 5 // 3 X 1 From eefbed941ee00d9a3cb58f5a262bc98114925b31 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 11 May 2024 20:34:32 -0500 Subject: [PATCH 121/197] pre-ml master boss damage stat scaling rebalance... --- DataStructures/NPCStats.cs | 386 ++++++++++++++++++------------------- 1 file changed, 193 insertions(+), 193 deletions(-) diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 15d755c415..4c0a22518d 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -294,16 +294,16 @@ namespace CalamityMod EnemyStats.ContactDamageValues = new SortedDictionary { - { NPCID.KingSlime, new int[] { 40, 64, 80, 96, 120 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 90 } }, + { NPCID.KingSlime, new int[] { 40, 64, 80, 96, 144 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, - { ModContent.NPCType(), new int[] { 45, 66, 88, 110, 132 } }, + { ModContent.NPCType(), new int[] { 45, 66, 88, 110, 165 } }, { ModContent.NPCType(), new int[] { 24, 32, 40, 48, 72 } }, { ModContent.NPCType(), new int[] { 18, 24, 30, 36, 54 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 90 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, { ModContent.NPCType(), new int[] { 21, 28, 32, 36, 63 } }, { ModContent.NPCType(), new int[] { 12, 16, 20, 24, 36 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 90 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, { ModContent.NPCType(), new int[] { 21, 28, 32, 36, 63 } }, { ModContent.NPCType(), new int[] { 12, 16, 20, 24, 36 } }, @@ -312,73 +312,73 @@ namespace CalamityMod 30, // 45 in phase 2 40, // 48 in phase 2, 56 in phase 3 50, // 60 in phase 2, 70 in phase 3 - 72 } }, // Vanilla: 108 in phase 2; Rev+: 86 in phase 2, 101 in phase 3 + 75 } }, // Vanilla: 113 in phase 2; Rev+: 90 in phase 2, 105 in phase 3 { NPCID.ServantofCthulhu, new int[] { 18, 24, 30, 36, 54 } }, - { ModContent.NPCType(), new int[] { 20, 26, 34, 42, 60 } }, // In phase 2: 26, 34, 44, 55, 78 + { ModContent.NPCType(), new int[] { 20, 26, 34, 42, 63 } }, // In phase 2: 26, 34, 44, 55, 82 - { ModContent.NPCType(), new int[] { 40, 64, 80, 96, 120 } }, - { ModContent.NPCType(), new int[] { 25, 50, 62, 74, 75 } }, + { ModContent.NPCType(), new int[] { 40, 64, 80, 96, 144 } }, + { ModContent.NPCType(), new int[] { 25, 50, 62, 74, 111 } }, - { NPCID.EaterofWorldsHead, new int[] { 38, 55, 77, 99, 132 } }, + { NPCID.EaterofWorldsHead, new int[] { 38, 55, 77, 99, 165 } }, { NPCID.EaterofWorldsBody, new int[] { 18, 24, 32, 40, 60 } }, - { NPCID.EaterofWorldsTail, new int[] { 12, 16, 24, 32, 36 } }, + { NPCID.EaterofWorldsTail, new int[] { 12, 16, 24, 32, 48 } }, { NPCID.VileSpitEaterOfWorlds, new int[] { -1, 64, 64, 64, 96 } }, - { NPCID.BrainofCthulhu, new int[] { 36, 54, 81, 108, 135 } }, - { NPCID.Creeper, new int[] { 24, 36, 66, 96, 120 } }, + { NPCID.BrainofCthulhu, new int[] { 36, 54, 81, 108, 162 } }, + { NPCID.Creeper, new int[] { 24, 36, 66, 96, 144 } }, - { ModContent.NPCType(), new int[] { 42, 63, 81, 99, 135 } }, - { ModContent.NPCType(), new int[] { 30, 50, 62, 74, 90 } }, + { ModContent.NPCType(), new int[] { 42, 63, 81, 99, 162 } }, + { ModContent.NPCType(), new int[] { 30, 50, 62, 74, 111 } }, { ModContent.NPCType(), new int[] { 36, 54, 63, 72, 108 } }, - { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 162 } }, - { ModContent.NPCType(), new int[] { 28, 48, 56, 64, 84 } }, - { ModContent.NPCType(), new int[] { 22, 36, 42, 48, 66 } }, - { ModContent.NPCType(), new int[] { 42, 70, 84, 98, 126 } }, - { ModContent.NPCType(), new int[] { 24, 42, 50, 58, 72 } }, - { ModContent.NPCType(), new int[] { 18, 28, 34, 40, 54 } }, - { ModContent.NPCType(), new int[] { 36, 60, 72, 84, 108 } }, - { ModContent.NPCType(), new int[] { 20, 36, 42, 48, 60 } }, - { ModContent.NPCType(), new int[] { 14, 20, 26, 32, 42 } }, + { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 189 } }, + { ModContent.NPCType(), new int[] { 28, 48, 56, 64, 96 } }, + { ModContent.NPCType(), new int[] { 22, 36, 42, 48, 72 } }, + { ModContent.NPCType(), new int[] { 42, 70, 84, 98, 147 } }, + { ModContent.NPCType(), new int[] { 24, 42, 50, 58, 87 } }, + { ModContent.NPCType(), new int[] { 18, 28, 34, 40, 60 } }, + { ModContent.NPCType(), new int[] { 36, 60, 72, 84, 126 } }, + { ModContent.NPCType(), new int[] { 20, 36, 42, 48, 72 } }, + { ModContent.NPCType(), new int[] { 14, 20, 26, 32, 48 } }, - { NPCID.QueenBee, new int[] { 36, 54, 81, 108, 135 } }, - { NPCID.Bee, new int[] { 20, 24, 48, 72, 90 } }, - { NPCID.BeeSmall, new int[] { 15, 18, 36, 54, 72 } }, + { NPCID.QueenBee, new int[] { 36, 54, 81, 108, 162 } }, + { NPCID.Bee, new int[] { 20, 24, 48, 72, 108 } }, + { NPCID.BeeSmall, new int[] { 15, 18, 36, 54, 81 } }, { NPCID.SkeletronHead, new int[] { 42, // 55 while spinning 77, // 100 while spinning 88, // 114 while spinning 99, // 128 while spinning - 132 } }, // 171 while spinning - { NPCID.SkeletronHand, new int[] { 32, 44, 77, 110, 132 } }, + 165 } }, // 215 while spinning + { NPCID.SkeletronHand, new int[] { 32, 44, 77, 110, 165 } }, - { NPCID.Deerclops, new int[] { 20, 40, 50, 60, 81 } }, + { NPCID.Deerclops, new int[] { 20, 40, 50, 60, 90 } }, - { ModContent.NPCType(), new int[] { 48, 80, 96, 112, 144 } }, - { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 162 } }, - { ModContent.NPCType(), new int[] { 48, 80, 96, 112, 144 } }, - { ModContent.NPCType(), new int[] { 60, 100, 120, 140, 180 } }, - { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 162 } }, - { ModContent.NPCType(), new int[] { 36, 60, 72, 84, 108 } }, - { ModContent.NPCType(), new int[] { 24, 40, 48, 56, 72 } }, - { ModContent.NPCType(), new int[] { 42, 70, 84, 98, 126 } }, - { ModContent.NPCType(), new int[] { 30, 50, 60, 70, 90 } }, + { ModContent.NPCType(), new int[] { 48, 80, 96, 112, 168 } }, + { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 189 } }, + { ModContent.NPCType(), new int[] { 48, 80, 96, 112, 168 } }, + { ModContent.NPCType(), new int[] { 60, 100, 120, 140, 210 } }, + { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 189 } }, + { ModContent.NPCType(), new int[] { 36, 60, 72, 84, 126 } }, + { ModContent.NPCType(), new int[] { 24, 40, 48, 56, 84 } }, + { ModContent.NPCType(), new int[] { 42, 70, 84, 98, 147 } }, + { ModContent.NPCType(), new int[] { 30, 50, 60, 70, 105 } }, - { NPCID.WallofFlesh, new int[] { 100, 150, 180, 210, 270 } }, - { NPCID.WallofFleshEye, new int[] { 100, 150, 180, 210, 270 } }, + { NPCID.WallofFlesh, new int[] { 100, 150, 180, 210, 315 } }, + { NPCID.WallofFleshEye, new int[] { 100, 150, 180, 210, 315 } }, { NPCID.TheHungry, new int[] { 30, // Ranges from 30 to 75 depending on WoF life 60, // Ranges from 60 to 150 depending on WoF life 60, // Ranges from 60 to 150 depending on WoF life 60, // Ranges from 60 to 150 depending on WoF life 90 } }, // Ranges from 90 to 225 depending on WoF life - { NPCID.TheHungryII, new int[] { 30, 60, 74, 88, 108 } }, - { NPCID.LeechHead, new int[] { 26, 52, 62, 72, 90 } }, - { NPCID.LeechBody, new int[] { 22, 44, 52, 60, 78 } }, - { NPCID.LeechTail, new int[] { 18, 36, 42, 48, 66 } }, + { NPCID.TheHungryII, new int[] { 30, 60, 74, 88, 132 } }, + { NPCID.LeechHead, new int[] { 26, 52, 62, 72, 108 } }, + { NPCID.LeechBody, new int[] { 22, 44, 52, 60, 90 } }, + { NPCID.LeechTail, new int[] { 18, 36, 42, 48, 72 } }, - { NPCID.QueenSlimeBoss, new int[] { 80, 120, 150, 180, 240 } }, + { NPCID.QueenSlimeBoss, new int[] { 80, 120, 150, 180, 270 } }, { NPCID.QueenSlimeMinionBlue, new int[] { 60, 80, 100, 120, 180 } }, { NPCID.QueenSlimeMinionPink, new int[] { 60, 80, 100, 120, 180 } }, { NPCID.QueenSlimeMinionPurple, new int[] { 70, 100, 120, 140, 210 } }, @@ -400,15 +400,15 @@ namespace CalamityMod 153 } }, // 229 in phase 2 { ModContent.NPCType(), new int[] { 110, 176, 187, 198, 330 } }, - { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 216 } }, + { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 240 } }, { ModContent.NPCType(), new int[] { 70, 104, 112, 120, 192 } }, { ModContent.NPCType(), new int[] { 65, 96, 104, 112, 168 } }, - { NPCID.TheDestroyer, new int[] { 140, 280, 300, 320, 420 } }, + { NPCID.TheDestroyer, new int[] { 140, 280, 300, 320, 480 } }, { NPCID.TheDestroyerBody, new int[] { 70, 102, 136, 170, 255 } }, { NPCID.TheDestroyerTail, new int[] { 45, 68, 102, 136, 204 } }, - { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 216 } }, + { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 240 } }, { NPCID.SkeletronPrime, new int[] { 50, // 100 while spinning @@ -427,7 +427,7 @@ namespace CalamityMod { NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } }, { NPCID.PrimeLaser, new int[] { 30, 51, 68, 85, 102 } }, - { ModContent.NPCType(), new int[] { 95, 144, 168, 192, 276 } }, + { ModContent.NPCType(), new int[] { 95, 144, 168, 192, 288 } }, { ModContent.NPCType(), new int[] { 80, 120, 138, 156, 240 } }, { ModContent.NPCType(), new int[] { 85, 130, 150, 170, 255 } }, @@ -436,7 +436,7 @@ namespace CalamityMod 100, // 140 in phase 2 138, // 193 in phase 2 176, // 246 in phase 2 - 207 } }, // 290 in phase 2 + 276 } }, // 386 in phase 2 { NPCID.PlanterasTentacle, new int[] { 90, 138, 161, 184, 276 } }, { ModContent.NPCType(), new int[] { 90, 138, 161, 184, 276 } }, { NPCID.Spore, new int[] { 90, 140, 160, 180, 270 } }, @@ -445,7 +445,7 @@ namespace CalamityMod 110, // 165 during charge 143, // 215 during charge 176, // 264 during charge - 231 } }, // 347 during charge + 264 } }, // 396 during charge { ModContent.NPCType(), new int[] { 140, 216, 240, 264, 414 } }, { ModContent.NPCType(), new int[] { @@ -453,37 +453,37 @@ namespace CalamityMod 112, // 168 during charge 136, // 204 during charge 160, // 240 during charge - 216 } }, // 324 during charge + 240 } }, // 360 during charge { ModContent.NPCType(), new int[] { 70, 110, 126, 142, 210 } }, - { NPCID.DetonatingBubble, new int[] { 100, 150, 180, 210, 270 } }, + { NPCID.DetonatingBubble, new int[] { 100, 150, 180, 210, 315 } }, { ModContent.NPCType(), new int[] { 90, 140, 160, 180, 270 } }, { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 429 } }, { ModContent.NPCType(), new int[] { 75, 112, 128, 144, 225 } }, - { NPCID.Golem, new int[] { 95, 144, 176, 208, 264 } }, - { NPCID.GolemHead, new int[] { 85, 128, 144, 160, 228 } }, - { NPCID.GolemFistLeft, new int[] { 75, 112, 144, 176, 240 } }, - { NPCID.GolemFistRight, new int[] { 75, 112, 144, 176, 240 } }, + { NPCID.Golem, new int[] { 95, 144, 176, 208, 312 } }, + { NPCID.GolemHead, new int[] { 85, 128, 144, 160, 240 } }, + { NPCID.GolemFistLeft, new int[] { 75, 112, 144, 176, 264 } }, + { NPCID.GolemFistRight, new int[] { 75, 112, 144, 176, 264 } }, - { ModContent.NPCType(), new int[] { 120, 180, 216, 252, 351 } }, + { ModContent.NPCType(), new int[] { 120, 180, 216, 252, 378 } }, { ModContent.NPCType(), new int[] { 120, 180, 210, 240, 360 } }, - { ModContent.NPCType(), new int[] { 130, 200, 240, 280, 390 } }, + { ModContent.NPCType(), new int[] { 130, 200, 240, 280, 420 } }, { NPCID.DukeFishron, new int[] { 100, // 120 in phase 2 140, // 202 in phase 2, 185 in phase 3 168, // 242 in phase 2, 222 in phase 3 196, // 282 in phase 2, 259 in phase 3 - 252 } }, // 363 in phase 2, 333 in phase 3 - { NPCID.Sharkron, new int[] { 100, 150, 180, 210, 270 } }, - { NPCID.Sharkron2, new int[] { 120, 180, 210, 240, 315 } }, + 294 } }, // 423 in phase 2, 388 in phase 3 + { NPCID.Sharkron, new int[] { 100, 150, 180, 210, 315 } }, + { NPCID.Sharkron2, new int[] { 120, 180, 210, 240, 360 } }, { ModContent.NPCType(), new int[] { 130, 192, 224, 256, 384 } }, { ModContent.NPCType(), new int[] { 105, 160, 180, 200, 315 } }, { ModContent.NPCType(), new int[] { 105, 160, 180, 200, 315 } }, { ModContent.NPCType(), new int[] { 130, 192, 224, 256, 390 } }, - { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 315 } }, + { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 336 } }, { NPCID.CultistDragonHead, new int[] { 120, 180, 210, 240, 360 } }, { NPCID.CultistDragonBody1, new int[] { 60, 90, 105, 120, 180 } }, @@ -495,8 +495,8 @@ namespace CalamityMod { NPCID.AncientLight, new int[] { 120, 180, 210, 240, 360 } }, { ModContent.NPCType(), new int[] { 160, 240, 268, 296, 480 } }, - { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 312 } }, - { ModContent.NPCType(), new int[] { 85, 128, 160, 192, 252 } }, + { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 336 } }, + { ModContent.NPCType(), new int[] { 85, 128, 160, 192, 288 } }, { ModContent.NPCType(), new int[] { 150, 224, 256, 288, 444 } }, { ModContent.NPCType(), new int[] { 160, 240, 264, 288, 405 } }, @@ -566,181 +566,181 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, - { new Tuple(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 76, 108 } }, + { new Tuple(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 76, 114 } }, { new Tuple(ModContent.NPCType(), ProjectileID.BloodShot), new int[] { 26, 36, 44, 52, 84 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 96 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 96 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, - { new Tuple(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 76, 108 } }, + { new Tuple(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 76, 114 } }, { new Tuple(NPCID.EaterofWorldsHead, ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, - { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 108 } }, - { new Tuple(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 108 } }, + { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 114 } }, + { new Tuple(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 72, 96 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 72, 96 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 72, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 72, 108 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 22, 36, 44, 52, 84 } }, - { new Tuple(NPCID.QueenBee, ProjectileID.QueenBeeStinger), new int[] { 22, 44, 64, 84, 120 } }, + { new Tuple(NPCID.QueenBee, ProjectileID.QueenBeeStinger), new int[] { 22, 44, 64, 84, 126 } }, - { new Tuple(NPCID.SkeletronHead, ProjectileID.Skull), new int[] { 46, 72, 84, 96, 138 } }, - { new Tuple(NPCID.SkeletronHead, ProjectileID.Shadowflames), new int[] { 36, 72, 88, 104, 150 } }, - { new Tuple(NPCID.SkeletronHand, ProjectileID.Skull), new int[] { 36, 56, 68, 80, 114 } }, + { new Tuple(NPCID.SkeletronHead, ProjectileID.Skull), new int[] { 46, 72, 84, 96, 144 } }, + { new Tuple(NPCID.SkeletronHead, ProjectileID.Shadowflames), new int[] { 36, 72, 88, 104, 156 } }, + { new Tuple(NPCID.SkeletronHand, ProjectileID.Skull), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsIceSpike), new int[] { 26, 52, 76, 100, 138 } }, - { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsRangedProjectile), new int[] { 36, 72, 88, 104, 150 } }, - { new Tuple(NPCID.Deerclops, ProjectileID.InsanityShadowHostile), new int[] { 20, 40, 60, 80, 114 } }, + { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsIceSpike), new int[] { 26, 52, 76, 100, 150 } }, + { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsRangedProjectile), new int[] { 36, 72, 88, 104, 156 } }, + { new Tuple(NPCID.Deerclops, ProjectileID.InsanityShadowHostile), new int[] { 20, 40, 60, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 138 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 126 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 138 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 126 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 126 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 34, 52, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 24, 48, 60, 72, 96 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 150 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 138 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 150 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 138 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 138 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 34, 52, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 24, 48, 60, 72, 108 } }, - { new Tuple(NPCID.WallofFleshEye, ProjectileID.EyeLaser), new int[] { 36, 72, 88, 104, 150 } }, - { new Tuple(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 132, 168 } }, - { new Tuple(NPCID.WallofFlesh, ProjectileID.Fireball), new int[] { 36, 72, 88, 104, 150 } }, + { new Tuple(NPCID.WallofFleshEye, ProjectileID.EyeLaser), new int[] { 36, 72, 88, 104, 156 } }, + { new Tuple(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 132, 198 } }, + { new Tuple(NPCID.WallofFlesh, ProjectileID.Fireball), new int[] { 36, 72, 88, 104, 156 } }, - { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 152, 210 } }, - { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 216, 270 } }, - { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 168 } }, - { new Tuple(NPCID.QueenSlimeMinionBlue, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 168 } }, - { new Tuple(NPCID.QueenSlimeMinionPink, ProjectileID.QueenSlimeMinionPinkBall), new int[] { 52, 92, 112, 132, 168 } }, + { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 152, 228 } }, + { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 216, 324 } }, + { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 198 } }, + { new Tuple(NPCID.QueenSlimeMinionBlue, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 198 } }, + { new Tuple(NPCID.QueenSlimeMinionPink, ProjectileID.QueenSlimeMinionPinkBall), new int[] { 52, 92, 112, 132, 198 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 132, 168 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 180 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 132, 168 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 132, 198 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 210 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 132, 198 } }, - { new Tuple(NPCID.Retinazer, ProjectileID.EyeLaser), new int[] { 40, 92, 116, 140, 174 } }, + { new Tuple(NPCID.Retinazer, ProjectileID.EyeLaser), new int[] { 40, 92, 116, 140, 210 } }, { new Tuple(NPCID.Retinazer, ProjectileID.DeathLaser), new int[] { 50, // 38 in rapid fire 108, // 81 in rapid fire 132, // 99 in rapid fire 156, // 117 in rapid fire - 186 } }, // 139 in rapid fire - { new Tuple(NPCID.Retinazer, ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 210 } }, - { new Tuple(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 100, 120, 140, 180 } }, - { new Tuple(NPCID.Spazmatism, ProjectileID.EyeFire), new int[] { 60, 120, 148, 176, 222 } }, - { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 222 } }, - { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 100, 128, 156, 192 } }, + 234 } }, // 176 in rapid fire + { new Tuple(NPCID.Retinazer, ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, + { new Tuple(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 100, 120, 140, 210 } }, + { new Tuple(NPCID.Spazmatism, ProjectileID.EyeFire), new int[] { 60, 120, 148, 176, 264 } }, + { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } }, + { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 100, 128, 156, 234 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 180 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 66, 112, 128, 144, 198 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 210 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 66, 112, 128, 144, 216 } }, - { new Tuple(NPCID.TheDestroyer, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 174 } }, - { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 46, 108, 128, 148, 192 } }, - { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 48, 116, 136, 156, 210 } }, - { new Tuple(NPCID.TheDestroyerBody, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 174 } }, - { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 46, 108, 128, 148, 192 } }, - { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 48, 116, 136, 156, 210 } }, - { new Tuple(NPCID.Probe, ProjectileID.PinkLaser), new int[] { 50, 88, 100, 112, 162 } }, + { new Tuple(NPCID.TheDestroyer, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 204 } }, + { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 46, 108, 128, 148, 222 } }, + { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 48, 116, 136, 156, 234 } }, + { new Tuple(NPCID.TheDestroyerBody, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 204 } }, + { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 46, 108, 128, 148, 222 } }, + { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 48, 116, 136, 156, 234 } }, + { new Tuple(NPCID.Probe, ProjectileID.PinkLaser), new int[] { 50, 88, 100, 112, 168 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 200, 240, 280, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 210 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 200, 240, 280, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, - { new Tuple(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 186 } }, - { new Tuple(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 186 } }, - { new Tuple(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 222 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 186 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 240 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 186 } }, - { new Tuple(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 222 } }, - { new Tuple(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 240 } }, - { new Tuple(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 186 } }, + { new Tuple(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } }, + { new Tuple(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } }, + { new Tuple(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } }, + { new Tuple(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } }, + { new Tuple(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } }, + { new Tuple(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 210 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, - { new Tuple(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 52, 96, 128, 160, 210 } }, - { new Tuple(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 62, 116, 144, 172, 222 } }, - { new Tuple(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 72, 132, 160, 188, 240 } }, - { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, + { new Tuple(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 52, 96, 128, 160, 240 } }, + { new Tuple(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 62, 116, 144, 172, 258 } }, + { new Tuple(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 72, 132, 160, 188, 282 } }, + { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossRainbowStreak), new int[] { 100, 152, 172, 192, 300 } }, { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenSunDance), new int[] { 120, 180, 204, 228, 360 } }, { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossLastingRainbow), new int[] { 100, 152, 172, 192, 300 } }, { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenLance), new int[] { 130, 196, 216, 236, 390 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 244, 300 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 240 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 84, 148, 172, 196, 252 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 264 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 244, 366 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 84, 148, 172, 196, 294 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 264 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 244, 300 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 264 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 244, 366 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(NPCID.Golem, ProjectileID.Fireball), new int[] { 72, 132, 160, 188, 234 } }, - { new Tuple(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 246 } }, - { new Tuple(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 240 } }, - { new Tuple(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 246 } }, - { new Tuple(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 264 } }, - { new Tuple(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 264 } }, - { new Tuple(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 240 } }, - { new Tuple(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 246 } }, - { new Tuple(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 264 } }, + { new Tuple(NPCID.Golem, ProjectileID.Fireball), new int[] { 72, 132, 160, 188, 282 } }, + { new Tuple(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } }, + { new Tuple(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 300 } }, + { new Tuple(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } }, + { new Tuple(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 300 } }, + { new Tuple(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } }, + { new Tuple(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 264 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 264 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 372 } }, - { new Tuple(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 150, 200, 240 } }, + { new Tuple(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 150, 200, 300 } }, { new Tuple(NPCID.DukeFishron, ProjectileID.Cthulunado), new int[] { 160, 200, 232, 264, 480 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 200, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 200, 300 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 200, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 200, 300 } }, - { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 88, 156, 184, 212, 264 } }, + { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 88, 156, 184, 212, 318 } }, { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossIceMist), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 120, 192, 220, 248, 360 } }, - { new Tuple(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 90, 144, 172, 200, 270 } }, - { new Tuple(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 88, 156, 184, 212, 264 } }, + { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 120, 192, 220, 248, 372 } }, + { new Tuple(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 90, 144, 172, 200, 300 } }, + { new Tuple(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 152, 176, 200, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 152, 176, 200, 300 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 192, 212, 300 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 192, 212, 318 } }, - { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalDeathray), new int[] { 200, 300, 380, 460, 600 } }, - { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 270 } }, - { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalEye), new int[] { 90, 120, 160, 200, 270 } }, - { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalSphere), new int[] { 120, 160, 220, 280, 360 } }, - { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 270 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalBolt), new int[] { 100, 140, 180, 220, 300 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalEye), new int[] { 100, 140, 180, 220, 300 } }, + { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalDeathray), new int[] { 200, 300, 380, 460, 690 } }, + { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 300 } }, + { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalEye), new int[] { 90, 120, 160, 200, 300 } }, + { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalSphere), new int[] { 120, 160, 220, 280, 420 } }, + { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 300 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalBolt), new int[] { 100, 140, 180, 220, 330 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalEye), new int[] { 100, 140, 180, 220, 330 } }, { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalSphere), new int[] { 132, 176, 220, 264, 396 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalDeathray), new int[] { 150, 200, 260, 320, 450 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalDeathray), new int[] { 150, 200, 260, 320, 480 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, From 673845cd68d2e8a6e1a7217ccdd11c63d2455910 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sun, 12 May 2024 02:23:31 -0700 Subject: [PATCH 122/197] chrono scythe is now magic --- .../{Melee => Magic}/ChronomancersScythe.cs | 10 +++++----- .../{Melee => Magic}/ChronomancersScythe.png | Bin .../en-US/Mods.CalamityMod.Buffs.hjson | 5 ----- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 11 +++++++---- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 12 ------------ ...ods.CalamityMod.Items.Weapons.Summon.hjson | 5 ----- .../Mods.CalamityMod.Projectiles.Magic.hjson | 3 +++ .../Mods.CalamityMod.Projectiles.Melee.hjson | 3 --- .../Mods.CalamityMod.Projectiles.Summon.hjson | 1 - .../{Melee => Magic}/ChronoIcicleLarge.cs | 8 +++----- .../{Melee => Magic}/ChronoIcicleLarge.png | Bin .../{Melee => Magic}/ChronoIcicleSmall.cs | 6 +++--- .../{Melee => Magic}/ChronoIcicleSmall.png | Bin .../ChronomancersScytheHoldout.cs | 8 ++++---- .../ChronomancersScytheSwing.cs | 18 +++++++++++++++--- .../ChronomancersScytheSwing.png | Bin 16 files changed, 40 insertions(+), 50 deletions(-) rename Items/Weapons/{Melee => Magic}/ChronomancersScythe.cs (94%) rename Items/Weapons/{Melee => Magic}/ChronomancersScythe.png (100%) rename Projectiles/{Melee => Magic}/ChronoIcicleLarge.cs (97%) rename Projectiles/{Melee => Magic}/ChronoIcicleLarge.png (100%) rename Projectiles/{Melee => Magic}/ChronoIcicleSmall.cs (93%) rename Projectiles/{Melee => Magic}/ChronoIcicleSmall.png (100%) rename Projectiles/{Melee => Magic}/ChronomancersScytheHoldout.cs (97%) rename Projectiles/{Melee => Magic}/ChronomancersScytheSwing.cs (91%) rename Projectiles/{Melee => Magic}/ChronomancersScytheSwing.png (100%) diff --git a/Items/Weapons/Melee/ChronomancersScythe.cs b/Items/Weapons/Magic/ChronomancersScythe.cs similarity index 94% rename from Items/Weapons/Melee/ChronomancersScythe.cs rename to Items/Weapons/Magic/ChronomancersScythe.cs index 2c815eeb89..a872675c83 100644 --- a/Items/Weapons/Melee/ChronomancersScythe.cs +++ b/Items/Weapons/Magic/ChronomancersScythe.cs @@ -1,17 +1,16 @@ using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Melee; -using CalamityMod.Rarities; +using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Items.Weapons.Melee +namespace CalamityMod.Items.Weapons.Magic { public class ChronomancersScythe : ModItem, ILocalizedModType { - public new string LocalizationCategory => "Items.Weapons.Melee"; + public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; @@ -21,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 45; Item.height = 45; - Item.DamageType = DamageClass.MeleeNoSpeed; + Item.DamageType = DamageClass.Magic; Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; @@ -32,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = false; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.Item71; + Item.mana = 10; Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; Item.rare = ItemRarityID.Purple; diff --git a/Items/Weapons/Melee/ChronomancersScythe.png b/Items/Weapons/Magic/ChronomancersScythe.png similarity index 100% rename from Items/Weapons/Melee/ChronomancersScythe.png rename to Items/Weapons/Magic/ChronomancersScythe.png diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index a8eac3ec2b..1d3a76f5c4 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1046,11 +1046,6 @@ BlackHawkBuff: { Description: The fighter jet will protect you } -BloodClot: { - DisplayName: Blood Clot - Description: The blood clot will protect you -} - BrimseekerBuff: { DisplayName: Brimseeker Description: Does it want something from you? diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 4a2ee65579..45d3b66cdc 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -147,12 +147,15 @@ BurningSea: { Tooltip: Fires a bouncing brimstone fireball that splits into homing fireballs upon collision with water } -CarnageRay: { - DisplayName: Carnage Ray +ChronomancersScythe: { + DisplayName: Chronomancer's Scythe Tooltip: ''' - Fires a wretched, bloody ray - The farther along the ray hit enemies are, the more damage they take + Rapidly fires icicles + Press to swing the scythe around you, creating a clock pattern of homing icicles + Direct hits with the scythe have a chance to spawn clocks + Collecting the clocks increases movement speed and acceleration by 5% for each clock collected + This stacks up to 3 times and each level wears off after 5 seconds ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 58ce679f5b..afeab0b76b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -268,18 +268,6 @@ CelestialClaymore: { Tooltip: Spawns cosmic energy stars near the cursor that inflict several debuffs } -ChronomancersScythe: { - DisplayName: Chronomancer's Scythe - Tooltip: - ''' - Rapidly fires icicles - Press to swing the scythe around you, creating a clock pattern of homing icicles - Direct hits with the scythe have a chance to spawn clocks - Collecting the clocks increases movement speed and acceleration by 5% for each clock collected - This stacks up to 3 times and each level wears off after 5 seconds - ''' -} - ClamCrusher: { DisplayName: Clam Crusher Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index a5b665adab..0b7073c368 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -73,11 +73,6 @@ BlackHawkRemote: { ''' } -BloodClotStaff: { - DisplayName: Blood Clot Staff - Tooltip: Summons a blood clot to fight for you -} - BorealisBomber: { DisplayName: Borealis Bomber Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index cf3b8f5fa3..6510a1aba6 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -41,6 +41,9 @@ BrimstoneFireball.DisplayName: Brimstone Fireball BrimstoneHellfireballFriendly.DisplayName: Hellfireball BrimstoneHomer.DisplayName: Brimstone Homer BrimstoneTentacle.DisplayName: Brimstone Tentacle +ChronoIcicleLarge.DisplayName: Chrono Icicle +ChronoIcicleSmall.DisplayName: Chrono Icicle +ChronomancersScytheHoldout.DisplayName: Chronomancer's Scythe ClamorNoctusStar.DisplayName: Clamor Star ClamorNoctusWyvern.DisplayName: Clamor Wyvern ClimaxBeam.DisplayName: Voltaic Bolt diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index a033012dfc..6f5c733c72 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -60,9 +60,6 @@ BurningMeteor.DisplayName: Meteor CatastropheClaymoreSparkle.DisplayName: Catastrophe Sparkle CausticEdgeProjectile.DisplayName: Caustic Edge ChainedMeatHook.DisplayName: Enchanted Meat Hook -ChronoIcicleLarge.DisplayName: Chrono Icicle -ChronoIcicleSmall.DisplayName: Chrono Icicle -ChronomancersScytheHoldout.DisplayName: Chronomancer's Scythe ClamCrusherFlail.DisplayName: Clam Crusher CometQuasherMeteor.DisplayName: Comet Quasher Meteor CosmicBolt.DisplayName: Cosmic Bolt diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 1b37a70385..897bada72a 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -34,7 +34,6 @@ BlackDragonTail.DisplayName: Black Celestial Dragon BlackHawkBullet.DisplayName: Black Hawk Bullet BlackHawkSummon.DisplayName: Black Hawk BloodBreath.DisplayName: Blood Dragon Fire -BloodClotMinion.DisplayName: Blood Clot BloodRain.DisplayName: Blood Rain BloodSpit.DisplayName: Blood Spit BoneMatter.DisplayName: Bone Matter diff --git a/Projectiles/Melee/ChronoIcicleLarge.cs b/Projectiles/Magic/ChronoIcicleLarge.cs similarity index 97% rename from Projectiles/Melee/ChronoIcicleLarge.cs rename to Projectiles/Magic/ChronoIcicleLarge.cs index 99cf9bb63f..79fa04c391 100644 --- a/Projectiles/Melee/ChronoIcicleLarge.cs +++ b/Projectiles/Magic/ChronoIcicleLarge.cs @@ -1,6 +1,4 @@ using System; -using System.Diagnostics.Metrics; -using System.Security.Policy; using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; @@ -8,11 +6,11 @@ using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee +namespace CalamityMod.Projectiles.Magic { public class ChronoIcicleLarge : ModProjectile, ILocalizedModType { - public new string LocalizationCategory => "Projectiles.Melee"; + public new string LocalizationCategory => "Projectiles.Magic"; public static int HomingSpeed = 16; public static int IdleSpeedMax = 7; public override void SetDefaults() @@ -23,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.coldDamage = true; Projectile.friendly = true; Projectile.penetrate = 1; - Projectile.DamageType = DamageClass.Melee; + Projectile.DamageType = DamageClass.Magic; Projectile.coldDamage = true; Projectile.tileCollide = false; Projectile.timeLeft = 180; diff --git a/Projectiles/Melee/ChronoIcicleLarge.png b/Projectiles/Magic/ChronoIcicleLarge.png similarity index 100% rename from Projectiles/Melee/ChronoIcicleLarge.png rename to Projectiles/Magic/ChronoIcicleLarge.png diff --git a/Projectiles/Melee/ChronoIcicleSmall.cs b/Projectiles/Magic/ChronoIcicleSmall.cs similarity index 93% rename from Projectiles/Melee/ChronoIcicleSmall.cs rename to Projectiles/Magic/ChronoIcicleSmall.cs index 6d60caa49c..e3c8e83f67 100644 --- a/Projectiles/Melee/ChronoIcicleSmall.cs +++ b/Projectiles/Magic/ChronoIcicleSmall.cs @@ -5,11 +5,11 @@ using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee +namespace CalamityMod.Projectiles.Magic { public class ChronoIcicleSmall : ModProjectile, ILocalizedModType { - public new string LocalizationCategory => "Projectiles.Melee"; + public new string LocalizationCategory => "Projectiles.Magic"; public override void SetDefaults() { Projectile.width = 12; @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.coldDamage = true; Projectile.friendly = true; Projectile.penetrate = 1; - Projectile.DamageType = DamageClass.Melee; + Projectile.DamageType = DamageClass.Magic; Projectile.coldDamage = true; } diff --git a/Projectiles/Melee/ChronoIcicleSmall.png b/Projectiles/Magic/ChronoIcicleSmall.png similarity index 100% rename from Projectiles/Melee/ChronoIcicleSmall.png rename to Projectiles/Magic/ChronoIcicleSmall.png diff --git a/Projectiles/Melee/ChronomancersScytheHoldout.cs b/Projectiles/Magic/ChronomancersScytheHoldout.cs similarity index 97% rename from Projectiles/Melee/ChronomancersScytheHoldout.cs rename to Projectiles/Magic/ChronomancersScytheHoldout.cs index 972b91a953..d5861097b5 100644 --- a/Projectiles/Melee/ChronomancersScytheHoldout.cs +++ b/Projectiles/Magic/ChronomancersScytheHoldout.cs @@ -9,13 +9,13 @@ using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee +namespace CalamityMod.Projectiles.Magic { public class ChronomancersScytheHoldout : ModProjectile, ILocalizedModType { - public new string LocalizationCategory => "Projectiles.Melee"; + public new string LocalizationCategory => "Projectiles.Magic"; public Player Owner => Main.player[Projectile.owner]; - public override string Texture => "CalamityMod/Items/Weapons/Melee/ChronomancersScythe"; + public override string Texture => "CalamityMod/Items/Weapons/Magic/ChronomancersScythe"; public static int ClockChance = 30; public override void SetDefaults() @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.width = 60; Projectile.height = 60; Projectile.friendly = true; - Projectile.DamageType = DamageClass.MeleeNoSpeed; + Projectile.DamageType = DamageClass.Magic; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.penetrate = -1; diff --git a/Projectiles/Melee/ChronomancersScytheSwing.cs b/Projectiles/Magic/ChronomancersScytheSwing.cs similarity index 91% rename from Projectiles/Melee/ChronomancersScytheSwing.cs rename to Projectiles/Magic/ChronomancersScytheSwing.cs index 432bf7c7d4..5cbd28a35b 100644 --- a/Projectiles/Melee/ChronomancersScytheSwing.cs +++ b/Projectiles/Magic/ChronomancersScytheSwing.cs @@ -1,7 +1,7 @@ using System; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; @@ -10,7 +10,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee +namespace CalamityMod.Projectiles.Magic { public class ChronomancersScytheSwing : ModProjectile { @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.tileCollide = false; - Projectile.DamageType = DamageClass.MeleeNoSpeed; + Projectile.DamageType = DamageClass.Magic; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 5; @@ -60,6 +60,18 @@ namespace CalamityMod.Projectiles.Melee Projectile.soundDelay = 24; } + if (Projectile.ai[2] >= 32) + { + bool manaCostPaid = Owner.CheckMana(Owner.ActiveItem(), -1, true, false); + if (!manaCostPaid) + { + Projectile.Kill(); + return; + } + Projectile.ai[2] = 0; + } + Projectile.ai[2]++; + if (Main.myPlayer == Projectile.owner) { if (!Owner.CantUseHoldout()) diff --git a/Projectiles/Melee/ChronomancersScytheSwing.png b/Projectiles/Magic/ChronomancersScytheSwing.png similarity index 100% rename from Projectiles/Melee/ChronomancersScytheSwing.png rename to Projectiles/Magic/ChronomancersScytheSwing.png From 92d170377761b19edbe6a1edbba896df9cb840e3 Mon Sep 17 00:00:00 2001 From: NycroV <83246959+NycroV@users.noreply.github.com> Date: Sun, 12 May 2024 15:06:57 -0400 Subject: [PATCH 123/197] Close arsenal UIs whenever a channelled projectile is in use --- UI/DraedonSummoning/CodebreakerUI.cs | 2 +- UI/DraedonsArsenal/ChargingStationUI.cs | 4 ++-- UI/DraedonsArsenal/PowerCellFactoryUI.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UI/DraedonSummoning/CodebreakerUI.cs b/UI/DraedonSummoning/CodebreakerUI.cs index 57d0df228e..5468ec11de 100644 --- a/UI/DraedonSummoning/CodebreakerUI.cs +++ b/UI/DraedonSummoning/CodebreakerUI.cs @@ -102,7 +102,7 @@ namespace CalamityMod.UI.DraedonSummoning { // If not viewing the specific tile entity's interface anymore, if the ID is for some reason invalid, or if the player is not equipped to continue viewing the UI // don't do anything other than resetting necessary data. - if (!TileEntity.ByID.ContainsKey(ViewedTileEntityID) || TileEntity.ByID[ViewedTileEntityID] is not TECodebreaker codebreakerTileEntity || !Main.LocalPlayer.WithinRange(codebreakerTileEntity.Center, 270f) || !Main.playerInventory) + if (!TileEntity.ByID.ContainsKey(ViewedTileEntityID) || TileEntity.ByID[ViewedTileEntityID] is not TECodebreaker codebreakerTileEntity || !Main.LocalPlayer.WithinRange(codebreakerTileEntity.Center, 270f) || !Main.playerInventory || Main.LocalPlayer.channel) { VerificationButtonScale = 1f; CancelButtonScale = 0.75f; diff --git a/UI/DraedonsArsenal/ChargingStationUI.cs b/UI/DraedonsArsenal/ChargingStationUI.cs index e3d298967d..f207c629b2 100644 --- a/UI/DraedonsArsenal/ChargingStationUI.cs +++ b/UI/DraedonsArsenal/ChargingStationUI.cs @@ -46,8 +46,8 @@ namespace CalamityMod.UI.DraedonsArsenal return; } - // If the player's inventory isn't open, or they have a chest open, immediately destroy this UI. - if (!Main.playerInventory || p.chest != -1) + // If the player's inventory isn't open, or they have a chest open, OR they are using a channelled item, immediately destroy this UI. + if (!Main.playerInventory || p.chest != -1 || p.channel) { mp.CurrentlyViewedChargerID = -1; return; diff --git a/UI/DraedonsArsenal/PowerCellFactoryUI.cs b/UI/DraedonsArsenal/PowerCellFactoryUI.cs index 2f3bcfd6d6..d769d5ff55 100644 --- a/UI/DraedonsArsenal/PowerCellFactoryUI.cs +++ b/UI/DraedonsArsenal/PowerCellFactoryUI.cs @@ -41,8 +41,8 @@ namespace CalamityMod.UI.DraedonsArsenal return; } - // If the player's inventory isn't open, or they have a chest open, immediately destroy this UI. - if (!Main.playerInventory || p.chest != -1) + // If the player's inventory isn't open, or they have a chest open, OR they are using a channelled item, immediately destroy this UI. + if (!Main.playerInventory || p.chest != -1 || p.channel) { mp.CurrentlyViewedFactoryID = -1; return; From c8108945c9e9ebb47317b241190ec483cb27f331 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Sun, 12 May 2024 14:01:41 -0600 Subject: [PATCH 124/197] More money laundering exploit fixing --- Items/Dyes/DefiledFlameDye.cs | 3 ++- NPCs/TownNPCs/SEAHOE.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Items/Dyes/DefiledFlameDye.cs b/Items/Dyes/DefiledFlameDye.cs index 5f8543ddf1..1e8fe79c46 100644 --- a/Items/Dyes/DefiledFlameDye.cs +++ b/Items/Dyes/DefiledFlameDye.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { Item.rare = ItemRarityID.LightRed; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; + //Light red is 12 gold, and this is purchased with 10 gold, this would make it sell for 6 gold, still far more expensive than vanilla dyes + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice/2; } } } diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index 778be0409f..ff8be76ae6 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -210,7 +210,7 @@ namespace CalamityMod.NPCs.TownNPCs .Add(ModContent.ItemType()) .Add(ModContent.ItemType()) .Add(ModContent.ItemType()) - .AddWithCustomValue(ItemID.TruffleWorm, Item.buyPrice(gold: 10), Condition.Hardmode) + .AddWithCustomValue(ItemID.TruffleWorm, Item.buyPrice(gold: 15), Condition.Hardmode) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(2), downedOldDuke) .AddWithCustomValue(ItemID.ShrimpPoBoy, Item.buyPrice(gold: 2, silver: 50), Condition.HappyEnough, Condition.InBeach) .AddWithCustomValue(ItemID.Fries, Item.buyPrice(gold: 2), Condition.HappyEnough, Condition.InBeach, Condition.DownedEyeOfCthulhu) From 4187cbdb54e493f6003ee19bb2f767c5d881ed85 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Sun, 12 May 2024 14:38:20 -0600 Subject: [PATCH 125/197] Fixed Sahara Slicers and Death's Ascension not getting Legendary with removed reforge rng --- Utilities/ItemUtils.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index b738d34df0..88bb34ef06 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -153,7 +153,8 @@ namespace CalamityMod // Rapiers, whips, and other specific vanilla weapons (ie. Zenith or Excalibur) are specifically excluded from this, so they get broadsword reforges despite not scaling with melee speed. // // 18FEB2024: Ozzatron: removed the (item.channel || item.noMelee) because vanilla lets Burning Sky get Legendary - else if (item.channel && item.useStyle != ItemUseStyleID.Rapier && !item.CountsAsClass() && !PrefixLegacy.ItemSets.SwordsHammersAxesPicks[item.type]) + // 12MAY2024: Shade: added item.useStyle != ItemUseStyleID.Shoot because vanilla lets Sahara Slicers and Death's Ascension get Legendary + else if (item.channel && item.useStyle != ItemUseStyleID.Rapier && !item.CountsAsClass() && !PrefixLegacy.ItemSets.SwordsHammersAxesPicks[item.type] && item.useStyle != ItemUseStyleID.Shoot) { int[][] meleeNoSpeedReforgeTiers = new int[][] { From c03f3a22da9e9232f199b0a72a8ce65662458c5d Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 12 May 2024 14:00:27 -0700 Subject: [PATCH 126/197] Nitro tiershift + fixes Also made rockets pre mech so you can use flak toxicannon if you fight AS first Added "uses rockets" to the early rocket launchers --- Items/Weapons/Ranged/NitroExpressRifle.cs | 27 ++++++++++++------- Items/Weapons/Ranged/Norfleet.cs | 2 -- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 2 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 7 ++++- Projectiles/Magic/GenesisBeam.cs | 12 ++++++--- Projectiles/Ranged/NitroShot.cs | 2 +- Utilities/CalamityRecipes.cs | 4 +-- 7 files changed, 36 insertions(+), 20 deletions(-) diff --git a/Items/Weapons/Ranged/NitroExpressRifle.cs b/Items/Weapons/Ranged/NitroExpressRifle.cs index c7f04ab0ed..8a970087f8 100644 --- a/Items/Weapons/Ranged/NitroExpressRifle.cs +++ b/Items/Weapons/Ranged/NitroExpressRifle.cs @@ -22,13 +22,13 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 100; Item.height = 22; - Item.damage = 1350; + Item.damage = 100; Item.DamageType = DamageClass.Ranged; - Item.useTime = 80; - Item.useAnimation = 80; + Item.useTime = 70; + Item.useAnimation = 70; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 8.5f; + Item.knockBack = 7.5f; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; Item.UseSound = FireSound; Item.autoReuse = true; @@ -47,16 +47,25 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.SniperRifle). - AddIngredient(3). - AddIngredient(2). - AddTile(TileID.LunarCraftingStation). + AddIngredient(ItemID.Musket). + AddIngredient(3). + AddIngredient(3). + AddIngredient(ItemID.ExplosivePowder, 5). + AddTile(TileID.Anvils). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.TheUndertaker). + AddIngredient(3). + AddIngredient(3). + AddIngredient(ItemID.ExplosivePowder, 5). + AddTile(TileID.Anvils). Register(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - player.velocity += -velocity * 0.45f; + player.velocity += -velocity * 0.3f; Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f); return false; } diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index 39084761b7..2f7500ee26 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -69,8 +69,6 @@ namespace CalamityMod.Items.Weapons.Ranged if (loadedShots <= 0) { loadedShots = 3; - if (player.Calamity().NorfleetCounter < 1000) - player.Calamity().NorfleetCounter = 0; } return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 4a2ee65579..20961d5559 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -342,7 +342,7 @@ Genesis: { ''' Fire an array of lasers that decreases in spread for each shot Every sixth shot fires a splitting Genesis Beam and resets the spread of the weapon - Hitting an enemy where the Genesis Beam splits deals increased damage + Hitting an enemy before the Genesis Beam splits deals increased damage ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index c301f41078..5b6a9163a6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -498,6 +498,7 @@ FlakToxicannon: { Fires a toxic shell that explodes into a cone of radioactive sludge Toxic shells burst when they reach the cursor's position Direct hits with the toxic shell will reduce the damage dealt by the sludge + Uses rockets for ammo ''' } @@ -763,7 +764,11 @@ MidasPrime: { MineralMortar: { DisplayName: Mineral Mortar - Tooltip: Shoots an onyx bomb that explodes into huge area damage + Tooltip: + ''' + Shoots an onyx bomb that explodes into huge area damage + Uses rockets for ammo + ''' } Kingsbane: { diff --git a/Projectiles/Magic/GenesisBeam.cs b/Projectiles/Magic/GenesisBeam.cs index d18c26c832..a1b782a551 100644 --- a/Projectiles/Magic/GenesisBeam.cs +++ b/Projectiles/Magic/GenesisBeam.cs @@ -12,6 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public ref float time => ref Projectile.ai[0]; + public ref float isSplit => ref Projectile.ai[1]; + public bool splitShot = false; public Color mainColor = Color.MediumSlateBlue; public override void SetDefaults() @@ -29,15 +31,17 @@ namespace CalamityMod.Projectiles.Magic } public override void AI() { + if (isSplit == 0) + splitShot = true; if (time == 0) { - if (Projectile.ai[1] == 0) + if (splitShot) Projectile.penetrate = 1; else Projectile.timeLeft = 50; } - if (Projectile.timeLeft % 2 == 0 && (Projectile.ai[1] == 1 && time > 2 || (Projectile.ai[1] == 0 && time > 3 && Projectile.timeLeft > 2))) + if (Projectile.timeLeft % 2 == 0 && (!splitShot && time > 2 || (splitShot && time > 3 && Projectile.timeLeft > 2))) { Particle spark = new GlowSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 17, 0.06f, mainColor, new Vector2(0.5f, 1.3f)); GeneralParticleHandler.SpawnParticle(spark); @@ -54,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic { int numProj = 2; float rotation = MathHelper.ToRadians(20); - if (Projectile.ai[1] == 0) + if (splitShot) { for (int i = 0; i < numProj; i++) { @@ -90,7 +94,7 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Projectile.ai[1] == 0) // This is the sweet spot + if (splitShot) // This is the sweet spot { modifiers.SourceDamage *= 1.5f; diff --git a/Projectiles/Ranged/NitroShot.cs b/Projectiles/Ranged/NitroShot.cs index d25a0330c6..1efd86ee4b 100644 --- a/Projectiles/Ranged/NitroShot.cs +++ b/Projectiles/Ranged/NitroShot.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.ignoreWater = true; - Projectile.penetrate = 9; + Projectile.penetrate = 5; Projectile.timeLeft = 600; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; } diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index aecfb2bfc3..0820c45e3b 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -545,14 +545,14 @@ namespace CalamityMod AddRecipeGroup("IronBar"). AddIngredient(ItemID.EmptyBullet, 100). AddIngredient(ItemID.ExplosivePowder, 4). - AddTile(TileID.MythrilAnvil). + AddTile(TileID.Anvils). Register(); // and Rocket IIs (requires slightly more explosive powder) Recipe.Create(ItemID.RocketII, 100). AddRecipeGroup("IronBar"). AddIngredient(ItemID.EmptyBullet, 100). AddIngredient(ItemID.ExplosivePowder, 5). - AddTile(TileID.MythrilAnvil). + AddTile(TileID.Anvils). Register(); // Life Crystal From e3962dacf52449e0d28040f50dd9bc6abf6baa7c Mon Sep 17 00:00:00 2001 From: DylanDoe21 Date: Sun, 12 May 2024 15:58:08 -0400 Subject: [PATCH 127/197] abyss water fix --- Tiles/Abyss/SulphurousShale.cs | 8 ++++++++ Walls/SulphurousSandWall.png | Bin 5044 -> 15308 bytes Walls/SulphurousSandWallSafe.png | Bin 5044 -> 15308 bytes 3 files changed, 8 insertions(+) diff --git a/Tiles/Abyss/SulphurousShale.cs b/Tiles/Abyss/SulphurousShale.cs index a3bb8abaf3..c4652868ac 100644 --- a/Tiles/Abyss/SulphurousShale.cs +++ b/Tiles/Abyss/SulphurousShale.cs @@ -40,6 +40,14 @@ namespace CalamityMod.Tiles.Abyss this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/AbyssGravelMerge"); } + public override void NearbyEffects(int i, int j, bool closer) + { + if (Main.LocalPlayer.InModBiome(ModContent.GetInstance())) + { + Main.SceneMetrics.ActiveFountainColor = ModContent.Find("CalamityMod/SulphuricDepthsWater").Slot; + } + } + public override bool CanExplode(int i, int j) { return false; diff --git a/Walls/SulphurousSandWall.png b/Walls/SulphurousSandWall.png index 8f7a554dc5c636cd4f90509c57a07d404416ac03..e8e9ea87e62efb5990eca3ac3642e3baf01bf00b 100644 GIT binary patch literal 15308 zcmY*=XFyU7*tQL`v~r}GrIND2Aqd3xUW{r+(Hb-@%(DKs z96iGNy;{2ToOL)5V63CTRyQfU&c=40O;_uVX-FZd2c6_gd%=6}KB3R0Oplst>4kEEr^5ks=4IE#MHZ4=sAMmRZ-y#hKCucFF+ib?u|kfK``)r6!S3? zbGbmh_|DWm`zYbe{i9;BJjEB8nW&iluBuyDi48I9jITd%l@dU|^Z~TP5oiKrRi*3< zl}PlMA}s>e1AVt#04SfppG@x8;^Nb!4SY;c=;;~g8g%dOMETZKn>89Lq}~>kBVjb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V{qAlRhN3InqvpaF5HV` zJH2bFMW=N!k|P)WQiViCD6BM6x3>Aa8>Q219E3MpUX!}cb~J8USg}vKiyIx?)9XWf z-yIbe*dMewNL+dUlM4=y>Pa+mfo$x`5;g}B^!&~?(UBSCWed)39L*`TfW_dN+7JU{MX z(t8gcy(2;riEr*mNIPxwUb;zSzg|va&nR1%=4PjR;ECuurl$^oChG^t?Ace^!eXr{ z6w1#%XdYwiv$T&(DV&t`)rMC@O-#mUap0c|JG2#mD^=O6=dKf!jm;`WKF|__$hv;6 zS5OHy!v%g5L8@=Ec`bYldxlx_f*MD8-83nASBpRprU~(eNdcT3l82( ziciS?8U_@QvNnk2_gT=lBFxm;9k__2ipL&WJ`$;i!qI(UyJjBcvnPwJ&&9>{x0>q*Kre^xia#H!a@mB`BudG zdhgZok_O$2r^tr8?0Ot|Jx{ujEgd})rp!1#9#=jL5Rr}b z@cCH|+}Wbc@E|)e)J`wcv4*I)KD57ccX7IlwZDU(SAmDg`&dONqukBB^ zGovafT7t%bHC1>N6Vd+Cp6ByCBronS2nmA~ZQR^M^te2bwU{Dszi8{yYqP#+{GldI zzgh8F>Xkc9>C;|7!d*z;h9NPUodjEXm)i;65nqRJWk~;^Gg=_x$F{6Ex)$|tBlsE) OvfE|9^8@su#Qy-@6pyX| diff --git a/Walls/SulphurousSandWallSafe.png b/Walls/SulphurousSandWallSafe.png index 8f7a554dc5c636cd4f90509c57a07d404416ac03..e8e9ea87e62efb5990eca3ac3642e3baf01bf00b 100644 GIT binary patch literal 15308 zcmY*=XFyU7*tQL`v~r}GrIND2Aqd3xUW{r+(Hb-@%(DKs z96iGNy;{2ToOL)5V63CTRyQfU&c=40O;_uVX-FZd2c6_gd%=6}KB3R0Oplst>4kEEr^5ks=4IE#MHZ4=sAMmRZ-y#hKCucFF+ib?u|kfK``)r6!S3? zbGbmh_|DWm`zYbe{i9;BJjEB8nW&iluBuyDi48I9jITd%l@dU|^Z~TP5oiKrRi*3< zl}PlMA}s>e1AVt#04S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$_}@|%QWk-#6GJ>%a2KG7S&cls<+-@t9492|2C)f@;E;MKnV{qAlRhN3InqvpaF5HV` zJH2bFMW=N!k|P)WQiViCD6BM6x3>Aa8>Q219E3MpUX!}cb~J8USg}vKiyIx?)9XWf z-yIbe*dMewNL+dUlM4=y>Pa+mfo$x`5;g}B^!&~?(UBSCWed)39L*`TfW_dN+7JU{MX z(t8gcy(2;riEr*mNIPxwUb;zSzg|va&nR1%=4PjR;ECuurl$^oChG^t?Ace^!eXr{ z6w1#%XdYwiv$T&(DV&t`)rMC@O-#mUap0c|JG2#mD^=O6=dKf!jm;`WKF|__$hv;6 zS5OHy!v%g5L8@=Ec`bYldxlx_f*MD8-83nASBpRprU~(eNdcT3l82( ziciS?8U_@QvNnk2_gT=lBFxm;9k__2ipL&WJ`$;i!qI(UyJjBcvnPwJ&&9>{x0>q*Kre^xia#H!a@mB`BudG zdhgZok_O$2r^tr8?0Ot|Jx{ujEgd})rp!1#9#=jL5Rr}b z@cCH|+}Wbc@E|)e)J`wcv4*I)KD57ccX7IlwZDU(SAmDg`&dONqukBB^ zGovafT7t%bHC1>N6Vd+Cp6ByCBronS2nmA~ZQR^M^te2bwU{Dszi8{yYqP#+{GldI zzgh8F>Xkc9>C;|7!d*z;h9NPUodjEXm)i;65nqRJWk~;^Gg=_x$F{6Ex)$|tBlsE) OvfE|9^8@su#Qy-@6pyX| From ef2e34d4e08f68725008491288a18ac2e8f1edb6 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 12 May 2024 14:09:32 -0700 Subject: [PATCH 128/197] Defense cleanse removal --- CalPlayer/CalamityPlayerMiscEffects.cs | 87 ++++++++----------- .../Mods.CalamityMod.Items.Accessories.hjson | 8 +- 2 files changed, 42 insertions(+), 53 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index af23fad7f5..0dd1e07164 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3952,62 +3952,51 @@ namespace CalamityMod.CalPlayer // Defense damage does not heal during iframes, and has a delay after they end before it starts recovering. if (totalDefenseDamage > 0) { - // If a Full Cleanse is in effect, then cleanse all defense damage and don't do anything else. - if (CleansingEffect == 1) - { - totalDefenseDamage = 0; - defenseDamageRecoveryFrames = 0; - totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime; - defenseDamageDelayFrames = 0; - CleansingEffect = 0; - } - else - { - // Defense damage is capped at your maximum defense, except in GFB. - if (!Main.getGoodWorld && totalDefenseDamage > Player.statDefense) - totalDefenseDamage = Player.statDefense; + // Defense damage is capped at your maximum defense, except in GFB. + if (!Main.getGoodWorld && totalDefenseDamage > Player.statDefense) + totalDefenseDamage = Player.statDefense; - // You cannot begin recovering from defense damage until your iframes wear off. - if (!Player.HasIFrames()) + // You cannot begin recovering from defense damage until your iframes wear off. + if (!Player.HasIFrames()) + { + // Delay before defense damage recovery can start. While this delay is ticking down, defense damage doesn't recover at all. + if (defenseDamageDelayFrames > 0) + --defenseDamageDelayFrames; + + // Once the delay is up, defense damage recovery actually occurs. + else if (defenseDamageDelayFrames <= 0) { - // Delay before defense damage recovery can start. While this delay is ticking down, defense damage doesn't recover at all. - if (defenseDamageDelayFrames > 0) - --defenseDamageDelayFrames; + // Make one frame's worth of progress towards recovery. + --defenseDamageRecoveryFrames; - // Once the delay is up, defense damage recovery actually occurs. - else if (defenseDamageDelayFrames <= 0) + // If completely recovered, reset defense damage to nothing. + if (defenseDamageRecoveryFrames <= 0) { - // Make one frame's worth of progress towards recovery. - --defenseDamageRecoveryFrames; - - // If completely recovered, reset defense damage to nothing. - if (defenseDamageRecoveryFrames <= 0) - { - totalDefenseDamage = 0; - defenseDamageRecoveryFrames = 0; - totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime; - defenseDamageDelayFrames = 0; - } + totalDefenseDamage = 0; + defenseDamageRecoveryFrames = 0; + totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime; + defenseDamageDelayFrames = 0; } } - - // Get current amount of defense damage to apply this frame. - int currentDefenseDamage = CurrentDefenseDamage; - - // Apply DR Damage. - // - // DR Damage is applied at exactly the same ratio as defense damage; - // if you lose half your defense to defense damage, you also lose half your DR. - // This is applied first because the math would be wrong if the player's defense was already reduced by defense damage. - if (Player.statDefense > 0 && Player.endurance > 0f) - { - float drDamageRatio = currentDefenseDamage / (float)Player.statDefense; - Player.endurance *= 1f - drDamageRatio; - } - - // Apply defense damage - Player.statDefense -= currentDefenseDamage; } + + // Get current amount of defense damage to apply this frame. + int currentDefenseDamage = CurrentDefenseDamage; + + // Apply DR Damage. + // + // DR Damage is applied at exactly the same ratio as defense damage; + // if you lose half your defense to defense damage, you also lose half your DR. + // This is applied first because the math would be wrong if the player's defense was already reduced by defense damage. + if (Player.statDefense > 0 && Player.endurance > 0f) + { + float drDamageRatio = currentDefenseDamage / (float)Player.statDefense; + Player.endurance *= 1f - drDamageRatio; + } + + // Apply defense damage + Player.statDefense -= currentDefenseDamage; + } // Defense can never be reduced below zero, no matter what diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 5a2ee1af9e..bab227b6d6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -860,7 +860,7 @@ GrandGelatin: { ''' 12% increased movement speed and jump speed Using a healing potion will spawn a cleansing aura - Walking into the aura removes all debuffs and defense damage one time + Walking into the aura removes all debuffs one time The aura grants +2.5 HP/s life regen for all players inside for 8 seconds ''' } @@ -1053,8 +1053,8 @@ CleansingJelly: { DisplayName: Cleansing Jelly Tooltip: ''' - Using a healing potion will spawn a cleansing aura - Walking into the aura removes all debuffs and defense damage one time + Using a healing potion will spawn a cleansing aura + Walking into the aura removes all debuffs one time ''' } @@ -1766,7 +1766,7 @@ TheAbsorber: { Grants immunity to knockback Enemies take immense damage when they touch you and are afflicted with a damaging sickness debuff that reduces damage reduction significantly Using a healing potion will spawn a cleansing aura - Walking into the aura removes all debuffs and defense damage one time + Walking into the aura removes all debuffs one time The aura grants +3 HP/s life regen, +8% damage, and +5% damage reduction for all players inside for 10 seconds 5% of the damage from enemy attacks is absorbed and converted into healing ''' From 9dda781721dddbeade88edd625dd5c8471f7d90d Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sun, 12 May 2024 16:23:58 -0500 Subject: [PATCH 129/197] Minimum Adrenaline Loss: 10% > 25% --- Balancing/BalancingConstants.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs index 2bc76824c8..dc64bb8899 100644 --- a/Balancing/BalancingConstants.cs +++ b/Balancing/BalancingConstants.cs @@ -218,7 +218,7 @@ internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster internal static readonly int AdrenalinePauseAfterDamage = CalamityUtils.SecondsToFrames(1); - internal static readonly float MinimumAdrenalineLoss = 0.1f; // No matter how small a hit, you will always lose at least 10% current Adrenaline + internal static readonly float MinimumAdrenalineLoss = 0.25f; // No matter how small a hit, you will always lose at least 25% current Adrenaline internal static readonly float AdrenalineFalloffTinyHitHealthRatio = 0.05f; // Hits for 5% max HP or less result in less Adrenaline loss internal static readonly float TrueMeleeRipperReductionFactor = 0.5f; // True melee benefits less from rippers to prevent excessive melting. From 30039f5696b436aa773c2d6552dec0eb4736fdde Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Sun, 12 May 2024 20:27:58 -0400 Subject: [PATCH 130/197] Welcome back Dylan, hi moth user --- Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index 0129ce79f2..a59b553243 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -73,6 +73,8 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "CrabBar", "Dia", "Done", + "DylanDoe21", + "enamoured", "Fluffi", "HaguriHat", "Heart Plus Up!", @@ -124,7 +126,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Doog", "drh", "dwshin", - "DylanDoe21", "Earth", "EchoDuck", "Ein", From ac7bb3613753130d0b7e7e47949601ee3d2ffe5a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 12 May 2024 22:09:05 -0400 Subject: [PATCH 131/197] Plantera phase 1 move away works through tiles Halved its trigger radius as compensation --- NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs index 46854826d6..d162aec9a0 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs @@ -145,7 +145,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 npcCenterAccountingForHooks = new Vector2(hookPositionX, hookPositionY); float maxVelocityX = Main.player[npc.target].Center.X - npcCenterAccountingForHooks.X; float maxVelocityY = Main.player[npc.target].Center.Y - npcCenterAccountingForHooks.Y; - bool phase1MoveAway = !phase2 && Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 480f && Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); + bool phase1MoveAway = !phase2 && Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 240f; if (despawn) { maxVelocityY *= -1f; From a74c99c72bc26d2cc0af26ac70dca1ff6f4faee7 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 13 May 2024 00:48:20 -0700 Subject: [PATCH 132/197] Scal Bugfixes and Brothers Master/GFB changes Scal shouldn't telefrag you anymore Bros get Master and GFB changes --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 41 ++-- NPCs/SupremeCalamitas/SupremeCataclysm.cs | 51 ++++- NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 92 ++++++-- Projectiles/Boss/Basketball.png | Bin 0 -> 148668 bytes Projectiles/Boss/SupremeCataclysmFist.cs | 222 +++++++++++++------- Projectiles/Boss/SupremeCatastropheSlash.cs | 2 +- Sounds/Custom/Kickball.ogg | Bin 0 -> 20487 bytes 7 files changed, 306 insertions(+), 102 deletions(-) create mode 100644 Projectiles/Boss/Basketball.png create mode 100644 Sounds/Custom/Kickball.ogg diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 93038af046..42f996b630 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -98,6 +98,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public bool gettingTired5 = false; //1% public bool willCharge = false; public bool canFireSplitingFireball = true; + public bool fireFireblastFirst = true; public bool spawnArena = false; public bool enteredBrothersPhase = false; public bool hasSummonedBrothers = false; @@ -125,7 +126,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public int alicornFrame = 0; public int alicornFrameCounter = 0; public int dashVisualCounter = 0; - public int brothersPause = 15; // Helps prevent telefragging + public int preventionPause = 15; // Helps prevent telefragging + public int attackPause = 0; + public bool respawnBro = true; // Master Mode change public float shieldOpacity = 1f; public float shieldRotation = 0f; @@ -1623,6 +1626,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (!hasDoneDeathAnim && !bossRush) // Scrapped death animation for Scal { + attackPause = 5; Dust.QuickDustLine(NPC.Center, safeBox.Center() + new Vector2(0, -30), 500f, cirrus ? Color.Pink : Color.Red); NPC.Center = safeBox.Center() + new Vector2(0, -30); NPC.velocity = new Vector2(10 * NPC.spriteDirection, -7); @@ -2027,9 +2031,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (NPC.life > 0) { + if (attackPause > 0) + attackPause--; + if (lifeRatio < 0.45f && !enteredBrothersPhase) { - if (brothersPause == 0) + attackPause = 5; + if (preventionPause == 0) { enteredBrothersPhase = true; attackCastDelay = brothersSpawnCastTime; @@ -2067,7 +2075,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } else { - brothersPause--; + preventionPause--; NPC.dontTakeDamage = true; NPC.velocity *= 0.85f; return; @@ -2234,6 +2242,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.ai[2] >= 300f) { NPC.ai[1] = -1f; + fireFireblastFirst = true; NPC.TargetClosest(); NPC.netUpdate = true; } @@ -2248,7 +2257,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.localAI[1] = 0f; int randomShot = Main.rand.Next(6); - if (randomShot == 0 && canFireSplitingFireball) + + if (randomShot == 0 && canFireSplitingFireball && !fireFireblastFirst) { canFireSplitingFireball = false; randomShot = gigablast; @@ -2267,7 +2277,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.netUpdate = true; } } - else if (randomShot == 1 && canFireSplitingFireball) // Firing gigablast while hovering above pre laugh + else if ((randomShot == 1 && canFireSplitingFireball) || fireFireblastFirst) // Firing gigablast while hovering above pre laugh { canFireSplitingFireball = false; randomShot = fireblast; @@ -2286,7 +2296,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.netUpdate = true; } } - else + else if (!fireFireblastFirst) { canFireSplitingFireball = true; randomShot = barrage; @@ -2311,6 +2321,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } } + fireFireblastFirst = false; } FrameType = FrameAnimationType.FasterUpwardDraft; @@ -2479,7 +2490,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 projectileSpawn = NPC.Center + projectileVelocity * 4f; projectileVelocity *= 10f * uDieLul; int projectileType = hellblast; - Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f); + if (attackPause == 0) + Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f); } } } @@ -2795,6 +2807,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.ai[2] >= 240f) { NPC.ai[1] = -1f; + fireFireblastFirst = true; NPC.TargetClosest(); NPC.netUpdate = true; } @@ -2809,7 +2822,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.localAI[1] = 0f; int randomShot = Main.rand.Next(6); - if (randomShot == 0 && canFireSplitingFireball) // fireblast while floating post laugh + + if (randomShot == 0 && canFireSplitingFireball && !fireFireblastFirst) // fireblast while floating post laugh { SoundEngine.PlaySound(BrimstoneBigShotSound, NPC.Center); canFireSplitingFireball = false; @@ -2826,10 +2840,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.netUpdate = true; } } - else if (randomShot == 1 && canFireSplitingFireball) // Gigablast while floating post laugh + else if ((randomShot == 1 && canFireSplitingFireball) || fireFireblastFirst) // Gigablast while floating post laugh { SoundEngine.PlaySound(BrimstoneShotSound, NPC.Center); - canFireSplitingFireball = false; + if (NPC.ai[2] > 1) + canFireSplitingFireball = false; randomShot = fireblast; Particle pulse = new DirectionalPulseRing(NPC.Center, projectileVelocity * 1.2f, cirrus ? Color.Pink : Color.Red, new Vector2(0.5f, 1f), projectileVelocity.ToRotation(), 0.95f, 0f, 55); @@ -2843,7 +2858,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.netUpdate = true; } } - else + else if (!fireFireblastFirst) { SoundEngine.PlaySound(BrimstoneBigShotSound, NPC.Center); canFireSplitingFireball = true; @@ -2868,6 +2883,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } } + fireFireblastFirst = false; } } else if (NPC.ai[1] == 1f) @@ -3007,7 +3023,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 projectileSpawn = NPC.Center + projectileVelocity * 4f; projectileVelocity *= 10f * uDieLul; int projectileType = hellblast; - Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f); + if (attackPause == 0) + Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f); } } } diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index cca36fef24..005abccc7d 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -4,6 +4,7 @@ using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Particles; using CalamityMod.Projectiles.Boss; using CalamityMod.World; @@ -173,6 +174,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } + NPC scal = Main.npc[CalamityGlobalNPC.SCal]; + if (scal.ModNPC().respawnBro == false && Main.masterMode && !broIsAlive) + { + if (NPC.life > (NPC.lifeMax * 0.65f)) + NPC.life = (int)(NPC.lifeMax * 0.65f); + } + // Difficulty modes bool bossRush = BossRushEvent.BossRushActive; bool death = CalamityWorld.death || bossRush; @@ -326,7 +334,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas { PunchCounter = 0f; SoundEngine.PlaySound(SupremeCalamitas.HellblastSound, NPC.Center); + int type = ModContent.ProjectileType(); + + if (Main.zenithWorld) + type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); if (bossRush) damage /= 2; @@ -391,6 +404,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas PunchCounter = 0f; int type = ModContent.ProjectileType(); + + if (Main.zenithWorld) + type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); if (bossRush) damage /= 2; @@ -398,8 +415,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas if ((broIsAlive == false ? BigAttackLimit <= 3 && BigAttackLimit > 0 : BigAttackLimit == 1) && death) { - Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 11f).RotatedBy(0.6f - BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, 2); - Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 11f).RotatedBy(-0.6f + BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, 2); + Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * (Main.zenithWorld ? 1 : 11f)).RotatedBy(0.6f - BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, Main.zenithWorld ? 3 : 2); + Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * (Main.zenithWorld ? 1 : 11f)).RotatedBy(-0.6f + BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, Main.zenithWorld ? 3 : 2); SoundStyle fire = new("CalamityMod/Sounds/NPCHit/ThanatosHitOpen1"); SoundEngine.PlaySound(fire with { Volume = 0.4f, Pitch = -0.8f - BigAttackLimit * 0.1f }, NPC.Center); } @@ -407,7 +424,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { if (Main.netMode != NetmodeID.MultiplayerClient) { - Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 9.5f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 3); + Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 9.5f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 3); } SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.8f, Pitch = 0.5f }, NPC.Center); SoundStyle charge = new("CalamityMod/Sounds/Item/ScorchedEarthShot", 3); @@ -533,7 +550,35 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Turn into dust on death. if (NPC.life <= 0) + { + if (NPC.AnyNPCs(ModContent.NPCType())) + { + NPC scal = Main.npc[CalamityGlobalNPC.SCal]; + if (scal.ModNPC().respawnBro == true && Main.masterMode && !broIsAlive) + { + for (int i = 0; i < 45; i++) + { + Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); + Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel); + catastrophedust.noGravity = true; + catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f); + catastrophedust.color = Color.DeepSkyBlue; + } + Particle pulse = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Cyan, new Vector2(1f, 1f), 0, 0.1f, 5f, 25); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse2 = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Lerp(Color.Cyan, Color.DodgerBlue, 0.3f), new Vector2(1f, 1f), 0, 0.05f, 4f, 28); + GeneralParticleHandler.SpawnParticle(pulse2); + + SoundStyle respawn = new("CalamityMod/Sounds/NPCKilled/RavagerLimbLoss3"); + SoundEngine.PlaySound(respawn with { Volume = 0.9f, Pitch = 0.3f }, NPC.Center); + + CalamityUtils.SpawnBossBetter(NPC.Center, ModContent.NPCType(), null, MovingUp ? -1 : 1); + scal.ModNPC().respawnBro = false; + } + + } DeathAshParticle.CreateAshesFromNPC(NPC); + } } } } diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index 06937b263d..c8b5db4dd0 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -167,6 +167,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } + NPC scal = Main.npc[CalamityGlobalNPC.SCal]; + if (scal.ModNPC().respawnBro == false && Main.masterMode && !broIsAlive) + { + if (NPC.life > (NPC.lifeMax * 0.65f)) + NPC.life = (int)(NPC.lifeMax * 0.65f); + } + // Difficulty modes bool bossRush = BossRushEvent.BossRushActive; bool death = CalamityWorld.death || bossRush; @@ -275,17 +282,42 @@ namespace CalamityMod.NPCs.SupremeCalamitas dashes++; if (dashes == 30 && broIsAlive == false) { - SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing"); - SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = -0.3f }, NPC.Center); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center).RotatedBy(0.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50); - for (int i = 0; i < 30; i++) + if (Main.zenithWorld) { - Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); - Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel); - catastrophedust.noGravity = true; - catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f); - catastrophedust.color = Color.DeepSkyBlue; + SoundStyle charge = new("CalamityMod/Sounds/Item/ExobladeBeamSlash"); + SoundEngine.PlaySound(charge with { Volume = 0.85f, Pitch = -0.5f }, NPC.Center); + NPC.velocity = NPC.DirectionTo(Target.Center) * 150f; + + for (int i = 0; i < 30; i++) + { + Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); + Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel); + catastrophedust.noGravity = true; + catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f); + catastrophedust.color = Color.DeepSkyBlue; + } + dashes = 0; + dashAttackTimer = 30; + BigAttackTimer = 500; + AttackDelayTimer = 120; + if (NPC.life > 10001) + NPC.life -= 10000; + return; + } + else + { + SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing"); + SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = -0.3f }, NPC.Center); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center).RotatedBy(0.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50); + for (int i = 0; i < 30; i++) + { + Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); + Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel); + catastrophedust.noGravity = true; + catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f); + catastrophedust.color = Color.DeepSkyBlue; + } } } NPC.velocity *= 0.975f; @@ -349,6 +381,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas SoundEngine.PlaySound(SupremeCalamitas.CatastropheSwing with { Volume = 0.5f, Pitch = (SlashingFromRight ? 0.2f : -0.2f) }, NPC.Center); int type = ModContent.ProjectileType(); + + if (Main.zenithWorld) + type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); if (bossRush) damage /= 2; @@ -368,7 +404,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing"); SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = 0.4f }, NPC.Center); - Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, firingVelocity * 0.2f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 3); + Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, firingVelocity * 0.2f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), Main.zenithWorld ? 0 : 3); accSlashCounter = 0; } } @@ -412,6 +448,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas SlashCounter = 0f; int type = ModContent.ProjectileType(); + + if (Main.zenithWorld) + type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); if (bossRush) damage /= 2; @@ -420,7 +460,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if ((broIsAlive == false ? BigAttackLimit <= 3 && BigAttackLimit > 0 : BigAttackLimit == 1) && death) { - Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition + firingVelocity * 130, (Phase2 ? NPC.DirectionTo(Target.Center) : firingVelocity) * 90f, type, damage, 0f, Main.myPlayer, 0f, 5, 50); + Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition + firingVelocity * 130, (Phase2 ? NPC.DirectionTo(Target.Center) : firingVelocity) * 90f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 5, 50); SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing"); SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = -0.3f - BigAttackLimit * 0.1f }, NPC.Center); } @@ -545,7 +585,35 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Turn into dust on death. if (NPC.life <= 0) + { + if (NPC.AnyNPCs(ModContent.NPCType())) + { + NPC scal = Main.npc[CalamityGlobalNPC.SCal]; + if (scal.ModNPC().respawnBro == true && Main.masterMode && !broIsAlive) + { + for (int i = 0; i < 45; i++) + { + Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); + Dust cataclysmdust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel); + cataclysmdust.noGravity = true; + cataclysmdust.scale = Main.rand.NextFloat(1.2f, 1.8f); + cataclysmdust.color = Color.Red; + } + Particle pulse = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Red, new Vector2(1f, 1f), 0, 0.1f, 5f, 25); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse2 = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.3f), new Vector2(1f, 1f), 0, 0.05f, 4f, 28); + GeneralParticleHandler.SpawnParticle(pulse2); + + SoundStyle respawn = new("CalamityMod/Sounds/NPCKilled/RavagerLimbLoss3"); + SoundEngine.PlaySound(respawn with { Volume = 0.9f, Pitch = 0.3f }, NPC.Center); + + CalamityUtils.SpawnBossBetter(NPC.Center, ModContent.NPCType(), null, MovingUp ? -1 : 1); + scal.ModNPC().respawnBro = false; + } + + } DeathAshParticle.CreateAshesFromNPC(NPC); + } } } } diff --git a/Projectiles/Boss/Basketball.png b/Projectiles/Boss/Basketball.png new file mode 100644 index 0000000000000000000000000000000000000000..e090379e6ff78525e18bdb6cde95c27bc5c54661 GIT binary patch literal 148668 zcmb??Wm6r^^Y+0V4(=WZ?(Xgm2MZRQ;O_1&!QGt@+%34fy9Kx4{+#<)_5TLXi>=+7 zsoCwGp6$8%>YhjyC215y0z?1+fFdg+p#}gzX#975H$$VBF(x@)Mf;)G9kad)XC0i%*=Q%2@MAc)x=VGHkzG)BJspJil|Ts)w(lie2E1|2Q0!=S<@Q) z?M~0D$*gVCM?dSluIWvSE8nGdK*C!v%pV19gaG6MZLHm+!HC#s3nMrPcCIj;cx2qkM?D>^$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Cj z_yXLYKjv~{C6KhY@8!3>IC&TN(S~2Y`q3cyG2jIvB=qR(8cK0#6O;bs9gA~F=a|ox zsHg>8wM*UUubx>MVuK!tzo!pGb`YDU-Tr;)<s8$2m^b^q-F?1QHV<26+7?UAEOCg=DUPQ@Yi#~_n>S1v_z`k?6BbD z8y1>dHW;)L8Z6GTT8*2vZ^=wa2q$ufYvv#D2{ zM|a(@sw1=e@R}8>hO&1n)>%so}4uKECh2ZytC5&dK~>uqBn5Nhp21HKfik+lt1ZSNks zI~3{~YN7u=qIH(bnKZst4%v43gC8s=K$S`glO

+ /// The common is sealed to avoid deleting syncing of other properties without noticing.
+ /// Use this method instead, which uses the same . + ///
+ /// + public virtual void SendExtraAIHoldout(BinaryWriter writer) { } + + /// + /// The common is sealed to avoid deleting syncing of other properties without noticing.
+ /// Use this method instead, which uses the same . + ///
+ /// + public virtual void ReceiveExtraAIHoldout(BinaryReader reader) { } + + #endregion } } From ef2b524df18a966b4c2eda8cccae3e1a9f3be452 Mon Sep 17 00:00:00 2001 From: Memes Date: Wed, 15 May 2024 18:38:04 +0200 Subject: [PATCH 188/197] Typo lmao. --- Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs index 2a541aedb9..ca12e9cbd7 100644 --- a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs @@ -248,7 +248,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles #endregion - #region Syncying + #region Syncing public sealed override void SendExtraAI(BinaryWriter writer) { From 872ad8dd56c10ba231cdb7035204961cb2224f9b Mon Sep 17 00:00:00 2001 From: Memes Date: Wed, 15 May 2024 20:24:17 +0200 Subject: [PATCH 189/197] Genesis syncing and cleanup. --- Items/Weapons/Magic/Genesis.cs | 11 ++-- Projectiles/Magic/GenesisHoldout.cs | 88 ++++++++++++++--------------- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/Items/Weapons/Magic/Genesis.cs b/Items/Weapons/Magic/Genesis.cs index 26a83161e8..24ca2275e4 100644 --- a/Items/Weapons/Magic/Genesis.cs +++ b/Items/Weapons/Magic/Genesis.cs @@ -11,6 +11,9 @@ namespace CalamityMod.Items.Weapons.Magic [LegacyName("Genisis")] public class Genesis : ModItem, ILocalizedModType { + public static float FireRate = 15f; + public static float StarterWindup = 60f; + public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetDefaults() { @@ -34,17 +37,17 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); } - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0; // Makes the rotation of the mouse around the player sync in multiplayer. public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, 0); - holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); - + Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI); return false; } + public override void AddRecipes() { CreateRecipe(). diff --git a/Projectiles/Magic/GenesisHoldout.cs b/Projectiles/Magic/GenesisHoldout.cs index 5f25eaeac0..65385f8a61 100644 --- a/Projectiles/Magic/GenesisHoldout.cs +++ b/Projectiles/Magic/GenesisHoldout.cs @@ -1,12 +1,13 @@ -using CalamityMod.Items.Weapons.Magic; +using System.IO; +using CalamityMod.Items.Weapons.Magic; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; -using ReLogic.Utilities; using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; +using static CalamityMod.Items.Weapons.Magic.Genesis; namespace CalamityMod.Projectiles.Magic { @@ -19,20 +20,20 @@ namespace CalamityMod.Projectiles.Magic public override float BaseOffsetY => -5f; public override float OffsetYDownwards => 5f; - public Color StaticEffectsColor = Color.MediumSlateBlue; + public ref float ShootingTimer => ref Projectile.ai[0]; + public ref float MaxFirerateShots => ref Projectile.ai[1]; + public bool FireYBeam + { + get => Projectile.ai[2] == 1f; + set => Projectile.ai[2] = value == true ? 1f : 0f; + } - public float FiringTime = 15; - public float Windup = 60; - public bool WindingUp = false; - public int time = 0; - public bool fireYBeam = false; - public int maxFirerateShots = 0; - - private ref float ShootingTimer => ref Projectile.ai[0]; + public float Windup { get; set; } = StarterWindup; + public Color EffectsColor { get; set; } = Color.MediumSlateBlue; public override void KillHoldoutLogic() { - if (HeldItem.type != Owner.ActiveItem().type || Owner is null || !Owner.active || Owner.CCed || Owner.dead || Owner.noItems) + if (HeldItem.type != Owner.ActiveItem().type || Owner.CantUseHoldout()) { Projectile.Kill(); Projectile.netUpdate = true; @@ -41,56 +42,49 @@ namespace CalamityMod.Projectiles.Magic public override void HoldoutAI() { - Item heldItem = Owner.ActiveItem(); - // Fire if the owner stops channeling or otherwise cannot use the weapon. - if (Owner.CantUseHoldout()) - { - Projectile.Kill(); - } - else if (ShootingTimer >= FiringTime) + if (ShootingTimer >= FireRate) { if (Owner.CheckMana(Owner.ActiveItem(), -1, true, false)) { - maxFirerateShots++; - - if (maxFirerateShots == 6) + if (MaxFirerateShots == 6f) { - fireYBeam = true; - Windup = 60; + FireYBeam = true; + Windup = 60f; + Projectile.netUpdate = true; } - if (fireYBeam) - { - Shoot(heldItem, true); - maxFirerateShots = 0; + if (FireYBeam) + { + Shoot(true); + MaxFirerateShots = 0f; } else - Shoot(heldItem, false); + Shoot(false); - ShootingTimer = 0; - - if (Windup > 10) + if (Windup > 10f) { - if (!fireYBeam) - Windup -= 12; + if (!FireYBeam) + Windup -= 12f; } else - { - Windup = 10; - } + Windup = 10f; - fireYBeam = false; + MaxFirerateShots++; + ShootingTimer = 0f; + FireYBeam = false; } else { SoundEngine.PlaySound(SoundID.MaxMana with { Pitch = -0.5f }, Projectile.Center); Projectile.Kill(); + Projectile.netUpdate = true; } - } + ShootingTimer++; } - private void Shoot(Item item, bool yBeam) + + private void Shoot(bool yBeam) { Vector2 shootDirection = Projectile.velocity.SafeNormalize(Vector2.Zero); @@ -107,11 +101,11 @@ namespace CalamityMod.Projectiles.Magic Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3, ModContent.ProjectileType(), Projectile.damage * 9, Projectile.knockBack, Projectile.owner, 0, 0); - Particle pulse3 = new GlowSparkParticle(GunTipPosition, shootDirection * 18, false, 6, 0.057f, StaticEffectsColor, new Vector2(1.7f, 0.8f), true); + Particle pulse3 = new GlowSparkParticle(GunTipPosition, shootDirection * 18, false, 6, 0.057f, EffectsColor, new Vector2(1.7f, 0.8f), true); GeneralParticleHandler.SpawnParticle(pulse3); for (int i = 0; i < 8; i++) { - SparkParticle spark2 = new SparkParticle(GunTipPosition + Main.rand.NextVector2Circular(10, 10), firingVelocity3 * Main.rand.NextFloat(0.7f, 1.3f), false, Main.rand.Next(20, 30), Main.rand.NextFloat(0.4f, 0.55f), StaticEffectsColor); + SparkParticle spark2 = new SparkParticle(GunTipPosition + Main.rand.NextVector2Circular(10, 10), firingVelocity3 * Main.rand.NextFloat(0.7f, 1.3f), false, Main.rand.Next(20, 30), Main.rand.NextFloat(0.4f, 0.55f), EffectsColor); GeneralParticleHandler.SpawnParticle(spark2); } } @@ -131,10 +125,12 @@ namespace CalamityMod.Projectiles.Magic Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 1); } - Particle pulse3 = new GlowSparkParticle(GunTipPosition, shootDirection * 18, false, 6, 0.057f, StaticEffectsColor, new Vector2(1.7f, 0.8f), true); + Particle pulse3 = new GlowSparkParticle(GunTipPosition, shootDirection * 18, false, 6, 0.057f, EffectsColor, new Vector2(1.7f, 0.8f), true); GeneralParticleHandler.SpawnParticle(pulse3); } + Projectile.netUpdate = true; + // Inside here go all the things that dedicated servers shouldn't spend resources on. // Like visuals and sounds. if (Main.dedServ) @@ -147,7 +143,7 @@ namespace CalamityMod.Projectiles.Magic Dust dust2 = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(4) ? 267 : 66, shootVel); dust2.scale = Main.rand.NextFloat(1.15f, 1.45f); dust2.noGravity = true; - dust2.color = Main.rand.NextBool() ? Color.Lerp(StaticEffectsColor, Color.White, 0.5f) : StaticEffectsColor; + dust2.color = Main.rand.NextBool() ? Color.Lerp(EffectsColor, Color.White, 0.5f) : EffectsColor; } // By decreasing the offset length of the gun from the arms, we give an effect of recoil. @@ -156,5 +152,9 @@ namespace CalamityMod.Projectiles.Magic else OffsetLengthFromArm -= 5f; } + + public override void SendExtraAIHoldout(BinaryWriter writer) => writer.Write(Windup); + + public override void ReceiveExtraAIHoldout(BinaryReader reader) => Windup = reader.ReadSingle(); } } From 22fb3230084eaaec6a4c08430cc4b0abfa95997d Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 15 May 2024 14:54:31 -0500 Subject: [PATCH 190/197] 1 - Fixed Desert Scourge body and tail not showing up in mp. 2 - Fixed certain worms having despawn issues in mp. --- NPCs/Abyss/EidolonWyrmHead.cs | 37 +++++++----------- NPCs/Abyss/GulperEelHead.cs | 39 +++++++------------ NPCs/Abyss/OarfishHead.cs | 6 ++- NPCs/DesertScourge/DesertNuisanceBody.cs | 29 ++------------ NPCs/DesertScourge/DesertNuisanceBodyYoung.cs | 29 ++------------ NPCs/DesertScourge/DesertScourgeBody.cs | 23 ++--------- NPCs/SunkenSea/SeaSerpent1.cs | 36 +++++++---------- 7 files changed, 58 insertions(+), 141 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 8b23bec9cf..b7b311396f 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -118,19 +118,18 @@ namespace CalamityMod.NPCs.Abyss } if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead) - { - NPC.TargetClosest(true); - } + NPC.TargetClosest(); + if (NPC.justHit || detectsPlayer || Main.player[NPC.target].chaosState || adultWyrmAlive || (Main.player[NPC.target].Center - NPC.Center).Length() < Main.player[NPC.target].Calamity().GetAbyssAggro(160f)) { detectsPlayer = true; NPC.damage = Main.expertMode ? 340 : 170; } else - { NPC.damage = 0; - } + NPC.chaseable = detectsPlayer; + if (detectsPlayer) { if (NPC.soundDelay <= 0) @@ -142,14 +141,12 @@ namespace CalamityMod.NPCs.Abyss else { if (Main.rand.NextBool(900)) - { SoundEngine.PlaySound(roar, NPC.Center); - } } + if (NPC.ai[2] > 0f) - { NPC.realLife = (int)NPC.ai[2]; - } + if (Main.netMode != NetmodeID.MultiplayerClient) { if (!TailSpawned && NPC.ai[0] == 0f) @@ -161,18 +158,13 @@ namespace CalamityMod.NPCs.Abyss if (segments >= 0 && segments < minLength) { if (segments % 2 == 0) - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } else - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } } else - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } + Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = (float)NPC.whoAmI; Main.npc[lol].ai[1] = (float)Previous; @@ -180,17 +172,16 @@ namespace CalamityMod.NPCs.Abyss NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, lol, 0f, 0f, 0f, 0); Previous = lol; } + TailSpawned = true; } } + if (NPC.velocity.X < 0f) - { NPC.spriteDirection = -1; - } else if (NPC.velocity.X > 0f) - { NPC.spriteDirection = 1; - } + if (Main.player[NPC.target].dead) { NPC.TargetClosest(false); @@ -208,14 +199,16 @@ namespace CalamityMod.NPCs.Abyss } } } + NPC.alpha -= 42; if (NPC.alpha < 0) - { NPC.alpha = 0; - } + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 6400f) { - NPC.active = false; + NPC.TargetClosest(false); + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 6400f) + NPC.active = false; } float currentSpeed = speed; diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index 1d09fd334f..395fc3d696 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -115,19 +115,16 @@ namespace CalamityMod.NPCs.Abyss } if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead) - { - NPC.TargetClosest(true); - } - if ((Main.player[NPC.target].Center - NPC.Center).Length() < Main.player[NPC.target].Calamity().GetAbyssAggro(160f) || - NPC.justHit) - { + NPC.TargetClosest(); + + if ((Main.player[NPC.target].Center - NPC.Center).Length() < Main.player[NPC.target].Calamity().GetAbyssAggro(160f) || NPC.justHit) detectsPlayer = true; - } + NPC.chaseable = detectsPlayer; + if (NPC.ai[2] > 0f) - { NPC.realLife = (int)NPC.ai[2]; - } + if (Main.netMode != NetmodeID.MultiplayerClient) { if (!TailSpawned && NPC.ai[0] == 0f) @@ -139,18 +136,13 @@ namespace CalamityMod.NPCs.Abyss if (segments >= 0 && segments < minLength) { if (segments == 0) - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } else - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } } else - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } + Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = (float)NPC.whoAmI; Main.npc[lol].ai[1] = (float)Previous; @@ -158,29 +150,28 @@ namespace CalamityMod.NPCs.Abyss NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, lol, 0f, 0f, 0f, 0); Previous = lol; } + TailSpawned = true; } } + if (NPC.velocity.X < 0f) - { NPC.spriteDirection = 1; - } else if (NPC.velocity.X > 0f) - { NPC.spriteDirection = -1; - } + if (Main.player[NPC.target].dead) - { NPC.TargetClosest(false); - } + NPC.alpha -= 42; if (NPC.alpha < 0) - { NPC.alpha = 0; - } + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) { - NPC.active = false; + NPC.TargetClosest(false); + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) + NPC.active = false; } float currentSpeed = speed; diff --git a/NPCs/Abyss/OarfishHead.cs b/NPCs/Abyss/OarfishHead.cs index 5945215fc8..9459276e5a 100644 --- a/NPCs/Abyss/OarfishHead.cs +++ b/NPCs/Abyss/OarfishHead.cs @@ -155,7 +155,11 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) - NPC.active = false; + { + NPC.TargetClosest(false); + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) + NPC.active = false; + } float currentSpeed = speed; float currentTurnSpeed = turnSpeed; diff --git a/NPCs/DesertScourge/DesertNuisanceBody.cs b/NPCs/DesertScourge/DesertNuisanceBody.cs index e666fc7b04..d61794d229 100644 --- a/NPCs/DesertScourge/DesertNuisanceBody.cs +++ b/NPCs/DesertScourge/DesertNuisanceBody.cs @@ -69,23 +69,6 @@ namespace CalamityMod.NPCs.DesertScourge public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false; - public override void SendExtraAI(BinaryWriter writer) - { - // Frame syncs - writer.Write(NPC.frame.X); - writer.Write(NPC.frame.Y); - writer.Write(NPC.frame.Width); - writer.Write(NPC.frame.Height); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - // Frame syncs - Rectangle frame = new Rectangle(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); - if (frame.Width > 0 && frame.Height > 0) - NPC.frame = frame; - } - public override void AI() { bool bossRush = BossRushEvent.BossRushActive; @@ -104,10 +87,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 1f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture2.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture2.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture2.Width(), BodyTexture2.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture2 is null ? 0 : BodyTexture2.Width(), BodyTexture2 is null ? 0 : BodyTexture2.Height()); NPC.netUpdate = true; @@ -121,10 +102,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 2f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture3.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture3.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture3.Width(), BodyTexture3.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture3 is null ? 0 : BodyTexture3.Width(), BodyTexture3 is null ? 0 : BodyTexture3.Height()); NPC.netUpdate = true; @@ -138,10 +117,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 3f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture4.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture4.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture4.Width(), BodyTexture4.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture4 is null ? 0 : BodyTexture4.Width(), BodyTexture4 is null ? 0 : BodyTexture4.Height()); NPC.netUpdate = true; diff --git a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs index 86b3514232..c1086817cc 100644 --- a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs @@ -69,23 +69,6 @@ namespace CalamityMod.NPCs.DesertScourge public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false; - public override void SendExtraAI(BinaryWriter writer) - { - // Frame syncs - writer.Write(NPC.frame.X); - writer.Write(NPC.frame.Y); - writer.Write(NPC.frame.Width); - writer.Write(NPC.frame.Height); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - // Frame syncs - Rectangle frame = new Rectangle(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); - if (frame.Width > 0 && frame.Height > 0) - NPC.frame = frame; - } - public override void AI() { bool bossRush = BossRushEvent.BossRushActive; @@ -104,10 +87,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 1f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture2.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture2.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture2.Width(), BodyTexture2.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture2 is null ? 0 : BodyTexture2.Width(), BodyTexture2 is null ? 0 : BodyTexture2.Height()); NPC.netUpdate = true; @@ -121,10 +102,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 2f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture3.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture3.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture3.Width(), BodyTexture3.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture3 is null ? 0 : BodyTexture3.Width(), BodyTexture3 is null ? 0 : BodyTexture3.Height()); NPC.netUpdate = true; @@ -138,10 +117,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 3f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture4.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture4.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture4.Width(), BodyTexture4.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture4 is null ? 0 : BodyTexture4.Width(), BodyTexture4 is null ? 0 : BodyTexture4.Height()); NPC.netUpdate = true; diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index daa0b54eae..1d30f4e6ce 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -80,23 +80,12 @@ namespace CalamityMod.NPCs.DesertScourge { writer.Write(NPC.alpha); writer.Write(NPC.dontTakeDamage); - - // Frame syncs - writer.Write(NPC.frame.X); - writer.Write(NPC.frame.Y); - writer.Write(NPC.frame.Width); - writer.Write(NPC.frame.Height); } public override void ReceiveExtraAI(BinaryReader reader) { NPC.alpha = reader.ReadInt32(); NPC.dontTakeDamage = reader.ReadBoolean(); - - // Frame syncs - Rectangle frame = new Rectangle(reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32(), reader.ReadInt32()); - if (frame.Width > 0 && frame.Height > 0) - NPC.frame = frame; } public override void AI() @@ -117,10 +106,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 1f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture2.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture2.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture2.Width(), BodyTexture2.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture2 is null ? 0 : BodyTexture2.Width(), BodyTexture2 is null ? 0 : BodyTexture2.Height()); NPC.netUpdate = true; @@ -134,10 +121,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 2f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture3.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture3.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture3.Width(), BodyTexture3.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture3 is null ? 0 : BodyTexture3.Width(), BodyTexture3 is null ? 0 : BodyTexture3.Height()); NPC.netUpdate = true; @@ -151,10 +136,8 @@ namespace CalamityMod.NPCs.DesertScourge NPC.ai[3] = 3f; NPC.position = NPC.Center; - //NPC.width = (int)(BodyTexture4.Width() * NPC.scale); - //NPC.height = (int)(BodyTexture4.Height() * NPC.scale); NPC.position -= NPC.Size * 0.5f; - NPC.frame = new Rectangle(0, 0, BodyTexture4.Width(), BodyTexture4.Height()); + NPC.frame = new Rectangle(0, 0, BodyTexture4 is null ? 0 : BodyTexture4.Width(), BodyTexture4 is null ? 0 : BodyTexture4.Height()); NPC.netUpdate = true; diff --git a/NPCs/SunkenSea/SeaSerpent1.cs b/NPCs/SunkenSea/SeaSerpent1.cs index 7a678cddb8..2cb2cdab19 100644 --- a/NPCs/SunkenSea/SeaSerpent1.cs +++ b/NPCs/SunkenSea/SeaSerpent1.cs @@ -84,15 +84,14 @@ namespace CalamityMod.NPCs.SunkenSea } } - Lighting.AddLight(NPC.Center, (255 - NPC.alpha) * 0f / 255f, (255 - NPC.alpha) * 0.30f / 255f, (255 - NPC.alpha) * 0.30f / 255f); + Lighting.AddLight(NPC.Center, 0f, (255 - NPC.alpha) * 0.3f / 255f, (255 - NPC.alpha) * 0.3f / 255f); + if (NPC.ai[2] > 0f) - { NPC.realLife = (int)NPC.ai[2]; - } + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead) - { NPC.TargetClosest(true); - } + if (Main.netMode != NetmodeID.MultiplayerClient) { if (!TailSpawned && NPC.ai[0] == 0f) @@ -102,21 +101,14 @@ namespace CalamityMod.NPCs.SunkenSea { int lol = 0; if (segment == 0 || segment == 1 || segment == 4 || segment == 5) - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } else if (segment == 2 || segment == 3 || segment == 6) - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } else if (segment == 7) - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } else if (segment == 8) - { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } + Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = (float)NPC.whoAmI; Main.npc[lol].ai[1] = (float)Previous; @@ -124,30 +116,30 @@ namespace CalamityMod.NPCs.SunkenSea NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, lol, 0f, 0f, 0f, 0); Previous = lol; } + TailSpawned = true; } } + if (NPC.velocity.X < 0f) - { NPC.spriteDirection = -1; - } else if (NPC.velocity.X > 0f) - { NPC.spriteDirection = 1; - } + if (Main.player[NPC.target].dead) - { NPC.TargetClosest(false); - } + NPC.alpha -= 42; if (NPC.alpha < 0) - { NPC.alpha = 0; - } + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) { - NPC.active = false; + NPC.TargetClosest(false); + if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) + NPC.active = false; } + float currentSpeed = speed; float currentTurnSpeed = turnSpeed; Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); From 6d21d5c2759b9a3ac3a800a9c123b3e05fb62802 Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 15 May 2024 13:07:36 -0700 Subject: [PATCH 191/197] Tried to fix some bugs pulse file sound in multi genesis holdout firing timer omicron holdout firing timer omicron beam infinite split in multi cinder arrow infinite split in multi Polar star bounce removed because its annoying --- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 3 +-- Items/Weapons/Magic/Genesis.cs | 2 +- Projectiles/Magic/GenesisBeam.cs | 5 +++- Projectiles/Magic/OmicronBeam.cs | 15 +++++++++--- Projectiles/Magic/OmicronHoldout.cs | 6 ++--- Projectiles/Magic/VoidVortexProj.cs | 1 + Projectiles/Ranged/CinderArrowProj.cs | 27 +++++++++++++++------ Projectiles/Ranged/PolarStar.cs | 25 +------------------ 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index 21190b3ab9..c17d4093a8 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; - Item.UseSound = null; + Item.UseSound = FireSound; Item.noMelee = true; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; @@ -53,7 +53,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - SoundEngine.PlaySound(FireSound); Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); return false; diff --git a/Items/Weapons/Magic/Genesis.cs b/Items/Weapons/Magic/Genesis.cs index 24ca2275e4..3574304c4f 100644 --- a/Items/Weapons/Magic/Genesis.cs +++ b/Items/Weapons/Magic/Genesis.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 1); return false; } diff --git a/Projectiles/Magic/GenesisBeam.cs b/Projectiles/Magic/GenesisBeam.cs index a1b782a551..9a2a2167fd 100644 --- a/Projectiles/Magic/GenesisBeam.cs +++ b/Projectiles/Magic/GenesisBeam.cs @@ -32,7 +32,10 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { if (isSplit == 0) + { + Projectile.netUpdate = true; splitShot = true; + } if (time == 0) { if (splitShot) @@ -57,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnKill(int timeLeft) { int numProj = 2; - float rotation = MathHelper.ToRadians(20); + float rotation = MathHelper.ToRadians(12); if (splitShot) { for (int i = 0; i < numProj; i++) diff --git a/Projectiles/Magic/OmicronBeam.cs b/Projectiles/Magic/OmicronBeam.cs index ab72615ff1..e281affc55 100644 --- a/Projectiles/Magic/OmicronBeam.cs +++ b/Projectiles/Magic/OmicronBeam.cs @@ -15,6 +15,9 @@ namespace CalamityMod.Projectiles.Magic public Color mainColor = Color.MediumVioletRed; public bool HitDirect = false; + + public ref float isSplit => ref Projectile.ai[1]; + public bool splitShot = false; public override void SetDefaults() { Projectile.width = 50; @@ -30,6 +33,12 @@ namespace CalamityMod.Projectiles.Magic } public override void AI() { + if (isSplit == 0) + { + Projectile.netUpdate = true; + splitShot = true; + } + Player Owner = Main.player[Projectile.owner]; float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); if (Projectile.timeLeft % 2 == 0 && time > 2 && targetDist < 1400f) @@ -55,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic { int numProj = 2; float rotation = MathHelper.ToRadians(10); - if (Projectile.ai[1] == 0 && time < 250 && !HitDirect) + if (splitShot && time < 250 && !HitDirect) { for (int i = 0; i < numProj; i++) { @@ -91,7 +100,7 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Projectile.ai[1] == 0 && time > 7 && !HitDirect) + if (splitShot && time > 7 && !HitDirect) Projectile.Kill(); Player Owner = Main.player[Projectile.owner]; @@ -101,7 +110,7 @@ namespace CalamityMod.Projectiles.Magic dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; } - if (time <= 7 && Projectile.ai[1] == 0) // This is the sweet spot + if (time <= 7 && splitShot) // This is the sweet spot { modifiers.SourceDamage *= 5; diff --git a/Projectiles/Magic/OmicronHoldout.cs b/Projectiles/Magic/OmicronHoldout.cs index d1884e6c4b..49c022c8a6 100644 --- a/Projectiles/Magic/OmicronHoldout.cs +++ b/Projectiles/Magic/OmicronHoldout.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Magic if (maxFirerateShots == 5) { Windup = 60; - maxFirerateShots = 0; + maxFirerateShots = 1; } Shoot(heldItem, false); @@ -146,12 +146,12 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 5; i++) { - firingVelocity3 = (shootDirection * 10).RotatedBy((0.04f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); + firingVelocity3 = (shootDirection * 10).RotatedBy((0.035f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); } for (int i = 0; i < 5; i++) { - firingVelocity3 = (shootDirection * 10).RotatedBy((-0.04f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); + firingVelocity3 = (shootDirection * 10).RotatedBy((-0.035f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); } diff --git a/Projectiles/Magic/VoidVortexProj.cs b/Projectiles/Magic/VoidVortexProj.cs index f8c424ab86..d0ba7f2205 100644 --- a/Projectiles/Magic/VoidVortexProj.cs +++ b/Projectiles/Magic/VoidVortexProj.cs @@ -137,6 +137,7 @@ namespace CalamityMod.Projectiles.Magic } public override void OnKill(int timeLeft) { + Projectile.netUpdate = true; if (Projectile.ai[2] == 1) { doDamage = true; diff --git a/Projectiles/Ranged/CinderArrowProj.cs b/Projectiles/Ranged/CinderArrowProj.cs index 3b599fa134..1933630860 100644 --- a/Projectiles/Ranged/CinderArrowProj.cs +++ b/Projectiles/Ranged/CinderArrowProj.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Items/Ammo/CinderArrow"; public ref float Time => ref Projectile.ai[1]; - public bool isShrapnel => Projectile.ai[2] > 0f; + public ref float isSplit => ref Projectile.ai[2]; + public bool splitShot = false; public override void SetStaticDefaults() { @@ -41,13 +42,23 @@ namespace CalamityMod.Projectiles.Ranged { Time++; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; - if (isShrapnel) + + if (isSplit > 0) { + Projectile.netUpdate = true; + splitShot = true; + } + + if (splitShot) + { + Lighting.AddLight(Projectile.Center, Color.Red.ToVector3() * 0.15f); if (Main.rand.NextBool(4)) { Dust dust = Dust.NewDustPerfect(Projectile.Center + Projectile.velocity * 2, 90, -Projectile.velocity * Main.rand.NextFloat(0.1f, 0.55f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.65f, 0.85f); + dust.noLight = true; + dust.noLightEmittence = true; } } else @@ -72,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged public override void OnKill(int timeLeft) { - if (!isShrapnel) + if (!splitShot) { int Dusts = 9; float radians = MathHelper.TwoPi / Dusts; @@ -90,7 +101,7 @@ namespace CalamityMod.Projectiles.Ranged for (int b = 0; b < 3; b++) { - Vector2 velocity = Vector2.UnitY.RotatedByRandom(0.8f) * Main.rand.NextFloat(-2.75f, -2.25f); + Vector2 velocity = Vector2.UnitY.RotatedByRandom(0.8f) * Main.rand.NextFloat(-3.5f, -3f); Projectile shrapnel = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner, ai2: 1f); shrapnel.timeLeft = 300; shrapnel.arrow = false; @@ -105,17 +116,17 @@ namespace CalamityMod.Projectiles.Ranged } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (isShrapnel) + if (splitShot) { target.AddBuff(ModContent.BuffType(), 180); } } public override bool PreDraw(ref Color lightColor) { - if (isShrapnel) + if (splitShot) { Texture2D texture = ModContent.Request("CalamityMod/Particles/DrainLine").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Crimson * 0.35f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Crimson * 0.3f, 1, texture); return false; } else @@ -127,6 +138,6 @@ namespace CalamityMod.Projectiles.Ranged } } - public override bool? CanDamage() => isShrapnel && Time < 20 ? false : null; + public override bool? CanDamage() => splitShot && Time < 20 ? false : null; } } diff --git a/Projectiles/Ranged/PolarStar.cs b/Projectiles/Ranged/PolarStar.cs index bdc4de08d8..b870ab4aff 100644 --- a/Projectiles/Ranged/PolarStar.cs +++ b/Projectiles/Ranged/PolarStar.cs @@ -46,6 +46,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; + Projectile.tileCollide = true; } public override void AI() @@ -126,30 +127,6 @@ namespace CalamityMod.Projectiles.Ranged DoSlowdown = false; } } - public override bool OnTileCollide(Vector2 oldVelocity) - { - Time = 2; - - if (tileBounces >= 2) - Projectile.Kill(); - else - tileBounces++; - - for (int i = 0; i <= 5; i++) - { - SquishyLightParticle energy = new(Projectile.Center, Projectile.velocity.RotatedByRandom(100) * Main.rand.NextFloat(0.08f, 0.15f), Main.rand.NextFloat(0.4f, 0.7f), EffectsColor, Main.rand.Next(40, 50 + 1), 0.25f, 2f); - GeneralParticleHandler.SpawnParticle(energy); - } - if (Projectile.velocity.X != oldVelocity.X) - { - Projectile.velocity.X = -oldVelocity.X; - } - if (Projectile.velocity.Y != oldVelocity.Y) - { - Projectile.velocity.Y = -oldVelocity.Y; - } - return false; - } public override void OnKill(int timeLeft) { int points = 5; From aa27091e8250c7f4c710d65366d1ed2370e924f2 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 15 May 2024 16:20:39 -0400 Subject: [PATCH 192/197] 1 - Nerf Shadow Armor mobility boosts. 2 - Revert all Calamity Shadow Armor changes. Now gives +5% crit per piece like vanilla with no other effects. --- Balancing/BalancingConstants.cs | 11 ++ ILEditing/BalancingILChanges.cs | 102 +++++++++++++----- ILEditing/ILChangesLoading.cs | 2 +- Items/CalamityGlobalItemTooltip.cs | 4 - .../ShadowArmorSetChange.cs | 18 ++-- 5 files changed, 92 insertions(+), 45 deletions(-) diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs index dc64bb8899..5087a7a6cf 100644 --- a/Balancing/BalancingConstants.cs +++ b/Balancing/BalancingConstants.cs @@ -16,6 +16,17 @@ // Altered jump speed boost provided by Shiny Red Balloon via IL edit // This is a const because it replaces a hardcoded value in vanilla internal const float BalloonJumpSpeedBoost = 0.75f; + + // Altered movement stats provided by Shadow Armor via IL edit + // This item is modified to not stack with Magiluminescence if on the ground. If in the air, it still functions. + internal static readonly float ShadowArmorRunAccelerationMultiplier = 1.25f; // Vanilla and Magi = 1.75f + internal static readonly float ShadowArmorMaxRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f + internal static readonly float ShadowArmorAccRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f + internal static readonly float ShadowArmorRunSlowdownMultiplier = 1.5f; // Vanilla and Magi = 1.75f + + // Altered run acceleration multiplier provided by Soaring Insignia via IL edit + // This is a const because it replaces a hardcoded value in vanilla + internal const float SoaringInsigniaRunAccelerationMultiplier = 1.1f; // Vanilla = 1.75f #endregion #region Immunity Frames diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 0d4956e672..ef06ec1d55 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -27,7 +27,7 @@ namespace CalamityMod.ILEditing #endregion - #region Soaring Insignia Changes + #region Remove Soaring Insignia Infinite Flight private static void RemoveSoaringInsigniaInfiniteWingTime(ILContext il) { // Prevent the infinite flight effect. @@ -42,34 +42,6 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ldc_I4_0); cursor.Emit(OpCodes.And); } - - private static void NerfSoaringInsigniaRunAcceleration(ILContext il) - { - // Nerf the run acceleration boost from 1.75x to 1.1x. - var cursor = new ILCursor(il); - if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("empressBrooch"))) - { - LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia bool."); - return; - } - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.75f))) - { - LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia run acceleration multiplier."); - return; - } - cursor.Next.Operand = 1.1f; - - // Prevent the rocket boots infinite flight effect. - if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("empressBrooch"))) - { - LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia bool."); - return; - } - - // AND with 0 (false) so that the Soaring Insignia is never considered equipped and thus infinite rocket boots never triggers. - cursor.Emit(OpCodes.Ldc_I4_0); - cursor.Emit(OpCodes.And); - } #endregion #region Jump Height Changes @@ -258,6 +230,78 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ldc_R4, iceSkateTopSpeed); } } + + private static void NerfOverpoweredRunAccelerationSources(ILContext il) + { + // First: Soaring Insignia. Find the check for whether it's equipped for run speeds. + var cursor = new ILCursor(il); + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("empressBrooch"))) + { + LogFailure("Run Acceleration Nerfs", "Could not locate the Soaring Insignia bool."); + return; + } + + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.75f))) + { + LogFailure("Run Acceleration Nerfs", "Could not locate the Soaring Insignia run acceleration multiplier."); + return; + } + cursor.Next.Operand = BalancingConstants.SoaringInsigniaRunAccelerationMultiplier; + + // Second: Magiluminescence. Find the check for whether it's equipped for run speeds. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("hasMagiluminescence"))) + { + LogFailure("Run Acceleration Nerfs", "Could not locate the Magiluminescence bool."); + return; + } + + // + // Don't actually do anything. Magiluminescence is not intended to be nerfed by Calamity. + // + + // Third: Shadow Armor. Find the check for whether it's equipped for run speeds. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("shadowArmor"))) + { + LogFailure("Run Acceleration Nerfs", "Could not locate the Shadow Armor bool."); + return; + } + + // Load the player onto the stack as an argument to the following delegate. + // Emit a delegate which consumes the Shadow Armor bool, performs Calamity effects, then always returns false. + // Returning false ensures vanilla Shadow Armor code never runs. + cursor.Emit(OpCodes.Ldarg_0); + + cursor.EmitDelegate((bool shadowArmor, Player p) => { + // If you don't even have Shadow Armor equipped, do nothing. + if (!shadowArmor) + return 0; + + // Shadow Armor does not stack with Magiluminescence if you are on the ground. + if (p.hasMagiluminescence && p.velocity.Y == 0) + return 0; + + // Shadow Armor grants reduced movement bonuses if in the air, or on the ground WITHOUT Magiluminescence. + p.runAcceleration *= BalancingConstants.ShadowArmorRunAccelerationMultiplier; + p.maxRunSpeed *= BalancingConstants.ShadowArmorMaxRunSpeedMultiplier; + p.accRunSpeed *= BalancingConstants.ShadowArmorAccRunSpeedMultiplier; + p.runSlowdown *= BalancingConstants.ShadowArmorRunSlowdownMultiplier; + + // Vanilla Shadow Armor behavior should still always be skipped. + return 0; + }); + + + // Finally: Back to Soaring Insignia. Prevent the rocket boots infinite flight effect, since it's in the same function. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("empressBrooch"))) + { + LogFailure("Run Acceleration Nerfs", "Could not locate the Soaring Insignia bool."); + return; + } + + // AND with 0 (false) so that the Soaring Insignia is never considered equipped and thus infinite rocket boots never triggers. + cursor.Emit(OpCodes.Ldc_I4_0); + cursor.Emit(OpCodes.And); + } #endregion #region Life Regen Changes diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 2c8fb20700..c2ea95f2b1 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -107,7 +107,7 @@ namespace CalamityMod.ILEditing IL_Player.UpdateJumpHeight += FixJumpHeightBoosts; IL_Player.Update += BaseJumpHeightAdjustment; IL_Player.Update += RunSpeedAdjustments; - IL_Player.Update += NerfSoaringInsigniaRunAcceleration; + IL_Player.Update += NerfOverpoweredRunAccelerationSources; // Soaring Insignia, Magiluminescence, and Shadow Armor IL_Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime; // Life regen balance diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 2e4827495f..2c32034142 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -841,10 +841,6 @@ namespace CalamityMod.Items if (item.type == ItemID.JunglePants || item.type == ItemID.AncientCobaltLeggings) EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("6%", "3%")); - // Shadow - if (item.type == ItemID.ShadowHelmet || item.type == ItemID.AncientShadowHelmet || item.type == ItemID.ShadowScalemail || item.type == ItemID.AncientShadowScalemail || item.type == ItemID.ShadowGreaves || item.type == ItemID.AncientShadowGreaves) - EditTooltipByNum(0, (line) => line.Text = "5% increased damage and 7% increased jump speed"); - // Crimson if (item.type == ItemID.CrimsonHelmet || item.type == ItemID.CrimsonScalemail || item.type == ItemID.CrimsonGreaves) { diff --git a/Items/VanillaArmorChanges/ShadowArmorSetChange.cs b/Items/VanillaArmorChanges/ShadowArmorSetChange.cs index b046bb9c76..b93bb0d478 100644 --- a/Items/VanillaArmorChanges/ShadowArmorSetChange.cs +++ b/Items/VanillaArmorChanges/ShadowArmorSetChange.cs @@ -1,6 +1,5 @@ using Terraria; using Terraria.ID; -using Terraria.ModLoader; namespace CalamityMod.Items.VanillaArmorChanges { @@ -18,17 +17,14 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Shadow"; - public const float ArmorPieceDamage = 0.05f; - public const float ArmorPieceJumpBoost = 0.07f; - - private void ApplyAnyPieceEffect(Player player) + private static void ApplyAnyPieceEffect(Player player) { - // Remove the vanilla crit chance buff and replace it with damage - player.GetCritChance() -= 5; - player.GetDamage() += ArmorPieceDamage; - - // Give jump boost - player.jumpSpeedBoost += 5f * ArmorPieceJumpBoost; + // 15MAY2024: Ozzatron: Removed all standard changes to Shadow Armor. + // As such, this method intentionally does nothing. + // + // Shadow Armor's movement speed boosting effect is separately nerfed via an IL edit. + // + // Class is being left here so that further changes can be made to Shadow Armor as needed. } public override void ApplyHeadPieceEffect(Player player) => ApplyAnyPieceEffect(player); From 3aac8dbc4ecbd2f18c982d82c2fd27d0be6c2ff1 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 15 May 2024 16:31:52 -0400 Subject: [PATCH 193/197] Buff Crimson Armor from 5% to 6% damage per piece. Increase life regen on chestplate to 2. --- Items/CalamityGlobalItemTooltip.cs | 5 +++-- Items/VanillaArmorChanges/CrimsonArmorSetChange.cs | 12 ++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 2c32034142..d2fa8e249d 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -846,8 +846,9 @@ namespace CalamityMod.Items { EditTooltipByNum(0, (line) => { - string newTooltip = line.Text.Replace("3%", "5%"); - newTooltip += "\n+0.5 HP/s life regen"; + string newTooltip = line.Text.Replace("3%", "6%"); + // Chest piece has 2 regen instead of 1 + newTooltip += item.type == ItemID.CrimsonScalemail ? "\n+1 HP/s life regen" : "\n+0.5 HP/s life regen"; line.Text = newTooltip; }); } diff --git a/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs b/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs index c8314dbaac..d74e80cff3 100644 --- a/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs @@ -14,17 +14,17 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Crimson"; - public const float ArmorPieceDamage = 0.05f; + public const float ArmorPieceDamage = 0.06f; public const int ArmorPieceLifeRegen = 1; + public const int ChestPieceBonusLifeRegen = 1; // Set bonus clarification public override void UpdateSetBonusText(ref string setBonusText) { - Player player = Main.LocalPlayer; setBonusText = $"{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; } - private void ApplyAnyPieceEffect(Player player) + private static void ApplyAnyPieceEffect(Player player) { // Remove the vanilla +3% damage and add the new damage value at the same time player.GetDamage() += ArmorPieceDamage - 0.03f; @@ -35,7 +35,11 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyHeadPieceEffect(Player player) => ApplyAnyPieceEffect(player); - public override void ApplyBodyPieceEffect(Player player) => ApplyAnyPieceEffect(player); + public override void ApplyBodyPieceEffect(Player player) + { + ApplyAnyPieceEffect(player); + player.lifeRegen += ChestPieceBonusLifeRegen; + } public override void ApplyLegPieceEffect(Player player) => ApplyAnyPieceEffect(player); } From 36fa789864245a7af8c889eff7ddaf6d9082b006 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 15 May 2024 18:08:35 -0400 Subject: [PATCH 194/197] Fixed not getting Proximity Rage from slimes that were not currently jumping. --- Utilities/NPCUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index c28f3fdab4..08c4955552 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -147,7 +147,7 @@ namespace CalamityMod // "Non-enemies" (e.g. butterflies or projectile enemies) with near zero max health, // or anything but the strongest enemies with no contact damage (e.g. Celestial Pillars, Providence) // do not generate rage. - if (npc.lifeMax <= BalancingConstants.TinyHealthThreshold || (npc.damage <= BalancingConstants.TinyDamageThreshold && npc.lifeMax <= BalancingConstants.NoContactDamageHealthThreshold)) + if (npc.lifeMax <= BalancingConstants.TinyHealthThreshold || (npc.defDamage <= BalancingConstants.TinyDamageThreshold && npc.lifeMax <= BalancingConstants.NoContactDamageHealthThreshold)) return false; // Also explicitly exclude dummies and anything with a ridiculous health pool (dummies from Fargo's for example). if (npc.type == NPCID.TargetDummy || npc.type == NPCType() || npc.lifeMax > BalancingConstants.UnreasonableHealthThreshold) From 1c6115a24d648ce6f6e41f5e4a0da1372e4678d2 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 15 May 2024 17:17:52 -0500 Subject: [PATCH 195/197] Fixed some other potential texture Width() and Height() function issues. --- NPCs/CalamityGlobalNPC.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ec513557be..9dc40ae725 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6806,7 +6806,9 @@ namespace CalamityMod.NPCs Vector2 halfSize = npc.frame.Size() / 2; - spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)TextureAssets.Npc[npc.type].Width() * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)TextureAssets.Npc[npc.type].Height() * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, alphaColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); + int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width(); + int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); + spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, alphaColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); } } else @@ -7181,7 +7183,9 @@ namespace CalamityMod.NPCs if (npc.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)TextureAssets.Npc[npc.type].Width() * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)TextureAssets.Npc[npc.type].Height() * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); + int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width(); + int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); + spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); } } } @@ -7231,7 +7235,9 @@ namespace CalamityMod.NPCs position.Y -= npc.height / 2; - spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)TextureAssets.Npc[npc.type].Width() * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)TextureAssets.Npc[npc.type].Height() * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); + int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width(); + int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); + spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); } float secondAfterimageSetHealthValue = (int)(Main.npc[NPC.crimsonBoss].lifeMax * 0.8f); @@ -7312,7 +7318,9 @@ namespace CalamityMod.NPCs position.X -= npc.width / 2; position.Y -= npc.height / 2; - spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)TextureAssets.Npc[npc.type].Width() * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)TextureAssets.Npc[npc.type].Height() * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); + int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width(); + int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); + spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); } } } From 259bee9214a95ab544d4ba795d88672223e2e648 Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Wed, 15 May 2024 16:17:11 -0700 Subject: [PATCH 196/197] Alpha Virus nerf, Ultra Liquidator tooltip --- Items/Weapons/Rogue/AlphaVirus.cs | 2 ++ Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson | 1 - Projectiles/Rogue/AlphaSeeker.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 2cedc925c2..136298988c 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -32,6 +32,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } + public override float StealthDamageMultiplier => 0.70f; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 900842eba5..32f2aa6047 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -864,7 +864,6 @@ UltraLiquidator: { Tooltip: ''' Summons liquidation blades that summon more blades on enemy hits - The blades inflict ichor, cursed inferno and brimstone flames ''' } diff --git a/Projectiles/Rogue/AlphaSeeker.cs b/Projectiles/Rogue/AlphaSeeker.cs index e15fc1e560..7d91a5bc1f 100644 --- a/Projectiles/Rogue/AlphaSeeker.cs +++ b/Projectiles/Rogue/AlphaSeeker.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 1; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.Calamity().CannotProc = true; Projectile.extraUpdates = 1; } From 52da62024ae1fec763045b10757f09000411c9b0 Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 15 May 2024 16:38:01 -0700 Subject: [PATCH 197/197] More small fixes --- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 2 +- Items/Weapons/DraedonsArsenal/PulseRifle.png | Bin 1218 -> 1312 bytes .../DraedonsArsenal/PulseRifleGlow.png | Bin 3071 -> 897 bytes Items/Weapons/Ranged/NitroExpressRifle.cs | 6 ++++-- Projectiles/Magic/WingmanHoldout.cs | 2 +- Projectiles/Ranged/MarksmanShot.cs | 2 ++ Projectiles/Ranged/MineralMortarHoldout.cs | 2 +- 7 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index c17d4093a8..9a68a38931 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { CalamityGlobalItem modItem = Item.Calamity(); - Item.width = 98; + Item.width = 100; Item.height = 32; Item.DamageType = DamageClass.Ranged; Item.damage = BaseDamage; diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.png b/Items/Weapons/DraedonsArsenal/PulseRifle.png index 4075f9d5944f91f7c901e907b3c6a1439f1d4712..bcb3e668d97ef4d8518b2da701b7f9136e0e90c4 100644 GIT binary patch delta 1264 zcmVeaN~x_Xn3VGtTEd=YP(UfgR~FeuuxeUSsBsUSz}9GHq#-%<`_6+G%`*W?5PQpeb?Ph7F5^lGPX=i z1sM*JrA9sP9Kt%@1QC9yqFIZSj%3^+exFa9nf{~2V)NSa(vs96xOOoXf72EhV%pz$ zvyyFxp?~~-Ked2AK>Jp*;Sk;-NI7);ZOw!*+Lh(2WRIWQMi!3QU0X}`)$2E8t3p*| z;h?tmR=Bz^uyJ2{( zgCf>e*R;9$Iai194kR32e^>@mf$cu%5T0`25CF%3{$CHso@#F=3*abFx6i&0$AF2b z{W;u0fWKd+U_qMXfaa!S##Vx!-cMu`;aNZ#OobqVP+WNm;2y@`<`IvS%Lgxjr)E%4h+;?;e}agVDI;FAbW!*P zP72|}SRUbs97GsEB=YxoqM3>$IwFbpI^Sw9@}Rb=m~2C1Ioa#?KavG9C3B#_`o@HE zIkJA@$ZCeAUuaOVZiNVEh+$$bOtx|bF~Qa2vs;R6FEuxi5%i4b>2_R3VzU5tc6sq=#^Zwf}@dXd@0qHX?|Rj*vqwqbuO3l=yWvPTlU@{8=3i_Pb~~+ z<&`1n;;3L-CTakbB0gTUnaQZ}mja-s`~=yV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}{k_?699m0x|@lC)*8 z%%N=0R?Jr6*6Z8cw;d=~F3&F?+a9vLa|dHb$&Qyhm+ZVyVOLSNi?B>BD~Ee(8aT1AWbo&CM;EEoH56tE6@EV8X%6-*|u1-NtOIZ>P7H z9s-9XhaP{M`0e$>L5F*fu#U8SXZT%h2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe z@An_mJyvsE<#^c%!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf z_v}A;-u3*k3(gmgUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R16009e0L_t(&f$i6!Zo*I)hT*pf zL7{4K6_Y3=Hv%`o%#cearZDU#hTk}YAw=?J zEs`NbN)B;8s>a)XCr6YaL`nt`0cP3gwxEzJM ztKKWue*omu0RWTY8K`gVHbhe);)m2VI?DCW$pLN!pq?Q_`uAv>6!QSE>MeopU9NR! z2$7Qi(77r@h-3(n3?WkMAmVymy!-;qS%(cFQtKd^nju6ogh+-E=?Jj(*TI+c0~`PV N002ovPDHLkV1ks}yIKGM diff --git a/Items/Weapons/Ranged/NitroExpressRifle.cs b/Items/Weapons/Ranged/NitroExpressRifle.cs index 8964b33364..eab45c79d1 100644 --- a/Items/Weapons/Ranged/NitroExpressRifle.cs +++ b/Items/Weapons/Ranged/NitroExpressRifle.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.UseSound = FireSound; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ProjectileID.Bullet; Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Bullet; Item.rare = ItemRarityID.LightRed; @@ -66,7 +66,9 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { player.velocity += -velocity * 0.3f; - Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f); + if (type == ProjectileID.Bullet) + type = ModContent.ProjectileType(); + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f); return false; } diff --git a/Projectiles/Magic/WingmanHoldout.cs b/Projectiles/Magic/WingmanHoldout.cs index 052e406b2a..bca2231d0b 100644 --- a/Projectiles/Magic/WingmanHoldout.cs +++ b/Projectiles/Magic/WingmanHoldout.cs @@ -286,7 +286,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (time <= 0) + if (time <= 0 && !Main.dedServ) return false; Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Magic/Wingman").Value; diff --git a/Projectiles/Ranged/MarksmanShot.cs b/Projectiles/Ranged/MarksmanShot.cs index 5afea94f6a..e7f74735cf 100644 --- a/Projectiles/Ranged/MarksmanShot.cs +++ b/Projectiles/Ranged/MarksmanShot.cs @@ -45,6 +45,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.friendly = true; Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = Lifetime; Projectile.MaxUpdates = UpdateCount; Projectile.alpha = 255; diff --git a/Projectiles/Ranged/MineralMortarHoldout.cs b/Projectiles/Ranged/MineralMortarHoldout.cs index 72ced92643..aa1f8f32b6 100644 --- a/Projectiles/Ranged/MineralMortarHoldout.cs +++ b/Projectiles/Ranged/MineralMortarHoldout.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Ranged { Owner.PickAmmo(Owner.ActiveItem(), out _, out float speed, out int damage, out float knockback, out int usedItemAmmoId); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitX) * speed, ModContent.ProjectileType(), damage, knockback, Projectile.owner, usedItemAmmoId); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitX) * speed * 1.5f, ModContent.ProjectileType(), damage, knockback, Projectile.owner, usedItemAmmoId); // Doesn't sync this to the server, it's just effects. if (!Main.dedServ)

Vdop$qXX)KuBE@m~NH|QHcBUJ?YMO8dA zK6|n5G_QkpEfG-eKd;>&U{hT7_#J{YGe!1M4RJlw~3V zu+3*$BCpzJGyGaIX@7tm9#^%4kbu0fV^sR5?%!_7`>)Z;lXzJmjhfgX+o7?CrQ~CY zM;*2bT!yUs58Fps*h3w1tNg7X)dCyY^l||G2cKDv3L_eLaRF~G4ZY`EwNHZ`K|IU#>d(vQqa#h7R@Y#~ zK(|zmXc73|r;c%_llaa-{4dnpVir_9#!A+?j)6R4dHTDKJcHv=F%xCUfmgZfh$Y*4 z2)6*28bBmqoUlY_I^F}I+bh258tmrV?~(6|H#_&Ha47qb&gNOm}unO7zjOvr@ zaE#1sgRCBvxp8=R=-ODvHrBzSoorq@?WQt5do3Mwsl5sIQBZxl}f z*Vp;==hStcn~$Z1wOg7&L~qBOIv4D?Ow$OeLn({I*1_+Ibp$uMf3`YM!+;f(u&@ax zYx3jj!jHPUH7lEnk>V8br$efY>msB$ZN2W8IU>gsPkUx(u}|7^&paMqyMUpLUR?}P zH5{x@7RbZL2SF(FYFg$9>ICYueuAYJBuC>_mwd+WNudVdxEia`g9G$4m}c!zhhC1u za{pJibbNPaXPrW2uXUvv*m;+E&~VR%YfhPzPK#^rfn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ig-#jK~S- z71|4wV_r)zISaW?iE)7^x>*mW7d_(`5P{JyH7U5xN~?KuwtFVU^{ znzH~>3CkEQ{%Co6st7wF&Z0lJjZ+PZ2`#F)#MllgO6%c=jehi&{)+1JKU9A2JE?lJ zX7>0mr-1vw6Mlc&YUh#51R_>ZgD^2>v2+umLykalU2<`!PzMog%y8rfowE@$#g(Xxp& zIPlm5;iBe=%E6bqpYkCn4i+Rq*u(57nFqa(oh??iqd+{!(R1Jj>-)xozhe#jSSdZ1 zDpDu*3IN;0`TY|-pJEETa#YJl%?0Mkxhez3n&sR26d^D@PJDja0;xjbDmWk;S~3$~ za-z=DITIwFE8*Z?H6NU*iIzm8zWrN#^oMRxkq}%&eB{poY2fcoUNZQghaXE%moF;@ zy5JeO4`rs{_U*V}<+pz=XEdsjN0N^Eh+(Ppd>AJi2(J8_)bJPY23V9LZXIha2o&Vk zUCyh2!KPr_EF9>MzOLlGd(6Ozh~W60`vQ0uTr02OG*(zUZ_(hNsZb&C>{1rK$TA_^ zk`h_}dgFY(D5l~3ssH!580EK~mNQwcyH5j0lF^W-Hi6`n1VDiOGZVC2PdGLVYcFbL zXL^DR)`x@GGeG1Tzu6%%xr>@*HtWZ{oMEDW@mb*LwOl-ipThN%Bm1MnN7{!c#S|PX z98x}uhx}Dp_d~A`g-jtf<>yKw=fNgy3i97^+H!yrlhld0lO*hu<~jZ(s*{l2M3>#$ zd>}e6g#`JEHkB%9?^^5>8W{eMMC8E$?^^d?su5(G7`XbJT>4v*0ppiq2e#{d7!)&U zJAQ$20>Z662z;6&mLP3-UFU_}jp+M= 3) { - if (Projectile.timeLeft > 240) + if (Main.zenithWorld) { - shootVel = Projectile.velocity * 0.4f; - Projectile.timeLeft = 240; - rotDirection = Main.rand.NextBool() ? -1 : 1; - Projectile.velocity *= 5.5f; - broIsAlive = NPC.AnyNPCs(ModContent.NPCType()); + if (Projectile.timeLeft > 400) + { + shootVel = Projectile.velocity * 0.4f; + Projectile.timeLeft = 400; + rotDirection = Main.rand.NextBool() ? -1 : 1; + Projectile.velocity *= 6f; + broIsAlive = NPC.AnyNPCs(ModContent.NPCType()); + } + else + { + if (Time > 10) + Projectile.tileCollide = true; + else + Projectile.velocity *= 0.99f; + Projectile.rotation += 0.02f; + } + + if (Projectile.timeLeft == 1) + { + int points = 25; + float radians = MathHelper.TwoPi / points; + Vector2 spinningPoint = Vector2.Normalize(new Vector2(-4f, -4f)); + for (int b = 0; b < 2; b++) + { + float rotRando = Main.rand.NextFloat(0.1f, 2.5f); + for (int k = 0; k < points; k++) + { + Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando); + + Dust cataclysmdust = Dust.NewDustPerfect(Projectile.Center + velocity * (b == 0 ? 7 : 5), 279, velocity * (b == 0 ? 9 : 7)); + cataclysmdust.noGravity = true; + cataclysmdust.scale = Main.rand.NextFloat(1.3f, 1.9f); + cataclysmdust.color = Color.Red; + } + } + Projectile.Kill(); + } + + Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); + Dust cataclysmdust2 = Dust.NewDustPerfect(Projectile.Center + vel * 2, 279, vel); + cataclysmdust2.noGravity = true; + cataclysmdust2.scale = Main.rand.NextFloat(0.9f, 1.2f); + cataclysmdust2.color = Color.Red; } else { - float randSize = Main.rand.NextFloat(0.8f, 1.2f); - for (int i = 0; i < 2; i++) + if (Projectile.timeLeft > 240) { - Particle bloom = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.7f * randSize, 0f, 10); - GeneralParticleHandler.SpawnParticle(bloom); + shootVel = Projectile.velocity * 0.4f; + Projectile.timeLeft = 240; + rotDirection = Main.rand.NextBool() ? -1 : 1; + Projectile.velocity *= 5.5f; + broIsAlive = NPC.AnyNPCs(ModContent.NPCType()); } - Particle bloom3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.9f, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.4f * randSize, 0f, 10); - GeneralParticleHandler.SpawnParticle(bloom3); - - Projectile.velocity *= 0.945f; - } - - // Adds rotation, but it's SUPER unfair a lot of the time - //shootVel = shootVel.RotatedBy(Time * 0.00011f * rotDirection); - - - if (Projectile.timeLeft == 205) // Fist direction telegraphs - { - for (int k = 0; k < 28; k++) + else { - Vector2 vel1 = -shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f); - GlowSparkParticle spark = new GlowSparkParticle(Projectile.Center + vel1 * (9 + k * 11), vel1, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false); - GeneralParticleHandler.SpawnParticle(spark); + float randSize = Main.rand.NextFloat(0.8f, 1.2f); + for (int i = 0; i < 2; i++) + { + Particle bloom = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.7f * randSize, 0f, 10); + GeneralParticleHandler.SpawnParticle(bloom); + } + Particle bloom3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.9f, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.4f * randSize, 0f, 10); + GeneralParticleHandler.SpawnParticle(bloom3); + + Projectile.velocity *= 0.945f; } - if (broIsAlive == false) + + // Adds rotation, but it's SUPER unfair a lot of the time + //shootVel = shootVel.RotatedBy(Time * 0.00011f * rotDirection); + + + if (Projectile.timeLeft == 205) // Fist direction telegraphs { for (int k = 0; k < 28; k++) { - Vector2 vel2 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)); - GlowSparkParticle spark2 = new GlowSparkParticle(Projectile.Center + vel2 * (9 + k * 11), vel2, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false); - GeneralParticleHandler.SpawnParticle(spark2); + Vector2 vel1 = -shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f); + GlowSparkParticle spark = new GlowSparkParticle(Projectile.Center + vel1 * (9 + k * 11), vel1, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false); + GeneralParticleHandler.SpawnParticle(spark); } - for (int k = 0; k < 28; k++) + if (broIsAlive == false) { - Vector2 vel3 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)); - GlowSparkParticle spark3 = new GlowSparkParticle(Projectile.Center + vel3 * (9 + k * 11), vel3, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false); - GeneralParticleHandler.SpawnParticle(spark3); + for (int k = 0; k < 28; k++) + { + Vector2 vel2 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)); + GlowSparkParticle spark2 = new GlowSparkParticle(Projectile.Center + vel2 * (9 + k * 11), vel2, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false); + GeneralParticleHandler.SpawnParticle(spark2); + } + for (int k = 0; k < 28; k++) + { + Vector2 vel3 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)); + GlowSparkParticle spark3 = new GlowSparkParticle(Projectile.Center + vel3 * (9 + k * 11), vel3, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false); + GeneralParticleHandler.SpawnParticle(spark3); + } } } - } - if (Projectile.timeLeft <= 200 && Time % 3 == 0) - { - Vector2 randPos = (-shootVel * 1.5f).RotatedByRandom(1) * Main.rand.NextFloat(5, 15); - int type = ModContent.ProjectileType(); - SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.2f, Pitch = 0.55f }, Projectile.Center); - Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0); - } - if (Projectile.timeLeft <= 200 && Time % 3 == 0 && broIsAlive == false) - { - Vector2 randPos = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15); - Vector2 randPos2 = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(-120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15); - int type = ModContent.ProjectileType(); - Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0); - Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos2, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0); - } - if (Projectile.timeLeft == 1) - { - int points = 25; - float radians = MathHelper.TwoPi / points; - Vector2 spinningPoint = Vector2.Normalize(new Vector2(-4f, -4f)); - for (int b = 0; b < 2; b++) + if (Projectile.timeLeft <= 200 && Time % 3 == 0) { - float rotRando = Main.rand.NextFloat(0.1f, 2.5f); - for (int k = 0; k < points; k++) - { - Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando); - - Dust cataclysmdust = Dust.NewDustPerfect(Projectile.Center + velocity * (b == 0 ? 7 : 5), 279, velocity * (b == 0 ? 9 : 7)); - cataclysmdust.noGravity = true; - cataclysmdust.scale = Main.rand.NextFloat(1.3f, 1.9f); - cataclysmdust.color = Color.Red; - } + Vector2 randPos = (-shootVel * 1.5f).RotatedByRandom(1) * Main.rand.NextFloat(5, 15); + int type = ModContent.ProjectileType(); + SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.2f, Pitch = 0.55f }, Projectile.Center); + Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0); } - Projectile.Kill(); - } + if (Projectile.timeLeft <= 200 && Time % 3 == 0 && broIsAlive == false) + { + Vector2 randPos = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15); + Vector2 randPos2 = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(-120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15); + int type = ModContent.ProjectileType(); + Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0); + Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos2, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0); + } + if (Projectile.timeLeft == 1) + { + int points = 25; + float radians = MathHelper.TwoPi / points; + Vector2 spinningPoint = Vector2.Normalize(new Vector2(-4f, -4f)); + for (int b = 0; b < 2; b++) + { + float rotRando = Main.rand.NextFloat(0.1f, 2.5f); + for (int k = 0; k < points; k++) + { + Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando); - Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); - Dust cataclysmdust2 = Dust.NewDustPerfect(Projectile.Center + vel * 2, 279, vel); - cataclysmdust2.noGravity = true; - cataclysmdust2.scale = Main.rand.NextFloat(0.9f, 1.2f); - cataclysmdust2.color = Color.Red; + Dust cataclysmdust = Dust.NewDustPerfect(Projectile.Center + velocity * (b == 0 ? 7 : 5), 279, velocity * (b == 0 ? 9 : 7)); + cataclysmdust.noGravity = true; + cataclysmdust.scale = Main.rand.NextFloat(1.3f, 1.9f); + cataclysmdust.color = Color.Red; + } + } + Projectile.Kill(); + } + + Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f); + Dust cataclysmdust2 = Dust.NewDustPerfect(Projectile.Center + vel * 2, 279, vel); + cataclysmdust2.noGravity = true; + cataclysmdust2.scale = Main.rand.NextFloat(0.9f, 1.2f); + cataclysmdust2.color = Color.Red; + } } else if (Projectile.ai[2] <= 2) { @@ -165,6 +214,9 @@ namespace CalamityMod.Projectiles.Boss Projectile.velocity *= 1.006f; } + if (Main.zenithWorld && Projectile.ai[2] >= 3) + return; + if (Projectile.velocity.X < 0f) { Projectile.spriteDirection = -1; @@ -187,7 +239,7 @@ namespace CalamityMod.Projectiles.Boss Time++; - if (NPC.AnyNPCs(ModContent.NPCType()) == false) + if (NPC.AnyNPCs(ModContent.NPCType()) == false && !Main.zenithWorld) { Projectile.timeLeft = 1; for (int k = 0; k < 10; k++) @@ -207,6 +259,13 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { + if (Main.zenithWorld && Projectile.ai[2] >= 3) + { + Texture2D ballTexture = ModContent.Request("CalamityMod/Projectiles/Boss/Basketball").Value; + Main.EntitySpriteDraw(ballTexture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, ballTexture.Size() * 0.5f, Projectile.scale / 1.8f, SpriteEffects.None, 0); + return false; + } + lightColor.R = (byte)(255 * Projectile.Opacity); SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; @@ -229,6 +288,21 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 240, true); } + public override bool OnTileCollide(Vector2 oldVelocity) + { + SoundStyle b = new("CalamityMod/Sounds/Custom/Kickball"); + SoundEngine.PlaySound(b with { PitchVariance = 0.15f }, Projectile.Center); + + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = -oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = -oldVelocity.Y; + } + return false; + } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, (Projectile.ai[2] >= 3 ? 90 : 35 * Projectile.scale), targetHitbox); } } diff --git a/Projectiles/Boss/SupremeCatastropheSlash.cs b/Projectiles/Boss/SupremeCatastropheSlash.cs index d875f0742a..9048168f99 100644 --- a/Projectiles/Boss/SupremeCatastropheSlash.cs +++ b/Projectiles/Boss/SupremeCatastropheSlash.cs @@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Boss } } - if (NPC.AnyNPCs(ModContent.NPCType()) == false) + if (NPC.AnyNPCs(ModContent.NPCType()) == false && !Main.zenithWorld) { Projectile.timeLeft = 1; for (int k = 0; k < 10; k++) diff --git a/Sounds/Custom/Kickball.ogg b/Sounds/Custom/Kickball.ogg new file mode 100644 index 0000000000000000000000000000000000000000..f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@RFZxAH{N{M>-{>c`gF`WzmAKVk^u)md-fm546>$%0C%w9 z_+5TIt+!A6#@6N1Y*xI%`643#G6^EqcYT#J05SvIhxM;L6(!FenP3=YGc)_>XwBHi zW-J%YHg3rZW|6XsTK!D2^GeAcS$UsX$wqboJ_X$TY+n$-0h)k6XTJjj3b+z^?f?ZK zcYp>U=Ok5CRaFHu0001nL)HBOwOhaU5~xM~>sj{CGxuI5IyHA3lJ~+3lrGmzT3& zOc%JEXS=wV=J|4-rk6HfI$lnbf1Bs&;=(THZ@8FV`uy$ErkCdPH@}!J@XfzX)5YZT z{x5&>aXruALnI%`Bj9X)$bQdeaax*Mi);DIxexfB_|;AkRSOFoM%iEzPVjYe(82G>$8ZNBvB!sc&&aWP$f!*pTaW?WqO<&2A$ zK40SH zmy=&!PA|7xSXdCkstFoj*n-?hd9qX4)SAu zI5^E9J{whA-S5aIQ#eKQ>;=Y{AemND_%xU@ZCtAMzfqyw=yGUA^snPt>}!6Y`#8w60bXD5DhC63AomBu1Kro*LG~htdA2WK z<^CW)z)N;8%mzBlvwe9W2e9^RN+R;)IP&B}oEZn_c^rA>apcK|IM4XN$2<-`=7;0_ z7)PAv@gYCv@gYBQVe_TEw9EP80^jC~i}~d=U;4|7%WwA5E-$Bx`4TT}p6$Xe=ZncN z{o-Q&W*0VJ+66A>X~H*uIn6UJ>~fwieD>+Wzv05>OM8jSdAh*2`Ql=}#KkmU+Dp5f zrEh$B9~#ALX@2}QajnI5 zk*zr`TC-pNP=%H*vR^-GS!;1${`hN7OBcm``NKEGYw03BaAq8NazrLaqj)XNkH4ly zo;g~3HszVUc20R_ufv>9~xcS+>Ab Date: Mon, 13 May 2024 00:53:25 -0700 Subject: [PATCH 133/197] Hellfire Treads + Fixing Balance --- Balancing/BalancingChangesManager.cs | 3 +++ CalPlayer/CalamityPlayer.cs | 2 ++ CalPlayer/CalamityPlayerOnHit.cs | 7 +++++++ Items/CalamityGlobalItem.cs | 9 +++++++++ Items/CalamityGlobalItemTooltip.cs | 8 ++++++++ Items/Weapons/Magic/Wingman.cs | 2 +- Items/Weapons/Ranged/NitroExpressRifle.cs | 2 +- Items/Weapons/Rogue/HeavenfallenStardisk.cs | 4 +++- NPCs/CalamityGlobalNPC.cs | 4 ++++ Projectiles/Magic/OmicronWingman.cs | 4 ++-- Projectiles/Magic/PlasmaShot.cs | 2 +- Projectiles/Magic/WingmanGrenade.cs | 4 ++-- Projectiles/Magic/WingmanHoldout.cs | 2 +- Utilities/CalamityRecipes.cs | 6 ++++-- 14 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 1fae88c626..3daca26a39 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -410,6 +410,9 @@ namespace CalamityMod.Balancing // 50% resist to Tarragon Throwing Dart's thorns. (LOL) NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); + // 50% resist to Omicron's beam. + NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); + // 50% resist to Vehemence's skulls. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a781e0932a..065bb235e5 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -594,6 +594,7 @@ namespace CalamityMod.CalPlayer public bool anechoicPlating = false; public bool jellyfishNecklace = false; public bool fairyBoots = false; + public bool flameWakerBoots = false; public bool hellfireTreads = false; public bool abyssalAmulet = false; public bool lumenousAmulet = false; @@ -1816,6 +1817,7 @@ namespace CalamityMod.CalPlayer anechoicPlating = false; jellyfishNecklace = false; fairyBoots = false; + flameWakerBoots = false; hellfireTreads = false; abyssalAmulet = false; lumenousAmulet = false; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 8545129723..a2d6e81a56 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -77,6 +77,7 @@ namespace CalamityMod.CalPlayer target.Calamity().IncreasedHeatEffects_Fireball = fireball; target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll; + target.Calamity().IncreasedHeatEffects_FlameWakerBoots = flameWakerBoots; target.Calamity().IncreasedHeatEffects_HellfireTreads = hellfireTreads; target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart; @@ -155,6 +156,9 @@ namespace CalamityMod.CalPlayer break; } + if (flameWakerBoots) + target.AddBuff(BuffID.OnFire, 120); + if (hellfireTreads) { if (Main.rand.NextBool(4)) @@ -305,6 +309,9 @@ namespace CalamityMod.CalPlayer break; } + if (flameWakerBoots) + target.AddBuff(BuffID.OnFire, 120); + if ((proj.arrow && Player.hasMoltenQuiver) || hellfireTreads) { if (Main.rand.NextBool(4)) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index b743273ca7..ddcd99cad6 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -160,6 +160,10 @@ namespace CalamityMod.Items if (item.type == ItemID.PearlwoodBow || item.type == ItemID.PearlwoodHammer || item.type == ItemID.PearlwoodSword) item.rare = ItemRarityID.LightRed; + //Flame Waker Boots are no longer just vanity and therefore lose the vanity tooltip. + if (item.type == ItemID.FlameWakerBoots) + item.vanity = false; + // Volatile Gelatin is pre-mech post-WoF so it should use the pink rarity. if (item.type == ItemID.VolatileGelatin) item.rare = ItemRarityID.Pink; @@ -1179,6 +1183,11 @@ namespace CalamityMod.Items if (item.type == ItemID.AnkhShield) player.buffImmune[BuffID.WindPushed] = true; + if (item.type == ItemID.FlameWakerBoots) + { + modPlayer.flameWakerBoots = true; + } + if (item.type == ItemID.HellfireTreads) { modPlayer.hellfireTreads = true; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 141680d6f9..6bf44df70b 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -583,6 +583,14 @@ namespace CalamityMod.Items "Drinking more than 3 different alcohols might not end well with your liver"); } + //Flame Waker Boots buff. + if (item.type == ItemID.FlameWakerBoots) + { + EditTooltipByNum(0, (line) => line.Text = "Multiplies all fire-based debuff damage by 1.25\n" + + "All attacks light enemies on fire\n" + + "'Never get cold feet again'\n"); + } + // Hellfire Treads buff. if (item.type == ItemID.HellfireTreads) { diff --git a/Items/Weapons/Magic/Wingman.cs b/Items/Weapons/Magic/Wingman.cs index 078a802904..1526be5dd7 100644 --- a/Items/Weapons/Magic/Wingman.cs +++ b/Items/Weapons/Magic/Wingman.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 44; Item.height = 42; - Item.damage = 71; + Item.damage = 82; Item.DamageType = DamageClass.Magic; Item.mana = 5; Item.useTime = 15; diff --git a/Items/Weapons/Ranged/NitroExpressRifle.cs b/Items/Weapons/Ranged/NitroExpressRifle.cs index 8a970087f8..fcaa47df0d 100644 --- a/Items/Weapons/Ranged/NitroExpressRifle.cs +++ b/Items/Weapons/Ranged/NitroExpressRifle.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 100; Item.height = 22; - Item.damage = 100; + Item.damage = 210; Item.DamageType = DamageClass.Ranged; Item.useTime = 70; Item.useAnimation = 70; diff --git a/Items/Weapons/Rogue/HeavenfallenStardisk.cs b/Items/Weapons/Rogue/HeavenfallenStardisk.cs index 0e0263c937..92de798ec1 100644 --- a/Items/Weapons/Rogue/HeavenfallenStardisk.cs +++ b/Items/Weapons/Rogue/HeavenfallenStardisk.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 44; Item.height = 48; - Item.damage = 155; + Item.damage = 165; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 40; @@ -28,6 +28,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } + public override float StealthDamageMultiplier => 1.2f; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 48b166f1ce..a28eb5c3c7 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -127,6 +127,7 @@ namespace CalamityMod.NPCs // Fireball, Cinnamon Roll and Hellfire Treads effects public bool IncreasedHeatEffects_Fireball = false; public bool IncreasedHeatEffects_CinnamonRoll = false; + public bool IncreasedHeatEffects_FlameWakerBoots = false; public bool IncreasedHeatEffects_HellfireTreads = false; // Toxic Heart effect @@ -406,6 +407,7 @@ namespace CalamityMod.NPCs myClone.IncreasedElectricityEffects_Transformer = IncreasedElectricityEffects_Transformer; myClone.IncreasedHeatEffects_Fireball = IncreasedHeatEffects_Fireball; myClone.IncreasedHeatEffects_CinnamonRoll = IncreasedHeatEffects_CinnamonRoll; + myClone.IncreasedHeatEffects_FlameWakerBoots = IncreasedHeatEffects_FlameWakerBoots; myClone.IncreasedHeatEffects_HellfireTreads = IncreasedHeatEffects_HellfireTreads; myClone.IncreasedSicknessEffects_ToxicHeart = IncreasedSicknessEffects_ToxicHeart; myClone.IncreasedSicknessAndWaterEffects_EvergreenGin = IncreasedSicknessAndWaterEffects_EvergreenGin; @@ -851,6 +853,8 @@ namespace CalamityMod.NPCs if (IncreasedHeatEffects_Fireball) heatDamageMult += 0.25; + if (IncreasedHeatEffects_FlameWakerBoots) + heatDamageMult += 0.25; if (IncreasedHeatEffects_CinnamonRoll) heatDamageMult += 0.5; if (IncreasedHeatEffects_HellfireTreads) diff --git a/Projectiles/Magic/OmicronWingman.cs b/Projectiles/Magic/OmicronWingman.cs index 350e8007ce..1e4dd25840 100644 --- a/Projectiles/Magic/OmicronWingman.cs +++ b/Projectiles/Magic/OmicronWingman.cs @@ -188,9 +188,9 @@ namespace CalamityMod.Projectiles.Magic { SoundStyle fire = new("CalamityMod/Sounds/Item/DeadSunExplosion"); SoundEngine.PlaySound(fire with { Volume = 0.2f, Pitch = -0.4f, PitchVariance = 0.2f }, Projectile.Center); - Projectile bomb = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage * 20, Projectile.knockBack * 5, Projectile.owner, 0, 2); + Projectile bomb = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage * 14, Projectile.knockBack * 5, Projectile.owner, 0, 2); bomb.timeLeft = 530; - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity * 1.2f, ModContent.ProjectileType(), Projectile.damage * 20, Projectile.knockBack * 5, Projectile.owner, 0, 2); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity * 1.2f, ModContent.ProjectileType(), Projectile.damage * 14, Projectile.knockBack * 5, Projectile.owner, 0, 2); } else { diff --git a/Projectiles/Magic/PlasmaShot.cs b/Projectiles/Magic/PlasmaShot.cs index d59a3bdedc..6107767870 100644 --- a/Projectiles/Magic/PlasmaShot.cs +++ b/Projectiles/Magic/PlasmaShot.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < cloudAmt; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); - Projectile cloud = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ProjectileID.ToxicCloud + Main.rand.Next(3), Projectile.damage, 1f, Projectile.owner, 0f, Main.rand.Next(-45, 1)); + Projectile cloud = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ProjectileID.ToxicCloud + Main.rand.Next(3), (int)(Projectile.damage * 0.3f), 1f, Projectile.owner, 0f, Main.rand.Next(-45, 1)); cloud.usesIDStaticNPCImmunity = true; cloud.idStaticNPCHitCooldown = 10; } diff --git a/Projectiles/Magic/WingmanGrenade.cs b/Projectiles/Magic/WingmanGrenade.cs index c3c40281ad..fe6b7fb52a 100644 --- a/Projectiles/Magic/WingmanGrenade.cs +++ b/Projectiles/Magic/WingmanGrenade.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.timeLeft = 480; Projectile.DamageType = DamageClass.Magic; - Projectile.extraUpdates = 4; + Projectile.extraUpdates = 6; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Magic exploding = true; } if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.95f); + Projectile.damage = (int)(Projectile.damage * 0.80f); if (Projectile.damage < 1) Projectile.damage = 1; } diff --git a/Projectiles/Magic/WingmanHoldout.cs b/Projectiles/Magic/WingmanHoldout.cs index 82cbf1761d..32fa2ba935 100644 --- a/Projectiles/Magic/WingmanHoldout.cs +++ b/Projectiles/Magic/WingmanHoldout.cs @@ -212,7 +212,7 @@ namespace CalamityMod.Projectiles.Magic { SoundStyle fire = new("CalamityMod/Sounds/Item/DeadSunExplosion"); SoundEngine.PlaySound(fire with { Volume = 0.35f, Pitch = -0.4f, PitchVariance = 0.2f }, Projectile.Center); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity * Utils.GetLerpValue(60, 10, FiringTime, true), ModContent.ProjectileType(), (int)(Projectile.damage * 4.5), Projectile.knockBack * 5, Projectile.owner, 0); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, (firingVelocity * 2) * Utils.GetLerpValue(60, 10, FiringTime, true), ModContent.ProjectileType(), (int)(Projectile.damage * 6), Projectile.knockBack * 5, Projectile.owner, 0); } else { diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 0820c45e3b..81a27225f2 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -839,6 +839,7 @@ namespace CalamityMod { r => r.HasResult(ItemID.HorseshoeBundle) && !r.HasIngredient(ItemID.BundleofBalloons), AddIngredient(ModContent.ItemType(), 3) }, { Vanilla(ItemID.NightsEdge), AddIngredient(ModContent.ItemType(), 5) }, { Vanilla(ItemID.FairyBoots), AddIngredient(ItemID.SoulofLight, 5) }, + { Vanilla(ItemID.HellfireTreads), AddIngredient(ModContent.ItemType(), 4) }, { Vanilla(ItemID.SpiritFlame), AddGroup(AnyAdamantiteBar, 2) }, { Vanilla(ItemID.TerraBlade), AddIngredient(ModContent.ItemType(), 12) }, { Vanilla(ItemID.FireGauntlet), AddIngredient(ModContent.ItemType(), 5) }, @@ -1593,8 +1594,9 @@ namespace CalamityMod // Flame Waker Boots r = Recipe.Create(ItemID.FlameWakerBoots); r.AddIngredient(ItemID.Silk, 8); - r.AddIngredient(ItemID.Obsidian, 2); - r.AddTile(TileID.Loom); + r.AddIngredient(ItemID.HellstoneBar, 5); + r.AddIngredient(ItemID.Obsidian, 4); + r.AddTile(TileID.Anvils); r.Register(); r.DisableDecraft(); From 9eb8ed56d2ca124d287444940b048d158786d48f Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Mon, 13 May 2024 00:56:13 -0700 Subject: [PATCH 134/197] Forgot Genesis --- Items/Weapons/Magic/Genesis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/Genesis.cs b/Items/Weapons/Magic/Genesis.cs index 4191f822ec..91f7919ac2 100644 --- a/Items/Weapons/Magic/Genesis.cs +++ b/Items/Weapons/Magic/Genesis.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetDefaults() { - Item.width = 108; + Item.width = 116; Item.height = 46; Item.damage = 60; Item.DamageType = DamageClass.Magic; From 21fc2bb266e1f7d849d5c9d081dcc830292b7462 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Mon, 13 May 2024 08:57:45 -0400 Subject: [PATCH 135/197] Fixed Hide of Astrum Deus tooltip --- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index bab227b6d6..5726d7ac9a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -923,8 +923,8 @@ HideofAstrumDeus: { Tooltip: ''' Taking damage, or inflicting a true melee strike, drops an immense amount of astral stars from the sky - Taking damage boosts true melee damage by 50% - Boost duration is based on the amount of damage you took, the higher the damage the longer the boost + Taking damage boosts true melee damage by 30% + Boost duration scales with the amount of damage you took, up to 10 seconds Provides immunity to the astral infection, cursed inferno, on fire, and frostburn debuffs Enemies take damage when they hit you and are inflicted with the astral infection debuff ''' From 093d5c8c395cad30eaa0f1a5fbcf8129a0ee3cea Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Mon, 13 May 2024 09:57:57 -0700 Subject: [PATCH 136/197] Genesis Fix, Hellfire Treads no longer stacks --- CalPlayer/CalamityPlayer.cs | 1 + Items/CalamityGlobalItem.cs | 4 ++++ Items/CalamityGlobalItemTooltip.cs | 2 +- Items/Weapons/Magic/Genesis.cs | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 065bb235e5..6bc8f2c496 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -595,6 +595,7 @@ namespace CalamityMod.CalPlayer public bool jellyfishNecklace = false; public bool fairyBoots = false; public bool flameWakerBoots = false; + public int bootLevel = 0; //Used to prevent Flame Waker and Hellfire Treads stacking public bool hellfireTreads = false; public bool abyssalAmulet = false; public bool lumenousAmulet = false; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index ddcd99cad6..3aa3cafddf 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1186,11 +1186,15 @@ namespace CalamityMod.Items if (item.type == ItemID.FlameWakerBoots) { modPlayer.flameWakerBoots = true; + if (modPlayer.bootLevel < 1) + modPlayer.bootLevel = 1; } if (item.type == ItemID.HellfireTreads) { modPlayer.hellfireTreads = true; + if (modPlayer.bootLevel < 2) + modPlayer.bootLevel = 2; player.buffImmune[BuffID.OnFire] = true; } diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 6bf44df70b..cd54a2ced8 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -595,7 +595,7 @@ namespace CalamityMod.Items if (item.type == ItemID.HellfireTreads) { EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("fire blocks", "the Burning and On Fire! debuffs")); - EditTooltipByNum(2, (line) => line.Text += "\nMultiplies all fire-based debuff damage by 1.5\n" + + EditTooltipByNum(2, (line) => line.Text += "\nMultiplies all fire-based debuff damage by 1.5, does not stack with downgrades\n" + "All attacks inflict Hellfire"); } diff --git a/Items/Weapons/Magic/Genesis.cs b/Items/Weapons/Magic/Genesis.cs index 91f7919ac2..26a83161e8 100644 --- a/Items/Weapons/Magic/Genesis.cs +++ b/Items/Weapons/Magic/Genesis.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetDefaults() { - Item.width = 116; + Item.width = 108; Item.height = 46; - Item.damage = 60; + Item.damage = 65; Item.DamageType = DamageClass.Magic; Item.mana = 20; Item.useTime = 4; From abd4ad160201fdb15fe0fec9a1db5092854b5bd5 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 12:42:31 -0500 Subject: [PATCH 137/197] ty CIT for finding this issue, I'm not trying to be rude, I just think this is the better solution --- NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs index d162aec9a0..8ea83cb22e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs @@ -145,7 +145,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 npcCenterAccountingForHooks = new Vector2(hookPositionX, hookPositionY); float maxVelocityX = Main.player[npc.target].Center.X - npcCenterAccountingForHooks.X; float maxVelocityY = Main.player[npc.target].Center.Y - npcCenterAccountingForHooks.Y; - bool phase1MoveAway = !phase2 && Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 240f; + bool phase1MoveAway = !phase2 && Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 480f && Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); + bool adjustProjectileShootLocation = Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 80f; if (despawn) { maxVelocityY *= -1f; @@ -238,7 +239,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); + int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? npc.Center : spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); if (projectileType == ProjectileID.ThornBall && (Main.rand.NextBool() || !Main.zenithWorld)) Main.projectile[proj].tileCollide = false; } @@ -296,7 +297,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float ai0 = Main.rand.Next(3); if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, projectileVelocity * randomSpeed, type, damage, 0f, Main.myPlayer, ai0); + Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? npc.Center : spawnOffset, projectileVelocity * randomSpeed, type, damage, 0f, Main.myPlayer, ai0); } } @@ -355,7 +356,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? npc.Center : spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); } } @@ -639,7 +640,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? npc.Center : spawnOffset, projectileVelocity * projectileSpeed, projectileType, damage, 0f, Main.myPlayer); } } } @@ -1286,6 +1287,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float num781 = Main.player[npc.target].Center.X - vector97.X; float num782 = Main.player[npc.target].Center.Y - vector97.Y; bool phase1MoveAway = npc.life > npc.lifeMax / 2 && Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 480f && Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); + bool adjustProjectileShootLocation = Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 80f; if (flag40) { num782 *= -1f; @@ -1467,7 +1469,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses damage *= 2; Vector2 projectileVelocity = new Vector2(num789, num790); - int num794 = Projectile.NewProjectile(npc.GetSource_FromAI(), vector99 + projectileVelocity.SafeNormalize(Vector2.UnitY) * 70f, projectileVelocity, type, damage, 0f, Main.myPlayer); + int num794 = Projectile.NewProjectile(npc.GetSource_FromAI(), adjustProjectileShootLocation ? vector99 : vector99 + projectileVelocity.SafeNormalize(Vector2.UnitY) * 70f, projectileVelocity, type, damage, 0f, Main.myPlayer); if (type != ProjectileID.ThornBall) Main.projectile[num794].timeLeft = 300; } From 21ed1a50904a19f78b64360312786c504d295010 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 13:30:43 -0500 Subject: [PATCH 138/197] Non-Rev EoW taking 1 damage fix. --- NPCs/CalamityGlobalNPC.cs | 4 ++-- NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs | 12 ++++++------ NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs | 4 ++++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a28eb5c3c7..7a85115865 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3199,7 +3199,7 @@ namespace CalamityMod.NPCs if (CalamityLists.EaterofWorldsIDs.Contains(npc.type)) modifiers.FinalDamage *= 1f - MathHelper.Lerp(BossRushEvent.BossRushActive ? 0.8f : 0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / EaterOfWorldsAI.DRIncreaseTime, 0f, 1f)); if (CalamityLists.DestroyerIDs.Contains(npc.type)) - modifiers.FinalDamage *= 1f - MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / DestroyerAI.DRIncraeseTime, 0f, 1f)); + modifiers.FinalDamage *= 1f - MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / DestroyerAI.DRIncreaseTime, 0f, 1f)); if (CalamityLists.AstrumDeusIDs.Contains(npc.type)) modifiers.FinalDamage *= 1f - MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / (newAI[0] != 0f ? 300f : 600f), 0f, 1f)); } @@ -6972,7 +6972,7 @@ namespace CalamityMod.NPCs bool phase5 = destroyerLifeRatio < (death ? 0.2f : 0.1f); // Spawn DR check - bool hasSpawnDR = newAI[1] < DestroyerAI.DRIncraeseTime && newAI[1] > 60f; + bool hasSpawnDR = newAI[1] < DestroyerAI.DRIncreaseTime && newAI[1] > 60f; // Gradual color transition from ground to flight and vice versa // 0f = Red, 1f = Purple diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 476adb1eda..8b20d8af39 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { public static class DestroyerAI { - public const float DRIncraeseTime = 600f; + public const float DRIncreaseTime = 600f; public const float DeathModeLaserBreathGateValue = 600f; public const float LaserTelegraphTime = 120f; public const float SparkTelegraphTime = 30f; @@ -66,10 +66,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool death = CalamityWorld.death || bossRush; // 10 seconds of resistance to prevent spawn killing - if (calamityGlobalNPC.newAI[1] < DRIncraeseTime) + if (calamityGlobalNPC.newAI[1] < DRIncreaseTime) calamityGlobalNPC.newAI[1] += 1f; - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < DRIncraeseTime; + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < DRIncreaseTime; // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Spawn DR check - bool hasSpawnDR = calamityGlobalNPC.newAI[1] < DRIncraeseTime && calamityGlobalNPC.newAI[1] > 60f; + bool hasSpawnDR = calamityGlobalNPC.newAI[1] < DRIncreaseTime && calamityGlobalNPC.newAI[1] > 60f; // Gradual color transition from ground to flight and vice versa // 0f = Red, 1f = Purple @@ -1148,10 +1148,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // 10 seconds of resistance to prevent spawn killing - if (npc.Calamity().newAI[1] < DRIncraeseTime) + if (npc.Calamity().newAI[1] < DRIncreaseTime) npc.Calamity().newAI[1] += 1f; - npc.Calamity().CurrentlyIncreasingDefenseOrDR = npc.Calamity().newAI[1] < DRIncraeseTime; + npc.Calamity().CurrentlyIncreasingDefenseOrDR = npc.Calamity().newAI[1] < DRIncreaseTime; if (npc.ai[3] > 0f) npc.realLife = (int)npc.ai[3]; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs index e5cef221aa..22922a5ce6 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs @@ -779,6 +779,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } + // 10 seconds of resistance to prevent spawn killing + if (npc.Calamity().newAI[1] < DRIncreaseTime) + npc.Calamity().newAI[1] += 1f; + npc.realLife = -1; if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead) From 7e36160fb47eb8e3549fdab6e9a1cbc7ce462fb4 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 14:04:51 -0500 Subject: [PATCH 139/197] Fixed some potential unfair boss contact damage scenarios with duke-like AIs. --- NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs | 9 ------ .../Bosses/DukeFishronAI.cs | 21 ------------- NPCs/Yharon/Yharon.cs | 30 ------------------- 3 files changed, 60 deletions(-) diff --git a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs index 08ee0cf57f..7383afb7d4 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs @@ -528,9 +528,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Set velocity for charge if (oldDukeAttackPicker == 1) { - // Set damage - npc.damage = setDamage; - npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -893,9 +890,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Set velocity for charge if (phase2AttackPicker == 1) { - // Set damage - npc.damage = setDamage; - npc.ai[0] = 6f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -1299,9 +1293,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Set velocity for charge if (phase3AttackPicker == 1) { - // Set damage - npc.damage = setDamage; - npc.ai[0] = 11f; npc.ai[1] = 0f; npc.ai[2] = 0f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs index 043c31d6d7..b351e11655 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs @@ -396,9 +396,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Set velocity for charge if (attackPicker == 1) { - // Set damage - npc.damage = setDamage; - npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -662,9 +659,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Set velocity for charge if (phase2AttackPicker == 1) { - // Set damage - npc.damage = setDamage; - npc.ai[0] = 6f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -976,9 +970,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Set velocity for charge if (phase3AttackPicker == 1) { - // Set damage - npc.damage = setDamage; - npc.ai[0] = 11f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -1600,10 +1591,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses switch (num27) { case 1: - - // Set damage - npc.damage = setDamage; - npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -1873,10 +1860,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses switch (num32) { case 1: - - // Set damage - npc.damage = setDamage; - npc.ai[0] = 6f; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -2104,10 +2087,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses switch (num37) { case 1: - - // Set damage - npc.damage = setDamage; - npc.ai[0] = 11f; npc.ai[1] = 0f; npc.ai[2] = 0f; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 979ac62f3b..400fdceecb 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -596,9 +596,6 @@ namespace CalamityMod.NPCs.Yharon if (aiState == 1) { - // Set damage - NPC.damage = setDamage; - NPC.ai[0] = 1f; NPC.ai[1] = 0f; NPC.ai[2] = 0f; @@ -640,9 +637,6 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - // Set damage - NPC.damage = setDamage; - if (playFastChargeRoarSound) RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); @@ -886,9 +880,6 @@ namespace CalamityMod.NPCs.Yharon if (aiState == 1) { - // Set damage - NPC.damage = setDamage; - NPC.ai[0] = 7f; NPC.ai[1] = 0f; NPC.ai[2] = 0f; @@ -977,9 +968,6 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - // Set damage - NPC.damage = setDamage; - if (playFastChargeRoarSound) RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); @@ -1263,9 +1251,6 @@ namespace CalamityMod.NPCs.Yharon if (aiState == 1) { - // Set damage - NPC.damage = setDamage; - NPC.ai[0] = 14f; NPC.ai[1] = 0f; NPC.ai[2] = 0f; @@ -1354,9 +1339,6 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - // Set damage - NPC.damage = setDamage; - if (playFastChargeRoarSound) RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); @@ -2015,9 +1997,6 @@ namespace CalamityMod.NPCs.Yharon if (phase2AttackType == 5 && NPC.ai[1] < phaseSwitchTimer + teleportPhaseTimer) { - // Avoid cheap bullshit - NPC.damage = 0; - float newRotation = NPC.AngleTo(targetData.Center); float amount = 0.04f; @@ -2082,9 +2061,6 @@ namespace CalamityMod.NPCs.Yharon if (phase2AttackType == 7 && doFastChargeTelegraph) { - // Avoid cheap bullshit - NPC.damage = 0; - float newRotation = NPC.AngleTo(targetData.Center); float amount = 0.04f; @@ -2161,9 +2137,6 @@ namespace CalamityMod.NPCs.Yharon { case 2: // Charge { - // Set damage - NPC.damage = setDamage; - Vector2 vector = NPC.SafeDirectionTo(targetData.Center, Vector2.UnitX * NPC.spriteDirection); NPC.spriteDirection = (vector.X > 0f) ? 1 : -1; NPC.rotation = vector.ToRotation(); @@ -2196,9 +2169,6 @@ namespace CalamityMod.NPCs.Yharon case 7: // Fast charge { - // Set damage - NPC.damage = setDamage; - Vector2 vector = NPC.SafeDirectionTo(targetData.Center, Vector2.UnitX * NPC.spriteDirection); NPC.spriteDirection = (vector.X > 0f) ? 1 : -1; NPC.rotation = vector.ToRotation(); From cfbd1012d98d6b03c18c6ee8ab93c2b6edea4ec1 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 14:32:25 -0500 Subject: [PATCH 140/197] A few more contact damage fixes. --- NPCs/Cryogen/CryogenShield.cs | 5 +++-- NPCs/Leviathan/AnahitasIceShield.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index 51ceed2e32..d16c2fbb85 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.DeathSound = Main.zenithWorld ? SoundID.NPCDeath14 : BreakSound; NPC.Opacity += 0.01f; - if (NPC.Opacity > 1f) + if (NPC.Opacity >= 1f) { NPC.damage = NPC.defDamage; NPC.Opacity = 1f; @@ -86,6 +86,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.position.Y = NPC.position.Y - (NPC.height / 2); return; } + NPC.life = 0; NPC.HitEffect(); NPC.active = false; @@ -111,7 +112,7 @@ namespace CalamityMod.NPCs.Cryogen if (hitboxBotRight < minDist) minDist = hitboxBotRight; - return minDist <= (100f * NPC.scale) && NPC.Opacity == 1f; + return minDist <= (100f * NPC.scale) && NPC.Opacity >= 1f; } public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) diff --git a/NPCs/Leviathan/AnahitasIceShield.cs b/NPCs/Leviathan/AnahitasIceShield.cs index 9baba8e7fa..a32c37cb9b 100644 --- a/NPCs/Leviathan/AnahitasIceShield.cs +++ b/NPCs/Leviathan/AnahitasIceShield.cs @@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.netUpdate = true; } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) => NPC.ai[1] == 0f; + public override bool CanHitPlayer(Player target, ref int cooldownSlot) => NPC.ai[1] == 0f && NPC.alpha <= 100; public override Color? GetAlpha(Color drawColor) => NPC.ai[1] == 1f ? Color.Transparent : new Color(200, 200, 200, drawColor.A) * NPC.Opacity; From d778d4f878680e7f82a1eae3a94a4ef3b794a63b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 15:46:14 -0400 Subject: [PATCH 141/197] Fixed Holy Fire Bullet explosion not hitting the same enemy --- Projectiles/Ranged/HolyFireBulletProj.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Projectiles/Ranged/HolyFireBulletProj.cs b/Projectiles/Ranged/HolyFireBulletProj.cs index 5b7bd37e5c..97da541fc2 100644 --- a/Projectiles/Ranged/HolyFireBulletProj.cs +++ b/Projectiles/Ranged/HolyFireBulletProj.cs @@ -32,8 +32,6 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.MaxUpdates = 5; - Projectile.localNPCHitCooldown = 10; - Projectile.usesLocalNPCImmunity = true; Projectile.timeLeft = Lifetime; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; } From 88fa935354f4dd57526a6fb3c8524cd892f9251a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 15:51:29 -0400 Subject: [PATCH 142/197] Fixed Squire armor still mentioning negating the summon damage penalty --- Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson | 1 - 1 file changed, 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index c5259da203..f1625a0e8f 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -131,7 +131,6 @@ SetBonus: { ''' Increases your life regeneration 15% increased minion damage and 10% increased melee critical strike chance - Negates the summon damage penalty while wielding non-summon weapons ''' HuntressTier2: 10% increased minion and ranged damage ApprenticeTier2: 5% increased minion damage and 15% increased magic critical strike chance From a8475cca9f1fb3677c54293a8a3dc2f239ca7770 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 14:55:30 -0500 Subject: [PATCH 143/197] Hive Mind contact damage adjustments. --- NPCs/HiveMind/HiveMind.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 2e57cf624f..d4585da10d 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -926,6 +926,9 @@ namespace CalamityMod.NPCs.HiveMind { if (!dashStarted) { + // Set damage + NPC.damage = NPC.defDamage; + dashStarted = true; SoundEngine.PlaySound(RoarSound, NPC.Center); NPC.velocity.X = MathHelper.Pi * teleportRadius / arcTime; @@ -935,6 +938,9 @@ namespace CalamityMod.NPCs.HiveMind } else { + // Set damage + NPC.damage = NPC.defDamage; + NPC.velocity = NPC.velocity.RotatedBy(MathHelper.Pi / arcTime * -rotationDirection); phase2timer++; @@ -988,6 +994,9 @@ namespace CalamityMod.NPCs.HiveMind { if (!dashStarted) { + // Set damage + NPC.damage = NPC.defDamage; + dashStarted = true; SoundEngine.PlaySound(RoarSound, NPC.Center); NPC.velocity.X = teleportRadius / arcTime * 3; @@ -997,6 +1006,9 @@ namespace CalamityMod.NPCs.HiveMind } else { + // Set damage + NPC.damage = NPC.defDamage; + phase2timer++; if (phase2timer == (int)arcTime / 20) { From 94ff1ee0d24ca07fea31cdef6cf6c81acb2c358e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 16:47:13 -0400 Subject: [PATCH 144/197] Umcumbering Stone also has no sell value --- Items/CalamityGlobalItemTweaks.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 877fc5ffeb..4b73cceaba 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -601,6 +601,7 @@ namespace CalamityMod.Items { ItemID.SpicyPepper, Do(Value(Item.sellPrice(copper: 40))) }, { ItemID.Starfruit, Do(Value(Item.sellPrice(copper: 40))) }, { ItemID.PortableStool, Do(Value(Item.sellPrice(copper: 20))) }, // Step Stool + { ItemID.UncumberingStone, Do(Worthless) }, { ItemID.ViciousMushroom, Do(Worthless) }, { ItemID.VileMushroom, Do(Worthless) }, #endregion From adf6c847b0ddfb0b5237ba2bd119f42776228e57 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 13 May 2024 14:35:28 -0700 Subject: [PATCH 145/197] Moved Depth Crusher from Morays to Viperfish Mostly so you can't get it by just going to the ocean --- NPCs/Abyss/MorayEel.cs | 1 - NPCs/Abyss/Viperfish.cs | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index 35c2d095df..7da581930d 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -118,7 +118,6 @@ namespace CalamityMod.NPCs.Abyss public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ItemID.Flipper, 20); - npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 15, 10)); } public override void HitEffect(NPC.HitInfo hit) diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index f774286a91..c81ad502c2 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -3,6 +3,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -10,6 +11,7 @@ using ReLogic.Content; using Terraria; using Terraria.GameContent; using Terraria.GameContent.Bestiary; +using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Utilities; @@ -158,6 +160,7 @@ namespace CalamityMod.NPCs.Abyss var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi()); postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 1, 2, 2, 3)); postLevi.Add(ModContent.ItemType(), 4); + npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 10, 6)); } public override void HitEffect(NPC.HitInfo hit) From de2bb4a48326b48e5e40d239f10a34c1d813450b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 18:00:42 -0400 Subject: [PATCH 146/197] Cluster Rocket fragments grant ID-static iframes --- Projectiles/CalamityGlobalProjectileTweaks.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 658c5faae7..916a1412a8 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -133,9 +133,9 @@ namespace CalamityMod.Projectiles { ProjectileID.CrystalVileShardShaft, Do(LocalIFrames(23)) }, { ProjectileID.CursedBullet, standardBulletTweaks }, { ProjectileID.ClusterRocketI, Do(LocalIFrames(15)) }, - { ProjectileID.ClusterFragmentsI, Do(LocalIFrames(15)) }, + { ProjectileID.ClusterFragmentsI, Do(IDStaticIFrames(15)) }, { ProjectileID.ClusterRocketII, Do(LocalIFrames(15)) }, - { ProjectileID.ClusterFragmentsII, Do(LocalIFrames(15)) }, + { ProjectileID.ClusterFragmentsII, Do(IDStaticIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketI, Do(LocalIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketII, Do(LocalIFrames(15)) }, { ProjectileID.DD2SquireSonicBoom, Do(PiercingExact(3)) }, // Flying Dragon From 1bb44ca194ebb2b1cf00fb22db588fc7ccf12d0f Mon Sep 17 00:00:00 2001 From: Lion8cake <69915693+Lion8cake@users.noreply.github.com> Date: Tue, 14 May 2024 08:01:59 +1000 Subject: [PATCH 147/197] Astral infection biome code overhaul (#28) Omitting gigantic messy co-authoring list due to the 1.4.4 force push. --- Backgrounds/AstralDesertSurfaceBGStyle.cs | 108 +++++++++-- Backgrounds/AstralDesertSurfaceFar.png | Bin 18650 -> 23663 bytes Backgrounds/AstralSnowSurfaceBGStyle.cs | 129 ++++++++++++- Backgrounds/AstralSnowSurfaceFar.png | Bin 18650 -> 0 bytes Backgrounds/AstralSnowSurfaceMiddle.png | Bin 13227 -> 8694 bytes Backgrounds/AstralSurfaceBGStyle.cs | 139 ++++++++++++-- Backgrounds/AstralSurfaceClose.png | Bin 64249 -> 27708 bytes .../AstralSurfaceCloseGlow.png | Bin Backgrounds/AstralSurfaceFar.png | Bin 18650 -> 23728 bytes Backgrounds/AstralSurfaceFogBGStyle.cs | 37 ---- Backgrounds/AstralSurfaceFront.png | Bin 0 -> 57227 bytes .../AstralSurfaceFrontGlow.png | Bin Backgrounds/AstralSurfaceHorizon.png | Bin 0 -> 3527 bytes Backgrounds/AstralSurfaceMiddle.png | Bin 22833 -> 20405 bytes .../AstralSurfaceMiddleGlow.png | Bin Backgrounds/AstralUG4_0.png | Bin 0 -> 1922 bytes Backgrounds/AstralUG4_1.png | Bin 0 -> 1751 bytes Backgrounds/AstralUG4_2.png | Bin 0 -> 1652 bytes Backgrounds/AstralUndergroundBGStyle.cs | 7 +- BiomeManagers/AbovegroundAstralBiome.cs | 34 ---- .../AbovegroundAstralBiomeSurface.cs | 41 ---- BiomeManagers/AbovegroundAstralDesertBiome.cs | 43 ----- BiomeManagers/AbovegroundAstralSnowBiome.cs | 41 ---- BiomeManagers/AstralInfectionBiome.cs | 94 +++++++++ .../{ => BestiaryCategories}/AcidRainBiome.cs | 0 .../BestiaryCategories/AstralCaveDesert.cs | 11 ++ .../BestiaryCategories/AstralDesert.cs | 11 ++ BiomeManagers/BestiaryCategories/AstralIce.cs | 11 ++ .../BestiaryCategories/AstralUnderground.cs | 11 ++ BiomeManagers/UndergroundAstralBiome.cs | 33 ---- CalPlayer/CalamityPlayer.cs | 5 +- CalamityMod.cs | 32 ++-- ILEditing/ILHelperMethods.cs | 2 +- Items/Weapons/Melee/CosmicShiv.cs | 2 +- .../en-US/Mods.CalamityMod.Biomes.hjson | 34 ++-- ModSupport/WeakReferenceSupport.cs | 1 + NPCs/Astral/Aries.cs | 2 +- NPCs/Astral/AstralProbe.cs | 2 +- NPCs/Astral/AstralSlime.cs | 2 +- NPCs/Astral/AstralachneaWall.cs | 3 +- NPCs/Astral/Atlas.cs | 2 +- NPCs/Astral/FusionFeeder.cs | 3 +- NPCs/Astral/Hadarian.cs | 3 +- NPCs/Astral/HiveEnemy.cs | 3 +- NPCs/Astral/Hiveling.cs | 3 +- NPCs/Astral/Mantis.cs | 2 +- NPCs/Astral/Nova.cs | 2 +- NPCs/Astral/SightseerCollider.cs | 2 +- NPCs/Astral/SightseerSpitter.cs | 2 +- NPCs/Astral/StellarCulex.cs | 3 +- NPCs/Astral/Twinkler.cs | 2 +- NPCs/AstrumAureus/AstrumAureus.cs | 4 +- NPCs/AstrumDeus/AstrumDeusHead.cs | 2 +- NPCs/TownNPCs/AndroombaFriendly.cs | 4 +- Projectiles/Magic/ExoVortex.cs | 1 + Projectiles/Magic/ExoVortex2.cs | 1 + Projectiles/Melee/CosmicShivAura.cs | 19 +- Projectiles/Melee/CosmicShivBlade.cs | 17 +- Projectiles/Melee/CosmicShivTrail.cs | 44 +++++ Projectiles/Melee/EonBolt.cs | 1 + .../Melee/Shortswords/CosmicShivProj.cs | 10 +- Skies/AstralDesertSurfaceClose.png | Bin 5031 -> 0 bytes Skies/AstralDesertSurfaceFar.png | Bin 18650 -> 0 bytes Skies/AstralDesertSurfaceMiddle.png | Bin 5402 -> 0 bytes Skies/AstralSky.cs | 1 + Skies/AstralSkyDesert.cs | 137 -------------- Skies/AstralSkySnow.cs | 171 ----------------- Skies/AstralSkySurface.cs | 179 ------------------ Skies/AstralSnowSurfaceMiddle.png | Bin 8694 -> 0 bytes Skies/AstralSurfaceClose.png | Bin 27708 -> 0 bytes Skies/AstralSurfaceFar.png | Bin 13320 -> 0 bytes Skies/AstralSurfaceFront.png | Bin 40727 -> 0 bytes Skies/AstralSurfaceHorizon.png | Bin 3772 -> 0 bytes Skies/AstralSurfaceMiddle.png | Bin 20405 -> 0 bytes .../CodebreakerUI.Communication.cs | 1 + 75 files changed, 631 insertions(+), 823 deletions(-) delete mode 100644 Backgrounds/AstralSnowSurfaceFar.png rename {Skies => Backgrounds}/AstralSurfaceCloseGlow.png (100%) delete mode 100644 Backgrounds/AstralSurfaceFogBGStyle.cs create mode 100644 Backgrounds/AstralSurfaceFront.png rename {Skies => Backgrounds}/AstralSurfaceFrontGlow.png (100%) create mode 100644 Backgrounds/AstralSurfaceHorizon.png rename {Skies => Backgrounds}/AstralSurfaceMiddleGlow.png (100%) create mode 100644 Backgrounds/AstralUG4_0.png create mode 100644 Backgrounds/AstralUG4_1.png create mode 100644 Backgrounds/AstralUG4_2.png delete mode 100644 BiomeManagers/AbovegroundAstralBiome.cs delete mode 100644 BiomeManagers/AbovegroundAstralBiomeSurface.cs delete mode 100644 BiomeManagers/AbovegroundAstralDesertBiome.cs delete mode 100644 BiomeManagers/AbovegroundAstralSnowBiome.cs create mode 100644 BiomeManagers/AstralInfectionBiome.cs rename BiomeManagers/{ => BestiaryCategories}/AcidRainBiome.cs (100%) create mode 100644 BiomeManagers/BestiaryCategories/AstralCaveDesert.cs create mode 100644 BiomeManagers/BestiaryCategories/AstralDesert.cs create mode 100644 BiomeManagers/BestiaryCategories/AstralIce.cs create mode 100644 BiomeManagers/BestiaryCategories/AstralUnderground.cs delete mode 100644 BiomeManagers/UndergroundAstralBiome.cs delete mode 100644 Skies/AstralDesertSurfaceClose.png delete mode 100644 Skies/AstralDesertSurfaceFar.png delete mode 100644 Skies/AstralDesertSurfaceMiddle.png delete mode 100644 Skies/AstralSkyDesert.cs delete mode 100644 Skies/AstralSkySnow.cs delete mode 100644 Skies/AstralSkySurface.cs delete mode 100644 Skies/AstralSnowSurfaceMiddle.png delete mode 100644 Skies/AstralSurfaceClose.png delete mode 100644 Skies/AstralSurfaceFar.png delete mode 100644 Skies/AstralSurfaceFront.png delete mode 100644 Skies/AstralSurfaceHorizon.png delete mode 100644 Skies/AstralSurfaceMiddle.png diff --git a/Backgrounds/AstralDesertSurfaceBGStyle.cs b/Backgrounds/AstralDesertSurfaceBGStyle.cs index 51d1c01ef7..181f0d7222 100644 --- a/Backgrounds/AstralDesertSurfaceBGStyle.cs +++ b/Backgrounds/AstralDesertSurfaceBGStyle.cs @@ -1,22 +1,23 @@ -using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; +using System.Reflection; +using System; +using Terraria.Graphics.Effects; +using Terraria; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; namespace CalamityMod.Backgrounds { public class AstralDesertSurfaceBGStyle : ModSurfaceBackgroundStyle { - public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) - { - b -= 75f; - return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - } + internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic); + readonly int CloseBGYOffset = 475; + readonly int MiddleBGYOffset = 475; public override void ModifyFarFades(float[] fades, float transitionSpeed) { - // This just fades in the background and fades out other backgrounds. for (int i = 0; i < fades.Length; i++) { if (i == Slot) @@ -33,5 +34,90 @@ namespace CalamityMod.Backgrounds } } } + + public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon"); + + public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralDesertSurfaceFar"); + + public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralDesertSurfaceMiddle"); + + public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) + { + //Please see AstralSurfaceBGStyle for comments, code is pretty much identical here + float screenOff = (float)screenOffField.GetValue(Main.instance); + float scAdj = (float)scAdjField.GetValue(Main.instance); + Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null); + Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); + bool canBGDraw = false; + if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen)) + canBGDraw = true; + if (Main.mapFullscreen) + canBGDraw = false; + int offset = 30; + if (Main.gameMenu) + offset = 0; + if (WorldGen.drunkWorldGen) + offset = -180; + float surfacePosition = (float)Main.worldSurface; + if (surfacePosition == 0f) + surfacePosition = 1f; + float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f; + double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f); + float bgGlobalScaleMultiplier = 2f; + int pushBGTopHack; + int offset2 = -180; + int menuOffset = 0; + if (Main.gameMenu) + { + menuOffset -= offset2; + } + pushBGTopHack = menuOffset; + pushBGTopHack += offset; + pushBGTopHack += offset2; + if (canBGDraw) + { + var bgScale = 1.25f; + var bgParallax = 0.4; + var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + var bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceMiddle.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax); + var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + bgTopY = 320 + pushBGTopHack; + + var bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceMiddle.Width, CalamityMod.AstralDesertSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + + bgScale = 1.31f; + bgParallax = 0.43; + bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceClose.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax); + bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + { + bgTopY = 400 + pushBGTopHack; + bgStartX -= 80; + } + + bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceClose.Width, CalamityMod.AstralDesertSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + } + return false; + } } } diff --git a/Backgrounds/AstralDesertSurfaceFar.png b/Backgrounds/AstralDesertSurfaceFar.png index a2337a7d8fe1277ad1b4e44d3e8beb1282f81fbf..e8b7a01e29f2aeb0dfd2b9844e69460b67f7048d 100644 GIT binary patch literal 23663 zcmeFYcT`hb^gnn}pQtEUo`tTWq9P(fDAFuXP!Uj2dJ&?uNR0#`gkV9W3rKJJ01+u6 zLV(bMltfBEYJh|wEeIi@h7i&w?>l9!->g~l-~2aOE6Kh0oPDxCpS$fZ0N5ou6kFP}Tl96mU~=NWGpMD>O`xJzZb5Xi%j1UG4FEtVO7L9& z5}oh$zhegl0Lixh-eLs5uTKHMao62{ZajMF%$Vp)_@Za|d#a*Jtnfw)=oGBnz2A~u zVOKfZ<=*KDdk@*sey8PIG2-IP$H4`mB-xeAzB5*Qb)8EkNk+AW=h_Y9c8GrC|9|~| zz(7lspQ2E72VeI3h4Z;a;k?xp;WkPr7{>AFMpYI&0LRG40|20Zmi0?9Fba?q7Xu<3 zDnE%nm4^(sBy<6P9g(R}B0BbqZg@HChs%~YAQ=S!5rgOtqD~N&Ax}b546t1bMsnHt z-ZG%Q<#$d1fPZekI8ss654NVbEu2;p@MbI~vD^Qc-IPccY2(=8lh$Uoc3vd8^uVf5 zXV-O!!~b1Y;<0Qe|9l2Sg4W5Q)>aLo7S-fk!2Y}Z@v9Pg57OXUQY?kt{(FEYsg++= zvw>gNUjr@f7^IDzg1#-~70O;g@Rvxq?B1}Zq}Y|1Ss=p9UYK-M`1wtT{MP6BDHoAw zOO~ZssqQZSucq%$T>ze-smRh80u)_Mr03|2n)uzR$n5V_geVj{EEP6=g9`&vFPx zboe0s;&YV7S$;*7Sr{vNp#0M1=d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/AstralSnowSurfaceBGStyle.cs index 993decd710..239fc427b3 100644 --- a/Backgrounds/AstralSnowSurfaceBGStyle.cs +++ b/Backgrounds/AstralSnowSurfaceBGStyle.cs @@ -1,18 +1,25 @@ -using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; +using System.Reflection; +using System; +using Terraria.Graphics.Effects; +using Terraria; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Terraria.GameContent.UI.States; namespace CalamityMod.Backgrounds { public class AstralSnowSurfaceBGStyle : ModSurfaceBackgroundStyle { - public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); + internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic); + readonly int FrontBGYOffset = 275; + readonly int CloseBGYOffset = 175; + readonly int MiddleBGYOffset = 475; public override void ModifyFarFades(float[] fades, float transitionSpeed) { - // This just fades in the background and fades out other backgrounds. for (int i = 0; i < fades.Length; i++) { if (i == Slot) @@ -29,5 +36,113 @@ namespace CalamityMod.Backgrounds } } } + + public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon"); + + public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar"); + + public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSnowSurfaceMiddle"); + + public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) + { + //Please see AstralSurfaceBGStyle for comments, code is pretty much identical here + float screenOff = (float)screenOffField.GetValue(Main.instance); + float scAdj = (float)scAdjField.GetValue(Main.instance); + Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null); + Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); + bool canBGDraw = false; + if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen)) + canBGDraw = true; + if (Main.mapFullscreen) + canBGDraw = false; + int offset = 30; + if (Main.gameMenu) + offset = 0; + if (WorldGen.drunkWorldGen) + offset = -180; + float surfacePosition = (float)Main.worldSurface; + if (surfacePosition == 0f) + surfacePosition = 1f; + float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f; + double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f); + float bgGlobalScaleMultiplier = 2f; + int pushBGTopHack; + int offset2 = -180; + int menuOffset = 0; + if (Main.gameMenu) + { + menuOffset -= offset2; + } + pushBGTopHack = menuOffset; + pushBGTopHack += offset; + pushBGTopHack += offset2; + if (canBGDraw) + { + var bgScale = 1.25f; + var bgParallax = 0.4; + var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + var bgWidthScaled = (int)((float)CalamityMod.AstralSnowSurfaceMiddle.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax); + var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + bgTopY = 320 + pushBGTopHack; + + var bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralSnowSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSnowSurfaceMiddle.Width, CalamityMod.AstralSnowSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + + bgScale = 1.31f; + bgParallax = 0.43; + bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax); + bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + { + bgTopY = 400 + pushBGTopHack; + bgStartX -= 80; + } + + bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + bgScale = 1.34f; + bgParallax = 0.49; + bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax); + bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + { + bgTopY = 480 + pushBGTopHack; + bgStartX -= 120; + } + + bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + } + return false; + } } } diff --git a/Backgrounds/AstralSnowSurfaceFar.png b/Backgrounds/AstralSnowSurfaceFar.png deleted file mode 100644 index e1b3614aa86a9a103056872c4bb968565f3b87b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18650 zcmeFY19x3v)F6Cf-`KXT#__|Ad!NlHRb?3zL;^$r08r#)CDj1{8vF=R4-W;tg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$%BAPQ{7%o4g)O zK2@Mi$`b{lL=>@{dX1 zXwf^(@$G}a%lZ>m3~?RX*NX0)R`(`>yXueWYlaHJxUFGdqS!XH`o8#N4m2ckPcm@q zohL~e*skOU?)z7+*ne&MPrsZ>-kI{iBP3Kmo?U+ks4ijSllS#}8=o>?WBia>^RWEL z^z*=D5Y#``@?Y3ebIOWgU#os~&$Xw;Kxy8Zi^d)i`+$zAm%jhWrf3?-Sox#ndm5HJ z{S1`1{_$y^^V(EFpkwU!?Me^KjkEzWjUh}SAX6Q}7pKbvjTXDJ_=;}y2U}T*B zl=zw<0_==UH8+4KSUf#^jd6pHJTUxIe{L9_O4t1V`~E-k459mHlzun+fR3N>boFyt I=akR{03>p^mH+?% diff --git a/Backgrounds/AstralSnowSurfaceMiddle.png b/Backgrounds/AstralSnowSurfaceMiddle.png index fc7c6787566758b349cb34e2276f28a2c45b95fa..ff4e5fc23638fa5d22d98210ce60007c18f9f218 100644 GIT binary patch literal 8694 zcmeHMc{r5q{(r_;vX*2>q0}*oGKv(klu0^SN`(~DkX?yHm^1}#7*dbYET{T{2Vq;ygZbN%kY z8aT(9q)du3{^XVn0p+-uP``UIV>`IOV&+KdQzU}VWmA6G;`*h22Ps42oJKbZF=Jz6 zIT@~q1ft*NOw!n)biyYYjRt;dYiQwzoxG>>fMVOA*6h8gsH3e_jH=!FG*;MB0_1qo zSn1dDXMyfCrV={_zCX#2+l^;dmpSJFZzr9MKyvS`SRQ;)M{9~d*&7)fXZD8Y3U9gh zm=)HQ+6uBbE)E3=0B@Nw#mc0k!PB&Xt^>7CqQ+7gW6~hD=-q=LnO7h;zw54iQT5N* zt5%F&Jrdqh+sfu8qBAMeU|p&|n5En~6x{Z^~ND zr$C`1TZo}NN#a(dlq5l<=Ea}LWYE6I@4imNbAMCg`e`CPYw+ULSB;qr5k1Ad`TRwU z8$1?7fW2rb(3{SNh_RVD&vt+gFx6tq9lxZxttydXvyP&5X8Wsk%O9M z5WuiN^rOSEFSpjvrd5dMyk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%ZBu&(D@6#TP*k0 zd9outP3G2*|^r*ExB>s}*B|YO|+ZDHV8wPJXuQgYZ;6TReq| zTCA97+h4$K%M$g+t8FPvsB4C^BZA%4)+TY-JqytJ71MV{I@5{xcIG}+`6&MDyfet5 z8R2R$kdew8Jkr7!*|S3~@c22eYo5~wFtst%=Dv_Dt2Z7GaccFCf#2!&yf&+ebqKZJ zz+0JsxI$ZRMa&(Z)YQ+Ck=V=w&hjav*Kx}bZyUl@adzN1&zo2b0@!D_lW%JTbca8R z03V+B3`)%Ho!jsKXiEiiMDY4wnD1`76uW|YUG@>yio9DXX$#z}zesGq{6*K$9OUqR zN20V(MX-(IHJSS*V4&Br+HWCIv#$MZbz^1gG3xgQ0Jujn9Wi*=CwlH zXavy$MkAsT>rkfGWe86AgzP3+vbPeRY;$T#51T&x{0#rbxOiQ8wvWUJjFG!O{)6xm zymvt=egvG`gpZQkY|XbG8qI#GGXiG__ER6R&mus;YsI`rI@kCuLO5ce3#CvBg-FH} zCFsL0Vw-*vTQJxFoZU` diff --git a/Backgrounds/AstralSurfaceBGStyle.cs b/Backgrounds/AstralSurfaceBGStyle.cs index 8c8a7ee21c..c89092d701 100644 --- a/Backgrounds/AstralSurfaceBGStyle.cs +++ b/Backgrounds/AstralSurfaceBGStyle.cs @@ -1,22 +1,24 @@ -using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using System.Reflection; +using System; +using Terraria.Graphics.Effects; +using Terraria; +using Terraria.ModLoader; namespace CalamityMod.Backgrounds { public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle { - public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) - { - scale *= 0.75f; - return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - } + internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic); + readonly int FrontBGYOffset = 275; //Offsets for the height positioning. Make these 0 for backgrounds that want to be the same as treeline backgrounds (backgrounds that have the front 3 layers as trees) + readonly int CloseBGYOffset = 175; + readonly int MiddleBGYOffset = 475; public override void ModifyFarFades(float[] fades, float transitionSpeed) { - // This just fades in the background and fades out other backgrounds. for (int i = 0; i < fades.Length; i++) { if (i == Slot) @@ -33,5 +35,120 @@ namespace CalamityMod.Backgrounds } } } + + public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon"); //5th layer (Horizon) + + public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar"); //4th layer (Far) + + public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSurfaceMiddle"); //Fallback texture, not nessesarily needed since predraw returns false + + public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) //Taken from vanilla to draw the front 3 layers, edited to fit tmod and astral background needs + { + float screenOff = (float)screenOffField.GetValue(Main.instance); + float scAdj = (float)scAdjField.GetValue(Main.instance); + Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null); + Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); //Astral Biome Coloration with the alpha as the background fade + bool canBGDraw = false; + if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen)) + canBGDraw = true; + if (Main.mapFullscreen) + canBGDraw = false; + int offset = 30; + if (Main.gameMenu) + offset = 0; + if (WorldGen.drunkWorldGen) + offset = -180; + float surfacePosition = (float)Main.worldSurface; + if (surfacePosition == 0f) + surfacePosition = 1f; + float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f; + double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f); + float bgGlobalScaleMultiplier = 2f; + int pushBGTopHack; + int offset2 = -180; + int menuOffset = 0; + if (Main.gameMenu) + { + menuOffset -= offset2; + } + pushBGTopHack = menuOffset; + pushBGTopHack += offset; + pushBGTopHack += offset2; //Offsets to the background placement + if (canBGDraw) //If the background can draw (player is not in a remix world or is not in a map). This can probably be removed since backgrounds already go through these checks + { + //3rd layer (Middle) + var bgScale = 1.25f; //Scale of the furthest of the closest background layers (3rd layer) + var bgParallax = 0.4; //The parallax of the background layer + var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; //the Y position of the background + bgScale *= bgGlobalScaleMultiplier; //Scale of the background + var bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceMiddle.Width * bgScale); //The Width of the bg texture scaled to the correct size + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax); + var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); //The starting position of the background layer + if (Main.gameMenu) + bgTopY = 320 + pushBGTopHack; //increases the height in the main menu + + var bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + //Draw the texture and its glowmask to each loop of the texture + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddle.Width, CalamityMod.AstralSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddleGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddleGlow.Width, CalamityMod.AstralSurfaceMiddleGlow.Height), new Color(Color.White.R * 0.5f, Color.White.G * 0.5f, Color.White.B * 0.5f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + + //2nd layer (Close) + //Repeat of above with slight changes to variables + bgScale = 1.31f; + bgParallax = 0.43; + bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax); + bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + { + bgTopY = 400 + pushBGTopHack; + bgStartX -= 80; //the initial postion of where the background starts in the main menu is pushed back to not be directly ontop, mostly for tree bgs that use the same treeline texture but faded + } + + bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + + //1st layer (Front) + //Repeat of above with slight changes to variables + bgScale = 1.34f; + bgParallax = 0.49; + bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack; + bgScale *= bgGlobalScaleMultiplier; + bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax); + bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); + if (Main.gameMenu) + { + bgTopY = 480 + pushBGTopHack; + bgStartX -= 120; + } + + bgLoops = Main.screenWidth / bgWidthScaled + 2; + if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int i = 0; i < bgLoops; i++) + { + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f); + } + } + } + return false; //Stop the drawing of the base close background texture (note: does NOT stop the drawing of the Middle and Far textures because tmodloader is slight stupid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wDE|F5A0gGVLchVKV@spsKI5Pl%KS(SRib)0UjzK+VW`g3{=&X;n4hH;f z&yE2BJxmx}hl!stVTB^}=~uz5cQ#aBdn>^1GLr@#l?0u@bvQHr8XQ56G1ce{;uZ0tx;At?5m_tGl=>B3T+OO2IgSX*_hAFr13cy=q6myIJru){8s9^xhxCN?DC+dyC^>V35#C`|d&FY3PfTu_$<{COkY1xG{XZUUTdsnbl2WYMj z94v6Okd2(q6zg4MUjyq=_j9_VAK8^ogP^ue1BT_MUp}(JHyDG3Syv=>J5dUljp-aP z;sW5248m)px`LwnW=3T(CXd`HGvh*Sm#7>C$%p@dqA8_$rz zb<5#4H~NZmG76!Ct`+Xs(%!JH737?fYadR=!Nr*fUV>l+JinKTr3cN^e2-!loPZ|v z<0H6UnrP|}Jf#9#B@$cr9Uf~;s{gIZ^p_5I;CB1CozT^fy6gkt0&5Q%KGjRJJ3zE! z_iraqnST^D^G*}KOpJjgO1HtCK;}b!cQV-ZXx9u1gm<0=lVkvff`d#~DOlemGS1)X zdjYHYq~yMQ%^+Yi%VdB-IL1+S=B-aRQfwP>O9)tA+ZxmtPB@R8{;QDbjqg481?=yn zeFt#dVAGf=x?twl}JzU)8+3OzOG9^h+&W#Y4L0>wSQ;twPvn@3JKVC@E< z=^2?}KM}o%S?bwWh(m5AyOK_Dft3_+7{jfDDpx%bN517_3Sf{|dH4v1zj8bqki+_g zAM%d<{lpyEBW&vfupBX9t}=`+=t&F0sRAgF(=<-f3{=9Cq~zE=I}o@-BwfzrG+7mYn4_5mGJFMa=$P0=)vvGPaD_cSbd z`WYy1{o~U-=e4PVK*!kc+m#-e8)*Y%8bg>uK&Co`$putvR8xF@;k8XNz+kcdaQ19X zd8hfJ%bT`FVdQ I&MBb@05;9G#Q*>R diff --git a/Backgrounds/AstralSurfaceFogBGStyle.cs b/Backgrounds/AstralSurfaceFogBGStyle.cs deleted file mode 100644 index aab1ea3fba..0000000000 --- a/Backgrounds/AstralSurfaceFogBGStyle.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Terraria.ModLoader; - -namespace CalamityMod.Backgrounds -{ - public class AstralSurfaceFogBGStyle : ModSurfaceBackgroundStyle - { - public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - - public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) - { - scale *= 0.75f; - return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); - } - - public override void ModifyFarFades(float[] fades, float transitionSpeed) - { - // This just fades in the background and fades out other backgrounds. - for (int i = 0; i < fades.Length; i++) - { - if (i == Slot) - { - fades[i] += transitionSpeed; - if (fades[i] > 1f) - fades[i] = 1f; - } - else - { - fades[i] -= transitionSpeed; - if (fades[i] < 0f) - fades[i] = 0f; - } - } - } - } -} diff --git a/Backgrounds/AstralSurfaceFront.png b/Backgrounds/AstralSurfaceFront.png new file mode 100644 index 0000000000000000000000000000000000000000..5d603a737bcb52480d38f67e1c3fa78d98d2ce84 GIT binary patch literal 57227 zcmeEt`9IWO^#5y6))JyDQ6%f663H@DmZB1BY#~|3HW871CMml~S+j*KWf|*`Y*`{? zH-oWDjC~n1!x;0O>ivCuACK?%m+v3&na5)uuY1qEuY1mU-sPNo?|DVsyQ_DELx=+a zfFrkVY8wLp3nR&7#&($T*gqC8!FYhYjP08E{}rG4$buk|X;pu-36J;fQE2zGbZYj7LIk745i>mtC%GuhrY zfAnIj=?qQN&C;!6UP`YVD9}~99U>HRL+Ht2rn`n7LN8|T-*CSF`Sz)|x*ynPej!a_ z;~ad#kDG5{BrT2V>T{yH=4csZWXks|ztiljv8#T;nr7=?&u=$i-@ER&r@3nMGUWT8 z-~S-+KM4E}0{?@+{}%!uIt$VJR}jILjJ3UnOVfkO{pU6IA_`(*f*uNHP?KhutLgu> z<$cYrdoS=V+f?SjOa?_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vrDwW*ML_C+6X1TR^~KVcZrN9F!H@$$&<96U;mk33A899l@nqXc<3`wYY4>&b zQGaDtEN0kJ{0l7yKui1!D;xl&hyN-AqLz-v8#$kh<^#Y=tX&{@TVa$(un9!qf8rCr zblWP^as=${1ekRI2qh;#@2ds+JeOx??U|Zk)$_YWPd+o$W&sFV2b=)+L)7=$zH~+3 zycef)0N6N>@PH~I?eNI;zXDen`4_TfYl(lMK2d literal 0 HcmV?d00001 diff --git a/Skies/AstralSurfaceFrontGlow.png b/Backgrounds/AstralSurfaceFrontGlow.png similarity index 100% rename from Skies/AstralSurfaceFrontGlow.png rename to Backgrounds/AstralSurfaceFrontGlow.png diff --git a/Backgrounds/AstralSurfaceHorizon.png b/Backgrounds/AstralSurfaceHorizon.png new file mode 100644 index 0000000000000000000000000000000000000000..fa58141a90048adf89e4a9abc8e1bcd3c458c851 GIT binary patch literal 3527 zcmeHIZA?>V6ut$ws0e7XO=&8aITB1P3`n7c!o|<}1@$X&j7k+SRf`s^6=_S0)6FcP zU1p|ifOXj>PHC|;7D_=zy0m_AZ(LnlRw!bnUDwj8*e`C|yW9QVpZ(j9zR7#edveZu z^5)5Np7+b$6}04~_@w{Wt=xfw-}3{+zczcx*a z7d*ID009YYZOhG1=5CH&$XE zJ4scGg4qa2JA{g*Nf)%_7rK7a=c16C72HdCjMYibc^iK8vC7BzZq$#;g7RpJALXgD zg140QSyfCoEsAR}mW$gn5*(+Wk&c#(x!fo?fd*!fg)TR0X~=!Gf;G8cHEfnFBtGvf zK*#>DQAt}x^~2s}E|{v#^P^0x8hb=4f~rKCXvr`q{Ne2)7o(y(FpKKbJCUvd$rQ-( z@B~GVntM;kU>*gUR9vO1jFc%n#0fS6&@d>4dxdmZ>E8@$?wqvD!*v##-FE4;IBi{Vpw4U1(QVKsa;}!rXsmI50g{D zpCts3t(tCfG(!2@2dCI_0rzz2zIpU$w!XTM@mR|?F{-$|8q*%jJ6AfD)oMUxPe?T8`6C5FZ%96~%#8w%C(u#) znHT9NjM~BB{y~nUgt5k?8SN0%@8I1B4ki1=z@s;_c2T0WhH4GrKBnq*sens?Cho4Q zo%nW~0AO`TSVWa9X#NR$<_8P6`SQ74}JDG4^;We literal 0 HcmV?d00001 diff --git a/Backgrounds/AstralSurfaceMiddle.png b/Backgrounds/AstralSurfaceMiddle.png index 89b568c3be4fe85000949d2fbcd95dc7c5f77ff6..d3f984c00173cb54c66d563a2002cd5ad7b9876a 100644 GIT binary patch literal 20405 zcmd42i93{E_&&w1{Pd1Akpb@i%urqo#PcHm ze^bua7GOnz75G0NJ>3B~5ljEqRr#wyyg(3whNCJ=xc>h;w$OE%T%Sll5%bTv5%?9p zx&QM_Cn*rmXO<$n|8?%Rn<(Iv{!*RjHvI1z+g%9RWkwIQ?Y1lYS-L0>#`^yE3rAr9 zC;XGw*@yxBy8mYHcI{BVCOL0q_Qj;lyi}Wtz<7)Q{jN9u$^3WqD1)O9EJXo{02egc zxL6g@L|~zaG_U`btGf=gnjGUQfpn$7C!3unG{CEBt%<(w25$fVJo8=?(vQMLEs;H5 z8rt1`!ds}E_TV+5iF>e5|9gJ#Iuzx+O#WLGWzkhILwl0HaB0A+L1yx9?lCkm1RKUL z|8H1_Z9tF+Adwm}^*|KTSW2%N6(REe&=XE{j7osTCL{!5_Qdb#EnWEDP3}^~c25Mw z*L5fT&m-EJ2m>F&H-b2`Us;TrhNL;JPfNAe%C+1HgHpN2^uc5DKn(nkkEuw2ah-E= zpwsjQw8T?waLa2rB{=IWZ^bTfNae`B#lFoIgB6ciUmk;@{%*ly^a&YzyQiDLv~4uE z#+?xERR<{Q#Q$8w?!>3~HK=jBv5`vZ5pP>%Y4M0r<8#yv0cQvf2XxsvXX8q^rMs`3testLl=rer5 z?*^Gbi#?k_8&|Wwav5#Nj%s2Gx+OrflruEbLdv(t;x6UqFkXr)3v>2AeS%#(SBoJ! z%y=1q>1Fcbr{&pR)A|ply3`~Ilfe()GNf4KP z<6=$ZpDADli7-}!@dlA29bah;Kkoedu)lo|3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0-kaGbY~C3rzt+y2 z;+ga#2(4GwDV|aG#}6R({XE`y7~8`3g3FYXc8aD-(fX1(SxSifs>zyT&BP_JceX;T z+I<>?Rf>fJ)F%RZhg)9N`&Nf+PMCVW%>ped3unnv%3gXNzteEzLOwT=c+)o>&$k<) z&adhkc!eF|{ZX(^QZw@2d}#A!0#os4EWE`tUy-|nep51aF%kM$up5&nfCIPzt2xU4 zbb2)X2MwCGN_Hd&)+E&Y(z>?srzdr|9YSKo>!-FwF{a=0Eou&v*Wm@Y2S0{Hs=)z? z+GsJV>w7eme(dk-;y^jb^|3Wo#NSWp5l}1B*$Anu&N$YDMP_6;Bb;)Z%VA}-xV(D} z#3J(;|AP|WKS}l-OLVct>TJd{HGrol)c~EVuwzl|2n726$@m}j{r;_Cvp$CUOEk}< zIRqOjs`2NSM}gD5_zGhW{kLWQy(;Ga*KRg^5h+{zmGesnE$(LQgnrq^{!Ybj|L|<_=OUt_Mb9x4 S4p8|^xOTI{cKZ@GSMVR8E*)P0 diff --git a/Skies/AstralSurfaceMiddleGlow.png b/Backgrounds/AstralSurfaceMiddleGlow.png similarity index 100% rename from Skies/AstralSurfaceMiddleGlow.png rename to Backgrounds/AstralSurfaceMiddleGlow.png diff --git a/Backgrounds/AstralUG4_0.png b/Backgrounds/AstralUG4_0.png new file mode 100644 index 0000000000000000000000000000000000000000..73f3bad550b5918699e665cfaf726e26d49bc09c GIT binary patch literal 1922 zcmY+Fc~sJA7stU3(~KM!vIX91RI({ivrNl9w{j!Vmr2bW#Y}O@B_%_$Jeo!32sUmB zI*D79yA~oX>ST&bnPV>4I7XU?iI4(68SCww_kI7k&pr2?d(Lyd_j8}`bHm5WRZC;L z1_%Vwa(8n^Z)Dm=pw!hi&VuUrn2iKZK)X7EnB1Ln8-+@QgQo)sRG+IUKc~7;Z;Ern zCV)U&o_`H+Pi$2f2n2z-J3IKL1Pe+%qxCSlJ-phh%OrKm!`~gwucDTK<`?=mOb;@&^YjF~8GOE~$L%Z<>$Y{PB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B?6>9jg(7>Z9m@ps`9)QbTLjKDJX9_wZTU>(sBGB9 zm!RV`Cl&(L#)$s}zRUIgQqSCy%MEVR@zOUCLRg~It0on#Z^NGiK;4e>QuqN>?~OJ^ z{ybR5^n3)5%K^UP4L@~!I-?+w_u*~E(AaE&)^i*b?lDGY?{a@n{MGgx2y=*Xg6gmr zJ4(Xzx^+HQ^E0aD+{y=5DtNC2Q##Z+CgjEcyw-k#J$W`ROOvPX2+Ow~z@!Kvzay&Vq3QiiibCO6r&t`XU+LwG*jWil zS9rIsVgguEN&!*(fS``g4MFT*CrwlMmtQ*8|Ei}LONLhF6O zgZ}pU?LkbL!``i|`14`(tw`6A&tJro?eIH*)Y*RY`n_j0=5tmZGXx>z@3a-$5)(Qb w5%)2$Cfk2jr8M?kYYXG?i*J%N(6xYO*JmYrJt^wL#=i-2KjG!fbPUP(2bAv8L;wH) literal 0 HcmV?d00001 diff --git a/Backgrounds/AstralUG4_1.png b/Backgrounds/AstralUG4_1.png new file mode 100644 index 0000000000000000000000000000000000000000..bf9978ceeb464aaebd47ed1872343b3c355dd496 GIT binary patch literal 1751 zcmV;|1}OQ7P)001xu1^@s6mZ@=W00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D25d=0K~#8N?VL|+ z6;%|*c{NZTplyLxQm~MsL6ng2$DkF6i3I!?G%?YIAtt(X?Z$-*7cSJjE_F+EXQIZ1 zm`0;9L}LUbNCQY~Yzu7-r4*zn=g!ZB4-WGlE$>1-zXe}s-hFrO%$@VSGc$*&?AiU= zr8)m{VEo)=xr*w@py@TRbC_JeV=40G>UVS3^Blcu`A zEVCcoE4oazAKI0TPmc@zd9a;*KmK4!`&{$iWd8<1CjN6kbs*04$%%ue-@kCobj#jV zrqEn{z!WF??v8Y3|609vM1e*GXv8Qu4=`@F|K{kVsqP1#ZyMNV3cGqh-}mCDA)Uo{8R$Z1}@)b!H1ans&s4w=HXPuH4O<}Wm*-TAW(cO16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W#o67-#v|**CNgw!m_*GH3Q4%*xo;U@rNoH@xS?N>C_Qh;1f2FKoxqIAoozgj{ zMzO}feWOn~!LCG~efBCifu zYHcE9B}~i9vQaF=YN#jsx1sy*0m4V@!4V0kVBUNLEueAw=@=ag$x~`dgXq(B2xJ}z z3HRSfBQL~(VlG{(pBXRARWmcw1700CO)x&U&zk9Q@0#{y<1yZLE-gSfErH`LRy0OA zZOAXS!T-{_*T^g6{6PH~`pJZq27iisdQN6^-NbrMh%#rBYu~VmFFkj2)Ozo{9{-~c z%}5|GG%Jp&WIPTyJ|ARQchGAmzNT(6#f|Zp6^r9o zn<;$D$&-WvSyoD?`V!;)v^0a}cChloln>H^Z7P7bMcM)?HFf%d!x)~zFRM`Zp=-)R)?f3$G z?1OozOka3MBhX6MleXx-&(?|$GlDkEtA?oBsJe!@1%Tvb*O8|{-Yf6;LT6i;LayG~ z)Ij`!g$8(9r@BL{1xXI9qfFH4TGwVNTLVQ%o&SLy(D72;I9tMF3b%^4lq8K)LaP5> z(gX{y2tUS23c2<(WJiW5;FNylq~yV)wqOF{KXiV3q`-nmB!tQ@9L}cXDzz=;v2B$- zhmrUXo;k(vh?6B=&kS1%zf7<`;NYyE(-%^qiTuHxZ(g`N0WsrJ6m{5nZ#$9O~L`>RXEd<{sMbw8Rq~1 literal 0 HcmV?d00001 diff --git a/Backgrounds/AstralUndergroundBGStyle.cs b/Backgrounds/AstralUndergroundBGStyle.cs index 71f1ec2c50..f3c9455798 100644 --- a/Backgrounds/AstralUndergroundBGStyle.cs +++ b/Backgrounds/AstralUndergroundBGStyle.cs @@ -1,4 +1,5 @@ -using Terraria.ModLoader; +using Terraria; +using Terraria.ModLoader; namespace CalamityMod.Backgrounds { @@ -6,8 +7,8 @@ namespace CalamityMod.Backgrounds { public override void FillTextureArray(int[] textureSlots) { - for (int i = 0; i <= 3; i++) - textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG" + i.ToString()); + for (int i = 0; i <= 4; i++) + textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot(i == 4 ? "CalamityMod/Backgrounds/AstralUG" + i.ToString() + "_" + Main.hellBackStyle : "CalamityMod/Backgrounds/AstralUG" + i.ToString()); } } } diff --git a/BiomeManagers/AbovegroundAstralBiome.cs b/BiomeManagers/AbovegroundAstralBiome.cs deleted file mode 100644 index aea59f5567..0000000000 --- a/BiomeManagers/AbovegroundAstralBiome.cs +++ /dev/null @@ -1,34 +0,0 @@ -using CalamityMod.Items.Placeables.Furniture; -using CalamityMod.Systems; -using Terraria; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.BiomeManagers -{ - public class AbovegroundAstralBiome : ModBiome - { - public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); - public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSurfaceFogBGStyle"); - public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find("CalamityMod/AstralUndergroundBGStyle"); - public override int BiomeTorchItemType => ModContent.ItemType(); - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon"; - public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - - public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space; - - public override bool IsBiomeActive(Player player) - { - return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950; - } - - public override void SpecialVisuals(Player player, bool isActive) - { - player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive); - - } - } -} diff --git a/BiomeManagers/AbovegroundAstralBiomeSurface.cs b/BiomeManagers/AbovegroundAstralBiomeSurface.cs deleted file mode 100644 index d68e9ed700..0000000000 --- a/BiomeManagers/AbovegroundAstralBiomeSurface.cs +++ /dev/null @@ -1,41 +0,0 @@ -using CalamityMod.Items.Placeables.Furniture; -using CalamityMod.Systems; -using Terraria; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.BiomeManagers -{ - public class AbovegroundAstralBiomeSurface : ModBiome - { - public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); - public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSurfaceBGStyle"); - public override int BiomeTorchItemType => ModContent.ItemType(); - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - - public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space; - - public override bool IsBiomeActive(Player player) - { - return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && !player.ZoneSnow && !player.ZoneDesert; - } - - public override void SpecialVisuals(Player player, bool isActive) - { - if (SkyManager.Instance["CalamityMod:AstralSurface"] != null && isActive != SkyManager.Instance["CalamityMod:AstralSurface"].IsActive()) - { - if (isActive) - { - SkyManager.Instance.Activate("CalamityMod:AstralSurface"); - } - else - { - SkyManager.Instance.Deactivate("CalamityMod:AstralSurface"); - } - } - } - - } -} diff --git a/BiomeManagers/AbovegroundAstralDesertBiome.cs b/BiomeManagers/AbovegroundAstralDesertBiome.cs deleted file mode 100644 index 37058fdce9..0000000000 --- a/BiomeManagers/AbovegroundAstralDesertBiome.cs +++ /dev/null @@ -1,43 +0,0 @@ -using CalamityMod.Items.Placeables.Furniture; -using CalamityMod.Systems; -using Terraria; -using Terraria.GameContent.Events; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.BiomeManagers -{ - public class AbovegroundAstralDesertBiome : ModBiome - { - public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); - public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralDesertSurfaceBGStyle"); - public override int BiomeTorchItemType => ModContent.ItemType(); - public override SceneEffectPriority Priority => Sandstorm.Happening && !(Main.slimeRain || Main.eclipse) ? SceneEffectPriority.Environment : SceneEffectPriority.BiomeHigh; - public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon"; - // Could use its own unique background - public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space; - - public override bool IsBiomeActive(Player player) - { - return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneDesert && !player.ZoneSnow; - } - - public override void SpecialVisuals(Player player, bool isActive) - { - if (SkyManager.Instance["CalamityMod:AstralDesert"] != null && isActive != SkyManager.Instance["CalamityMod:AstralDesert"].IsActive()) - { - if (isActive) - { - SkyManager.Instance.Activate("CalamityMod:AstralDesert"); - } - else - { - SkyManager.Instance.Deactivate("CalamityMod:AstralDesert"); - } - } - } - } -} diff --git a/BiomeManagers/AbovegroundAstralSnowBiome.cs b/BiomeManagers/AbovegroundAstralSnowBiome.cs deleted file mode 100644 index 029513ce91..0000000000 --- a/BiomeManagers/AbovegroundAstralSnowBiome.cs +++ /dev/null @@ -1,41 +0,0 @@ -using CalamityMod.Items.Placeables.Furniture; -using CalamityMod.Systems; -using Terraria; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.BiomeManagers -{ - public class AbovegroundAstralSnowBiome : ModBiome - { - public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); - public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSnowSurfaceBGStyle"); - public override int BiomeTorchItemType => ModContent.ItemType(); - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - - public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space; - - public override bool IsBiomeActive(Player player) - { - return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneSnow; - } - - public override void SpecialVisuals(Player player, bool isActive) - { - if (SkyManager.Instance["CalamityMod:AstralSnow"] != null && isActive != SkyManager.Instance["CalamityMod:AstralSnow"].IsActive()) - { - if (isActive) - { - SkyManager.Instance.Activate("CalamityMod:AstralSnow"); - } - else - { - SkyManager.Instance.Deactivate("CalamityMod:AstralSnow"); - } - } - } - - } -} diff --git a/BiomeManagers/AstralInfectionBiome.cs b/BiomeManagers/AstralInfectionBiome.cs new file mode 100644 index 0000000000..264845baae --- /dev/null +++ b/BiomeManagers/AstralInfectionBiome.cs @@ -0,0 +1,94 @@ +using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Systems; +using Terraria; +using Terraria.Graphics.Effects; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.BiomeManagers +{ + public class AstralInfectionBiome : ModBiome + { + public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); + public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle + { + get + { + if (Main.LocalPlayer.ZoneSnow) //Snow + { + return ModContent.Find("CalamityMod/AstralSnowSurfaceBGStyle"); + } + else if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow) //Desert + { + return ModContent.Find("CalamityMod/AstralDesertSurfaceBGStyle"); + } + else //surface + { + return ModContent.Find("CalamityMod/AstralSurfaceBGStyle"); + } + } + } + + public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle + { + get + { + if (Main.LocalPlayer.ZoneSnow) + { + return ModContent.Find("CalamityMod/AstralUndergroundBGStyle"); // Could use its own unique background + } + return ModContent.Find("CalamityMod/AstralUndergroundBGStyle"); + } + } + + public override int BiomeTorchItemType => ModContent.ItemType(); + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon"; + public override string BackgroundPath + { + get { + if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow) + { + //desert + return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; // Could use its own unique background + } + else if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight) + { + //underground + return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; // Could use its own unique background + } + else + { + return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; + } + } + } + public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; + + public override int Music + { + get + { + if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight) + { + return CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space; + } + return CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space; + } + } + + public override bool IsBiomeActive(Player player) + { + return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950; + } + + public override void SpecialVisuals(Player player, bool isActive) + { + player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive); + if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight) + { + player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive); //underground + } + } + } +} diff --git a/BiomeManagers/AcidRainBiome.cs b/BiomeManagers/BestiaryCategories/AcidRainBiome.cs similarity index 100% rename from BiomeManagers/AcidRainBiome.cs rename to BiomeManagers/BestiaryCategories/AcidRainBiome.cs diff --git a/BiomeManagers/BestiaryCategories/AstralCaveDesert.cs b/BiomeManagers/BestiaryCategories/AstralCaveDesert.cs new file mode 100644 index 0000000000..8f7d2a9a30 --- /dev/null +++ b/BiomeManagers/BestiaryCategories/AstralCaveDesert.cs @@ -0,0 +1,11 @@ +using Terraria.ModLoader; + +namespace CalamityMod.BiomeManagers.BestiaryCategories +{ + public class AstralCaveDesert : ModBiome //Unused, currently + { + public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralCaveDesertIcon"; + + public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; + } +} diff --git a/BiomeManagers/BestiaryCategories/AstralDesert.cs b/BiomeManagers/BestiaryCategories/AstralDesert.cs new file mode 100644 index 0000000000..29b0a3f907 --- /dev/null +++ b/BiomeManagers/BestiaryCategories/AstralDesert.cs @@ -0,0 +1,11 @@ +using Terraria.ModLoader; + +namespace CalamityMod.BiomeManagers.BestiaryCategories +{ + public class AstralDesert : ModBiome + { + public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon"; + + public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; + } +} diff --git a/BiomeManagers/BestiaryCategories/AstralIce.cs b/BiomeManagers/BestiaryCategories/AstralIce.cs new file mode 100644 index 0000000000..f478ae1ee9 --- /dev/null +++ b/BiomeManagers/BestiaryCategories/AstralIce.cs @@ -0,0 +1,11 @@ +using Terraria.ModLoader; + +namespace CalamityMod.BiomeManagers.BestiaryCategories +{ + public class AstralIce : ModBiome //Unused, currently + { + public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralIceIcon"; + + public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; + } +} diff --git a/BiomeManagers/BestiaryCategories/AstralUnderground.cs b/BiomeManagers/BestiaryCategories/AstralUnderground.cs new file mode 100644 index 0000000000..42d924fd5b --- /dev/null +++ b/BiomeManagers/BestiaryCategories/AstralUnderground.cs @@ -0,0 +1,11 @@ +using Terraria.ModLoader; + +namespace CalamityMod.BiomeManagers.BestiaryCategories +{ + public class AstralUnderground : ModBiome + { + public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon"; + + public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; + } +} diff --git a/BiomeManagers/UndergroundAstralBiome.cs b/BiomeManagers/UndergroundAstralBiome.cs deleted file mode 100644 index f83a02d83f..0000000000 --- a/BiomeManagers/UndergroundAstralBiome.cs +++ /dev/null @@ -1,33 +0,0 @@ -using CalamityMod.Systems; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.BiomeManagers -{ - public class UndergroundAstralBiome : ModBiome - { - public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); - public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find("CalamityMod/AstralUndergroundBGStyle"); - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon"; - // Could use its own unique background - public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; - - public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space; - - public override bool IsBiomeActive(Player player) - { - return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); - } - - public override void SpecialVisuals(Player player, bool isActive) - { - player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive); - } - - // Just slightly above the above-ground astral biomes. - public override float GetWeight(Player player) => 0.51f; - } -} diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 6bc8f2c496..e505c7e3b9 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1089,10 +1089,7 @@ namespace CalamityMod.CalPlayer #region Biome public bool ZoneCalamity => Player.InModBiome(ModContent.GetInstance()); - public bool ZoneAstral => (Player.InModBiome(ModContent.GetInstance()) || - Player.InModBiome(ModContent.GetInstance()) || - Player.InModBiome(ModContent.GetInstance()) || - Player.InModBiome(ModContent.GetInstance())) && !ZoneAbyss; + public bool ZoneAstral => Player.InModBiome(ModContent.GetInstance()) && !ZoneAbyss; public bool ZoneSunkenSea => Player.InModBiome(ModContent.GetInstance()); public bool ZoneSulphur => Player.InModBiome(ModContent.GetInstance()); public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4; diff --git a/CalamityMod.cs b/CalamityMod.cs index db4492d4f8..62b15634c1 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -92,13 +92,10 @@ namespace CalamityMod public static Texture2D AstralSurfaceCloseGlow; public static Texture2D AstralSurfaceMiddle; public static Texture2D AstralSurfaceMiddleGlow; - public static Texture2D AstralSurfaceFar; - public static Texture2D AstralSurfaceHorizon; // Astral Desert Sky/BG public static Texture2D AstralDesertSurfaceClose; public static Texture2D AstralDesertSurfaceMiddle; - public static Texture2D AstralDesertSurfaceFar; // Astral Snow Sky/BG public static Texture2D AstralSnowSurfaceMiddle; @@ -278,22 +275,19 @@ namespace CalamityMod { // Astral Sky/BG AstralSky = ModContent.Request("CalamityMod/Skies/AstralSky", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceFront = ModContent.Request("CalamityMod/Skies/AstralSurfaceFront", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceFrontGlow = ModContent.Request("CalamityMod/Skies/AstralSurfaceFrontGlow", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceClose = ModContent.Request("CalamityMod/Skies/AstralSurfaceClose", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceCloseGlow = ModContent.Request("CalamityMod/Skies/AstralSurfaceCloseGlow", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceMiddle = ModContent.Request("CalamityMod/Skies/AstralSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceMiddleGlow = ModContent.Request("CalamityMod/Skies/AstralSurfaceMiddleGlow", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceFar = ModContent.Request("CalamityMod/Skies/AstralSurfaceFar", AssetRequestMode.ImmediateLoad).Value; - AstralSurfaceHorizon = ModContent.Request("CalamityMod/Skies/AstralSurfaceHorizon", AssetRequestMode.ImmediateLoad).Value; + AstralSurfaceFront = ModContent.Request("CalamityMod/Backgrounds/AstralSurfaceFront", AssetRequestMode.ImmediateLoad).Value; + AstralSurfaceFrontGlow = ModContent.Request("CalamityMod/Backgrounds/AstralSurfaceFrontGlow", AssetRequestMode.ImmediateLoad).Value; + AstralSurfaceClose = ModContent.Request("CalamityMod/Backgrounds/AstralSurfaceClose", AssetRequestMode.ImmediateLoad).Value; + AstralSurfaceCloseGlow = ModContent.Request("CalamityMod/Backgrounds/AstralSurfaceCloseGlow", AssetRequestMode.ImmediateLoad).Value; + AstralSurfaceMiddle = ModContent.Request("CalamityMod/Backgrounds/AstralSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value; + AstralSurfaceMiddleGlow = ModContent.Request("CalamityMod/Backgrounds/AstralSurfaceMiddleGlow", AssetRequestMode.ImmediateLoad).Value; - // Astral Desert Sky/BG - AstralDesertSurfaceClose = ModContent.Request("CalamityMod/Skies/AstralDesertSurfaceClose", AssetRequestMode.ImmediateLoad).Value; - AstralDesertSurfaceMiddle = ModContent.Request("CalamityMod/Skies/AstralDesertSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value; - AstralDesertSurfaceFar = ModContent.Request("CalamityMod/Skies/AstralDesertSurfaceFar", AssetRequestMode.ImmediateLoad).Value; + //Astral Desert Sky/BG + AstralDesertSurfaceClose = ModContent.Request("CalamityMod/Backgrounds/AstralDesertSurfaceClose", AssetRequestMode.ImmediateLoad).Value; + AstralDesertSurfaceMiddle = ModContent.Request("CalamityMod/Backgrounds/AstralDesertSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value; - // Astral Snow Sky/BG - AstralSnowSurfaceMiddle = ModContent.Request("CalamityMod/Skies/AstralSnowSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value; + //Astral Snow Sky/BG + AstralSnowSurfaceMiddle = ModContent.Request("CalamityMod/Backgrounds/AstralSnowSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value; // Sulpher Sea Sky/BG SulphurSeaSky = ModContent.Request("CalamityMod/Skies/SulphurSeaSky", AssetRequestMode.ImmediateLoad).Value; @@ -352,10 +346,6 @@ namespace CalamityMod SkyManager.Instance["CalamityMod:BrimstoneCrag"] = new BrimstoneCragSky(); SkyManager.Instance["CalamityMod:Astral"] = new AstralSky(); - SkyManager.Instance["CalamityMod:AstralSurface"] = new AstralSkySurface(); - SkyManager.Instance["CalamityMod:AstralDesert"] = new AstralSkyDesert(); - SkyManager.Instance["CalamityMod:AstralSnow"] = new AstralSkySnow(); - SkyManager.Instance["CalamityMod:MonolithAstral"] = new AstralMonolithSky(); SkyManager.Instance["CalamityMod:SulphurSea"] = new SulphurSeaSky(); SkyManager.Instance["CalamityMod:Cryogen"] = new CryogenSky(); SkyManager.Instance["CalamityMod:StormWeaverFlash"] = new StormWeaverFlashSky(); diff --git a/ILEditing/ILHelperMethods.cs b/ILEditing/ILHelperMethods.cs index bd8175fb1f..01f2379f0e 100644 --- a/ILEditing/ILHelperMethods.cs +++ b/ILEditing/ILHelperMethods.cs @@ -64,7 +64,7 @@ namespace CalamityMod.ILEditing SoundEngine.PlaySound(SoundID.DoorClosed, new Vector2(doorX * 16, doorY * 16)); return true; } - + private static Texture2D SelectLavaTexture(Texture2D initialTexture, LiquidTileType type) { // Use the initial texture if it isn't lava. diff --git a/Items/Weapons/Melee/CosmicShiv.cs b/Items/Weapons/Melee/CosmicShiv.cs index eb19732c3d..b7e5f75b48 100644 --- a/Items/Weapons/Melee/CosmicShiv.cs +++ b/Items/Weapons/Melee/CosmicShiv.cs @@ -43,4 +43,4 @@ namespace CalamityMod.Items.Weapons.Melee Register(); } } -} +} \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Biomes.hjson b/Localization/en-US/Mods.CalamityMod.Biomes.hjson index 7751dea39b..f6834ea4a1 100644 --- a/Localization/en-US/Mods.CalamityMod.Biomes.hjson +++ b/Localization/en-US/Mods.CalamityMod.Biomes.hjson @@ -1,29 +1,28 @@ // For general uses Abyss: Abyss AstralInfection: Astral Infection -AstralDesert: Astral Desert AstralSnow: Astral Snow BrimstoneCrags: Brimstone Crags SulphurousSea: Sulphurous Sea SunkenSea: Sunken Sea -AbovegroundAstralBiome: { - DisplayName: Astral Infection - TownNPCDialogueName: Astral Infection -} - -AbovegroundAstralBiomeSurface: { - DisplayName: Astral Surface - TownNPCDialogueName: Astral Infection -} - -AbovegroundAstralDesertBiome: { +AstralDesert: { DisplayName: Astral Desert Surface TownNPCDialogueName: Astral Desert } -AbovegroundAstralSnowBiome: { - DisplayName: Astral Snow Surface +AstralBiome: { + DisplayName: Astral Infection + TownNPCDialogueName: Astral Infection +} + +AstralInfectionBiome: { + DisplayName: Astral Infection + TownNPCDialogueName: Astral Infection +} + +AstralIce: { + DisplayName: Astral Ice TownNPCDialogueName: Astral Snow } @@ -72,7 +71,12 @@ SunkenSeaBiome: { TownNPCDialogueName: Sunken Sea } -UndergroundAstralBiome: { +AstralUnderground: { DisplayName: Astral Underground TownNPCDialogueName: Underground Astral Infection } + +AstralCaveDesert: { + DisplayName: Astral Cave Desert + TownNPCDialogueName: the Astral Cave Desert +} diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 32f4280027..086ae693e4 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -21,6 +21,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; diff --git a/NPCs/Astral/Aries.cs b/NPCs/Astral/Aries.cs index 76984fe721..1ea110d392 100644 --- a/NPCs/Astral/Aries.cs +++ b/NPCs/Astral/Aries.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index 337b44f461..b57bd3c99d 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -56,7 +56,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/AstralSlime.cs b/NPCs/Astral/AstralSlime.cs index bd9d700934..9959c22d91 100644 --- a/NPCs/Astral/AstralSlime.cs +++ b/NPCs/Astral/AstralSlime.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/AstralachneaWall.cs b/NPCs/Astral/AstralachneaWall.cs index 988cf850db..ab3c5fc0d1 100644 --- a/NPCs/Astral/AstralachneaWall.cs +++ b/NPCs/Astral/AstralachneaWall.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Sounds; using CalamityMod.World; +using CalamityMod.BiomeManagers.BestiaryCategories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -58,7 +59,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 5089169c16..197c13bfff 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -153,7 +153,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/FusionFeeder.cs b/NPCs/Astral/FusionFeeder.cs index 49a6b73e71..9df2efe204 100644 --- a/NPCs/Astral/FusionFeeder.cs +++ b/NPCs/Astral/FusionFeeder.cs @@ -4,6 +4,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; +using CalamityMod.BiomeManagers.BestiaryCategories; using CalamityMod.Projectiles.Enemy; using CalamityMod.Sounds; using Microsoft.Xna.Framework; @@ -75,7 +76,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/Hadarian.cs b/NPCs/Astral/Hadarian.cs index f71ed2a2df..8882cf68c8 100644 --- a/NPCs/Astral/Hadarian.cs +++ b/NPCs/Astral/Hadarian.cs @@ -8,6 +8,7 @@ using CalamityMod.Items.Placeables.Banners; using CalamityMod.Sounds; using CalamityMod.Tiles.AstralDesert; using CalamityMod.World; +using CalamityMod.BiomeManagers.BestiaryCategories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -58,7 +59,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/HiveEnemy.cs b/NPCs/Astral/HiveEnemy.cs index 75d9527c5d..634dd610c2 100644 --- a/NPCs/Astral/HiveEnemy.cs +++ b/NPCs/Astral/HiveEnemy.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Summon; using CalamityMod.Sounds; using CalamityMod.World; +using CalamityMod.BiomeManagers.BestiaryCategories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -50,7 +51,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; if (Main.zenithWorld) { NPC.scale = 3f; diff --git a/NPCs/Astral/Hiveling.cs b/NPCs/Astral/Hiveling.cs index 8d57509795..1815cf10a8 100644 --- a/NPCs/Astral/Hiveling.cs +++ b/NPCs/Astral/Hiveling.cs @@ -4,6 +4,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Sounds; using CalamityMod.World; +using CalamityMod.BiomeManagers.BestiaryCategories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -50,7 +51,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index f2abb227c0..f4416a41f4 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/Nova.cs b/NPCs/Astral/Nova.cs index 3eec7f005b..6546f6889d 100644 --- a/NPCs/Astral/Nova.cs +++ b/NPCs/Astral/Nova.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/SightseerCollider.cs b/NPCs/Astral/SightseerCollider.cs index 9e8dc3fec8..5b0a72f09c 100644 --- a/NPCs/Astral/SightseerCollider.cs +++ b/NPCs/Astral/SightseerCollider.cs @@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/SightseerSpitter.cs b/NPCs/Astral/SightseerSpitter.cs index 018a3f7efe..18a292029b 100644 --- a/NPCs/Astral/SightseerSpitter.cs +++ b/NPCs/Astral/SightseerSpitter.cs @@ -61,7 +61,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/StellarCulex.cs b/NPCs/Astral/StellarCulex.cs index 7cdb6f1050..979055f748 100644 --- a/NPCs/Astral/StellarCulex.cs +++ b/NPCs/Astral/StellarCulex.cs @@ -5,6 +5,7 @@ using CalamityMod.Dusts; using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; +using CalamityMod.BiomeManagers.BestiaryCategories; using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -59,7 +60,7 @@ namespace CalamityMod.NPCs.Astral } NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; // Scale stats in Expert and Master CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); diff --git a/NPCs/Astral/Twinkler.cs b/NPCs/Astral/Twinkler.cs index d0b5d1794e..236659fd72 100644 --- a/NPCs/Astral/Twinkler.cs +++ b/NPCs/Astral/Twinkler.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Astral AIType = NPCID.LightningBug; AnimationType = NPCID.LightningBug; NPC.catchItem = (short)ModContent.ItemType(); - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index a99da6194b..c2222cc170 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -106,7 +106,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; if (Main.getGoodWorld) NPC.scale *= 0.8f; @@ -439,7 +439,7 @@ namespace CalamityMod.NPCs.AstrumAureus } // Drop an Astral Meteor if applicable - ThreadPool.QueueUserWorkItem(_ => AstralBiome.PlaceAstralMeteor()); + ThreadPool.QueueUserWorkItem(_ => World.AstralBiome.PlaceAstralMeteor()); // Mark Astrum Aureus as dead DownedBossSystem.downedAstrumAureus = true; diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index ed43b0fe56..0174243a2e 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -108,7 +108,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.netAlways = true; NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; if (Main.zenithWorld) { diff --git a/NPCs/TownNPCs/AndroombaFriendly.cs b/NPCs/TownNPCs/AndroombaFriendly.cs index b78f297891..5b2a262879 100644 --- a/NPCs/TownNPCs/AndroombaFriendly.cs +++ b/NPCs/TownNPCs/AndroombaFriendly.cs @@ -147,13 +147,13 @@ namespace CalamityMod.NPCs.TownNPCs type = ConvertType.Crimson; break; } - AstralBiome.ConvertFromAstral(x - 2, x + 2, y - 2, y + 2, type); + World.AstralBiome.ConvertFromAstral(x - 2, x + 2, y - 2, y + 2, type); WorldGen.Convert(x, y, conversionType, 2); } // Calamity solution(s) else if (conversionType == 8) { - AstralBiome.ConvertToAstral(x - 2, x + 2, y - 2, y + 2); + World.AstralBiome.ConvertToAstral(x - 2, x + 2, y - 2, y + 2); } // Solutions registered by other mods else diff --git a/Projectiles/Magic/ExoVortex.cs b/Projectiles/Magic/ExoVortex.cs index fed7e9cdfc..aba7ceed69 100644 --- a/Projectiles/Magic/ExoVortex.cs +++ b/Projectiles/Magic/ExoVortex.cs @@ -8,6 +8,7 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Magic { diff --git a/Projectiles/Magic/ExoVortex2.cs b/Projectiles/Magic/ExoVortex2.cs index d9351189ea..594aac4474 100644 --- a/Projectiles/Magic/ExoVortex2.cs +++ b/Projectiles/Magic/ExoVortex2.cs @@ -8,6 +8,7 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Magic { diff --git a/Projectiles/Melee/CosmicShivAura.cs b/Projectiles/Melee/CosmicShivAura.cs index 5abefa744d..390c13d3d1 100644 --- a/Projectiles/Melee/CosmicShivAura.cs +++ b/Projectiles/Melee/CosmicShivAura.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnSpawn(IEntitySource source) { if (Main.npc[(int)Projectile.ai[0]] is not null || Main.npc[(int)Projectile.ai[0]].active) - target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object + target = Main.npc[(int)Projectile.ai[0]]; // Convert target.whoAmI to object } // ai[0] for ID of target to follow until the end of projectile's lifespan or the target cannot be found @@ -41,7 +41,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.Kill(); } - Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; // Stay with target + // Stay with target + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; if (Projectile.ai[1] == CurrentSwordTimer) { @@ -49,10 +50,16 @@ namespace CalamityMod.Projectiles.Melee randomDirection.Normalize(); int randomDistance = Main.rand.Next(200, 426); Vector2 spawnPos = Projectile.Center + (randomDirection * randomDistance); - Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; // Sword moves a bit slower if spawned closer, moves faster if spawned further + + // Sword moves a bit slower if spawned closer, moves faster if spawned further + Vector2 velocity = Vector2.Normalize(Projectile.Center - spawnPos) * Utils.GetLerpValue(-100, 426, randomDistance, clamped: true) * 20f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos.X, spawnPos.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.8f, Projectile.owner, randomDistance); - Projectile.ai[1] = 0; // Reset timer - CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); // Determine when next sword will spawn + + // Reset timer + Projectile.ai[1] = 0; + + // Determine when next sword will spawn + CurrentSwordTimer = Main.rand.Next(SwordsAverageDelay - SwordsRandomOffset, SwordsAverageDelay + SwordsRandomOffset); } Projectile.ai[1]++; diff --git a/Projectiles/Melee/CosmicShivBlade.cs b/Projectiles/Melee/CosmicShivBlade.cs index 10b158513a..5ae1c83de6 100644 --- a/Projectiles/Melee/CosmicShivBlade.cs +++ b/Projectiles/Melee/CosmicShivBlade.cs @@ -66,13 +66,18 @@ namespace CalamityMod.Projectiles.Melee float rotation = Projectile.rotation; Color randomColor = Projectile.GetAlpha(lightColor); + // Afterimages to make the blade look longer float scaleMult = 1.2f; - for (int i = 0; i < Projectile.oldPos.Length; i++) // Afterimages to make the blade look longer + for (int i = 0; i < Projectile.oldPos.Length; i++) { Vector2 drawPos = Projectile.oldPos[i] + (Projectile.Size / 2f) - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color color = randomColor * ((float)(Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); - Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color, rotation, origin, Projectile.scale * scaleMult, SpriteEffects.None, 0f); // Smaller, more visible layer - Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color * 0.5f, rotation, origin, Projectile.scale * 1.6f * scaleMult, SpriteEffects.None, 0f); // Bigger, less visible layer + + // Smaller, more visible layer + Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color, rotation, origin, Projectile.scale * scaleMult, SpriteEffects.None, 0f); + + // Bigger, less visible layer + Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(sourceRectangle), color * 0.5f, rotation, origin, Projectile.scale * 1.6f * scaleMult, SpriteEffects.None, 0f); scaleMult *= 0.95f; } @@ -88,12 +93,14 @@ namespace CalamityMod.Projectiles.Melee } } - public override Color? GetAlpha(Color lightColor) // Probably not the right way to use this function, but it works (hopefully) + // Probably not the right way to use this function, but it works (hopefully) + public override Color? GetAlpha(Color lightColor) { + // Take random color from a list and make it more white Color color = CosmicShivTrail.DustColors[ColorIndex] * Projectile.Opacity; color = Color.Lerp(color, Color.White, 0.6f); color.A = 0; - return color; // Take random color from a list and make it more white + return color; } } } diff --git a/Projectiles/Melee/CosmicShivTrail.cs b/Projectiles/Melee/CosmicShivTrail.cs index 8c7d14eb67..d5ba91fb4c 100644 --- a/Projectiles/Melee/CosmicShivTrail.cs +++ b/Projectiles/Melee/CosmicShivTrail.cs @@ -7,6 +7,14 @@ using Terraria; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Buffs.DamageOverTime; +using System.Collections.Generic; +using System.Security.Cryptography.X509Certificates; +using System.Reflection.Metadata; +using Microsoft.Xna.Framework.Graphics; +using System.Diagnostics.Contracts; +using Terraria.GameContent; +using Terraria.Audio; namespace CalamityMod.Projectiles.Melee { @@ -104,6 +112,40 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(ModContent.BuffType(), 60); } + // pretty much entirely from the Oracle circular damage code + private void CircularDamage(float radius) + { + if (Projectile.owner != Main.myPlayer) + return; + Player owner = Main.player[Projectile.owner]; + + for (int i = 0; i < Main.npc.Length; ++i) + { + NPC target = Main.npc[i]; + if (!target.active || target.dontTakeDamage || target.friendly) + continue; + + // Shock any valid target within range. Check all four corners of their hitbox. + float d1 = Vector2.Distance(Projectile.Center, target.Hitbox.TopLeft()); + float d2 = Vector2.Distance(Projectile.Center, target.Hitbox.TopRight()); + float d3 = Vector2.Distance(Projectile.Center, target.Hitbox.BottomLeft()); + float d4 = Vector2.Distance(Projectile.Center, target.Hitbox.BottomRight()); + float dist = MathHelper.Min(d1, d2); + dist = MathHelper.Min(dist, d3); + dist = MathHelper.Min(dist, d4); + + if (dist <= radius) + { + int damage = (int)(Projectile.damage * ExplosionDamageMultiplier); + bool crit = Main.rand.Next(100) <= owner.GetCritChance() + 4; + target.StrikeNPC(target.CalculateHitInfo(damage, 0, crit, 0)); + + if (Main.netMode != NetmodeID.SinglePlayer) + NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, i, damage, 0f, 0f, crit ? 1 : 0, 0, 0); + } + } + } + // Very similar to CosmicShivBlade PreDraw public override bool PreDraw(ref Color lightColor) { @@ -187,6 +229,8 @@ namespace CalamityMod.Projectiles.Melee dust.fadeIn = -1f; } } + + CircularDamage(80f); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Melee/EonBolt.cs b/Projectiles/Melee/EonBolt.cs index d6aaba4fd7..ff20bd185c 100644 --- a/Projectiles/Melee/EonBolt.cs +++ b/Projectiles/Melee/EonBolt.cs @@ -8,6 +8,7 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; +using CalamityMod.Graphics.Primitives; namespace CalamityMod.Projectiles.Melee { diff --git a/Projectiles/Melee/Shortswords/CosmicShivProj.cs b/Projectiles/Melee/Shortswords/CosmicShivProj.cs index ce21686f54..15a8518531 100644 --- a/Projectiles/Melee/Shortswords/CosmicShivProj.cs +++ b/Projectiles/Melee/Shortswords/CosmicShivProj.cs @@ -1,9 +1,14 @@ -using System; +using System; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -57,7 +62,8 @@ namespace CalamityMod.Projectiles.Melee.Shortswords OnHitEffect(); if (NumHits < 3) - { // Just to avoid insanity from stacking so many super dummies or hitting many worm segments at once + { + // Just to avoid insanity from stacking so many super dummies or hitting many worm segments at once // 2x bonus for true melee hits (spawns an additional aura plus the one aura from the cosmic shiv ball) Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, target.whoAmI); NumHits++; diff --git a/Skies/AstralDesertSurfaceClose.png b/Skies/AstralDesertSurfaceClose.png deleted file mode 100644 index c96ebe2cfdcbcd532b028f289dd4f5104aa04206..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5031 zcmeHL`CAfL7rsDP* zE+-wm0N5r?Ava}V(hE^C?)wjl_i{b~>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5nJX``S@11H9*7Xsc9X2Cu>HZijn9rrh=MJ zk4ON9qvy0%jbEc3b(c8Nci0gtjJ8m8`7_$}vRLX=Rx><5V9ZzMVG>}8^l-C(XOM;{n}z8>ue_>JkhK0@yCshTG7 zld$q&n4A>tWLBidEZ!T1*gZGq+GZx}Rn#Q3$7^O0&{%$&+l(w$(PDR|lIk*SVE<+pJ+VOq-Gm0GDXy+0c<*EGD z`B-1|vcq*U0PjxfnU`GAS)CCj2@07l$o<@kHsJm@jqs^WSQvEUwxv;R;%3(V-Jjhh0yoU zS2|%8vna~tBQT-H=fV<*fIKkRd6KSnl-G%Ve)Eu9t>~k}MYU}g> z+N;@$UGM+w##A3VWm^jINKJGg9nL1vY-nFE%dlKpF{@X*4KhS^E^Q6XRYkg-dMst#rB!v|1Q^Cayra+bAh`j~hP^97eXd;tT-#7CykgFg9d z`LQ2D3m$U1T~O4Q3wx)m%?7UTh5HMr(9_skuYg3pK5dlj{+&ln`olNEyhvIh7f7zH z*dhD|LJJN}tj0)McFjy86@kvn9#Z%fk9c%f0oDK{32V8~$^3QSzS7Z^4E3Hro;FImF3|d8;oa zsd=m9wG^1JB0A@4F$=BVAF#oDW0pwHxHa|rSn1#SR4bvi;o|;+)%0D>Tu-O+tDDOO zK*DMa+@V`by}0BU`eNacv}43esGb)(AyIqj%b*Diw89ff&||^3&eJL?oe?1EKy~^3 zXQY~sab*NoS?XAl>uOaSm(&>(_nU?zoOQI-{GF%!kZ%ZBZ_o74OuoNy4Z$Kx+K3Yx z)1D}Bpa`-XZUTNM$xxNMz|Ayu;AIH2lM4eU+rN?DMEJG||1Wk3+E{$E1*tRe{9+Y= RO#SB*#RX4rtUEzU`!C|>gO~sS diff --git a/Skies/AstralDesertSurfaceFar.png b/Skies/AstralDesertSurfaceFar.png deleted file mode 100644 index a2337a7d8fe1277ad1b4e44d3e8beb1282f81fbf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18650 zcmeFY1y>wVupr#H5AN;~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AVT!%B`ufY-I7!&o*ATHq` zd<#Q=0Goi0b-~4wIyVV#a|8 zFyOE&G7VT1iJ7DNbfVtqUoV#mN9=dN-K=i-0(c5kqOPHXlonk$a|Yj*zjp;|c7W#k zz`+7XbD7BLOwryowl%OGbw8&wYR{&48U(d%5-=<~{bJ7o-(Un5W?hlk?L;YHHl}mH zhzo#6(hskV>I(6Ghc0`WhDdb6zWRq?>)H&k?hW>^5*1072)Y9jm{j)>wY8Rr+;^p! zd*+!^B)kaO`TW2eYqM8Y+^Zit%{`XY4DDGfD6rMS^BoyyAyNq(U>su0g%WHfZahN< z*DZ%z-{>jKNy~>0x>mSjOL@b(R*-W@tbIHg2N!1|cnN?N@cdpz<{mUpvptGgZ~~g- z4|{OEG||){cuINJN+j0qJ3N+{RR3G$=`S7b!0q;NJE5x|b=gP41(qH(e5#jbcYtWe z_TNsRGXE%O+E`?qsm*(Y6^B2=6=#CdmK{c?apPQn0>BWR$iF@%v+yMr06!{mLRaawl%0HlyDw7{Z~HI8{d2G3)tUD z`wrl^!KN`%bj7Cqwec1#TZ@{cec6Eu6ntvXIl$Kd%fx4$1d4k;g&#{9q4;zj8bqkj46i zAM%d<{lpB}BW&ve0;EGc1%V}CJ{P*>g4alDa|6Tu*ll7V|8IK@bisVS?~zM# zIKD4=`+=t&F0sRAgF(=<-f3{=9Cq~zE=I}o@-BwfzrG+7mYn4_5mGJFMa=$P0=)vvGPaD_cSbd z`WYy1{o~U-=e4PVK*!kc+m#-e8)*Y%8bg>uK&Co`$putvR8xF@;k8XNz+kcdaQ19X zd8hfJ%bT`FVdQ I&MBb@08L}L*Z=?k diff --git a/Skies/AstralDesertSurfaceMiddle.png b/Skies/AstralDesertSurfaceMiddle.png deleted file mode 100644 index 6b5c33dee80cd4243d98a029ce2c3404f793204b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5402 zcmeHL`8yQa8$V;R&Y-akBSe=(mTA#kyTYUpS&JAHk}zg4Su(Oj#Jx9C*}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!q=DBL+ru18U)}dVY@?(|eW z?#r;J&E%ss+zd7Do;#@wGmekKTKy|ChW^f`8sLHS6^R$N#avS8@hYl+Am~ks|8z!vwLdlsw+l$=VoHuY^>PRQw zuwf%Z4*-ke%^MB66B5_$k(T>RqxHUcfe7g3rJ3oZA#xd&cADHkkD`B;FY0vyR+tL! zP17BMT{lTEM>!+$Dm!%4XVXMRfV^jkpvgD~Z$F29F+0`5%8Kz>?Nkz?b*ZlY`Fg^% zp1PAUpH!-fS&@uw5cc;PumGEPRo;?CRxZDdcG`Ek^IWDxO+a0NIaX^Oq%o}UMS6gjdX#g77PX#bjP(ci} zW!jFc^T2t^4X?cX0Cw9@P^YLHG?0s4c^H?Yhr{FFXW>9#l;`L|C9)GR31NRPa6&Yp z=2;y}S8oQK2gm#1VBa0cZoz}#Uz`wGrW^cqO#z(NhnkD|gX3+#Cx3(Rn+dy}s}hviyquEjs$d+OK~r8!LOu$47D3{s&0=*v$X{ diff --git a/Skies/AstralSky.cs b/Skies/AstralSky.cs index c919a6f549..7290303387 100644 --- a/Skies/AstralSky.cs +++ b/Skies/AstralSky.cs @@ -6,6 +6,7 @@ using Terraria.GameContent; using Terraria.Graphics.Effects; using Terraria.ID; using Terraria.ModLoader; +using System.Reflection; namespace CalamityMod.Skies { diff --git a/Skies/AstralSkyDesert.cs b/Skies/AstralSkyDesert.cs deleted file mode 100644 index f786d156da..0000000000 --- a/Skies/AstralSkyDesert.cs +++ /dev/null @@ -1,137 +0,0 @@ -using CalamityMod.Systems; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.GameContent; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Skies -{ - public class AstralSkyDesert : CustomSky - { - private bool skyActive; - private float opacity; - - private const float Scale = 2f; - - public override void Deactivate(params object[] args) - { - skyActive = Main.LocalPlayer.Calamity().ZoneAstral && !Main.LocalPlayer.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow; - } - - public override void Reset() - { - skyActive = false; - } - - public override bool IsActive() - { - return skyActive || opacity > 0f; - } - - public override void Activate(Vector2 position, params object[] args) - { - skyActive = true; - } - public override Color OnTileColor(Color inColor) - { - return Color.Lerp(inColor, new Color(63, 51, 90, inColor.A), opacity); - } - - public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) - { - // Small worlds, default draw height. - int AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 2; - - // Medium worlds. - if (Main.maxTilesX >= 6400 && Main.maxTilesX < 8400) - AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 4; - - // Large worlds (and anything bigger). - if (Main.maxTilesX >= 8400) - AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 140; - - // Background from here starting from the back layer to the front layer. - float width = Main.screenWidth / 2f; - float height = Main.screenHeight / 2f; - Color color = new Color(63, 51, 90, 255) * opacity; - if (maxDepth >= 9f && minDepth < 9f) - { - float screenParralaxMultiplier = 0.16f; - Texture2D texture = CalamityMod.AstralSurfaceHorizon; - int x = (int)(Main.screenPosition.X * screenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * screenParralaxMultiplier); - y -= 1380; // 1000 - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - texture.Size() / 2f * Scale, null, color, 0f, new Vector2(0f, (float)AstralBiomeHeight), Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 8f && minDepth < 8f) - { - float screenParralaxMultiplier = 0.4f; - Texture2D texture = CalamityMod.AstralDesertSurfaceFar; - int x = (int)(Main.screenPosition.X * 0.5f * screenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.45f * screenParralaxMultiplier); - y -= 1520; // 1000 - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - texture.Size() / 2f * Scale, null, color, 0f, new Vector2(0f, (float)AstralBiomeHeight), Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 7f && minDepth < 7f) - { - float screenParralaxMultiplier = 0.4f; - Texture2D texture = CalamityMod.AstralDesertSurfaceMiddle; - int x = (int)(Main.screenPosition.X * 0.8f * screenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.5f * screenParralaxMultiplier); - y -= 1900; // 1000 - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - texture.Size() / 2f * Scale, null, color, 0f, new Vector2(0f, (float)AstralBiomeHeight), Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 6f && minDepth < 6f) - { - float screenParralaxMultiplier = 0.4f; - Texture2D texture = CalamityMod.AstralDesertSurfaceClose; - int x = (int)(Main.screenPosition.X * 1f * screenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.55f * screenParralaxMultiplier); - y -= 2050; // 1000 - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - texture.Size() / 2f * Scale, null, color, 0f, new Vector2(0f, (float)AstralBiomeHeight), Scale, SpriteEffects.None, 0f); - } - } - } - - public override void Update(GameTime gameTime) - { - if (!Main.LocalPlayer.Calamity().ZoneAstral || Main.gameMenu) - skyActive = false; - - if (skyActive && opacity < 1f) - opacity += 0.02f; - else if (!skyActive && opacity > 0f) - opacity -= 0.02f; - } - - public override float GetCloudAlpha() - { - return (1f - opacity) * 0.97f + 0.03f; - } - } -} diff --git a/Skies/AstralSkySnow.cs b/Skies/AstralSkySnow.cs deleted file mode 100644 index 277b92f4fd..0000000000 --- a/Skies/AstralSkySnow.cs +++ /dev/null @@ -1,171 +0,0 @@ -using CalamityMod.Systems; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.GameContent; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Skies -{ - public class AstralSkySnow : CustomSky - { - private bool skyActive; - private float opacity; - - private const float Scale = 2.0f; - private const float ScreenParralaxMultiplier = 0.4f; - - public override void Deactivate(params object[] args) - { - skyActive = Main.LocalPlayer.Calamity().ZoneAstral && !Main.LocalPlayer.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && Main.LocalPlayer.ZoneSnow && !Main.LocalPlayer.ZoneDesert; - } - - public override void Reset() - { - skyActive = false; - } - - public override bool IsActive() - { - return skyActive || opacity > 0f; - } - - public override void Activate(Vector2 position, params object[] args) - { - skyActive = true; - } - - public override Color OnTileColor(Color inColor) - { - return Color.Lerp(inColor, new Color(63, 51, 90, inColor.A), opacity); - } - - public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) - { - // Small worlds, default draw height. - int AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 2; - - // Medium worlds. - if (Main.maxTilesX >= 6400 && Main.maxTilesX < 8400) - AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 4; - - // Large worlds (and anything bigger). - if (Main.maxTilesX >= 8400) - AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 140; - - // Background from here starting from the back layer to the front layer. - float width = Main.screenWidth / 2f; - float height = Main.screenHeight / 2f; - Color textureColor = new Color(116, 96, 164, 255) * opacity; - Vector2 origin = new Vector2(0f, AstralBiomeHeight); - if (maxDepth >= 9f && minDepth < 9f) - { - Texture2D texture = CalamityMod.AstralSurfaceHorizon; - int x = (int)(Main.screenPosition.X * 0.4f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.4f * ScreenParralaxMultiplier); - y -= 1380; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 8f && minDepth < 8f) - { - Texture2D texture = CalamityMod.AstralSurfaceFar; - int x = (int)(Main.screenPosition.X * 0.5f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.45f * ScreenParralaxMultiplier); - y -= 1520; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 7f && minDepth < 7f) - { - Texture2D texture = CalamityMod.AstralSnowSurfaceMiddle; - int x = (int)(Main.screenPosition.X * 0.8f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.5f * ScreenParralaxMultiplier); - y -= 1900; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 6f && minDepth < 6f) - { - Texture2D texture = CalamityMod.AstralSurfaceClose; - int x = (int)(Main.screenPosition.X * 0.9f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.55f * ScreenParralaxMultiplier); - y -= 1880; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - - Texture2D textureglow = CalamityMod.AstralSurfaceCloseGlow; - Color textureGlowColor = Color.White * 0.7f * opacity; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(textureglow, pos - position, null, textureGlowColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 5f && minDepth < 5f) - { - Texture2D texture = CalamityMod.AstralSurfaceFront; - int x = (int)(Main.screenPosition.X * 1.1f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.6f * ScreenParralaxMultiplier); - y -= 2100; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - - Texture2D textureglow = CalamityMod.AstralSurfaceFrontGlow; - Color textureGlowColor = Color.White * 0.9f * opacity; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(textureglow, pos - position, null, textureGlowColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - } - - public override void Update(GameTime gameTime) - { - if (!Main.LocalPlayer.Calamity().ZoneAstral || Main.gameMenu) - skyActive = false; - - if (skyActive && opacity < 1f) - opacity += 0.02f; - else if (!skyActive && opacity > 0f) - opacity -= 0.02f; - } - - public override float GetCloudAlpha() - { - return (1f - opacity) * 0.97f + 0.03f; - } - } -} diff --git a/Skies/AstralSkySurface.cs b/Skies/AstralSkySurface.cs deleted file mode 100644 index b4eead4ca8..0000000000 --- a/Skies/AstralSkySurface.cs +++ /dev/null @@ -1,179 +0,0 @@ -using CalamityMod.Systems; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.GameContent; -using Terraria.Graphics.Effects; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Skies -{ - public class AstralSkySurface : CustomSky - { - private bool skyActive; - private float opacity; - - private const float Scale = 2f; - private const float ScreenParralaxMultiplier = 0.4f; - - public override void Deactivate(params object[] args) - { - skyActive = Main.LocalPlayer.Calamity().ZoneAstral && !Main.LocalPlayer.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && !Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow; - } - - public override void Reset() - { - skyActive = false; - } - - public override bool IsActive() - { - return skyActive || opacity > 0f; - } - - public override void Activate(Vector2 position, params object[] args) - { - skyActive = true; - } - - public override Color OnTileColor(Color inColor) - { - return Color.Lerp(inColor, new Color(63, 51, 90, inColor.A), opacity); - } - - public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) - { - // Small worlds, default draw height. - int AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 2; - - // Medium worlds. - if (Main.maxTilesX >= 6400 && Main.maxTilesX < 8400) - AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 4; - - // Large worlds (and anything bigger). - if (Main.maxTilesX >= 8400) - AstralBiomeHeight = (World.AstralBiome.YStart + (int)Main.worldSurface) / 140; - - // Background from here starting from the back layer to the front layer. - float width = Main.screenWidth / 2f; - float height = Main.screenHeight / 2f; - Color textureColor = new Color(63, 51, 90, 255) * opacity; - Vector2 origin = new Vector2(0f, AstralBiomeHeight); - if (maxDepth >= 9f && minDepth < 9f) - { - Texture2D texture = CalamityMod.AstralSurfaceHorizon; - int x = (int)(Main.screenPosition.X * 0.4f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.4f * ScreenParralaxMultiplier); - y -= 1380; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 8f && minDepth < 8f) - { - Texture2D texture = CalamityMod.AstralSurfaceFar; - int x = (int)(Main.screenPosition.X * 0.5f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.45f * ScreenParralaxMultiplier); - y -= 1520; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 7f && minDepth < 7f) - { - Texture2D texture = CalamityMod.AstralSurfaceMiddle; - int x = (int)(Main.screenPosition.X * 0.8f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.5f * ScreenParralaxMultiplier); - y -= 1900; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - - Texture2D textureglow = CalamityMod.AstralSurfaceMiddleGlow; - Color textureGlowColor = Color.White * 0.5f * opacity; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(textureglow, pos - position, null, textureGlowColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 6f && minDepth < 6f) - { - Texture2D texture = CalamityMod.AstralSurfaceClose; - int x = (int)(Main.screenPosition.X * 0.9f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.55f * ScreenParralaxMultiplier); - y -= 1880; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - - Texture2D textureglow = CalamityMod.AstralSurfaceCloseGlow; - Color textureGlowColor = Color.White * 0.7f * opacity; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(textureglow, pos - position, null, textureGlowColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - - if (maxDepth >= 5f && minDepth < 5f) - { - Texture2D texture = CalamityMod.AstralSurfaceFront; - int x = (int)(Main.screenPosition.X * 1.1f * ScreenParralaxMultiplier); - x %= (int)(texture.Width * Scale); - int y = (int)(Main.screenPosition.Y * 0.6f * ScreenParralaxMultiplier); - y -= 2100; // 1000 - Vector2 position = texture.Size() / 2f * Scale; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(texture, pos - position, null, textureColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - - Texture2D textureglow = CalamityMod.AstralSurfaceFrontGlow; - Color textureGlowColor = Color.White * 0.9f * opacity; - for (int k = -1; k <= 1; k++) - { - var pos = new Vector2(width - x + texture.Width * k * Scale, height - y); - spriteBatch.Draw(textureglow, pos - position, null, textureGlowColor, 0f, origin, Scale, SpriteEffects.None, 0f); - } - } - } - - public override void Update(GameTime gameTime) - { - if (!Main.LocalPlayer.Calamity().ZoneAstral || Main.gameMenu) - skyActive = false; - - if (skyActive && opacity < 1f) - opacity += 0.02f; - else if (!skyActive && opacity > 0f) - opacity -= 0.02f; - } - - public override float GetCloudAlpha() - { - return (1f - opacity) * 0.97f + 0.03f; - } - } -} diff --git a/Skies/AstralSnowSurfaceMiddle.png b/Skies/AstralSnowSurfaceMiddle.png deleted file mode 100644 index ff4e5fc23638fa5d22d98210ce60007c18f9f218..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8694 zcmeHMc{r5q{(r_;vX*2>q0}*oGKv(klu0^SN`(~DkX?yHm^1}#7*dbYET{T{2Vq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N^znvN42Iq@}RFszJgcaBNVTB3i- z15lYxtB@`$)nruniz_qtdu0bRHC*>=M0Qtk(`hs_VRhOzLFsl?tjb6y!#TLNrrL$S zA#gA%HJ!F3DT|^$?!xlc%_hzjv>ehB?-V}Wa&e^(sfpBk zQv3)6JzPU@c{ju_?UVis6ex5~PE&nnD+lXs{Tb^8bPU072TNU3VdvFETxBhOA`}e9 zz@b1Le-whn#oA0-R;(1#1DvMHDAQs#s=*ISE(qaCg)|^&tR1VkSj==k%V=2R&nnfS-@RUWFWgw`$ek)C?-^z_5(AW@nXD|S31?7cDY0{lV&Dvi-s!4suS2%c_K z_Et$i5TxhFKI|Ot%z*)T`M-Xu-DT3#vho16-|S_P#;cv~EYK&A-yI44;$!6@p*v%kC3LCS-c~}mX3g6?g6;yFR#&CYCk5P5I!Il%9fCH z<2Hb45Cqv8Kr>?cA>;j2iPFl6T9cgvr#emNE^GyD=x0o(f?)lzhC0-?Edc7|HJMdKJtp)pHKfkF7bEw`-|8A-tIqf z)j?X3e_P9cxgS_ae+NoCNKO8^jkNGTte*eOO@gu1)Bnsy`Y;C4&A+#ESSj{*Z{`1U z)ktgn|4Y?KEAk(5v1q;d<_OGyDMGuFV|hEl@*`=-QNi-_A73#6m?iR{+B&r<@jHJ f|MOv2ZdJSL$Ljl2mVHhg(lUpgU7boD{jdEu)Q6*B diff --git a/Skies/AstralSurfaceFar.png b/Skies/AstralSurfaceFar.png deleted file mode 100644 index de6901e9e46893bdc9ad1a1a1f22c3acb563047d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13320 zcmch8XIK+k_wP4;;ksh&77PF%iS-Y00DVdk0NvL%7G|fzzAR02r}*{; z-T7K8D5k*a5d1-E0{ZJ@IU=`{ES;g;C)CEnmH+MAvyAj}t=GES#eI@=y8idcd5F2y zT}^12mW4JxlOkmP`=kQ@5juv#qO|`@I4T7dA%Ot#zr5-rG?E~Q1OFA~+D<9rY!grP z_ZIxE;Fc6Y9{6Z@f26)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f0WYS-&V?=i8nCNHg^0%g93204`hZ2=%S$mzSch;L73+*2Z>5$xKVlje2O zO`$uyk}~*K05JNSUE*H@0MM@OowNTD!JaMtHGS{wb!RXbCz$~v0l-SsS5^T?&jjh2 zaVh}Fh5%Yq*v{1gRsety!szw2Wv;!Y3IOdbfNG!q3;LkZytk(YX<(rx zc9s&Ej^clmt@M`tYXy3y_(x~|tIGeY#D7$;(Fpt2_1^`tMzzYmcoQP%72_BdIn{^wawSfSD5Wsv~yj0F&E}?bG)LaOj z{uL|n>(UFQ6)ecI|J?upo&84v0IT>%?*k%RAMt#k2w*T6Uz`G@5$0Y1APIX!)j$UT z;Hd)e0)Xr)fM_dU#7m$n067l z7Q?TX^3I;so^t#htpKCv1QGyP;eNF^KN$i%_n-GF0sxe6TR8ym8pyFV0AoObXf3c- zWAJ;jo03%nfRnTTJG1wm(L~Yjimv($2BS*}>enj)-akjS0(1cY8VKN7XGDehZLI*a zbM5^Zcn|wdTUBSnKNtY;^pR6ot~1@<_6yB+d7N`g|8Efg71{sjm?G2yA}j09>x02y zbaJQuviSckrnRr@1OX5LIwJl@&+}6NK$j{2Rszu5jR3&-&><|KZ^DTnpsV=rmi^Z} zoGZk?v`x?VnQ45*YmLF+qSM;n|78I1Bcu`Aun2o}1ps1gf!Iz|_}>fxo?~>S&%pZ_ dCkAwj{{v=Ih>$11a%BJj002ovPDHLkV1jto2VDRF diff --git a/Skies/AstralSurfaceHorizon.png b/Skies/AstralSurfaceHorizon.png deleted file mode 100644 index 8f448fb3b4bef90c3edb3ceb77d9537a20d8fcc6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3772 zcmeHIe^gV~9lwDf6y#Ss@CUys-Dyj0flLEM$*3Tr!ynbPrL}dE@&l=W8xU7dWx<$-#3n#MkOw9q$$Psm?KW3AYIcri{bTpM zci(-V_x*mppZmG@CcoLVAnz>@^UpPVHdROp7tFiT0OeUNS+QGVk8;S9YRNjU< zZKb)+dfWTho9%BU&}i#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B$NL!0O0wG6zYJb{pgl4#VSH~@EDc%vaBKSR3{|#JC#~q|I5$u3l z04qs5z&?kBFe(djtpy~I8{`)ot@fdOf7w@<1}m#^M%>>_l40SSt-E|p))`wGq^yB| zS#1Eim~AV&o=4Y5ErRLvCUp$_5`jY@#_#bkCIMO15tf1oY_ZLcB3_rgI)1Da0qU&k zyTt&d=jG_jyBy;*;!iyI2tX+NfL|JaHFsn8v-Dy=RO+vhlPQ63si1$k=0^%QsBAn* zV@eUkpF_`^-7h9!ecm@#8>J<(n#96uweHNUM9l0?DHR+fKXK?-|Da#V?7bc?;F=?m zd+gHTT%f&>CDoJ%e01G#*4zkCOh0Ucqi&0`UF!GODfK=(AVi1&eO@VFCgM|~OAqrd zl7LS%0Q8>pGd9f)D`Q=0ydV`bs{&8wo0W|Cqi%0~TMxI2Pi05;$z9km*E*s?1#Mj- zRl3E6M^qJ|yo&(TMKtvv>YG}Upl>p$XDr$Z)58)YYWl=2#=wKn4ENIL2*=6K7SPPb z;bmDM7nks|0+%KjmWK-Dz`nk~_kpjc3RpZiJ_zZ0z;F1448^+$c2bV8CPM(sn_;nq zZ{RXKc!QM(05okIQ From 43df7aabfadec51c0fe70d6283bebe89a7c352b3 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 13 May 2024 15:21:38 -0700 Subject: [PATCH 148/197] NER rarity fix --- Items/Weapons/Ranged/NitroExpressRifle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Ranged/NitroExpressRifle.cs b/Items/Weapons/Ranged/NitroExpressRifle.cs index fcaa47df0d..8964b33364 100644 --- a/Items/Weapons/Ranged/NitroExpressRifle.cs +++ b/Items/Weapons/Ranged/NitroExpressRifle.cs @@ -29,13 +29,13 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; - Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.UseSound = FireSound; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Bullet; - Item.rare = ModContent.RarityType(); + Item.rare = ItemRarityID.LightRed; Item.Calamity().canFirePointBlankShots = true; } From c3f416ce6fcca2cef9679fca59f120a1dfdcb7f1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 19:00:35 -0400 Subject: [PATCH 149/197] Fixed the Stealth Meter having a delay between appearing full and being full --- UI/MiscTextures/StealthMeterBar.png | Bin 244 -> 210 bytes UI/MiscTextures/StealthMeterBarFull.png | Bin 246 -> 228 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/UI/MiscTextures/StealthMeterBar.png b/UI/MiscTextures/StealthMeterBar.png index 36d0552574689f73d2d5a1a46fa32b157f3e6576..64a040088cd7e0627de21947fa741a23e2dea551 100644 GIT binary patch delta 188 zcmeyuc!^Q5Gr-TCmrII^fq{Y7)59eQNUH#`6bBoSykGFob)up|J!gSOWHAE+-(e7D zJf6QI1t^*B>EamT;hikOx;R0krzy~Y%k7{6dr!cug@-Dh)oTdrPk0pAvZ;gl{JuNw zn?5x6ZGM@s-Jr3unZv+u(|uMx$$D+Y4GfA0(zW?g1=;On>o`*%vP<{xWxm|3*Wz|i h17vIhBQrC@9Cso9iPz>eo&eg(;OXk;vd$@?2>{OGJn#Sj delta 222 zcmcb__=QoiGr-TCmrII^fq{Y7)59eQNSgq$6bBoS{Bf^-?LIW82|tP diff --git a/UI/MiscTextures/StealthMeterBarFull.png b/UI/MiscTextures/StealthMeterBarFull.png index 86048fd0978b4a01df37bef3df1be2bc0eeb9274..92f0fe7dc6983ba622ff38283585f3df6c3c0421 100644 GIT binary patch delta 152 zcmeyy_=HihGr-TCmrII^fq{Y7)59eQNUH#`6bBoSykGFob)urFRHdhjV~B@$vIOhm z1d*PmKm#tfg9hw90kalPELRC&E#nrRVcx;;_}7xX4<c z%5t7lO-)}92C!*0w7yxuy%4NjLn7k90S1P`mm*j0ol2?%TE^h%>gTe~DWM4frg$^B delta 170 zcmaFD_>EDqGr-TCmrII^fq{Y7)59eQNSgq$6bBoS{Bf^-?LM zVNDfe|F_4QE!FYhuLKQd(E~|l1@nyK%=vdqNWsly<1;W|V0fM<#{T@5T@TQD22WQ% Jmvv4FO#p76Gu{9I From 3c881ac6b634e56fb2349e05bd43ed87f3771e23 Mon Sep 17 00:00:00 2001 From: apotofkoolaid <72956636+apotofkoolaid@users.noreply.github.com> Date: Mon, 13 May 2024 19:13:02 -0500 Subject: [PATCH 150/197] Once again fixed Sandstorm music playing in Astral Deserts This issue cropped up again from the Astral's code overhaul --- BiomeManagers/AstralInfectionBiome.cs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/BiomeManagers/AstralInfectionBiome.cs b/BiomeManagers/AstralInfectionBiome.cs index 264845baae..980d34e0da 100644 --- a/BiomeManagers/AstralInfectionBiome.cs +++ b/BiomeManagers/AstralInfectionBiome.cs @@ -1,7 +1,7 @@ using CalamityMod.Items.Placeables.Furniture; using CalamityMod.Systems; using Terraria; -using Terraria.Graphics.Effects; +using Terraria.GameContent.Events; using Terraria.ID; using Terraria.ModLoader; @@ -10,6 +10,7 @@ namespace CalamityMod.BiomeManagers public class AstralInfectionBiome : ModBiome { public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater"); + public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle { get @@ -42,11 +43,28 @@ namespace CalamityMod.BiomeManagers } public override int BiomeTorchItemType => ModContent.ItemType(); - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override SceneEffectPriority Priority + { + get + { + if (Main.LocalPlayer.ZoneDesert && Sandstorm.Happening && !(Main.LocalPlayer.ZoneSnow || Main.slimeRain || Main.eclipse)) + { + return SceneEffectPriority.Environment; + } + else + { + return SceneEffectPriority.BiomeHigh; + } + } + } + public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon"; + public override string BackgroundPath { - get { + get + { if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow) { //desert From f094139bd9fb42b8d9adb6288146a7a8f5bd2c61 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 13 May 2024 19:01:52 -0600 Subject: [PATCH 151/197] Slick Cane tier shift + tweaks $$$ --- Items/Weapons/Rogue/SlickCane.cs | 14 +++---- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 3 +- NPCs/CalamityGlobalTownNPC.cs | 9 +++++ NPCs/TownNPCs/THIEF.cs | 2 +- Projectiles/Rogue/SlickCaneProjectile.cs | 37 +++++++++++++++++-- 5 files changed, 53 insertions(+), 12 deletions(-) diff --git a/Items/Weapons/Rogue/SlickCane.cs b/Items/Weapons/Rogue/SlickCane.cs index 09d437d088..22ee59fe16 100644 --- a/Items/Weapons/Rogue/SlickCane.cs +++ b/Items/Weapons/Rogue/SlickCane.cs @@ -19,14 +19,14 @@ namespace CalamityMod.Items.Weapons.Rogue Item.channel = true; Item.useAnimation = 26; Item.useTime = 26; - Item.useStyle = ItemUseStyleID.Swing; - Item.knockBack = 5f; + Item.useStyle = ItemUseStyleID.Shoot; + Item.knockBack = 6f; Item.UseSound = SoundID.DD2_GhastlyGlaivePierce; Item.autoReuse = true; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; + Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 22f; + Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; } @@ -34,8 +34,8 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float ai0 = Main.rand.NextFloat() * Item.shootSpeed * 0.75f * (float)player.direction; - int projectileIndex = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, ai0, 0f); + float ai0 = Main.rand.NextFloat() * Item.shootSpeed * 1.5f * (float)player.direction; + int projectileIndex = Projectile.NewProjectile(source, position.X, position.Y+100, velocity.X*2f, velocity.Y*2f, type, damage, knockback, player.whoAmI, ai0, 0f); if (projectileIndex.WithinBounds(Main.maxProjectiles)) Main.projectile[projectileIndex].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index d92ae3dc73..abd9755e31 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -1084,7 +1084,8 @@ SlickCane: { Tooltip: ''' Swipes a cane that steals money from enemies - Stealth strikes gives a 1 in 15 chance for enemies to drop 1-3 gold coins when hit + Stealth strikes gives a 1 in 20 chance for enemies to drop 1-3 gold coins when hit + Stealth strikes' damage increases in proportion to money in the inventory (up to 2 platinum) 'Economy at its finest' ''' } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 7800b4b05b..bd3ec4b36b 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -17,6 +17,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.TownNPCs; +using CalamityMod.Projectiles.Rogue; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -1064,6 +1065,14 @@ namespace CalamityMod.NPCs defense += 20; } } + + public override bool? CanBeHitByProjectile(NPC npc, Projectile projectile) + { + //Not an axe but close enough + if (npc.type == NPCID.TaxCollector && projectile.type == ModContent.ProjectileType()) + return true; + return base.CanBeHitByProjectile(npc, projectile); + } #endregion #region Shop Stuff diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index ca0b761bf9..6fa9b34140 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -282,7 +282,7 @@ namespace CalamityMod.NPCs.TownNPCs .Add(ItemID.TigerClimbingGear) .AddWithCustomValue(ItemID.InvisibilityPotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) .AddWithCustomValue(ItemID.NightOwlPotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 25), Condition.Hardmode) + .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 25)) .Add(ModContent.ItemType(), Condition.DownedPirates) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 60), Condition.DownedMechBossAll) .Add(ModContent.ItemType(), downedCalclone) diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs index 4c1acff6de..6c7d751b4d 100644 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ b/Projectiles/Rogue/SlickCaneProjectile.cs @@ -1,9 +1,13 @@ using System; +using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -21,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.width = 42; Projectile.height = 36; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.timeLeft = 90; + Projectile.timeLeft = 120; Projectile.friendly = true; Projectile.hostile = false; Projectile.tileCollide = false; @@ -32,6 +36,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 2; Projectile.alpha = 180; + Projectile.scale = 1.25f; } public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; public override float TravelSpeed => 8f; @@ -80,11 +85,13 @@ namespace CalamityMod.Projectiles.Rogue float moneyValueToDrop = target.value / Main.rand.NextFloat(15f, 35f); // Maximum of 50 silver, not counting steath strikes moneyValueToDrop = (int)MathHelper.Clamp(moneyValueToDrop, 0, 5000f); - if (Projectile.Calamity().stealthStrike && Main.rand.NextBool(15)) + if (Projectile.Calamity().stealthStrike && Main.rand.NextBool(20)) { moneyValueToDrop += Item.buyPrice(0, Main.rand.Next(1, 4), Main.rand.Next(0, 100), Main.rand.Next(0, 100)); + SoundEngine.PlaySound(TheSevensStriker.TriplesSound, Projectile.Center); } - + else if (moneyValueToDrop > 0f) + SoundEngine.PlaySound(TheSevensStriker.DoublesSound, Projectile.Center); while (moneyValueToDrop > 10000f) { int modifiedMoneyValue = (int)(moneyValueToDrop / 10000f); @@ -133,5 +140,29 @@ namespace CalamityMod.Projectiles.Rogue } } } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + // Boost dmg in proportion to money, caps at 2 plat + if (Projectile.Calamity().stealthStrike) + { + Player player = Main.player[Projectile.owner]; + long money = Utils.CoinsCount(out bool overflow, player.inventory); + if (money >= 2000000) + money = 2000000; + if (money != 0) + { + modifiers.SourceDamage *= money / 500000 + 1; + SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center); + for (int j = 0; j < 8; j++) + { + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); + Main.dust[dust2].noGravity = true; + Main.dust[dust2].velocity *= 5f; + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); + Main.dust[dust2].velocity *= 2f; + } + } + } + } } } From 471d640379d432ecf7aaff3fd8ebabd4610bb2f8 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 13 May 2024 19:23:50 -0600 Subject: [PATCH 152/197] double the money (calculation) --- Projectiles/Rogue/SlickCaneProjectile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs index 6c7d751b4d..5e325c56e6 100644 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ b/Projectiles/Rogue/SlickCaneProjectile.cs @@ -146,12 +146,12 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) { Player player = Main.player[Projectile.owner]; - long money = Utils.CoinsCount(out bool overflow, player.inventory); + double money = Utils.CoinsCount(out bool overflow, player.inventory); if (money >= 2000000) money = 2000000; if (money != 0) { - modifiers.SourceDamage *= money / 500000 + 1; + modifiers.SourceDamage *= (float)(money / 500000 + 1); SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center); for (int j = 0; j < 8; j++) { From 794cb9684775e636856a37c3c007ff577e43a6eb Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Mon, 13 May 2024 18:59:05 -0700 Subject: [PATCH 153/197] blood particles go rainbow with blood off --- Particles/BloodParticle.cs | 6 ++++++ Particles/BloodParticle2.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Particles/BloodParticle.cs b/Particles/BloodParticle.cs index 9bb8333486..bfe3e02e8f 100644 --- a/Particles/BloodParticle.cs +++ b/Particles/BloodParticle.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ModLoader; namespace CalamityMod.Particles @@ -31,6 +32,11 @@ namespace CalamityMod.Particles Velocity.Y = MathHelper.Clamp(Velocity.Y + 0.9f, -22f, 22f); Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); Rotation = Velocity.ToRotation() + MathHelper.PiOver2; + // Cycle through disco colors if blood and gore is off + if (!ChildSafety.Disabled) + { + Color = Main.DiscoColor; + } } public override void CustomDraw(SpriteBatch spriteBatch) diff --git a/Particles/BloodParticle2.cs b/Particles/BloodParticle2.cs index ee8b9bf707..53320c9c1b 100644 --- a/Particles/BloodParticle2.cs +++ b/Particles/BloodParticle2.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ModLoader; namespace CalamityMod.Particles @@ -29,6 +30,11 @@ namespace CalamityMod.Particles Velocity *= 0.98f; Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 4D)); Rotation = Velocity.ToRotation(); + // Cycle through disco colors if blood and gore is off + if (!ChildSafety.Disabled) + { + Color = Main.DiscoColor; + } } public override void CustomDraw(SpriteBatch spriteBatch) From 7cfb8734556258121fa46ba9efbd356c148d68a2 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 20:59:16 -0500 Subject: [PATCH 154/197] Fixed Deerclops Ice Spike hitboxes. --- Projectiles/CalamityGlobalProjectile.cs | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 5ac6a49d8b..702bd1e219 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4434,6 +4434,40 @@ namespace CalamityMod.Projectiles #endregion + if (projectile.type == ProjectileID.DeerclopsIceSpike && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) + { + bool masterMode = Main.masterMode || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; + + Texture2D texture = TextureAssets.Projectile[projectile.type].Value; + Rectangle value26 = texture.Frame(1, 5, 0, projectile.frame); + Vector2 origin12 = new Vector2(16f, value26.Height / 2); + Color alpha5 = projectile.GetAlpha(lightColor); + Vector2 vector39 = new Vector2(projectile.scale); + float fadeOutGateValue = masterMode ? 80f : death ? 50f : 10f; + float killGateValue = masterMode ? 90f : death ? 60f : 20f; + float lerpValue5 = Utils.GetLerpValue(killGateValue, killGateValue - 10f, projectile.ai[0], clamped: true); + vector39.Y *= lerpValue5; + Vector4 vector40 = lightColor.ToVector4(); + Vector4 vector41 = new Color(67, 17, 17).ToVector4(); + vector41 *= vector40; + + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(TextureAssets.Extra[98].Value, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY) - projectile.velocity * projectile.scale * 0.5f, null, projectile.GetAlpha(new Color(vector41.X, vector41.Y, vector41.Z, vector41.W)), projectile.rotation + MathHelper.PiOver2, TextureAssets.Extra[98].Value.Size() / 2f, projectile.scale * 0.9f, spriteEffects); + Color color49 = projectile.GetAlpha(Color.White) * Utils.Remap(projectile.ai[0], 0f, killGateValue, 0.5f, 0f); + color49.A = 0; + + for (int i = 0; i < 4; i++) + Main.EntitySpriteDraw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY) + projectile.rotation.ToRotationVector2().RotatedBy(MathHelper.PiOver2 * (float)i) * 2f * vector39, value26, color49, projectile.rotation, origin12, vector39, spriteEffects); + + Main.EntitySpriteDraw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), value26, alpha5, projectile.rotation, origin12, vector39, spriteEffects); + + return false; + } + if (projectile.type == ProjectileID.DemonSickle) { if (Main.wofNPCIndex < 0 || !Main.npc[Main.wofNPCIndex].active || Main.npc[Main.wofNPCIndex].life <= 0 || projectile.tileCollide) From bb77d53b0ca0f9bb648ccf3954dd7b24e06118bb Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 13 May 2024 22:11:02 -0400 Subject: [PATCH 155/197] Fix numerous compilation errors caused by botched entity iterator merge. --- CalPlayer/CalamityPlayerOnHit.cs | 2 +- CalPlayer/DrawLayers/AndromedaMechLayer.cs | 2 +- Graphics/Metaballs/GruesomeMetaball.cs | 8 ++++++-- Items/Potions/TeslaPotion.cs | 3 +-- .../en-US/Mods.CalamityMod.Condition.hjson | 2 +- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 2 +- NPCs/PlagueEnemies/PlaguebringerMiniboss.cs | 1 - .../RegularEnemies/RevengeanceAndDeathAI.cs | 8 ++++---- Projectiles/CalamityGlobalProjectile.cs | 2 +- Projectiles/Summon/EndoIceShard.cs | 2 +- Utilities/ProjectileUtils.cs | 20 ++++--------------- 11 files changed, 21 insertions(+), 31 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 1272e6e3f9..2b07be737a 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1463,7 +1463,7 @@ namespace CalamityMod.CalPlayer if (playerDist < BalancingConstants.LifeStealRange && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck) { lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife; - healTarget = i; + healTarget = otherPlayer.whoAmI; } } } diff --git a/CalPlayer/DrawLayers/AndromedaMechLayer.cs b/CalPlayer/DrawLayers/AndromedaMechLayer.cs index e15b7c80df..cbf5c7c409 100644 --- a/CalPlayer/DrawLayers/AndromedaMechLayer.cs +++ b/CalPlayer/DrawLayers/AndromedaMechLayer.cs @@ -38,7 +38,7 @@ namespace CalamityMod.CalPlayer.DrawLayers { if (p.type == andromedaMechID && p.owner == drawPlayer.whoAmI) { - robot = i; + robot = p.whoAmI; break; } } diff --git a/Graphics/Metaballs/GruesomeMetaball.cs b/Graphics/Metaballs/GruesomeMetaball.cs index f1d273a344..3a67d24c7c 100644 --- a/Graphics/Metaballs/GruesomeMetaball.cs +++ b/Graphics/Metaballs/GruesomeMetaball.cs @@ -136,8 +136,12 @@ namespace CalamityMod.Graphics.Metaballs } // Draw gruesome eminence ghost heads. - foreach (Projectile eminence in CalamityUtils.AllProjectilesByID(ModContent.ProjectileType())) - eminence.ModProjectile().DrawHeadForMetaball(); + int eminenceType = ModContent.ProjectileType(); + foreach (Projectile p in Main.ActiveProjectiles) + { + if (p.type == eminenceType) + p.ModProjectile().DrawHeadForMetaball(); + } } } } diff --git a/Items/Potions/TeslaPotion.cs b/Items/Potions/TeslaPotion.cs index c2d8e0142b..1fa1a540b3 100644 --- a/Items/Potions/TeslaPotion.cs +++ b/Items/Potions/TeslaPotion.cs @@ -38,7 +38,6 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - Condition evil2Dead = new(CalamityUtils.GetText("Condition.DownedEvil2Boss"), () => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator); CreateRecipe(5). AddIngredient(ItemID.BottledWater). AddIngredient(2). @@ -46,7 +45,7 @@ namespace CalamityMod.Items.Potions AddIngredient(). AddIngredient(). AddTile(TileID.Bottles). - AddDecraftCondition(evil2Dead). + AddDecraftCondition(CalamityConditions.DownedHiveMindOrPerforator). Register(); CreateRecipe(). diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index 6dbe1feb52..844e15ed3e 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -5,7 +5,7 @@ Drops: { DownedCrab: After defeating Crabulon DownedHM: After defeating the Hive Mind DownedPerfs: After defeating the Perforators - DownedHMOrPerfs: After defeating the Hive Mind or the Perforators + DownedHMOrPerfs: After defeating the Hive Mind or the Perforators DownedSG: After defeating the Slime God DownedCryo: After defeating Cryogen DownedAS: After defeating the Aquatic Scourge diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 087418c40c..76c6275344 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -290,7 +290,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float distance = Vector2.Distance(playerCenter, NPC.Center); if (distance < maxDistance) { - whoAmIArray[numProjectiles] = i; + whoAmIArray[numProjectiles] = plr.whoAmI; targetCenterArray[numProjectiles] = playerCenter; int projectileLimit = numProjectiles + 1; numProjectiles = projectileLimit; diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index 97213f3c1d..d8abae06ac 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -92,7 +92,6 @@ namespace CalamityMod.NPCs.PlagueEnemies { if (NPC.timeLeft < 750) NPC.timeLeft = 750; - } } int playerAmt = Main.CurrentFrameFlags.ActivePlayersCount; diff --git a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs index 218a4643c2..b8d7686a30 100644 --- a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs +++ b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs @@ -2186,7 +2186,7 @@ PrepareToShoot: } foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) + if (n.whoAmI != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { if (npc.position.X < n.position.X) { @@ -2262,7 +2262,7 @@ PrepareToShoot: } foreach (NPC n in Main.ActiveNPCs) { - if (i != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) + if (n.whoAmI != npc.whoAmI && n.type == npcType && Math.Abs(npc.position.X - n.position.X) + Math.Abs(npc.position.Y - n.position.Y) < (float)npc.width) { if (npc.position.X < n.position.X) { @@ -10706,7 +10706,7 @@ PrepareToShoot: foreach (NPC n in Main.ActiveNPCs) { - if (i == npc.whoAmI || n.type != npc.type) + if (n.whoAmI == npc.whoAmI || n.type != npc.type) continue; Vector2 targetDirection = n.Center - npc.Center; @@ -10716,7 +10716,7 @@ PrepareToShoot: targetDirection.Normalize(); if (targetDirection.X == 0f && targetDirection.Y == 0f) { - if (i > npc.whoAmI) + if (n.whoAmI > npc.whoAmI) targetDirection.X = 1f; else targetDirection.X = -1f; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index f48741ddd9..83f8b28779 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4898,7 +4898,7 @@ namespace CalamityMod.Projectiles if (playerDist < distanceRequired && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck) { lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife; - healTarget = i; + healTarget = otherPlayer.whoAmI; } } } diff --git a/Projectiles/Summon/EndoIceShard.cs b/Projectiles/Summon/EndoIceShard.cs index 117e8183ef..9d87d5f665 100644 --- a/Projectiles/Summon/EndoIceShard.cs +++ b/Projectiles/Summon/EndoIceShard.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Summon float dist = (Projectile.Center - npc.Center).Length(); if (dist < maxHomingRange) { - targetIdx = i; + targetIdx = npc.whoAmI; maxHomingRange = dist; hasHomingTarget = true; } diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index ff127a3de6..8d3a596706 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -33,18 +33,6 @@ namespace CalamityMod return false; } - public static IEnumerable AllProjectilesByID(int projectileID) - { - // This uses the same efficient loop idea as AnyProjectiles. - foreach (Projectile p in Main.ActiveProjectiles) - { - if (p.type != projectileID) - continue; - - yield return p; - } - } - public static int CountProjectiles(int projectileID) => Main.projectile.Count(proj => proj.type == projectileID && proj.active); public static int CountHookProj() => Main.projectile.Count(proj => Main.projHook[proj.type] && proj.ai[0] == 2f && proj.active && proj.owner == Main.myPlayer); @@ -107,17 +95,17 @@ namespace CalamityMod // Find the closest target. float npcDistCompare = 25000f; // Initializing the value to a large number so the first entry is basically guaranteed to replace it. int index = -1; - for (int i = 0; i < Main.maxNPCs; i++) + foreach (NPC n in Main.ActiveNPCs) { float extraDistance = (n.width / 2) + (n.height / 2); if (!n.CanBeChasedBy(projectile, false) || !projectile.WithinRange(n.Center, maxDistance + extraDistance)) continue; - float currentNPCDist = Vector2.Distance(Main.npc[i].Center, projectile.Center); - if ((currentNPCDist < npcDistCompare) && (ignoreTiles || Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].Center, 1, 1))) + float currentNPCDist = Vector2.Distance(n.Center, projectile.Center); + if ((currentNPCDist < npcDistCompare) && (ignoreTiles || Collision.CanHit(projectile.Center, 1, 1, n.Center, 1, 1))) { npcDistCompare = currentNPCDist; - index = i; + index = n.whoAmI; } } // If the index was never changed, don't do anything. Otherwise, tell the projectile where to home. From 0194155459e59ad6ef806e85a91bfb92a761ee83 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 22:15:33 -0400 Subject: [PATCH 156/197] Hailstorm Bullet nerf --- Projectiles/Ranged/HailstormBulletProj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Ranged/HailstormBulletProj.cs b/Projectiles/Ranged/HailstormBulletProj.cs index 29712945f8..66721fffd5 100644 --- a/Projectiles/Ranged/HailstormBulletProj.cs +++ b/Projectiles/Ranged/HailstormBulletProj.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Ranged WaterFlavoredParticle subTrail = new WaterFlavoredParticle(Projectile.Center + velocity * 4.5f + addedPlacement, velocity * 7, false, 6, 0.65f, Color.SkyBlue); GeneralParticleHandler.SpawnParticle(subTrail); } - int onHitDamage = Owner.CalcIntDamage(0.48f * Projectile.damage); + int onHitDamage = Owner.CalcIntDamage(0.36f * Projectile.damage); Owner.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false); } } From 9a333cbf6de8cd606d72a5a699ec617b44cadb1a Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 May 2024 21:49:12 -0500 Subject: [PATCH 157/197] Mythril Halberd fix. --- CalPlayer/CalamityPlayerOnHit.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 1272e6e3f9..8f0d5bfb5f 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -98,8 +98,13 @@ namespace CalamityMod.CalPlayer break; case ItemID.MythrilSword: - target.damage = (int)(target.defDamage * 0.9); - target.Calamity().isNerfedByMythril = true; + + if (target.damage > 0) + { + target.damage = (int)(target.defDamage * 0.9); + target.Calamity().isNerfedByMythril = true; + } + break; case ItemID.OrichalcumSword: @@ -232,8 +237,13 @@ namespace CalamityMod.CalPlayer break; case ProjectileID.MythrilHalberd: - target.damage = (int)(target.defDamage * 0.9); - target.Calamity().isNerfedByMythril = true; + + if (target.damage > 0) + { + target.damage = (int)(target.defDamage * 0.9); + target.Calamity().isNerfedByMythril = true; + } + break; case ProjectileID.OrichalcumHalberd: From ca03ac7db8fb5b29dc56b2e042b53b13fcc1df68 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 May 2024 23:16:16 -0400 Subject: [PATCH 158/197] Changed how Cobalt and Mythril weapon effects are handled * Both effects are now temporary, handled by timers. They last 10 seconds. * This also fixes Mythril weapons making enemies deal contact damage for 1 frame. --- CalPlayer/CalamityPlayerOnHit.cs | 22 ++++----------------- NPCs/CalamityGlobalNPC.cs | 33 ++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index d5029445c1..42a6b1c2af 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -87,8 +87,7 @@ namespace CalamityMod.CalPlayer switch (item.type) { case ItemID.CobaltSword: - target.Calamity().miscDefenseLoss = (int)(target.defense * 0.25); - target.Calamity().isNerfedByCobalt = true; + target.Calamity().cobaltNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime; break; case ItemID.PalladiumSword: @@ -98,13 +97,7 @@ namespace CalamityMod.CalPlayer break; case ItemID.MythrilSword: - - if (target.damage > 0) - { - target.damage = (int)(target.defDamage * 0.9); - target.Calamity().isNerfedByMythril = true; - } - + target.Calamity().mythrilNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime; break; case ItemID.OrichalcumSword: @@ -226,8 +219,7 @@ namespace CalamityMod.CalPlayer switch (proj.type) { case ProjectileID.CobaltNaginata: - target.Calamity().miscDefenseLoss = (int)(target.defense * 0.25); - target.Calamity().isNerfedByCobalt = true; + target.Calamity().cobaltNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime; break; case ProjectileID.PalladiumPike: @@ -237,13 +229,7 @@ namespace CalamityMod.CalPlayer break; case ProjectileID.MythrilHalberd: - - if (target.damage > 0) - { - target.damage = (int)(target.defDamage * 0.9); - target.Calamity().isNerfedByMythril = true; - } - + target.Calamity().mythrilNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime; break; case ProjectileID.OrichalcumHalberd: diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 1378deb1cd..299188017b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -226,9 +226,10 @@ namespace CalamityMod.NPCs public const int knockbackResistanceMin = 180; public int knockbackResistanceTimer = 0; - // Used for particle drawing on NPCs affected by vanilla Cobalt/Mythril weapons - public bool isNerfedByCobalt = false; - public bool isNerfedByMythril = false; + // Used for NPCs affected by vanilla Cobalt/Mythril weapons + public const int cobaltAndMythrilNerfTime = 600; + public int cobaltNerfTimer = 0; + public int mythrilNerfTimer = 0; // Debuffs public int vaporfied = 0; @@ -447,8 +448,8 @@ namespace CalamityMod.NPCs myClone.bossCanBeKnockedBack = bossCanBeKnockedBack; myClone.knockbackResistanceTimer = knockbackResistanceTimer; - myClone.isNerfedByCobalt = isNerfedByCobalt; - myClone.isNerfedByMythril = isNerfedByMythril; + myClone.cobaltNerfTimer = cobaltNerfTimer; + myClone.mythrilNerfTimer = mythrilNerfTimer; myClone.vaporfied = vaporfied; myClone.timeSlow = timeSlow; @@ -5083,6 +5084,11 @@ namespace CalamityMod.NPCs if (RancorBurnTime > 0) RancorBurnTime--; + if (cobaltNerfTimer > 0) + cobaltNerfTimer--; + if (mythrilNerfTimer > 0) + mythrilNerfTimer--; + if (veriumDoomTimer > 0) veriumDoomTimer--; if (veriumDoomTimer == 0 && veriumDoomMarked) @@ -6378,9 +6384,12 @@ namespace CalamityMod.NPCs } } - // Cobalt and Mythril weapon particle effects - if (isNerfedByCobalt) + // Cobalt weapons reduce NPC defense + if (cobaltNerfTimer > 0) { + miscDefenseLoss = (int)(npc.defense * 0.25); + + // Particle effects if (Main.rand.NextBool(5)) { Vector2 spawnLocation = new Vector2(Main.rand.NextFloat(npc.position.X, npc.position.X + npc.width), Main.rand.NextFloat(npc.position.Y, npc.position.Y + npc.height)); @@ -6391,8 +6400,16 @@ namespace CalamityMod.NPCs } } - if (isNerfedByMythril) + // Mythril weapons reduce NPC contact damage + if (mythrilNerfTimer > 0) { + // Ensure that it isn't trying to set a non-zero damage value if the NPC's damage is currently 0 + if (npc.damage == 0) + npc.damage = 0; + else + npc.damage = (int)(npc.defDamage * 0.9); + + // Particle effects if (Main.rand.NextBool(5)) { Vector2 spawnLocation = new Vector2(Main.rand.NextFloat(npc.position.X, npc.position.X + npc.width), Main.rand.NextFloat(npc.position.Y, npc.position.Y + npc.height)); From c9c7671867596fe173ac1221124b3c8b98d1ef94 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 13 May 2024 22:56:04 -0700 Subject: [PATCH 159/197] Fixed more Holdout + UI mixing issues all holdouts that can persist when you are not holding mouse 1 now count you as channeling while doing so to prevent menu interaction Fixed some Kingbane jank --- Items/Weapons/Ranged/Kingsbane.cs | 3 ++- Projectiles/Magic/OmicronHoldout.cs | 1 + Projectiles/Magic/OmicronWingman.cs | 1 + Projectiles/Magic/WingmanHoldout.cs | 1 + Projectiles/Ranged/KingsbaneHoldout.cs | 18 +++++++++++++----- Projectiles/Ranged/NorfleetCannon.cs | 3 ++- Projectiles/Ranged/TheHiveHoldout.cs | 3 ++- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Items/Weapons/Ranged/Kingsbane.cs b/Items/Weapons/Ranged/Kingsbane.cs index 69fd57af7d..c98cb01137 100644 --- a/Items/Weapons/Ranged/Kingsbane.cs +++ b/Items/Weapons/Ranged/Kingsbane.cs @@ -40,7 +40,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > 0.95f && player.ownedProjectileCounts[Item.shoot] > 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + Projectile holdout = Projectile.NewProjectileDirect(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); return false; } public override void AddRecipes() diff --git a/Projectiles/Magic/OmicronHoldout.cs b/Projectiles/Magic/OmicronHoldout.cs index 35fe35a888..d1884e6c4b 100644 --- a/Projectiles/Magic/OmicronHoldout.cs +++ b/Projectiles/Magic/OmicronHoldout.cs @@ -182,6 +182,7 @@ namespace CalamityMod.Projectiles.Magic } private void PostFiringCooldown() { + Owner.channel = true; if (PostFireCooldown > 0 && Main.rand.NextBool()) { Vector2 smokeVel = new Vector2(0, -8) * Main.rand.NextFloat(0.1f, 1.1f); diff --git a/Projectiles/Magic/OmicronWingman.cs b/Projectiles/Magic/OmicronWingman.cs index 1e4dd25840..a932b15d32 100644 --- a/Projectiles/Magic/OmicronWingman.cs +++ b/Projectiles/Magic/OmicronWingman.cs @@ -229,6 +229,7 @@ namespace CalamityMod.Projectiles.Magic } private void PostFiringCooldown() { + Owner.channel = true; Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 12f; if (PostFireCooldown > 0 && Main.rand.NextBool()) diff --git a/Projectiles/Magic/WingmanHoldout.cs b/Projectiles/Magic/WingmanHoldout.cs index 32fa2ba935..052e406b2a 100644 --- a/Projectiles/Magic/WingmanHoldout.cs +++ b/Projectiles/Magic/WingmanHoldout.cs @@ -248,6 +248,7 @@ namespace CalamityMod.Projectiles.Magic } private void PostFiringCooldown() { + Owner.channel = true; Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 12f; if (PostFireCooldown > 0 && Main.rand.NextBool()) diff --git a/Projectiles/Ranged/KingsbaneHoldout.cs b/Projectiles/Ranged/KingsbaneHoldout.cs index 9ac5958b2b..7d27d3545b 100644 --- a/Projectiles/Ranged/KingsbaneHoldout.cs +++ b/Projectiles/Ranged/KingsbaneHoldout.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.Ranged public int fullRevShots = 50; public int windupAnim = 11; public int soundTimer = 0; + public bool discharging = false; public override void SetDefaults() { @@ -31,6 +32,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.ignoreWater = true; + Projectile.alpha = 255; } public override void SetStaticDefaults() { @@ -39,6 +41,10 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Time++; + + if (Time == 3) + Projectile.alpha = 0; + if (Time % 2 == 0) soundTimer++; Projectile.frameCounter++; @@ -77,8 +83,9 @@ namespace CalamityMod.Projectiles.Ranged Owner.PickAmmo(Owner.ActiveItem(), out bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out int _); // Fire Auric Bullets if the owner stops channeling or otherwise cannot use the weapon. - if (Owner.CantUseHoldout()) + if (Owner.CantUseHoldout() || discharging) { + discharging = true; if (fullRev && fullRevShots > 0) { Projectile.timeLeft = 2; @@ -93,6 +100,7 @@ namespace CalamityMod.Projectiles.Ranged Owner.velocity += -Projectile.velocity * fullRevShots * (Main.zenithWorld ? 0.028f : 0.013f); Projectile.NewProjectile(Projectile.GetSource_FromThis(), tipPosition + Projectile.velocity * 5 + Main.rand.NextVector2Circular(7, 7), shootVelocity.RotatedByRandom(MathHelper.ToRadians(4f)), ModContent.ProjectileType(), (int)(Projectile.damage * 0.9f), Projectile.knockBack, Projectile.owner); SoundEngine.PlaySound(SoundID.Item40 with { PitchVariance = 0.4f }, Projectile.Center); + Owner.channel = true; //SoundEngine.PlaySound(Kingsbane.AuricFire with { PitchVariance = 0.4f }, Projectile.Center); fullRevShots--; } @@ -137,9 +145,9 @@ namespace CalamityMod.Projectiles.Ranged { if (Main.myPlayer == Projectile.owner) { - float interpolant = Utils.GetLerpValue(5f, 55f, Projectile.Distance(Main.MouseWorld), true); + float interpolant = Utils.GetLerpValue(0f, 55f, Owner.Distance(Main.MouseWorld), true); Vector2 oldVelocity = Projectile.velocity; - Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant); + Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), 0.185f).SafeNormalize(Vector2.UnitY); if (Projectile.velocity != oldVelocity) { Projectile.netSpam = 0; @@ -151,9 +159,9 @@ namespace CalamityMod.Projectiles.Ranged Projectile.spriteDirection = Projectile.direction; // Rumble - if (Owner.CantUseHoldout()) + if (Owner.CantUseHoldout() || discharging) { - Projectile.position += Main.rand.NextVector2Circular(4.5f, 4.5f); + Projectile.Center += Main.rand.NextVector2Circular(4.5f, 4.5f); } } diff --git a/Projectiles/Ranged/NorfleetCannon.cs b/Projectiles/Ranged/NorfleetCannon.cs index 8035830c5c..3a4177fb51 100644 --- a/Projectiles/Ranged/NorfleetCannon.cs +++ b/Projectiles/Ranged/NorfleetCannon.cs @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Ranged // Rumble (only while channeling) float rumble = 1f; - if (!Owner.CantUseHoldout()) + if (!Owner.CantUseHoldout() && PostFireCooldown <= 0) Projectile.Center += Main.rand.NextVector2Circular(rumble, rumble); if (PostFireCooldown < 297 && PostFireCooldown > 15 && recharging) { @@ -238,6 +238,7 @@ namespace CalamityMod.Projectiles.Ranged } private void PostFiringCooldown() { + Owner.channel = true; Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 73f; if (PUNISHMENTMODE) diff --git a/Projectiles/Ranged/TheHiveHoldout.cs b/Projectiles/Ranged/TheHiveHoldout.cs index 80d1f8a77f..f29cb26b3e 100644 --- a/Projectiles/Ranged/TheHiveHoldout.cs +++ b/Projectiles/Ranged/TheHiveHoldout.cs @@ -212,6 +212,7 @@ namespace CalamityMod.Projectiles.Ranged private void PostFiringCooldown() { + Owner.channel = true; if (PostFireCooldown > 0) { PostFireCooldown--; @@ -263,7 +264,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 rotationPoint = texture.Size() * 0.5f; SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - if (!Owner.CantUseHoldout()) + if (!Owner.CantUseHoldout() && PostFireCooldown <= 0) { float rumble = Utils.GetLerpValue(0f, MaxCharge, ShootingTimer, true) * ShootingTimer >= MaxCharge ? 2 : 0.8f; drawPosition += Main.rand.NextVector2Circular(rumble, rumble); From 156072fd99b2bfe975d04e2c7f77469751b03d32 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 09:12:08 -0400 Subject: [PATCH 160/197] Bestiary debuff section has clearer description --- Localization/en-US/Mods.CalamityMod.UI.hjson | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index 87f29c96e3..eaad64726a 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -145,7 +145,11 @@ ArtemisApolloIcon: Artemis and Apollo, a pair of extremely persistent automatons // Debuff System DebuffSystem: { Title: Debuff Resistances - Description: NPCs take increased or decreased damage from certain debuff types + Description: + ''' + NPCs take 2x damage from vulnerable debuff types, + and 0.5x damage from resisted debuff types + ''' Heat: Heat Cold: Cold Sickness: Sickness From da399b16e8c614e1c957b2fc7f9ccc00bd854571 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 14 May 2024 11:10:08 -0400 Subject: [PATCH 161/197] Fix honey being lava and lava being honey in Calamity sinks. --- Utilities/FurnitureSetupUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs index 78a2fe683f..61898018c4 100644 --- a/Utilities/FurnitureSetupUtils.cs +++ b/Utilities/FurnitureSetupUtils.cs @@ -1396,8 +1396,8 @@ namespace CalamityMod Main.tileLavaDeath[mt.Type] = !lavaImmune; Main.tileWaterDeath[mt.Type] = false; TileID.Sets.CountsAsWaterSource[mt.Type] = water; - TileID.Sets.CountsAsHoneySource[mt.Type] = lava; - TileID.Sets.CountsAsLavaSource[mt.Type] = honey; + TileID.Sets.CountsAsLavaSource[mt.Type] = lava; + TileID.Sets.CountsAsHoneySource[mt.Type] = honey; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.newTile.LavaDeath = !lavaImmune; TileObjectData.newTile.LavaPlacement = lavaImmune ? LiquidPlacement.Allowed : LiquidPlacement.NotAllowed; From 363636269d8197c0ec7cc53ea5eb043831a85f8d Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 11:59:47 -0500 Subject: [PATCH 162/197] Reduced Cultist Ancient Vision base HP from 4000 to 3200. --- NPCs/CalamityGlobalNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 1378deb1cd..4692fed438 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1245,7 +1245,7 @@ namespace CalamityMod.NPCs break; case NPCID.AncientCultistSquidhead: - npc.lifeMax = 4000; + npc.lifeMax = 3200; break; case NPCID.DukeFishron: From 307ebe6bb504ac5ffd43b644fa110b2fabadc24c Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 12:40:00 -0500 Subject: [PATCH 163/197] Fixed Deerclops ascension bug. --- NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs index 90aeb04f5c..22a0005454 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs @@ -871,7 +871,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { npc.velocity.Y = MathHelper.Clamp(npc.velocity.Y + yVelocityIncrease, yVelocityMin, 0f); } - else if (npc.velocity.Y == 0f && moveUp) + else if (npc.velocity.Y == 0f && moveUp && npc.localAI[0] == 0f) { npc.velocity.Y = yVelocity; npc.localAI[0] = 1f; From f14304b31a5f620f8d6cf08bbfaedd5bc640ea10 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 12:44:46 -0500 Subject: [PATCH 164/197] Lava Slime spawning fix. --- NPCs/CalamityGlobalNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index fca78f761e..ec513557be 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6077,7 +6077,7 @@ namespace CalamityMod.NPCs if (spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone && CalamityConfig.Instance.RemoveLavaDropsFromLavaSlimes && Main.expertMode) { pool.Add(NPCType(), SpawnCondition.Underworld.Chance); - pool[NPCID.LavaSlime] = 0f; + pool.Remove(NPCID.LavaSlime); } // Spawn Green Jellyfish in prehm and Blue Jellyfish in hardmode From 82e30256cf050744306dc76d21e04275ecd87d40 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 13:08:40 -0500 Subject: [PATCH 165/197] Commented out syncs for Rev+ Destroyer, please test. --- .../Bosses/DestroyerAI.cs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 8b20d8af39..3acb960027 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -208,7 +208,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else npc.localAI[3] = -1f; - npc.SyncExtraAI(); + //npc.SyncExtraAI(); } } @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } npc.localAI[2] = 0f; - npc.SyncVanillaLocalAI(); + //npc.SyncVanillaLocalAI(); } } } @@ -377,7 +377,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (calamityGlobalNPC.destroyerLaserColor == -1) { calamityGlobalNPC.destroyerLaserColor = phase3 ? 3 : phase2 ? 2 : 1; - npc.SyncDestroyerLaserColor(); + //npc.SyncDestroyerLaserColor(); } float laserBreathGateValue = DeathModeLaserBreathGateValue; @@ -385,8 +385,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses calamityGlobalNPC.newAI[0] += 1f; // Sync newAI every 20 frames for the new telegraph - if (calamityGlobalNPC.newAI[0] % 20f == 0f) - npc.SyncExtraAI(); + /*if (calamityGlobalNPC.newAI[0] % 20f == 0f) + npc.SyncExtraAI();*/ if ((player.Center - npc.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(npc.velocity.ToRotation(), MathHelper.PiOver4) == npc.velocity.ToRotation() && calamityGlobalNPC.newAI[0] >= laserBreathGateValue && Vector2.Distance(npc.Center, player.Center) > 480f && @@ -443,8 +443,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { calamityGlobalNPC.newAI[0] = 0f; calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); - npc.SyncExtraAI(); + //npc.SyncDestroyerLaserColor(); + //npc.SyncExtraAI(); } } } @@ -478,14 +478,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (calamityGlobalNPC.newAI[2] > 0f || bossRush) calamityGlobalNPC.destroyerLaserColor = 2; - npc.SyncDestroyerLaserColor(); + //npc.SyncDestroyerLaserColor(); } } if (probeLaunched && ableToFireLaser) { calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); + //npc.SyncDestroyerLaserColor(); } // Laser rate of fire @@ -497,8 +497,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses calamityGlobalNPC.newAI[0] += laserTimerIncrement; // Sync newAI every 20 frames for the new telegraph - if (calamityGlobalNPC.newAI[0] % 20f == 0f && ableToFireLaser) - npc.SyncExtraAI(); + /*if (calamityGlobalNPC.newAI[0] % 20f == 0f && ableToFireLaser) + npc.SyncExtraAI();*/ Color telegraphColor = Color.Transparent; switch (calamityGlobalNPC.destroyerLaserColor) @@ -552,7 +552,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); calamityGlobalNPC.newAI[0] = laserShootTimeBonus; - npc.SyncExtraAI(); + //npc.SyncExtraAI(); npc.TargetClosest(); } @@ -569,7 +569,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); calamityGlobalNPC.newAI[0] = laserShootTimeBonus; - npc.SyncExtraAI(); + //npc.SyncExtraAI(); npc.TargetClosest(); } @@ -623,14 +623,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (masterMode) { calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); + //npc.SyncDestroyerLaserColor(); } } if (!masterMode) { calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); + //npc.SyncDestroyerLaserColor(); } } } From b23e36a7772b94534f4b170155700f048aac055a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 14:49:54 -0400 Subject: [PATCH 166/197] Farewell Done, you shall be missed --- Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index a59b553243..17aec33a70 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -72,7 +72,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "CosmaticMango", "CrabBar", "Dia", - "Done", "DylanDoe21", "enamoured", "Fluffi", @@ -123,6 +122,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Demik", "DM Dokuro", "Dominic Karma", + "Done", "Doog", "drh", "dwshin", From e6fcef348d3f01c53582d94e88217e4af1e8d2ff Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 14:56:59 -0400 Subject: [PATCH 167/197] Updated Cobalt/Mythril weapon tooltips --- Items/CalamityGlobalItemTooltip.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index cd54a2ced8..dcf49bcac9 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -429,7 +429,7 @@ namespace CalamityMod.Items // Cobalt if (item.type == ItemID.CobaltSword || item.type == ItemID.CobaltNaginata) - EditTooltipByName("Knockback", (line) => line.Text += "\nPermanently decreases enemy defense by 25% on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nDecreases enemy defense by 25% on hit\nThis effect lasts for 10 seconds"); // Palladium if (item.type == ItemID.PalladiumSword || item.type == ItemID.PalladiumPike) @@ -437,7 +437,7 @@ namespace CalamityMod.Items // Mythril if (item.type == ItemID.MythrilSword || item.type == ItemID.MythrilHalberd) - EditTooltipByName("Knockback", (line) => line.Text += "\nPermanently decreases enemy contact damage by 10% on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nDecreases enemy contact damage by 10% on hit\nThis effect lasts for 10 seconds"); // Orichalcum if (item.type == ItemID.OrichalcumSword || item.type == ItemID.OrichalcumHalberd) From a51cc4a7f32f64b2bed87496dc07659aa607b82e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 15:19:45 -0400 Subject: [PATCH 168/197] Contaminated Bile resprite --- Items/Weapons/Rogue/ContaminatedBile.png | Bin 475 -> 539 bytes Projectiles/Rogue/ContaminatedBileFlask.cs | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/ContaminatedBile.png b/Items/Weapons/Rogue/ContaminatedBile.png index ccc5e86737758bf8254bbf4a74214a83f9f15d09..e898b4fdb2d7b87e6e504e71aae976a057611017 100644 GIT binary patch literal 539 zcmV+$0_6RPP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0kBC#K~zXf)s{~v zgK-$gH^~l*mOs0oG#VSCnZp<-b6z>PlDTNDlyc;P95_f^$cf^h%|Wpvc98r@Hr`lE z9L#7X2TM)9^F4TNw5|5b_wwoawf64Q^E|)3N=1rvYpdd)tkV>ro|B}MpG_xuU(8v4 z{A!wYnoCeK;p-PLTT^j{sm#i4)u3m!6m%ag{4+zBUJo;EO(6~#n%#SEK=$yqs0+;0 zH1~$`-f47+UTtk$f!xE(Xbe;YI~Ox$D?*DNVA#9BuL}=$1wPMAb~U$f7AT+4nxz1krveThGURXx9dTxjJ&580Tam3oW|k}GmYIm1XJtw6KYN+jbocCQ2ZWd8=6W%A8N+`eERJf dIW|-%J^;(Kn?i^IhhzW%002ovPDHLkV1klb^F#mu literal 475 zcmV<10VMv3P)Px$l}SWFR7i=%l)p6-kqU%{AkYR0Uc-G)d;0tl;qxr-zWY6wd(J)gegy`EYXX3v z;sxO8?L+4mf{Ird^8o0zPkO;nPpp4Hv{Syj9kvjU&+Y*5j{5|Fs)PWzeaLj&pzjWb zyD3*@U6y}U3F!c%KAA~mX$xrY#E}d-D!;svw`MH7VX2pLd7$Cs>s|7io%BD0b_G*; zJIuvb0Vw72I>1y+$V{+i(*F$9z&z0Ua(9x4whOfQDF7oYs%1X2_6>kvs|bK{!2>vv zf!SLCVSIHv;_|`0F;eZytfz|rWK#hh8czD3L49EKr0Io40A8OTb%6AF0BAk)t{JKP`l4vLUCl^sN?t4xaQGc`B^tL&i@E_Q+*EB}ycTr}qYgOW;0Hy)dFd`l RF=YS%002ovPDHLkV1nba%cKAR diff --git a/Projectiles/Rogue/ContaminatedBileFlask.cs b/Projectiles/Rogue/ContaminatedBileFlask.cs index 93140dc3f7..2d130b58eb 100644 --- a/Projectiles/Rogue/ContaminatedBileFlask.cs +++ b/Projectiles/Rogue/ContaminatedBileFlask.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = Projectile.height = 24; + Projectile.width = Projectile.height = 28; Projectile.friendly = true; Projectile.penetrate = 1; Projectile.timeLeft = 300; From d8a615b64a9b432fddfabce5fca630ec8b50a69b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 15:40:17 -0400 Subject: [PATCH 169/197] Made Hardened Honeycomb gravity not suck --- Items/Weapons/Rogue/HardenedHoneycomb.cs | 2 +- Projectiles/Rogue/Honeycomb.cs | 44 ++++++++++++++++-------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/Items/Weapons/Rogue/HardenedHoneycomb.cs b/Items/Weapons/Rogue/HardenedHoneycomb.cs index fc50e89aa3..bfa4d589ab 100644 --- a/Items/Weapons/Rogue/HardenedHoneycomb.cs +++ b/Items/Weapons/Rogue/HardenedHoneycomb.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = 300; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 10f; + Item.shootSpeed = 14f; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index 9b67402379..5d571ba384 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -21,12 +21,26 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 30; Projectile.friendly = true; Projectile.penetrate = 1; - Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; + //Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; Projectile.timeLeft = 300; - AIType = ProjectileID.ThrowingKnife; + //AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; } + public override void AI() + { + Projectile.ai[0]++; + + Projectile.rotation += MathHelper.ToRadians(Projectile.velocity.X * 1.25f); + if (Projectile.ai[0] > 45) + { + Projectile.velocity.X *= 0.97f; + Projectile.velocity.Y += 0.28f; + if (Projectile.velocity.Y > 18f) + Projectile.velocity.Y = 18f; + } + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { Player player = Main.player[Main.myPlayer]; @@ -43,6 +57,20 @@ namespace CalamityMod.Projectiles.Rogue SpawnProjectiles(); } + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.NPCDeath1, Projectile.position); + SpawnProjectiles(); + + //Dust on impact + int dust_splash = 0; + while (dust_splash < 9) + { + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Copper, -Projectile.velocity.X * 0.15f, -Projectile.velocity.Y * 0.15f, 159, default, 1.5f); + dust_splash += 1; + } + } + public void SpawnProjectiles() { Player player = Main.player[Main.myPlayer]; @@ -72,17 +100,5 @@ namespace CalamityMod.Projectiles.Rogue Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } - - public override void OnKill(int timeLeft) - { - SoundEngine.PlaySound(SoundID.NPCDeath1, Projectile.position); - //Dust on impact - int dust_splash = 0; - while (dust_splash < 9) - { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Copper, -Projectile.velocity.X * 0.15f, -Projectile.velocity.Y * 0.15f, 159, default, 1.5f); - dust_splash += 1; - } - } } } From 288269e56add4f7d80dacfa2955c64f35f75c12f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 15:42:35 -0400 Subject: [PATCH 170/197] Removed unneeded commented out lines --- Projectiles/Rogue/Honeycomb.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index 5d571ba384..5e3ca0a392 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -21,9 +21,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 30; Projectile.friendly = true; Projectile.penetrate = 1; - //Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; Projectile.timeLeft = 300; - //AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; } From 6d9fb4bf667ee41789b070b16c43b31a7f680f53 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 14 May 2024 16:01:44 -0400 Subject: [PATCH 171/197] 1 - Chalice of the Blood God works with dodges now. 2 - Fixed interactions between Chalice and defense damage. 3 - Fixed defense damage code allowing for displaying when you take zero defense damage. --- CalPlayer/CalamityPlayer.cs | 4 +++ CalPlayer/CalamityPlayerHitHurt.cs | 58 +++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 17 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index af326372ec..6106b15c9e 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -575,10 +575,13 @@ namespace CalamityMod.CalPlayer public bool bloodPactBoost = false; public bool bloodflareCore = false; public int bloodflareCoreRemainingHealOverTime = 0; + public bool chaliceOfTheBloodGod = false; public double chaliceBleedoutBuffer = 0D; public double chaliceDamagePointPartialProgress = 0D; + public int chaliceBleedoutToApplyOnHurt = 0; public int chaliceHitOriginalDamage = 0; + public bool elementalHeart = false; public bool crownJewel = false; public bool infectedJewel = false; @@ -1721,6 +1724,7 @@ namespace CalamityMod.CalPlayer bloodPact = false; bloodflareCore = false; chaliceOfTheBloodGod = false; + chaliceBleedoutToApplyOnHurt = 0; // Resets every frame so it doesn't improperly carry over between hits elementalHeart = false; crownJewel = false; infectedJewel = false; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 9e208c0ca5..7dad272e20 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1509,7 +1509,12 @@ namespace CalamityMod.CalPlayer // The dodges will only trigger if the player has taken greater than or equal to 5% of their max HP in damage double dodgeDamageGateValuePercent = 0.05; int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent); - if (!Player.HasCooldown(GlobalDodge.ID) && info.Damage >= dodgeDamageGateValue) + + // 14MAY2024: Ozzatron: Chalice of the Blood God now works with dodges + int actualDamageTaken = chaliceOfTheBloodGod ? chaliceHitOriginalDamage : info.Damage; + bool sufficientDamageForDodging = actualDamageTaken >= dodgeDamageGateValue; + + if (!Player.HasCooldown(GlobalDodge.ID) && sufficientDamageForDodging) { double maxCooldownDurationDamagePercent = 0.5; int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent)); @@ -1518,7 +1523,7 @@ namespace CalamityMod.CalPlayer if (maxCooldownDurationDamageValue <= 0) maxCooldownDurationDamageValue = 1; - float cooldownDurationScalar = MathHelper.Clamp((info.Damage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f); + float cooldownDurationScalar = MathHelper.Clamp((actualDamageTaken - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f); // Re-implementation of vanilla item Black Belt as a consumable dodge if (Player.whoAmI == Main.myPlayer && Player.blackBelt) @@ -1969,22 +1974,14 @@ namespace CalamityMod.CalPlayer // // Chalice of the Blood God does nothing to a hit that was just fully blocked by shields. // Otherwise, it reduces the damage of any hit to 5, which allows for full iframes. - // It then applies the full hit (minus that 5 damage) to its own bleedout buffer. + // It then applies the full hit (minus that 5 damage) to its own bleedout buffer in OnHurt (see below). // Hits for less than 5 damage are ignored entirely and allowed to strike the player as normal. if (chaliceOfTheBloodGod && !shieldsFullyAbsorbedHit && info.Damage > ChaliceOfTheBloodGod.MinAllowedDamage) { - int bleedoutToApply = info.Damage - ChaliceOfTheBloodGod.MinAllowedDamage; - chaliceBleedoutBuffer += bleedoutToApply; + chaliceBleedoutToApplyOnHurt = info.Damage - ChaliceOfTheBloodGod.MinAllowedDamage; + chaliceHitOriginalDamage = info.Damage; info.Damage = ChaliceOfTheBloodGod.MinAllowedDamage; - - // Defense damage is applied here. - DealDefenseDamage(info, bleedoutToApply); - - // Display text indicating that damage was transferred to bleedout. - string text = $"({-bleedoutToApply})"; - Rectangle location = new Rectangle((int)Player.position.X + 4, (int)Player.position.Y - 3, Player.width - 4, Player.height - 4); - CombatText.NewText(location, ChaliceOfTheBloodGod.BleedoutBufferDamageTextColor, Language.GetTextValue(text), dot: true); } } #endregion @@ -2006,7 +2003,7 @@ namespace CalamityMod.CalPlayer // This function will be ignored if the player is wearing Chalice, as it handles its defense damage elsewhere. bool hitCanApplyDefenseDamage = nextHitDealsDefenseDamage || bloodflareCore; - if (hitCanApplyDefenseDamage && !chaliceOfTheBloodGod && !hasIFrames && !Player.creativeGodMode) + if (hitCanApplyDefenseDamage && !hasIFrames && !Player.creativeGodMode) { double halfDefense = Player.statDefense / 2.0; int netMitigation = hurtInfo.SourceDamage - hurtInfo.Damage; @@ -2037,6 +2034,12 @@ namespace CalamityMod.CalPlayer Dust.CloneDust(d).velocity = dustVel.RotatedBy(MathHelper.Pi * 1.5f); } } + + // Chalice of the Blood God has to compensate for the "mitigation" provided by its bleedout buffer + else if (chaliceOfTheBloodGod) + DealDefenseDamage(hurtInfo, chaliceBleedoutToApplyOnHurt); + + // Otherwise, just deal regular defense damage. else DealDefenseDamage(hurtInfo); } @@ -2044,6 +2047,24 @@ namespace CalamityMod.CalPlayer nextHitDealsDefenseDamage = false; #endregion + #region Chalice of the Blood God Bleed Application + // This is handled in OnHurt so that Chalice hits can still be dodged based on their appropriate normal damage + // Defense damage based on the "total lethality of the hit" is applied immediately prior to this + // + // 1 - Actually apply bleedout to the player based on the damage they would have taken + // 2 - Display an indicator of how much damage was dealt as bleedout instead of regular damage + if (chaliceOfTheBloodGod) + { + int bleedoutToApply = chaliceBleedoutToApplyOnHurt; + chaliceBleedoutBuffer += bleedoutToApply; + + // Display text indicating that damage was transferred to bleedout. + string text = $"({-bleedoutToApply})"; + Rectangle location = new Rectangle((int)Player.position.X + 4, (int)Player.position.Y - 3, Player.width - 4, Player.height - 4); + CombatText.NewText(location, ChaliceOfTheBloodGod.BleedoutBufferDamageTextColor, Language.GetTextValue(text), dot: true); + } + #endregion + #region Shattered Community Rage Gain // Shattered Community makes the player gain rage based on the amount of damage taken. // Also set the Rage gain cooldown to prevent bizarre abuse cases. @@ -2760,9 +2781,8 @@ namespace CalamityMod.CalPlayer // Under typical circumstances, defense damage scales with "net mitigation", aka how much damage the player DIDN'T take. // Thematically, this means it scales with how much damage the player's defense took instead of them. - - CalamityPlayer modPlayer = Player.Calamity(); - + // Chalice of the Blood God makes you take much less direct damage than you should, which would catastrophically inflate defense damage. + // // Subtract the bleedout applied on this hit from the net mitigation. // This prevents Chalice from making the player take much more defense damage than intended. int netMitigation = hurtInfo.SourceDamage - (hurtInfo.Damage + bleedoutApplied); @@ -2808,6 +2828,10 @@ namespace CalamityMod.CalPlayer // Actually applies defense damage. Cannot be called externally. private void ApplyDefenseDamageInternal(int defenseDamage, bool showVisuals = true) { + // If zero defense damage is being dealt, don't waste your time or display a grey 0. + if (defenseDamage <= 0) + return; + // Can be dynamically reduced by Adamantite set bonus and maybe other future effects. int defenseDamageTaken = defenseDamage; From 3feeca0252f84e41e5158b30ccf5838d1dfeffde Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 17:51:26 -0500 Subject: [PATCH 172/197] Rev+ Skeletron adjustments (more will happen later). --- NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs index 5a9e132aa1..4aa4150112 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs @@ -368,7 +368,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // New location npc.Center = new Vector2(calamityGlobalNPC.newAI[2], calamityGlobalNPC.newAI[3]); - npc.velocity = Vector2.Zero; + + // Do not set velocity to zero during charge attacks + if (npc.ai[1] != 1f) + npc.velocity = Vector2.Zero; + npc.ai[3] = -60f; calamityGlobalNPC.newAI[2] = calamityGlobalNPC.newAI[3] = 0f; npc.SyncExtraAI(); @@ -424,6 +428,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses calamityGlobalNPC.newAI[1] += 1f; float chargePhaseChangeRateBoost = phase5 ? (death ? 24f : 14f) : phase4 ? (death ? 8f : 6f) : (((masterMode && death) ? 6f : 4f) * ((1f - lifeRatio) / (1f - phase4LifeRatio))); + if (!handsDead) + chargePhaseChangeRateBoost *= 0.5f; + float chargePhaseChangeRate = chargePhaseChangeRateBoost + 1f; npc.ai[2] += chargePhaseChangeRate; npc.localAI[1] += chargePhaseChangeRate; @@ -953,6 +960,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.npc[(int)npc.ai[1]].ai[1] != 0f || cancelSlap) { + deceleration *= 0.75f; + velocityIncrement *= 1.5f; + float maxX = velocityIncrement * 100f * velocityMultiplier; float maxY = velocityIncrement * 100f * velocityMultiplier; From 205d7d01425d66c58a2bd88b436667982fd31cc0 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 18:03:15 -0500 Subject: [PATCH 173/197] Last Rev+ Skeletron change, I'm not adjusting him further because I felt the fight was perfectly fine in Death Master. It's fine when fights are extremely oppressive on the highest difficulty. --- NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs index 4aa4150112..0eb710efcb 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs @@ -407,7 +407,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int skullProjectile = Projectile.NewProjectile(npc.GetSource_FromAI(), skullFiringPos, skullProjDirection, type, damage, 0f, Main.myPlayer, -1f); Main.projectile[skullProjectile].timeLeft = 600; - if (masterMode) + if (masterMode && handsDead) { skullProjDirection = new Vector2(skullProjTargetX, skullProjTargetY).SafeNormalize(Vector2.UnitY); skullProjDirection *= skullProjSpeed * 2f; From e709bf41809c0a7ff281a0690bb6599799d66960 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 14 May 2024 18:34:58 -0700 Subject: [PATCH 174/197] Updated ScourgeOfTheDesert homing --- Projectiles/Rogue/ScourgeoftheDesertProj.cs | 23 ++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Projectiles/Rogue/ScourgeoftheDesertProj.cs b/Projectiles/Rogue/ScourgeoftheDesertProj.cs index 1a6297b614..15f6029cb4 100644 --- a/Projectiles/Rogue/ScourgeoftheDesertProj.cs +++ b/Projectiles/Rogue/ScourgeoftheDesertProj.cs @@ -101,19 +101,28 @@ namespace CalamityMod.Projectiles.Rogue } if (InsideTiles) { - foreach (NPC n in Main.ActiveNPCs) - { - if (n.CanBeChasedBy(Projectile.GetSource_FromThis(), false)) - NPCDestination = n.Center + n.velocity * 5f; - } - TimeUnderground++; Vector3 DustLight = new Vector3(0.171f, 0.124f, 0.086f); - Lighting.AddLight(Projectile.Center + Projectile.velocity, DustLight * 4); + Lighting.AddLight(Projectile.Center + Projectile.velocity, DustLight * 1.5f); if (Time % 15 == 0 && TimeUnderground < 120) { SoundEngine.PlaySound(SoundID.WormDig with { Volume = 0.7f, Pitch = 0.2f }, Projectile.Center); } + + + NPC target = Projectile.Center.ClosestNPCAt(1800, true); + if (target == null) + { + if (Projectile.velocity.Y < 0) + { + Projectile.velocity.Y *= 0.98f; + } + Projectile.velocity.Y += 0.08f; + Projectile.velocity.X *= 0.99f; + return; + } + NPCDestination = target.Center + target.velocity * 5f; + float returnSpeed = 10; float acceleration = 0.2f; float xDist = NPCDestination.X - Projectile.Center.X; From da25f9c0e9be97f04c97410e0ea22d875ebe1be9 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 20:48:52 -0500 Subject: [PATCH 175/197] 1 - Potential ClosestNPCAt detection fix for worms and other niche cases. 2 - Potential Hive Mind frame fuckery fix. --- NPCs/HiveMind/HiveMind.cs | 11 ++++++----- Utilities/NPCUtils.cs | 6 ++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index d4585da10d..6337421d61 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -256,6 +256,9 @@ namespace CalamityMod.NPCs.HiveMind if (phase2) { + if (frameY >= maxFramesY_Phase2) + frameY = 0; + NPC.frameCounter++; if (NPC.frameCounter >= 6D) { @@ -276,6 +279,8 @@ namespace CalamityMod.NPCs.HiveMind if ((frameX * maxFramesY_Phase2) + frameY > 15) frameX = frameY = 0; } + + NPC.frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); } else { @@ -295,7 +300,6 @@ namespace CalamityMod.NPCs.HiveMind { SpriteEffects spriteEffects = NPC.direction == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Texture2D texture = Phase2Texture.Value; - Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); Color afterimageBaseColor = Color.White; int numAfterimages = 5; @@ -316,7 +320,7 @@ namespace CalamityMod.NPCs.HiveMind } Vector2 center = NPC.Center - screenPos; - spriteBatch.Draw(texture, center, frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); return false; } @@ -455,7 +459,6 @@ namespace CalamityMod.NPCs.HiveMind NPC.height = height_Phase2; NPC.position -= NPC.Size * 0.5f; - NPC.frame.Y = 0; NPC.noGravity = true; NPC.noTileCollide = true; NPC.scale = 1f; @@ -465,8 +468,6 @@ namespace CalamityMod.NPCs.HiveMind NPC.netSpam = 0; NPC.netUpdate = true; } - - NPC.frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); } else { diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index b7bc443738..c28f3fdab4 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -263,6 +263,7 @@ namespace CalamityMod // If we've found a valid boss target, ignore ALL targets which aren't bosses. if (bossFound && !(Main.npc[index].boss || Main.npc[index].type == NPCID.WallofFleshEye)) continue; + if (Main.npc[index].CanBeChasedBy(null, false)) { float extraDistance = (Main.npc[index].width / 2) + (Main.npc[index].height / 2); @@ -271,10 +272,11 @@ namespace CalamityMod if (extraDistance < distance && !ignoreTiles) canHit = Collision.CanHit(origin, 1, 1, Main.npc[index].Center, 1, 1); - if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) + if (Vector2.Distance(origin, Main.npc[index].Center) < distance && canHit) { if (Main.npc[index].boss || Main.npc[index].type == NPCID.WallofFleshEye) bossFound = true; + distance = Vector2.Distance(origin, Main.npc[index].Center); closestTarget = Main.npc[index]; } @@ -293,7 +295,7 @@ namespace CalamityMod if (extraDistance < distance && !ignoreTiles) canHit = Collision.CanHit(origin, 1, 1, Main.npc[index].Center, 1, 1); - if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) + if (Vector2.Distance(origin, Main.npc[index].Center) < distance && canHit) { distance = Vector2.Distance(origin, Main.npc[index].Center); closestTarget = Main.npc[index]; From 39befd8a077d2676cc64dee51073c6f9a294d2e7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 May 2024 22:29:35 -0400 Subject: [PATCH 176/197] Fixed Desert Scourge's map icon disappearing in Master Mode --- NPCs/DesertScourge/DesertScourgeHead.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index ef2068422d..803655aa4d 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void BossHeadSlot(ref int index) { - if (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType())) + if ((NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType())) && !Main.masterMode) index = -1; } From 2edbe24bd98f3a2c85ca8ac36dbee07bb1312d1c Mon Sep 17 00:00:00 2001 From: tomat Date: Tue, 14 May 2024 20:20:40 -0700 Subject: [PATCH 177/197] Simple visible-through-water fix: only load system on the client's end. Fixes an issue caused by MapHelper.wallLookup being null on servers. May want to look at a more aggressive check later? We still perform other behavior including the IL edits on the server, not that it matters much. --- Walls/IVisibleThroughWater.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Walls/IVisibleThroughWater.cs b/Walls/IVisibleThroughWater.cs index 189038f712..0affafae66 100644 --- a/Walls/IVisibleThroughWater.cs +++ b/Walls/IVisibleThroughWater.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Walls internal static class VisibleThroughWater { + [Autoload(Side = ModSide.Client)] private sealed class VisibleThroughWaterSystem : ModSystem { public override void AddRecipes() From bbcc231989a384e91863dda9025c19520df7f246 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 23:07:14 -0500 Subject: [PATCH 178/197] syncing returns --- .../Bosses/DestroyerAI.cs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 3acb960027..8b20d8af39 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -208,7 +208,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else npc.localAI[3] = -1f; - //npc.SyncExtraAI(); + npc.SyncExtraAI(); } } @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } npc.localAI[2] = 0f; - //npc.SyncVanillaLocalAI(); + npc.SyncVanillaLocalAI(); } } } @@ -377,7 +377,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (calamityGlobalNPC.destroyerLaserColor == -1) { calamityGlobalNPC.destroyerLaserColor = phase3 ? 3 : phase2 ? 2 : 1; - //npc.SyncDestroyerLaserColor(); + npc.SyncDestroyerLaserColor(); } float laserBreathGateValue = DeathModeLaserBreathGateValue; @@ -385,8 +385,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses calamityGlobalNPC.newAI[0] += 1f; // Sync newAI every 20 frames for the new telegraph - /*if (calamityGlobalNPC.newAI[0] % 20f == 0f) - npc.SyncExtraAI();*/ + if (calamityGlobalNPC.newAI[0] % 20f == 0f) + npc.SyncExtraAI(); if ((player.Center - npc.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(npc.velocity.ToRotation(), MathHelper.PiOver4) == npc.velocity.ToRotation() && calamityGlobalNPC.newAI[0] >= laserBreathGateValue && Vector2.Distance(npc.Center, player.Center) > 480f && @@ -443,8 +443,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { calamityGlobalNPC.newAI[0] = 0f; calamityGlobalNPC.destroyerLaserColor = -1; - //npc.SyncDestroyerLaserColor(); - //npc.SyncExtraAI(); + npc.SyncDestroyerLaserColor(); + npc.SyncExtraAI(); } } } @@ -478,14 +478,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (calamityGlobalNPC.newAI[2] > 0f || bossRush) calamityGlobalNPC.destroyerLaserColor = 2; - //npc.SyncDestroyerLaserColor(); + npc.SyncDestroyerLaserColor(); } } if (probeLaunched && ableToFireLaser) { calamityGlobalNPC.destroyerLaserColor = -1; - //npc.SyncDestroyerLaserColor(); + npc.SyncDestroyerLaserColor(); } // Laser rate of fire @@ -497,8 +497,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses calamityGlobalNPC.newAI[0] += laserTimerIncrement; // Sync newAI every 20 frames for the new telegraph - /*if (calamityGlobalNPC.newAI[0] % 20f == 0f && ableToFireLaser) - npc.SyncExtraAI();*/ + if (calamityGlobalNPC.newAI[0] % 20f == 0f && ableToFireLaser) + npc.SyncExtraAI(); Color telegraphColor = Color.Transparent; switch (calamityGlobalNPC.destroyerLaserColor) @@ -552,7 +552,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); calamityGlobalNPC.newAI[0] = laserShootTimeBonus; - //npc.SyncExtraAI(); + npc.SyncExtraAI(); npc.TargetClosest(); } @@ -569,7 +569,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); calamityGlobalNPC.newAI[0] = laserShootTimeBonus; - //npc.SyncExtraAI(); + npc.SyncExtraAI(); npc.TargetClosest(); } @@ -623,14 +623,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (masterMode) { calamityGlobalNPC.destroyerLaserColor = -1; - //npc.SyncDestroyerLaserColor(); + npc.SyncDestroyerLaserColor(); } } if (!masterMode) { calamityGlobalNPC.destroyerLaserColor = -1; - //npc.SyncDestroyerLaserColor(); + npc.SyncDestroyerLaserColor(); } } } From b83734c5818c65c3cbca026208153a8b9fb97ce9 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 14 May 2024 23:12:39 -0500 Subject: [PATCH 179/197] destroyer garbage --- .../Bosses/DestroyerAI.cs | 410 +++++++++--------- 1 file changed, 202 insertions(+), 208 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 8b20d8af39..7582745b63 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -343,9 +343,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - if (npc.type == NPCID.TheDestroyer) + if (Main.netMode != NetmodeID.MultiplayerClient) { - if (Main.netMode != NetmodeID.MultiplayerClient) + if (npc.type == NPCID.TheDestroyer) { // Spawn segments from head if (npc.ai[0] == 0f) @@ -368,197 +368,176 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses index = segment; } } - } - // Laser breath in Death Mode - if (spitLaserSpreads) - { - // Set laser color and type - if (calamityGlobalNPC.destroyerLaserColor == -1) + // Laser breath in Death Mode + if (spitLaserSpreads) { - calamityGlobalNPC.destroyerLaserColor = phase3 ? 3 : phase2 ? 2 : 1; - npc.SyncDestroyerLaserColor(); - } - - float laserBreathGateValue = DeathModeLaserBreathGateValue; - if (calamityGlobalNPC.newAI[0] < laserBreathGateValue) - calamityGlobalNPC.newAI[0] += 1f; - - // Sync newAI every 20 frames for the new telegraph - if (calamityGlobalNPC.newAI[0] % 20f == 0f) - npc.SyncExtraAI(); - - if ((player.Center - npc.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(npc.velocity.ToRotation(), MathHelper.PiOver4) == npc.velocity.ToRotation() && - calamityGlobalNPC.newAI[0] >= laserBreathGateValue && Vector2.Distance(npc.Center, player.Center) > 480f && - Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) - { - if (calamityGlobalNPC.newAI[0] % 30f == 0f) + // Set laser color and type + if (calamityGlobalNPC.destroyerLaserColor == -1) { - float velocity = bossRush ? 6f : death ? 5.333f : 5f; - int type = ProjectileID.DeathLaser; - switch (calamityGlobalNPC.destroyerLaserColor) + calamityGlobalNPC.destroyerLaserColor = phase3 ? 3 : phase2 ? 2 : 1; + npc.SyncDestroyerLaserColor(); + } + + float laserBreathGateValue = DeathModeLaserBreathGateValue; + if (calamityGlobalNPC.newAI[0] < laserBreathGateValue) + calamityGlobalNPC.newAI[0] += 1f; + + // Sync newAI every 20 frames for the new telegraph + if (calamityGlobalNPC.newAI[0] % 20f == 0f) + npc.SyncExtraAI(); + + if ((player.Center - npc.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(npc.velocity.ToRotation(), MathHelper.PiOver4) == npc.velocity.ToRotation() && + calamityGlobalNPC.newAI[0] >= laserBreathGateValue && Vector2.Distance(npc.Center, player.Center) > 480f && + Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) + { + if (calamityGlobalNPC.newAI[0] % 30f == 0f) { - default: - case 0: - break; - - case 1: - type = ModContent.ProjectileType(); - break; - - case 2: - type = ModContent.ProjectileType(); - break; - } - int damage = npc.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; - int numProj = calamityGlobalNPC.newAI[0] % 60f == 0f ? (masterMode ? 9 : 7) : (masterMode ? 6 : 4); - int spread = masterMode ? 38 : 26; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - if (Main.netMode != NetmodeID.MultiplayerClient) + float velocity = bossRush ? 6f : death ? 5.333f : 5f; + int type = ProjectileID.DeathLaser; + switch (calamityGlobalNPC.destroyerLaserColor) { + default: + case 0: + break; + + case 1: + type = ModContent.ProjectileType(); + break; + + case 2: + type = ModContent.ProjectileType(); + break; + } + int damage = npc.GetProjectileDamage(type); + + // Reduce mech boss projectile damage depending on the new ore progression changes + if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + { + double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; + double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; + if (!NPC.downedMechBossAny) + damage = (int)(damage * firstMechMultiplier); + else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) + damage = (int)(damage * secondMechMultiplier); + } + + Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; + int numProj = calamityGlobalNPC.newAI[0] % 60f == 0f ? (masterMode ? 9 : 7) : (masterMode ? 6 : 4); + int spread = masterMode ? 38 : 26; + float rotation = MathHelper.ToRadians(spread); + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 100f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f, 0f); Main.projectile[proj].timeLeft = 1200; } } - } - calamityGlobalNPC.newAI[0] += 1f; - if (calamityGlobalNPC.newAI[0] > laserBreathGateValue + 60f) - { - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); - npc.SyncExtraAI(); + calamityGlobalNPC.newAI[0] += 1f; + if (calamityGlobalNPC.newAI[0] > laserBreathGateValue + 60f) + { + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.destroyerLaserColor = -1; + npc.SyncDestroyerLaserColor(); + npc.SyncExtraAI(); + } } } } - } - // Fire lasers - if (npc.type == NPCID.TheDestroyerBody) - { - bool ableToFireLaser = calamityGlobalNPC.destroyerLaserColor != -1; - - // Set laser color and type - if (calamityGlobalNPC.destroyerLaserColor == -1 && !probeLaunched) + // Fire lasers + if (npc.type == NPCID.TheDestroyerBody) { - if (Main.rand.NextBool(masterMode ? OneInXChanceToFireLaser / (phase5 ? 4 : phase4 ? 3 : 2) : OneInXChanceToFireLaser)) + bool ableToFireLaser = calamityGlobalNPC.destroyerLaserColor != -1; + + // Set laser color and type + if (calamityGlobalNPC.destroyerLaserColor == -1 && !probeLaunched) { - int random = phase3 ? 4 : phase2 ? 3 : 2; - switch (Main.rand.Next(random)) + if (Main.rand.NextBool(masterMode ? OneInXChanceToFireLaser / (phase5 ? 4 : phase4 ? 3 : 2) : OneInXChanceToFireLaser)) { - case 0: - case 1: - calamityGlobalNPC.destroyerLaserColor = 0; - break; - case 2: - calamityGlobalNPC.destroyerLaserColor = 1; - break; - case 3: + int random = phase3 ? 4 : phase2 ? 3 : 2; + switch (Main.rand.Next(random)) + { + case 0: + case 1: + calamityGlobalNPC.destroyerLaserColor = 0; + break; + case 2: + calamityGlobalNPC.destroyerLaserColor = 1; + break; + case 3: + calamityGlobalNPC.destroyerLaserColor = 2; + break; + } + + if (calamityGlobalNPC.newAI[2] > 0f || bossRush) calamityGlobalNPC.destroyerLaserColor = 2; - break; + + npc.SyncDestroyerLaserColor(); } + } - if (calamityGlobalNPC.newAI[2] > 0f || bossRush) - calamityGlobalNPC.destroyerLaserColor = 2; - + if (probeLaunched && ableToFireLaser) + { + calamityGlobalNPC.destroyerLaserColor = -1; npc.SyncDestroyerLaserColor(); } - } - if (probeLaunched && ableToFireLaser) - { - calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); - } + // Laser rate of fire + float shootProjectileTime = death ? (masterMode ? (phase5 ? 120f : phase4 ? 150f : 180f) : 270f) : (masterMode ? (phase5 ? 150f : phase4 ? 210f : 270f) : 450f); + float bodySegmentTime = npc.ai[0] * (masterMode ? 20f : 30f); + float shootProjectileGateValue = bodySegmentTime + shootProjectileTime; + float laserTimerIncrement = (calamityGlobalNPC.newAI[0] > shootProjectileGateValue - LaserTelegraphTime) ? 1f : 2f; + if (ableToFireLaser) + calamityGlobalNPC.newAI[0] += laserTimerIncrement; - // Laser rate of fire - float shootProjectileTime = death ? (masterMode ? (phase5 ? 120f : phase4 ? 150f : 180f) : 270f) : (masterMode ? (phase5 ? 150f : phase4 ? 210f : 270f) : 450f); - float bodySegmentTime = npc.ai[0] * (masterMode ? 20f : 30f); - float shootProjectileGateValue = bodySegmentTime + shootProjectileTime; - float laserTimerIncrement = (calamityGlobalNPC.newAI[0] > shootProjectileGateValue - LaserTelegraphTime) ? 1f : 2f; - if (ableToFireLaser) - calamityGlobalNPC.newAI[0] += laserTimerIncrement; - - // Sync newAI every 20 frames for the new telegraph - if (calamityGlobalNPC.newAI[0] % 20f == 0f && ableToFireLaser) - npc.SyncExtraAI(); - - Color telegraphColor = Color.Transparent; - switch (calamityGlobalNPC.destroyerLaserColor) - { - case 0: - telegraphColor = Color.Red; - break; - case 1: - telegraphColor = Color.Green; - break; - case 2: - telegraphColor = Color.Cyan; - break; - } - - if (calamityGlobalNPC.newAI[0] == shootProjectileGateValue - LaserTelegraphTime) - { - Particle telegraph = new DestroyerReticleTelegraph( - npc, - telegraphColor, - 1.5f, - 0.15f, - (int)LaserTelegraphTime); - GeneralParticleHandler.SpawnParticle(telegraph); - } - - if (calamityGlobalNPC.newAI[0] == shootProjectileGateValue - SparkTelegraphTime) - { - Particle spark = new DestroyerSparkTelegraph( - npc, - telegraphColor * 2f, - Color.White, - 3f, - 30, - Main.rand.NextFloat(MathHelper.ToRadians(3f)) * Main.rand.NextBool().ToDirectionInt()); - GeneralParticleHandler.SpawnParticle(spark); - } - - // Shoot lasers - // Shoot nothing if probe has been launched - if (calamityGlobalNPC.newAI[0] >= shootProjectileGateValue && ableToFireLaser) - { - if (!masterMode) - { - int numProbeSegments = 0; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == npc.type && Main.npc[i].ai[2] == 0f) - numProbeSegments++; - } - float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); - float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); - calamityGlobalNPC.newAI[0] = laserShootTimeBonus; + // Sync newAI every 20 frames for the new telegraph + if (calamityGlobalNPC.newAI[0] % 20f == 0f && ableToFireLaser) npc.SyncExtraAI(); - npc.TargetClosest(); + + Color telegraphColor = Color.Transparent; + switch (calamityGlobalNPC.destroyerLaserColor) + { + case 0: + telegraphColor = Color.Red; + break; + case 1: + telegraphColor = Color.Green; + break; + case 2: + telegraphColor = Color.Cyan; + break; } - if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) + if (calamityGlobalNPC.newAI[0] == shootProjectileGateValue - LaserTelegraphTime) { - if (masterMode) + Particle telegraph = new DestroyerReticleTelegraph( + npc, + telegraphColor, + 1.5f, + 0.15f, + (int)LaserTelegraphTime); + GeneralParticleHandler.SpawnParticle(telegraph); + } + + if (calamityGlobalNPC.newAI[0] == shootProjectileGateValue - SparkTelegraphTime) + { + Particle spark = new DestroyerSparkTelegraph( + npc, + telegraphColor * 2f, + Color.White, + 3f, + 30, + Main.rand.NextFloat(MathHelper.ToRadians(3f)) * Main.rand.NextBool().ToDirectionInt()); + GeneralParticleHandler.SpawnParticle(spark); + } + + // Shoot lasers + // Shoot nothing if probe has been launched + if (calamityGlobalNPC.newAI[0] >= shootProjectileGateValue && ableToFireLaser) + { + if (!masterMode) { int numProbeSegments = 0; for (int i = 0; i < Main.maxNPCs; i++) @@ -573,65 +552,80 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.TargetClosest(); } - // Laser speed - float projectileSpeed = (masterMode ? 4.5f : 3.5f) + Main.rand.NextFloat() * 1.5f; - projectileSpeed += enrageScale; - - // Set projectile damage and type - int projectileType = ProjectileID.DeathLaser; - switch (calamityGlobalNPC.destroyerLaserColor) + if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) { - default: - case 0: - break; + if (masterMode) + { + int numProbeSegments = 0; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == npc.type && Main.npc[i].ai[2] == 0f) + numProbeSegments++; + } + float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); + float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); + calamityGlobalNPC.newAI[0] = laserShootTimeBonus; + npc.SyncExtraAI(); + npc.TargetClosest(); + } - case 1: - projectileType = ModContent.ProjectileType(); - break; + // Laser speed + float projectileSpeed = (masterMode ? 4.5f : 3.5f) + Main.rand.NextFloat() * 1.5f; + projectileSpeed += enrageScale; - case 2: - projectileType = ModContent.ProjectileType(); - break; - } + // Set projectile damage and type + int projectileType = ProjectileID.DeathLaser; + switch (calamityGlobalNPC.destroyerLaserColor) + { + default: + case 0: + break; - // Get target vector - Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * projectileSpeed; - Vector2 projectileSpawn = npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 100f; + case 1: + projectileType = ModContent.ProjectileType(); + break; - // Shoot projectile - int damage = npc.GetProjectileDamage(projectileType); + case 2: + projectileType = ModContent.ProjectileType(); + break; + } - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } + // Get target vector + Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * projectileSpeed; + Vector2 projectileSpawn = npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 100f; + + // Shoot projectile + int damage = npc.GetProjectileDamage(projectileType); + + // Reduce mech boss projectile damage depending on the new ore progression changes + if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + { + double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; + double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; + if (!NPC.downedMechBossAny) + damage = (int)(damage * firstMechMultiplier); + else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) + damage = (int)(damage * secondMechMultiplier); + } - if (Main.netMode != NetmodeID.MultiplayerClient) - { int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, damage, 0f, Main.myPlayer, 1f, 0f); Main.projectile[proj].timeLeft = 1200; + + npc.netUpdate = true; + + if (masterMode) + { + calamityGlobalNPC.destroyerLaserColor = -1; + npc.SyncDestroyerLaserColor(); + } } - npc.netUpdate = true; - - if (masterMode) + if (!masterMode) { calamityGlobalNPC.destroyerLaserColor = -1; npc.SyncDestroyerLaserColor(); } } - - if (!masterMode) - { - calamityGlobalNPC.destroyerLaserColor = -1; - npc.SyncDestroyerLaserColor(); - } } } From f211619070bdc38cb79c61ace4e58fe08f4a008c Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 15 May 2024 13:44:43 +0700 Subject: [PATCH 180/197] Cinder Arrow split fix probably (other code changes have no effect) --- Projectiles/Ranged/CinderArrowProj.cs | 50 ++++++++++++--------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/Projectiles/Ranged/CinderArrowProj.cs b/Projectiles/Ranged/CinderArrowProj.cs index e4bef88e38..3b599fa134 100644 --- a/Projectiles/Ranged/CinderArrowProj.cs +++ b/Projectiles/Ranged/CinderArrowProj.cs @@ -13,7 +13,10 @@ namespace CalamityMod.Projectiles.Ranged { public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Items/Ammo/CinderArrow"; - public bool isShrapnel = false; + + public ref float Time => ref Projectile.ai[1]; + public bool isShrapnel => Projectile.ai[2] > 0f; + public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; @@ -21,13 +24,12 @@ namespace CalamityMod.Projectiles.Ranged } public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.arrow = true; Projectile.penetrate = 1; - Projectile.extraUpdates = 1; + Projectile.MaxUpdates = 2; Projectile.timeLeft = 600; Projectile.aiStyle = ProjAIStyleID.Arrow; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; @@ -37,22 +39,10 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - if (Projectile.ai[1] == 0) - { - isShrapnel = Projectile.ai[2] == 1; - if (isShrapnel) - { - Projectile.velocity *= 0.5f; - Projectile.timeLeft = 300; - } - } - Projectile.ai[1]++; + Time++; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; if (isShrapnel) { - Projectile.arrow = false; - Projectile.extraUpdates = 3; - if (Main.rand.NextBool(4)) { Dust dust = Dust.NewDustPerfect(Projectile.Center + Projectile.velocity * 2, 90, -Projectile.velocity * Main.rand.NextFloat(0.1f, 0.55f)); @@ -63,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged else { Lighting.AddLight(Projectile.Center, Color.Red.ToVector3() * 0.3f); - if (Projectile.ai[1] > 4 && Main.rand.NextBool(3)) + if (Time > 4f && Main.rand.NextBool(3)) { float velMulti = Main.rand.NextFloat(0.1f, 0.75f); Dust dust = Dust.NewDustPerfect(Projectile.Center + Projectile.velocity * 2, 90, -Projectile.velocity.RotatedBy(0.45) * velMulti); @@ -95,18 +85,22 @@ namespace CalamityMod.Projectiles.Ranged } SoundEngine.PlaySound(SoundID.Item69 with { Volume = 0.35f, Pitch = 1f, PitchVariance = 0.15f }, Projectile.Center); + if (Main.myPlayer != Projectile.owner) + return; + for (int b = 0; b < 3; b++) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0, -10).RotatedByRandom(0.8f) * Main.rand.NextFloat(0.9f, 1.1f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner, 0f, 0f, 1f); + Vector2 velocity = Vector2.UnitY.RotatedByRandom(0.8f) * Main.rand.NextFloat(-2.75f, -2.25f); + Projectile shrapnel = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner, ai2: 1f); + shrapnel.timeLeft = 300; + shrapnel.arrow = false; + shrapnel.MaxUpdates = 4; } - if (Projectile.owner == Main.myPlayer) - { - Projectile.damage = (int)(Projectile.damage * 0.5f); - Projectile.penetrate = -1; - Projectile.ExpandHitboxBy(110); - Projectile.Damage(); - } + Projectile.damage = (int)(Projectile.damage * 0.5f); + Projectile.penetrate = -1; + Projectile.ExpandHitboxBy(110); + Projectile.Damage(); } } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -127,12 +121,12 @@ namespace CalamityMod.Projectiles.Ranged else { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Ranged/BloodfireBulletProj").Value; - if (Projectile.ai[1] > 6) + if (Time > 6f) CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White * 0.3f, 1, texture); return true; } } - public override bool? CanDamage() => isShrapnel && Projectile.ai[1] < 20 ? false : null; + public override bool? CanDamage() => isShrapnel && Time < 20 ? false : null; } } From b46ba38512330596565db8b31d901c5e80c40595 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 15 May 2024 14:01:53 +0700 Subject: [PATCH 181/197] AdrenalineMode buff description fix --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 1d3a76f5c4..7a8bcf9910 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -634,7 +634,7 @@ AbyssalMadness: { AdrenalineMode: { DisplayName: Adrenaline Mode - Description: Total damage multiplied by 3x. Can be boosted by other items up to 3.45x + Description: Total damage multiplied by 2.5x. Can be boosted by other items up to 3.1x } Afflicted: { From a00e36c0561999ff72af5831da8a1311f36ecd49 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 15 May 2024 14:07:24 +0700 Subject: [PATCH 182/197] Fix Hermit's Box use not spawning the pet on click Also it having right click function for no purpose --- Items/Pets/HermitsBoxofOneHundredMedicines.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Items/Pets/HermitsBoxofOneHundredMedicines.cs b/Items/Pets/HermitsBoxofOneHundredMedicines.cs index 629e1afcc0..1c0be6bd28 100644 --- a/Items/Pets/HermitsBoxofOneHundredMedicines.cs +++ b/Items/Pets/HermitsBoxofOneHundredMedicines.cs @@ -31,8 +31,12 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override bool AltFunctionUse(Player player) => true; - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) => false; + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(Item.buffType, 3600, true); + } + } } } From 52e70205789d64f62115939f69630ce0b93afd8b Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 15 May 2024 14:49:43 +0700 Subject: [PATCH 183/197] obliterated bad apostrophes --- Localization/en-US/Mods.CalamityMod.UI.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index eaad64726a..7fbda27580 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -198,7 +198,7 @@ Communication: { ''' My first memories are that of awakening in a distant laboratory on the date of 11.19.1227, well over six centuries ago. Surrounded by nothing but a vast taiga, I was accompanied by only one other thing: a dead organic.\n - Presumably, I was created by what I assume to be the laboratory’s former inhabitant, though I am unsure how they accomplished such a feat. From what I gathered, they were quite the prestigious inventor, not unlike I. Several gadgets assumedly of their own making were attached to their body, and the equipment in the lab was more advanced than any I found elsewhere in the world.\n + Presumably, I was created by what I assume to be the laboratory's former inhabitant, though I am unsure how they accomplished such a feat. From what I gathered, they were quite the prestigious inventor, not unlike I. Several gadgets assumedly of their own making were attached to their body, and the equipment in the lab was more advanced than any I found elsewhere in the world.\n I have no recollection of events prior to my activation, but from the start, I knew what my goal was: creation and scientific advancement. Many years were spent optimizing and building upon both the laboratory and myself to assure constant progress.\n @@ -222,7 +222,7 @@ Communication: { However, what I am most notorious for are my hulking machines of war. I am certain that you are familiar with them. Though Yharim was almost sycophantic in his praise of my results, even if he sometimes questioned my methods, our time together came to an abrupt end after he learned of the Plaguebringer Goliath. Regrettably, this event left a sizable hole in my laboratory. No longer subject to his restrictions, my work on cloning the Witch and creating exotechnology began.\n - My role in the Crusade summarily ended; I do not consider the later inclusion of exotechnology into Yharim’s armor a formal part of my work under him. Yharim's knights and other troops continued to use my "Arsenal" in their military efforts, but I no longer oversaw their research or production.\n + My role in the Crusade summarily ended; I do not consider the later inclusion of exotechnology into Yharim's armor a formal part of my work under him. Yharim's knights and other troops continued to use my "Arsenal" in their military efforts, but I no longer oversaw their research or production.\n The Crusade did not obstruct or interfere with my core objective of creation and scientific advancement; rather, it simply redirected my focus. Through it, I gained novel insights and reached heights I would not have reached without playing a part in it. I appreciate having had the opportunity to work with some of the greatest organic minds of the time, and I hope those that are still alive will bring progress to a plethora of fields I have yet to explore. ''' From be6247b058b0b1ecbfa8a119e457d5ac28b4b562 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 15 May 2024 08:49:57 -0400 Subject: [PATCH 184/197] Thorn Ball visibility improvements --- Projectiles/Boss/ThornBallSpike.cs | 4 +++- Projectiles/Boss/ThornBallSpike.png | Bin 263 -> 304 bytes Projectiles/CalamityGlobalProjectile.cs | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Projectiles/Boss/ThornBallSpike.cs b/Projectiles/Boss/ThornBallSpike.cs index f3db9317e9..86d5b8d957 100644 --- a/Projectiles/Boss/ThornBallSpike.cs +++ b/Projectiles/Boss/ThornBallSpike.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Boss { if (Projectile.velocity.Length() < MaxVelocity) { - Projectile.velocity *= 1.05f; + Projectile.velocity *= 1.045f; if (Projectile.velocity.Length() > MaxVelocity) { Projectile.velocity.Normalize(); @@ -58,6 +58,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Venom, 90); + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha); + public override bool PreDraw(ref Color lightColor) { if (Projectile.timeLeft > TimeLeft - 5) diff --git a/Projectiles/Boss/ThornBallSpike.png b/Projectiles/Boss/ThornBallSpike.png index a1be17ccd9c9d03017fb77e27eefe5fe8d18885b..9253275e890662c3b017f078fd4cb34ed6ac5351 100644 GIT binary patch delta 261 zcmV+g0s8)j0fhSmY1W=zd6|Sfv(N9!9(}#kOpxki-G8@&l)+uXQXQqZLoVmc`H#N@*C_C zeZk2l;oW|9sgUi`B3<&0z}p{RTO%q&5(9i~bx|uSnw{q-ru&2n5p6*4Gqz9N30#00000 LNkvXXu0mjfMfq)4 delta 220 zcmV<203-jf0*3-2iBL{Q4GJ0x0000DNk~Le0000C0000K2nGNE0J-qo5s@J^f1F7~ zK~y+TW55McWMuw>Fq8`iOi-F=zzC(`0A{L!FgKY0;O$p1J?F_2uv(IBz^Oq;MG%b9 z0rhOa1<2O`3wKcHfUv2wC>THZ^b3q(fO03nLg)0;*I8VfdK$l WCop}*q~fmt0000sTxR diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 83f8b28779..45f9f892d1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4390,15 +4390,15 @@ namespace CalamityMod.Projectiles if (projectile.type == ProjectileID.ThornBall) { - float startTurningBrownGateValue = 420f; - float timeToReachFullBrown = 180f; - float timeToReachThornExplosion = startTurningBrownGateValue + timeToReachFullBrown; + float startWarningColorGateValue = 420f; + float timeToReachFullIntensity = 180f; + float timeToReachThornExplosion = startWarningColorGateValue + timeToReachFullIntensity; Color initialColor = lightColor; - Color finalColor = new Color(125, 75, 75); + Color finalColor = Color.Lerp(new Color(125, 75, 75), Color.Red, (float)Math.Abs(Math.Sin((projectile.ai[1] - startWarningColorGateValue) * (MathHelper.Pi / 45)))); finalColor.A = (byte)(255 - projectile.alpha); - if (projectile.ai[1] > startTurningBrownGateValue) + if (projectile.ai[1] > startWarningColorGateValue) { - float colorTransitionRatio = (projectile.ai[1] - startTurningBrownGateValue) / timeToReachFullBrown; + float colorTransitionRatio = (projectile.ai[1] - startWarningColorGateValue) / timeToReachFullIntensity; Color dehydratedColor = Color.Lerp(initialColor, finalColor, colorTransitionRatio); return dehydratedColor; } From 74938d3115af2dac474cd1327770cb7ba75f2516 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Wed, 15 May 2024 08:55:24 -0400 Subject: [PATCH 185/197] Fixed Tombstone tooltips being outdated --- Items/CalamityGlobalItemTooltip.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index dcf49bcac9..2e4827495f 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -326,7 +326,7 @@ namespace CalamityMod.Items // There are no item sets for tombstones wtf if (item.type == ItemID.Tombstone || item.type == ItemID.GraveMarker || item.type == ItemID.CrossGraveMarker || item.type == ItemID.Headstone || item.type == ItemID.Gravestone || item.type == ItemID.Obelisk || item.type == ItemID.RichGravestone1 || item.type == ItemID.RichGravestone2 || item.type == ItemID.RichGravestone3 || item.type == ItemID.RichGravestone4 || item.type == ItemID.RichGravestone5) - EditTooltipByName("Material", (line) => line.Text += "\n20 of any tombstone turns the surrounding area into a graveyard" + EditTooltipByName("Material", (line) => line.Text += "\n13 of any tombstone turns the surrounding area into a graveyard" + "\nGraveyards have various new item sales and recipes"); // Eternity Crystal notifies the player that they can accelerate the invasion From 8550d2247b5f3f297adc8852e392dd254d7df027 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 15 May 2024 11:14:45 -0400 Subject: [PATCH 186/197] Fixed Giant Clam having 9999 defense until it enters and exits hiding once --- NPCs/SunkenSea/GiantClam.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index fec26d9caa..6e520e527b 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -150,6 +150,8 @@ namespace CalamityMod.NPCs.SunkenSea // Avoid cheap bullshit NPC.damage = 0; + NPC.defense = Main.hardMode ? 35 : 10; + NPC.ai[0] += 1f; hide = false; } From 28ae7ef9e8908bf23ff51985615325d59fcef740 Mon Sep 17 00:00:00 2001 From: Memes Date: Wed, 15 May 2024 18:37:30 +0200 Subject: [PATCH 187/197] Added some syncing to base holdouts. --- .../BaseGunHoldoutProjectile.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs index f231b4f8d2..2a541aedb9 100644 --- a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -246,5 +247,39 @@ namespace CalamityMod.Projectiles.BaseProjectiles } #endregion + + #region Syncying + + public sealed override void SendExtraAI(BinaryWriter writer) + { + writer.Write(Projectile.rotation); + writer.Write(KeepRefreshingLifetime); + writer.Write(OffsetLengthFromArm); + SendExtraAIHoldout(writer); + } + + public sealed override void ReceiveExtraAI(BinaryReader reader) + { + Projectile.rotation = reader.ReadSingle(); + KeepRefreshingLifetime = reader.ReadBoolean(); + OffsetLengthFromArm = reader.ReadSingle(); + ReceiveExtraAIHoldout(reader); + } + + ///