From efdd4ca3b53814f2391e17798da6b8b757725e35 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 12 Feb 2024 18:54:26 -0600 Subject: [PATCH 1/4] Fixed faulty logic on monolith generation --- World/AstralBiome.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index 68a534ad96..76763c0a22 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -453,9 +453,9 @@ namespace CalamityMod.World y += 5; } - if (Main.tile[x, y].HasTile || Main.tile[x, y].WallType > 0 && (!CalamityUtils.TileActiveAndOfType(x, y, TileID.Torches) || - !CalamityUtils.TileActiveAndOfType(x, y, TileID.Containers) || !CalamityUtils.TileActiveAndOfType(x, y, TileID.Containers2) - || (magicStorage is not null && MSTilesToAvoid.Contains(Main.tile[x, y].TileType)))) //AVOID HOUSES + if (Main.tile[x, y].HasTile || Main.tile[x, y].WallType > 0 && (!CalamityUtils.TileActiveAndOfType(x, y, TileID.Torches) && + !CalamityUtils.TileActiveAndOfType(x, y, TileID.Containers) && !CalamityUtils.TileActiveAndOfType(x, y, TileID.Containers2) + && (magicStorage is not null && MSTilesToAvoid.Contains(Main.tile[x, y].TileType)))) //AVOID HOUSES { bool place = true; SchematicManager.PlaceSchematic>(SchematicManager.AstralBeaconKey, new Point(x, y - 5), SchematicAnchor.Center, ref place); From bbae99e1563b4c2e73f028f6489e5973c2d986d6 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 12 Feb 2024 19:47:14 -0600 Subject: [PATCH 2/4] Astral Monolith spawning now acounts for Dressers as well as modded containers and torches --- World/AstralBiome.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index 76763c0a22..e11eade9a3 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -453,9 +453,8 @@ namespace CalamityMod.World y += 5; } - if (Main.tile[x, y].HasTile || Main.tile[x, y].WallType > 0 && (!CalamityUtils.TileActiveAndOfType(x, y, TileID.Torches) && - !CalamityUtils.TileActiveAndOfType(x, y, TileID.Containers) && !CalamityUtils.TileActiveAndOfType(x, y, TileID.Containers2) - && (magicStorage is not null && MSTilesToAvoid.Contains(Main.tile[x, y].TileType)))) //AVOID HOUSES + if (Main.tile[x, y].HasTile || Main.tile[x, y].WallType > 0 && !TileID.Sets.Torch[Main.tile[x,y].TileType] && !TileID.Sets.IsAContainer[Main.tile[x, y].TileType] + && (magicStorage is not null && MSTilesToAvoid.Contains(Main.tile[x, y].TileType))) //AVOID HOUSES { bool place = true; SchematicManager.PlaceSchematic>(SchematicManager.AstralBeaconKey, new Point(x, y - 5), SchematicAnchor.Center, ref place); From 1cbf52be2ae1a67ee0b3eb2aa748dde44f70cead Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Mon, 12 Feb 2024 22:56:31 -0600 Subject: [PATCH 3/4] Fixed Anahita being invincible, although Im unsure if this fix is ideal --- NPCs/Leviathan/AnahitasIceShield.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/NPCs/Leviathan/AnahitasIceShield.cs b/NPCs/Leviathan/AnahitasIceShield.cs index d919bf4115..950d6f2043 100644 --- a/NPCs/Leviathan/AnahitasIceShield.cs +++ b/NPCs/Leviathan/AnahitasIceShield.cs @@ -1,4 +1,6 @@ using CalamityMod.Events; +using CalamityMod.Projectiles.Boss; +using CalamityMod.World; using Microsoft.Xna.Framework; using System.IO; using Terraria; @@ -9,6 +11,16 @@ namespace CalamityMod.NPCs.Leviathan { public class AnahitasIceShield : ModNPC { + public bool WaitingForLeviathan + { + get + { + if (Main.npc.IndexInRange(CalamityGlobalNPC.leviathan) && Main.npc[CalamityGlobalNPC.leviathan].life / (float)Main.npc[CalamityGlobalNPC.leviathan].lifeMax >= ((CalamityWorld.death || BossRushEvent.BossRushActive) ? 0.7f : 0.4f)) + return true; + + return CalamityUtils.FindFirstProjectile(ModContent.ProjectileType()) != -1; + } + } public override void SetStaticDefaults() { this.HideFromBestiary(); @@ -62,7 +74,7 @@ namespace CalamityMod.NPCs.Leviathan if (NPC.alpha > 100 && NPC.ai[1] == 0f) NPC.alpha -= 2; - if (Main.npc[anahitaID].damage == 0) + if (WaitingForLeviathan) NPC.ai[1] = 1f; else NPC.ai[1] = 0f; @@ -70,7 +82,7 @@ namespace CalamityMod.NPCs.Leviathan if (NPC.ai[1] == 1f) NPC.alpha = Main.npc[anahitaID].alpha; - NPC.dontTakeDamage = Main.npc[anahitaID].damage == 0; + NPC.dontTakeDamage = WaitingForLeviathan; NPC.rotation = Main.npc[anahitaID].rotation; NPC.spriteDirection = Main.npc[anahitaID].direction; NPC.velocity = Vector2.Zero; From c3ddfd86f3d3f8db71065a53a55d752f569af2db Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 13 Feb 2024 10:31:03 -0500 Subject: [PATCH 4/4] Arcane Flower now gives 5% magic damage --- Items/CalamityGlobalItem.cs | 2 ++ Items/CalamityGlobalItemTooltip.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index e70e089022..d2238dce0b 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1189,6 +1189,8 @@ namespace CalamityMod.Items // Arcane and Magnet Flower buffs if (item.type == ItemID.ArcaneFlower || item.type == ItemID.MagnetFlower) player.manaCost -= 0.04f; + if (item.type == ItemID.ArcaneFlower) + player.GetDamage() += 0.05f; if (item.type == ItemID.SniperScope) { diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index e2275e3809..602f7c42fb 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -611,6 +611,8 @@ namespace CalamityMod.Items // Arcane and Magnet Flower buffs. if (item.type == ItemID.ArcaneFlower || item.type == ItemID.MagnetFlower) EditTooltipByNum(0, (line) => line.Text = "12% reduced mana usage"); + if (item.type == ItemID.ArcaneFlower) + EditTooltipByNum(2, (line) => line.Text += "\n5% increased magic damage"); // Magiluminescence nerf and clear explanation of what it actually does. if (item.type == ItemID.Magiluminescence)