diff --git a/Buffs/Potions/TeslaBuff.cs b/Buffs/Potions/TeslaBuff.cs index 4f8fc7fc39..3aabc48ec8 100644 --- a/Buffs/Potions/TeslaBuff.cs +++ b/Buffs/Potions/TeslaBuff.cs @@ -1,5 +1,4 @@ using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ModLoader; @@ -17,14 +16,6 @@ namespace CalamityMod.Buffs.Potions longerExpertDebuff = false; } - public override void Update(NPC npc, ref int buffIndex) - { - if (npc.Calamity().tesla < npc.buffTime[buffIndex]) - npc.Calamity().tesla = npc.buffTime[buffIndex]; - npc.DelBuff(buffIndex); - buffIndex--; - } - public override void Update(Player player, ref int buffIndex) { player.Calamity().tesla = true; diff --git a/Buffs/StatDebuffs/TeslaFreeze.cs b/Buffs/StatDebuffs/TeslaFreeze.cs new file mode 100644 index 0000000000..f270835445 --- /dev/null +++ b/Buffs/StatDebuffs/TeslaFreeze.cs @@ -0,0 +1,32 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatDebuffs +{ + public class TeslaFreeze : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Galvanic Corrosion"); + Description.SetDefault("Your limbs have begun to corrode"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + longerExpertDebuff = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + if (npc.Calamity().tesla < npc.buffTime[buffIndex]) + npc.Calamity().tesla = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().teslaFreeze = true; + } + } +} diff --git a/Buffs/StatDebuffs/TeslaFreeze.png b/Buffs/StatDebuffs/TeslaFreeze.png new file mode 100644 index 0000000000..97136a54fe Binary files /dev/null and b/Buffs/StatDebuffs/TeslaFreeze.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 25a2581442..d378d26ea1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -600,6 +600,7 @@ namespace CalamityMod.CalPlayer public bool draconicSurge = false; public bool draconicSurgeCooldown = false; public bool tesla = false; + public bool teslaFreeze = false; public bool baguette = false; public bool vodka = false; public bool redWine = false; @@ -1361,6 +1362,7 @@ namespace CalamityMod.CalPlayer draconicSurge = false; draconicSurgeCooldown = false; tesla = false; + teslaFreeze = false; baguette = false; trippy = false; amidiasBlessing = false; @@ -1627,6 +1629,7 @@ namespace CalamityMod.CalPlayer holyWrath = false; profanedRage = false; tesla = false; + teslaFreeze = false; baguette = false; draconicSurge = false; draconicSurgeCooldown = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8d0611e066..d0857d0d9e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2587,7 +2587,7 @@ namespace CalamityMod.CalPlayer player.velocity.X = 0f; } - if (modPlayer.vaporfied) + if (modPlayer.vaporfied || modPlayer.teslaFreeze) { player.velocity.Y *= 0.98f; player.velocity.X *= 0.98f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 0f55673279..be357d4bbf 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -678,7 +678,7 @@ namespace CalamityMod.NPCs npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Webbed] = true; npc.buffImmune[BuffID.Slow] = true; diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index e4fa230413..a2890701ab 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 22692952ee..ecf810eab6 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 8388c04689..287ec24538 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index a9c2fed07d..a43e22cbf0 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 698abcf2f5..1dfb836800 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 3919728f3c..2bfc752721 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 5ba6d3c066..d3f2a7c6e9 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 8ea59a6afa..453593479d 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index c1e70e23e9..060195eef4 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index 51f96924b2..8243862f25 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.SlimeGod aiType = -1; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index 3a9be0dd81..4259316407 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.SlimeGod animationType = 50; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 00d7c2dd3c..138317c8f2 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.knockBackResist = 0f; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index 22a8a52f0f..5d00865195 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.knockBackResist = 0f; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/Projectiles/Typeless/TeslaAura.cs b/Projectiles/Typeless/TeslaAura.cs index 2af729e8a6..9dc35e4990 100644 --- a/Projectiles/Typeless/TeslaAura.cs +++ b/Projectiles/Typeless/TeslaAura.cs @@ -1,6 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.NPCs; -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Typeless } target.AddBuff(BuffID.Electrified, 300); - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); } public override void OnHitPvp(Player target, int damage, bool crit)