diff --git a/Items/Accessories/AlchemicalDecanter.cs b/Items/Accessories/AlchemicalDecanter.cs index a463957cae..bea2f95e28 100644 --- a/Items/Accessories/AlchemicalDecanter.cs +++ b/Items/Accessories/AlchemicalDecanter.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("AlchemicalFlask")] public class AlchemicalDecanter : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; diff --git a/Items/Accessories/UnholyTonic.cs b/Items/Accessories/UnholyTonic.cs index 38c3be3023..bef8b0ba72 100644 --- a/Items/Accessories/UnholyTonic.cs +++ b/Items/Accessories/UnholyTonic.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("CorruptFlask")] public class UnholyTonic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; diff --git a/Items/Accessories/ViciousTonic.cs b/Items/Accessories/ViciousTonic.cs index 70908f43dd..6df1a140cd 100644 --- a/Items/Accessories/ViciousTonic.cs +++ b/Items/Accessories/ViciousTonic.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("CrimsonFlask")] public class ViciousTonic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index 60899e5cd8..78fcb24d41 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -77,8 +77,8 @@ namespace CalamityMod.Items.Accessories if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage) { - float minDamageMult = 0.35f; - int maxTargets = 25; + float minDamageMult = 0.10f; + int maxTargets = 7; float damageMult = Utils.Remap(targetCount, maxTargets, 1, minDamageMult, 1); // Handles giving the Warbanner Burn effect diff --git a/Items/Placeables/Furniture/Monoliths/OldDukeMonolith.cs b/Items/Placeables/Furniture/Monoliths/EldenDiorama.cs similarity index 81% rename from Items/Placeables/Furniture/Monoliths/OldDukeMonolith.cs rename to Items/Placeables/Furniture/Monoliths/EldenDiorama.cs index 4d3d7874cd..8320c8b167 100644 --- a/Items/Placeables/Furniture/Monoliths/OldDukeMonolith.cs +++ b/Items/Placeables/Furniture/Monoliths/EldenDiorama.cs @@ -1,18 +1,20 @@ using CalamityMod.ForegroundDrawing.LoopingTextures; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.Monoliths; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.Furniture.Monoliths { - public class OldDukeMonolith : ModItem, ILocalizedModType + [LegacyName("OldDukeMonolith")] + public class EldenDiorama : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Placeables"; public override void SetDefaults() { Item.DefaultToPlaceableTile(ModContent.TileType()); - Item.value = Item.buyPrice(gold: 25); // Sold by Archmage - Item.rare = ItemRarityID.Pink; + Item.value = Item.sellPrice(gold: 20); + Item.rare = ModContent.RarityType(); Item.accessory = true; Item.vanity = true; } diff --git a/Items/Placeables/Furniture/Monoliths/OldDukeMonolith.png b/Items/Placeables/Furniture/Monoliths/EldenDiorama.png similarity index 100% rename from Items/Placeables/Furniture/Monoliths/OldDukeMonolith.png rename to Items/Placeables/Furniture/Monoliths/EldenDiorama.png diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index eac4270b73..f98612ef5b 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -56,7 +56,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Big E", "carnymassacre", "CDMusic", - "Cei", "CongratsIsTrash", "Cooper", "CosmaticMango", @@ -102,6 +101,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Blockaroz", "Boffin", "Bravioli", + "Cei", "Chetto", "Chill Dude", "Cobalion", diff --git a/Items/Placeables/FurnitureAuric/AuricLandMine.cs b/Items/Placeables/FurnitureAuric/AuricLandMine.cs index eb3c2cd940..b448035714 100644 --- a/Items/Placeables/FurnitureAuric/AuricLandMine.cs +++ b/Items/Placeables/FurnitureAuric/AuricLandMine.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Items.Placeables.FurnitureAuric public override void SetStaticDefaults() { + Item.ResearchUnlockCount = 5; // Did you know Land Mines can be placed on Weapon Racks? Yeah, me neither. ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } diff --git a/Items/Placeables/FurnitureStatigel/StaticRefiner.cs b/Items/Placeables/FurnitureStatigel/StaticRefiner.cs index 3cb6680fe6..5535d37822 100644 --- a/Items/Placeables/FurnitureStatigel/StaticRefiner.cs +++ b/Items/Placeables/FurnitureStatigel/StaticRefiner.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel public override void SetDefaults() { Item.DefaultToPlaceableTile(ModContent.TileType()); - Item.value = Item.sellPrice(gold: 2); + Item.value = Item.sellPrice(silver: 5); } public override void AddRecipes() diff --git a/Items/Placeables/SunkenSea/OrangeCoral.cs b/Items/Placeables/SunkenSea/OrangeCoral.cs index 02ddc9fdfa..3b253027e8 100644 --- a/Items/Placeables/SunkenSea/OrangeCoral.cs +++ b/Items/Placeables/SunkenSea/OrangeCoral.cs @@ -9,6 +9,7 @@ namespace CalamityMod.Items.Placeables.SunkenSea public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() diff --git a/Items/TreasureBags/LeviathanBag.cs b/Items/TreasureBags/LeviathanBag.cs index d567825dd0..d376adb253 100644 --- a/Items/TreasureBags/LeviathanBag.cs +++ b/Items/TreasureBags/LeviathanBag.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Items.TreasureBags // Vanity itemLoot.Add(ModContent.ItemType(), 7); itemLoot.Add(ModContent.ItemType(), 7); - itemLoot.Add(ModContent.ItemType(), 15); + itemLoot.Add(ModContent.ItemType(), 10); itemLoot.Add(ModContent.ItemType(), ThankYouPainting.DropInt); } } diff --git a/Items/TreasureBags/OldDukeBag.cs b/Items/TreasureBags/OldDukeBag.cs index 13f3b10b35..4bcf2c05e5 100644 --- a/Items/TreasureBags/OldDukeBag.cs +++ b/Items/TreasureBags/OldDukeBag.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.Placeables.Furniture.Paintings; +using CalamityMod.Items.Placeables.Furniture.Monoliths; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; @@ -79,6 +80,7 @@ namespace CalamityMod.Items.TreasureBags // Vanity itemLoot.Add(ModContent.ItemType(), 7); + itemLoot.Add(ModContent.ItemType(), 10); itemLoot.Add(ModContent.ItemType(), ThankYouPainting.DropInt); } } diff --git a/Items/Weapons/Magic/DeathValleyDuster.cs b/Items/Weapons/Magic/DeathValleyDuster.cs index 78a54eeab3..c0d2667ca8 100644 --- a/Items/Weapons/Magic/DeathValleyDuster.cs +++ b/Items/Weapons/Magic/DeathValleyDuster.cs @@ -1,9 +1,10 @@ using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; -using Terraria.Audio; -using Microsoft.Xna.Framework; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Magic @@ -12,6 +13,9 @@ namespace CalamityMod.Items.Weapons.Magic public class DeathValleyDuster : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; + public static int BuffDefenseBoost = PrimordialEarth.BuffDefenseBoost; + public static float BuffDamageBoost = PrimordialEarth.BuffDamageBoost; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(BuffDefenseBoost, BuffDamageBoost.ToPercent()); public override void SetDefaults() { Item.width = 36; diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index bb54a11859..481ff370dd 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 114; Item.height = 146; Item.damage = 3140; - Item.DamageType = DamageClass.Melee; + Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = 45; Item.useStyle = ItemUseStyleID.Swing; Item.useTime = 45; diff --git a/Items/Weapons/Ranged/TauCannon.cs b/Items/Weapons/Ranged/TauCannon.cs index 5028dacd09..8b3fae30d1 100644 --- a/Items/Weapons/Ranged/TauCannon.cs +++ b/Items/Weapons/Ranged/TauCannon.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Shoot; + Item.Calamity().donorItem = true; } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0; diff --git a/Localization/en-US/Mods.CalamityMod.Common.hjson b/Localization/en-US/Mods.CalamityMod.Common.hjson index 1d00ee0672..da985a581e 100644 --- a/Localization/en-US/Mods.CalamityMod.Common.hjson +++ b/Localization/en-US/Mods.CalamityMod.Common.hjson @@ -16,7 +16,7 @@ AggroReduction: Enemies are less likely to target you KnockbackImmunity: Grants immunity to knockback AbyssLightLevel: Reduces the darkness intensity of the abyss AbyssFlashlight: Increases flashlight width in the abyss -AbyssGlow: Increases visibily range in the abyss +AbyssGlow: Increases visibility range in the abyss AbyssBreathLevel1: Slightly reduces breath loss in the abyss AbyssBreathLevel2: Moderately reduces breath loss in the abyss AbyssBreathLevel3: Greatly reduces breath loss in the abyss diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 94661b965d..8b3900bb0a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -434,15 +434,6 @@ CorrosiveSpine: { ''' } -UnholyTonic: { - DisplayName: Unholy Tonic - Tooltip: - ''' - Increases damage reduction by 4% and defense by 6 while in the corruption - Grants immunity to Brain Rot - ''' -} - CounterScarf: { DisplayName: Counter Scarf Tooltip: @@ -461,15 +452,6 @@ CrawCarapace: { ''' } -ViciousTonic: { - DisplayName: Vicious Tonic - Tooltip: - ''' - Increases damage reduction by 4% and defense by 6 while in the crimson - Grants immunity to Burning Blood - ''' -} - CrownJewel: { DisplayName: Crown Jewel Tooltip: @@ -2017,6 +1999,15 @@ TrinketofChi: { ''' } +UnholyTonic: { + DisplayName: Unholy Tonic + Tooltip: + ''' + Increases damage reduction by 4% and defense by 6 while in the corruption + Grants immunity to Brain Rot + ''' +} + UnstableGraniteCore: { DisplayName: Unstable Granite Core Tooltip: @@ -2049,6 +2040,15 @@ VeneratedLocket: { ''' } +ViciousTonic: { + DisplayName: Vicious Tonic + Tooltip: + ''' + Increases damage reduction by 4% and defense by 6 while in the crimson + Grants immunity to Burning Blood + ''' +} + VitalJelly: { DisplayName: Vital Jelly Tooltip: 12% increased movement and jump speed diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 495946b816..4a8f1cc711 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -828,6 +828,11 @@ DraconicIncense: { Tooltip: "'Ignite the air with dragonfire.'" } +EldenDiorama: { + DisplayName: Elden Diorama + Tooltip: "'Enshroud the sky with toxic torrents'" +} + ExoObelisk: { DisplayName: Exo Obelisk Tooltip: "'Energize the atmosphere with exo energy.'" @@ -853,11 +858,6 @@ KelpTorch: { Tooltip: Can be placed in water } -OldDukeMonolith: { - DisplayName: Elden Diorama - Tooltip: "" -} - OtonilouStatue: { DisplayName: Otonilou Memorial Tooltip: "" diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 64675769a1..75bc1378a2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -3,21 +3,11 @@ AbyssalWarhammer: { Tooltip: "" } -AcidwoodAxe: { - DisplayName: Acidwood Axe - Tooltip: "" -} - AcidwoodHammer: { DisplayName: Acidwood Hammer Tooltip: "" } -AcidwoodPickaxe: { - DisplayName: Acidwood Pickaxe - Tooltip: "" -} - AerialHamaxe: { DisplayName: Aerial Hamaxe Tooltip: "" @@ -181,21 +171,11 @@ DisgustingMeat: { ''' } -DriftwoodAxe: { - DisplayName: Driftwood Axe - Tooltip: Improved efficiency while you are wet -} - DriftwoodHammer: { DisplayName: Driftwood Hammer Tooltip: Improved efficiency while you are wet } -DriftwoodPickaxe: { - DisplayName: Driftwood Pickaxe - Tooltip: Improved efficiency while you are wet -} - FellerofEvergreens: { DisplayName: Feller of Evergreens Tooltip: Occasionally drops extra fruits from shaking trees @@ -271,21 +251,11 @@ MomentumCapacitor: { ''' } -MonolithAxe: { - DisplayName: Monolith Axe - Tooltip: "" -} - MonolithHammer: { DisplayName: Monolith Hammer Tooltip: "" } -MonolithPickaxe: { - DisplayName: Monolith Pickaxe - Tooltip: "" -} - NormalityRelocator: { DisplayName: Normality Relocator Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 50f3ab49e3..fa37ff01ee 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -239,7 +239,7 @@ DeathValleyDuster: { ''' Casts an enchanted blast of sand that passes through enemies and tiles Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the Sand's Wind Buff - The Sand's Wind Buff increases your defense by 10, damage by 12%, and greatly buffs mana regen + The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffs mana regen ''' } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 198517192e..f01e24fb37 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3191,10 +3191,13 @@ namespace CalamityMod.NPCs Vector2 startVel = (warbannerBurnDirection * velAdjust).RotatedByRandom(0.6f * warbannerBurnIntensity); Particle sparks = new VelChangingSpark(sparkPos, startVel, endVel, "CalamityMod/Particles/SmallBloom", Main.rand.Next(18, 22 + 1), Main.rand.NextFloat(0.1f, 0.25f) * sizeBonus, color * 0.75f, new Vector2(0.7f, 1), true, false, 0, false, 0.45f, 0.1f); GeneralParticleHandler.SpawnParticle(sparks); - Dust lust2 = Dust.NewDustPerfect(sparkPos, DustType(), startVel, Scale: Main.rand.NextFloat(0.7f, 1.1f) * sizeBonus); - lust2.noGravity = true; - lust2.color = color; - lust2.noLightEmittence = true; + if (Main.rand.NextBool()) + { + Dust lust2 = Dust.NewDustPerfect(sparkPos, DustType(), startVel, Scale: Main.rand.NextFloat(0.5f, 0.9f) * Math.Min(sizeBonus, 1.3f)); + lust2.noGravity = true; + lust2.color = color; + lust2.noLightEmittence = true; + } } } var player = Main.LocalPlayer; diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index ea70d84fb2..bacd9e74db 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -10,6 +10,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Paintings; +using CalamityMod.Items.Placeables.Furniture.Monoliths; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -2103,6 +2104,7 @@ namespace CalamityMod.NPCs.OldDuke // Vanity normalOnly.Add(ModContent.ItemType(), 7); + normalOnly.Add(ModContent.ItemType(), 10); normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt); } diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index da0f14a024..5ff62a5b08 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -2926,8 +2926,6 @@ public class BrainOfCthulhuAI : VanillaAIOverride NPC.netUpdate = true; } - public override bool PreKill(Mod mod) => AIState == BrainAIState.DeathAnimation && !NPC.dontTakeDamage; - public override void FindFrame(Mod mod, int frameHeight) { if (BoCFrame == Rectangle.Empty) diff --git a/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs b/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs index 6f4a311073..8e6996e16b 100644 --- a/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs +++ b/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs @@ -22,7 +22,7 @@ public class TelekineticEnemyGrab : ModProjectile, ILocalizedModType public new string LocalizationCategory => "Projectiles.Boss"; public override string Texture => "CalamityMod/Particles/BloomRing"; - BezierCurve curve; + BezierCurve curve = null; int throwSign = 0; Vector2 throwPos = Vector2.Zero; Vector2 holdPos; @@ -331,55 +331,58 @@ public class TelekineticEnemyGrab : ModProjectile, ILocalizedModType if (Time < 15) glowOpacity = Time / 15f; - Main.spriteBatch.End(out var snapshot); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, null, Main.GameViewMatrix.TransformationMatrix); - - Texture2D ring = TextureAssets.Projectile[Type].Value; - - List points = curve.GetPoints(pCount); - for (int i = 1; i < pCount; i++) + if (curve != null) { - float scale1 = MathHelper.Lerp(0.1f, 1f, i / (float)(pCount - 1)); - float scale2 = MathHelper.Lerp(0.1f, 1f, (i + 1) / (float)(pCount - 1)); - float scale = MathHelper.Lerp(scale1, scale2, wrappedTime); + Main.spriteBatch.End(out var snapshot); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, null, Main.GameViewMatrix.TransformationMatrix); - float rot1 = (points[i] - points[i - 1]).ToRotation(); + Texture2D ring = TextureAssets.Projectile[Type].Value; - float rot2; - if (i == pCount - 1) - rot2 = points[i].ToRotation(); - else - rot2 = (points[i + 1] - points[i]).ToRotation(); + List points = curve.GetPoints(pCount); + for (int i = 1; i < pCount; i++) + { + float scale1 = MathHelper.Lerp(0.1f, 1f, i / (float)(pCount - 1)); + float scale2 = MathHelper.Lerp(0.1f, 1f, (i + 1) / (float)(pCount - 1)); + float scale = MathHelper.Lerp(scale1, scale2, wrappedTime); - float rot; - if (i == pCount - 1) - rot = rot1; - else - rot = rot1.AngleLerp(rot2, wrappedTime); + float rot1 = (points[i] - points[i - 1]).ToRotation(); - Vector2 pos; - if (i == pCount - 1) - pos = Vector2.Lerp(points[i], points[i] + rot.ToRotationVector2() * Vector2.Distance(points[^1], points[^2]), wrappedTime); - else - pos = Vector2.Lerp(points[i], points[i + 1], wrappedTime); + float rot2; + if (i == pCount - 1) + rot2 = points[i].ToRotation(); + else + rot2 = (points[i + 1] - points[i]).ToRotation(); - Color color; - if (evenRed) - color = (i % 2 == 0 ? Color.Red : Color.Magenta) * 0.666f; - else - color = (i % 2 == 0 ? Color.Magenta : Color.Red) * 0.666f; + float rot; + if (i == pCount - 1) + rot = rot1; + else + rot = rot1.AngleLerp(rot2, wrappedTime); - if (i == pCount - 1) - color *= 1 - wrappedTime; - else if (i == 1) - color *= wrappedTime; + Vector2 pos; + if (i == pCount - 1) + pos = Vector2.Lerp(points[i], points[i] + rot.ToRotationVector2() * Vector2.Distance(points[^1], points[^2]), wrappedTime); + else + pos = Vector2.Lerp(points[i], points[i + 1], wrappedTime); - Main.spriteBatch.Draw(ring, pos + Projectile.velocity - Main.screenPosition, null, color * glowOpacity, rot, ring.Size() * 0.5f, new Vector2(0.5f, 1f) * scale, 0, 0); + Color color; + if (evenRed) + color = (i % 2 == 0 ? Color.Red : Color.Magenta) * 0.666f; + else + color = (i % 2 == 0 ? Color.Magenta : Color.Red) * 0.666f; + + if (i == pCount - 1) + color *= 1 - wrappedTime; + else if (i == 1) + color *= wrappedTime; + + Main.spriteBatch.Draw(ring, pos + Projectile.velocity - Main.screenPosition, null, color * glowOpacity, rot, ring.Size() * 0.5f, new Vector2(0.5f, 1f) * scale, 0, 0); + } + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(snapshot); } - Main.spriteBatch.End(); - Main.spriteBatch.Begin(snapshot); - Vector2[] offsets = [Vector2.UnitX * 2, Vector2.UnitX * -2, Vector2.UnitY * 2, Vector2.UnitY * -2]; for (int i = 0; i < 4; i++) Main.EntitySpriteDraw(EnemyGlowTextures[enemyID], Projectile.Center - Main.screenPosition + offsets[i].RotatedBy(Projectile.rotation), frame, Color.Lerp(Color.Red, Color.Magenta, ((float)Math.Sin((Main.GlobalTimeWrappedHourly * 5f)) / 2f + 0.5f)) * glowOpacity, Projectile.rotation, frame.Size() * 0.5f, 1f, 0); diff --git a/Projectiles/Melee/LuxorsGiftMelee.cs b/Projectiles/Melee/LuxorsGiftMelee.cs index 1d1770c2a9..a7a9baedcf 100644 --- a/Projectiles/Melee/LuxorsGiftMelee.cs +++ b/Projectiles/Melee/LuxorsGiftMelee.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(spark); } - if (Collision.SolidCollision(Projectile.Center, 9, 9)) + if (Collision.SolidCollision(Projectile.Center, 9, 9) && Projectile.timeLeft <= 150) Projectile.velocity *= 0.91f; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Ranged/LuxorsGiftRanged.cs b/Projectiles/Ranged/LuxorsGiftRanged.cs index a19a9fa41c..83e08f12ba 100644 --- a/Projectiles/Ranged/LuxorsGiftRanged.cs +++ b/Projectiles/Ranged/LuxorsGiftRanged.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.extraUpdates = 5; + Projectile.tileCollide = false; } public override void AI() { @@ -49,6 +50,8 @@ namespace CalamityMod.Projectiles.Ranged dust.noLightEmittence = true; } } + if (!Collision.SolidCollision(Projectile.Center, 35, 35) || Projectile.timeLeft < 200) + Projectile.tileCollide = true; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Ranged/SepticSkewerHarpoon.cs b/Projectiles/Ranged/SepticSkewerHarpoon.cs index 2e3617cf3f..313c2bdfee 100644 --- a/Projectiles/Ranged/SepticSkewerHarpoon.cs +++ b/Projectiles/Ranged/SepticSkewerHarpoon.cs @@ -1,12 +1,13 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.CalPlayer; using CalamityMod.DataStructures; using CalamityMod.NPCs; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -46,7 +47,7 @@ namespace CalamityMod.Projectiles.Ranged public bool strongEnemy = false; public bool normalHit = false; - public bool pullCheckValid => ((chosenTarget != null && chosenTarget.life < Projectile.damage * 20f && !calledToPull && chosenTarget.realLife == -1 && !normalHit) || Main.zenithWorld); + public bool pullCheckValid => ((chosenTarget != null && chosenTarget.life < Projectile.damage * 20f && !calledToPull && chosenTarget.realLife == -1 && !normalHit && (CalamityPlayer.areThereAnyDamnBosses ? chosenTarget.life <= chosenTarget.lifeMax / 4 : true)) || Main.zenithWorld); public override void SetStaticDefaults() { ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; diff --git a/Projectiles/Rogue/LuxorsGiftRogue.cs b/Projectiles/Rogue/LuxorsGiftRogue.cs index be8ef36f5a..d938e15468 100644 --- a/Projectiles/Rogue/LuxorsGiftRogue.cs +++ b/Projectiles/Rogue/LuxorsGiftRogue.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.extraUpdates = 3; + Projectile.tileCollide = false; } public override void AI() { @@ -50,6 +51,8 @@ namespace CalamityMod.Projectiles.Rogue dust.color = Color.Magenta; dust.noLightEmittence = true; } + if (!Collision.SolidCollision(Projectile.Center, 35, 35) || Projectile.timeLeft <= 500) + Projectile.tileCollide = true; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Rogue/RadiationRain.cs b/Projectiles/Rogue/RadiationRain.cs index 72de92480f..5938658b73 100644 --- a/Projectiles/Rogue/RadiationRain.cs +++ b/Projectiles/Rogue/RadiationRain.cs @@ -1,9 +1,10 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Enums; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Particles; namespace CalamityMod.Projectiles.Rogue { @@ -45,14 +46,17 @@ namespace CalamityMod.Projectiles.Rogue GeneralParticleHandler.SpawnParticle(orb); Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Chartreuse, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.8f, 0.4f, 18); GeneralParticleHandler.SpawnParticle(orb3); + orb3.DrawLayer = GeneralDrawLayer.AfterEverything; Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.4f, 0.2f, 18); GeneralParticleHandler.SpawnParticle(orb2); + orb2.DrawLayer = GeneralDrawLayer.AfterEverything; for (int i = 0; i < 2; i++) { int dir = (i == 0 ? 1 : -1); Particle pulse3 = new GlowSparkParticle(Projectile.Center + new Vector2(20 * dir, 0), new Vector2(10 * dir, 0), false, 12, 0.087f, Color.Chartreuse, new Vector2(1.7f, 0.8f), true, true, 0.8f); GeneralParticleHandler.SpawnParticle(pulse3); + pulse3.DrawLayer = GeneralDrawLayer.AfterEverything; } for (int i = 0; i < 3; i++) diff --git a/Sounds/Custom/Scare.ogg b/Sounds/Custom/Scare.ogg index 577e74dd10..6a393bae5a 100644 Binary files a/Sounds/Custom/Scare.ogg and b/Sounds/Custom/Scare.ogg differ diff --git a/Tiles/Furniture/Monoliths/OldDukeMonolithTile.cs b/Tiles/Furniture/Monoliths/OldDukeMonolithTile.cs index 9ca6163623..2057b7ebb1 100644 --- a/Tiles/Furniture/Monoliths/OldDukeMonolithTile.cs +++ b/Tiles/Furniture/Monoliths/OldDukeMonolithTile.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.Furniture.Monoliths public override int TileHeight => 8; public override int AnimationFrameCount => 24; public override int AnimationDelay => 6; - public override int CursorItemType => ModContent.ItemType(); + public override int CursorItemType => ModContent.ItemType(); public static Asset Numbers; public override void SetStaticDefaults() @@ -45,9 +45,9 @@ namespace CalamityMod.Tiles.Furniture.Monoliths TileObjectData.newTile.CoordinateHeights = [16, 16, 16, 16, 16, 16, 16, 16]; TileObjectData.addTile(Type); - AddMapEntry(new Color(54, 54, 54)); + AddMapEntry(new Color(99, 133, 48)); - DustType = DustID.TerraBlade; + DustType = DustID.ToxicBubble; } public override void NearbyEffects(int i, int j, bool closer, bool monolithEnabled, Player localPlayer) diff --git a/UI/DialogueDisplay/DisplayEffects/BossText.cs b/UI/DialogueDisplay/DisplayEffects/BossText.cs index 1085ad8e35..1557c65bf9 100644 --- a/UI/DialogueDisplay/DisplayEffects/BossText.cs +++ b/UI/DialogueDisplay/DisplayEffects/BossText.cs @@ -9,6 +9,8 @@ namespace CalamityMod.UI.DialogueDisplay.DisplayEffects { public override bool FadeWhenTooFar => false; + public override float TimeToAppear => 20; + public override bool DespawnWithAttachedNPC => false; public override Vector2 TextOffsetFromStart(Vector2 startPos, Vector2 textSize) @@ -19,6 +21,24 @@ namespace CalamityMod.UI.DialogueDisplay.DisplayEffects return newPos; } + float OffsetAppearTime(float time, float ratio) => MathHelper.Clamp((time - (ratio * TimeToAppear / 6f)) / (TimeToAppear / 6f), 0f, 1f); + + public override Vector2 AppearPositioning(Vector2 startPos, Vector2 goalPos, float time, DialogueCharacterData charData) + { + Vector2 toBoss = (goalPos - startPos).SafeNormalize(-Vector2.UnitX); + return Vector2.Lerp(goalPos - (new Vector2(-1, -1) * 24 * charData.Scale), goalPos, CalamityUtils.SineOutEasing(time / TimeToAppear, 1)); + } + + public override float AppearOpacity(float goalOpacity, float time, DialogueCharacterData charData) + { + return CalamityUtils.SineOutEasing(time / TimeToAppear, 1); + } + + public override Vector2 AppearScale(Vector2 goalScale, float time, DialogueCharacterData charData) + { + return Vector2.Lerp(goalScale * 0.75f, goalScale, CalamityUtils.ExpOutEasing(time / TimeToAppear, 1)); + } + float OffsetDisappearTime(float time, float ratio) => MathHelper.Clamp((time - (ratio * TimeToDisappear / 2f)) / (TimeToDisappear / 2f), 0f, 1f); public override Vector2 DisappearPositioning(Vector2 startPos, float time, DialogueCharacterData charData) => Vector2.Lerp(startPos, startPos + (Vector2.unitXVector * 12 * charData.Scale), CalamityUtils.SineOutEasing(OffsetDisappearTime(time, charData.CompletionRatio), 1));