From 403cd9173334def11f99baae66361b86b576ddfa Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 11 Jun 2022 21:42:19 -0400 Subject: [PATCH] Renamed AEW --- CalamityLists.cs | 2 +- CalamityMod.cs | 4 ++-- DataStructures/NPCStats.cs | 12 ++++++------ ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/Abyss/EidolonWyrmHead.cs | 2 +- NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs | 2 +- NPCs/AdultEidolonWyrm/AEWSky.cs | 2 +- ...nWyrmBodyHuge.cs => AdultEidolonWyrmBody.cs} | 12 ++++++------ ...yrmBodyHuge.png => AdultEidolonWyrmBody.png} | Bin ...odyAltHuge.cs => AdultEidolonWyrmBodyAlt.cs} | 16 ++++++++-------- ...yAltHuge.png => AdultEidolonWyrmBodyAlt.png} | Bin ...Huge.png => AdultEidolonWyrmBodyAltGlow.png} | Bin ...lowHuge.png => AdultEidolonWyrmBodyGlow.png} | Bin ...nWyrmHeadHuge.cs => AdultEidolonWyrmHead.cs} | 12 ++++++------ ...yrmHeadHuge.png => AdultEidolonWyrmHead.png} | Bin ...lowHuge.png => AdultEidolonWyrmHeadGlow.png} | Bin ...s.png => AdultEidolonWyrmHead_Head_Boss.png} | Bin ...nWyrmTailHuge.cs => AdultEidolonWyrmTail.cs} | 12 ++++++------ ...yrmTailHuge.png => AdultEidolonWyrmTail.png} | Bin ...lowHuge.png => AdultEidolonWyrmTailGlow.png} | Bin NPCs/CalamityGlobalNPC.cs | 8 ++++---- NPCs/NormalNPCs/Eidolist.cs | 2 +- NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs | 10 +++++----- Scenes/AEWBackgroundScene.cs | 2 +- Systems/WorldMiscUpdateSystem.cs | 2 +- UI/SpeedrunTimerUI.cs | 2 +- Utilities/NPCDebuffs.cs | 8 ++++---- 27 files changed, 56 insertions(+), 56 deletions(-) rename NPCs/AdultEidolonWyrm/{EidolonWyrmBodyHuge.cs => AdultEidolonWyrmBody.cs} (93%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmBodyHuge.png => AdultEidolonWyrmBody.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmBodyAltHuge.cs => AdultEidolonWyrmBodyAlt.cs} (90%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmBodyAltHuge.png => AdultEidolonWyrmBodyAlt.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmBodyAltGlowHuge.png => AdultEidolonWyrmBodyAltGlow.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmBodyGlowHuge.png => AdultEidolonWyrmBodyGlow.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmHeadHuge.cs => AdultEidolonWyrmHead.cs} (99%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmHeadHuge.png => AdultEidolonWyrmHead.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmHeadGlowHuge.png => AdultEidolonWyrmHeadGlow.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmHeadHuge_Head_Boss.png => AdultEidolonWyrmHead_Head_Boss.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmTailHuge.cs => AdultEidolonWyrmTail.cs} (91%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmTailHuge.png => AdultEidolonWyrmTail.png} (100%) rename NPCs/AdultEidolonWyrm/{EidolonWyrmTailGlowHuge.png => AdultEidolonWyrmTailGlow.png} (100%) diff --git a/CalamityLists.cs b/CalamityLists.cs index af88671d63..95d4929b45 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -2605,7 +2605,7 @@ namespace CalamityMod { NPCType(), 41 }, { NPCType(), 41 }, { NPCType(), 41 }, - { NPCType(), 42 }, + { NPCType(), 42 }, { NPCID.QueenSlimeBoss, 43 }, { NPCID.HallowBoss, 44 }, { NPCID.Deerclops, 45 } diff --git a/CalamityMod.cs b/CalamityMod.cs index 87daf4267e..8728c39201 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -620,7 +620,7 @@ namespace CalamityMod { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 18000 }, // 5:00 (300 seconds) - { ModContent.NPCType(), 18000 } // 5:00 (300 seconds) + { ModContent.NPCType(), 18000 } // 5:00 (300 seconds) }; } #endregion @@ -738,7 +738,7 @@ namespace CalamityMod { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), velocityScaleMin }, - { ModContent.NPCType(), bitingEnemeyVelocityScale } + { ModContent.NPCType(), bitingEnemeyVelocityScale } }; } #endregion diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index ad41b79d70..09d6b9a512 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -290,7 +290,7 @@ namespace CalamityMod { ModContent.NPCType(), 0.8 }, { ModContent.NPCType(), 0.8 }, - { ModContent.NPCType(), 0.8 } + { ModContent.NPCType(), 0.8 } }; EnemyStats.ContactDamageValues = new SortedDictionary @@ -541,7 +541,7 @@ namespace CalamityMod { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, { ModContent.NPCType(), new int[] { 260, 416, 446, 464, 570 } }, - { ModContent.NPCType(), new int[] { 400, 800, 850, 880, 1000 } } + { ModContent.NPCType(), new int[] { 400, 800, 850, 880, 1000 } } }; EnemyStats.ProjectileDamageValues = new SortedDictionary, int[]> @@ -809,10 +809,10 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 710, 728, 1062 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossFireBallClone), new int[] { 400, 600, 632, 648, 948 } } + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossFireBallClone), new int[] { 400, 600, 632, 648, 948 } } }; } diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 957829e114..0162a2f951 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -625,7 +625,7 @@ namespace CalamityMod // Adult Eidolon Wyrm { BossDifficulty.TryGetValue("AdultEidolonWyrm", out float order); - int type = NPCType(); + int type = NPCType(); int summon = ItemID.RodofDiscord; List loot = new List() { ItemType(), ItemType(), ItemID.Ectoplasm, ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { }; diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 78d02434cc..7a4d1727bf 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -500,7 +500,7 @@ namespace CalamityMod.NPCs.Abyss public override void ModifyNPCLoot(NPCLoot npcLoot) { // Never drop anything if this Eidolon Wyrm is a minion during an AEW fight. - var aewMinionCondition = npcLoot.DefineConditionalDropSet(EidolonWyrmHeadHuge.CanMinionsDropThings); + var aewMinionCondition = npcLoot.DefineConditionalDropSet(AdultEidolonWyrmHead.CanMinionsDropThings); // 30-40 Voidstone aewMinionCondition.Add(ModContent.ItemType(), 1, 30, 40); diff --git a/NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs b/NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs index e7b510fa5d..2beb8bea05 100644 --- a/NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs +++ b/NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm private void UpdateAEWIndex() { - int AEWType = ModContent.NPCType(); + int AEWType = ModContent.NPCType(); if (AEWIndex >= 0 && Main.npc[AEWIndex].active && Main.npc[AEWIndex].type == AEWType) { return; diff --git a/NPCs/AdultEidolonWyrm/AEWSky.cs b/NPCs/AdultEidolonWyrm/AEWSky.cs index 177e0d607c..79c171874f 100644 --- a/NPCs/AdultEidolonWyrm/AEWSky.cs +++ b/NPCs/AdultEidolonWyrm/AEWSky.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm private bool UpdateAEWIndex() { - int AEWType = ModContent.NPCType(); + int AEWType = ModContent.NPCType(); if (AEWIndex >= 0 && Main.npc[AEWIndex].active && Main.npc[AEWIndex].type == AEWType) { return true; diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.cs b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBody.cs similarity index 93% rename from NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.cs rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmBody.cs index 9c92717668..f083f03729 100644 --- a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.cs +++ b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBody.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AdultEidolonWyrm { - public class EidolonWyrmBodyHuge : ModNPC + public class AdultEidolonWyrmBody : ModNPC { public override void SetStaticDefaults() { @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) { shouldDespawn = false; break; @@ -97,8 +97,8 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm float chargePhaseGateValue = malice ? 120f : death ? 180f : revenge ? 210f : expertMode ? 240f : 300f; float lightningChargePhaseGateValue = malice ? 90f : death ? 120f : revenge ? 135f : expertMode ? 150f : 180f; - bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); - bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; + bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.LightningCharge; bool invisiblePhase = calamityGlobalNPC_Head.newAI[0] == 1f || calamityGlobalNPC_Head.newAI[0] == 5f || calamityGlobalNPC_Head.newAI[0] == 7f; if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { @@ -116,8 +116,8 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm NPC.Opacity = 0f; } - bool spawnAncientLights = (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ShadowFireballSpin && calamityGlobalNPC_Head.newAI[2] > 0f) || - (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FinalPhase && calamityGlobalNPC_Head.newAI[1] > 0f); + bool spawnAncientLights = (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ShadowFireballSpin && calamityGlobalNPC_Head.newAI[2] > 0f) || + (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.FinalPhase && calamityGlobalNPC_Head.newAI[1] > 0f); if (spawnAncientLights && Main.netMode != NetmodeID.MultiplayerClient) { if (Vector2.Distance(NPC.Center, Main.player[Main.npc[(int)NPC.ai[2]].target].Center) > 160f) diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBody.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmBody.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.cs b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAlt.cs similarity index 90% rename from NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.cs rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAlt.cs index e9b65c4995..b4bbb65c17 100644 --- a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAlt.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AdultEidolonWyrm { - public class EidolonWyrmBodyAltHuge : ModNPC + public class AdultEidolonWyrmBodyAlt : ModNPC { public override void SetStaticDefaults() { @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) { shouldDespawn = false; break; @@ -97,8 +97,8 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm float chargePhaseGateValue = malice ? 120f : death ? 180f : revenge ? 210f : expertMode ? 240f : 300f; float lightningChargePhaseGateValue = malice ? 90f : death ? 120f : revenge ? 135f : expertMode ? 150f : 180f; - bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); - bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; + bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.LightningCharge; bool invisiblePhase = calamityGlobalNPC_Head.newAI[0] == 1f || calamityGlobalNPC_Head.newAI[0] == 5f || calamityGlobalNPC_Head.newAI[0] == 7f; if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { @@ -116,8 +116,8 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm NPC.Opacity = 0f; } - bool shootShadowFireballs = (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ShadowFireballSpin && calamityGlobalNPC_Head.newAI[2] > 0f) || - (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FinalPhase && calamityGlobalNPC_Head.newAI[1] > 0f); + bool shootShadowFireballs = (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ShadowFireballSpin && calamityGlobalNPC_Head.newAI[2] > 0f) || + (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.FinalPhase && calamityGlobalNPC_Head.newAI[1] > 0f); if (shootShadowFireballs && Main.netMode != NetmodeID.MultiplayerClient) { if (Vector2.Distance(NPC.Center, Main.player[Main.npc[(int)NPC.ai[2]].target].Center) > 160f) @@ -185,9 +185,9 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); Vector2 vector11 = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); Vector2 vector = center - screenPos; - vector -= new Vector2(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge").Value.Width, ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge").Value.Height) * 0.5f; + vector -= new Vector2(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAltGlow").Value.Width, ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAltGlow").Value.Height) * 0.5f; vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge").Value, vector, + Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAltGlow").Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), Color.White, NPC.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAlt.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAlt.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAltGlow.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyAltGlow.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyGlow.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmBodyGlow.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs similarity index 99% rename from NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs index 9148237502..0b895b4ba6 100644 --- a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs +++ b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.cs @@ -23,7 +23,7 @@ using CalamityMod.Sounds; namespace CalamityMod.NPCs.AdultEidolonWyrm { [AutoloadBossHead] - public class EidolonWyrmHeadHuge : ModNPC + public class AdultEidolonWyrmHead : ModNPC { public enum Phase { @@ -225,12 +225,12 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm if (i >= 0 && i < minLength) { if (i % 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); + 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); + 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); + 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] = NPC.whoAmI; @@ -272,7 +272,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm { 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()) + 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].active = false; } } @@ -1367,7 +1367,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm return; } - Texture2D texture = ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge").Value; + Texture2D texture = ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHeadGlow").Value; SpriteEffects spriteEffects = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Vector2 center = NPC.Center; Main.spriteBatch.Draw(texture, center - screenPos, NPC.frame, Color.White, NPC.rotation, texture.Size() * 0.5f, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHeadGlow.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmHeadGlow.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge_Head_Boss.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead_Head_Boss.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge_Head_Boss.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmHead_Head_Boss.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.cs b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTail.cs similarity index 91% rename from NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.cs rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmTail.cs index cb7f3c3640..6c7965a47f 100644 --- a/NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.cs +++ b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTail.cs @@ -9,7 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AdultEidolonWyrm { - public class EidolonWyrmTailHuge : ModNPC + public class AdultEidolonWyrmTail : ModNPC { public override void SetStaticDefaults() { @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) { shouldDespawn = false; break; @@ -86,8 +86,8 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm float chargePhaseGateValue = malice ? 120f : death ? 180f : revenge ? 210f : expertMode ? 240f : 300f; float lightningChargePhaseGateValue = malice ? 90f : death ? 120f : revenge ? 135f : expertMode ? 150f : 180f; - bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); - bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; + bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)AdultEidolonWyrmHead.Phase.LightningCharge; bool invisiblePhase = calamityGlobalNPC_Head.newAI[0] == 1f || calamityGlobalNPC_Head.newAI[0] == 5f || calamityGlobalNPC_Head.newAI[0] == 7f; if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { @@ -150,9 +150,9 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); Vector2 vector11 = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); Vector2 vector = center - screenPos; - vector -= new Vector2(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge").Value.Width, ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge").Value.Height) * 0.5f; + vector -= new Vector2(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTailGlow").Value.Width, ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTailGlow").Value.Height) * 0.5f; vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge").Value, vector, + Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTailGlow").Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), Color.White, NPC.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTail.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmTail.png diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrmTailGlow.png similarity index 100% rename from NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrmTailGlow.png diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ac384494cd..14ac100b49 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -511,7 +511,7 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref draedonExoMechPrime, NPCType()); ResetSavedIndex(ref draedonExoMechPrimePlasmaCannon, NPCType()); - ResetSavedIndex(ref adultEidolonWyrmHead, NPCType()); + ResetSavedIndex(ref adultEidolonWyrmHead, NPCType()); // Reset the enraged state every frame. The expectation is that bosses will continuously set it back to true if necessary. CurrentlyEnraged = false; @@ -2768,7 +2768,7 @@ namespace CalamityMod.NPCs // Adult Wyrm Ancient Doom if (npc.type == NPCID.AncientDoom) { - if (Main.npc[(int)npc.ai[0]].type == NPCType()) + if (Main.npc[(int)npc.ai[0]].type == NPCType()) return CultistAI.BuffedAncientDoomAI(npc, Mod); } @@ -5781,7 +5781,7 @@ namespace CalamityMod.NPCs { return DownedBossSystem.downedSCal; } - else if (type == NPCType()) + else if (type == NPCType()) { return DownedBossSystem.downedAdultEidolonWyrm; } @@ -5852,7 +5852,7 @@ namespace CalamityMod.NPCs if (target.damage > 0 && !target.boss && !target.friendly && !target.dontTakeDamage && target.type != NPCID.Creeper && target.type != NPCType() && target.type != NPCID.MourningWood && target.type != NPCID.Everscream && target.type != NPCID.SantaNK1 && target.type != NPCType() && target.type != NPCType() && target.type != NPCType() && target.type != NPCType() && target.type != NPCID.GolemFistLeft && target.type != NPCID.GolemFistRight && - target.type != NPCType() && target.type != NPCType() && target.type != NPCID.DD2Betsy && !CalamityLists.enemyImmunityList.Contains(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type)) + target.type != NPCType() && target.type != NPCType() && target.type != NPCID.DD2Betsy && !CalamityLists.enemyImmunityList.Contains(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type)) { return true; } diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index 7ab9784eba..512759deab 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -345,7 +345,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void ModifyNPCLoot(NPCLoot npcLoot) { // Never drop anything if this Eidolon Wyrm is a minion during an AEW fight. - var aewMinionCondition = npcLoot.DefineConditionalDropSet(EidolonWyrmHeadHuge.CanMinionsDropThings); + var aewMinionCondition = npcLoot.DefineConditionalDropSet(AdultEidolonWyrmHead.CanMinionsDropThings); LeadingConditionRule notDuringCultistFight = new LeadingConditionRule(DropHelper.If(() => !NPC.LunarApocalypseIsUp)); notDuringCultistFight.Add(ModContent.ItemType(), 4); diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index b0aec3b8e5..fee1ff0b3d 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -1090,12 +1090,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float lifeRatio = Main.npc[(int)npc.ai[0]].life / (float)Main.npc[(int)npc.ai[0]].lifeMax; bool phase2 = lifeRatio < 0.7f; - bool phase3 = lifeRatio < (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType() ? 0.6f : 0.55f); + bool phase3 = lifeRatio < (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType() ? 0.6f : 0.55f); bool phase4 = lifeRatio < 0.4f; bool kill = npc.ai[1] < 0f || !Main.npc[(int)npc.ai[0]].active; int target = Main.maxPlayers; - if (Main.npc[(int)npc.ai[0]].type == NPCID.CultistBoss || Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) + if (Main.npc[(int)npc.ai[0]].type == NPCID.CultistBoss || Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) { if (target == Main.maxPlayers) target = Main.npc[(int)npc.ai[0]].target; @@ -1106,7 +1106,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (phase4 || death) rateOfChange = 3; - if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) + if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) npc.dontTakeDamage = true; } else @@ -1128,7 +1128,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses double deg = npc.ai[3]; double rad = deg * (Math.PI / 180); double dist = 550; - if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) + if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) { float aiGateValue = Main.npc[(int)npc.ai[0]].Calamity().newAI[2] - 30f; int ancientDoomScale = (int)(aiGateValue / 120f); @@ -1181,7 +1181,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Triple damage if the Adult Eidolon Wyrm is alive - if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) + if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) damage *= 3; kill = true; diff --git a/Scenes/AEWBackgroundScene.cs b/Scenes/AEWBackgroundScene.cs index 8eab961383..cc93756223 100644 --- a/Scenes/AEWBackgroundScene.cs +++ b/Scenes/AEWBackgroundScene.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Systems { public override SceneEffectPriority Priority => SceneEffectPriority.BossHigh; - public override bool IsSceneEffectActive(Player player) => NPC.AnyNPCs(ModContent.NPCType()); + public override bool IsSceneEffectActive(Player player) => NPC.AnyNPCs(ModContent.NPCType()); public override void SpecialVisuals(Player player) { diff --git a/Systems/WorldMiscUpdateSystem.cs b/Systems/WorldMiscUpdateSystem.cs index e7bddbcd1c..5722837ed7 100644 --- a/Systems/WorldMiscUpdateSystem.cs +++ b/Systems/WorldMiscUpdateSystem.cs @@ -426,7 +426,7 @@ namespace CalamityMod.Systems bool adultWyrmAlive = CalamityGlobalNPC.adultEidolonWyrmHead != -1 && Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active; if (!adultWyrmAlive) - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); } #endregion } diff --git a/UI/SpeedrunTimerUI.cs b/UI/SpeedrunTimerUI.cs index b0bec532bf..6fba8b8528 100644 --- a/UI/SpeedrunTimerUI.cs +++ b/UI/SpeedrunTimerUI.cs @@ -132,7 +132,7 @@ namespace CalamityMod.UI 39 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, 40 => ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/HoodlessHeadIcon").Value, 41 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, - 42 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, + 42 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, 43 => TextureAssets.NpcHeadBoss[38].Value, // Queen Slime 44 => TextureAssets.NpcHeadBoss[37].Value, // Empress of Light 45 => TextureAssets.NpcHeadBoss[39].Value, // Deerclops diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index f207492fa0..6d616b1061 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -186,10 +186,10 @@ namespace CalamityMod { ModContent.NPCType(), new Tuple(true, new int[] { }) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(false, CalamityMod.abyssEnemyImmunities) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, - { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, CalamityMod.abyssEnemyImmunities) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.sulphurEnemyImmunities) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.sulphurEnemyImmunities) },