From bfe8a355a8db115a3aa916e4fdbf1cdbb19fa03d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 14:54:09 -0500 Subject: [PATCH] Fixed Nanotech raider bonus not working, added Vampiric to recipe, and added cooldown indicator --- CalPlayer/CalamityPlayerMiscEffects.cs | 14 +++++++++----- CalPlayer/CalamityPlayerOnHit.cs | 5 ++--- Cooldowns/NanotechBoost.png | Bin 0 -> 510 bytes Cooldowns/NanotechBoostOutline.png | Bin 0 -> 432 bytes Cooldowns/NanotechBoostOverlay.png | Bin 0 -> 422 bytes Cooldowns/RaiderBoost.cs | 9 ++++++++- Items/Accessories/Nanotech.cs | 3 +++ Localization/en-US/Mods.CalamityMod.Buffs.hjson | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- Projectiles/CalamityGlobalProjectile.cs | 4 +--- 10 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 Cooldowns/NanotechBoost.png create mode 100644 Cooldowns/NanotechBoostOutline.png create mode 100644 Cooldowns/NanotechBoostOverlay.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4c8833cff9..ebfdaaeb44 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2708,11 +2708,15 @@ namespace CalamityMod.CalPlayer } // Raider Talisman bonus - if (raiderTalisman && !vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f) - Player.GetCritChance() += RaidersTalisman.RaiderBonus; - if (vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f) - Player.GetCritChance() += VampiricTalisman.RaiderBonus; - + if (!StealthStrikeAvailable() && raiderCritLifespan > 0f) + { + if (nanotech) + Player.GetCritChance() += Items.Accessories.Nanotech.RaiderBonus; + else if (vampiricTalisman) + Player.GetCritChance() += VampiricTalisman.RaiderBonus; + else if (raiderTalisman) + Player.GetCritChance() += RaidersTalisman.RaiderBonus; + } if (avertorBonus) Player.GetDamage() += 0.1f; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f6ea8ea8b2..39b2b2a7dc 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1088,8 +1088,7 @@ namespace CalamityMod.CalPlayer if (raiderTalisman && modProj.stealthStrike) { raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown); - // TO DO: Add nanotech here - Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, vampiricTalisman ? "Bloodfeast" : "default"); + Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, nanotech ? "Nanotech" : vampiricTalisman ? "Vampiric" : "default"); if (raiderSoundCooldown <= 0) { SoundEngine.PlaySound(RaidersTalisman.StealthHitSound, Player.Center); @@ -1297,7 +1296,7 @@ namespace CalamityMod.CalPlayer Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, heal, (raiderCritLifespan > 0 && !proj.Calamity().stealthStrike) ? 1.2f : 1.5f); } - if (bloodyGlove && proj.CountsAsClass() && modProj.stealthStrike && proj.numHits < 1) + if (bloodyGlove && proj.CountsAsClass() && (modProj.stealthStrike || (nanotech && raiderCritLifespan > 0)) && proj.numHits < 1) //Nanotech has the same heal as Electrician's glove Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, electricianGlove ? 2f : 3f); diff --git a/Cooldowns/NanotechBoost.png b/Cooldowns/NanotechBoost.png new file mode 100644 index 0000000000000000000000000000000000000000..430bd3b98ca33553ae0e98ebd5c273545becc8b4 GIT binary patch literal 510 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc3?z4jzqJQajKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCil&0(?STC8gy<|2$32F7WUPY3`Xgf6)>{6ANY**23)@fl5|{GPVOLu96_X z;Quhdu<4A>d7vm~fk$L90|Vb-5N14{zaj-FC{f}XQ4*Y=R#Ki=l*$m0n3-3i=jR%t zV5(=RXPJ|C%MPe!TWW-7ny0500|$`9${@wa%D@O@c>%FBlnwHY1|u_AoC(M_WMpCx z0Mb!FoY~F-7S95*K_CH$LHc1dnxzcD@R-2PzyefZU}S8-xBy}*NC)czh)Gj`Y!F}q zn!^NE8DwbzWI=Tq8W@0Nea;{7Q0>3I0LaYsba4#P2rj)4$ag@2gE?T$))#;E_k?V( zRg`Cu<8(=W+hKn1T~l5ZbHlZB3yyW%V|;#3nc=zgB)wx2hm}9IF=$HKOz>FXHove^ z%=33h=gen5lg^l=UfU7&Zo-n_x7(*@%)7ky^Z)s(b=rKf9~f78uv`9h&Wr##!qe5y JWt~$(695=Sh6w-w literal 0 HcmV?d00001 diff --git a/Cooldowns/NanotechBoostOutline.png b/Cooldowns/NanotechBoostOutline.png new file mode 100644 index 0000000000000000000000000000000000000000..cdd0da28cc5f73d0488321540d33da4fcbdd3792 GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl{i3-AeX{r~?zkQsXDavhLjDhcun{?G7qyMY&w$64SJSVM%xNb!1@J z*w6hZkrl{i3-AeX{r~?zkQsXDavhLjDhcun{?G7qyMY&w$64SJSzv5Fp;|6J;vr|5jnIl9kHBtsCikQR aYK#mM0~k8b{w?(e8RqHg=d#Wzp$PzesaID3 literal 0 HcmV?d00001 diff --git a/Cooldowns/RaiderBoost.cs b/Cooldowns/RaiderBoost.cs index 79bb9ae02d..9ea22fb9fd 100644 --- a/Cooldowns/RaiderBoost.cs +++ b/Cooldowns/RaiderBoost.cs @@ -26,7 +26,14 @@ namespace CalamityMod.Cooldowns { switch (skin) { - case "Bloodfeast": + case "Nanotech": + skinTexture = "NanotechBoost"; + outlineColor = new Color(14, 103, 129); + cooldownColorStart = new Color(85, 252, 229); + cooldownColorEnd = new Color(52,255,171); + break; + + case "Vampiric": skinTexture = "VampiricTalismanBoost"; outlineColor = new Color(143, 27, 27); cooldownColorStart = new Color(133, 5, 5); diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 270d1bbe1c..0d7c09a4df 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Items.Accessories { //The stealth damage boost is handled in CalamityPlayer for some reason, maybe someone didn't want em to stack? public new string LocalizationCategory => "Items.Accessories"; + public const float RaiderBonus = 10f; public override void SetDefaults() { Item.width = 46; @@ -27,6 +28,7 @@ namespace CalamityMod.Items.Accessories modPlayer.electricianGlove = true; modPlayer.filthyGlove = true; modPlayer.bloodyGlove = true; + modPlayer.raiderTalisman = true; player.GetDamage() += 0.15f; player.Calamity().rogueVelocity += 0.15f; } @@ -35,6 +37,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(4). AddTile(). diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 5e759c4d25..afe87854fb 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -76,7 +76,7 @@ OldFashionedBuff: { RedWineBuff: { DisplayName: Red Wine Description: Increased vertical speed, reduced flight time - ItemTooltip: Causes Baguette to heal 200 HP, but reduce regeneration by 2 HP/s for 15 seconds + ItemTooltip: Causes Baguette to heal 200 HP, but reduce regeneration by 2 HP/s for 15 seconds } RumBuff: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index aac2bb06a5..595509d5f9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1155,9 +1155,9 @@ Nanotech: { ''' Rogue projectiles create nanoblades as they travel Stealth strikes summon nanobeams and sparks on enemy hits - Stealth strikes have +15 armor penetration, deal 5% more damage, and heal for 2 HP + Stealth strikes have lifesteal, +15 armor penetration, deal 5% more damage 15% increased rogue damage and 15% increased rogue velocity - Stealth strikes grant 10% critical strike chance to non-stealth strikes for 5 seconds + Stealth strikes grant lifesteal and 10% critical strike chance to non-stealth strikes for 10 seconds ''' } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 64e0f0e763..b0c553b8c1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4690,9 +4690,7 @@ namespace CalamityMod.Projectiles else if (modPlayer.vampiricTalisman && projectile.Calamity().stealthStrike) { target.AddBuff(BuffType(), VampiricTalisman.ArmorCrunchDebuffTime); - - if (!modPlayer.nanotech) - target.AddBuff(BuffType(), VampiricTalisman.HeavyBleedingDebuffTime); + target.AddBuff(BuffType(), VampiricTalisman.HeavyBleedingDebuffTime); } if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj && !projectile.Calamity().CreatedByPlayerDash)