Tesla Potion unique debuff (Galvanic Corrosion)
This commit is contained in:
1 parent
0e31180122
commit
3cd2991cff
20 files changed
+52
-26
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 580 B |
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -678,7 +678,7 @@ namespace CalamityMod.NPCs
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TimeSlow>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
aiType = -1;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
animationType = 50;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.knockBackResist = 0f;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.knockBackResist = 0f;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaFreeze>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
|
||||
@@ -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<TeslaBuff>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<TeslaFreeze>(), 120);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
|
||||
Reference in new issue
Block a user