added eutrophication debuff
This commit is contained in:
1 parent
c08821332f
commit
ef7ecad321
21 files changed
+76
-36
No files matched your search
@@ -0,0 +1,31 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class Eutrophication : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Eutrophication");
|
||||
Description.SetDefault("Excessive nutrients restrict your movement");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().eutrophication < npc.buffTime[buffIndex])
|
||||
npc.Calamity().eutrophication = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().eutrophication = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -541,6 +541,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool eFreeze = false;
|
||||
public bool silvaStun = false;
|
||||
public bool wCleave = false;
|
||||
public bool eutrophication = false;
|
||||
|
||||
// Buff
|
||||
public bool trinketOfChiBuff = false;
|
||||
@@ -1297,6 +1298,7 @@ namespace CalamityMod.CalPlayer
|
||||
eFreeze = false;
|
||||
silvaStun = false;
|
||||
wCleave = false;
|
||||
eutrophication = false;
|
||||
|
||||
revivify = false;
|
||||
trinketOfChiBuff = false;
|
||||
@@ -1532,6 +1534,7 @@ namespace CalamityMod.CalPlayer
|
||||
eFreeze = false;
|
||||
silvaStun = false;
|
||||
wCleave = false;
|
||||
eutrophication = false;
|
||||
#endregion
|
||||
|
||||
#region Rogue
|
||||
@@ -8262,7 +8265,7 @@ namespace CalamityMod.CalPlayer
|
||||
fullBright = true;
|
||||
}
|
||||
}
|
||||
if (eFreeze || silvaStun || gState || cDepth)
|
||||
if (eFreeze || silvaStun || gState || cDepth || eutrophication)
|
||||
{
|
||||
if (noRogueStealth)
|
||||
{
|
||||
|
||||
@@ -2266,7 +2266,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.velocity.X = 0f;
|
||||
}
|
||||
|
||||
if (modPlayer.eFreeze || modPlayer.silvaStun)
|
||||
if (modPlayer.eFreeze || modPlayer.silvaStun || modPlayer.eutrophication)
|
||||
{
|
||||
player.velocity.Y = 0f;
|
||||
player.velocity.X = 0f;
|
||||
|
||||
+4
-1
@@ -799,7 +799,10 @@ namespace CalamityMod
|
||||
ModContent.BuffType<AbyssalFlames>(),
|
||||
ModContent.BuffType<CrushDepth>(),
|
||||
ModContent.BuffType<Horror>(),
|
||||
ModContent.BuffType<MarkedforDeath>()
|
||||
ModContent.BuffType<MarkedforDeath>(),
|
||||
ModContent.BuffType<WarCleave>(),
|
||||
ModContent.BuffType<Vaporified>(),
|
||||
ModContent.BuffType<Eutrophication>()
|
||||
};
|
||||
|
||||
fireWeaponList = new List<int>()
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace CalamityMod.NPCs
|
||||
public int tSad = 0;
|
||||
public int eFreeze = 0;
|
||||
public int silvaStun = 0;
|
||||
public int eutrophication = 0;
|
||||
public int webbed = 0;
|
||||
public int slowed = 0;
|
||||
public int electrified = 0;
|
||||
@@ -676,6 +677,7 @@ namespace CalamityMod.NPCs
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TimeSlow>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
}
|
||||
@@ -2123,6 +2125,8 @@ namespace CalamityMod.NPCs
|
||||
eFreeze--;
|
||||
if (silvaStun > 0)
|
||||
silvaStun--;
|
||||
if (eutrophication > 0)
|
||||
eutrophication--;
|
||||
if (webbed > 0)
|
||||
webbed--;
|
||||
if (slowed > 0)
|
||||
@@ -2190,7 +2194,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (!CalamityWorld.bossRushActive)
|
||||
{
|
||||
if (silvaStun > 0)
|
||||
if (silvaStun > 0 || eutrophication > 0)
|
||||
npc.velocity = Vector2.Zero;
|
||||
else if (timeSlow > 0 || webbed > 0)
|
||||
npc.velocity *= 0.85f;
|
||||
@@ -3146,7 +3150,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
if (tSad > 0 || cDepth > 0)
|
||||
if (tSad > 0 || cDepth > 0 || eutrophication > 0)
|
||||
{
|
||||
if (Main.rand.Next(6) < 3)
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.knockBackResist = 0f;
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.value = 0f;
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
animationType = 50;
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<Eutrophication>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
animationType = 50;
|
||||
|
||||
@@ -44,13 +44,12 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float num100 = projectile.velocity.Y / 3f * (float)num105;
|
||||
int num101 = 4;
|
||||
int waterDust = Dust.NewDust(new Vector2(projectile.position.X + (float)num101, projectile.position.Y + (float)num101), projectile.width - num101 * 2, projectile.height - num101 * 2, 33, 0f, 0f, 0, new Color(0, 142, 255), 1.5f);
|
||||
Main.dust[waterDust].noGravity = true;
|
||||
Main.dust[waterDust].velocity *= 0.1f;
|
||||
Main.dust[waterDust].velocity += projectile.velocity * 0.1f;
|
||||
Dust expr_47FA_cp_0 = Main.dust[waterDust];
|
||||
expr_47FA_cp_0.position.X -= num99;
|
||||
Dust expr_4815_cp_0 = Main.dust[waterDust];
|
||||
expr_4815_cp_0.position.Y -= num100;
|
||||
Dust waterdust = Main.dust[waterDust];
|
||||
waterdust.noGravity = true;
|
||||
waterdust.velocity *= 0.1f;
|
||||
waterdust.velocity += projectile.velocity * 0.1f;
|
||||
waterdust.position.X -= num99;
|
||||
waterdust.position.Y -= num100;
|
||||
}
|
||||
}
|
||||
if (projectile.ai[1] == 5f)
|
||||
@@ -66,7 +65,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
Main.player[projectile.owner].itemAnimation = 10;
|
||||
Main.player[projectile.owner].itemTime = 10;
|
||||
float arg_1DC8F_0 = vector62.X;
|
||||
if (vector62.X < 0f)
|
||||
{
|
||||
Main.player[projectile.owner].ChangeDir(1);
|
||||
@@ -114,10 +112,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
return;
|
||||
}
|
||||
}
|
||||
float[] var_2_1DE21_cp_0 = projectile.ai;
|
||||
int var_2_1DE21_cp_1 = 1;
|
||||
float num73 = var_2_1DE21_cp_0[var_2_1DE21_cp_1];
|
||||
var_2_1DE21_cp_0[var_2_1DE21_cp_1] = num73 + 1f;
|
||||
projectile.ai[1] += 1f;
|
||||
if (projectile.ai[1] > 5f)
|
||||
{
|
||||
projectile.alpha = 0;
|
||||
@@ -189,17 +184,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
if (target.rarity != 2)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<SilvaStun>(), 60);
|
||||
}
|
||||
else if (projectile.ai[1] >= 45f && (projectile.ai[0] != 1f || projectile.ai[0] != 2f))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<SilvaStun>(), 30);
|
||||
}
|
||||
}
|
||||
if (target.rarity < 2)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 60);
|
||||
}
|
||||
else if (projectile.ai[1] >= 45f && (projectile.ai[0] != 1f || projectile.ai[0] != 2f))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 30);
|
||||
}
|
||||
projectile.ai[0] = 1f;
|
||||
projectile.netUpdate = true;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ClamImpact"), (int)projectile.position.X, (int)projectile.position.Y);
|
||||
|
||||
@@ -31,10 +31,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.rarity != 2 && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<SilvaStun>(), 15);
|
||||
}
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -46,10 +46,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.rarity != 2 && !target.boss)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<SilvaStun>(), 15);
|
||||
}
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user