From 070ec7828a20cbe0b7224814ba4aa1200a1601b7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 30 Jun 2026 15:22:18 -0400 Subject: [PATCH 01/35] 1. Necrosteocytes balancing 2. Merged Corroslime/Crimslime Staff into a singular Blighted Slime Staff --- Balancing/BalancingChangesManager.cs | 7 +- .../{Corroslime.cs => BlightedSlime.cs} | 8 +- .../{Corroslime.png => BlightedSlime.png} | Bin ...Crimslime.png => BlightedSlimeCrimson.png} | Bin Buffs/Summon/Crimslime.cs | 12 --- CalPlayer/CalamityPlayer.cs | 9 +- CalPlayer/CalamityPlayerMiscEffects.cs | 1 + ExtraTextures/ExtraTextureRefs.cs | 10 +- Items/TreasureBags/SlimeGodBag.cs | 3 +- ...rroslimeStaff.cs => BlightedSlimeStaff.cs} | 9 +- ...oslimeStaff.png => BlightedSlimeStaff.png} | Bin Items/Weapons/Summon/CrimslimeStaff.cs | 42 -------- Items/Weapons/Summon/CrimslimeStaff.png | Bin 1351 -> 0 bytes Items/Weapons/Summon/StaffOfNecrosteocytes.cs | 2 +- .../en-US/Mods.CalamityMod.Buffs.hjson | 15 +-- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 15 +-- .../Mods.CalamityMod.Projectiles.Summon.hjson | 5 +- ModSupport/WeakReferenceSupport.cs | 3 +- NPCs/SlimeGod/SlimeGodCore.cs | 3 +- ...slimeMinion.png => BlightedSlimeCorro.png} | Bin ...mslimeMinion.png => BlightedSlimeCrim.png} | Bin ...mslimeMinion.cs => BlightedSlimeMinion.cs} | 39 ++++--- Projectiles/Summon/BoneMatter.cs | 34 ------ Projectiles/Summon/BoneMatter.png | Bin 1196 -> 0 bytes Projectiles/Summon/BoneMatter2.cs | 35 ------- Projectiles/Summon/BoneMatter2.png | Bin 1081 -> 0 bytes Projectiles/Summon/CorroslimeMinion.cs | 97 ------------------ .../Summon/CorruptionSlimeGodMinion.cs | 2 +- .../Summon/CorruptionSlimeGodMinion.png | Bin 614 -> 0 bytes Projectiles/Summon/CrimsonSlimeGodMinion.cs | 2 +- Projectiles/Summon/CrimsonSlimeGodMinion.png | Bin 602 -> 0 bytes Projectiles/Summon/SmallSkeletonMinion.cs | 54 +++------- 32 files changed, 85 insertions(+), 322 deletions(-) rename Buffs/Summon/{Corroslime.cs => BlightedSlime.cs} (57%) rename Buffs/Summon/{Corroslime.png => BlightedSlime.png} (100%) rename Buffs/Summon/{Crimslime.png => BlightedSlimeCrimson.png} (100%) delete mode 100644 Buffs/Summon/Crimslime.cs rename Items/Weapons/Summon/{CorroslimeStaff.cs => BlightedSlimeStaff.cs} (82%) rename Items/Weapons/Summon/{CorroslimeStaff.png => BlightedSlimeStaff.png} (100%) delete mode 100644 Items/Weapons/Summon/CrimslimeStaff.cs delete mode 100644 Items/Weapons/Summon/CrimslimeStaff.png rename Projectiles/Summon/{CorroslimeMinion.png => BlightedSlimeCorro.png} (100%) rename Projectiles/Summon/{CrimslimeMinion.png => BlightedSlimeCrim.png} (100%) rename Projectiles/Summon/{CrimslimeMinion.cs => BlightedSlimeMinion.cs} (70%) delete mode 100644 Projectiles/Summon/BoneMatter.cs delete mode 100644 Projectiles/Summon/BoneMatter.png delete mode 100644 Projectiles/Summon/BoneMatter2.cs delete mode 100644 Projectiles/Summon/BoneMatter2.png delete mode 100644 Projectiles/Summon/CorroslimeMinion.cs delete mode 100644 Projectiles/Summon/CorruptionSlimeGodMinion.png delete mode 100644 Projectiles/Summon/CrimsonSlimeGodMinion.png diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 58f265f0f7..c5baa5d71f 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -95,8 +95,11 @@ namespace CalamityMod.Balancing #endregion #region Wall of Flesh - // 40% resist to Corro/Crimslime Staff. - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType(), ProjectileType())))); + // 50% resist to Staff of Necrosteocytes. + NPCSpecificBalancingChanges.AddRange(Bundle(new List { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); + + // 20% resist to Blighted Slime Staff. + NPCSpecificBalancingChanges.AddRange(Bundle(new List { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); #endregion #region Aquatic Scourge diff --git a/Buffs/Summon/Corroslime.cs b/Buffs/Summon/BlightedSlime.cs similarity index 57% rename from Buffs/Summon/Corroslime.cs rename to Buffs/Summon/BlightedSlime.cs index ca5b6d02ee..1455f3f3b1 100644 --- a/Buffs/Summon/Corroslime.cs +++ b/Buffs/Summon/BlightedSlime.cs @@ -1,12 +1,12 @@ -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; using Terraria.ModLoader; namespace CalamityMod.Buffs.Summon { - public class Corroslime : BaseSummonBuff + public class BlightedSlime : BaseSummonBuff { - protected override int MinionProjectileType => ModContent.ProjectileType(); + protected override int MinionProjectileType => ModContent.ProjectileType(); - protected override ref bool MinionBool => ref BuffModdedOwner.cSlime; + protected override ref bool MinionBool => ref BuffModdedOwner.blightedSlime; } } diff --git a/Buffs/Summon/Corroslime.png b/Buffs/Summon/BlightedSlime.png similarity index 100% rename from Buffs/Summon/Corroslime.png rename to Buffs/Summon/BlightedSlime.png diff --git a/Buffs/Summon/Crimslime.png b/Buffs/Summon/BlightedSlimeCrimson.png similarity index 100% rename from Buffs/Summon/Crimslime.png rename to Buffs/Summon/BlightedSlimeCrimson.png diff --git a/Buffs/Summon/Crimslime.cs b/Buffs/Summon/Crimslime.cs deleted file mode 100644 index dc08297928..0000000000 --- a/Buffs/Summon/Crimslime.cs +++ /dev/null @@ -1,12 +0,0 @@ -using CalamityMod.Projectiles.Summon; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.Summon -{ - public class Crimslime : BaseSummonBuff - { - protected override int MinionProjectileType => ModContent.ProjectileType(); - - protected override ref bool MinionBool => ref BuffModdedOwner.cSlime2; - } -} diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 76ca7d151f..98d743a96f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1514,10 +1514,8 @@ namespace CalamityMod.CalPlayer public bool CalamarisLament = false; /// Entropy's Vigil. public bool cEyes = false; - /// Corroslime Staff. - public bool cSlime = false; - /// Crimslime Staff. - public bool cSlime2 = false; + /// Blighted Slime Staff. + public bool blightedSlime = false; /// Abandoned Slime Staff. public bool aSlime = false; public bool brittleStar = false; @@ -2772,8 +2770,7 @@ namespace CalamityMod.CalPlayer cosmicViper = false; CalamarisLament = false; cEyes = false; - cSlime = false; - cSlime2 = false; + blightedSlime = false; aSlime = false; brittleStar = false; aquaticStar = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 384e65a136..c56ce9b6db 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1138,6 +1138,7 @@ namespace CalamityMod.CalPlayer Asset carpetAuric = ExtraTextureRefs.FlyingCarpetAuric; Asset carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla; TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal); + TextureAssets.Buff[ModContent.BuffType()] = WorldGen.crimson ? ExtraTextureRefs.BlightedSlimeCrimIcon : ExtraTextureRefs.BlightedSlimeCorroIcon; for (int l = 0; l < Player.MaxBuffs; l++) { diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs index 7eaf854a40..2fe42db986 100644 --- a/ExtraTextures/ExtraTextureRefs.cs +++ b/ExtraTextures/ExtraTextureRefs.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Buffs.Summon; +using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.GameContent; @@ -28,6 +29,10 @@ namespace CalamityMod.ExtraTextures public static Asset LuckIconVanilla; public static Asset LuckIconLesser; + // Blighted Slime Buff icons + public static Asset BlightedSlimeCorroIcon; + public static Asset BlightedSlimeCrimIcon; + // Particles public static Asset CircularSmear; public static Asset CircularSmearFire1; @@ -52,6 +57,9 @@ namespace CalamityMod.ExtraTextures LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky]; LuckIconLesser = ModContent.Request("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad); + BlightedSlimeCorroIcon = ModContent.Request("CalamityMod/Buffs/Summon/BlightedSlime"); + BlightedSlimeCrimIcon = ModContent.Request("CalamityMod/Buffs/Summon/BlightedSlimeCrimson"); + CircularSmear = ModContent.Request("CalamityMod/Particles/CircularSmear", AssetRequestMode.AsyncLoad); CircularSmearFire1 = ModContent.Request("CalamityMod/Particles/CircularSmearFire1", AssetRequestMode.AsyncLoad); CircularSmearFire2 = ModContent.Request("CalamityMod/Particles/CircularSmearFire2", AssetRequestMode.AsyncLoad); diff --git a/Items/TreasureBags/SlimeGodBag.cs b/Items/TreasureBags/SlimeGodBag.cs index 9889e3fbe4..44657ccb8d 100644 --- a/Items/TreasureBags/SlimeGodBag.cs +++ b/Items/TreasureBags/SlimeGodBag.cs @@ -68,8 +68,7 @@ namespace CalamityMod.Items.TreasureBags ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType() })); // Equipment diff --git a/Items/Weapons/Summon/CorroslimeStaff.cs b/Items/Weapons/Summon/BlightedSlimeStaff.cs similarity index 82% rename from Items/Weapons/Summon/CorroslimeStaff.cs rename to Items/Weapons/Summon/BlightedSlimeStaff.cs index 4708a0d420..3bfedcf270 100644 --- a/Items/Weapons/Summon/CorroslimeStaff.cs +++ b/Items/Weapons/Summon/BlightedSlimeStaff.cs @@ -8,14 +8,15 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { - public class CorroslimeStaff : ModItem, ILocalizedModType + [LegacyName("CorroslimeStaff", "CrimslimeStaff")] + public class BlightedSlimeStaff : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetDefaults() { Item.width = 52; Item.height = 54; - Item.damage = 24; + Item.damage = 20; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; @@ -25,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Summon Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item44; Item.autoReuse = true; - Item.buffType = ModContent.BuffType(); - Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + Item.shoot = ModContent.ProjectileType(); Item.DamageType = DamageClass.Summon; } diff --git a/Items/Weapons/Summon/CorroslimeStaff.png b/Items/Weapons/Summon/BlightedSlimeStaff.png similarity index 100% rename from Items/Weapons/Summon/CorroslimeStaff.png rename to Items/Weapons/Summon/BlightedSlimeStaff.png diff --git a/Items/Weapons/Summon/CrimslimeStaff.cs b/Items/Weapons/Summon/CrimslimeStaff.cs deleted file mode 100644 index fcef51fb1b..0000000000 --- a/Items/Weapons/Summon/CrimslimeStaff.cs +++ /dev/null @@ -1,42 +0,0 @@ -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Buffs.Summon; -using CalamityMod.Projectiles.Summon; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Summon -{ - public class CrimslimeStaff : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Weapons.Summon"; - public override void SetDefaults() - { - Item.width = 52; - Item.height = 52; - Item.damage = 24; - Item.mana = 10; - Item.useAnimation = Item.useTime = 36; - Item.useStyle = ItemUseStyleID.Swing; - Item.noMelee = true; - Item.knockBack = 2f; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; - Item.UseSound = SoundID.Item44; - Item.autoReuse = true; - Item.buffType = ModContent.BuffType(); - Item.shoot = ModContent.ProjectileType(); - Item.DamageType = DamageClass.Summon; - } - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - player.AddBuff(Item.buffType, 2); - var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI); - minion.originalDamage = Item.damage; - return false; - } - } -} diff --git a/Items/Weapons/Summon/CrimslimeStaff.png b/Items/Weapons/Summon/CrimslimeStaff.png deleted file mode 100644 index 3e40afc20b2aa455dbf6f6af4ea688bccece9eae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1351 zcmV-N1-SZ&P)Px)0ZBwbRA_x3c9$u!1I3Bn)|LWnUA)Wl>l;m(hk z$rZ#4y)a&AqIhBOf8BR7vaoxA;+y|_#UcBdN`@TJA zZ5NinVgH-<{dmqf?XS=K{@MVf0hnyi zFV+9uNv&P=#8x0lrsCoC7Qn>iUI1=HN8VZRjyAUWhzXR1CnC@|70AxvO0o zQSTGVB$JSvgq+AEn36+4l8orH`dF|B!k=$uZ9n%G*&`r*-@=-8FB( z;NKkpNZf_8Qf)kCe*n^R!z5N~6AOn`e!W5nwaBtMcyN1c4X`293=Uu z?I$8xg(_BT(E7_{^)oD<bL7i6o79+-9R#DgiKRw2>`*Wh!#H<`BTly?eTAYrRC50V1#_P=RkLcP+mMz++bzE~D7mq_S~&u7*FwrovRW?ByUPOjFE*u(dydde%OPCc z_Y2L90Q7u$4oH#_)t~$tfS(I5IbJka6#$Z}U=NB=dF}lG3|;)y+vlML6AG8A-)@c3 zFGT)2r5wgYqndI2@M!=x*|!u2u-&p>XY|$2l$@ue#?ZdEMRWJwb=wOK^iP!o5G|Mm zAdv3^l0-PAd%))RmABjfYMb4oa!FRd_af>XG*UdQ#RVQ!abvAt0Lff3&t0M=LZ&W` zMdJV)D=W1A=iXHN%ja)>3&6dbm5Y}g6SW*X3P8R;e_ppf*snYu_IXO$W*u;e(6G<% z*q>P44xCUOHlg6YZ2){?=T67Kh-3Uve9nHi97xs}#Iq%cg(GIDraO<2Nu(yCKj3z?Sj?0NO{dYedXd zO|;E$-zUOqe{stld4~St0=IF;UxMin0=4TrT2nAP+{k>@SgFl3t1-vpGeGu4Oi67* zlv3|A=f@%a+!XCrZryW)(!MPrg#Aqj8L7IwbMTrr-;G3xFHfEIXJd}zD`sbMde9VN zT24uoX)@BMo-?Pb-UiCrDM-!v^|dO*{GSGcwvaJNWU8IJDOi^H*F(FHkdd1EokQrs zfX@PW_Vj?Nr-ju1A~gXy$8;ERozc#l|CA&NWRiCYrL1lM4D02t1Q~Px$yQR|TWAht zEAJ5!GUWxTCOvxnMjT)urfLO}J7;?JK&b)L`3o(8u9+PFwpb*2kB~{mbkX9`Oh;gn zS*+D9S9y<+NhVuwCS3t002ov JPDHLkV1fi=j?e%A diff --git a/Items/Weapons/Summon/StaffOfNecrosteocytes.cs b/Items/Weapons/Summon/StaffOfNecrosteocytes.cs index 46d99f5fd5..c53423819a 100644 --- a/Items/Weapons/Summon/StaffOfNecrosteocytes.cs +++ b/Items/Weapons/Summon/StaffOfNecrosteocytes.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 52; Item.height = 54; - Item.damage = 31; + Item.damage = 25; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 4c04ee824d..c88257da6f 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1294,6 +1294,11 @@ BlackHawkBuff: { Description: The fighter jet will protect you } +BlightedSlime: { + DisplayName: Blighted Slime + Description: The blighted slime will protect you +} + BrimseekerBuff: { DisplayName: Brimseeker Description: Does it want something from you? @@ -1334,11 +1339,6 @@ CloudElemental: { Description: The Cloud Elemental will protect you } -Corroslime: { - DisplayName: Corroslime - Description: The corroslime will protect you -} - CorvidHarbringerBuff: { DisplayName: Raven Description: The powerful raven will protect you @@ -1359,11 +1359,6 @@ CosmilampBuff: { Description: The cosmilamp will protect you } -Crimslime: { - DisplayName: Crimslime - Description: The crimslime will protect you -} - DaedalusCrystalBuff: { DisplayName: Daedalus Crystal Description: The Daedalus crystal will protect you diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index ed0fa8eb78..91b8b88dd8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -85,6 +85,11 @@ BlackHawkRemote: { ''' } +BlightedSlimeStaff: { + DisplayName: Blighted Slime Staff + Tooltip: Summons a blighted slime to fight for you +} + BorealisBomber: { DisplayName: Borealis Bomber Tooltip: @@ -191,11 +196,6 @@ Cnidarian: { ''' } -CorroslimeStaff: { - DisplayName: Corroslime Staff - Tooltip: Summons a corro slime to fight for you -} - CorvidHarbringerStaff: { DisplayName: Corvid Harbinger Staff Tooltip: @@ -233,11 +233,6 @@ Cosmilamp: { Tooltip: Summons a cosmic lantern above your head to fight for you } -CrimslimeStaff: { - DisplayName: Crimslime Staff - Tooltip: Summons a crim slime to fight for you -} - CryogenicStaff: { DisplayName: Cryogenic Staff Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 121827ff82..2b0158eebe 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -35,11 +35,10 @@ BlackDragonHead.DisplayName: Black Celestial Dragon BlackDragonTail.DisplayName: Black Celestial Dragon BlackHawkBullet.DisplayName: Black Hawk Bullet BlackHawkSummon.DisplayName: Black Hawk +BlightedSlimeMinion.DisplayName: Blighted Slime BloodBreath.DisplayName: Blood Dragon Fire BloodRain.DisplayName: Blood Rain BloodSpit.DisplayName: Blood Spit -BoneMatter.DisplayName: Bone Matter -BoneMatter2.DisplayName: Bone Matter BrimseekerAuraBall.DisplayName: Seeker BrimstoneDartMinion.DisplayName: Brimfire BrimstoneDartSummon.DisplayName: Brimstone Dart @@ -64,7 +63,6 @@ CinderBlossom.DisplayName: Cinder Blossom CloudElementalMinion.DisplayName: Cloud Elemental CnidarianJellyfishOnTheString.DisplayName: Cnidarian CnidarianSpark.DisplayName: Cnidarian Spark -CorroslimeMinion.DisplayName: Corroslime CorruptionSlimeGodMinion.DisplayName: Slime God CosmicBlast.DisplayName: Cosmic Blast CosmicBlastBig.DisplayName: Cosmic Blast @@ -76,7 +74,6 @@ CosmicViperSplittingRocket.DisplayName: Splitting Rocket CosmicViperSummon.DisplayName: Cosmic Viper CosmilampBeam.DisplayName: Cosmic Beam CosmilampMinion.DisplayName: Cosmilamp -CrimslimeMinion.DisplayName: Crimslime CrimsonSlimeGodMinion.DisplayName: Slime God DaedalusCrystal.DisplayName: Daedalus Crystal DaedalusCrystalShot.DisplayName: Crystal Shot diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 6aec151c76..deff3f2114 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -1173,8 +1173,7 @@ namespace CalamityMod RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 4981b94c3f..766eded681 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -652,8 +652,7 @@ IL_6899: ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType() }; normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); diff --git a/Projectiles/Summon/CorroslimeMinion.png b/Projectiles/Summon/BlightedSlimeCorro.png similarity index 100% rename from Projectiles/Summon/CorroslimeMinion.png rename to Projectiles/Summon/BlightedSlimeCorro.png diff --git a/Projectiles/Summon/CrimslimeMinion.png b/Projectiles/Summon/BlightedSlimeCrim.png similarity index 100% rename from Projectiles/Summon/CrimslimeMinion.png rename to Projectiles/Summon/BlightedSlimeCrim.png diff --git a/Projectiles/Summon/CrimslimeMinion.cs b/Projectiles/Summon/BlightedSlimeMinion.cs similarity index 70% rename from Projectiles/Summon/CrimslimeMinion.cs rename to Projectiles/Summon/BlightedSlimeMinion.cs index 934db01829..2dff0559e7 100644 --- a/Projectiles/Summon/CrimslimeMinion.cs +++ b/Projectiles/Summon/BlightedSlimeMinion.cs @@ -2,23 +2,34 @@ using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class CrimslimeMinion : ModProjectile, ILocalizedModType + public class BlightedSlimeMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public float dust = 0f; + public static Asset Corroslime; + public static Asset Crimslime; + public override void SetStaticDefaults() { Main.projFrames[Type] = 6; Main.projPet[Type] = true; ProjectileID.Sets.MinionSacrificable[Type] = true; ProjectileID.Sets.MinionTargettingFeature[Type] = true; + + if (!Main.dedServ) + { + Corroslime = ModContent.Request("CalamityMod/Projectiles/Summon/BlightedSlimeCorro"); + Crimslime = ModContent.Request("CalamityMod/Projectiles/Summon/BlightedSlimeCrim"); + } } public override void SetDefaults() @@ -34,16 +45,16 @@ namespace CalamityMod.Projectiles.Summon Projectile.penetrate = -1; Projectile.timeLeft *= 5; Projectile.minion = true; + AIType = ProjectileID.BabySlime; Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 23; - AIType = ProjectileID.BabySlime; + Projectile.localNPCHitCooldown = 30; Projectile.DamageType = DamageClass.Summon; } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { - fallThrough = false; + //fallThrough = false; return true; } @@ -53,28 +64,28 @@ namespace CalamityMod.Projectiles.Summon CalamityPlayer modPlayer = player.Calamity(); if (dust == 0f) { - int constant = 16; - for (int i = 0; i < constant; i++) + int dustAmt = 16; + for (int i = 0; i < dustAmt; i++) { - Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; - rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center; + Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2(Projectile.width / 2f, Projectile.height) * 0.75f; + rotate = rotate.RotatedBy((i - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt) + Projectile.Center; Vector2 faceDirection = rotate - Projectile.Center; - int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Blood, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f); + int dust = Dust.NewDust(rotate + faceDirection, 0, 0, WorldGen.crimson ? DustID.Blood : DustID.Demonite, faceDirection.X, faceDirection.Y, 100, default, 1.1f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Main.dust[dust].velocity = faceDirection; } dust += 1f; } - bool isMinion = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); + bool isMinion = Projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); if (isMinion) { if (player.dead) { - modPlayer.cSlime2 = false; + modPlayer.blightedSlime = false; } - if (modPlayer.cSlime2) + if (modPlayer.blightedSlime) { Projectile.timeLeft = 2; } @@ -85,7 +96,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Texture2D texture2D13 = (WorldGen.crimson ? Crimslime : Corroslime).Value; int framing = texture2D13.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/BoneMatter.cs b/Projectiles/Summon/BoneMatter.cs deleted file mode 100644 index 5b86428a3d..0000000000 --- a/Projectiles/Summon/BoneMatter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon -{ - public class BoneMatter : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - ProjectileID.Sets.MinionShot[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 32; - Projectile.friendly = true; - Projectile.tileCollide = true; - Projectile.DamageType = DamageClass.Summon; - } - - public override void AI() - { - if (Projectile.frameCounter++ % 9 == 8) - { - Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Type]) - Projectile.Kill(); - } - } - } -} diff --git a/Projectiles/Summon/BoneMatter.png b/Projectiles/Summon/BoneMatter.png deleted file mode 100644 index 2f28b1ab3027cfd1e769e4d922e5032295c21a7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1196 zcmV;d1XKHoP)Px(W=TXrRCt{2o4;=yMHI(BYx{h$FF9euDUlK+lr$LeuS7IR2r5KDN5daLK}SPF zK`KOngy=x|7ij1ap)o~7kkKW!e7^JL?rbl`-q*YHvU|ICmUhQzK8%v=rjh{ zd(Z>m$$np-m%bJ7Nh0Y)k_i3&_rajjME*!5>yl1#bW~{~eS(Yz9{{(>k;mG-WS;p#5&R}!z(Rd0#Z?_XenhjC%cAA$+x)=;606hD5 zkmTOGZpQl7z1Jdu;b^*WqS_>S<-JOh4Dl+@`r_;FoDb{QQJEyKzjHtL0Wbde%Z|^r zzDBLCk|fJgztu@c^8C)$X0BxKuKx+Zqo0p~S1ZAz!8igqJG%hV7}%U2efIGOT8UGI zmr+y^YL4ctPVe+qryW5W>$*4Fj?QeK;qL7&P+Soyxi) z)~u=~#P8>CJHKCCBwx4wRG&oh7v|Ps{YUSs1N_Pd2Yew2glZ^w}OTM_NnIck*vse>_u7Sx7kX1LkImK&}7b#d6#oZk_@%gO4gtp+EP>(DZ^D>sA%4NWGK4L zS(S{=0Uxp;+vO^fOp)MD?`8yW&>z}y4Oe`YPd|DefO~hkF{BY-eJxqzWO@cTHL&x2 zMHYW{SbI-Z)x^mt*?+w2f6E%Ob zoWZfO933ruX6=23DtEU4xY173`Eqh*{m4Eex0~F&M8e)Rsq&pH_4k677@KQNRSB7D zAP@)y0s*i1|MlxunJA|E|BYQ~qLox|Z*1|sk0000< KMNUMnLSTaSg-lKW diff --git a/Projectiles/Summon/BoneMatter2.cs b/Projectiles/Summon/BoneMatter2.cs deleted file mode 100644 index f13ef7e259..0000000000 --- a/Projectiles/Summon/BoneMatter2.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon -{ - public class BoneMatter2 : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - ProjectileID.Sets.MinionShot[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 28; - Projectile.friendly = true; - Projectile.tileCollide = true; - Projectile.DamageType = DamageClass.Summon; - } - - public override void AI() - { - Projectile.frameCounter++; - if (Projectile.frameCounter % 9 == 8) - { - Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Type]) - Projectile.Kill(); - } - } - } -} diff --git a/Projectiles/Summon/BoneMatter2.png b/Projectiles/Summon/BoneMatter2.png deleted file mode 100644 index 277aedabfdf6d2cf1baea12ee3ff0812ed5f61a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1081 zcmV-91jhS`P)Px&^GQTORCt{2nn7!sq%fivR5 z1@(Y9fsiPxZfZBqa@f4t>=$o#?Sf|-=DF>9?VWdKzHi=d z#t;YuUX`fqfiG`d1)#It&)t9YV6*|f}8eXxDHnEUf z!}z19+ZzDTTCM|d;lnm?bj-@|N6}!o3&8qD7l5_1tq7ofx;fE{{86NMVL#@!9;C{? zx>+rL#LN^00)fE)fy(Q?+>qsqufMDGefR5;RnXrV0?=GqNB}z9eLr1LVXLlR`4q_f zoRF`3|NOZKU@uC4V)M@}pxC*(SM>R{%K&UW=q8Z)xi>%lAotvFw|)mQcO?I3XQTUB zCyJEV&jF3)*j{q4NPTVjr1l2@-~RFx$SFEDuH4N!WdxfE%INP5BY@3&sZtwH?#D<< zlnFEz2btlWQxU*YJx%~N?>+T=)+sx`d+rV0N+8Psy?#1|y?#12XI2|PuKLK~KG%s? zU0Fq_j{*lw?CYl8<#L}HKD%@=cdb1kyURtzUU9GJQ0__q;&?9Ca^*bjq?F-a(O@_N zid~L8MQgcD72IdFz`TE6sFPKI;z>n580Bc12hv^4_;cAB}x}wY3Dm{Z3D}W;{m9WtuI6;cf&_ zUpT&WI;N@s9D46a8KAXXA6tFfmL7_a+~?iiAeRG${NL;pStqJoCE_@3i>d}ok#Z^2 zdgVTQ3p<8V@K$>{0;tWUZLOtA{77AeH@QyO^COMLU-#4Nn?L*vM~Zl50=XI{=ne2Gj_m%o{Xc`w%>B;{ z)`M$5&aR~Mjl~FH`(f&albPpI8}BB^^mFTwD+oN;+yY(%KfhU8dkHes49OMrDGT;dpYHDLC)f+ zFf%Bw*3PzoES_`*F&ZVh4;<|Q{kA`fgxz^mg@|c!*$V8BBJtXIhCm%X;p{VqED({=|`upT+uodIC1swY$bSpJ(xBj1D0sx$CL~Ul#}j0)fD5&B?2e zrg>39_CK!w^hHxKiLVnA`8g4MT_6w${EPepSIe}SqRg=j00000NkvXXu0mjfSUDBG diff --git a/Projectiles/Summon/CorroslimeMinion.cs b/Projectiles/Summon/CorroslimeMinion.cs deleted file mode 100644 index 9fd7296ef8..0000000000 --- a/Projectiles/Summon/CorroslimeMinion.cs +++ /dev/null @@ -1,97 +0,0 @@ -using CalamityMod.Buffs.Summon; -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Summon -{ - public class CorroslimeMinion : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public float dust = 0f; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - Main.projPet[Type] = true; - ProjectileID.Sets.MinionSacrificable[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 26; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.minionSlots = 1; - Projectile.alpha = 75; - Projectile.aiStyle = ProjAIStyleID.Pet; - Projectile.timeLeft = 18000; - Projectile.penetrate = -1; - Projectile.timeLeft *= 5; - Projectile.minion = true; - AIType = ProjectileID.BabySlime; - Projectile.tileCollide = false; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 23; - Projectile.DamageType = DamageClass.Summon; - } - - public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) - { - fallThrough = false; - return true; - } - - public override void AI() - { - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (dust == 0f) - { - int constant = 16; - for (int i = 0; i < constant; i++) - { - Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; - rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center; - Vector2 faceDirection = rotate - Projectile.Center; - int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Demonite, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f); - Main.dust[dust].noGravity = true; - Main.dust[dust].noLight = true; - Main.dust[dust].velocity = faceDirection; - } - dust += 1f; - } - bool isMinion = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (isMinion) - { - if (player.dead) - { - modPlayer.cSlime = false; - } - if (modPlayer.cSlime) - { - Projectile.timeLeft = 2; - } - } - } - - public override bool MinionContactDamage() => true; - - public override bool PreDraw(ref Color lightColor) - { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; - int y6 = framing * Projectile.frame; - Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); - return false; - } - - public override bool OnTileCollide(Vector2 oldVelocity) => false; - } -} diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.cs b/Projectiles/Summon/CorruptionSlimeGodMinion.cs index e627103010..4eccfaee8a 100644 --- a/Projectiles/Summon/CorruptionSlimeGodMinion.cs +++ b/Projectiles/Summon/CorruptionSlimeGodMinion.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public class CorruptionSlimeGodMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public override string Texture => "CalamityMod/Projectiles/Summon/CorroslimeMinion"; + public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCorro"; public float dust = 0f; public override void SetStaticDefaults() diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.png b/Projectiles/Summon/CorruptionSlimeGodMinion.png deleted file mode 100644 index 70d4fe58696c8c860bb6f60ca57bf22014525db8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 614 zcmV-s0-61ZP)j zK~z}7?N`4`!$25)DS{vsL60I(^q zm&BYgD=drWK4~VIkyhq4B5n59x0FsV>T2hCZ%w(UT}PnZN9Sy?P*k)suTj*I?6kl= zjWHo@=$@D~`!9CA&LNHF<(j&3*Kkiux+exMJ4f6p%xN^{Ng)7KOG~k9P3MC;ZOXdK z>MlD+#+|{@{geI`*4#Toh71O>x2{wCmci4Ly$@U@-z>^;F~VyciGCuML%9*C4`M4m-i+mGfS#CjWL zbzZlx5uYmf6u}vDO;h9E&VRFlZg$9~i45lP4c#Xd?eryJLI3~&07*qoM6N<$f{M@- A`Tzg` diff --git a/Projectiles/Summon/CrimsonSlimeGodMinion.cs b/Projectiles/Summon/CrimsonSlimeGodMinion.cs index 3199f82bbc..129a42d4f0 100644 --- a/Projectiles/Summon/CrimsonSlimeGodMinion.cs +++ b/Projectiles/Summon/CrimsonSlimeGodMinion.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public class CrimsonSlimeGodMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public override string Texture => "CalamityMod/Projectiles/Summon/CrimslimeMinion"; + public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCrim"; public float dust = 0f; public override void SetStaticDefaults() diff --git a/Projectiles/Summon/CrimsonSlimeGodMinion.png b/Projectiles/Summon/CrimsonSlimeGodMinion.png deleted file mode 100644 index e4e1a4620f946d9714e70a45428559754257bdf2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 602 zcmV-g0;TOd*&?@C9rI$s_m<)>c+Ngq4s&!OBAH0u}}Y zF->9$iwi_NFbZcOvDlprv+n6Z;P!<5ny`O3_S@N+{04AxlFB9BSjYOm>P*|I1 z>$ml>zt}sD9kR>bx`x(Yh6UfUX_W#fDX`XjBYzz=6I oo;Y*WJ2x#WBxMKJO*o~mZ?GN!#= Main.projFrames[Type]) - { Projectile.frame = 1; - } bool isCorrectProjectile = Projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); if (isCorrectProjectile) { if (player.dead) - { modPlayer.necrosteocytesDudes = false; - } if (modPlayer.necrosteocytesDudes) - { Projectile.timeLeft = 2; - } } NPC potentialTarget = Projectile.Center.MinionHoming(900f, player); - if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.Distance(player.Center) > 205f && Projectile.position.X == Projectile.oldPosition.X))) - { + if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.Distance(player.Center) > 320f && Projectile.position.X == Projectile.oldPosition.X) || (potentialTarget is not null && Projectile.Top.Y > potentialTarget.Bottom.Y))) Projectile.velocity.Y = -10f; - } else if (Projectile.velocity.Y != 0f) - { Projectile.frame = 2; - } - if (Projectile.velocity.Y > -16f) - { + if (Projectile.velocity.Y < 16f) Projectile.velocity.Y += 0.3f; - } - Projectile.ai[0]++; - if (Projectile.ai[0] % 60f == 59f && Main.myPlayer == Projectile.owner) - { - int type = Utils.SelectRandom(Main.rand, ModContent.ProjectileType(), ModContent.ProjectileType()); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, type, Projectile.damage, Projectile.knockBack, Projectile.owner); - } if (potentialTarget is null) { - if (Math.Abs(player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos) > 160f) + if (Math.Abs(player.Center.X - Projectile.Center.X - 30f * Projectile.minionPos * player.direction) > 80f) { - Projectile.velocity.X += Main.rand.NextFloat(0.11f, 0.16f) * (player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos > 0f).ToDirectionInt(); + Projectile.velocity.X += Main.rand.NextFloat(0.1f, 0.13f) * (player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos > 0f).ToDirectionInt(); Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -13f, 13f); } else { - Projectile.velocity.X *= 0.95f; + Projectile.velocity.X *= 0.925f; + if (MathF.Abs(Projectile.velocity.X) < 0.05f) + Projectile.velocity.X = 0f; } - if (Projectile.Distance(player.Center) <= 150f) - { + + if (Projectile.velocity.X == 0f) Projectile.frame = 0; - } if (Projectile.Distance(player.Center) > 1600f) { Projectile.Center = player.Center; + Projectile.velocity = Vector2.Zero; Projectile.netUpdate = true; } } else { - if (Math.Abs(potentialTarget.Center.X - Projectile.Center.X + (int)MathHelper.Min(potentialTarget.width / 2, 40f)) > (int)MathHelper.Min(potentialTarget.width / 2, 40f)) - { - Projectile.velocity.X += Main.rand.NextFloat(0.08f, 0.15f) * (potentialTarget.Center.X - Projectile.Center.X > 0f).ToDirectionInt(); - Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -16f, 16f); - } - else - { + Projectile.velocity.X += Main.rand.NextFloat(0.1f, 0.13f) * (potentialTarget.Center.X > Projectile.Center.X).ToDirectionInt(); + Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -13f, 13f); + if (Math.Sign(Projectile.velocity.X) != (potentialTarget.Center.X > Projectile.Center.X).ToDirectionInt()) Projectile.velocity.X *= 0.95f; - } + if (Projectile.Distance(player.Center) > 1400f) { Projectile.Center = player.Center; + Projectile.velocity = Vector2.Zero; Projectile.netUpdate = true; } Projectile.MinionAntiClump(0.075f); From 32e35878c96ffb118ffea48998041cbe79482834 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 30 Jun 2026 15:25:40 -0400 Subject: [PATCH 02/35] Removed unused hook --- Projectiles/Summon/BlightedSlimeMinion.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Projectiles/Summon/BlightedSlimeMinion.cs b/Projectiles/Summon/BlightedSlimeMinion.cs index 2dff0559e7..5871046865 100644 --- a/Projectiles/Summon/BlightedSlimeMinion.cs +++ b/Projectiles/Summon/BlightedSlimeMinion.cs @@ -52,12 +52,6 @@ namespace CalamityMod.Projectiles.Summon Projectile.DamageType = DamageClass.Summon; } - public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) - { - //fallThrough = false; - return true; - } - public override void AI() { Player player = Main.player[Projectile.owner]; From 5e694aad780b5ee16d9e9cabf8171af4b20efc1e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Jul 2026 14:58:01 -0400 Subject: [PATCH 03/35] BoC is forced to do Illusion Trick once when it falls below 25% HP --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index a41c9c6511..c5b2575352 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -68,6 +68,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride #region Health Gates internal static float DesperateOnslaughtCreeperHealthGate => 0.1f; //When the cumulative health % of all creepers falls below this value, BoC will begin its pre-stun attack upon entering its idle phase. internal static float Phase2HealthGate => 0.5f; //When BoC's health % falls below this value, it will begin entering Phase 2 + internal static float ForcedIllusionHealthGate => 0.25f; //When BoC's health % falls below this value, the next attack is forced to be the Illusion Trick #endregion internal static float DespawnRangeSQ => 36000000f; @@ -253,6 +254,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride internal float SpawnTime = 0; internal int SpawnDelay = 0; internal bool OnSecondCreeperPhase = false; + internal bool ForcedIllusionAttack = false; private bool isNegative = false; internal int AttackSign { get => isNegative ? -1 : 1; set => isNegative = value == -1; } @@ -1741,26 +1743,35 @@ public class BrainOfCthulhuAI : VanillaAIOverride NPC.rotation = 0; ResetAttackValues(); - if (availableAttacks.Count == 0) + if (!ForcedIllusionAttack && (NPC.life / (float)NPC.lifeMax) <= ForcedIllusionHealthGate) { - bool quickChoice = Main.rand.NextBool(); - availableAttacks = [ - BrainAIState.Bloodletting, + ForcedIllusionAttack = true; + AIState = BrainAIState.IllusionTrick; + PreviousAttack = AIState; + } + else + { + if (availableAttacks.Count == 0) + { + bool quickChoice = Main.rand.NextBool(); + availableAttacks = [ + BrainAIState.Bloodletting, quickChoice ? BrainAIState.SanguineScythes : BrainAIState.IllusionDash, Main.rand.NextBool() ? BrainAIState.Phase2Idle : BrainAIState.Bloodletting, quickChoice ? BrainAIState.IllusionDash : BrainAIState.SanguineScythes, BrainAIState.IllusionTrick - ]; - } + ]; + } - AIState = availableAttacks[0]; - availableAttacks.RemoveAt(0); - PreviousAttack = AIState; + AIState = availableAttacks[0]; + availableAttacks.RemoveAt(0); + PreviousAttack = AIState; - if (AIState == BrainAIState.SanguineScythes) - { - Time = -31; - BoCAfterImages = []; + if (AIState == BrainAIState.SanguineScythes) + { + Time = -31; + BoCAfterImages = []; + } } NPC.netUpdate = true; @@ -2855,7 +2866,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride binaryWriter.Write(SpawnDelay); } - binaryWriter.WriteFlags(OnSecondCreeperPhase, isNegative, AttackFlag); + binaryWriter.WriteFlags(OnSecondCreeperPhase, ForcedIllusionAttack, isNegative, AttackFlag); binaryWriter.Write(AttackRotation); binaryWriter.Write(AttackTime); @@ -2887,7 +2898,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride SpawnDelay = binaryReader.ReadInt32(); } - binaryReader.ReadFlags(out OnSecondCreeperPhase, out isNegative, out AttackFlag); + binaryReader.ReadFlags(out OnSecondCreeperPhase, out ForcedIllusionAttack, out isNegative, out AttackFlag); AttackRotation = binaryReader.ReadSingle(); AttackTime = binaryReader.ReadSingle(); From 2bb5bc1ae23ecc2f60f101cb63e5b0848b2bf556 Mon Sep 17 00:00:00 2001 From: Karina Date: Wed, 1 Jul 2026 17:37:27 -0500 Subject: [PATCH 04/35] Kill all grounded minions --- Balancing/BalancingChangesManager.cs | 3 --- Items/Weapons/Summon/BlightedSlimeStaff.cs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index c5baa5d71f..0748603c73 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -97,9 +97,6 @@ namespace CalamityMod.Balancing #region Wall of Flesh // 50% resist to Staff of Necrosteocytes. NPCSpecificBalancingChanges.AddRange(Bundle(new List { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); - - // 20% resist to Blighted Slime Staff. - NPCSpecificBalancingChanges.AddRange(Bundle(new List { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); #endregion #region Aquatic Scourge diff --git a/Items/Weapons/Summon/BlightedSlimeStaff.cs b/Items/Weapons/Summon/BlightedSlimeStaff.cs index 3bfedcf270..412247aad7 100644 --- a/Items/Weapons/Summon/BlightedSlimeStaff.cs +++ b/Items/Weapons/Summon/BlightedSlimeStaff.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 52; Item.height = 54; - Item.damage = 20; + Item.damage = 18; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; From 16fbeeee27f686e0ee9036fd899a1d44013c1055 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Jul 2026 21:17:09 -0400 Subject: [PATCH 05/35] Removed two useless set bonus effects --- CalPlayer/CalamityPlayer.cs | 3 --- CalPlayer/CalamityPlayerMiscEffects.cs | 9 --------- Items/Armor/Auric/AuricTeslaHeadRogue.cs | 5 ++--- Items/Armor/Bloodflare/BloodflareHeadRogue.cs | 5 +---- Items/Armor/Tarragon/TarragonHeadRogue.cs | 2 +- .../Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 7 +------ 6 files changed, 5 insertions(+), 26 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 98d743a96f..60ca798fce 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1225,7 +1225,6 @@ namespace CalamityMod.CalPlayer public bool bloodflareFrenzy = false; public int bloodflareMeleeHits = 0; public bool bloodflareRanged = false; - public bool bloodflareThrowing = false; public bool bloodflareMage = false; public int bloodflareMageCooldown = 0; public bool bloodflareSummon = false; @@ -2587,7 +2586,6 @@ namespace CalamityMod.CalPlayer bloodflareMelee = false; bloodflareFrenzy = false; bloodflareRanged = false; - bloodflareThrowing = false; bloodflareMage = false; bloodflareSummon = false; @@ -3369,7 +3367,6 @@ namespace CalamityMod.CalPlayer bloodflareFrenzy = false; bloodflareMeleeHits = 0; bloodflareRanged = false; - bloodflareThrowing = false; bloodflareMage = false; bloodflareSummon = false; bloodflareSummonTimer = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c56ce9b6db..02a207d308 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2763,9 +2763,6 @@ namespace CalamityMod.CalPlayer if (Player.buffTime[l] <= 2 && buffID == ModContent.BuffType()) if (Player.whoAmI == Main.myPlayer) Player.AddCooldown(Cooldowns.TarragonImmunity.ID, TarragonHeadRogue.ImmunityCooldown); - - if (CalamityBuffSets.IsDebuff[buffID]) - Player.GetDamage() += TarragonHeadRogue.RogueDamageBoostWhileDebuffed; } } @@ -3936,12 +3933,6 @@ namespace CalamityMod.CalPlayer Player.AddBuff(BuffID.Inferno, 2); } - if (bloodflareThrowing) - { - if (Player.statLife > (int)(Player.statLifeMax2 * BloodflareHeadRogue.DefenseBoostHealthThreshold)) - Player.statDefense += BloodflareHeadRogue.DefenseBoostAboveHealthThreshold; - } - if (bloodflareSummon) { if (Player.statLife <= (int)(Player.statLifeMax2 * BloodflareHeadSummon.DefenseBoostHealthThreshold)) diff --git a/Items/Armor/Auric/AuricTeslaHeadRogue.cs b/Items/Armor/Auric/AuricTeslaHeadRogue.cs index ffe8c73ddf..7283be269e 100644 --- a/Items/Armor/Auric/AuricTeslaHeadRogue.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRogue.cs @@ -50,7 +50,6 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.tarraSet = true; modPlayer.tarraThrowing = true; modPlayer.bloodflareSet = true; - modPlayer.bloodflareThrowing = true; modPlayer.godSlayer = true; modPlayer.godSlayerThrowing = true; modPlayer.auricSet = true; @@ -87,8 +86,8 @@ namespace CalamityMod.Items.Armor.Auric Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor }; var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}"); line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(RogueDamageBoostAtFullHealth.ToPercent(), SetBonusHurtDamageThreshold, CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodSlayerChestplate.DashCooldown.FramesToSeconds()) - : setBonusTooltipNumber == 2 ? LocalizedText.Format(DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent()) - : LocalizedText.Format(CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds(), RogueDamageBoostWhileDebuffed.ToPercent())); + : setBonusTooltipNumber == 2 ? LocalizedText.ToString() + : LocalizedText.Format(CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds())); line.OverrideColor = armorColors[setBonusTooltipNumber - 1]; } } diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index 230ad7fed4..53e92279dc 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -21,8 +21,6 @@ namespace CalamityMod.Items.Armor.Bloodflare // Set Bonus public static float SetBonusRogueStealth = 1.2f; - public static int DefenseBoostAboveHealthThreshold = 30; - public static float DefenseBoostHealthThreshold = 0.8f; public override void SetDefaults() { @@ -41,10 +39,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { var modPlayer = player.Calamity(); modPlayer.bloodflareSet = true; - modPlayer.bloodflareThrowing = true; modPlayer.rogueStealthMax += SetBonusRogueStealth; modPlayer.wearingRogueArmor = true; - player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent()); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth()); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Tarragon/TarragonHeadRogue.cs b/Items/Armor/Tarragon/TarragonHeadRogue.cs index 70adc74719..4144fe0ee4 100644 --- a/Items/Armor/Tarragon/TarragonHeadRogue.cs +++ b/Items/Armor/Tarragon/TarragonHeadRogue.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Armor.Tarragon modPlayer.tarraThrowing = true; modPlayer.rogueStealthMax += SetBonusRogueStealth; modPlayer.wearingRogueArmor = true; - player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds(), RogueDamageBoostWhileDebuffed.ToPercent()); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds()); } public override void UpdateEquip(Player player) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index e7a6ec4fc8..909067b27e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -249,11 +249,7 @@ BloodflareHeadRogue: { {$Common.RogueStealth} {$BloodflareHeadRogue.SetBonusEffect@1} ''' - SetBonusEffect: - ''' - Grants {0} defense when above {1}% life - {$BloodflareBodyArmor.CommonSetBonus} - ''' + SetBonusEffect: "{$BloodflareBodyArmor.CommonSetBonus}" } BloodflareHeadSummon: { @@ -705,7 +701,6 @@ TarragonHeadRogue: { ''' After every {0} rogue critical hits you will gain {1} seconds of damage immunity This effect has a cooldown of {2} seconds - While under the effects of a debuff you gain {3}% increased rogue damage {$TarragonBreastplate.CommonSetBonus} ''' } From 1a2a15a9b9e625c6ef17c2c98993b26c29673698 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Jul 2026 13:11:35 -0400 Subject: [PATCH 06/35] Removed mod calls that were just getting or setting ID sets Since you can just access the ID set --- ModSupport/ModCalls.cs | 163 ----------------------------------------- 1 file changed, 163 deletions(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index f8e3246eb3..7ee382cdfd 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -877,90 +877,6 @@ namespace CalamityMod public static bool DisableAllDodges(bool disable) => Main.LocalPlayer.Calamity().disableAllDodges = disable; #endregion - #region Amalgam Potion Buff List - public static bool SetAmalgamBuffList(int type, bool shouldBeListed) - { - if (shouldBeListed && !CalamityBuffSets.BuffedByAmalgam[type]) - { - CalamityBuffSets.BuffedByAmalgam[type] = true; - return true; - } - else if (!shouldBeListed) - { - CalamityBuffSets.BuffedByAmalgam[type] = false; - return false; - } - - return false; - } - public static bool SetPersistentBuffList(int type, bool isPersistent) - { - if (isPersistent && !CalamityBuffSets.IsPersistentBuff[type]) - { - CalamityBuffSets.IsPersistentBuff[type] = true; - return true; - } - else if (!isPersistent) - { - CalamityBuffSets.IsPersistentBuff[type] = false; - return false; - } - - return false; - } - - public static bool IsOnAmalgamBuffList(int type) => CalamityBuffSets.BuffedByAmalgam[type]; - public static bool IsOnPersistentBuffList(int type) => CalamityBuffSets.IsPersistentBuff[type]; - #endregion - - #region Venerated Locket Bans - public static bool AddToVeneratedLocketBanlist(int type) - { - if (!CalamityItemSets.DisablesVeneratedLocketEffect[type]) - { - CalamityItemSets.DisablesVeneratedLocketEffect[type] = true; - return true; - } - return false; - } - #endregion - - #region Summoner Cross Class Nerf Disabling - public static bool SetSummonerNerfDisabledByMinion(int type, bool disableNerf) - { - if (disableNerf && !CalamityProjectileSets.MinionWhichIgnoresSummonerNerf[type]) - { - CalamityProjectileSets.MinionWhichIgnoresSummonerNerf[type] = true; - return true; - } - else if (!disableNerf) - { - CalamityProjectileSets.MinionWhichIgnoresSummonerNerf[type] = false; - return false; - } - - return false; - } - public static bool SetSummonerNerfDisabledByItem(int type, bool disableNerf) - { - if (disableNerf && !CalamityItemSets.ItemWhichDisablesSummonerNerf[type]) - { - CalamityItemSets.ItemWhichDisablesSummonerNerf[type] = true; - return true; - } - else if (!disableNerf) - { - CalamityItemSets.ItemWhichDisablesSummonerNerf[type] = false; - return false; - } - - return false; - } - - public static bool GetSummonerNerfDisabledByMinion(int type) => CalamityProjectileSets.MinionWhichIgnoresSummonerNerf[type]; - public static bool GetSummonerNerfDisabledByItem(int type) => CalamityItemSets.ItemWhichDisablesSummonerNerf[type]; - #endregion - #region Debuff Display support public static void RegisterDebuff(string texturePath, Predicate debuffCheck) { @@ -1038,19 +954,6 @@ namespace CalamityMod } #endregion - #region Adding minions to boss hp scaling config - //This is to add minions to the hp scaling config - public static bool AddToHPScaling(int type) - { - if (!CalamityNPCSets.ScalesHealthLikeBoss[type]) - { - CalamityNPCSets.ScalesHealthLikeBoss[type] = true; - return true; - } - return false; - } - #endregion - #region Call public static object Call(params object[] args) @@ -2075,55 +1978,6 @@ namespace CalamityMod CalamityMod.Log.Warn("This mod call is deprecated. Calamity automatically registers cooldowns."); return null; - case "GetSummonerNerfDisabledByItem": - if (args.Length != 2 || !isValidItemArg(args[1])) - return new ArgumentException("ERROR: Must specify a valid item to check status of."); - return GetSummonerNerfDisabledByItem(castItem(args[1]).type); - - case "GetSummonerNerfDisabledByMinion": - if (args.Length != 2 || !isValidProjectileArg(args[1])) - return new ArgumentException("ERROR: Must specify a valid projectile to check status of."); - return GetSummonerNerfDisabledByMinion(castProjectile(args[1]).type); - - case "SetSummonerNerfDisabledByItem": - if (args.Length < 2 || !isValidItemArg(args[1])) - return new ArgumentException("ERROR: Must specify a valid item to set the status of."); - if (args.Length != 3 || args[2] is not bool disableNerf) - return new ArgumentException("ERROR: Must specify a bool that determines whether the summoner nerf is disabled."); - return SetSummonerNerfDisabledByItem(castItem(args[1]).type, disableNerf); - - case "SetSummonerNerfDisabledByMinion": - if (args.Length < 2 || !isValidItemArg(args[1])) - return new ArgumentException("ERROR: Must specify a valid projectile to set the status of."); - if (args.Length != 3 || args[2] is not bool disableNerf2) - return new ArgumentException("ERROR: Must specify a bool that determines whether the summoner nerf is disabled."); - return SetSummonerNerfDisabledByItem(castItem(args[1]).type, disableNerf2); - - case "IsOnAmalgamBuffList": - if (args.Length != 2 || !castID(args[1], out int buffType)) - return new ArgumentException("ERROR: Must specify a valid buff ID to check status of."); - return IsOnAmalgamBuffList(buffType); - - case "IsOnPersistentBuffList": - case "IsPersistentBuff": - if (args.Length != 2 || !castID(args[1], out int buffType2)) - return new ArgumentException("ERROR: Must specify a valid buff ID to check status of."); - return IsOnPersistentBuffList(buffType2); - - case "SetAmalgamBuffList": - if (args.Length < 2 || !castID(args[1], out int buffType3)) - return new ArgumentException("ERROR: Must specify a valid buff ID to set the status of."); - if (args.Length != 3 || args[2] is not bool shouldBeListed) - return new ArgumentException("ERROR: Must specify a bool that determines whether the amalgam should enable extend the duration of this buff."); - return SetAmalgamBuffList(buffType3, shouldBeListed); - - case "SetPersistentBuffList": - if (args.Length < 2 || !castID(args[1], out int buffType4)) - return new ArgumentException("ERROR: Must specify a valid buff ID to set the status of."); - if (args.Length != 3 || args[2] is not bool isPersistent) - return new ArgumentException("ERROR: Must specify a bool that determines whether the buff is persistent after death for the Amalgam to properly reset."); - return SetPersistentBuffList(buffType4, isPersistent); - case "CreateCodebreakerDialogOption": // NOTE: This is a legacy variant of this call. The variant with three arguments is the standard. if (args.Length == 4) @@ -2143,13 +1997,6 @@ namespace CalamityMod return null; - case "AddToVeneratedLocketBanlist": - if (args.Length < 2) - return new ArgumentException("ERROR: Not enough arguments!"); - if (args[1] is not int itemType) - return new ArgumentException("ERROR: Must specify a valid item type as an int index of the item."); - return AddToVeneratedLocketBanlist(itemType); - case "RegisterDebuff": case "AddToDebuffDisplay": case "AddDebuffDisplay": @@ -2247,16 +2094,6 @@ namespace CalamityMod AndroombaFriendly.customConversionTypes.Add((itemID, texturePath, NPCaction)); return null; } - case "AddMinibossToHPScalingConfig": - case "AddMinionToHPScalingConfig": - case "AddToBossHPScalingConfig": - { - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify an NPC id/type as an int or short ID. Example: NPCType()"); - if (!castID(args[1], out int npcType6)) - return new ArgumentException("ERROR: The first argument to \"AddToBossHPScalingConfig\" must be an int or short ID."); - return AddToHPScaling(npcType6); - } case "GetDebuffDamage": { if (args.Length < 2) From 6d5cb50c0dc492332780721c59e13d1785f81a6e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Jul 2026 16:24:33 -0400 Subject: [PATCH 07/35] Default mod call case logs a warn message instead of throwing an exception --- ModSupport/ModCalls.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 7ee382cdfd..237ee67bae 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -2105,7 +2105,10 @@ namespace CalamityMod case "GetDebuffDamageFunction": //This exists because Calamity's Mod Call lookup is slow due to this string switch, and this method may be called hundreds of times per frame by some addons. return (object)DebuffData.GetDebuffRegenValue; default: - return new ArgumentException("ERROR: Invalid method name."); + { + CalamityMod.Log.Warn($"{methodName} is an invalid method name for Calamity Mod. Are you calling a method which no longer exists?"); + return null; + } } } #endregion From 6785224a52e1684932d88955d213e51bf5d2550a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Jul 2026 18:07:55 -0400 Subject: [PATCH 08/35] Slightly adjusted BoC phase 2 charge teleporting Reduced random of teleport position and made its teleport position ahead of the player scale in distance based on the player's velocity This should make it more clear that Brain is trying to teleport ahead of the player --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index c5b2575352..76bc2cf222 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -1674,12 +1674,15 @@ public class BrainOfCthulhuAI : VanillaAIOverride float angleChange = MathHelper.Lerp(MathHelper.Pi / 24f, 0f, MathHelper.Clamp(Time / (ChaseTime * 0.666f), 0f, 1f)); NPC.velocity = NPC.velocity.RotateDirectionTowards(NPC.DirectionTo(Target.Center).ToRotation(), angleChange) * (MathHelper.Lerp(ChaseMinSpeed, ChaseMaxSpeed, Time / ChaseTime) * speedUp * slowDown); + // Teleport ahead of the player's movement if (Time == ChaseTime) { if (Main.netMode != NetmodeID.SinglePlayer) SelectNewTarget(); - Vector2 direction = Target.velocity.SafeNormalize(Vector2.UnitX * Target.direction).RotatedBy(Main.rand.NextFloat(-MathHelper.Pi / 3f, MathHelper.Pi / 3f)); - AttackPosition = Target.Center + (direction * DefaultTeleportDistance); + Vector2 direction = Target.velocity.RotatedByRandom(MathHelper.Pi * 0.1f); + if (direction.Length() < 3.5f) + direction = direction.SafeNormalize(Vector2.UnitX * Target.direction) * 3.5f; + AttackPosition = Target.Center + (direction * IdleTeleportDuration * 1.8f); BoCAfterImages = []; NPC.damage = 0; NPC.netUpdate = true; From 42a53c22385bc9a21a6eae1cf4088fb238a0204a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Jul 2026 13:59:05 -0400 Subject: [PATCH 09/35] Demonshade armor tooltip changes Removed "shadow" mentions Greaves actually states what it does --- Items/Armor/Demonshade/DemonshadeGreaves.cs | 2 ++ .../en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Items/Armor/Demonshade/DemonshadeGreaves.cs b/Items/Armor/Demonshade/DemonshadeGreaves.cs index 1afb8f1d2c..153c39dc9d 100644 --- a/Items/Armor/Demonshade/DemonshadeGreaves.cs +++ b/Items/Armor/Demonshade/DemonshadeGreaves.cs @@ -2,6 +2,7 @@ using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Demonshade @@ -14,6 +15,7 @@ namespace CalamityMod.Items.Armor.Demonshade // Shadow Speed... (elusive) public static float MoveSpeedBoost = 0.3f; public static float AccelerationBoost = 0.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), AccelerationBoost.ToPercent()); public override void SetDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 909067b27e..9be46a57ac 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -281,13 +281,13 @@ DemonshadeBreastplate: { {$CommonItemTooltip.PercentIncreasedDamageCritChance@1} {$CommonItemTooltip.PercentIncreasedMeleeSpeed@2} {$CommonItemTooltip.PercentChanceToSaveAmmo@3} - Standing still absorbs shadows to grant exponentially accelerating life regen + Standing still grants exponentially accelerating life regen ''' } DemonshadeGreaves: { DisplayName: Demonshade Greaves - Tooltip: Shadow speed + Tooltip: "{$CommonItemTooltip.PercentIncreasedMovementSpeed} and {1}% increased acceleration" } DemonshadeHelm: { From c7d0dda474cbaa3e7cd74d8b6342c9949180340d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Jul 2026 18:26:11 -0400 Subject: [PATCH 10/35] Some balancing --- Items/Weapons/Summon/DankStaff.cs | 2 +- Items/Weapons/Summon/EtherealSubjugator.cs | 2 +- Items/Weapons/Summon/FleshOfInfidelity.cs | 2 +- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 8 -------- Projectiles/Magic/NightOrb.cs | 1 + 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Summon/DankStaff.cs b/Items/Weapons/Summon/DankStaff.cs index 744d8c80d3..9595289417 100644 --- a/Items/Weapons/Summon/DankStaff.cs +++ b/Items/Weapons/Summon/DankStaff.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 58; Item.height = 58; - Item.damage = 14; + Item.damage = 10; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index 1d95674621..e2311395fc 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 66; Item.height = 70; - Item.damage = 175; + Item.damage = 160; Item.DamageType = DamageClass.Summon; Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/FleshOfInfidelity.cs b/Items/Weapons/Summon/FleshOfInfidelity.cs index 75b31facef..37ee050f6a 100644 --- a/Items/Weapons/Summon/FleshOfInfidelity.cs +++ b/Items/Weapons/Summon/FleshOfInfidelity.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 42; Item.height = 42; - Item.damage = 20; + Item.damage = 16; Item.DamageType = DamageClass.Summon; Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index 76bc2cf222..3ee393701e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -2,27 +2,19 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using CalamityMod.Buffs.DamageOverTime; using CalamityMod.DataStructures; using CalamityMod.Enums; using CalamityMod.Events; -using CalamityMod.NPCs; using CalamityMod.Particles; using CalamityMod.Projectiles.Boss.BrainOfCthulhu; -using CalamityMod.Utilities.Daybreak; using CalamityMod.World; using Microsoft.CodeAnalysis; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Graphics.PackedVector; -using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.Chat; -using Terraria.DataStructures; using Terraria.GameContent; -using Terraria.Graphics.Effects; -using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; diff --git a/Projectiles/Magic/NightOrb.cs b/Projectiles/Magic/NightOrb.cs index 0bfd8ae7cc..906529f68b 100644 --- a/Projectiles/Magic/NightOrb.cs +++ b/Projectiles/Magic/NightOrb.cs @@ -24,5 +24,6 @@ namespace CalamityMod.Projectiles.Magic { CalamityUtils.MagnetSphereHitscan(Projectile, 300f, 6f, 24f, 5, ModContent.ProjectileType()); } + public override bool? CanDamage() => false; } } From c25ba4d302df86262246bc8f16463f69724cef94 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Jul 2026 22:00:45 -0400 Subject: [PATCH 11/35] Spadefish triggers the summon damage penalty --- Systems/Collections/CalamityItemSets.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index 5abf9646f5..6098ba21ff 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Systems.Collections public static bool[] WeaponWithToolPowerAffectedBySummonPenalty = Factory.CreateNamedSet("WeaponWithToolPowerAffectedBySummonPenalty") .Description("Makes items with tool power still trigger the summon damage penalty.") .RegisterBoolSet(ItemID.ButchersChainsaw, ItemID.LucyTheAxe, ItemID.Rockfish, ItemType(), ItemType(), ItemType(), - ItemType(), ItemType()); + ItemType(), ItemType(), ItemType()); /// /// If for an item type, manually disables Calamity's summon damage penalty mechanic while that item type is held.
From abaee5e090afdf9e74c1568e23a48774b538ea18 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Jul 2026 16:24:03 -0400 Subject: [PATCH 12/35] Golem nerfs * Decreased jump horizontal speed and how much it scales with missing health * Death Mode nerfs: ** Decreased jump frequency, especially while fists are still alive ** No longer gives fireballs from jumps after head is killed faster velocity ** Decreased spread of laser spread attack --- NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs index e5ffa7b8ab..00969c8e2e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs @@ -190,7 +190,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.getGoodWorld) NPC.ai[1] += 100f; - if (enrage || death) + if (enrage) { NPC.ai[1] += 18f; } @@ -239,8 +239,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (!jump) return; - float velocityBoost = (death ? 5f : 3.8f) * (1f - (lifeRatio / 2)); - float velocityX = (death ? 6f : 4f) + velocityBoost; + float velocityBoost = (death ? 3f : 2f) * (1f - (lifeRatio / 2)); + float velocityX = 4f + velocityBoost; if (enrage) velocityX *= 1.5f; @@ -280,7 +280,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.noTileCollide = true; NPC.ai[2] += 1f; - float jumpVelocity = death ? 26f : 21f; + float jumpVelocity = death ? 21f : 18f; if (enrage) jumpVelocity *= 1.25f; if (turboEnrage) @@ -393,7 +393,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Main.dust[fiery2].velocity.X *= 2f; } - float projectileVelocity = death ? 7.5f : 4.75f; + float projectileVelocity = 4.75f; if (enrage) projectileVelocity *= 1.5f; if (turboEnrage) @@ -1060,7 +1060,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (NPC.ai[1] % 10f == 0f) SoundEngine.PlaySound(SoundID.Item33, spawnLocation); - float laserFireAngle = MathHelper.ToRadians((NPC.ai[1] - telegraphTime + 20) * (death ? 2.45f : 2f)); + float laserFireAngle = MathHelper.ToRadians((NPC.ai[1] - telegraphTime + 20) * (death ? 2.35f : 2f)); Vector2 laserVelocity = Vector2.UnitY.RotatedBy(laserFireAngle * -NPC.localAI[1]) * (death ? 15f : 12f); if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -1300,7 +1300,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses for (int i = -1; i <= 1; i += 2) { Vector2 spawnLocation = new Vector2(NPC.Center.X + 14f * NPC.scale * i, NPC.Center.Y - 20f * NPC.scale); - float laserFireAngle = MathHelper.ToRadians((NPC.ai[1] - telegraphTime + 20) * (death ? 2.1f : 2f)); + float laserFireAngle = MathHelper.ToRadians((NPC.ai[1] - telegraphTime + 20) * 2f); Vector2 laserVelocity = -Vector2.UnitY.RotatedBy(laserFireAngle * i) * (death ? 15f : 12f); if (Main.netMode != NetmodeID.MultiplayerClient) { From e3fb3f19406ad0983bf479f257bf2735ead7eb54 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Jul 2026 17:19:50 -0400 Subject: [PATCH 13/35] Crabulon changes/nerfs * No longer fires mushroom projectiles during idle, only during walking * Decreased walking velocity in Expert+ * Mushroom jump now has horizontal velocity lowered after landing * Fixed counter tracking jump count sometimes getting desynced * Death Mode: ** No longer spawns more Crab Shrooms ** Walking velocity no longer scales even more based on missing health ** No longer fires mushroom projectiles upwards on every jump, removed decrease to projectile amount that was only applied because of this ** No longer gives the first three jumps a faster horizontal velocity below 50% HP ** Mushroom jump now only spawns horizontal mushrooms on landing in Death Mode, which uses current Rev projectile amount and velocity --- NPCs/Crabulon/Crabulon.cs | 144 ++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 85 deletions(-) diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 3ecd980cd7..b921f02609 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -178,40 +178,6 @@ namespace CalamityMod.NPCs.Crabulon else if (NPC.timeLeft < 1800) NPC.timeLeft = 1800; - if (NPC.ai[0] < 2f) - { - int mushBombAmt = phase4 ? 6 : phase3 ? 3 : phase2 ? 2 : 1; - float fireRate = phase4 ? 6f : phase3 ? 3f : phase2 ? 2f : 1f; - NPC.localAI[3] += fireRate; - if (NPC.ai[3] == 0f) - { - float shootMushroomsGateValue = revenge ? 120f : expertMode ? 200f : 300f; - if (NPC.localAI[3] > shootMushroomsGateValue) - { - NPC.ai[3] = 1f; - NPC.localAI[3] = 0f; - } - } - else if (NPC.localAI[3] > 30f) - { - NPC.localAI[3] = 0f; - NPC.ai[3] += 1f; - if (NPC.ai[3] >= mushBombAmt) - NPC.ai[3] = 0f; - - float mushBombSpeed = phase4 ? 16f : phase3 ? 14f : phase2 ? 12f : 10f; - int type = ModContent.ProjectileType(); - SoundEngine.PlaySound(SoundID.Item42, NPC.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float yVelocity = death ? 1f : expertMode ? 2.5f : 4f; - Vector2 projectileVelocity = (Vector2.Normalize(player.Center - NPC.Center) * mushBombSpeed) - Vector2.UnitY * yVelocity; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, projectileVelocity, type, MushroomShotDamage, 0f, Main.myPlayer, 0f, player.Center.Y); - } - } - } - if (NPC.ai[0] == 0f) { // Avoid cheap bullshit @@ -245,7 +211,40 @@ namespace CalamityMod.NPCs.Crabulon // Avoid cheap bullshit NPC.damage = 0; - float walkingVelocity = death ? (5f + 1f * (1f - lifeRatio)) : expertMode ? 5f : 3.5f; + // Fire mushroom projectiles at the player + int mushBombAmt = phase4 ? 6 : phase3 ? 3 : phase2 ? 2 : 1; + float fireRate = phase4 ? 6f : phase3 ? 3f : phase2 ? 2f : 1f; + NPC.localAI[3] += fireRate; + if (NPC.ai[3] == 0f) + { + float shootMushroomsGateValue = revenge ? 120f : expertMode ? 200f : 300f; + if (NPC.localAI[3] > shootMushroomsGateValue) + { + NPC.ai[3] = 1f; + NPC.localAI[3] = 0f; + } + } + else if (NPC.localAI[3] > 30f) + { + NPC.localAI[3] = 0f; + NPC.ai[3] += 1f; + if (NPC.ai[3] >= mushBombAmt) + NPC.ai[3] = 0f; + + float mushBombSpeed = phase4 ? 16f : phase3 ? 14f : phase2 ? 12f : 10f; + int type = ModContent.ProjectileType(); + SoundEngine.PlaySound(SoundID.Item42, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float yVelocity = death ? 1f : expertMode ? 2.5f : 4f; + Vector2 projectileVelocity = (Vector2.Normalize(player.Center - NPC.Center) * mushBombSpeed) - Vector2.UnitY * yVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, projectileVelocity, type, MushroomShotDamage, 0f, Main.myPlayer, 0f, player.Center.Y); + } + } + + // Walking + float walkingVelocity = expertMode ? 4.5f : 3.5f; if (phase2) walkingVelocity += 0.5f; if (phase3) @@ -330,6 +329,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.noTileCollide = false; NPC.ai[0] = (Main.rand.NextBool() && revenge && phase2) ? 4f : 2f; NPC.ai[1] = 0f; + NPC.ai[3] = 0f; NPC.ForceNetUpdate(); } @@ -485,7 +485,7 @@ namespace CalamityMod.NPCs.Crabulon int type = ModContent.ProjectileType(); - if ((NPC.ai[2] % 2f == 0f || death) && ((phase2 && revenge) || (phase3 && expertMode))) + if (NPC.ai[2] % 2f == 0f && ((phase2 && revenge) || (phase3 && expertMode))) { SoundEngine.PlaySound(SoundID.Item42, NPC.Center); if (Main.netMode != NetmodeID.MultiplayerClient) @@ -495,8 +495,7 @@ namespace CalamityMod.NPCs.Crabulon destination.Normalize(); destination *= projectileVelocity; - // Less mushrooms in Death Mode phase 3 because otherwise it's an absolute shitshow. - int numProj = phase4 ? 14 : CalamityWorld.death ? (phase3 ? 10 : 16) : 12; + int numProj = phase4 ? 14 : CalamityWorld.death ? 16 : 12; float rotation = MathHelper.ToRadians(90); for (int i = 0; i < numProj; i++) { @@ -520,8 +519,7 @@ namespace CalamityMod.NPCs.Crabulon destination.Normalize(); destination *= projectileVelocity; - // Less mushrooms in Death Mode phase 3 because otherwise it's an absolute shitshow. - int numProj = phase4 ? 8 : (phase3 && death) ? 6 : 8; + int numProj = 8; float rotation = MathHelper.ToRadians(60); for (int i = 0; i < numProj; i++) { @@ -621,42 +619,19 @@ namespace CalamityMod.NPCs.Crabulon if (revenge) { float velocityXAdjustment = maxVelocityX; - - if (lifeRatio < 0.5f && death) + switch ((int)NPC.ai[3]) { - // Mega velocity - switch ((int)NPC.ai[3]) - { - case 0: // Normal - case 1: // High - case 2: // Low - maxVelocityX += velocityXAdjustment * 0.5f; - break; + case 0: // Normal + case 1: // High + case 2: // Low + break; - case 3: // Long and low - maxVelocityX += velocityXAdjustment * 1.5f; - break; + case 3: // Long and low + maxVelocityX += velocityXAdjustment * (lifeRatio < 0.5f && death ? 1.5f : 1f); + break; - default: - break; - } - } - else - { - switch ((int)NPC.ai[3]) - { - case 0: // Normal - case 1: // High - case 2: // Low - break; - - case 3: // Long and low - maxVelocityX += velocityXAdjustment; - break; - - default: - break; - } + default: + break; } } @@ -728,31 +703,30 @@ namespace CalamityMod.NPCs.Crabulon if (NPC.velocity.Y >= 0f && NPC.Bottom.Y >= NPC.ai[3] - NPC.height) NPC.noTileCollide = false; - // Impact and create lines of mushrooms that spread out along the ground (similar to an old Providence attack) if (NPC.Bottom.Y >= NPC.ai[3] || NPC.velocity.Y == 0f) { SoundEngine.PlaySound(SlamSound, NPC.Center); + NPC.velocity.X *= 0.5f; NPC.ai[0] = 0f; NPC.ai[1] = 0f; NPC.ai[2] = 0f; NPC.ai[3] = 0f; NPC.netUpdate = true; - int type = ModContent.ProjectileType(); - - if (Main.netMode != NetmodeID.MultiplayerClient) + // Create lines of mushrooms that spread out along the ground in Death Mode + if (death && Main.netMode != NetmodeID.MultiplayerClient) { - float xVelocity = death ? 2f : 1f; - int numProj = death ? 5 : 3; - Vector2 initialVelocity = Vector2.UnitX * xVelocity; + int numProj = 3; + int type = ModContent.ProjectileType(); + Vector2 initialVelocity = Vector2.UnitX; Vector2 initialSpawnLocation = NPC.Bottom - new Vector2(0f, 8f); - for (int i = 0; i < numProj; i++) - Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(0, 81), Main.rand.Next(-20, 1)), initialVelocity - (i / (float)numProj * initialVelocity), type, MushroomShotDamage, 0f, Main.myPlayer); + for (int i = 1; i <= numProj; i++) + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(0, 81), Main.rand.Next(-20, 1)), initialVelocity * (i / (float)numProj), type, MushroomShotDamage, 0f, Main.myPlayer); - for (int i = 0; i < numProj; i++) - Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(-81, 0), Main.rand.Next(-20, 1)), -(initialVelocity - (i / (float)numProj * initialVelocity)), type, MushroomShotDamage, 0f, Main.myPlayer); + for (int i = 1; i <= numProj; i++) + Projectile.NewProjectile(NPC.GetSource_FromAI(), initialSpawnLocation + new Vector2(Main.rand.Next(-81, 0), Main.rand.Next(-20, 1)), -(initialVelocity * (i / (float)numProj)), type, MushroomShotDamage, 0f, Main.myPlayer); } for (int j = (int)NPC.position.X - 20; j < (int)NPC.position.X + NPC.width + 40; j += 20) @@ -949,7 +923,7 @@ namespace CalamityMod.NPCs.Crabulon if ((NPC.life + crabShroomSpawnFreq) < NPC.localAI[0]) { NPC.localAI[0] = NPC.life; - int crabShroomAmt = death ? 4 : expertMode ? 3 : 2; + int crabShroomAmt = expertMode ? 3 : 2; for (int mush = 0; mush < crabShroomAmt; mush++) { int x = (int)(NPC.position.X + Main.rand.Next(NPC.width - 32)); From f0d0bbec81584af83ba58b2c9712dcf571ddacae Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 5 Jul 2026 00:30:38 -0400 Subject: [PATCH 14/35] Rebranded Slick Cane as Walking Cane * Intended to be themed after Walking Cane from DST; now a Deerclops drop instead of being sold by the Bandit * Still has its current swiping motion on normal use, stealth strikes apply an "insanity" effect that summons shadow hands on cane hits, increases movement speed by 15% while held * No longer makes enemies drop money or makes stealth strikes scale in damage based on stored money I'm probably going to change the insanity draw effect later because it doesn't work perfectly on some NPCs due to hardcoded drawpoint bullshit (notably Eye of Cthulhu) --- CalPlayer/CalamityPlayerMiscEffects.cs | 7 +- Effects/BasicTint.fx | 4 +- Effects/BasicTint.xnb | Bin 1720 -> 1768 bytes Items/CalamityGlobalItemLoot.cs | 3 +- .../Rogue/{SlickCane.cs => WalkingCane.cs} | 11 +- .../Rogue/{SlickCane.png => WalkingCane.png} | Bin ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 22 +-- .../en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- NPCs/CalamityGlobalNPC.cs | 27 +++ NPCs/CalamityGlobalNPCLoot.cs | 3 +- NPCs/CalamityGlobalTownNPC.cs | 12 +- NPCs/TownNPCs/Bandit.cs | 1 - Projectiles/Rogue/SlickCaneProjectile.cs | 167 ------------------ Projectiles/Rogue/SlickCaneProjectileAlt.png | Bin 793 -> 0 bytes Projectiles/Rogue/WalkingCaneProjectile.cs | 99 +++++++++++ Projectiles/Rogue/WalkingCaneProjectile.png | Bin 0 -> 626 bytes .../Rogue/WalkingCaneProjectileAlt.png | Bin 0 -> 611 bytes Systems/Collections/CalamityItemSets.cs | 2 +- 18 files changed, 160 insertions(+), 200 deletions(-) rename Items/Weapons/Rogue/{SlickCane.cs => WalkingCane.cs} (80%) rename Items/Weapons/Rogue/{SlickCane.png => WalkingCane.png} (100%) delete mode 100644 Projectiles/Rogue/SlickCaneProjectile.cs delete mode 100644 Projectiles/Rogue/SlickCaneProjectileAlt.png create mode 100644 Projectiles/Rogue/WalkingCaneProjectile.cs create mode 100644 Projectiles/Rogue/WalkingCaneProjectile.png create mode 100644 Projectiles/Rogue/WalkingCaneProjectileAlt.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 02a207d308..9c9ddb8fa3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2828,6 +2828,10 @@ namespace CalamityMod.CalPlayer if (Player.ichor) Player.statDefense += 5; + // Holding Walking Cane increases movement speed + if (Player.HeldItem.type == ModContent.ItemType()) + Player.moveSpeed += WalkingCane.MoveSpeedBoost; + // Fairy Boots bonus if (fairyBoots) { @@ -3633,8 +3637,7 @@ namespace CalamityMod.CalPlayer --bloodflareCoreRemainingHealOverTime; } - - // Reduce how slow Chilled makes the player, because it's cancerous right now + // Reduce how slow Chilled makes the player // The moveSpeed multiplier for Chilled in vanilla is 0.75, so we just multiply by 1.166667 here to make it 0.875, effectively cutting the reduction in half if (Player.chilled) Player.moveSpeed *= 1f + (1f / 6f); diff --git a/Effects/BasicTint.fx b/Effects/BasicTint.fx index 8b3b2268c2..ca360c3e68 100644 --- a/Effects/BasicTint.fx +++ b/Effects/BasicTint.fx @@ -3,7 +3,7 @@ sampler uImage1 : register(s1); float3 uColor; float3 uSecondaryColor; float uOpacity; -float uSaturation; +float uSaturation; // Saturation gets used as a "true" opacity float uRotation; float uTime; float4 uSourceRect; @@ -20,7 +20,7 @@ float4 Recolor(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 float4 color = tex2D(uImage0, coords); float originalAlpha = color.a; color.rbg = lerp(color.rbg, uColor, uOpacity); - return color * originalAlpha; + return color * originalAlpha * uSaturation; } diff --git a/Effects/BasicTint.xnb b/Effects/BasicTint.xnb index 4b02bc2bdc04cb4f5c4e17f97471eb0b596ef0aa..3fe896465320df2b1628d9b2c0972ea31ecd744e 100644 GIT binary patch delta 218 zcmdnN`+}D}!q2IkmGQ+y_PLA>8<$RGWMW{LY{7JwnSp^}vjnpSQ~eS~Ad~6;|9}5o z7@R{Kon(OA+dvEwV*yeiJ`gBe0TMYt3^afNq@@IiTYz{95Q9u(1j@_-(jc$~h?#&Q zAay%{7^Ln5SPUeJ5G!@gpS+qilDjlGv81#pu_QA;Z!$C6QUzA9k^Bt|3{M(>_ALPF OVPfEb@c;j3U;qFIwJMhY delta 164 zcmaFCyMvcK!q2Ikm2t;J_PLA#8<$RGWYTAwY{7JwxlEsJvjnpSQ)&q#0|Nuo|NsB~ z+b}qXI6BDyxx0ZFB*qM+Kztxj*a9RXfS3u0L0S@kxB!S7fEc8X5h&9Eq(NW?5HkTq jK(YMVJ^k_!}4)o;3Xb&%gixjQ}5! diff --git a/Items/CalamityGlobalItemLoot.cs b/Items/CalamityGlobalItemLoot.cs index a3bf25dbd3..3d3ed8176e 100644 --- a/Items/CalamityGlobalItemLoot.cs +++ b/Items/CalamityGlobalItemLoot.cs @@ -76,7 +76,8 @@ namespace CalamityMod.Items ItemID.LucyTheAxe, ItemID.PewMaticHorn, ItemID.WeatherPain, - ItemID.HoundiusShootius + ItemID.HoundiusShootius, + ModContent.ItemType() }; loot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, deerclopsWeapons)); loot.AddRevBagAccessories(); diff --git a/Items/Weapons/Rogue/SlickCane.cs b/Items/Weapons/Rogue/WalkingCane.cs similarity index 80% rename from Items/Weapons/Rogue/SlickCane.cs rename to Items/Weapons/Rogue/WalkingCane.cs index 0331d03098..e7856d099c 100644 --- a/Items/Weapons/Rogue/SlickCane.cs +++ b/Items/Weapons/Rogue/WalkingCane.cs @@ -3,12 +3,17 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { - public class SlickCane : RogueWeapon + [LegacyName("SlickCane")] + public class WalkingCane : RogueWeapon { + public static float MoveSpeedBoost = 0.15f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); + public override void SetDefaults() { Item.width = 42; @@ -22,9 +27,9 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 6f; Item.UseSound = SoundID.DD2_GhastlyGlaivePierce; Item.autoReuse = true; - Item.value = Item.buyPrice(gold: 35); // Sold by Bandit + Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/SlickCane.png b/Items/Weapons/Rogue/WalkingCane.png similarity index 100% rename from Items/Weapons/Rogue/SlickCane.png rename to Items/Weapons/Rogue/WalkingCane.png diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 51e11a5e97..419a2e7967 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -1069,17 +1069,6 @@ SkyfinBombers: { ''' } -SlickCane: { - DisplayName: Slick Cane - Tooltip: - ''' - Swipes a cane that steals money from enemies - Stealth strikes give a 1 in 20 chance for enemies to drop 1-2 gold coins when hit - Stealth strikes boost damage in proportion to money in the inventory, up to 1 Platinum - 'Economy at its finest' - ''' -} - SludgeSplotch: { DisplayName: Sludge Splotch Tooltip: Stealth strikes cause the main ball of sludge to split on hit, inflicting more damage @@ -1359,6 +1348,17 @@ Vega: { ''' } +WalkingCane: { + DisplayName: Walking Cane + Tooltip: + ''' + Swipes a pointed walking cane + Stealth strikes drain the sanity of foes, causing shadow hands to be summoned when attacked + While held, increases movement speed by {0}% + 'Is it walking me, or am I walking it?' + ''' +} + WaveSkipper: { DisplayName: Wave Skipper Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 4ce439ea10..74d6beff22 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -400,7 +400,7 @@ TavernkeepChat.FullMoon: Care for a little Moonshine? TaxCollectorChat: { DoGDefeated: Devourer of what, you said? Devourer of Funds, if its payroll is anything to go by! PreBrimmy: So those punks on Azafure think they can live for free on my lands? Tell you what, do my job there and I might give you a bonus. - HasSlickCane: Goodness! That cane has swagger! + HasWalkingCane: Goodness! That cane has swagger! Has100Plat: BAH! Doesn't seem like I'll ever be able to quarrel with the debts of the town again! Has500Plat: Where and how are you getting all of this money?! Scram, you have no need for me! } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index bfd43316ca..b5827985bb 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -288,6 +288,7 @@ namespace CalamityMod.NPCs public bool crumble = false; public int antlionCloudDebuffTimer = 0; + public int caneInsanityTimer = 0; public bool scionsCurioEffected = false; public bool abaddonEffected = false; public bool apollyonEffected = false; @@ -569,6 +570,7 @@ namespace CalamityMod.NPCs myClone.crumble = crumble; myClone.antlionCloudDebuffTimer = antlionCloudDebuffTimer; + myClone.caneInsanityTimer = caneInsanityTimer; myClone.scionsCurioEffected = scionsCurioEffected; myClone.abaddonEffected = abaddonEffected; myClone.apollyonEffected = apollyonEffected; @@ -799,6 +801,8 @@ namespace CalamityMod.NPCs if (antlionCloudDebuffTimer > 0) antlionCloudDebuffTimer--; + if (caneInsanityTimer > 0) + caneInsanityTimer--; if (cursorFocus > 0 && cursorFocus < cursorFocusMax) cursorFocus--; relicOfResilienceWeakness = false; @@ -4865,6 +4869,29 @@ namespace CalamityMod.NPCs return DrawVanillaBestiaryWorms(spriteBatch, npc, drawColor); } } + + if (caneInsanityTimer > 0) + { + Texture2D tex = TextureAssets.Npc[npc.type].Value; + Rectangle frame = npc.frame; + float fadeInAmt = caneInsanityTimer > 570 ? Utils.GetLerpValue(600, 570, caneInsanityTimer) : caneInsanityTimer < 30 ? Utils.GetLerpValue(0, 30, caneInsanityTimer) : 1f; + Vector2 origin = new Vector2(tex.Width / 2, tex.Height / Main.npcFrameCount[npc.type] / 2); + SpriteEffects sp = npc.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Vector3 colorHSL = Main.rgbToHsl(Color.Violet); + + CalamityUtils.EnterShaderRegion(spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(fadeInAmt * 0.35f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1f - colorHSL.X, colorHSL.Y, colorHSL.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + for (int i = 0; i < 4; i++) + { + Vector2 offset = Vector2.UnitX.RotatedBy(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi * 2f + (MathHelper.TwoPi * i / 4f)) * 0f * fadeInAmt; + Main.EntitySpriteDraw(tex, npc.Center - screenPos - Vector2.UnitY * (npc.gfxOffY) + offset, frame, Color.Violet, npc.rotation, origin, npc.scale, sp); + } + CalamityUtils.ExitShaderRegion(spriteBatch); + } + if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f) && npc.active) { if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityNPCSets.ForceDrawDebuffDisplay[npc.type])) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index fc2a6c5711..aea2e19677 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1196,7 +1196,8 @@ namespace CalamityMod.NPCs ItemID.LucyTheAxe, ItemID.PewMaticHorn, ItemID.WeatherPain, - ItemID.HoundiusShootius + ItemID.HoundiusShootius, + ModContent.ItemType() }; LCR_NotExpert.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, deerWeapons)); } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index f02551ccd6..9911710c7f 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1234,8 +1234,8 @@ namespace CalamityMod.NPCs chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.DoGDefeated"); else if (Main.rand.NextBool(5) && !DownedBossSystem.downedBrimstoneElemental) chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.PreBrimmy"); - else if (Main.rand.NextBool(10) && CalamityUtils.InventoryHas(Main.LocalPlayer, ItemType())) - chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.HasSlickCane"); + else if (Main.rand.NextBool(10) && CalamityUtils.InventoryHas(Main.LocalPlayer, ItemType())) + chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.HasWalkingCane"); else if (Main.rand.NextBool(5) && platinumCoins >= 500) chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.Has500Plat"); else if (Main.rand.NextBool(5) && platinumCoins >= 100) @@ -1315,14 +1315,6 @@ 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 == ProjectileType()) - return true; - return base.CanBeHitByProjectile(npc, projectile); - } #endregion #region Shop Stuff diff --git a/NPCs/TownNPCs/Bandit.cs b/NPCs/TownNPCs/Bandit.cs index 0398c06522..001595d331 100644 --- a/NPCs/TownNPCs/Bandit.cs +++ b/NPCs/TownNPCs/Bandit.cs @@ -307,7 +307,6 @@ namespace CalamityMod.NPCs.TownNPCs NPCShop shop = new(Type); shop.Add() .Add() - .Add() .Add() .Add(ItemID.TigerClimbingGear) .Add(Condition.DownedPirates) diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs deleted file mode 100644 index a9584f036a..0000000000 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System; -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.Systems.Collections; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class SlickCaneProjectile : BaseSpearProjectile - { - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - public override string Texture => "CalamityMod/Items/Weapons/Rogue/SlickCane"; - - private bool initialized = false; - public override void SetDefaults() - { - Projectile.width = 40; - Projectile.height = 36; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.timeLeft = 120; - Projectile.friendly = true; - Projectile.hostile = false; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.ownerHitCheck = true; - Projectile.hide = true; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.alpha = 180; - Projectile.scale = 1.25f; - } - public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; - public override float TravelSpeed => 8f; - - public override bool PreAI() - { - // Initialization. Using the AI hook would override the base spear's code, and we don't want that. - if (!initialized) - { - Main.player[Projectile.owner].Calamity().ConsumeStealthByAttacking(); - initialized = true; - } - return true; - } - - public override bool PreDraw(ref Color lightColor) - { - Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request("CalamityMod/Projectiles/Rogue/SlickCaneProjectileAlt").Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); - Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null, - lightColor, Projectile.rotation, - origin, Projectile.scale, SpriteEffects.None, 0); - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float spearLengthMult = 2.5f; - float velocityMagnitude = 0f; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), - Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, - (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude)) - { - return true; - } - return false; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - Player player = Main.player[Projectile.owner]; - //Dont drop money from Dummies, WoF eyes and worm segments to make grinding money a bit harder and not give money from Dummies since that was apparently happening - if (Projectile.owner == Main.myPlayer && target.IsAnEnemy(false) && !target.dontCountMe && !CalamityNPCSets.ForceDrawDebuffDisplay[target.type]) - { - 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(20)) - { - moneyValueToDrop += Item.buyPrice(0, Main.rand.Next(1, 3), 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); - if (modifiedMoneyValue > 50 && Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - if (Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - moneyValueToDrop -= 10000 * modifiedMoneyValue; - Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.GoldCoin, modifiedMoneyValue); - } - while (moneyValueToDrop > 100f) - { - int modifiedMoneyValue = (int)(moneyValueToDrop / 100f); - if (modifiedMoneyValue > 50 && Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - if (Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - moneyValueToDrop -= 100 * modifiedMoneyValue; - Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.SilverCoin, modifiedMoneyValue); - } - while (moneyValueToDrop > 0f) - { - int modifiedMoneyValue = (int)moneyValueToDrop; - if (modifiedMoneyValue > 50 && Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - if (Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(4) + 1; - } - if (modifiedMoneyValue < 1) - { - modifiedMoneyValue = 1; - } - moneyValueToDrop -= modifiedMoneyValue; - Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.CopperCoin, modifiedMoneyValue); - } - } - } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - // Boost dmg in proportion to money, caps at 1 plat. - if (Projectile.Calamity().stealthStrike) - { - Player player = Main.player[Projectile.owner]; - double money = Utils.CoinsCount(out bool overflow, player.inventory); - double cap = 1000000; - if (money >= cap) - money = cap; - if (money != 0) - { - modifiers.SourceDamage *= (float)(money / 1000000 + 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; - } - } - } - } - } -} diff --git a/Projectiles/Rogue/SlickCaneProjectileAlt.png b/Projectiles/Rogue/SlickCaneProjectileAlt.png deleted file mode 100644 index 1453d665101816f7685ebe688fb328aa1ecf9a68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpjRP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T7Z~8pS=lwm;^S;|-GojJrL3Xw{ zk{pe!}VRr;A{jrIX#0E>~f>*&88!Vkn5QrP&RVK zD7~_?6*+Ke8c9aqe??YS?8AUBiEpTPpHZ4T+E|BtyAXj%u4eXLw|fye6-*(|_+3cS zHxWhdb(h2FYVtd3vQxAA7*$s}O{$EJ$(}rAHyRyJHXupPswaPC_3LA_=WIJJRzGK8 z^!D8gsL9jEud-K?H}kSr-$i9l)_c9k<|b+O#_2GUCs(z@4x{nR2I@aGtJSK9$%l`w zlhzfj-$5PtNIx=d#)5`KTOPrKcJ=wo@hj@ZlqY0m z&F0s~==qK|T&Pb?gsWZv1BLb!4U3*cik>vg&pXBwPVn3Lwdzq^sL!K$uw;~Qe)Y|v zw@1Ef@s8DbYcPK#x{O-=JNg*S=9YcY468 CalamityUtils.GetItemName(); + public static Asset AltTexture; + + private bool initialized = false; + + public override void SetStaticDefaults() + { + if (!Main.dedServ) + AltTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/WalkingCaneProjectileAlt"); + } + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 36; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.timeLeft = 120; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.ownerHitCheck = true; + Projectile.hide = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.alpha = 180; + Projectile.scale = 1.25f; + } + public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; + public override float TravelSpeed => 12f; + + public override bool PreAI() + { + // Initialization. Using the AI hook would override the base spear's code, and we don't want that. + if (!initialized) + { + Main.player[Projectile.owner].Calamity().ConsumeStealthByAttacking(); + initialized = true; + } + return true; + } + + public override bool PreDraw(ref Color lightColor) + { + Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; + Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? AltTexture.Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); + + Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null, lightColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float spearLengthMult = 2.5f; + float velocityMagnitude = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), + Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, + (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude)) + { + return true; + } + return false; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Projectile.Calamity().stealthStrike) + { + target.Calamity().caneInsanityTimer = 600; + } + else if (target.Calamity().caneInsanityTimer > 0) + { + Vector2 position = target.Center + Main.rand.NextVector2CircularEdge(100f, 100f); + Vector2 velocity = (target.Center - position).SafeNormalize(Vector2.Zero) * 6f; + float ai0 = Main.rand.NextBool() ? 300f : 0f; + float ai1 = Main.rand.NextBool() ? velocity.ToRotation() : 0f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, velocity, ProjectileID.InsanityShadowFriendly, Projectile.damage / 2, Projectile.knockBack, Projectile.owner, ai0, ai1); + } + } + } +} diff --git a/Projectiles/Rogue/WalkingCaneProjectile.png b/Projectiles/Rogue/WalkingCaneProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..f3c41400f5a4c78ca7188a7733b21e18724e4b26 GIT binary patch literal 626 zcmV-&0*(ENP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0tZP%K~!i%?U_GF z96=O^zq3>-0q8v0 z1)!(b{l%jnF4Z)yWX>Cl8=0HzXbHsMz8?bM-2yzc52# zRCd;H)G=s9Z7)|Vwkity``%c!*cHuxa%UG|Z@M?d zb|S()3Eo&GtSLS7!meoCcw=G2wNKp^Z_ILEO$l#I+;>yL8%v5QQNPBLW=hnbv80+3 z^Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0r*KoK~!i%?U_#~ zL_rw9e=8^DKu%UkLM|xbWFzI^rYHv&|IQr!DF?)rl#`S=>_L=+gVNSsMbJW z5Z85>KK4z!Ec@QR*W3A>c4p_zVSe*{^SyZivZSuEGMU=GO(X*8`UUylEsFFGzwqm- zijnAim8Czl@C?AriPGYCO^bUZN*arYT%_ZLt z0TYLDFvgtcYjt%~I^jJPQys-tV+U`wmT{651-A_P-3wOZ)0Z#o9w$ z#Z*l&2tZ@KGB@3M4=I(2F=jIXiLK48DFB*6>YO@QKY}zBg`ijWdM&xJ{SGdkZ-rw_ zxQo32u(GxbKdiX^J~mWc1}Rx{`Aqd6pPr_D-YNWV%&zw;nNQD_`L6m4$Cx0MMy|0T z^Y?X!Adlw!YfOG*GWT0n%ocrq*%4B~kyLN<5;TUro zeMd;l*=^1ka|)-^5hN20kV_riy xr+)=9#=MH$q0F|bwtNdW#=MGtha&ja*e9NO{ZTJjK8FAR002ovPDHLkV1n0~5vl+H literal 0 HcmV?d00001 diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index 6098ba21ff..480042173a 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Systems.Collections ///
public static bool[] DisablesVeneratedLocketEffect = Factory.CreateNamedSet("DisablesVeneratedLocketEffect") .Description("Prevents this item from triggering Venerated Locket's clone projectiles.") - .RegisterBoolSet(ItemType(), ItemType(), ItemType()); + .RegisterBoolSet(ItemType(), ItemType(), ItemType()); /// /// If for an item type, this item is considered to be a magic gun.
From 7c240484652967ac9cbfc4dce48b9092db1226b3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 5 Jul 2026 11:15:06 -0400 Subject: [PATCH 15/35] Walking Cane resprite + movement speed buff + collision fix --- Items/Weapons/Rogue/WalkingCane.cs | 6 +++--- Items/Weapons/Rogue/WalkingCane.png | Bin 789 -> 689 bytes NPCs/CalamityGlobalNPC.cs | 2 +- Projectiles/Rogue/WalkingCaneProjectile.cs | 14 +++++--------- Projectiles/Rogue/WalkingCaneProjectile.png | Bin 626 -> 732 bytes Projectiles/Rogue/WalkingCaneProjectileAlt.png | Bin 611 -> 724 bytes 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Items/Weapons/Rogue/WalkingCane.cs b/Items/Weapons/Rogue/WalkingCane.cs index e7856d099c..b4fd9f36ed 100644 --- a/Items/Weapons/Rogue/WalkingCane.cs +++ b/Items/Weapons/Rogue/WalkingCane.cs @@ -11,13 +11,13 @@ namespace CalamityMod.Items.Weapons.Rogue [LegacyName("SlickCane")] public class WalkingCane : RogueWeapon { - public static float MoveSpeedBoost = 0.15f; + public static float MoveSpeedBoost = 0.2f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); public override void SetDefaults() { - Item.width = 42; - Item.height = 36; + Item.width = 48; + Item.height = 44; Item.damage = 50; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/WalkingCane.png b/Items/Weapons/Rogue/WalkingCane.png index 1aadfccbb4c2e2fe7a02a425e6fe6f424b4f8236..9bf218ea8f4e0b200ad17ed71e3afb7398e915b7 100644 GIT binary patch literal 689 zcmV;i0#5yjP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0!B$hK~!i%?U+qS zR8bg)ACsVELP24W_%jhgkzfUa;6fC^Xj4SeA_zn%a?v89AER(57=_X%r81(3B0+=} zkswsUh=Gg7kbcoH7bTeSKXPV0-n} z!1%=YR9RqPm8`P^Nh8)YTsk_NvjCU-4hP0B^*w+XO?U%g$VAuCJpiOqb>NtIm!1Y- z%cc!WKLV!azDJsyHxP!cMmuXZ12F#Z2>>ULR{?P9!XN-MlfwXB}F=Nj94UI$cGXaV^6OE&~@N6EMr2+cOE(jz~r+x0L;%X z@?A|Qo=wiJAiwr1PTjy_#ya%Vc==t>< zs{v?l-336yzHQ)iulY=P0~YoF>ho>S6V}_PXOaoM3*!Er=Ku^0KJo?v*prvmsy%V# zOWqRIMClr^CoSDRD4DPwG%EU^bLTt2sY<15K#7dr{@v3E)#?7L6A(l47HdN9Sm_y1 zwfV648JsE+*P0JQCPe8NuysED>LWPGi$WW)6u*J6{&;_Y3cO~D2Qkeo=B z00MK30L-tipC0T2pq)3yd55B!c#Ti9ixcm~u3AIXv%z@VSdHN>+uU9qE{=P2HxFe%ufa3zz z5Z!T(3dxX9hsgh01sq?z^GfggG_6S{Ga10C?qh8_H`9{~0Gz*Y!iX>X0{eV`MMQU; zqo>;20r*iUlmPk$&mCJVli->MJ zMS_UK33n2w+f&s*Z?>kEYUFlI3(Tr_lOF~)|O@f zvblT-oE*FTPFMGQMw1NrsuehHAd=o4Uq5a;d_aNIk=%2v$bO?u zkW5ab0EmP`YV-blp#YSB269V$(@j!j4bieb>h9rk$I_dn7q_-FD}d#%n#5KKy5kRB zA28M>zD!Z}5|ulRMZ*9rWOBwGk3Z4#WR0&%0Zh*=0$V5P{vOKw4D}&*BR(06h84g SpearType.GhastlyGlaiveSpear; - public override float TravelSpeed => 12f; + public override float TravelSpeed => 12.5f; public override bool PreAI() { @@ -70,15 +70,11 @@ namespace CalamityMod.Projectiles.Rogue public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - float spearLengthMult = 2.5f; + float spearLengthMult = 2.75f; float velocityMagnitude = 0f; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), - Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, - (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude)) - { - return true; - } - return false; + // For whatever fucking reason CheckAABBvLineCollision fails when you're completely inside a hitbox, so check for that too + return targetHitbox.Contains(Main.LocalPlayer.Center.ToPoint()) || Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), + Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { diff --git a/Projectiles/Rogue/WalkingCaneProjectile.png b/Projectiles/Rogue/WalkingCaneProjectile.png index f3c41400f5a4c78ca7188a7733b21e18724e4b26..2fbafd4ca8353211d1052f1a7e29c0804e3ae9fd 100644 GIT binary patch delta 693 zcmV;m0!sbz1l$E7iBL{Q4GJ0x0000DNk~Le0000w0000s2nGNE0G4@*Q;{Jxe{o4f zK~!i%?b=^xjd2{u@%Jp{lA>se#*VZitD#oPg{;-&hGe-=YORP17m_~{xlA*&TuXHD(GnHEJZap6ijF7(Ooe4XQY&e`)kXXiY>_tkoK)_R^-zu)tFe&=bR z%C)w(ZX#q#}eRcwXmCKj>{Ucy}`bVg9@S;g)XWxzMRsb;a=qUh453dE_*x3O9CdUQ= zIC<_Rgpl>3)k?BIzs-RoxxIZu!ROjL`=AV2FIufKO^taR$*Jsj0B$`Qe*)mz#S`EN z58iwOz{K=d0CJyy6+I^}TCF5{@5XKbUQNCON4BqbE0iIryl7HMPz^u33P8`E5(YVv|r=BzInl@HCEMw zyDtE^GVs`o#+uzp&{(oN2&E)#VP(B&RN0*a?e^(P2d!wrrvG#LOcyw_uosOgUE$kz z{;XM*?sJzfjY0&HHY=++z>Cf|&8{EkzJN0;Ml~jblC1Kgm1gggf7#ccz>!pOi`u+s zxdllkEok$iVO!{u%8Le7E0W5Kma5hyl^3y&}e+NlK zK~!i%?U_GF96=O^zq3>%`3+5zZ1*#)4d*Zsw#A1>82u4K*|iyN7n>}UzZ-@YFL;NO?MKz#b0Gq}CKf9*YZ zV{s#6>rbUP06w30L0K-UdfHs`#-he{6sn41toazqjD5Rwf5s*!T+Ugn zId3d#WK5mK%GXW+4u3gQC&eNF53?@k9zSxqCB~=v0^`NGk5E=6y|JjU`_;?orog=I zD8h14RdMXqC;&eTZl8Pcd=G+ATm0hAhfe+lhE%H${fjF=$0?FIOwJDhm7i-dMHR z70rKgXBS~_x;MpkBEmii-dH89DLwPTu4vqNV`0R#Pu&)8%yM5%32#i?cT>U}ONuE` zzs8bgO4OgRq?!`-V=U>WM0$7)C<3D6$Oc&_OW} zA?OfB)Fl$c=nw=#B^U(~ttkaXK|vjZi0NQYy!)^(mCo#pzR&Nr?+iQee&+o@6~vsj z_U6d_{cipv05dbQ6>fRCvq~4Nf7HZQ%OZKP_drqkh2A>=jE_Bz?OBV7iRv`huPJJK zpT2wtU~|3+9LYjq7J$)P&mjYn5)+k(v*bpUjo*anW^sq+H>e;nW22|z=B zEjY4;4?n&CokmPl;*%X7c?OQ;j>atj96tE~Of(;c^r{Rb$RZ>S}^$vuz{j_!-!WETXw*T@t{D-73dWI#>k=?;^?L>qls>jc`By~jg z?722@#%am1qYHE7xSuNtM^tKBl2naKbeol4ePhjfNU%2!M^qOie;xe>iEMuR21sz6 zHPLcKx7nm*O|;xeTGm9Z{Wns(xrHPNg@%j)&)zsj0u*0NMt6U}P=Ci`Z35=xv1 zm}u6c_n=0uTnFc*K%d^3=yHiZ^YMMzW}?e2`s*2e9vh74ic7A#G7?=k!HE6>!uB*N Ud&CEe00000NkvXX1g=70g0p)&RsaA1 delta 572 zcmV-C0>k~(1>*!EiBL{Q4GJ0x0000DNk~Le0000s0000m2nGNE09qW0z>y&|e*ySO zL_t(&L+zPQC`3URz<(nWNkT3t;bbG_;HD@C7yr&2{V4~;m6Vf|IP5``gM-r6 zUPabL2$9{BauC;bm_GJRyDaG}ov z-z|#t4!`j0s)~{5e3hj?wD1hTf6U}C0JY5(0E~~Wf-&YC8CO*|b$y{isi8$ZBJKN{ zZUADJPXHW6qF{_UN5)m{ZEH&cY>!!oly|iQurv~}^oJi`!2_m*!Z9YXCD~45r@!L zExED%4lbT=g=0*(i@gA_vbGC9thoL@HdI{(DOq#*O!Xh1o~C`?Dg1BDuJ`u#uCXEW_jQLLe~;$;YfOG*GWT0n%ocrq*%4B~kyLN<5;TUroeMd;l*=^1ka|)-^5hN20kV_riyr+)=9#=MH$q0F|bwtNdW#=MGtha&ja*e9NO68%vxSw4pV0000< KMNUMnLSTZyhzV8z From 3da2775290449558f1d101ff4bb9421afe77206e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 6 Jul 2026 13:19:14 -0400 Subject: [PATCH 16/35] Elemental minions draw as translucent, solid colors if visibility is disabled --- Buffs/Summon/HotE.cs | 2 +- CalPlayer/CalamityPlayer.cs | 24 +++++++-------- Items/Accessories/ElementalinaBottle.cs | 4 +-- Items/Accessories/EyeoftheStorm.cs | 4 +-- Items/Accessories/HeartoftheElements.cs | 4 +-- Items/Accessories/OasisElementalinaBottle.cs | 4 +-- Items/Accessories/PearlofEnthrallment.cs | 4 +-- Items/Accessories/RoseStone.cs | 4 +-- .../Summon/BrimstoneElementalMinion.cs | 29 ++++++++++++++++++- Projectiles/Summon/CloudElementalMinion.cs | 28 +++++++++++++++++- Projectiles/Summon/SandElementalHealer.cs | 29 ++++++++++++++++++- Projectiles/Summon/SandElementalMinion.cs | 29 ++++++++++++++++++- Projectiles/Summon/WaterElementalMinion.cs | 29 ++++++++++++++++++- 13 files changed, 164 insertions(+), 30 deletions(-) diff --git a/Buffs/Summon/HotE.cs b/Buffs/Summon/HotE.cs index 3e8eae1f10..18f70d5b7a 100644 --- a/Buffs/Summon/HotE.cs +++ b/Buffs/Summon/HotE.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Summon { CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.allElementals) + if (!modPlayer.allElementals.HasValue) { player.DelBuff(buffIndex); buffIndex--; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 60ca798fce..6cb5812dfa 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1075,15 +1075,15 @@ namespace CalamityMod.CalPlayer public bool jellyChargedBattery = false; /// General cooldown for accessories which spawn projectiles on minion hits. public float summonProjCooldown; - public bool sandElemental = false; + public bool? sandElemental = null; public bool sandElementalVanity = false; - public bool oasisElemental = false; + public bool? oasisElemental = null; public bool oasisElementalVanity = false; - public bool cloudElemental = false; + public bool? cloudElemental = null; public bool cloudElementalVanity = false; - public bool brimElemental = false; + public bool? brimElemental = null; public bool brimElementalVanity = false; - public bool waterElemental = false; + public bool? waterElemental = null; public bool waterElementalVanity = false; public bool fungalClump = false; public bool fungalClumpVanity = false; @@ -1545,7 +1545,7 @@ namespace CalamityMod.CalPlayer /// Enchanted Conch. public bool hCrab = false; /// Heart of the Elements. - public bool allElementals = false; + public bool? allElementals = null; /// Heart of the Elements; however, the minions will not attack. public bool allElementalsVanity = false; /// Silva armor's Silva Crystal. @@ -2803,17 +2803,17 @@ namespace CalamityMod.CalPlayer cSpirit = false; dCrystal = false; MutatedTruffleBool = false; - sandElemental = false; + sandElemental = null; sandElementalVanity = false; - oasisElemental = false; + oasisElemental = null; oasisElementalVanity = false; - cloudElemental = false; + cloudElemental = null; cloudElementalVanity = false; - brimElemental = false; + brimElemental = null; brimElementalVanity = false; - waterElemental = false; + waterElemental = null; waterElementalVanity = false; - allElementals = false; + allElementals = null; allElementalsVanity = false; fungalClump = false; fungalClumpVanity = false; diff --git a/Items/Accessories/ElementalinaBottle.cs b/Items/Accessories/ElementalinaBottle.cs index 6d3e214701..cd7d33b0d4 100644 --- a/Items/Accessories/ElementalinaBottle.cs +++ b/Items/Accessories/ElementalinaBottle.cs @@ -23,12 +23,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue; public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.sandElemental = true; + modPlayer.sandElemental = !hideVisual; SpawnElemental(player); } diff --git a/Items/Accessories/EyeoftheStorm.cs b/Items/Accessories/EyeoftheStorm.cs index 1b011f82d9..83227565ad 100644 --- a/Items/Accessories/EyeoftheStorm.cs +++ b/Items/Accessories/EyeoftheStorm.cs @@ -26,12 +26,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue; public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.cloudElemental = true; + modPlayer.cloudElemental = !hideVisual; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(ModContent.BuffType()) == -1) diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 718c929754..45437ee6e9 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); - if (modPlayer.brimElemental || modPlayer.sandElemental || modPlayer.oasisElemental || modPlayer.cloudElemental || modPlayer.waterElemental) + if (modPlayer.brimElemental.HasValue || modPlayer.sandElemental.HasValue || modPlayer.oasisElemental.HasValue || modPlayer.cloudElemental.HasValue || modPlayer.waterElemental.HasValue) { return false; } @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Accessories Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, Main.DiscoR / 255f, Main.DiscoG / 255f, Main.DiscoB / 255f); CalamityPlayer modPlayer = player.Calamity(); - modPlayer.allElementals = true; + modPlayer.allElementals = !hideVisual; int brimmy = ProjectileType(); int siren = ProjectileType(); diff --git a/Items/Accessories/OasisElementalinaBottle.cs b/Items/Accessories/OasisElementalinaBottle.cs index ac3b466f00..fbdc11ce02 100644 --- a/Items/Accessories/OasisElementalinaBottle.cs +++ b/Items/Accessories/OasisElementalinaBottle.cs @@ -26,12 +26,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue; public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.oasisElemental = true; + modPlayer.oasisElemental = !hideVisual; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(ModContent.BuffType()) == -1) diff --git a/Items/Accessories/PearlofEnthrallment.cs b/Items/Accessories/PearlofEnthrallment.cs index e739630aae..03aa737e0a 100644 --- a/Items/Accessories/PearlofEnthrallment.cs +++ b/Items/Accessories/PearlofEnthrallment.cs @@ -29,12 +29,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue; public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.waterElemental = true; + modPlayer.waterElemental = !hideVisual; if (player.whoAmI == Main.myPlayer) { var source = player.GetSource_Accessory(Item); diff --git a/Items/Accessories/RoseStone.cs b/Items/Accessories/RoseStone.cs index e27ceb86df..3d63327597 100644 --- a/Items/Accessories/RoseStone.cs +++ b/Items/Accessories/RoseStone.cs @@ -26,12 +26,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue; public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.brimElemental = true; + modPlayer.brimElemental = !hideVisual; if (player.whoAmI == Main.myPlayer) { var source = player.GetSource_Accessory(Item); diff --git a/Projectiles/Summon/BrimstoneElementalMinion.cs b/Projectiles/Summon/BrimstoneElementalMinion.cs index 81f4e960a3..b906f1c827 100644 --- a/Projectiles/Summon/BrimstoneElementalMinion.cs +++ b/Projectiles/Summon/BrimstoneElementalMinion.cs @@ -2,7 +2,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -43,7 +46,7 @@ namespace CalamityMod.Projectiles.Summon bool isActive = Projectile.type == ModContent.ProjectileType(); Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.brimElemental && !modPlayer.allElementals && !modPlayer.brimElementalVanity && !modPlayer.allElementalsVanity) + if (modPlayer.brimElemental is null && modPlayer.allElementals is null && !modPlayer.brimElementalVanity && !modPlayer.allElementalsVanity) { Projectile.active = false; return; @@ -219,5 +222,29 @@ namespace CalamityMod.Projectiles.Summon return null; } } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + SpriteEffects sp = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + var cplayer = Main.player[Projectile.owner].Calamity(); + + if ((cplayer.brimElemental.HasValue && !cplayer.brimElemental.Value) || (cplayer.allElementals.HasValue && !cplayer.allElementals.Value)) + { + Vector3 hsl = Main.rgbToHsl(Color.Red); + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(0.25f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1 - hsl.X, hsl.Y, hsl.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + } + else + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + + return false; + } } } diff --git a/Projectiles/Summon/CloudElementalMinion.cs b/Projectiles/Summon/CloudElementalMinion.cs index 4346b826ea..0b2b9ef16c 100644 --- a/Projectiles/Summon/CloudElementalMinion.cs +++ b/Projectiles/Summon/CloudElementalMinion.cs @@ -2,7 +2,10 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -42,7 +45,7 @@ namespace CalamityMod.Projectiles.Summon { Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.cloudElemental && !modPlayer.allElementals && !modPlayer.cloudElementalVanity && !modPlayer.allElementalsVanity) + if (!modPlayer.cloudElemental.HasValue && modPlayer.allElementals is null && !modPlayer.cloudElementalVanity && !modPlayer.allElementalsVanity) { Projectile.active = false; return; @@ -166,5 +169,28 @@ namespace CalamityMod.Projectiles.Summon return null; } } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + SpriteEffects sp = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + var cplayer = Main.player[Projectile.owner].Calamity(); + + if ((cplayer.cloudElemental.HasValue && !cplayer.cloudElemental.Value) || (cplayer.allElementals.HasValue && !cplayer.allElementals.Value)) + { + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(0.25f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Color.White); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + } + else + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + + return false; + } } } diff --git a/Projectiles/Summon/SandElementalHealer.cs b/Projectiles/Summon/SandElementalHealer.cs index aa69a548bf..df2e86ec86 100644 --- a/Projectiles/Summon/SandElementalHealer.cs +++ b/Projectiles/Summon/SandElementalHealer.cs @@ -2,8 +2,11 @@ using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Healing; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -44,7 +47,7 @@ namespace CalamityMod.Projectiles.Summon Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.oasisElemental && !modPlayer.allElementals && !modPlayer.oasisElementalVanity && !modPlayer.allElementalsVanity) + if (!modPlayer.oasisElemental.HasValue && modPlayer.allElementals is null && !modPlayer.oasisElementalVanity && !modPlayer.allElementalsVanity) { Projectile.active = false; return; @@ -198,5 +201,29 @@ namespace CalamityMod.Projectiles.Summon return null; } } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + SpriteEffects sp = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + var cplayer = Main.player[Projectile.owner].Calamity(); + + if ((cplayer.oasisElemental.HasValue && !cplayer.oasisElemental.Value) || (cplayer.allElementals.HasValue && !cplayer.allElementals.Value)) + { + Vector3 hsl = Main.rgbToHsl(Color.LawnGreen); + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(0.25f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1 - hsl.X, hsl.Y, hsl.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + } + else + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + + return false; + } } } diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index 397f3481cd..267d778619 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -1,7 +1,10 @@ using System; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -41,7 +44,7 @@ namespace CalamityMod.Projectiles.Summon { Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.sandElemental && !modPlayer.allElementals && !modPlayer.sandElementalVanity && !modPlayer.allElementalsVanity) + if (!modPlayer.sandElemental.HasValue && modPlayer.allElementals is null && !modPlayer.sandElementalVanity && !modPlayer.allElementalsVanity) { Projectile.active = false; return; @@ -250,5 +253,29 @@ namespace CalamityMod.Projectiles.Summon } } public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + SpriteEffects sp = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + var cplayer = Main.player[Projectile.owner].Calamity(); + + if ((cplayer.sandElemental.HasValue && !cplayer.sandElemental.Value) || (cplayer.allElementals.HasValue && !cplayer.allElementals.Value)) + { + Vector3 hsl = Main.rgbToHsl(Color.SandyBrown); + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(0.25f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1 - hsl.X, hsl.Y, hsl.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + } + else + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + + return false; + } } } diff --git a/Projectiles/Summon/WaterElementalMinion.cs b/Projectiles/Summon/WaterElementalMinion.cs index e04dd72736..918346f7c3 100644 --- a/Projectiles/Summon/WaterElementalMinion.cs +++ b/Projectiles/Summon/WaterElementalMinion.cs @@ -1,7 +1,10 @@ using System; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -40,7 +43,7 @@ namespace CalamityMod.Projectiles.Summon bool isMinion = Projectile.type == ModContent.ProjectileType(); Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.waterElemental && !modPlayer.allElementals && !modPlayer.waterElementalVanity && !modPlayer.allElementalsVanity) + if (!modPlayer.waterElemental.HasValue && modPlayer.allElementals is null && !modPlayer.waterElementalVanity && !modPlayer.allElementalsVanity) { Projectile.active = false; return; @@ -185,5 +188,29 @@ namespace CalamityMod.Projectiles.Summon } public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + SpriteEffects sp = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + var cplayer = Main.player[Projectile.owner].Calamity(); + + if ((cplayer.waterElemental.HasValue && !cplayer.waterElemental.Value) || (cplayer.allElementals.HasValue && !cplayer.allElementals.Value)) + { + Vector3 hsl = Main.rgbToHsl(Color.CornflowerBlue); + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(0.25f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1 - hsl.X, hsl.Y, hsl.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + } + else + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, sp); + + return false; + } } } From e3c4fd98ce1e3302b39769e6c2ea7b4842aa2e09 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 Jul 2026 15:09:12 -0400 Subject: [PATCH 17/35] Removed a ton of deadcode --- CalPlayer/CalamityPlayer.cs | 2 +- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- CalPlayer/CalamityPlayerOnHit.cs | 4 +- ILEditing/MechanicILChanges.cs | 8 -- Items/CalamityGlobalItemTooltip.cs | 8 -- Items/Fishing/StuffedFish.cs | 25 ---- Items/Tools/SpawnBlocker/AntiCystOintment.cs | 39 ------ Items/Tools/SpawnBlocker/AntiTumorOintment.cs | 39 ------ Items/Tools/SpawnBlocker/BleachBall.cs | 39 ------ Items/Tools/SpawnBlocker/BrokenWaterFilter.cs | 39 ------ .../Tools/SpawnBlocker/SirenproofEarMuffs.cs | 39 ------ .../SpawnBlocker/VoodooDemonVoodooDoll.cs | 39 ------ Items/Weapons/Magic/UndinesRetribution.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 13 -- NPCs/ExoMechs/Ares/AresBody.cs | 8 -- NPCs/NormalNPCs/WulfrumRover.cs | 15 --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 77 ----------- Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs | 16 --- Projectiles/Boss/CalamitousFireball.cs | 10 +- Projectiles/Boss/CataclysmicFlame.cs | 56 +------- .../DraedonsArsenal/AerialTrackerLaser.cs | 13 -- Projectiles/Enemy/JellyghoulBolt.cs | 11 -- Projectiles/Magic/ClimaxBeam.cs | 9 -- Projectiles/Magic/LightningArc.cs | 28 ---- Projectiles/Magic/LuxorsGiftMagic.cs | 9 +- Projectiles/Melee/CosmicIceBurst.cs | 5 - Projectiles/Melee/CrystylCrusherRay.cs | 8 +- .../Melee/ExaltedOathbladeThrownBlade.cs | 20 --- Projectiles/Melee/ExobladeProj.cs | 17 --- Projectiles/Melee/RoxcaliburProj.cs | 24 ++-- .../Melee/Yoyos/BurningRevelationYoyo.cs | 12 -- Projectiles/Pets/ChibiiDoggo.cs | 10 -- Projectiles/Pets/DannyDevitoPet.cs | 47 ------- Projectiles/Rogue/WrathwingCinder.cs | 9 -- Projectiles/Summon/HydrothermicVent.cs | 9 -- Projectiles/Typeless/AscendantAura.cs | 19 --- .../Mechanic/TilePingerSystem.PingEffects.cs | 27 ---- Tiles/Crags/ScorchedRemainsGrass.cs | 123 +----------------- Tiles/FurnitureAshen/AshenAccentSlab.cs | 117 ----------------- Tiles/FurnitureAshen/AshenSlab.cs | 117 ----------------- .../OtherworldlyStone.cs | 123 +----------------- Tiles/UelibloomBrick.cs | 123 +----------------- Tiles/VernalSoil.cs | 123 +----------------- Walls/UnsafeWalls/UnsafeAstralGrassWall.cs | 5 - World/SunkenSea.cs | 61 --------- 45 files changed, 38 insertions(+), 1511 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index d3fe2b6ce4..a1a8fa4a7d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5318,7 +5318,7 @@ namespace CalamityMod.CalPlayer EnhancedDarknessSystem.lights.Add(new(lastDeerclopsPosition.Value, scale: DeerclopsAI.borderScale, texture: DeerclopsAI.ArenaTex.Value)); //we draw light around the player when far away so they have some visibility, although very small. This is especially nice in multiplayer. we scale opacity with distance bc it looks better - EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / (409600 /*640^2*/), 0, 1))); + EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / 409600, 0, 1))); if (darknessIntensity == 0) { diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 5579e5a77b..3f03418614 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -556,7 +556,7 @@ namespace CalamityMod.CalPlayer } } - public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers)/* tModPorter If you don't need the Projectile, consider using ModifyHitNPC instead */ + public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers) { if (proj.npcProj || proj.trap) return; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f80ed26df4..2839ac6342 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -62,7 +62,7 @@ namespace CalamityMod.CalPlayer #endregion #region On Hit NPC - public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Item, consider using OnHitNPC instead */ + public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone) { if (Player.whoAmI != Main.myPlayer) return; @@ -207,7 +207,7 @@ namespace CalamityMod.CalPlayer #endregion #region On Hit NPC With Proj - public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Projectile, consider using OnHitNPC instead */ + public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone) { if (Player.whoAmI != Main.myPlayer) return; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index bab9586447..e1954175c9 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -237,14 +237,6 @@ namespace CalamityMod.ILEditing dir = self.direction; dashing = true; - // CIT 16OCT2024: Commented this code out, as there's no reason for custom dash hotkey to use Player.dashTime - // and was causing the return of Celestial Starboard's dash bug from early 1.4 versions - /*if ((self.dashTime <= 0 && self.direction == -1) || (self.dashTime >= 0 && self.direction == 1)) - { - self.dashTime = 15; - return; - }*/ - dashing = true; self.dashTime = 0; self.timeSinceLastDashStarted = 0; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index ed39fe7901..1ff8523654 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -1669,14 +1669,6 @@ namespace CalamityMod.Items return false; } - - // Rainbow effect originally made for Orderbringer because it used to have a special rarity - // But why did it have one in the first place?? - // Might be used for Miracle stuff later or something idk - /*if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType()) - { - - }*/ return true; } #endregion diff --git a/Items/Fishing/StuffedFish.cs b/Items/Fishing/StuffedFish.cs index 658d83fb17..4ee77f6e42 100644 --- a/Items/Fishing/StuffedFish.cs +++ b/Items/Fishing/StuffedFish.cs @@ -112,31 +112,6 @@ namespace CalamityMod.Items.Fishing } else CalamityMod.Log.Warn("Could not find either Marine Kelp or Marine Kelp Seeds from Thorium. These items will not be added to Stuffed Fish."); - - // Ozzatron 30DEC2022: It is unlikely SoA will ever be ported to 1.4 and beyond. Commenting this out indefinitely. - /* - Mod soa = CalamityMod.Instance.soa; - if (soa is not null) - { - try - { - itemLoot.Add(soa.Find("Welkinbell").Type, 4, herbMin, herbMax); - itemLoot.Add(soa.Find("WelkinbellSeeds").Type, 10, seedMin, seedMax); - - itemLoot.AddIf(() => Main.hardMode, soa.Find("Illumifern").Type, 4, herbMin, herbMax); - itemLoot.AddIf(() => Main.hardMode, soa.Find("IllumifernSeeds").Type, 10, seedMin, seedMax); - - // TODO -- There is no way to determine if SoA's Abaddon is dead without reflection. - // Dan Yami has confirmed that downed calls will be added to SoA eventually. - //itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find("Enduflora").Type, 4, herbMin, herbMax); - //itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find("EndufloraSeeds").Type, 10, seedMin, seedMax); - } - catch - { - CalamityMod.Log.Debug("One of the items in this file got renamed internally. Please report this in the #bugs-read-pins channel of the official Calamity discord server."); - } - } - */ } public override void ModifyTooltips(List list) diff --git a/Items/Tools/SpawnBlocker/AntiCystOintment.cs b/Items/Tools/SpawnBlocker/AntiCystOintment.cs index 08abe17ffe..113db25d9e 100644 --- a/Items/Tools/SpawnBlocker/AntiCystOintment.cs +++ b/Items/Tools/SpawnBlocker/AntiCystOintment.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disablePerfCystSpawns |= Enabled; } - /* - 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; diff --git a/Items/Tools/SpawnBlocker/AntiTumorOintment.cs b/Items/Tools/SpawnBlocker/AntiTumorOintment.cs index 564dc8d4c3..97b59f6657 100644 --- a/Items/Tools/SpawnBlocker/AntiTumorOintment.cs +++ b/Items/Tools/SpawnBlocker/AntiTumorOintment.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableHiveCystSpawns |= Enabled; } - /* - 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; diff --git a/Items/Tools/SpawnBlocker/BleachBall.cs b/Items/Tools/SpawnBlocker/BleachBall.cs index c2c6df1948..1cf4051fc4 100644 --- a/Items/Tools/SpawnBlocker/BleachBall.cs +++ b/Items/Tools/SpawnBlocker/BleachBall.cs @@ -61,45 +61,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableNaturalScourgeSpawns |= Enabled; } - /* - 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/BleachBall").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - 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; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs b/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs index 9740d03c89..5efb08dac3 100644 --- a/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs +++ b/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().noStupidNaturalARSpawns |= Enabled; } - /* - 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; diff --git a/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs b/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs index 29c1e1e10d..f467ff0e9c 100644 --- a/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs +++ b/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableAnahitaSpawns |= Enabled; } - /* - 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; diff --git a/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs b/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs index dd57546bb3..910e38e235 100644 --- a/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs +++ b/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs @@ -62,45 +62,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableVoodooSpawns |= Enabled; } - /* - 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/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) - { - //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 - { - 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; diff --git a/Items/Weapons/Magic/UndinesRetribution.cs b/Items/Weapons/Magic/UndinesRetribution.cs index 2213a85c36..24d5d80277 100644 --- a/Items/Weapons/Magic/UndinesRetribution.cs +++ b/Items/Weapons/Magic/UndinesRetribution.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Magic } for (int i = 0; i < 3; i++) { - realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); //- realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 realPlayerPos.Y += (float)(100 * i); //-= mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; //+ - diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index fed2affc2e..ce811e5e71 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -640,12 +640,6 @@ namespace CalamityMod.NPCs.DevourerofGods string key = "Mods.CalamityMod.Status.Boss.DoGPhase2"; Color messageColor = Color.Cyan; CalamityUtils.BroadcastLocalizedText(key, messageColor); - /* - var ctid = CombatText.NewText(NPC.Hitbox, messageColor, Language.GetTextValue(key), true); - if (ctid < Main.maxCombatText) - player.Calamity().subtitletext = Main.combatText[ctid]; - player.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia }; - */ DialogueDisplaySystem.StartDialogue("Mods.CalamityMod.DevourerOfGods.Phases", NPC, 2, 120, false, new BossText()); } } @@ -1477,13 +1471,6 @@ namespace CalamityMod.NPCs.DevourerofGods string key = "Mods.CalamityMod.Status.Boss.DoGSubphase1"; Color messageColor = Color.Cyan; CalamityUtils.BroadcastLocalizedText(key, messageColor); - - /* - int ctid = CombatText.NewText(NPC.Hitbox, messageColor, Language.GetTextValue(key), true); - if (ctid < Main.maxCombatText) - player.Calamity().subtitletext = Main.combatText[ctid]; - player.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia }; - */ DialogueDisplaySystem.StartDialogue("Mods.CalamityMod.DevourerOfGods.Phases", NPC, 1, 120, false, new BossText()); } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index a254f33078..724c6f8fa0 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -504,14 +504,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares draedonAlive = true; } - // Prevent mechs from being respawned - // CIT 08JUN2025: This code is pointless and makes me unable to work swapping the laser arm position. Commenting it out. - /*if (otherExoMechWasFirst) - { - if (NPC.ai[3] < 1f) - NPC.ai[3] = 1f; - }*/ - // Phases bool spawnOtherExoMechs = lifeRatio < 0.7f && NPC.ai[3] == 0f; bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index 592183f14f..3d2a46c076 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -194,21 +194,6 @@ namespace CalamityMod.NPCs.NormalNPCs { if (Supercharged) { - //old - /* - Texture2D shieldTexture = ModContent.Request("CalamityMod/NPCs/NormalNPCs/WulfrumRoverShield").Value; - Rectangle frame = shieldTexture.Frame(1, 11, 0, (int)(Main.GlobalTimeWrappedHourly * 8) % 11); - spriteBatch.Draw(shieldTexture, - NPC.Center - screenPos + Vector2.UnitY * (NPC.gfxOffY + 6f), - frame, - Color.White * 0.625f, - NPC.rotation, - shieldTexture.Size() * 0.5f / new Vector2(1f, 11f), - NPC.scale + (float)Math.Cos(Main.GlobalTimeWrappedHourly) * 0.1f, - SpriteEffects.None, - 0f); - */ - //0.6 : The noise upscale //0.15 the scale its drawn at usually, 0.2 on Zenith float scale = (Main.zenithWorld ? 0.2f : 0.15f) + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + NPC.whoAmI * 0.2f)); diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 01165da0e4..5117b1748a 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -1805,83 +1805,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.noTileCollide = false; NPC.noGravity = false; NPC.damage = 0; - - /* - // Teleport back to the arena on defeat - if (giveUpCounter == GiveUpCounterMax) - { - Dust.QuickDustLine(NPC.Center, initialRitualPosition + new Vector2(0, -30), 500f, permafrost ? Color.Cyan : Color.Red); - NPC.Center = initialRitualPosition + new Vector2(0, -30); - NPC.noTileCollide = false; - NPC.noGravity = false; - NPC.damage = 0; - SoundEngine.PlaySound(GiveUpSound with { Volume = 1.7f }, NPC.Center); - } - if (giveUpCounter == 1010) - { - Particle pulse2 = new StaticPulseRing(NPC.Center, Vector2.Zero, Color.Red * 0.55f, new Vector2(1f, 1f), 0f, 5f, 0f, 47); - GeneralParticleHandler.SpawnParticle(pulse2); - } - - if (shieldOpacity > 0f) - shieldOpacity = 0; - if (giveUpCounter > 1000) - forcefieldScale = MathHelper.Lerp(forcefieldScale, 1.55f, 0.045f); - else if (giveUpCounter > 960) - forcefieldScale = MathHelper.Lerp(forcefieldScale, 0.4f, 0.085f); - - if (giveUpCounter > 960) - { - for (int i = 0; i < 2; i++) - { - Vector2 sparkVel = new Vector2(15, 15).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.1f); - GlowOrbParticle orb = new GlowOrbParticle(NPC.Center + sparkVel * (8 * forcefieldScale), sparkVel * Utils.GetLerpValue(1200, 960, giveUpCounter, true), false, 60, Main.rand.NextFloat(0.7f, 1.7f) * Utils.GetLerpValue(1200, 960, giveUpCounter), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true); - GeneralParticleHandler.SpawnParticle(orb); - } - - float vibrate = 15 * Utils.GetLerpValue(1200, 960, giveUpCounter, true); - NPC.Center = (initialRitualPosition + new Vector2(0, -30)) + Main.rand.NextVector2Circular(vibrate, vibrate); - } - else - { - if (giveUpCounter == 960) - { - NPC.Center = initialRitualPosition + new Vector2(0, -30); - - Vector2 BurstFXDirection = new Vector2(0, 15); - for (int i = 0; i < 4; i++) - { - SparkParticle spark = new SparkParticle(NPC.Center, (BurstFXDirection) * (i + 1), false, 11, (5f - i * 0.6f) * 3, Color.Lerp(Color.Red, Color.Magenta, Utils.GetLerpValue(-3, 3, i)) * 0.8f); - GeneralParticleHandler.SpawnParticle(spark); - } - for (int i = 0; i < 4; i++) - { - SparkParticle spark = new SparkParticle(NPC.Center, (-BurstFXDirection) * (i + 1), false, 11, (5f - i * 0.6f) * 3, Color.Lerp(Color.Red, Color.Magenta, Utils.GetLerpValue(-3, 3, i)) * 0.8f); - GeneralParticleHandler.SpawnParticle(spark); - } - - Particle orb = new CustomPulse(NPC.Center, Vector2.Zero, Color.Red, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.2f, 1.1f, 13); - GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new CustomPulse(NPC.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1f, 0.9f, 13); - GeneralParticleHandler.SpawnParticle(orb2); - for (int i = 0; i < 4; i++) - { - Particle orb3 = new CustomPulse(NPC.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.9f, 0.8f, 13); - GeneralParticleHandler.SpawnParticle(orb3); - } - - for (int i = 0; i < 30; i++) - { - GlowOrbParticle burst = new GlowOrbParticle(NPC.Center, (new Vector2(30, 30).RotatedByRandom(100) + new Vector2(0, -2)) * Main.rand.NextFloat(0.1f, 1.2f), true, 120, Main.rand.NextFloat(1.7f, 2.7f), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true); - GeneralParticleHandler.SpawnParticle(burst); - } - - NPC.velocity = new Vector2(18 * NPC.spriteDirection, -12); - giveUpCounter = GiveUpCounterMax; - hasDoneDeathAnim = true; - } - } - */ } else { diff --git a/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs b/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs index 59747e4788..5459c7f056 100644 --- a/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs +++ b/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs @@ -158,22 +158,6 @@ public class CrimsonEye : ModProjectile, ILocalizedModType if (DistanceRatio > 0) { - /* - Main.spriteBatch.SetBlendState(BlendState.Additive); - - Texture2D tex = ModContent.Request("CalamityMod/Particles/HollowCircleHardEdge").Value; - Color color = Color.Red * DistanceRatio; - if (Time <= 65) - color *= (Time - 45) / 20f; - - if (Projectile.timeLeft <= 20) - color *= Projectile.timeLeft / 20f; - - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, color, 0f, tex.Size() * 0.5f, 1.75f, 0); - - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - */ - float opacity = DistanceRatio; if (Time <= 65) opacity *= (Time - 45) / 20f; diff --git a/Projectiles/Boss/CalamitousFireball.cs b/Projectiles/Boss/CalamitousFireball.cs index 03c0f5dcb0..3de7c71ac7 100644 --- a/Projectiles/Boss/CalamitousFireball.cs +++ b/Projectiles/Boss/CalamitousFireball.cs @@ -91,14 +91,6 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 240); } - public override bool PreDraw(ref Color lightColor) - { - return false; - - /* - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - */ - } + public override bool PreDraw(ref Color lightColor) => false; } } diff --git a/Projectiles/Boss/CataclysmicFlame.cs b/Projectiles/Boss/CataclysmicFlame.cs index 60179713e4..59ecbb93b0 100644 --- a/Projectiles/Boss/CataclysmicFlame.cs +++ b/Projectiles/Boss/CataclysmicFlame.cs @@ -106,60 +106,6 @@ namespace CalamityMod.Projectiles.Boss } } - public override bool PreDraw(ref Color lightColor) - { - return false; - - /* - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; - - // The conga line of colors to sift through - Color color1 = new Color(255, 110, 100, 200); - Color color2 = new Color(255, 50, 50, 70); - Color color3 = new Color(255, 100, 100, 100); - Color color4 = new Color(200, 35, 30, 100); - float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); - float vOffset = Math.Min(Time, 20f); - float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); - float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f); - - if (timeRatio >= 1f) - return false; - - for (float j = 1f; j >= 0f; j -= length) - { - // Color - Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) : - ((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) : - ((timeRatio < 0.35f) ? color2 : - ((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) : - ((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) : - Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio))))))); - fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true); - Color innerColor = Color.Lerp(fireColor, Color.Black, 0.3f); - - // Positions and rotations - Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; - float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; - float trailRot = MathHelper.PiOver4 - mainRot; - - // Draw one backtrail - Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f; - Main.EntitySpriteDraw(fire, firePos - trailOffset, null, innerColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); - - // Draw the main fire - Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); - - // Draw the masking smoke - Main.spriteBatch.SetBlendState(BlendState.Additive); - Rectangle frame = mist.Frame(1, 3, 0, MistType); - Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); - Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None); - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - } - return false; - */ - } + public override bool PreDraw(ref Color lightColor) => false; } } diff --git a/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs b/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs index 22e3b48d87..e3b3d53418 100644 --- a/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs +++ b/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs @@ -88,19 +88,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal modifiers.HideCombatText(); } - public override void OnKill(int timeLeft) - { - /* - for (int i = 0; i < 7; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, 267); - dust.velocity = (Projectile.velocity * 3 * Projectile.scale).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 1f); - dust.scale = Main.rand.NextFloat(0.4f, 0.7f) * Projectile.scale; - dust.noGravity = true; - dust.color = Color.Red; - } - */ - } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) { overPlayers.Add(index); diff --git a/Projectiles/Enemy/JellyghoulBolt.cs b/Projectiles/Enemy/JellyghoulBolt.cs index d023799517..b9d14552b4 100644 --- a/Projectiles/Enemy/JellyghoulBolt.cs +++ b/Projectiles/Enemy/JellyghoulBolt.cs @@ -89,17 +89,6 @@ namespace CalamityMod.Projectiles.Enemy Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; int projFrame = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = projFrame * Projectile.frame; - - /*Main.spriteBatch.EnterShaderRegion(BlendState.Additive); - Texture2D ring = ModContent.Request("CalamityMod/Particles/HollowCircleHardEdge").Value; - for (int j = 0; j < 2; j++) - { - for (int i = 2; i < 7; i += 2) - { - Main.spriteBatch.Draw(ring, Projectile.oldPos[i] + Projectile.Size / 2 - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), null, Color.Red * Projectile.Opacity, Projectile.velocity.ToRotation(), ring.Size() / 2, new Vector2(0.5f, 1) * 0.2f * MathHelper.Lerp(1f, 0.5f, (i - 2) / 3f), SpriteEffects.None, 0); - } - } - Main.spriteBatch.ExitShaderRegion();*/ return false; } public float SlashWidthFunction(float _, Vector2 vertexPos) => 16 * Utils.GetLerpValue(0f, 0.1f, _, true); diff --git a/Projectiles/Magic/ClimaxBeam.cs b/Projectiles/Magic/ClimaxBeam.cs index aec84744d8..3c11255b6c 100644 --- a/Projectiles/Magic/ClimaxBeam.cs +++ b/Projectiles/Magic/ClimaxBeam.cs @@ -29,15 +29,6 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - /* - Vector2 projPos = Projectile.position; - projPos -= Projectile.velocity * 0.25f; - int boltDust = Dust.NewDust(projPos, 1, 1, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 1.25f); - Main.dust[boltDust].position = projPos; - Main.dust[boltDust].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[boltDust].velocity *= 0.1f; - */ - if (Projectile.timeLeft == 500) { Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Aqua, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 3); diff --git a/Projectiles/Magic/LightningArc.cs b/Projectiles/Magic/LightningArc.cs index 8f43f46666..9c367924a7 100644 --- a/Projectiles/Magic/LightningArc.cs +++ b/Projectiles/Magic/LightningArc.cs @@ -85,7 +85,6 @@ namespace CalamityMod.Projectiles.Magic } } - // Main.dust[dust].velocity /= 2f; Vector2 current = Projectile.Center; if (target) { @@ -115,33 +114,6 @@ namespace CalamityMod.Projectiles.Magic } Projectile.position = current; - - /*int tx = (int)(projectile.position.X / 16f); - int ty = (int)(projectile.position.Y / 16f); - - if (tx < 0) - { - tx = 0; - } - if (tx > Main.maxTilesX) - { - tx = Main.maxTilesX; - } - if (ty < 0) - { - ty = 0; - } - if (ty > Main.maxTilesY) - { - ty = Main.maxTilesY; - } - - if (Main.tile[tx, ty] != null && Main.tileSolid[(int)Main.tile[tx,ty].type] && Main.tile[tx, ty].wall == 0) - { - projectile.timeLeft -= 12; - }*/ - - } public override bool OnTileCollide(Vector2 oldVelocity) { diff --git a/Projectiles/Magic/LuxorsGiftMagic.cs b/Projectiles/Magic/LuxorsGiftMagic.cs index 53d96f1139..8056df5a3e 100644 --- a/Projectiles/Magic/LuxorsGiftMagic.cs +++ b/Projectiles/Magic/LuxorsGiftMagic.cs @@ -39,14 +39,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.velocity *= 0.1f; if (Projectile.velocity.Length() < 8) Projectile.velocity *= 1.01f; - /* - Vector2 dustVel = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2().RotatedByRandom(0.5f) * Main.rand.NextFloat(0.8f, 1.3f); - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(4, 4), ModContent.DustType(), dustVel * Main.rand.NextFloat(0.5f, 1.2f)); - dust.noGravity = !Main.rand.NextBool(3); - dust.scale = Main.rand.NextFloat(0.45f, 0.6f); - dust.color = Color.Gold; - dust.noLightEmittence = true; - */ + if (Projectile.timeLeft > 30) { for (int i = 0; i < 2; i++) diff --git a/Projectiles/Melee/CosmicIceBurst.cs b/Projectiles/Melee/CosmicIceBurst.cs index 379f8d6c13..6318cf0643 100644 --- a/Projectiles/Melee/CosmicIceBurst.cs +++ b/Projectiles/Melee/CosmicIceBurst.cs @@ -110,11 +110,6 @@ namespace CalamityMod.Projectiles.Melee return true; } - /*public override Color? GetAlpha(Color lightColor) - { - return new Color(150, Main.DiscoG, 255, 127); - }*/ - // Only inflict Nightwither if not spawned from Icebreaker public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { diff --git a/Projectiles/Melee/CrystylCrusherRay.cs b/Projectiles/Melee/CrystylCrusherRay.cs index 9e308d1d6f..65c0577e3d 100644 --- a/Projectiles/Melee/CrystylCrusherRay.cs +++ b/Projectiles/Melee/CrystylCrusherRay.cs @@ -144,9 +144,7 @@ namespace CalamityMod.Projectiles.Melee DestroyTiles(); } - /* - * Sets the end of the laser position based on where it collides with something - */ + // Sets the end of the laser position based on where it collides with something private void SetLaserPosition(Player player) { Distance = MathHelper.Max(player.Distance(player.ClampedMouseWorld()) - 20f, MOVE_DISTANCE + 5f); @@ -228,9 +226,7 @@ namespace CalamityMod.Projectiles.Melee public override bool ShouldUpdatePosition() => false; - /* - * Update CutTiles so the laser will cut tiles (like grass) - */ + // Update CutTiles so the laser will cut tiles (like grass) public override bool? CanCutTiles() => IsAtMaxCharge ? null : false; public override void CutTiles() { diff --git a/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs b/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs index b50aac643e..becc25a285 100644 --- a/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs +++ b/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs @@ -368,25 +368,5 @@ namespace CalamityMod.Projectiles.Melee return false; } - /* - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(Projectile.timeLeft); - writer.Write(Projectile.rotation); - writer.Write(Projectile.localAI[2]); - writer.Write(Projectile.localAI[0]); - - writer.WriteFlags(stuckInTarget, thrown); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - Projectile.timeLeft = reader.Read(); - Projectile.rotation = reader.ReadSingle(); - Projectile.localAI[2] = reader.ReadSingle(); - Projectile.localAI[0] = reader.ReadSingle(); - - reader.ReadFlags(out stuckInTarget, out thrown); - } - */ } } diff --git a/Projectiles/Melee/ExobladeProj.cs b/Projectiles/Melee/ExobladeProj.cs index 4eeb944925..5f55b2ea97 100644 --- a/Projectiles/Melee/ExobladeProj.cs +++ b/Projectiles/Melee/ExobladeProj.cs @@ -530,23 +530,6 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition, null, Color.White, BaseRotation, texture.Size() / 2f, SquishVector * 3f * Projectile.scale, direction, 0); - /* - if (PerformingPowerfulSlash) - { - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, swingFX, Main.GameViewMatrix.TransformationMatrix); - - float bouncyProgression = (float)Math.Sin(Progression * MathHelper.Pi); - swingFX.Parameters["color"].SetValue(Color.MediumSpringGreen.ToVector4() with { W = bouncyProgression * 0.5f }); - - for (int i = 0; i < 4; i++) - { - Vector2 offset = (i / 4f * MathHelper.TwoPi + SwingAngleShift + MathHelper.PiOver4).ToRotationVector2() * 2f * Projectile.scale; - Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition + offset, null, Color.White, BaseRotation, texture.Size() / 2f, SquishVector * 3f * Projectile.scale, direction, 0); - } - } - */ - 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/RoxcaliburProj.cs b/Projectiles/Melee/RoxcaliburProj.cs index 3b9034c5f4..e68a091c84 100644 --- a/Projectiles/Melee/RoxcaliburProj.cs +++ b/Projectiles/Melee/RoxcaliburProj.cs @@ -55,18 +55,18 @@ namespace CalamityMod.Projectiles.Melee //more precise hitbox. makes the weapon harder to use but looks visually better: use it if you want. /* - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (HitTimer <= 0) - { - float size = Projectile.Size.Length(); - Vector2 hiltPos = Projectile.Center - Projectile.velocity * size / 2; - Vector2 endPos = Projectile.Center + Projectile.velocity * size / 2; - float useless = 0f; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), hiltPos, endPos, size / 2, ref useless); - } - return base.Colliding(projHitbox, targetHitbox); - } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (HitTimer <= 0) + { + float size = Projectile.Size.Length(); + Vector2 hiltPos = Projectile.Center - Projectile.velocity * size / 2; + Vector2 endPos = Projectile.Center + Projectile.velocity * size / 2; + float useless = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), hiltPos, endPos, size / 2, ref useless); + } + return base.Colliding(projHitbox, targetHitbox); + } */ public override void AI() diff --git a/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs index c88f451f81..a20df2e91d 100644 --- a/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs +++ b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs @@ -108,18 +108,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos SoundEngine.PlaySound(fire with { Volume = 0.6f, PitchVariance = 0.2f }, Projectile.Center); } - // Technically scrapped because the weapon is complex enough, but we might want to use this in the future - /* - if (timer % 60 == 0) // Fire Heal Stars at player (slightly predictive) - { - Vector2 vel = ((Projectile.Center - Owner.Center) - Owner.velocity * 8).SafeNormalize(Vector2.UnitX) * -10; - Projectile healStar = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0, cloneYoyo ? 3 : 10, 5); - healStar.extraUpdates = 2; - SoundStyle fireHeal = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianDash"); - SoundEngine.PlaySound(fireHeal with { Volume = 0.9f, Pitch = 0.3f }, Projectile.Center); - } - */ - if (timer > 0) { timer--; diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index 9bcfc40ee6..87cca66150 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -153,21 +153,11 @@ IL_6899: if (Projectile.tileCollide) { Projectile.hide = false; - - //if (projectile.extraUpdates == 1) PreventFastfall(); - - /*Vector2 distance = Main.player[projectile.owner].Center - projectile.Center; - if (distance.Length() < 100) - projectile.extraUpdates = 0; - else - projectile.extraUpdates = 1;*/ } else { Projectile.hide = true; - //projectile.extraUpdates = 1; - if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X, Projectile.position.Y, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Projectile.owner, (float)Projectile.identity); } diff --git a/Projectiles/Pets/DannyDevitoPet.cs b/Projectiles/Pets/DannyDevitoPet.cs index a57bd3e2d5..5a0fd9662a 100644 --- a/Projectiles/Pets/DannyDevitoPet.cs +++ b/Projectiles/Pets/DannyDevitoPet.cs @@ -249,53 +249,6 @@ namespace CalamityMod.Projectiles.Pets } } - /*public override void PostDraw(Color lightColor) - { - if (!Main.gamePaused || Main.gameMenu) - { - Vector2 projDirect = projectile.position - Main.screenPosition; - if ((float)Main.mouseX > projDirect.X && (float)Main.mouseX < projDirect.X + (float)projectile.width && (float)Main.mouseY > projDirect.Y && (float)Main.mouseY < projDirect.Y + (float)projectile.height) - { - int playerTileX = (int)(Main.player[projectile.owner].Center.X / 16f); - int playerTileY = (int)(Main.player[projectile.owner].Center.Y / 16f); - int projTileX = (int)projectile.Center.X / 16; - int projTileY = (int)projectile.Center.Y / 16; - int lastTileRangeX = Main.player[projectile.owner].lastTileRangeX; - int lastTileRangeY = Main.player[projectile.owner].lastTileRangeY; - if (playerTileX >= projTileX - lastTileRangeX && playerTileX <= projTileX + lastTileRangeX + 1 && playerTileY >= projTileY - lastTileRangeY && playerTileY <= projTileY + lastTileRangeY + 1) - { - Main.player[projectile.owner].noThrow = 2; - Main.player[projectile.owner].cursorItemIconEnabled = true; - Main.player[projectile.owner].cursorItemIconID = 3213; - if (PlayerInput.UsingGamepad) - { - Main.player[projectile.owner].GamepadEnableGrappleCooldown(); - } - if (Main.mouseRight && Main.mouseRightRelease && Player.StopMoneyTroughFromWorking == 0) - { - Main.mouseRightRelease = false; - if (Main.player[projectile.owner].chest == -2) - { - Main.PlaySound(SoundID.Item11, -1, -1); - Main.player[projectile.owner].chest = -1; - Recipe.FindRecipes(); - return; - } - Main.player[projectile.owner].GetCalamityPlayer().trashManChest = projectile.type; - Main.player[projectile.owner].chest = -2; - Main.player[projectile.owner].chestX = (int)(projectile.Center.X / 16f); - Main.player[projectile.owner].chestY = (int)(projectile.Center.Y / 16f); - Main.player[projectile.owner].talkNPC = -1; - Main.npcShop = 0; - Main.playerInventory = true; - Main.PlaySound(SoundID.Item10, -1, -1); - Recipe.FindRecipes(); - } - } - } - } - }*/ - private bool HoleBelow() //pretty much the same as the one used in mantis { int tileWidth = 4; diff --git a/Projectiles/Rogue/WrathwingCinder.cs b/Projectiles/Rogue/WrathwingCinder.cs index ab70362863..844aa62b7c 100644 --- a/Projectiles/Rogue/WrathwingCinder.cs +++ b/Projectiles/Rogue/WrathwingCinder.cs @@ -78,15 +78,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.velocity.X *= 0.995f; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; - // commented out sound because it was way too loud - /* - if (projectile.localAI[0] == 0f) - { - projectile.localAI[0] = 1f; - Main.PlayTrackedSound(SoundID.DD2_BetsyFireballShot, projectile.Center); - } - */ - if (Projectile.ai[0] >= 2f) { Projectile.alpha -= 25; diff --git a/Projectiles/Summon/HydrothermicVent.cs b/Projectiles/Summon/HydrothermicVent.cs index a90d0b2d32..fdd82f6bb5 100644 --- a/Projectiles/Summon/HydrothermicVent.cs +++ b/Projectiles/Summon/HydrothermicVent.cs @@ -173,15 +173,6 @@ namespace CalamityMod.Projectiles.Summon Projectile.ai[0] = 20f; } } - - //doesn't look good - /*Vector2 goreVec = new Vector2(projectile.Center.X, projectile.Center.Y - yAdjust - 10f); - Vector2 goreVec = new Vector2(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y); - if (Main.rand.NextBool(8)) - { - int smoke = Gore.NewGore(goreVec, default, Main.rand.Next(375, 378), 0.5f); - Main.gore[smoke].behindTiles = true; - }*/ } } diff --git a/Projectiles/Typeless/AscendantAura.cs b/Projectiles/Typeless/AscendantAura.cs index 36a18030fa..1d3b8c7af3 100644 --- a/Projectiles/Typeless/AscendantAura.cs +++ b/Projectiles/Typeless/AscendantAura.cs @@ -63,25 +63,6 @@ namespace CalamityMod.Projectiles.Typeless // Stay on the player's head Projectile.Center = (Owner.MountedCenter + new Vector2(0, -45)); - Vector2 spawnPos = Projectile.Center + Main.rand.NextVector2Circular(5, 5); - int lifetime = Main.rand.Next(3, 6); - float scale = Main.rand.NextFloat(0.5f, 0.9f); - Color color = Main.rand.NextBool(3) ? Color.LightGreen : Color.Khaki; - /* - SparkParticle spark1 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark1); - SparkParticle spark2 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark2); - SparkParticle spark3 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(-7, -12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark3); - SparkParticle spark4 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(-7, -12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark4); - SparkParticle spark5 = new SparkParticle(Projectile.Center + new Vector2(20, 0), new Vector2(Main.rand.NextFloat(7, 12), 0), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark5); - SparkParticle spark6 = new SparkParticle(Projectile.Center + new Vector2(-20, 0), new Vector2(Main.rand.NextFloat(-7, -12), 0), false, lifetime, scale - 0.3f, color); - GeneralParticleHandler.SpawnParticle(spark6); - */ - // Emit some light Vector3 Light = new Vector3(0.251f, 0.255f, 0.219f); Lighting.AddLight(Projectile.Center, Light * 5); diff --git a/Systems/Mechanic/TilePingerSystem.PingEffects.cs b/Systems/Mechanic/TilePingerSystem.PingEffects.cs index 0627884742..6217aef3d7 100644 --- a/Systems/Mechanic/TilePingerSystem.PingEffects.cs +++ b/Systems/Mechanic/TilePingerSystem.PingEffects.cs @@ -142,33 +142,6 @@ public class WulfrumPingTileEffect : IPingedTileEffect, ILoadable Main.spriteBatch.Draw(emptyFrame, pos.ToWorldCoordinates() - Main.screenPosition, null, Color.White, 0, new Vector2(emptyFrame.Width / 2f, emptyFrame.Height / 2f), 16f, 0, 0); } - // CIT 16JUL2025: Tile lighting override is now applied via an On edit; this code is duplicated there, and thus is no longer needed here. - /*public void EditDrawData(int i, int j, ref TileDrawInfo drawData) - { - float distanceFromCenter = (new Point(i, j).ToWorldCoordinates() - PingCenter).Length(); - float currentExpansion = MathHelper.Clamp(PingProgress * MaxPingLife / (float)MaxPingTravelTime, 0f, 1f) * MaxPingRadius; - - if (distanceFromCenter - 8 > currentExpansion) - return; - - float brightness = 1f; - Tile tile = Framing.GetTileSafely(i, j); - //Counteracts slopes and half tiles being too bright - if (tile.Slope != SlopeType.Solid || tile.IsHalfBlock) - brightness = 0.64f; - - //Fade on the edges - if (distanceFromCenter + 8 > currentExpansion) - brightness *= 1 - (distanceFromCenter - currentExpansion + 8f) / 16f; - - //Fade away with the effect - brightness *= 1 - Math.Max(PingProgress - 0.9f, 0) / (0.1f); - - if (drawData.tileLight.R < 200 * brightness) drawData.tileLight.R = (byte)(200 * brightness); - if (drawData.tileLight.G < 200 * brightness) drawData.tileLight.G = (byte)(200 * brightness); - if (drawData.tileLight.B < 200 * brightness) drawData.tileLight.B = (byte)(200 * brightness); - }*/ - public void UpdateEffect() { if (PingTimer > 0) diff --git a/Tiles/Crags/ScorchedRemainsGrass.cs b/Tiles/Crags/ScorchedRemainsGrass.cs index 728a96dc12..fc184afc16 100644 --- a/Tiles/Crags/ScorchedRemainsGrass.cs +++ b/Tiles/Crags/ScorchedRemainsGrass.cs @@ -177,9 +177,7 @@ namespace CalamityMod.Tiles.Crags #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -194,9 +192,7 @@ namespace CalamityMod.Tiles.Crags private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -220,9 +216,7 @@ namespace CalamityMod.Tiles.Crags private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -244,9 +238,7 @@ namespace CalamityMod.Tiles.Crags private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -325,113 +317,6 @@ namespace CalamityMod.Tiles.Crags { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion } } diff --git a/Tiles/FurnitureAshen/AshenAccentSlab.cs b/Tiles/FurnitureAshen/AshenAccentSlab.cs index 7eb8b524e2..6935d176e5 100644 --- a/Tiles/FurnitureAshen/AshenAccentSlab.cs +++ b/Tiles/FurnitureAshen/AshenAccentSlab.cs @@ -532,122 +532,5 @@ namespace CalamityMod.Tiles.FurnitureAshen Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } } - - /* - /// - /// Gets the tile variant to use. Returns -1 by default - /// - /// - /// - /// - public int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - if (j % 3 < 2) - { - //We need to get the particular tile to refer to. This is the top left tile in each iteration of the pattern (large slab above the small rune bricks - Tile sourceTile = Main.tile[i - (i % 2), j - (j % 3)]; //Gets the tile for this iteration by taking the current position of the tile minus this tile's position in the pattern - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - return (variant); - } - */ } } diff --git a/Tiles/FurnitureAshen/AshenSlab.cs b/Tiles/FurnitureAshen/AshenSlab.cs index 809dbd3bc7..88cb5bc72b 100644 --- a/Tiles/FurnitureAshen/AshenSlab.cs +++ b/Tiles/FurnitureAshen/AshenSlab.cs @@ -532,122 +532,5 @@ namespace CalamityMod.Tiles.FurnitureAshen Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } } - - /* - /// - /// Gets the tile variant to use. Returns -1 by default - /// - /// - /// - /// - public int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - if (j % 3 < 2) - { - //We need to get the particular tile to refer to. This is the top left tile in each iteration of the pattern (large slab above the small rune bricks - Tile sourceTile = Main.tile[i - (i % 2), j - (j % 3)]; //Gets the tile for this iteration by taking the current position of the tile minus this tile's position in the pattern - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - return (variant); - } - */ } } diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs b/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs index 1d736949b8..b8f9142d04 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs @@ -82,9 +82,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -99,9 +97,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -125,9 +121,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -149,9 +143,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -230,113 +222,6 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion } } diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index d4f08a90bf..a12b232265 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -90,9 +90,7 @@ namespace CalamityMod.Tiles #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -107,9 +105,7 @@ namespace CalamityMod.Tiles private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -133,9 +129,7 @@ namespace CalamityMod.Tiles private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -157,9 +151,7 @@ namespace CalamityMod.Tiles private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -238,113 +230,6 @@ namespace CalamityMod.Tiles { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion } } diff --git a/Tiles/VernalSoil.cs b/Tiles/VernalSoil.cs index 729d05c74c..4826424766 100644 --- a/Tiles/VernalSoil.cs +++ b/Tiles/VernalSoil.cs @@ -199,9 +199,7 @@ namespace CalamityMod.Tiles #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -216,9 +214,7 @@ namespace CalamityMod.Tiles private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -242,9 +238,7 @@ namespace CalamityMod.Tiles private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -266,9 +260,7 @@ namespace CalamityMod.Tiles private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -347,113 +339,6 @@ namespace CalamityMod.Tiles { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion public override void NumDust(int i, int j, bool fail, ref int num) { diff --git a/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs b/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs index a543900c4e..70952ffd8b 100644 --- a/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs +++ b/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs @@ -15,11 +15,6 @@ namespace CalamityMod.Walls.UnsafeWalls public static Asset leafTexture = null; public static Vector2 TileAdj => (Lighting.Mode == Terraria.Graphics.Light.LightMode.Retro || Lighting.Mode == Terraria.Graphics.Light.LightMode.Trippy) ? Vector2.Zero : Vector2.One * 12; - /*public override bool Autoload(ref string name, ref string texture) - { - mod.AddWall("AstralGrassWallUnsafe", this, texture); - return base.Autoload(ref name, ref texture); - }*/ public override void SetStaticDefaults() { diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 786fcb8bf9..0bcb66de9c 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -774,66 +774,5 @@ namespace CalamityMod.World return false; } - - /* - public static void PlaceTit(int x, int y, ushort type = 165) - { - if (WorldGen.SolidTile(x, y - 1) && !Main.tile[x, y].HasTile && !Main.tile[x, y + 1].HasTile) - { - if (Main.tile[x, y - 1].TileType == (ushort)ModContent.TileType()) - { - if (WorldGen.genRand.Next(2) == 0 || Main.tile[x, y + 2].HasTile) - { - int num2 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num2; - Main.tile[x, y].TileFrameY = 72; - } - else - { - int num3 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num3; - Main.tile[x, y].TileFrameY = 0; - Main.tile[x, y + 1].TileType = type; - Main.tile[x, y + 1].Get().HasTile = true; - Main.tile[x, y + 1].TileFrameX = (short)num3; - Main.tile[x, y + 1].TileFrameY = 18; - } - } - } - else - { - if (WorldGen.SolidTile(x, y + 1) && !Main.tile[x, y].HasTile && !Main.tile[x, y - 1].HasTile) - { - if (Main.tile[x, y + 1].TileType == (ushort)ModContent.TileType()) - { - if (WorldGen.genRand.Next(2) == 0 || Main.tile[x, y - 2].HasTile) - { - int num13 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num13; - Main.tile[x, y].TileFrameY = 90; - } - else - { - int num14 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y - 1].TileType = type; - Main.tile[x, y - 1].Get().HasTile = true; - Main.tile[x, y - 1].TileFrameX = (short)num14; - Main.tile[x, y - 1].TileFrameY = 36; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num14; - Main.tile[x, y].TileFrameY = 54; - } - } - } - } - } - */ } } From 301708b2117cb63f1cbe87399da72f7acc0a6677 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 Jul 2026 16:38:14 -0400 Subject: [PATCH 18/35] Stygian Shield's tooltip mentions it gives fully immunity --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index a717d882de..172e65e32b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -1245,7 +1245,7 @@ StygianShield: { DisplayName: Stygian Shield Tooltip: ''' - Hold to charge an omni-directional dash which slams through enemies + Hold to charge an omni-directional dash which grants immunity to damage and can slam through enemies to throw a buckler which bounces towards a nearby foe upon collision Grants knockback immunity and {0} defense while held However, dashes are disabled until you stop holding this weapon for {1} seconds From f9fcda777336c695a7b0300648372ffad9792b8d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 11 Jul 2026 11:23:48 -0400 Subject: [PATCH 19/35] Fuck it, Walking Cane 70% size buff Also made it only spawn the immediately lunging shadow hands --- Items/Weapons/Rogue/WalkingCane.cs | 6 +++--- NPCs/CalamityGlobalNPC.cs | 2 +- Projectiles/Rogue/WalkingCaneProjectile.cs | 13 ++++++------- Projectiles/Rogue/WalkingCaneProjectile.png | Bin 732 -> 1018 bytes Projectiles/Rogue/WalkingCaneProjectileAlt.png | Bin 724 -> 1016 bytes 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Rogue/WalkingCane.cs b/Items/Weapons/Rogue/WalkingCane.cs index b4fd9f36ed..a8b9fc5a77 100644 --- a/Items/Weapons/Rogue/WalkingCane.cs +++ b/Items/Weapons/Rogue/WalkingCane.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 16f; + Item.shootSpeed = 20f; Item.DamageType = RogueDamageClass.Instance; } @@ -38,8 +38,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 * 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); + float ai0 = Main.rand.NextFloat() * Item.shootSpeed * 1.5f * player.direction; + int projectileIndex = Projectile.NewProjectile(source, position + Vector2.UnitY * 100f, velocity * 2f, type, damage, knockback, player.whoAmI, ai0); if (projectileIndex.WithinBounds(Main.maxProjectiles)) Main.projectile[projectileIndex].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9651475a6f..009ac238f8 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4886,7 +4886,7 @@ namespace CalamityMod.NPCs GameShaders.Misc["CalamityMod:BasicTint"].Apply(); for (int i = 0; i < 4; i++) { - Vector2 offset = Vector2.UnitX.RotatedBy(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi * 2f + (MathHelper.TwoPi * i / 4f)) * 5f * fadeInAmt; + Vector2 offset = Vector2.UnitX.RotatedBy(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi * 2f + (MathHelper.TwoPi * i / 4f)) * 6f * fadeInAmt; Main.EntitySpriteDraw(tex, npc.Center - screenPos - Vector2.UnitY * (npc.gfxOffY) + offset, frame, Color.Violet, npc.rotation, origin, npc.scale, sp); } CalamityUtils.ExitShaderRegion(spriteBatch); diff --git a/Projectiles/Rogue/WalkingCaneProjectile.cs b/Projectiles/Rogue/WalkingCaneProjectile.cs index 4da43303ab..94fe83ad72 100644 --- a/Projectiles/Rogue/WalkingCaneProjectile.cs +++ b/Projectiles/Rogue/WalkingCaneProjectile.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Rogue } public override void SetDefaults() { - Projectile.width = 40; - Projectile.height = 36; + Projectile.width = 80; + Projectile.height = 80; Projectile.DamageType = RogueDamageClass.Instance; Projectile.timeLeft = 120; Projectile.friendly = true; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.scale = 1.25f; } public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; - public override float TravelSpeed => 12.5f; + public override float TravelSpeed => 35f; public override bool PreAI() { @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - float spearLengthMult = 2.75f; + float spearLengthMult = 3.2f; float velocityMagnitude = 0f; // For whatever fucking reason CheckAABBvLineCollision fails when you're completely inside a hitbox, so check for that too return targetHitbox.Contains(Main.LocalPlayer.Center.ToPoint()) || Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), @@ -86,9 +86,8 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 position = target.Center + Main.rand.NextVector2CircularEdge(100f, 100f); Vector2 velocity = (target.Center - position).SafeNormalize(Vector2.Zero) * 6f; - float ai0 = Main.rand.NextBool() ? 300f : 0f; - float ai1 = Main.rand.NextBool() ? velocity.ToRotation() : 0f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, velocity, ProjectileID.InsanityShadowFriendly, Projectile.damage / 2, Projectile.knockBack, Projectile.owner, ai0, ai1); + // Friendly shadow hands normally have four different behaviors, but Walking Cane only spawns shadow hands that immediately lunge + Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, velocity, ProjectileID.InsanityShadowFriendly, Projectile.damage / 2, Projectile.knockBack, Projectile.owner); } } } diff --git a/Projectiles/Rogue/WalkingCaneProjectile.png b/Projectiles/Rogue/WalkingCaneProjectile.png index 2fbafd4ca8353211d1052f1a7e29c0804e3ae9fd..da54397462d95ae6865af95ab2706bd7023d3703 100644 GIT binary patch delta 982 zcmcb^`iot$Gr-TCmrII^fq{Y7)59eQNGAbt90wbaydit=#zaMvdggvl7srr_xVLxx zJ9-Lbj(_}qYl^b#MXf{YmYle@Xxo(LoM>(FNoO53H6J}t_$j?pQ)za$Xqb}VQeF1I zQ}d$&`KFn5$rKh$y5<-^@8?-#>A#zQ``;=u3(54_;rOav`D$pc+h68vHO4;q+jBPmeX()&gd|C=L!BXEn?)le zo1?=SE?m9JInl_j$CfqW+nLP&`#CE<{Yqc-J;K#uV#ZdL|1UC69*ShRv%gfl;qL9{ z%p0D6kYtGK<73?L|3tD!KwDSAq8D18cG{1xf9LF&vSC+x;knmUzsejXQ&(`PC)J0$ zbG?3*F<&L<(CUry3^BWmc@FFp{;d#n;=)mJ2AkTyybT}q_b1;k7JcaQ=9Ncc*paQ= zuNf=8eUf!Kbz^I>>Xg8yKtVr|Sk<5L4U#*{#TpLsRxk9B3_EmSSuaD6T@CYr+uPs6 zwg20v@aN2S&+W#q?>#k6+P^RLc6}7XvE%od4T}DX9*Nl+D(JVOgJ})N>@Oc|9{%~@ z-XX(#^YwDScm{|2yHXiS*3aUexO!{rsQ|FDH~*UNrgN;_TO!7zF8}cA1!(Fyk5rU z3jf5#8ln$jKv|Fin+i5rFgR!-(uXcclwl-$N2B6mzNy180B%+k7aAwyL{^kK{C`j;zQeq5iQdEfuUtgeDXU#F;Cd;yYiarW_^ zlcsqP7)MfBSs90fdVukmxNLc(w}I9n&hNoj-hlPr&diz$k~(xZWNQ@I?6h4`TUmfE zTk(6!)+&%l;P%X5&YeJ~n9jGFD&P+k*!(h>^XN(rb))%CQ|l)Hbt`So4B>nVbmI~` zpu>%Tez>wMST)2QsP^lWRV^hzM`+Cpn>s-c=&qZ=tA#c#RGQ;qvsX(o8mM$qu*|dx zU;n%2h5|WzGPkKW>%4l$IyJx;$gK~SwM#uUPh!*O1AGCTGlK>FwzT>$Ui*dfX^|dL B$DIHG delta 694 zcmV;n0!jV)2iyfAiBL{Q4GJ0x0000DNk~Le0000w0000s2nGNE0G4@*Q;{Jwe*$qy zL_t(&L+#pMXpM0k$MN?p<&vUkipGw#BCDZR%7v`e zpvtwjw&VfUG_NW+J~}eqP;g+Le=V{H>a|F(S|xRL@5lpO=-*#({CxjIh)~vxCY@w^ z4sHP;lW74*_I-8&fR)Ra{QVsA0T^5`i5M-Q(B;Mmy#04B!< z0XTW?C4`XmqSZ>WKfld^Be}hOL&4|TJNuvvSua|xGEI$n9LcHdcK~iZe;ESc+Qk## z2oK(T1Hi=eR{(OKe-%9^FIuf6dhf<=0A5YL14p*6cPo@3sk~@XNl*FrIyNsW`uhWib^?&g%>pode+r5`^?1>^ zlc=QZee(Ly2XJOneSY!Me`WwWcWnZoZQE*ao_0#fdeOMk^QWFO?V2`d?W#4gWHnaR zgS#&PxH9nAi^iJWNzhobI|!vDZDD1-XjIvq1MT+dN(ZfI!lwUo`b-x%v#=M9DqZ2* zcmAwdmF{zwFO5P3k~S-=Ilzm~H_fge=e~e5D@HXYgOaTBqLpUvf0NnQpTLn+af{l# zXt@PRCM{_5qG4O;lFEw)RV$Lpi%({V%+0Ns`QB3w?Ha=Gi#xj9#Q>Zzpo7Ywnwd$8qt5sG&Sb!nhI}$>lS{uV^BVPUg`ImEFYzwkPlO~ znXNhT>+b)z$MYG?%(gl>9J+GFgu%HyzEMSFj*Eom`z=n$+nOZp~NK@GI=K(*jY{ZT6_NZeMg65pF*V_gu48cdPJVj^kthXi_v9ZNFIUL&d z%$GsN>Z63pq8BQMJQfB=$Hz}+%(%T%vf&{+zoLS&&!G#8r5Q@zS@{}pMp|?lT-u{q zS{`W4Z^ksi?>b|_`*Xo36qDb4_2-C*{9XTkcXC&sEH}`GS+ma>aK6iXb)@?|Lyui0 z^MU#C#+%>&pI=a3R=O$M_Q{TO1w|@KcE0CasH+YgAHcc^bcP_xZy5 zy9?{pD>r+#Obq(>)j34y&zzpk&u=Lf%zb24mGVt4^vZnc=|H12%~!4q@?TParXW4_ zwb`0RmifLwEvM{i_c^F9&U_u^@u9TMMPlWn;OFwjleCWH@HIn~6_hd~}6m;u4YZAJfr@qr5=*_YfQK=p+6O$}$Ll*J?1=cK63%{xa)F9HG zskvmw=?NUlGv`e@DiSU!l&CWKvY>0>WS{{?rlLzV^o)QGR9m)CCUQDZXw?gm5T(^1 zA<@WM?nsa-t=Frf&vb!IjSREq3ylJ~bjfO&<65df^Ft=pUtQaFN*83+%T-~?PbYyK zmSQ?NU?s>w)3$VZt_cAd*Bxamx))?f;Ob@1#HWH-j;oh`dY7)C<3D6$Oc&_OW} zA?OfB)Fl$c=nw=#B^U(~ttkaXK|vjZi0NQYy!)^(mCo#pzR&Nr?+iQee&+o@6~vsj z_U6d_{cipv05dbQ6>fRCvq~4Nf7HZQ%OZKP_drqkh2A>=jE_Bz?OBV7iRv`huPJJK zpT2wtU~|3+9LYjq7J$)P&mjYn5)+k(v*bpUjo*anW^sq+H>e;nW22|z=B zEjY4;4?n&CokmPl;*%X7c?OQ;j>atj96tE~Of(;c^r{Rb$RZ>S}^$vuz{j_!-!WETXw*T@t{D-73dWI#>k=?;^?L>qls>jc`By~jg z?722@#%am1qYHE7xSuNtM^tKBl2naKbeol4ePhjfNU%2!M^qOie;xe>iEMuR21sz6 zHPLcKx7nm*O|;xeTGm9Z{Wns(xrHPNg@%j)&)zsj0u*0NMt6U}P=Ci`Z35=xv1 zm}u6c_n=0uTnFc*K%d^3=yHiZ^YMMzW}?e2`s*2e9vh74ic7A#G7?=k!HE6>!uB*N Ud&CEe00000NkvXX1g=70g7e5bZU6uP From 7a49b33aefe9d65482e1257d5199106e5a62c763 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 12 Jul 2026 14:34:26 -0400 Subject: [PATCH 20/35] The BoC second phase HP% increase I forgot to do Also slightly decreased stun period so it doesn't suddenly become much easier to skip second Creeper phase --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index 3ee393701e..675782e8c2 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -59,7 +59,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride #region Health Gates internal static float DesperateOnslaughtCreeperHealthGate => 0.1f; //When the cumulative health % of all creepers falls below this value, BoC will begin its pre-stun attack upon entering its idle phase. - internal static float Phase2HealthGate => 0.5f; //When BoC's health % falls below this value, it will begin entering Phase 2 + internal static float Phase2HealthGate => 0.7f; //When BoC's health % falls below this value, it will begin entering Phase 2 internal static float ForcedIllusionHealthGate => 0.25f; //When BoC's health % falls below this value, the next attack is forced to be the Illusion Trick #endregion @@ -76,7 +76,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride internal static int CreeperChargeWindUpTime => 22; #endregion - internal static int StunDuration => 480; + internal static int StunDuration => 360; #region Creeper Swipes internal static int SwipesStartupDuration => 120; From 523642471be1ab02e467131489f8f6f80c94fcdb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 12 Jul 2026 14:47:20 -0400 Subject: [PATCH 21/35] Fixed Queen Bee no longer using stinger spread in Rev --- NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs index 437d1b4969..eb39b7dd28 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs @@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { int phase; - int maxRandom = phase4 ? (death ? 5 : 4) : 4; + int maxRandom = phase4 ? 5 : 4; do phase = Main.rand.Next(maxRandom); while (phase == NPC.ai[1] || phase == 1 || (phase == 2 && phase4) || (death && phase6 && phase == 3)); @@ -200,7 +200,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (stingerArcs) phase = 5; - CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults); NPC.ai[0] = phase; NPC.ai[1] = 0f; From ad0cc67cba8329d0a190f52a5da264156071e1f6 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 12 Jul 2026 15:03:22 -0400 Subject: [PATCH 22/35] Wall of Flesh laser telegraph is a solid color over the eye instead of a specific texture that breaks with texture packs --- ExtraTextures/ExtraTextureRefs.cs | 4 +--- .../WallOfFleshEyeTelegraphGlow.png | Bin 3678 -> 0 bytes .../Bosses/WallOfFleshAI.cs | 10 +++------- 3 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow.png diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs index 2fe42db986..de46254b15 100644 --- a/ExtraTextures/ExtraTextureRefs.cs +++ b/ExtraTextures/ExtraTextureRefs.cs @@ -16,8 +16,7 @@ namespace CalamityMod.ExtraTextures public static Asset DestroyerBodyGlowmask; public static Asset DestroyerTailGlowmask; - // WoF, These are not "exactly" the ExtraTextures. But - public static Asset WallOfFleshEyeGlowmask; + // WoF, These are not "exactly" the ExtraTextures public static Asset WallOfFleshDemonSickleTexture; // Flying Carpet Replacements @@ -47,7 +46,6 @@ namespace CalamityMod.ExtraTextures DestroyerBodyGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad); DestroyerTailGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad); - WallOfFleshEyeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad); WallOfFleshDemonSickleTexture = ModContent.Request("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad); FlyingCarpetVanilla = TextureAssets.FlyingCarpet; diff --git a/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow.png b/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow.png deleted file mode 100644 index 2f52bdb33a34bb6e8af084fb163059d5b9941625..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3678 zcmc&%XIPV2(@yXqJ_vCWkd8|V3L-U#vKB}}D3+y&3L+&mQ6XgMRfI@i7J?Mf2qM8w zQvw~T4zdzsK@A`hsIX`C3%v>|q%zd9^8!HR=4y7Fs z2n2rIl5|>h(?rq-!bGP{-?}^mvQzCiiEt*&MUeNaWuCoKYbyz(>6m9$(e8c_&A2%J ze7I`Z&(X56>VXZl=!}A<+WD-aSgSt)FWSWu8IOZ{c=2Pcg*F7f`SV^4aeeutg{uqfg>d6&| zK&(oVI4DLyfu3Wbl6n|A%pAZqB;jFM;wyjR)kFgOk!}K~P$>1rSKo6Ymld3!Lj;FkIl#YA3bjU7J52S~Eoo-!R zTy0tp5EUnT_L)cP)$!f?TB~SqIgkc7A>AyL0$A{b#6*Lp zW8sTx-|mj|_F@)#Lhx>`o-3s`?do^fA$Fy9c6I??)A~A+0J?Out8X3{=jI(zM1N(B z_Vs14(`_wwEAnda3yp6X_~{Hv{L52_e5mpoGG8x@c5FzdXb?KCa(% zHjemGkaZ1j97~D&$2d|El$4ajZMWU}R2#FuB5bKbcj_tMi|kuiRdsG2`&>&~`^|bu ziMBaxn-K!oW>t8UbAb_Q)k)Fml26@ z8lrW6`pS2%xW>}A`&|XCN=|`t_wM-!zpgKHy;FZ%{0t8_F)`5{;Bu|XPE8l*#^7C; zGI2nyN&!tCV9Dw%XZP!)qzjf~4m(i*?QM%vFVn%;Tc=ba!7oGTU1%_o+;=6aNFLCL zPi6XTVpU^Y#D}EoIx+bdoXoU!LqkKSs;jE@+AsaQ*piHz^r2Q%o|O`t)+_u&lnO6$ zaCle-OYVfqHAZZ&ZM}WmJTB@M8eAP3_N8oxxv>|jHGA;~d)7`y zJb3tU4~Bos+;Ly0nuszrPTkoujUMMoh?Pv5(EPzh?(DhbHim1O$g93CqlP-`w_<^?VhHHZd zSF)qho`F$6WkBWLMc15kagX0MvuCnn2cd0Xhf%o+DoEMPhZrBS?vCZBOoS*Mo$U6 zP~@4ja}|8Yx5Wkt5lgrOBwgr&vwCg$3&c$c8e-tb#VesSJ!4}XV)c?$FEjNolb|kl zbMp)j$%76k@Zbi*d51d4WHK=-YwM-Xy+Ud|R}WM1$o}YuXb#J}SF&Efecki=rPhB& z)u5%gn}Sz{Y>f}vDbA_{so|BynDivjVKcP~YN1Ri$0K}K(AB$K5Oix^q~`4Iv)>)A zyL^hX#H}``7ap)q_+x%O6#_Kom=qrWn3p?oSjO=Mv;aCJcFADOxZ68v`eQ+g1d)EL zS9ekzx|hcRg>vOjl_F$iX1d?lyQpXg=8X*uu=evg7nS$Y$ipV=YRx zbX{$tXrSh9)Tn;hGxTtXNEP^5qKH*I2>m`bazZQ+uA+&D*^GO!!>cQAoeef z(e`H(-n(z-M3oPS$sYOX!wK40W#uO^+3RG-BRk}Mp)`c=6PBcO9BWg#csBt&cy>r! zf;jX8-k*j77@7hafTnE0d@K;OU$a99Gy=or@xh526v1-1zHtZ{N4C4~Oh*+7 zM#%z@SpK+I#}d)IL@f^i(1T|#%d3Hx*AF=y`9BEbpbt99-G!k5G~DD|aZ4-#uconU z2L|AVHI-g@Z~EAMbaD+sqd#Q}&Q(zn2#JWuNCQVV>U3Avuk7?d7270alMZ0L2Mbnh zW-@{rQ7=O-58SBc22ZX^u~&t7S!CR{TiP7maFJgHWn~$`vu4d7-zty)_FR%nX_ztU z_%z(1+NPbqaYa(ptPa(lB7a(pr5+B4X?ok2l`^5y_BOWebeuyp9r?32;iJ^U?}EI} z8Sk>u8_O+rpQeU-ddB1RZwIH@v;gDaFYD)@z^=z6YK?3-xEQ;Jxt5lclmxV};YKHi zg4>Vc(p_D{Eb9J(ENO{L5KnJR zA2KxbifetuOq1d}7c7r`{`8x&xw7qKU_|F|VtxJ{+EIYp#71(>xb{ zS{ZWfu=H3~c)pZR<7Rz_Xb4uZw-0!sw6wG~)+~DY|Aneqz8Bwa8hJh^C#UFre}9fs z#%0e1^iC0C{Tgs%T20*?lHM$A2@KJZJAEZ zWiT?ARkBk%V1y)}YX+4^>^cwQ_&pXIty>4eE@bsE={!URgagkDU77A0DB^dQ)oR*T zAt%a3Yh&<(Q^^P$($ZhcQWQFDbKKJT!-<(bS|4isEj!bm+P1#B8qN+035oE+d5iYn zqEg;J`>&wnH+C5-4Jz`yy>I*q_L3sqyWuJc?DU)%G>sY9c@HEQ0nBqBu^beBpQlRj ztm-O6sL9Lu;wAU>{lxghVnAr9eW{O+Pk`3~+Vu`dtXn#G;X(_Fyc0VFMifIii5$)` zeWHkwyjE~nh+#Mwyh)<#8USe5NJfdE0j0I_&FC8(%;X#6BLkCnd zjLYdC()H0Q zEQz@)=lt|`@N1iHmxP3*U11A{$KxY$tzNXh5jqc*nx6hUy_AzF)L`awq~OjKxf!;T zga4(aO%hFf{v$B)N1e~j1DnHT2B~dYpJlCIxataS37e=j75=RMp`#)`7pTmGHC!`V zI`jJQ_T3V^ga!>YjMzC7CZ(arTv-bNC`Tvh#LEMdGQ#}!2#d4F`U~t2qi>x0@r9|; zmFdP@H^xE;=LaD~LpmO`un#3=}{J$Yo;}+z_L9>Xl2rU=Uw-IvO%!*V>B-0@O E0$laj00000 diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs index 0dca2a085f..9d7c19f24d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs @@ -892,7 +892,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float eyeTelegraphGateValue = LaserShootGateValue - LaserShootTelegraphTime; if (NPC.localAI[1] > eyeTelegraphGateValue || NPC.localAI[2] > 0f || enraged) { - Texture2D glowTexture = CalamityClientConfig.Instance.EnableVanillaTextureEdits ? ExtraTextureRefs.WallOfFleshEyeGlowmask.Value : TextureAssets.Npc[NPC.type].Value; var halfSize = NPC.frame.Size() / 2; SpriteEffects spriteEffects = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; @@ -900,12 +899,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.localAI[2] > 0f ? 1f - ((NPC.localAI[2] - 1f) / TotalLasersPerBarrage) : MathHelper.Clamp((NPC.localAI[1] - eyeTelegraphGateValue) / LaserShootTelegraphTime, 0f, 1f); - Color drawColor2 = new Color(100, 0, 200, 192) * colorScale; - for (int i = 0; i < 2; i++) - { - spriteBatch.Draw(glowTexture, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, - drawColor2, NPC.rotation, halfSize, NPC.scale, spriteEffects, 0f); - } + Color drawColor2 = new Color(128, 0, 255) * colorScale; + spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, + drawColor2, NPC.rotation, halfSize, NPC.scale, spriteEffects, 0f); } } } From ed889b2d3fbd4a3ac913f618e87672b2174ef308 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Sun, 12 Jul 2026 18:22:44 -0400 Subject: [PATCH 23/35] Fixed DoG tail still taking 2x damage in FTW instead of GFB --- NPCs/DevourerofGods/DevourerofGodsTail.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 76374999e1..6da831b412 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -82,10 +82,10 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.dontCountMe = true; if (Main.zenithWorld) + { NPC.scale *= 1.5f; - - if (Main.getGoodWorld) NPC.takenDamageMultiplier = 2; + } } public override void BossHeadSlot(ref int index) From b2b08b130b6f46d4fd303e9e7907d0c8db9e111b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 13 Jul 2026 17:18:33 -0400 Subject: [PATCH 24/35] Several backlogged resprites --- Items/Weapons/Melee/ForsakenSaber.cs | 4 +- Items/Weapons/Melee/ForsakenSaber.png | Bin 1227 -> 1121 bytes Items/Weapons/Ranged/TheBallista.png | Bin 1690 -> 1121 bytes Items/Weapons/Rogue/SpearofPaleolith.png | Bin 1130 -> 989 bytes .../Mods.CalamityMod.Projectiles.Ranged.hjson | 1 + Projectiles/Melee/SandBlade.cs | 4 +- Projectiles/Melee/SandBlade.png | Bin 592 -> 623 bytes Projectiles/Ranged/BallistaGreatArrow.cs | 13 +--- Projectiles/Ranged/BallistaGreatArrow.png | Bin 902 -> 942 bytes Projectiles/Ranged/BallistaShard.cs | 61 ++++++++++++++++++ Projectiles/Ranged/BallistaShard.png | Bin 0 -> 536 bytes Projectiles/Ranged/FossilShard.cs | 18 ++++++ Projectiles/Ranged/FossilShard.png | Bin 209 -> 504 bytes Projectiles/Rogue/FossilShardThrown.cs | 15 +++++ 14 files changed, 100 insertions(+), 16 deletions(-) create mode 100644 Projectiles/Ranged/BallistaShard.cs create mode 100644 Projectiles/Ranged/BallistaShard.png diff --git a/Items/Weapons/Melee/ForsakenSaber.cs b/Items/Weapons/Melee/ForsakenSaber.cs index bc4f7501e2..8c1b78c6dc 100644 --- a/Items/Weapons/Melee/ForsakenSaber.cs +++ b/Items/Weapons/Melee/ForsakenSaber.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetDefaults() { - Item.width = 46; - Item.height = 56; + Item.width = 66; + Item.height = 74; Item.damage = 80; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 15; diff --git a/Items/Weapons/Melee/ForsakenSaber.png b/Items/Weapons/Melee/ForsakenSaber.png index 950f44264d6b5823aad2dcd1f7af5beac6054c21..50b0db511a2f218a48f96232835dd452af44bec5 100644 GIT binary patch literal 1121 zcmV-n1fKheP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1NKQoK~#8N?VCwx z6Hyq)e^I1)-H%Y*1PY^`N5hkoU#OODCC3qGqP=cgy63lK=Ocw|tWZm}EpEO=*Cc zv*rRY_T>`*Q*wt*UIO|Bzal1d#<~G$t{Va1RM%B7M*P9|Mieul@5RFa#)v=o)(A17 zeQO5*+c(dH2}}@-5enZ05s5UVBaxKmf^@S=D& zh)U!6ATGsEaw&c?``WD;o)4l@Ot_|c5&e`Y*qt_Yj1dao1(AI9lH{wG`sJedE(o{y zE{K8tBm@0Pn(Ibrt{dU?Pz|q#YV=`w_$~;y_&$i9M4X;PoW2(i19mG0lOYJF_%4W2 zca(zff^duNJ>wPh&XjbdZr=Y0z`Z-Y01OVkDfnHD5sHE-c>(?Tg>^Xv2t`S$RT90@cIXD^=ZGhd??M?S2*wD7tMuHU8xRbJ ztS|GB-$BZ%Am|2+kBrcvVgF39oEh{ERJE@EmBJXI$W~cai)-;POd=Bm nV}v5F+WJ1iZ>xhH#t6l4e&BKt_t7jM00000NkvXXu0mjfYVq?r literal 1227 zcmV;+1T_1JP)Px(g-Jv~RA_Qo67eH@gnjz zKx?Ggf-3Rl>!C<*+5VrB^8jS>?T&3709?Fq5rBOM?gn6J@U#t8;_gz?eLeEXkEPG&M|MukvBynHTJYsBr&N1g%T z>sQ_bptZf(xK6!YDVnG}OMKZopd#YN64%nvY5^=J#hYhmmyGcr-|s4WzXy&=Ht6)W zW`WLJMccZft{viTUM5fc-D3v;IQYh=#^9-^>w(hfp?c~aSwWkc<-Ga11OPp|c9uO~ zH8gk{fM8uZ{=i0H%JJ0pPhq_m&+W`1~?Z zSP7jZo!)hhfAXuK>)aE&(1VZg{t|CS#m%*Vc^yymj(fqhCF)dhO(x z(RO-U<8`HRm3q1oX_fbhYdm(-p`&|^wvzXcN;dbxDKk)ME~2XRON__lKF#3<3t%oT zxr>vu%Dcq-ws!+?{!+pQc%nlHwci;rPSkj<(&)jNC;dsS z>NZIIJ9S0IE09)sm$=69wxD=(I&IeUoI0{aas_rfs;+tR{l|6~-I{kh3D;OP7C_d{ z8vSmhRo*48AC$aPzWjH~k+Y$YZ>xsB`J?Q0PV#pgmUp7BOT0WI3om1HKd*e&tOeq# zBJzgUwf^zpTPcGO1d-`q%O7msi$!LzD>TRpD0HV_=;~m-ExT)mX zaFcr6AY(7ecTv)+N`!;8>n(uvRoUf7r}dvm^Dg65?Gq!vB}NOI$x_<$riY>KV)3 p`>mEdOT476;#SYNQRG?Te*wDLq464$!002ovPDHLkV1hbxX!ZaA diff --git a/Items/Weapons/Ranged/TheBallista.png b/Items/Weapons/Ranged/TheBallista.png index 5ab9abf9efab06268db304d80fc82623cfc6a69c..2857b1f82e9b724c679cc4617778626afc3a2800 100644 GIT binary patch literal 1121 zcmV-n1fKheP)Px(8%ab#RA_7+Cop~MNa21RHWQ^tiw?8b$(V9iR~MHxsp z?LyR&6auA?h2loUZgk@&EnTEtq^oWesi1+`DXAf$8ABH_kxn~;PAxna=lv${-8j>L z^O|>G{cUF6d-n}LL_OWhd`_T0Dwzlc0F3X15ZK}w5@Zap>*gz0L|uF zwh6R-;Qn2U|LY%H6qJTu2B5w)7my%{^bnBV`@}v=L-wiMFkMUL52TNP`dWSe-OWAr zAfcR)J_3?RlnxO9l!ht*3=Xaa0L#m_dO{+-1SHodG*XUM^F8s2^b>G(;K&XDihaHD z34aJgazPNiU+jApfJS32mNRB1ExR6_=$=FTA>gXfSc3=wWzYUUe+U4Mj9Ydcxi;1{ zTKprRK2`;Fudxad61$6LljapS<_qDQt$+PJ{|I!FNPKnOvZtzQD8$;i(UBbjmFI2) z(5jm+{PLg@KA8hxq@0gM#|)DJnINz?zX-q==LZ0&oPH*JVm?tGxCg+=V?~HWhiXrM z3CJ?Vy)2h6NV5F3qgF?}ej=iiXvRQvtv+-i|$=<1YZF8PDjvK>D@tB>=CE z+2_IiPXqAo2Vt^U=>ER{1YT&K0^r99^MUOzmI2tk@M+j$yzBe^6L5XtKetD_1kHs#9socj+GT9)rykV2eMlaEVlN> z?l1o4wzP^!#Qd)b<^AgG%jc~UQg!TB#qPDc2jw4ub~PLh^~1-l@|mAf3nSvr4K*H| zyAt1x^N)b~&h>@LX`2^l9#9@wiM{vDE#(H=m-K&y#Px;wDMdqn_&nbJ@JnX_xH>%u zz$I^2NIFSX@a#pqc70-fE@}Gun$4K9LqItpU$T=JS}nWLh-bsmYBRQf;6DMa3rO#b zEJMWGbrM5zcTW5xpuFx%S+BOV7Q6qb^9TMBkkt3GyuM`n0-e0Qll&o|zJHYE(q?zn z{UIP}Rs75a8|i*(X8rtt`d)j(!^hR3XeT$a0-E nPg+|}V8b{dt=IDzkAi;ys;S2S1!ydj00000NkvXXu0mjfW@aS? literal 1690 zcmV;L24(q)P)Px*R7pfZRA_tvB-68Y0ZQJrB07p*Nx&Y;AgGRrNo)P){LQfG8`A2LdK7&}hQBj`fH~_vjb9|;J z#{uZ?>H(l)?OXuPUT6eh_lt`FXt^Z2`MFi|jdgDi&Cs_7)A5iL3<9vHGH47OJe?V0 zPPDjc20{$#EGj9$6&9|C?$S%(Fn!Enp1+ptY zsS>B=>*g+FeBmsQ1MpX?e7>W%b<77$3I+kVKiCg|zdry#_wb;>Y+iak038Ez?kTeh zWmr-3$8}k+MHmbY2ON17jgQBiBHy!7c}&W5D!o zE>vFyA`Jd`;v4|QWjV&WDNbt4@3CPsoA3-e@dl2)ASZuGQHBff#bwdZ=QoB728)Zu z0{H#+T!?5>cX?fd?CMk})d5J)5CCiV}HTsOuOp24^p z%zRX|)c1F@(S}B2p4wu)%N+eM8-Vi7uK;lS`(ps?dPgD=oT&z&J}@+)2TXnj3s;C1 zmB}cmeqD%;ObCN}*B$_1*S;r!2(zl;{25sefa|1>`G5(}VBB5o`VWWSM$dJM-vSJO z&hScXE$V%G`|(khB&PRbBjFjGbc{L%9Dv+3(bC1v_7J1OpvHFAmi9XURlb2qE&jh? z&;{rm5@u9`s=YmxGHLtqftVijct~CbZ4099c(*Z)E6(2_+B>>mY_Oh#mqSsqsB=)( z%U^7)Gj(jSGIsaU??ALI4#Uut?$)ClqIOw(bpzq`T!_xqNoUgEi^JJY z_1iYCF94$Q#evxXbQVaA+O`y$ao@OgjnO|6$`@-bgI0q?^2H@azF3ib`QquCg@?p+ z-OR%xyo*QIZV7W*!w_YAfrvl%!E0t@KzFOHJ-g~->eO!8RUeAfnSBnxxwc+oJU2&b zR6DzRT!5M%-T+2dx9M)SwYlTHQ$~AA)DOn=%Wijsi8IE7-D+Fqx9KiasK%6;GE0-% z-!qcp!04)C8;Q@LUG*^@v}(5`b=c_t_EZf3i;J|5Iz#(i7+uSnog&r5NneRRp?g6z k{;gX6c~+!Vk?;)u13EsP!o&Hw-a07*qoM6N<$g2jb7eEYAX9X8WNB|8RBvx=!KdMT000AM zNkln=@QA(|O$a{u{xWh35y~x%bW) z1L1I(RIILYMa04b3gMJ;5CX7qdl>*-PhJ2Dk$Mo-MfqWX1GVb_*jBR$fW}j8fI_4W zgaDKmW&^Nb{xkrl217s!jYi5t2tdu2MF50WRsc}Gc9Qe@)=L1iKJ5&ELiiWL-W0QP zLJ_a`z3&F#_KgPsoWJ{AA;3ov)uodo7O*@!4S*S0MS#0GO4r)n0`5pi3SsgMMD330 z06e-s1VHJg-GDn9vPstMYXRJmkQBm{v=9Ptp~1OPYPvW8z_Ow>fP2Fv5LcS60?`1H zLYNX3V*S$eh(GMk%i+M^zrS)W2tda(XB1>4>`l^ZbF@sGSKwWAh*Y>vA&y zIDBLl;Esg7IZBOZE&~dYybuB~XQp$xlN+Q}6_WudEp&bgfISNTx=Bh3VME9kj6%-rbYNrvNg+%L17Tk-y+)(?`d0uB?A;GUZ;qoK1v`Z> z#T~+H6eL-=7YIKVM!bKd%cNHdVTv1s4Im5qH24c}M?)T}j-LJqxR2ZN{??A6F)iFq zAxv?HkcX!|$9sY3hpRg+!vHkYI{@}*D1=`iGBf9e0bbvAZjIY-egWKvD;W)Y6zmkj zl(Y~6Fn>WF0Qu<;0e4fB%#36!ZcwJ$pRoLglXI% zCffU>(*K!QVilZRy|%c4#EFR00000 LNkvXXu0mjf-K(S_ literal 1130 zcmV-w1eN=VP)Px(BuPX;RA_1>m(-n53uQ? zOQSJqj4q5j6OD0G6BAc7ZL}taDly`!N)ct~55d?`N2sOFt&m_8Tx9mYGnDKqUr z$<2IMZ|*(!yf^PN=iGD8DDJZY{@Odv#}d~JyWVy`0E43m$IHGbpAWYc@L10)Rix^#g0k42~uM3kj)wJN#b^IRM9>Zvo)!z_?*2geK4b?&)V} zSQB{by^t~f^rIgE(A1Jt0R7+30;&DVIzpSa554eAE3lT7#Eg&#(`A3lSldiHu}5k&qdj4tw6mK0>cGsXiuD*%`b>wTstqzR;FF(DH=6$hZRc3Ajw01b@|0DS%VcR-5J$DtKt-M%9)1MuyuA9(sbf9;m`pNM$QXOew{=CUNz zSgi>p-LrmtLGKenAo^PrND=Be`h+nqk{B85?)Mx&v`6nd7q4fx@1)B^?Ue}Pms8z0qm`s7u!zm}f$ z(j}cv^4uG=j*tpg>6$8hW5&}!2;rW8q-GOIY?PJi?By%g(BpCMf7oz|Y*d%YIzky^ zC{yf+gv`$BN(C@GH?JpdtyUg+@0({M>jc z1&x8~N_`IbDjIhn)ic=YWJJ~x@^!T8L^m?N;sDIemjdwFOWGiGN|ULtuTcO~Q-1?n zkBrDVLaMhe=m4C2X9tiv>-W7fW*DA1J+Qh43WPRIz6&?5yO)}fbYae%j^C$8x;I%z wNCo`0MpgWH)gAzR<#7e6{#d#SF|Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0t87!K~z{r)z;r@ z&rux5@yFD1VVTMLrde6EHs*?nq$JuM7p@eNqKON3<5zQGh26}JqLkE>D;F;1g2G=g zLyJZ;e4ET_cS~OvU+?;UkMGCq%4g53^Es!^r}y)m)B9Ct9=bN|ETwZW^JA*&dt%~k zUDd<_S&~ltFEXnL6Ic6>rb|`4nOq5m?+$^*84 zYunmE`-YAD#Y|IEp#%*LP1Lwk`8Cqo+EIejeb>Ovp$k>(v$NBnWlh;cq0q)Zm^pv> zwn}2(Fq2;+L6}L;GDy!nXk5`u4O2lF>umWBE)LvdQ5eZ$*ZTSrJRRK%zCQj~wZ8qt zXVB2RgBoV`?_EuWiB}`f7s(w-Nlh4e0lKza0v(ovL;Zu`?422K^4vpe+=(y|sNZI$RCG~^-&|Sg{jCNX;)73O=>28MuISt zo_XYt`OE}qVq5&ZCW|aHQE?VoCW6IlBqiPx%3Q0skR7i=%)yeI*)b4x*dcwr_sKhl=Jj{Zj_qsE1k`#}4l`q;$57vrFRU?lhg zElt%4Fq-LaMwT<8L~BDM7@PhYyy-^5#=~{N#COjpz@-}xKxNJD1iT*q9OTU}O(T~? zWkpp%U{7TsNX>_Yr#tq8?u+d~enfWm>cAhh$p=x?I9A;ZR#M-0q>Az)Fgv#tdmo%k eZH=vyGooMc=b=p3SLyEn0000 "Projectiles.Ranged"; - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 10; - ProjectileID.Sets.TrailingMode[Type] = 1; - } public override void SetDefaults() { @@ -43,16 +38,10 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 2; i++) // Burst into 2 shards upwards { Vector2 baseVelocity = Vector2.UnitY * -12f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Top, baseVelocity.RotatedByRandom(MathHelper.Pi * 0.1f), ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack * 0.25f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Top, baseVelocity.RotatedByRandom(MathHelper.Pi * 0.1f), ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack * 0.25f, Projectile.owner); } } public override void OnKill(int timeLeft) => SoundEngine.PlaySound(SoundID.Item14, Projectile.position); - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); - return false; - } } } diff --git a/Projectiles/Ranged/BallistaGreatArrow.png b/Projectiles/Ranged/BallistaGreatArrow.png index 2883016d90022296e34a5fb18d29e444cdcb47e7..a359a261e96de9c934c03bfeb12e6e1b9dd2c751 100644 GIT binary patch delta 933 zcmV;W16urs2d)Q@7k^v`1^@s6W1Qtn00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D14BtfK~z{r?U+qSR8bg)A4M^g$ytm^YGdIK zfh`Qd6kP;CNF|g%LHS^KRsxbMAK@-|q+RKn(e+iVR;>k)f~aO4Jv&s|0;PBowuc zX94JF>j1z%zGV51ZA38xl~*KEUJ>(H>_A)9hX1$jklO%gXsQFiljQ{pcM8!<7J(%`XGs zA0INEwvj06yk5zYrRw_q01Q0+0>IShBmf`ACcuW|1i zBB|uMlciv)WRXrH*=xvLKiA_ou#+fZvuuf^nuSE)mw(=~jc7w4=`rc8x%p-0=9dXC z1PLz$qx(~%lTrV$3bb8qTG_#mg8-ztMgcHVPlH7k{V#{X5hA^wQrGLG^4MDddfNAb z1&Qsww&~0+D=q@S*IN%j-}P5uK_YUF$mQ}F0FSS#=TogW0H`m%1;FcBH83KP@LwVt zXj4Q&Qh#?up>^HN0N~Q?MF9FoRvjj)ElDu|x_hz#Xl_yybNJf<0800K#%f>4oFfvw znQ{T(c6$I=S_%Vjyf9)u<{*)-qxs1Oz_b2+0Myie1>oKEn&msr6G?^Z9_bY=a-Jye zQB*MlrMojocdO3-lVS$is&-x=%M1{&BeVX)K!5SdjtAO;;(=mo=LNEyc9>@N%xWG0 zc_}mSPiD5v>ZwP&062F!1i+JyOaKbc{{)NK?HrMK<7-R@prU#=07C;m0Jzut9W1s$S3$T+YNzaztB=SZs{`RbUB-yi#Xj6|Q8=p{JFXVc5 zo%cvc`e{wT)PwR&K=qiAIp>j(MQ>i0>>lg$M>;}0w2kN&J-c6kW-*vB00000NkvXX Hu0mjfn8~ia delta 892 zcmV-?1B3jo2Zjfb7k@wq1^@s67lPx&KuJVFR9JUHsoI4v3c3+oD2j-PD+N)pBIrs)#EmXoRw%v} zz7QV>l~zlAAgv3O=EpE$#pR~iF11+3X`+BIdjg;{eL)T=HCCtMILJmN9CuL zxw-&u_dj#YFUq&j|C%Qs$@Hmi0D51iG#^ylPF6S~vEJ7y3*g-GasamN|Ekr>ZpMhR zt4nPn!88D|!6FObR`*r_R?a;yaaSe|23;Yv++?f)ST0~asz7RbF>My0l4&TNL$Dp(ZZS<0DAfo7C_t4CID*cCj;=R{Vf3ZI^F=VtWKS==7ZM( zm{I97ynnN!e$|$fhu3NWJ3&6%d*muci9G9?W@`k}mCf51ITGfJo3BwUIR=2;Yi4K( zLLmF<^tB!UBA$@~5l!|@1R$PvTTTge^Jf9j@%V){?k`HY)HQ9E$P-VCHXNnI90?^) z=DkgPFiiAict9KYLkj>%Y&9JZdgMG z$CLmtIPw$7sgk98^cn?d SZTeII00007kDR diff --git a/Projectiles/Ranged/BallistaShard.cs b/Projectiles/Ranged/BallistaShard.cs new file mode 100644 index 0000000000..8032d79a8f --- /dev/null +++ b/Projectiles/Ranged/BallistaShard.cs @@ -0,0 +1,61 @@ +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Ranged +{ + public class BallistaShard : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 3; + } + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.penetrate = 1; + Projectile.aiStyle = ProjAIStyleID.Arrow; + Projectile.timeLeft = 120; + AIType = ProjectileID.WoodenArrowFriendly; + } + + public override void AI() + { + if (Projectile.timeLeft == 120) + Projectile.frame = Main.rand.Next(3); + + if (Projectile.velocity.Y <= -2f) + Projectile.velocity.Y = -2f; + Projectile.velocity.Y += 0.025f; + Projectile.rotation += Projectile.velocity.Y; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 60); + } + + public override void OnKill(int timeLeft) + { + for (int i = 0; i <= 2; i++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Sand, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } + } +} diff --git a/Projectiles/Ranged/BallistaShard.png b/Projectiles/Ranged/BallistaShard.png new file mode 100644 index 0000000000000000000000000000000000000000..aba2ba5a1008ec753d785d9685179606f2c7bbd2 GIT binary patch literal 536 zcmV+z0_XjSP)Px$(n&-?R7i>Cmc2^@K@i1%5i4yh1i^%8B}f8MA)+YOf>?PHY(%WBlGZ;#t?UE~ zJ4w1IXe)k^LQ^CNRwg9cq)3z2v&fCf?Oi@Jdnxo)cYDjcce68Z2Rb0J8Zr~BA+y!@ zfldKBVXz%Dz{XAtfI{iW1W4tozWyi>EH1U@=vjeJT`mvbeRFbu=YJ> z^R@u`6ckEjXmj3>aqY;S6*ypoM@*^4ZlGU5-{I&+6{;V~Y3c7q$-G1s=7WL3}@Mdl%-9N)XsmuSIla*<1*-cl z%+!>1cl>2fRK2iKFLv~tgO&lJ5kJw0|Mvm9g`*qABV&6j00i$otuOUnQFEbxLJ>E9 zu$aZ6T0wsf "Projectiles.Ranged"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 5; + } public override void SetDefaults() { Projectile.width = 10; @@ -21,6 +28,9 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + if (Projectile.timeLeft == 120) + Projectile.frame = Main.rand.Next(5); + if (Projectile.ai[1] != 1f) { if (Projectile.velocity.Y <= -2f) @@ -42,5 +52,13 @@ namespace CalamityMod.Projectiles.Ranged Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Sand, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); } } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } } } diff --git a/Projectiles/Ranged/FossilShard.png b/Projectiles/Ranged/FossilShard.png index 9af9080d48fe546f9dd10cb4f96a663b1031eb6d..cb51af825020fe5b94ff0476164bf3df4d759e9e 100644 GIT binary patch literal 504 zcmVYAX9X8WNB|8RBvx=!KdMT0004l zNkl!y)Oh&6i3e}6x)bIBH6@R&58n{TG@?g6e@*}L_%m33L1ZhhE7E!q7Wj{ zpplJb3z4Ak(IMG}M6{Yw$PMqB+1>YMBH3RzlY3rX?mP45dcN;dDN94$M#1Xotq0)6 z21;RjTN418{w@F>ukHX?-a3m39PjP)0cPh00cc6402s(Md@ne?6TDStP_{U=FbTk0 z`5AzdgOUMAqJz3Q5)H%;)|&W0Er8_dbLWj`d^$RTBa9 zvk2i1>a9wW&5Z;lv^mzGZR#2PKUW199?cp+*rnwTigF@%qBUgz>5c>d+iUv(T->}y z1hsOanlwk6QhxsgVE6hV*i~!LHuVgy%;b$1TDAB<{hO16FYFxyP%M>=1>C_}m0O%& z2Yw0Q42CHu(W?Dvjx%VRdIZC+MH%|y2SsifGev;&!y}-=h3pK5Nq$+p2Virf00bx( u8O&vqz|Ut?RXJx+4-dLfCpu^wXYdO%nA`@kuHTjb0000#0gW_Y?dhDc0JzVcW+F#!lJT%VK# zqIXohy;;wu)4(}f!R$a%^6EnefS};Xhq?cGfZ*@fIt?x^Y4eF0N@td=wJr)&N%OUF zSSEdu^_9?cLjxd~Q~PgPBM>-xHO-%BBb+Z=-;p#)fn8denVI?UW^sAXV&%nh`#HRP uUSxY38UZ!L?D^IM((v%oaq}fJIT#i$RsFABa?BX$Mg~t;KbLh*2~7azVoTou diff --git a/Projectiles/Rogue/FossilShardThrown.cs b/Projectiles/Rogue/FossilShardThrown.cs index 7ba53c3140..adfd05797a 100644 --- a/Projectiles/Rogue/FossilShardThrown.cs +++ b/Projectiles/Rogue/FossilShardThrown.cs @@ -1,7 +1,9 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -11,6 +13,10 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Projectiles/Ranged/FossilShard"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 5; + } public override void SetDefaults() { Projectile.width = 10; @@ -31,6 +37,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.originalDamage = SpearofPaleolith.ShardBaseDamage; Projectile.ContinuouslyUpdateDamageStats = true; + Projectile.frame = Main.rand.Next(5); } Projectile.velocity.X *= 0.975f; @@ -59,5 +66,13 @@ namespace CalamityMod.Projectiles.Rogue { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Sand, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Rectangle frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } } } From 4ec0257d6f9af8aaf886bd84573a496149af5f4b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 12:48:48 -0400 Subject: [PATCH 25/35] A broken Crags Pylon naturally generates Breaking it gives the standard functional Crags Pylon Rubblemaker can be used to place the broken Pylon Removed Crags Pylon crafting recipe --- Items/Placeables/Pylons/CragsPylon.cs | 10 -------- Tiles/Pylons/CragsPylonBrokenTile.cs | 35 +++++++++++++++++++++++++++ World/BrimstoneCrag.cs | 19 +++++++++++++++ 3 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 Tiles/Pylons/CragsPylonBrokenTile.cs diff --git a/Items/Placeables/Pylons/CragsPylon.cs b/Items/Placeables/Pylons/CragsPylon.cs index 43631e2f86..ffa871b73e 100644 --- a/Items/Placeables/Pylons/CragsPylon.cs +++ b/Items/Placeables/Pylons/CragsPylon.cs @@ -16,15 +16,5 @@ namespace CalamityMod.Items.Placeables.Pylons Item.value = Item.sellPrice(gold: 2); Item.rare = ItemRarityID.Blue; } - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(15). - AddIngredient(10). - AddIngredient(ItemID.Hellstone, 15). - AddTile(TileID.Anvils). - Register(); - } } } diff --git a/Tiles/Pylons/CragsPylonBrokenTile.cs b/Tiles/Pylons/CragsPylonBrokenTile.cs new file mode 100644 index 0000000000..71e0ce16e8 --- /dev/null +++ b/Tiles/Pylons/CragsPylonBrokenTile.cs @@ -0,0 +1,35 @@ +using CalamityMod.Items.Placeables.Pylons; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Pylons +{ + public class CragsPylonBrokenTile : ModTile + { + public override string Texture => "CalamityMod/Tiles/Pylons/CragsPylonTile"; + + public override void SetStaticDefaults() + { + Main.tileLavaDeath[Type] = false; + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + + RegisterItemDrop(ModContent.ItemType()); + FlexibleTileWand.RubblePlacementLarge.AddVariations(ModContent.ItemType(), Type, 0); + + AddMapEntry(Color.OrangeRed, CalamityUtils.GetItemName(ModContent.ItemType())); + TileID.Sets.PreventsSandfall[Type] = true; + } + public override bool CreateDust(int i, int j, ref int type) => false; + } +} diff --git a/World/BrimstoneCrag.cs b/World/BrimstoneCrag.cs index 611b17cbc0..e6ee1c499b 100644 --- a/World/BrimstoneCrag.cs +++ b/World/BrimstoneCrag.cs @@ -6,6 +6,7 @@ using CalamityMod.Tiles.Crags.Lily; using CalamityMod.Tiles.Crags.Spike; using CalamityMod.Tiles.Crags.Tree; using CalamityMod.Tiles.Ores; +using CalamityMod.Tiles.Pylons; using CalamityMod.Walls.UnsafeWalls; using Microsoft.Xna.Framework; using Terraria; @@ -266,6 +267,24 @@ namespace CalamityMod.World SchematicManager.PlaceSchematic>(SchematicManager.CragRuinKey2, new Point(biomeEdge - 150 + house4Offset, Main.maxTilesY - 125), SchematicAnchor.BottomCenter, ref place); + //place the broken Crags Pylon + Point pylonPlace = new Point(GenVars.dungeonSide == 1 ? (biomeStart + biomeMiddle) / 2 : (biomeMiddle + biomeEdge) / 2, Main.maxTilesY - 150); + while (!Main.tile[pylonPlace].HasTile && pylonPlace.Y < Main.maxTilesY - 75) + pylonPlace.Y++; + //make sure there's space to place it + for (int i = pylonPlace.X - 1; i <= pylonPlace.X + 1; i++) + { + for (int j = pylonPlace.Y - 4; j <= pylonPlace.Y; j++) + { + Tile t = Main.tile[i, j]; + if (j == pylonPlace.Y) + t.ResetToType(Main.tile[pylonPlace].TileType); + else + WorldGen.KillTile(i, j); + } + } + WorldGen.PlaceObject(pylonPlace.X, pylonPlace.Y - 1, ModContent.TileType()); + //lava clean up again for (int x = biomeStart; x <= biomeEdge; x++) { From 5161d35052b13440920af029677649e30405beb2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 13:01:42 -0400 Subject: [PATCH 26/35] Arms Dealer sells Revolver, but no longer sells Boomstick --- NPCs/CalamityGlobalTownNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 9911710c7f..18ca4435e9 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1351,7 +1351,7 @@ namespace CalamityMod.NPCs { shop.Add(Condition.DownedSkeletron) .Add(Condition.Hardmode) - .AddWithCustomValue(ItemID.Boomstick, Item.buyPrice(gold: 25), Condition.DownedQueenBee) + .AddWithCustomValue(ItemID.Revolver, Item.buyPrice(gold: 35), Condition.Hardmode) .AddWithCustomValue(ItemID.Uzi, Item.buyPrice(gold: 50), Condition.DownedPlantera); } From dd90bf3d8104b3749ddc41609ee5adf9d3a022f6 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 13:32:54 -0400 Subject: [PATCH 27/35] Adjusted sell price of tools to align with vanilla --- Items/Tools/AbyssalWarhammer.cs | 2 +- Items/Tools/AcidwoodHammer.cs | 3 ++- Items/Tools/AerialHamaxe.cs | 2 +- Items/Tools/AstralHamaxe.cs | 2 +- Items/Tools/AstralPickaxe.cs | 2 +- Items/Tools/BeastialPickaxe.cs | 2 +- Items/Tools/BerserkerWaraxe.cs | 2 +- Items/Tools/BlossomPickaxe.cs | 2 +- Items/Tools/DriftwoodHammer.cs | 2 +- Items/Tools/Gelpick.cs | 2 +- Items/Tools/GenesisPickaxe.cs | 2 +- Items/Tools/GreatbayPickaxe.cs | 3 ++- Items/Tools/MarniteDeconstructor.cs | 2 +- Items/Tools/MarniteObliterator.cs | 2 +- Items/Tools/MonolithHammer.cs | 2 +- Items/Tools/ReefclawHamaxe.cs | 3 ++- Items/Tools/SeismicHampick.cs | 2 +- Items/Tools/ShardlightPickaxe.cs | 2 +- Items/Tools/SkyfringePickaxe.cs | 2 +- Items/Tools/TectonicTruncator.cs | 2 +- Items/Tools/WulfrumDrill.cs | 2 +- 21 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Items/Tools/AbyssalWarhammer.cs b/Items/Tools/AbyssalWarhammer.cs index 9339432c58..678cc439c1 100644 --- a/Items/Tools/AbyssalWarhammer.cs +++ b/Items/Tools/AbyssalWarhammer.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.value = Item.sellPrice(gold: 3); Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/AcidwoodHammer.cs b/Items/Tools/AcidwoodHammer.cs index 4bd66b4d49..e658cafe7d 100644 --- a/Items/Tools/AcidwoodHammer.cs +++ b/Items/Tools/AcidwoodHammer.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.FurnitureAcidwood; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,7 +21,7 @@ namespace CalamityMod.Items.Tools Item.height = 40; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityWhiteBuyPrice; + Item.value = Item.sellPrice(copper: 10); Item.rare = ItemRarityID.White; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/AerialHamaxe.cs b/Items/Tools/AerialHamaxe.cs index 844958f74b..c3ae9180cc 100644 --- a/Items/Tools/AerialHamaxe.cs +++ b/Items/Tools/AerialHamaxe.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; + Item.value = Item.sellPrice(silver: 60); Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/AstralHamaxe.cs b/Items/Tools/AstralHamaxe.cs index 0caf445b78..67e8841a37 100644 --- a/Items/Tools/AstralHamaxe.cs +++ b/Items/Tools/AstralHamaxe.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityCyanBuyPrice; + Item.value = Item.sellPrice(gold: 4, silver: 50); Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/AstralPickaxe.cs b/Items/Tools/AstralPickaxe.cs index a0fc904380..057b95af8e 100644 --- a/Items/Tools/AstralPickaxe.cs +++ b/Items/Tools/AstralPickaxe.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityCyanBuyPrice; + Item.value = Item.sellPrice(gold: 6); Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/BeastialPickaxe.cs b/Items/Tools/BeastialPickaxe.cs index 9269689fc5..79ca39fa45 100644 --- a/Items/Tools/BeastialPickaxe.cs +++ b/Items/Tools/BeastialPickaxe.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; + Item.value = Item.sellPrice(gold: 4, silver: 35); Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/BerserkerWaraxe.cs b/Items/Tools/BerserkerWaraxe.cs index 9f08128517..fc796fc844 100644 --- a/Items/Tools/BerserkerWaraxe.cs +++ b/Items/Tools/BerserkerWaraxe.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; + Item.value = Item.sellPrice(gold: 4, silver: 35); Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 3af6f63a84..6735a14072 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.value = Item.sellPrice(gold: 10); Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.rare = ModContent.RarityType(); diff --git a/Items/Tools/DriftwoodHammer.cs b/Items/Tools/DriftwoodHammer.cs index 4db3883330..068c0cb4c4 100644 --- a/Items/Tools/DriftwoodHammer.cs +++ b/Items/Tools/DriftwoodHammer.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Tools Item.height = 42; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityWhiteBuyPrice; + Item.value = Item.sellPrice(copper: 10); Item.rare = ItemRarityID.White; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/Gelpick.cs b/Items/Tools/Gelpick.cs index fc35ce49da..3a49cb39c4 100644 --- a/Items/Tools/Gelpick.cs +++ b/Items/Tools/Gelpick.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; + Item.value = Item.sellPrice(silver: 90); Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/GenesisPickaxe.cs b/Items/Tools/GenesisPickaxe.cs index 444ac16aac..6672362d5d 100644 --- a/Items/Tools/GenesisPickaxe.cs +++ b/Items/Tools/GenesisPickaxe.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityRedBuyPrice; + Item.value = Item.sellPrice(gold: 7); Item.rare = ItemRarityID.Red; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/GreatbayPickaxe.cs b/Items/Tools/GreatbayPickaxe.cs index ca95c84031..bd7f066dfb 100644 --- a/Items/Tools/GreatbayPickaxe.cs +++ b/Items/Tools/GreatbayPickaxe.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,7 +21,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.value = Item.sellPrice(silver: 30); Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/MarniteDeconstructor.cs b/Items/Tools/MarniteDeconstructor.cs index 25f1c986f9..38d4bc78d6 100644 --- a/Items/Tools/MarniteDeconstructor.cs +++ b/Items/Tools/MarniteDeconstructor.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Tools Item.noMelee = true; Item.noUseGraphic = true; - Item.value = CalamityGlobalItem.RarityBlueBuyPrice; + Item.value = Item.sellPrice(silver: 30); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Tools/MarniteObliterator.cs b/Items/Tools/MarniteObliterator.cs index 4e8ffccdb8..3ee7960dd3 100644 --- a/Items/Tools/MarniteObliterator.cs +++ b/Items/Tools/MarniteObliterator.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Tools Item.noMelee = true; Item.noUseGraphic = true; - Item.value = CalamityGlobalItem.RarityBlueBuyPrice; + Item.value = Item.sellPrice(silver: 30); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Tools/MonolithHammer.cs b/Items/Tools/MonolithHammer.cs index 0280dc5695..1f8cca426d 100644 --- a/Items/Tools/MonolithHammer.cs +++ b/Items/Tools/MonolithHammer.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools Item.height = 44; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; + Item.value = Item.sellPrice(silver: 75); Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/ReefclawHamaxe.cs b/Items/Tools/ReefclawHamaxe.cs index 366d49d15d..d896019c96 100644 --- a/Items/Tools/ReefclawHamaxe.cs +++ b/Items/Tools/ReefclawHamaxe.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,7 +22,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.value = Item.sellPrice(silver: 30); Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/SeismicHampick.cs b/Items/Tools/SeismicHampick.cs index 626b208649..2c2afae96a 100644 --- a/Items/Tools/SeismicHampick.cs +++ b/Items/Tools/SeismicHampick.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.value = Item.sellPrice(gold: 4, silver: 35); Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/ShardlightPickaxe.cs b/Items/Tools/ShardlightPickaxe.cs index 019d52c300..07cf62c106 100644 --- a/Items/Tools/ShardlightPickaxe.cs +++ b/Items/Tools/ShardlightPickaxe.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.value = Item.sellPrice(gold: 3); Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/SkyfringePickaxe.cs b/Items/Tools/SkyfringePickaxe.cs index f92338d42d..6075a10ee8 100644 --- a/Items/Tools/SkyfringePickaxe.cs +++ b/Items/Tools/SkyfringePickaxe.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; + Item.value = Item.sellPrice(silver: 60); Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/TectonicTruncator.cs b/Items/Tools/TectonicTruncator.cs index 8e56a87c84..bd96781b42 100644 --- a/Items/Tools/TectonicTruncator.cs +++ b/Items/Tools/TectonicTruncator.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; - Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.value = Item.sellPrice(gold: 4, silver: 35); Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Tools/WulfrumDrill.cs b/Items/Tools/WulfrumDrill.cs index a7e47e03ea..62114d39e4 100644 --- a/Items/Tools/WulfrumDrill.cs +++ b/Items/Tools/WulfrumDrill.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Tools Item.noMelee = true; Item.noUseGraphic = true; - Item.value = CalamityGlobalItem.RarityBlueBuyPrice; + Item.value = Item.sellPrice(silver: 5); Item.rare = ItemRarityID.Blue; } From eea99847b0892905a0df40d6a782c4800e2cd140 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 14:07:34 -0400 Subject: [PATCH 28/35] Oops make sure there's actually a tile there if it hits the too low failsafe --- World/BrimstoneCrag.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/World/BrimstoneCrag.cs b/World/BrimstoneCrag.cs index e6ee1c499b..314132b000 100644 --- a/World/BrimstoneCrag.cs +++ b/World/BrimstoneCrag.cs @@ -271,6 +271,8 @@ namespace CalamityMod.World Point pylonPlace = new Point(GenVars.dungeonSide == 1 ? (biomeStart + biomeMiddle) / 2 : (biomeMiddle + biomeEdge) / 2, Main.maxTilesY - 150); while (!Main.tile[pylonPlace].HasTile && pylonPlace.Y < Main.maxTilesY - 75) pylonPlace.Y++; + if (!Main.tile[pylonPlace].HasTile) + Main.tile[pylonPlace].TileType = (ushort)ModContent.TileType(); //make sure there's space to place it for (int i = pylonPlace.X - 1; i <= pylonPlace.X + 1; i++) { From c77eae941f212d69c7dfe88819897a925c7cf3d1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 14:39:13 -0400 Subject: [PATCH 29/35] Walking Cane attempt at balance? --- Items/Weapons/Rogue/WalkingCane.cs | 2 +- Projectiles/Rogue/WalkingCaneProjectile.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/WalkingCane.cs b/Items/Weapons/Rogue/WalkingCane.cs index a8b9fc5a77..c2ec80ffb4 100644 --- a/Items/Weapons/Rogue/WalkingCane.cs +++ b/Items/Weapons/Rogue/WalkingCane.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 48; Item.height = 44; - Item.damage = 50; + Item.damage = 40; Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; diff --git a/Projectiles/Rogue/WalkingCaneProjectile.cs b/Projectiles/Rogue/WalkingCaneProjectile.cs index 94fe83ad72..833f863e5e 100644 --- a/Projectiles/Rogue/WalkingCaneProjectile.cs +++ b/Projectiles/Rogue/WalkingCaneProjectile.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 position = target.Center + Main.rand.NextVector2CircularEdge(100f, 100f); Vector2 velocity = (target.Center - position).SafeNormalize(Vector2.Zero) * 6f; // Friendly shadow hands normally have four different behaviors, but Walking Cane only spawns shadow hands that immediately lunge - Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, velocity, ProjectileID.InsanityShadowFriendly, Projectile.damage / 2, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, velocity, ProjectileID.InsanityShadowFriendly, (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner); } } } From 2fd238686db2f0a0d4b152f7666663c3ca7d23a0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 14:47:05 -0400 Subject: [PATCH 30/35] Slime God core never deals contact damage --- NPCs/SlimeGod/SlimeGodCore.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 766eded681..59f27f7e85 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -50,6 +50,7 @@ namespace CalamityMod.NPCs.SlimeGod { NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.MPAllowedEnemies[Type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.TrailCacheLength[Type] = 8; NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) @@ -63,7 +64,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetDefaults() { NPC.Calamity().canBreakPlayerDefense = true; - NPC.damage = 40; // 80 + NPC.damage = 0; NPC.npcSlots = 10f; NPC.width = 44; NPC.height = 44; @@ -195,9 +196,6 @@ namespace CalamityMod.NPCs.SlimeGod // Vanish phase if ((!purpleSlimeAlive && !redSlimeAlive) || calamityGlobalNPC.newAI[3] == 1f || NPC.ai[3] == 1f) { - // Avoid cheap bullshit - NPC.damage = 0; - // Make sure Opacity is set to 0.8f if it's below that when the vanish phase starts if (NPC.ai[3] == 0f) { @@ -351,9 +349,6 @@ namespace CalamityMod.NPCs.SlimeGod calamityGlobalNPC.newAI[2] += 1f; if (calamityGlobalNPC.newAI[2] >= hideInsideLargeSlimePhaseGateValue) { - // Avoid cheap bullshit - NPC.damage = 0; - NPC.rotation += NPC.direction * 0.3f; if (buffedSlime == 0) @@ -424,9 +419,6 @@ namespace CalamityMod.NPCs.SlimeGod return; } - // Avoid cheap bullshit - NPC.damage = 0; - if (expertMode) { float divisor = death ? 180f : revenge ? 240f : 300f; @@ -479,9 +471,6 @@ namespace CalamityMod.NPCs.SlimeGod NPC.ai[0] -= 1f; if (distanceFromFlyDestination < 200f || NPC.ai[0] > 0f) { - // Set damage - NPC.damage = NPC.defDamage; - if (distanceFromFlyDestination < 200f) NPC.ai[0] = 20f; From 8cfee1af6aecdef1e0bbf82bca911d4db6143ad7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 14 Jul 2026 15:32:02 -0400 Subject: [PATCH 31/35] Maw of Infinity resprite --- Items/Weapons/Melee/MawOfInfinity.cs | 4 ++-- Items/Weapons/Melee/MawOfInfinity.png | Bin 2271 -> 1832 bytes Items/Weapons/Melee/MawOfInfinityGlow.png | Bin 1131 -> 723 bytes Projectiles/Melee/MawOfInfinityHoldout.cs | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/MawOfInfinity.cs b/Items/Weapons/Melee/MawOfInfinity.cs index 5d1f55e272..5c68403adf 100644 --- a/Items/Weapons/Melee/MawOfInfinity.cs +++ b/Items/Weapons/Melee/MawOfInfinity.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Melee } public override void SetDefaults() { - Item.width = 78; - Item.height = 94; + Item.width = 74; + Item.height = 84; Item.damage = 2080; Item.DamageType = DamageClass.Melee; Item.useTime = Item.useAnimation = 33; diff --git a/Items/Weapons/Melee/MawOfInfinity.png b/Items/Weapons/Melee/MawOfInfinity.png index 077d762192366b21f2e796861e57ce40e8dfe473..849fc2a04a48bc0e75aa93003c174b05bfffd8ff 100644 GIT binary patch literal 1832 zcmV+@2iN$CP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D2E9o{K~#8N?VMX| z6;%|5zk-m0J)$W^Z50$W1&gU522&M~YPp&q`cOecjYuR$9~6qBQ9`(iF}_q0H5wvn z5CKIhHRWa`q99hOTnx&spj-qj0iwY1VfgFJ?o7{aOK-5hmy_9NhS0sftiAS{nUlnM z%J96xxH(o6j_uwBK=I}oNdPU(6CB|rnFGy@D0A{2dcYj25hu(424LBHZ-6t(o@Qs1 zX;7csA^t;>GcExj*46tI6=53XIDj6K9kqp|jVR0 z4w88~Hce7aI$5?UFrLVqD4bE2)M|F?f@zXjVJE7rWs;cu&YOW_QCoAOa7I~jPG`M3 zGTLRw0meW78Td>xF>{eBYO_mV<|gGNq1<$4$BzIU{imo-f2%Xfk~+<@4Kk^B@39cl zd5p?MiAU6>b!&0WO%SZGIZK`Y?=`_0Wl620B6DWH z{t5ukK0O|)$xSk6&++{Lbj|DqzNbbK8FhHubN~ir%=A7l>IA@3JM(M(H`D}YlqHeT zkTF6zNa*`f14aUnJ=lwUBC~{PSl`=51;*EHFZG>WwG#hnVoLxv-o5}Dz$|B!C6Q5( zF>{uCPj`$R;O*H&$CNVwT-CM%_&SzmeY9okdH_0|$^@WIRt$WGt^Q^n_;QwV)7YGe z0Ob9V48Se9J)oLBU47S6&L~SFqhRj-@0;d*s;6DL%&Ti;gm`@1O8~4X`2v6wWfcHC z6Z0zRVF%`dFSqG>nW@~QoFs})?F=5*vq2`#C`%%vBBKf}eGY(CnSX&Vw`i3!%`)qw zwfheOa7Xg>0DOJ&SMXKt#T$MI9GhK&hThXf;f%5*VU(iG66!O(RX7=Zxki=tyyYMG z&aP@wtJE|A@_XfhuNU4}d%7r`QI;f(mTA<|wqEWKs-N^cwrSGhv@yQ3|6lc@x(iXO zo~Z8%JPK!&B~_v$gM^-vHO+c)-}?ZJxPJnK^qZ7}%JU1sS5X&s+yEh+O!MxF?$fCv z*WPa0t+SyKRzYW!C6!TW*LqMKpm6QdzzOCaPegSGRA1@7-3zm(R9=IxA~#J^-)TXM zVbBEjb|%g!OR7XgW+_*+p6ab)W}nH#T>U1*?+tvvu;+2`-G$L!P?fk$`sKv$&;<5& zCeA2Jszk{&O2{np`6aD(LMHWJ>*XA=BFC%0Ha&6$gj_%LxOcuxYHWi{oKcoUMonfd z?EEtLa)-IsGb`&vM$JlE1R)(!?eRoipO8D(IHN2{7&X%@Av07*3H71ORZkVUc^}Vw zQ$Z9wIs%%IS3)ZuJdQ4Tiat0XTLd z9YV}fZu0fYlkmMW)7T~nXOtz@(K1&(-952*5-yIMgi(}9y}Niu z^uODyn0FpL1R=R43iaHx(g%Sr*Co2Hso;#VBw;kQ`lznavj*xG6mOoPQ>*>AqVD22 zqs}uTqiOygL8tbq5R#j;3dZ`}2_e5o(cDcE&L~SFqiW_R?YVrb6?m&6gqU^XmY?y{ z+*UagXOtyXqN}=T=DYI&IP#r$-)+TL-f@%}x-JUy{N{!;%96?`%LwyrCOxfUTY;ai zIHN2{l1XicJP5vDp!oOD0q}JyFI1C+Gs=?6iHhY8B$hjnNW= zsH~ALWSmi!ROTJMO_e^`tH4D?iT9gu6>C;P$a{Mi3eG4?s@P$^`6(_`lY}$MlK%kZ WzcwXgeANp80000 zYiyKN8i1dV(n?F|OfQr&Eg-GRf-xcyTyz%$UNBiNQFIgchc1bGfu%0`!yj%)cC*?2 zVImSCdvQ(J-6+Pm!F9z%MKN9$m6{dSR1|3oQcJh?PA^m_vp>$foqnhD&6zo!wj-S9 z5B)l)GhfTo_dV}<&zX8$;4FzOl@Fr;ImPn;sEJg007vTI2jJ6|gTAkuHc9t)-Z6cu zZy?*KUH>ou+qOOw1*i@$@&JCm>=6JS-18&A8E1_%PGkPs1?q#X>Ytmd?}!2{50`kO z$2sFHF&cNa_CRJ|aQljkKA$a;O}*TF0HS9G6OP-s@Dc#(x;g=P^448|GtL^LaqB*N z9)N<_G;)3fQw{7vHzO-BK!eegQ~6dY1N zGH0A6M&n-nq|tXh(5imNn;Y8zXgJsaKwDRbdb~qr&uop2GJi`ooBpNgIRI+;4FE5` zeIg3ZIBSf?-ExKcpLt-@(*RV4ivcK|7Y5+^yH)~Y=W!eOh3{JCaZ_D6cr%KC)U&CM zWLIaLB`Igsr*}Lsk@qp-jKsDIwZbd0P0yxZzIHt6^W@y-vg)|FVCHeD#cX`*eG&z@_O49;thiWp<7A#D+4H6!Uj@M7!!1c)M^;0G;g`<>&NyqnHO2)Q*3;S; z1?U?J0ddpr{@EHJ*fb$1wh6KtB1jLy8D~k>7&mHXqz~yv6_w5ff(?^cCYVgyvihe$ z+%&yX2+F2+UO&%u^2bBg7$=lgsw~#=)zK)#`<{J6XMkYCgagM^*RA!${{UG3*iF92 zb<@I2Zv&`*pwH7JTOQ~f0N_y1OTO{)xa<{? z*j6{K%LAxuP&*c!ah7DGaf+N=0P<(4N@1|O!*}vUH*E1@6{Gh4^O;>S;F=wKl5G7IH^q~w%uG_;Q_qf*6JJYjI(6IW1Oi54b7B zq|p4Knzus)mE`r_i!;uWaT{kcYDS@oS%Y283Fl{-GE8bt zsRV>8L#pSnqC~|?*4SKC2Hk1$Sgq& z`}e>005IHj!uNbZm^$!+t!aWY&XRE(N36E2UVaY{H!4+{KUI5!k01R2h?|uzK_==k zPVZWgrfGsR&XSB7mnvdLb>y<7<7O{f447AX_wU{Tz_N>D>vu7;f{;~_jn(r#fEC56 z^Plb>8E2d&nJ`WfTg}MLodLj^)2DoufNt0i)~b11&>1S>AAjBlz}KH22H=bOH+_!} zZ~0ZiuPc8~)v)sm!X7|wzxu_<=~2ClA+@~5GyCm!(>voVN!d8vu%M2*ZkQgcOomB6 zRCa&s1Z7XD9NNAYN%*)Jxa{^C58zBF4}dqDdI0!*!#zpwOUD^!iP1QHy)6GCm9++X zT78DeJ~UHTO3<^Sj;TV>4g39?h*v*OD>9ZdH`i}W&zM!s7&hd)VbQj$J9xhnO~j) z;N53`X>~t3&Nxc~jU!frn)Yy*=4Gj(pQYNqQ@x#*g|QyMi|f_7hDE6#AsZqm}*iXQ-%r&Dh&_dzw4e#I6hM+g`9DgBs0!L(ikZ7H_5W8VmmLq z^s*~GfG>_50>-|JYNm0KySC| zSwv5(`PxLACOG3PNqYrY%nMg71mINv*(k*Orh@DmDlDz^0M5leKXh)I?^K@{rpH9R z@|bGFbewUPj2M?{HZ5DA3~4{!5CvFu{|4XVvbST#tl1tw-bHGqwYU8%UltaE3@Zq! zeQAS3sw*|shUqxtEJ?H;=gX23TfFJ&(n(_Bvgbpxr^z(Qp0etZH|?CtwuP!oHq_T1R2yf_&iK(d z<17g@P7K)}yOtf3x@nRfaaK>3OVqDO>%!>)KgHm=#<`=8K z=`z^W48ZAA{?!sW6EAFCyF1|x=qtakytXI(?_vsY##u65Dh4_8E+>(NxmWvFbYJZxlD zqvNC+6!4cig2=XtL4HG>ah7;XB1?U>r+)t6gPrw2eBM^JKPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0%%D@K~#8N?c6_W z6j2n0@yFO`x-BI|5M&XnD2Ng)B#IE&Myr5@y^5upFCYXIAy`=03IPi(00|B zHQ55-{;?5P4MxHN5fKp)kvzG&(mI_6Bue);Ml7@z}>qt4tZQ`WYDt){1D*~8#a<^wZYjWZ!QNwO}Y%ZD}n~TEn zq9{=!lE(b_LS(&E8T5>DDx~KqLfDDFxw#jB)l-iExVAo1=)EXWPKB;Q7S~U|hyc!g z*$2S!Ge=>EGhI;~xly8=3SEWmo*jM_0i6AC!gbAXM_c-{zWrz62?{Auc`3VJ36*`O zi=#y4t?Fb|O^I@H?;MtmYRc4p9B&!oM6UX&=O)T@&=S@v$*I_jiEh2QC{Be%2N zt&_JweN=swx+)&_Oso2A7gC~}Vpk>YvnZ5yx3l^0e|&@*ob5tNlvC^~g?)@SS(c2c zmlHkXE0b%mL$d68mZYi^6jGv`5?3vJb|fWh&_vap66NGx-9dLTlQh5Xl>Zw)ay? zRNXW^fl5?eH8ojEl#>eOq(V8BUZ};4oZSPSDxxeY4O6r58#P zG_`*+N|cDmFlx1DqgH#ivAa`IwCg!-eHl4${$T|0^W9qjes{kD@V)z>(O*yUqC`1u zrN#dHZDaWI?DOM`eRFpcB}$|ce*x8c>o5TM{BQsO002ovPDHLk FV1gLvMoa(z literal 1131 zcmV-x1eE)UP)5c$k;KaiKY+0`ZYjk8>1Q%X71wdbNs{t6E znGOJkXQu%f=S|akA3(j*m)siKuFg6c=ZP{dg6fQOjHXI5t`?MW5zH(u0&u)A0>I%T z{QxAswOuCTJdtq`xa+lpk7r#SFaRHaamj#;^F~$mI+&B+{QDMQ>655zu;Qfh-0HA-T&AQxjCX{V%q@cUbZxS0e z<8tW^0EWK4yy|?~f2t$^!=pCa?mH6Bwud@z3jj_Q{s`?a<2-5jjB{hoYF?V_2H@$g zE(377WhwxOr(*zQ=9>YS|J9ncH`N}>w&3<405HGX=B8u$(D%zYPc~A<8Gur@EdUrP zS|^@AcOHOzMC^1^{=*o2@~{W?Lc_ zbGxi+nj^|Ihm7;2;f?DVt7KJE3jl573jsjuvOTrQa@hdvh}$ZBohA>%x0 z*y}jAI+Yo(%yJCQ8Gw98;+p#nP0s;v=uZ3mLOzoQZrn77jPs=7jU(b7w$3kq10b77 z2LR0_`>|Nj8oDrJPyNJKFM9pHjPs=7jB{htVt)pJ&ZMoD3+D<3pm6^ktM2Cv-1k^- z0C2V4R^iXaiU9od@{?;i4jJc3-CW02&vKmp;FVB&DQjnFJJa?qBF@`+wo4Vm+`4Ea z5A?Wq2H>?*<8IsQUnk={sT<>1sg41_zE|G^pj2s0PFyhn-&f4Lo?*@?mu*ixw Date: Sat, 18 Jul 2026 11:26:39 +0700 Subject: [PATCH 32/35] further decreased gelpick value --- Items/Tools/Gelpick.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Tools/Gelpick.cs b/Items/Tools/Gelpick.cs index 3a49cb39c4..8b55543de4 100644 --- a/Items/Tools/Gelpick.cs +++ b/Items/Tools/Gelpick.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools Item.DamageType = DamageClass.Melee; Item.useStyle = ItemUseStyleID.Swing; - Item.value = Item.sellPrice(silver: 90); + Item.value = Item.sellPrice(silver: 75); Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item1; Item.autoReuse = true; From 1f0bfa005b01df58ad0817ca05cc5fddafcc2ab7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 18 Jul 2026 10:51:26 -0400 Subject: [PATCH 33/35] Elemental accessory tooltips mention reduced opacity drawing --- .../Mods.CalamityMod.Items.Accessories.hjson | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 630795df12..44b5fad3b0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -701,7 +701,11 @@ ElementalGauntlet: { ElementalinaBottle: { DisplayName: Elemental in a Bottle - Tooltip: Summons a sand elemental to fight for you + Tooltip: + ''' + Summons a sand elemental to fight for you + The elemental has reduced opacity if visibility is disabled + ''' } ElysianAegis: { @@ -758,7 +762,11 @@ EvasionScarf: { EyeoftheStorm: { DisplayName: Eye of the Storm - Tooltip: Summons a Cloud Elemental to fight for you + Tooltip: + ''' + Summons a Cloud Elemental to fight for you + The elemental has reduced opacity if visibility is disabled + ''' } FeatherCrown: { @@ -983,6 +991,7 @@ HeartoftheElements: { Tooltip: ''' Summons all elementals to protect you + The elementals have reduced opacity if visibility is disabled 'The heart of the world' ''' } @@ -1320,6 +1329,7 @@ PearlofEnthrallment: { ''' Summons a water elemental to fight for you The elemental stays above you, shooting water spears, ice mist, and treble clefs at nearby enemies + The elemental has reduced opacity if visibility is disabled ''' } @@ -1487,6 +1497,7 @@ OasisElementalinaBottle: { ''' Summons an oasis elemental to assist you The elemental fires healing orbs that restore 10 health while you are damaged + The elemental has reduced opacity if visibility is disabled ''' } @@ -1519,7 +1530,11 @@ RogueEmblem: { RoseStone: { DisplayName: Rose Stone - Tooltip: Summons a Brimstone Elemental to fight for you + Tooltip: + ''' + Summons a Brimstone Elemental to fight for you + The elemental has reduced opacity if visibility is disabled + ''' } RottenBrain: { From a5a44fb77d96810bd1e5cdbb2e3a4738841c9a1b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 18 Jul 2026 11:07:28 -0400 Subject: [PATCH 34/35] Merged summoner Statigel minions Also changed its iframes to be the same as Blighted Slime Staff --- Buffs/Summon/BabySlimeGodBuff.cs | 4 +- Items/Armor/Statigel/StatigelHeadSummon.cs | 9 +- .../Mods.CalamityMod.Projectiles.Summon.hjson | 3 +- Projectiles/Summon/CrimsonSlimeGodMinion.cs | 99 ------------------- ...eGodMinion.cs => StatigelBlightedSlime.cs} | 18 +++- 5 files changed, 19 insertions(+), 114 deletions(-) delete mode 100644 Projectiles/Summon/CrimsonSlimeGodMinion.cs rename Projectiles/Summon/{CorruptionSlimeGodMinion.cs => StatigelBlightedSlime.cs} (85%) diff --git a/Buffs/Summon/BabySlimeGodBuff.cs b/Buffs/Summon/BabySlimeGodBuff.cs index c596e06060..2e065f8f29 100644 --- a/Buffs/Summon/BabySlimeGodBuff.cs +++ b/Buffs/Summon/BabySlimeGodBuff.cs @@ -1,11 +1,11 @@ -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; using Terraria.ModLoader; namespace CalamityMod.Buffs.Summon { public class BabySlimeGodBuff : BaseSummonBuff { - protected override int MinionProjectileType => ModContent.ProjectileType(); + protected override int MinionProjectileType => ModContent.ProjectileType(); protected override ref bool MinionBool => ref BuffModdedOwner.sGod; } diff --git a/Items/Armor/Statigel/StatigelHeadSummon.cs b/Items/Armor/Statigel/StatigelHeadSummon.cs index 508f21ec18..194600aea3 100644 --- a/Items/Armor/Statigel/StatigelHeadSummon.cs +++ b/Items/Armor/Statigel/StatigelHeadSummon.cs @@ -48,17 +48,12 @@ namespace CalamityMod.Items.Armor.Statigel { var source = player.GetSource_Accessory(Item); if (player.FindBuffIndex(ModContent.BuffType()) == -1) - { player.AddBuff(ModContent.BuffType(), 3600, true); - } int minionID = -1; int minionDamage = (int)player.GetTotalDamage().ApplyTo(SlimeDamage); - - if (WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType(), minionDamage, 0f, Main.myPlayer); - else if (!WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType(), minionDamage, 0f, Main.myPlayer); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) + minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType(), minionDamage, 0f, Main.myPlayer); if (Main.projectile.IndexInRange(minionID)) Main.projectile[minionID].originalDamage = SlimeDamage; diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 8055edfae0..c71e704288 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -63,7 +63,6 @@ CinderBlossom.DisplayName: Cinder Blossom CloudElementalMinion.DisplayName: Cloud Elemental CnidarianJellyfishOnTheString.DisplayName: Cnidarian CnidarianSpark.DisplayName: Cnidarian Spark -CorruptionSlimeGodMinion.DisplayName: Slime God CosmicBlast.DisplayName: Cosmic Blast CosmicBlastBig.DisplayName: Cosmic Blast CosmicEnergySpiral.DisplayName: Cosmic Energy @@ -74,7 +73,6 @@ CosmicViperSplittingRocket.DisplayName: Splitting Rocket CosmicViperSummon.DisplayName: Cosmic Viper CosmilampBeam.DisplayName: Cosmic Beam CosmilampMinion.DisplayName: Cosmilamp -CrimsonSlimeGodMinion.DisplayName: Slime God DaedalusCrystal.DisplayName: Daedalus Crystal DaedalusCrystalShot.DisplayName: Crystal Shot DaedalusGolem.DisplayName: Daedalus Golem @@ -281,6 +279,7 @@ SquirrelSquireAcorn.DisplayName: Squirrel Acorn SquirrelSquireMinion.DisplayName: Squirrel Squire Starforge.DisplayName: Starforge StarforgeBlast.DisplayName: Starforge Blast +StatigelBlightedSlime.DisplayName: Slime God StellarTorusBeam.DisplayName: Stellar Torus Beam StellarTorusSummon.DisplayName: Stellar Torus Summon StormjawBaby.DisplayName: Stormjaw Baby diff --git a/Projectiles/Summon/CrimsonSlimeGodMinion.cs b/Projectiles/Summon/CrimsonSlimeGodMinion.cs deleted file mode 100644 index 129a42d4f0..0000000000 --- a/Projectiles/Summon/CrimsonSlimeGodMinion.cs +++ /dev/null @@ -1,99 +0,0 @@ -using CalamityMod.Buffs.Summon; -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon -{ - public class CrimsonSlimeGodMinion : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCrim"; - public float dust = 0f; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - ProjectileID.Sets.MinionSacrificable[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 26; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.minionSlots = 0f; - Projectile.alpha = 75; - Projectile.aiStyle = ProjAIStyleID.Pet; - Projectile.timeLeft = 18000; - Projectile.penetrate = -1; - Projectile.timeLeft *= 5; - Projectile.minion = true; - Projectile.tileCollide = false; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 23; - AIType = ProjectileID.BabySlime; - Projectile.DamageType = DamageClass.Summon; - } - - public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) - { - fallThrough = false; - return true; - } - - public override void AI() - { - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (dust == 0f) - { - int constant = 16; - for (int i = 0; i < constant; i++) - { - Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; - rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center; - Vector2 faceDirection = rotate - Projectile.Center; - int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Blood, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f); - Main.dust[dust].noGravity = true; - Main.dust[dust].noLight = true; - Main.dust[dust].velocity = faceDirection; - } - dust += 1f; - } - bool isMinion = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (!modPlayer.slimeGod) - { - Projectile.active = false; - return; - } - if (isMinion) - { - if (player.dead) - { - modPlayer.sGod = false; - } - if (modPlayer.sGod) - { - Projectile.timeLeft = 2; - } - } - } - - public override bool OnTileCollide(Vector2 oldVelocity) => false; - - public override bool PreDraw(ref Color lightColor) - { - Texture2D slom = TextureAssets.Projectile[Type].Value; - Rectangle frame = slom.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(slom, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None); - return false; - } - } -} diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.cs b/Projectiles/Summon/StatigelBlightedSlime.cs similarity index 85% rename from Projectiles/Summon/CorruptionSlimeGodMinion.cs rename to Projectiles/Summon/StatigelBlightedSlime.cs index 4eccfaee8a..b0f27fafb0 100644 --- a/Projectiles/Summon/CorruptionSlimeGodMinion.cs +++ b/Projectiles/Summon/StatigelBlightedSlime.cs @@ -2,23 +2,33 @@ using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class CorruptionSlimeGodMinion : ModProjectile, ILocalizedModType + public class StatigelBlightedSlime : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCorro"; public float dust = 0f; + public static Asset Corroslime; + public static Asset Crimslime; + public override void SetStaticDefaults() { Main.projFrames[Type] = 6; ProjectileID.Sets.MinionSacrificable[Type] = true; ProjectileID.Sets.MinionTargettingFeature[Type] = true; + + if (!Main.dedServ) + { + Corroslime = ModContent.Request("CalamityMod/Projectiles/Summon/BlightedSlimeCorro"); + Crimslime = ModContent.Request("CalamityMod/Projectiles/Summon/BlightedSlimeCrim"); + } } public override void SetDefaults() @@ -37,7 +47,7 @@ namespace CalamityMod.Projectiles.Summon AIType = ProjectileID.BabySlime; Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 23; + Projectile.localNPCHitCooldown = 30; Projectile.DamageType = DamageClass.Summon; } @@ -66,7 +76,7 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - bool isMinion = Projectile.type == ModContent.ProjectileType(); + bool isMinion = Projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); if (!modPlayer.slimeGod) { @@ -90,7 +100,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D slom = TextureAssets.Projectile[Type].Value; + Texture2D slom = (WorldGen.crimson ? Crimslime : Corroslime).Value; Rectangle frame = slom.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Main.EntitySpriteDraw(slom, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None); return false; From d2448bb2df8ee2714b6991ca29fe5d253e139acb Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sun, 19 Jul 2026 08:30:28 +0700 Subject: [PATCH 35/35] Baby Slime God -> Paladin --- .../{BabySlimeGodBuff.cs => BabyPaladinBuff.cs} | 2 +- .../{BabySlimeGodBuff.png => BabyPaladinBuff.png} | Bin Items/Armor/Statigel/StatigelHeadSummon.cs | 4 ++-- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 6 +++--- .../en-US/Mods.CalamityMod.Projectiles.Summon.hjson | 2 +- Projectiles/Summon/StatigelBlightedSlime.cs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename Buffs/Summon/{BabySlimeGodBuff.cs => BabyPaladinBuff.cs} (85%) rename Buffs/Summon/{BabySlimeGodBuff.png => BabyPaladinBuff.png} (100%) diff --git a/Buffs/Summon/BabySlimeGodBuff.cs b/Buffs/Summon/BabyPaladinBuff.cs similarity index 85% rename from Buffs/Summon/BabySlimeGodBuff.cs rename to Buffs/Summon/BabyPaladinBuff.cs index 2e065f8f29..41a9ed1b88 100644 --- a/Buffs/Summon/BabySlimeGodBuff.cs +++ b/Buffs/Summon/BabyPaladinBuff.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Buffs.Summon { - public class BabySlimeGodBuff : BaseSummonBuff + public class BabyPaladinBuff : BaseSummonBuff { protected override int MinionProjectileType => ModContent.ProjectileType(); diff --git a/Buffs/Summon/BabySlimeGodBuff.png b/Buffs/Summon/BabyPaladinBuff.png similarity index 100% rename from Buffs/Summon/BabySlimeGodBuff.png rename to Buffs/Summon/BabyPaladinBuff.png diff --git a/Items/Armor/Statigel/StatigelHeadSummon.cs b/Items/Armor/Statigel/StatigelHeadSummon.cs index 194600aea3..b237a888d9 100644 --- a/Items/Armor/Statigel/StatigelHeadSummon.cs +++ b/Items/Armor/Statigel/StatigelHeadSummon.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Items.Armor.Statigel if (player.whoAmI == Main.myPlayer) { var source = player.GetSource_Accessory(Item); - if (player.FindBuffIndex(ModContent.BuffType()) == -1) - player.AddBuff(ModContent.BuffType(), 3600, true); + if (player.FindBuffIndex(ModContent.BuffType()) == -1) + player.AddBuff(ModContent.BuffType(), 3600, true); int minionID = -1; int minionDamage = (int)player.GetTotalDamage().ApplyTo(SlimeDamage); diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index c88257da6f..f9c0f4336c 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1274,9 +1274,9 @@ BabyBloodCrawlerBuff: { Description: The baby blood crawler will protect you } -BabySlimeGodBuff: { - DisplayName: Baby Slime God - Description: The Slime God will protect you +BabyPaladinBuff: { + DisplayName: Baby Paladin + Description: The blighted paladin will protect you } BabyStormlionBuff: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index c71e704288..da54d5ac0c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -279,7 +279,7 @@ SquirrelSquireAcorn.DisplayName: Squirrel Acorn SquirrelSquireMinion.DisplayName: Squirrel Squire Starforge.DisplayName: Starforge StarforgeBlast.DisplayName: Starforge Blast -StatigelBlightedSlime.DisplayName: Slime God +StatigelBlightedSlime.DisplayName: Blighted Paladin StellarTorusBeam.DisplayName: Stellar Torus Beam StellarTorusSummon.DisplayName: Stellar Torus Summon StormjawBaby.DisplayName: Stormjaw Baby diff --git a/Projectiles/Summon/StatigelBlightedSlime.cs b/Projectiles/Summon/StatigelBlightedSlime.cs index b0f27fafb0..3b7e1f44a3 100644 --- a/Projectiles/Summon/StatigelBlightedSlime.cs +++ b/Projectiles/Summon/StatigelBlightedSlime.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon dust += 1f; } bool isMinion = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); + player.AddBuff(ModContent.BuffType(), 3600); if (!modPlayer.slimeGod) { Projectile.active = false;