From 9ac05eed3454591ce983b9894a3c42ec0bfad2d5 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 27 Nov 2019 07:57:18 -0500 Subject: [PATCH 1/3] more debuff stuff and astral silt fix --- Buffs/Placeables/YellowDamageCandle.cs | 4 +- Buffs/StatDebuffs/ExoFreeze.cs | 4 +- Buffs/StatDebuffs/GlacialState.cs | 4 +- Buffs/StatDebuffs/PearlAura.cs | 4 +- Buffs/StatDebuffs/SilvaStun.cs | 4 +- Buffs/StatDebuffs/TemporalSadness.cs | 4 +- Buffs/StatDebuffs/TimeSlow.cs | 4 +- CalPlayer/CalamityPlayer.cs | 2 +- Items/Placeables/AstralFossil.cs | 5 +- Items/Placeables/AstralSilt.cs | 8 ++-- Items/Weapons/Melee/GlacialCrusher.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 64 ++++++++++++++------------ 12 files changed, 65 insertions(+), 44 deletions(-) diff --git a/Buffs/Placeables/YellowDamageCandle.cs b/Buffs/Placeables/YellowDamageCandle.cs index a7e949fce1..01fe40becd 100644 --- a/Buffs/Placeables/YellowDamageCandle.cs +++ b/Buffs/Placeables/YellowDamageCandle.cs @@ -24,7 +24,9 @@ namespace CalamityMod.Buffs.Placeables public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().yellowCandle = true; + npc.Calamity().yellowCandle = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } } } diff --git a/Buffs/StatDebuffs/ExoFreeze.cs b/Buffs/StatDebuffs/ExoFreeze.cs index 1d12a4fba5..b704f25128 100644 --- a/Buffs/StatDebuffs/ExoFreeze.cs +++ b/Buffs/StatDebuffs/ExoFreeze.cs @@ -17,7 +17,9 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().eFreeze = true; + npc.Calamity().eFreeze = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } } } diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs index 4ec93a5f90..edd80f0f62 100644 --- a/Buffs/StatDebuffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -24,7 +24,9 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().gState = true; + npc.Calamity().gState = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } } } diff --git a/Buffs/StatDebuffs/PearlAura.cs b/Buffs/StatDebuffs/PearlAura.cs index 1d14ec2747..f09da83e55 100644 --- a/Buffs/StatDebuffs/PearlAura.cs +++ b/Buffs/StatDebuffs/PearlAura.cs @@ -16,7 +16,9 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().pearlAura = true; + npc.Calamity().pearlAura = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } } } diff --git a/Buffs/StatDebuffs/SilvaStun.cs b/Buffs/StatDebuffs/SilvaStun.cs index ab36d7233e..2c12afc2ef 100644 --- a/Buffs/StatDebuffs/SilvaStun.cs +++ b/Buffs/StatDebuffs/SilvaStun.cs @@ -17,7 +17,9 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().silvaStun = true; + npc.Calamity().silvaStun = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } } } diff --git a/Buffs/StatDebuffs/TemporalSadness.cs b/Buffs/StatDebuffs/TemporalSadness.cs index 89489d7bcf..4ee188eb92 100644 --- a/Buffs/StatDebuffs/TemporalSadness.cs +++ b/Buffs/StatDebuffs/TemporalSadness.cs @@ -17,7 +17,9 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().tSad = true; + npc.Calamity().tSad = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } } } diff --git a/Buffs/StatDebuffs/TimeSlow.cs b/Buffs/StatDebuffs/TimeSlow.cs index a04f8d7d9c..a7244e3a5e 100644 --- a/Buffs/StatDebuffs/TimeSlow.cs +++ b/Buffs/StatDebuffs/TimeSlow.cs @@ -18,7 +18,9 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().timeSlow = true; + npc.Calamity().timeSlow = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; } /*public override void Update(Player player, ref int buffIndex) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e10b72c8e1..657951571d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4325,7 +4325,7 @@ namespace CalamityMod.CalPlayer { float distance = (Main.npc[m].Center - player.Center).Length(); if (distance < 120f) - Main.npc[m].AddBuff(ModContent.BuffType(), 2, false); + Main.npc[m].AddBuff(ModContent.BuffType(), 20, false); } } } diff --git a/Items/Placeables/AstralFossil.cs b/Items/Placeables/AstralFossil.cs index d295db98c9..b774b093f0 100644 --- a/Items/Placeables/AstralFossil.cs +++ b/Items/Placeables/AstralFossil.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.Walls; +using CalamityMod.Items.Materials; using Terraria.ID; using Terraria; using Terraria.ModLoader; @@ -68,7 +69,7 @@ namespace CalamityMod.Items.Placeables } else if (val < 48.03f) { - resultType = ModContent.ItemType(); + resultType = ModContent.ItemType(); resultStack = Main.rand.Next(1, 11); } else if (val < 58.03f && !Main.dayTime) @@ -83,7 +84,7 @@ namespace CalamityMod.Items.Placeables } else if (val < 68.03f) { - resultType = ModContent.ItemType(); + resultType = ModContent.ItemType(); resultStack = Main.rand.Next(1, 11); } else if (val < 69.03f) diff --git a/Items/Placeables/AstralSilt.cs b/Items/Placeables/AstralSilt.cs index 81d0b2f9f6..2463aaf63c 100644 --- a/Items/Placeables/AstralSilt.cs +++ b/Items/Placeables/AstralSilt.cs @@ -1,4 +1,4 @@ - +using CalamityMod.Items.Materials; using Terraria.ID; using Terraria; using Terraria.ModLoader; @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Placeables } else if (val < 58.03f) { - resultType = ModContent.ItemType(); + resultType = ModContent.ItemType(); resultStack = Main.rand.Next(1, 21); } else if (val < 61.03f) @@ -120,12 +120,12 @@ namespace CalamityMod.Items.Placeables resultType = ItemID.OrichalcumOre; resultStack = Main.rand.Next(1, 17); } - else if (val < 87.78f) + else if (val < 86.78f) { resultType = ItemID.AdamantiteOre; resultStack = Main.rand.Next(1, 17); } - else if (val < 89.53f) + else if (val < 88.53f) { resultType = ItemID.TitaniumOre; resultStack = Main.rand.Next(1, 17); diff --git a/Items/Weapons/Melee/GlacialCrusher.cs b/Items/Weapons/Melee/GlacialCrusher.cs index a3931c72f3..0583ecdfc5 100644 --- a/Items/Weapons/Melee/GlacialCrusher.cs +++ b/Items/Weapons/Melee/GlacialCrusher.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Melee damage *= 2; knockBack *= 2f; } - else if (target.Calamity().gState) + else if (target.Calamity().gState > 0) { damage *= 3; knockBack *= 3f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 0e617e0d3b..6b2e856e2d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -90,13 +90,13 @@ namespace CalamityMod.NPCs public static bool DraedonMayhem = false; // Debuffs - public bool timeSlow = false; - public bool gState = false; - public bool tSad = false; - public bool eFreeze = false; - public bool silvaStun = false; - public bool yellowCandle = false; - public bool pearlAura = false; + public int timeSlow = 0; + public int gState = 0; + public int tSad = 0; + public int eFreeze = 0; + public int silvaStun = 0; + public int yellowCandle = 0; + public int pearlAura = 0; public int wCleave = 0; public int bBlood = 0; public int dFlames = 0; @@ -328,14 +328,6 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref SCalCatastrophe); ResetSavedIndex(ref SCal); ResetSavedIndex(ref SCalWorm); - - timeSlow = false; - gState = false; - tSad = false; - eFreeze = false; - silvaStun = false; - yellowCandle = false; - pearlAura = false; } #endregion @@ -502,21 +494,21 @@ namespace CalamityMod.NPCs // Exo Freeze, Glacial State and Temporal Sadness don't work on bosses or other specific enemies. if (!npc.boss && !CalamityMod.movementImpairImmuneList.Contains(npc.type)) { - if (eFreeze && !CalamityWorld.bossRushActive) + if (eFreeze > 0 && !CalamityWorld.bossRushActive) { npc.velocity.X = 0f; npc.velocity.Y += 0.1f; if (npc.velocity.Y > 15f) npc.velocity.Y = 15f; } - else if (gState) + else if (gState > 0) { npc.velocity.X = 0f; npc.velocity.Y += 0.05f; if (npc.velocity.Y > 15f) npc.velocity.Y = 15f; } - if (tSad) + if (tSad > 0) { npc.velocity /= 2f; } @@ -1162,7 +1154,7 @@ namespace CalamityMod.NPCs #region Modify Hit Player public override void ModifyHitPlayer(NPC npc, Player target, ref int damage, ref bool crit) { - if (tSad) + if (tSad > 0) { damage /= 2; } @@ -1219,7 +1211,7 @@ namespace CalamityMod.NPCs (astralInfection > 0 ? AstralInfectionDebuff.DefenseReduction : 0) - (aFlames > 0 ? AbyssalFlames.DefenseReduction : 0) - (wCleave > 0 ? WarCleave.DefenseReduction : 0) - - (gState ? GlacialState.DefenseReduction : 0) - + (gState > 0 ? GlacialState.DefenseReduction : 0) - (aCrunch > 0 ? ArmorCrunch.DefenseReduction : 0); // Defense can never be negative and has a minimum value of zero. @@ -1233,7 +1225,7 @@ namespace CalamityMod.NPCs damage = ApplyDR(npc, damage); // Add Yellow Candle damage if the NPC isn't supposed to be "near invincible" - if (yellowCandle && DR < 0.99f && npc.takenDamageMultiplier > 0.05f) + if (yellowCandle > 0 && DR < 0.99f && npc.takenDamageMultiplier > 0.05f) damage += yellowCandleDamage; // Cancel out vanilla defense math by reversing the calculation vanilla is about to perform. @@ -2095,6 +2087,20 @@ namespace CalamityMod.NPCs public override void PostAI(NPC npc) { //Debuff decrements + if (timeSlow > 0) + timeSlow--; + if (gState > 0) + gState--; + if (tSad > 0) + tSad--; + if (eFreeze > 0) + eFreeze--; + if (silvaStun > 0) + silvaStun--; + if (yellowCandle > 0) + yellowCandle--; + if (pearlAura > 0) + pearlAura--; if (wCleave > 0) wCleave--; if (bBlood > 0) @@ -2140,14 +2146,14 @@ namespace CalamityMod.NPCs if (npc.boss || CalamityMod.movementImpairImmuneList.Contains(npc.type)) return; - if (pearlAura && !CalamityPlayer.areThereAnyDamnBosses) - npc.velocity *= 0.95f; + if (pearlAura > 0 && !CalamityPlayer.areThereAnyDamnBosses) + npc.velocity *= 0.9f; if (!CalamityWorld.bossRushActive) { - if (silvaStun) + if (silvaStun > 0) npc.velocity = Vector2.Zero; - else if (timeSlow) + else if (timeSlow > 0) npc.velocity *= 0.85f; } } @@ -3023,7 +3029,7 @@ namespace CalamityMod.NPCs dust.scale += Main.rand.NextFloat(); } } - if (tSad || cDepth > 0) + if (tSad > 0 || cDepth > 0) { if (Main.rand.Next(6) < 3) { @@ -3070,7 +3076,7 @@ namespace CalamityMod.NPCs } } - if (gState || eFreeze) + if (gState > 0 || eFreeze > 0) { drawColor = Color.Cyan; } @@ -3080,12 +3086,12 @@ namespace CalamityMod.NPCs drawColor = Color.Fuchsia; } - if (pearlAura) + if (pearlAura > 0) { drawColor = Color.White; } - if (timeSlow) + if (timeSlow > 0) { drawColor = Color.Aquamarine; } From 7cf9de5f2729b4f0863afac9688be3fdbf35c493 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 27 Nov 2019 09:35:12 -0500 Subject: [PATCH 2/3] added shroomerang (unobtainable) --- Items/Weapons/Rogue/BloodsoakedCrasher.cs | 2 +- Items/Weapons/Rogue/Shroomerang.cs | 48 ++++++ Items/Weapons/Rogue/Shroomerang.png | Bin 0 -> 623 bytes NPCs/CalamityGlobalNPC.cs | 14 ++ Projectiles/CalamityGlobalProjectile.cs | 2 +- Projectiles/Rogue/ShroomerangProj.cs | 68 ++++++++ Projectiles/Rogue/ShroomerangProj.png | Bin 0 -> 623 bytes Projectiles/Rogue/ShroomerangSpore.cs | 193 ++++++++++++++++++++++ Projectiles/Rogue/ShroomerangSpore.png | Bin 0 -> 277 bytes 9 files changed, 325 insertions(+), 2 deletions(-) create mode 100644 Items/Weapons/Rogue/Shroomerang.cs create mode 100644 Items/Weapons/Rogue/Shroomerang.png create mode 100644 Projectiles/Rogue/ShroomerangProj.cs create mode 100644 Projectiles/Rogue/ShroomerangProj.png create mode 100644 Projectiles/Rogue/ShroomerangSpore.cs create mode 100644 Projectiles/Rogue/ShroomerangSpore.png diff --git a/Items/Weapons/Rogue/BloodsoakedCrasher.cs b/Items/Weapons/Rogue/BloodsoakedCrasher.cs index 878929f5ce..b58d020088 100644 --- a/Items/Weapons/Rogue/BloodsoakedCrasher.cs +++ b/Items/Weapons/Rogue/BloodsoakedCrasher.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { - int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 1f); + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 1f); Main.projectile[stealth].Calamity().stealthStrike = true; return false; } diff --git a/Items/Weapons/Rogue/Shroomerang.cs b/Items/Weapons/Rogue/Shroomerang.cs new file mode 100644 index 0000000000..da2051445a --- /dev/null +++ b/Items/Weapons/Rogue/Shroomerang.cs @@ -0,0 +1,48 @@ +using CalamityMod.Projectiles.Rogue; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class Shroomerang : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shroomerang"); + Tooltip.SetDefault(@"Fires a slow, long-ranged boomerang +Stealth strikes grant the Mushy buff to the user on enemy hits and summon homing spores"); + } + + public override void SafeSetDefaults() + { + item.width = 26; + item.damage = 18; + item.noMelee = true; + item.noUseGraphic = true; + item.useTime = 20; + item.useAnimation = 20; + item.useStyle = 1; + item.knockBack = 1.5f; + item.UseSound = SoundID.Item1; + item.height = 50; + item.rare = 2; + item.value = Item.buyPrice(0, 2, 0, 0); + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 15f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + return false; + } + return true; + } + } +} diff --git a/Items/Weapons/Rogue/Shroomerang.png b/Items/Weapons/Rogue/Shroomerang.png new file mode 100644 index 0000000000000000000000000000000000000000..b33235e4d0e1233fd2807d2dfcfcd74359817c33 GIT binary patch literal 623 zcmV-#0+9WQP)s!$h}TXc;t?B(SP;Y(8)D@Z zJ0C$LU9ux(V_T1SBrHUwNj=I&#KzL57UOi>t7F7wl-NP{u;$zN{M>Vd`OqRrPB9ESJQrm{7`jv@7_V(Thz}Ef}0Nz}q2A*FX zx+6v&J=?@2>m*k7ORwN4V(*b(&vmdXK!+Hs9$_@;vF zbe*UnD_tjKdJpWrZbHcHw0BU`-i~(@nb#j>UJq;A@#!S8QsmRZe(gO&(miadI!-tD zWS!Wbd0+Pd3ljRH8ofcv0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ov JPDHLkV1lg36A}Ob literal 0 HcmV?d00001 diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 6b2e856e2d..b6747d5657 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -514,6 +514,20 @@ namespace CalamityMod.NPCs } } + //Oiled debuff makes flame debuffs 50% more effective (instead of vanilla 25%) + /*if (npc.oiled) + { + int num1 = (npc.onFire ? 2 : 0) + (npc.onFrostBurn ? 4 : 0) + (npc.onFire2 ? 3 : 0) + (npc.shadowFlame ? 7 : 0) + (bFlames ? 20 : 0) + (hFlames ? 25 : 0) + (gsInferno ? 125 : 0) + (aFlames ? 63 : 0) + (dFlames ? 1250 : 0); + if (num1 > 0) + { + int num2 = num1 * 4 + 12; + npc.lifeRegen = npc.lifeRegen - num2; + int num3 = num2 / 6; + if (amount < num3) + amount = num3; + } + }*/ + ApplyDPSDebuff(irradiated, 20, 4, ref npc.lifeRegen, ref damage); ApplyDPSDebuff(bFlames, 40, 8, ref npc.lifeRegen, ref damage); ApplyDPSDebuff(hFlames, 50, 10, ref npc.lifeRegen, ref damage); diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 096f91d3c4..4d6ef70757 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -582,7 +582,7 @@ namespace CalamityMod.Projectiles else if (projectile.type == ProjectileID.SoulDrain) projectile.magic = true; - if (!projectile.npcProj && projectile.friendly) + if (!projectile.npcProj && projectile.friendly && projectile.damage > 0) { if (Main.player[projectile.owner].Calamity().eQuiver && projectile.ranged && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) { diff --git a/Projectiles/Rogue/ShroomerangProj.cs b/Projectiles/Rogue/ShroomerangProj.cs new file mode 100644 index 0000000000..82f6ed444a --- /dev/null +++ b/Projectiles/Rogue/ShroomerangProj.cs @@ -0,0 +1,68 @@ +using CalamityMod.Buffs.StatBuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class ShroomerangProj : ModProjectile + { + public int stealthCounter = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shroomerang"); + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.aiStyle = 3; + projectile.timeLeft = 300; + aiType = 52; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.5f / 255f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 56, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + } + if (projectile.Calamity().stealthStrike == true) + { + stealthCounter++; + if (stealthCounter == 8 && projectile.owner == Main.myPlayer) + { + Vector2 vector62 = Main.player[projectile.owner].Center - projectile.Center; + stealthCounter = 0; + Vector2 vector63 = vector62 * -1f; + vector63.Normalize(); + vector63 *= (float)Main.rand.Next(45, 65) * 0.1f; + vector63 = vector63.RotatedBy((Main.rand.NextDouble() - 0.5) * 1.5707963705062866, default); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.6), projectile.knockBack * 0.2f, projectile.owner, -10f, 0f); + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Player player = Main.player[projectile.owner]; + if (projectile.Calamity().stealthStrike == true) + player.AddBuff(ModContent.BuffType(), 720); + } + } +} diff --git a/Projectiles/Rogue/ShroomerangProj.png b/Projectiles/Rogue/ShroomerangProj.png new file mode 100644 index 0000000000000000000000000000000000000000..b33235e4d0e1233fd2807d2dfcfcd74359817c33 GIT binary patch literal 623 zcmV-#0+9WQP)s!$h}TXc;t?B(SP;Y(8)D@Z zJ0C$LU9ux(V_T1SBrHUwNj=I&#KzL57UOi>t7F7wl-NP{u;$zN{M>Vd`OqRrPB9ESJQrm{7`jv@7_V(Thz}Ef}0Nz}q2A*FX zx+6v&J=?@2>m*k7ORwN4V(*b(&vmdXK!+Hs9$_@;vF zbe*UnD_tjKdJpWrZbHcHw0BU`-i~(@nb#j>UJq;A@#!S8QsmRZe(gO&(miadI!-tD zWS!Wbd0+Pd3ljRH8ofcv0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ov JPDHLkV1lg36A}Ob literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/ShroomerangSpore.cs b/Projectiles/Rogue/ShroomerangSpore.cs new file mode 100644 index 0000000000..7135cb1310 --- /dev/null +++ b/Projectiles/Rogue/ShroomerangSpore.cs @@ -0,0 +1,193 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class ShroomerangSpore : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spore"); + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.alpha = 255; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = 3600; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.5f / 255f); + projectile.localAI[0] += 1f; + if (projectile.localAI[0] >= 90f) + { + projectile.localAI[0] *= -1f; + } + if (projectile.localAI[0] >= 0f) + { + projectile.scale += 0.003f; + } + else + { + projectile.scale -= 0.003f; + } + projectile.rotation += 0.0025f * projectile.scale; + float num945 = 1f; + float num946 = 1f; + if (projectile.identity % 6 == 0) + { + num946 *= -1f; + } + if (projectile.identity % 6 == 1) + { + num945 *= -1f; + } + if (projectile.identity % 6 == 2) + { + num946 *= -1f; + num945 *= -1f; + } + if (projectile.identity % 6 == 3) + { + num946 = 0f; + } + if (projectile.identity % 6 == 4) + { + num945 = 0f; + } + projectile.localAI[1] += 1f; + if (projectile.localAI[1] > 60f) + { + projectile.localAI[1] = -180f; + } + if (projectile.localAI[1] >= -60f) + { + projectile.velocity.X = projectile.velocity.X + 0.002f * num946; + projectile.velocity.Y = projectile.velocity.Y + 0.002f * num945; + } + else + { + projectile.velocity.X = projectile.velocity.X - 0.002f * num946; + projectile.velocity.Y = projectile.velocity.Y - 0.002f * num945; + } + projectile.ai[0] += 1f; + if (projectile.ai[0] > 5400f) + { + projectile.damage = 0; + projectile.ai[1] = 1f; + if (projectile.alpha < 255) + { + projectile.alpha += 5; + if (projectile.alpha > 255) + { + projectile.alpha = 255; + } + } + else if (projectile.owner == Main.myPlayer) + { + projectile.Kill(); + } + } + else + { + float num947 = (projectile.Center - Main.player[projectile.owner].Center).Length() / 100f; + if (num947 > 4f) + { + num947 *= 1.1f; + } + if (num947 > 5f) + { + num947 *= 1.2f; + } + if (num947 > 6f) + { + num947 *= 1.3f; + } + if (num947 > 7f) + { + num947 *= 1.4f; + } + if (num947 > 8f) + { + num947 *= 1.5f; + } + if (num947 > 9f) + { + num947 *= 1.6f; + } + if (num947 > 10f) + { + num947 *= 1.7f; + } + projectile.ai[0] += num947; + if (projectile.alpha > 50) + { + projectile.alpha -= 10; + if (projectile.alpha < 50) + { + projectile.alpha = 50; + } + } + } + bool flag49 = false; + Vector2 center12 = new Vector2(0f, 0f); + float num948 = 600f; + for (int num949 = 0; num949 < 200; num949++) + { + if (Main.npc[num949].CanBeChasedBy(projectile, false)) + { + float num950 = Main.npc[num949].position.X + (float)(Main.npc[num949].width / 2); + float num951 = Main.npc[num949].position.Y + (float)(Main.npc[num949].height / 2); + float num952 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num950) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num951); + if (num952 < num948) + { + num948 = num952; + center12 = Main.npc[num949].Center; + flag49 = true; + } + } + } + if (flag49) + { + Vector2 vector101 = center12 - projectile.Center; + vector101.Normalize(); + vector101 *= 0.75f; + projectile.velocity = (projectile.velocity * 10f + vector101) / 11f; + return; + } + if ((double)projectile.velocity.Length() > 0.2) + { + projectile.velocity *= 0.98f; + } + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 56; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + int num226 = 36; + for (int num227 = 0; num227 < num226; num227++) + { + Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; + vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + projectile.Center; + Vector2 vector7 = vector6 - projectile.Center; + int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 56, vector7.X, vector7.Y, 100, default, 0.5f); + Main.dust[num228].noGravity = true; + Main.dust[num228].noLight = true; + Main.dust[num228].velocity = vector7; + } + } + } +} diff --git a/Projectiles/Rogue/ShroomerangSpore.png b/Projectiles/Rogue/ShroomerangSpore.png new file mode 100644 index 0000000000000000000000000000000000000000..50c3603ed9147edc069b68f679bbcf2a669c7786 GIT binary patch literal 277 zcmV+w0qXvVP)H2A436SUIC2#&jW_WAT#W zH9<&jbsbQjya2UT@PB4It!JQIG+*@YBB1r0M|o5X zE7;izChHrN^P+<5>;~-i(wJD}{GkLV4P34Hy2Z^j^5F8%Hm*gp)%Pd=y7k8B^e5_o(40E5Tz bW(@uSo? Date: Wed, 27 Nov 2019 11:45:35 -0500 Subject: [PATCH 3/3] debuff bug fix stuff --- Buffs/DamageOverTime/AbyssalFlames.cs | 3 ++- Buffs/DamageOverTime/AstralInfectionDebuff.cs | 3 ++- Buffs/DamageOverTime/BrimstoneFlames.cs | 3 ++- Buffs/DamageOverTime/BurningBlood.cs | 3 ++- Buffs/DamageOverTime/CrushDepth.cs | 3 ++- Buffs/DamageOverTime/DemonFlames.cs | 3 ++- Buffs/DamageOverTime/GodSlayerInferno.cs | 3 ++- Buffs/DamageOverTime/HolyFlames.cs | 3 ++- Buffs/DamageOverTime/Nightwither.cs | 3 ++- Buffs/DamageOverTime/Plague.cs | 3 ++- Buffs/DamageOverTime/ShellfishEating.cs | 3 ++- Buffs/DamageOverTime/Shred.cs | 3 ++- Buffs/DamageOverTime/SnapClamDebuff.cs | 3 ++- Buffs/DamageOverTime/SulphuricPoisoning.cs | 3 ++- Buffs/Placeables/YellowDamageCandle.cs | 3 ++- Buffs/StatDebuffs/ArmorCrunch.cs | 3 ++- Buffs/StatDebuffs/Enraged.cs | 3 ++- Buffs/StatDebuffs/ExoFreeze.cs | 3 ++- Buffs/StatDebuffs/GlacialState.cs | 3 ++- Buffs/StatDebuffs/Irradiated.cs | 3 ++- Buffs/StatDebuffs/MarkedforDeath.cs | 3 ++- Buffs/StatDebuffs/PearlAura.cs | 3 ++- Buffs/StatDebuffs/SilvaStun.cs | 3 ++- Buffs/StatDebuffs/TemporalSadness.cs | 3 ++- Buffs/StatDebuffs/TimeSlow.cs | 3 ++- Buffs/StatDebuffs/WarCleave.cs | 3 ++- Buffs/StatDebuffs/WhisperingDeath.cs | 3 ++- Projectiles/Rogue/ShroomerangSpore.cs | 1 + 28 files changed, 55 insertions(+), 27 deletions(-) diff --git a/Buffs/DamageOverTime/AbyssalFlames.cs b/Buffs/DamageOverTime/AbyssalFlames.cs index 81d86be385..da5d6845bb 100644 --- a/Buffs/DamageOverTime/AbyssalFlames.cs +++ b/Buffs/DamageOverTime/AbyssalFlames.cs @@ -25,7 +25,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().aFlames = npc.buffTime[buffIndex]; + if (npc.Calamity().aFlames < npc.buffTime[buffIndex]) + npc.Calamity().aFlames = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/AstralInfectionDebuff.cs b/Buffs/DamageOverTime/AstralInfectionDebuff.cs index 716ca13639..02ad5d3229 100644 --- a/Buffs/DamageOverTime/AstralInfectionDebuff.cs +++ b/Buffs/DamageOverTime/AstralInfectionDebuff.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().astralInfection = npc.buffTime[buffIndex]; + if (npc.Calamity().astralInfection < npc.buffTime[buffIndex]) + npc.Calamity().astralInfection = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/BrimstoneFlames.cs b/Buffs/DamageOverTime/BrimstoneFlames.cs index 05dd4d6146..4096ddfa7a 100644 --- a/Buffs/DamageOverTime/BrimstoneFlames.cs +++ b/Buffs/DamageOverTime/BrimstoneFlames.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().bFlames = npc.buffTime[buffIndex]; + if (npc.Calamity().bFlames < npc.buffTime[buffIndex]) + npc.Calamity().bFlames = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/BurningBlood.cs b/Buffs/DamageOverTime/BurningBlood.cs index 99d3d0e573..fc7a19fc7a 100644 --- a/Buffs/DamageOverTime/BurningBlood.cs +++ b/Buffs/DamageOverTime/BurningBlood.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().bBlood = npc.buffTime[buffIndex]; + if (npc.Calamity().bBlood < npc.buffTime[buffIndex]) + npc.Calamity().bBlood = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/CrushDepth.cs b/Buffs/DamageOverTime/CrushDepth.cs index a8da566381..d287d9ee27 100644 --- a/Buffs/DamageOverTime/CrushDepth.cs +++ b/Buffs/DamageOverTime/CrushDepth.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().cDepth = npc.buffTime[buffIndex]; + if (npc.Calamity().cDepth < npc.buffTime[buffIndex]) + npc.Calamity().cDepth = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/DemonFlames.cs b/Buffs/DamageOverTime/DemonFlames.cs index c2aa5bed13..0abff5d32e 100644 --- a/Buffs/DamageOverTime/DemonFlames.cs +++ b/Buffs/DamageOverTime/DemonFlames.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().dFlames = npc.buffTime[buffIndex]; + if (npc.Calamity().dFlames < npc.buffTime[buffIndex]) + npc.Calamity().dFlames = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/GodSlayerInferno.cs b/Buffs/DamageOverTime/GodSlayerInferno.cs index 65269feea0..2798de3dd4 100644 --- a/Buffs/DamageOverTime/GodSlayerInferno.cs +++ b/Buffs/DamageOverTime/GodSlayerInferno.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().gsInferno = npc.buffTime[buffIndex]; + if (npc.Calamity().gsInferno < npc.buffTime[buffIndex]) + npc.Calamity().gsInferno = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/HolyFlames.cs b/Buffs/DamageOverTime/HolyFlames.cs index a38c71e13e..ae7bd17b1e 100644 --- a/Buffs/DamageOverTime/HolyFlames.cs +++ b/Buffs/DamageOverTime/HolyFlames.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().hFlames = npc.buffTime[buffIndex]; + if (npc.Calamity().hFlames < npc.buffTime[buffIndex]) + npc.Calamity().hFlames = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/Nightwither.cs b/Buffs/DamageOverTime/Nightwither.cs index 542ed10e5e..23d22b5f40 100644 --- a/Buffs/DamageOverTime/Nightwither.cs +++ b/Buffs/DamageOverTime/Nightwither.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().nightwither = npc.buffTime[buffIndex]; + if (npc.Calamity().nightwither < npc.buffTime[buffIndex]) + npc.Calamity().nightwither = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/Plague.cs b/Buffs/DamageOverTime/Plague.cs index 51815a5d92..e0f08c339e 100644 --- a/Buffs/DamageOverTime/Plague.cs +++ b/Buffs/DamageOverTime/Plague.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().pFlames = npc.buffTime[buffIndex]; + if (npc.Calamity().pFlames < npc.buffTime[buffIndex]) + npc.Calamity().pFlames = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/ShellfishEating.cs b/Buffs/DamageOverTime/ShellfishEating.cs index 208eda9340..7d933e2606 100644 --- a/Buffs/DamageOverTime/ShellfishEating.cs +++ b/Buffs/DamageOverTime/ShellfishEating.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().shellfishVore = npc.buffTime[buffIndex]; + if (npc.Calamity().shellfishVore < npc.buffTime[buffIndex]) + npc.Calamity().shellfishVore = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/Shred.cs b/Buffs/DamageOverTime/Shred.cs index b11feb0407..b6d1fef7c1 100644 --- a/Buffs/DamageOverTime/Shred.cs +++ b/Buffs/DamageOverTime/Shred.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().pShred = npc.buffTime[buffIndex]; + if (npc.Calamity().pShred < npc.buffTime[buffIndex]) + npc.Calamity().pShred = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/SnapClamDebuff.cs b/Buffs/DamageOverTime/SnapClamDebuff.cs index bd72f592a8..bb3b39d842 100644 --- a/Buffs/DamageOverTime/SnapClamDebuff.cs +++ b/Buffs/DamageOverTime/SnapClamDebuff.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().clamDebuff = npc.buffTime[buffIndex]; + if (npc.Calamity().clamDebuff < npc.buffTime[buffIndex]) + npc.Calamity().clamDebuff = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/DamageOverTime/SulphuricPoisoning.cs b/Buffs/DamageOverTime/SulphuricPoisoning.cs index dd07c93449..affb95e202 100644 --- a/Buffs/DamageOverTime/SulphuricPoisoning.cs +++ b/Buffs/DamageOverTime/SulphuricPoisoning.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().sulphurPoison = npc.buffTime[buffIndex]; + if (npc.Calamity().sulphurPoison < npc.buffTime[buffIndex]) + npc.Calamity().sulphurPoison = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/Placeables/YellowDamageCandle.cs b/Buffs/Placeables/YellowDamageCandle.cs index 01fe40becd..eaf9e2ec55 100644 --- a/Buffs/Placeables/YellowDamageCandle.cs +++ b/Buffs/Placeables/YellowDamageCandle.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.Placeables public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().yellowCandle = npc.buffTime[buffIndex]; + if (npc.Calamity().yellowCandle < npc.buffTime[buffIndex]) + npc.Calamity().yellowCandle = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/ArmorCrunch.cs b/Buffs/StatDebuffs/ArmorCrunch.cs index 1b19c2930e..16532d0d40 100644 --- a/Buffs/StatDebuffs/ArmorCrunch.cs +++ b/Buffs/StatDebuffs/ArmorCrunch.cs @@ -20,7 +20,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().aCrunch = npc.buffTime[buffIndex]; + if (npc.Calamity().aCrunch < npc.buffTime[buffIndex]) + npc.Calamity().aCrunch = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/Enraged.cs b/Buffs/StatDebuffs/Enraged.cs index 497af45e3c..581d8a3de9 100644 --- a/Buffs/StatDebuffs/Enraged.cs +++ b/Buffs/StatDebuffs/Enraged.cs @@ -23,7 +23,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().enraged = npc.buffTime[buffIndex]; + if (npc.Calamity().enraged < npc.buffTime[buffIndex]) + npc.Calamity().enraged = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/ExoFreeze.cs b/Buffs/StatDebuffs/ExoFreeze.cs index b704f25128..946691cd38 100644 --- a/Buffs/StatDebuffs/ExoFreeze.cs +++ b/Buffs/StatDebuffs/ExoFreeze.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().eFreeze = npc.buffTime[buffIndex]; + if (npc.Calamity().eFreeze < npc.buffTime[buffIndex]) + npc.Calamity().eFreeze = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs index edd80f0f62..fb417edbc4 100644 --- a/Buffs/StatDebuffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().gState = npc.buffTime[buffIndex]; + if (npc.Calamity().gState < npc.buffTime[buffIndex]) + npc.Calamity().gState = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/Irradiated.cs b/Buffs/StatDebuffs/Irradiated.cs index da26d43e3a..e9afa5c307 100644 --- a/Buffs/StatDebuffs/Irradiated.cs +++ b/Buffs/StatDebuffs/Irradiated.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().irradiated = npc.buffTime[buffIndex]; + if (npc.Calamity().irradiated < npc.buffTime[buffIndex]) + npc.Calamity().irradiated = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/MarkedforDeath.cs b/Buffs/StatDebuffs/MarkedforDeath.cs index 6b1611ccc5..7538667ee5 100644 --- a/Buffs/StatDebuffs/MarkedforDeath.cs +++ b/Buffs/StatDebuffs/MarkedforDeath.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().marked = npc.buffTime[buffIndex]; + if (npc.Calamity().marked < npc.buffTime[buffIndex]) + npc.Calamity().marked = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/PearlAura.cs b/Buffs/StatDebuffs/PearlAura.cs index f09da83e55..815b50b3f2 100644 --- a/Buffs/StatDebuffs/PearlAura.cs +++ b/Buffs/StatDebuffs/PearlAura.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().pearlAura = npc.buffTime[buffIndex]; + if (npc.Calamity().pearlAura < npc.buffTime[buffIndex]) + npc.Calamity().pearlAura = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/SilvaStun.cs b/Buffs/StatDebuffs/SilvaStun.cs index 2c12afc2ef..cbd60ba5f1 100644 --- a/Buffs/StatDebuffs/SilvaStun.cs +++ b/Buffs/StatDebuffs/SilvaStun.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().silvaStun = npc.buffTime[buffIndex]; + if (npc.Calamity().silvaStun < npc.buffTime[buffIndex]) + npc.Calamity().silvaStun = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/TemporalSadness.cs b/Buffs/StatDebuffs/TemporalSadness.cs index 4ee188eb92..e9cbdf284a 100644 --- a/Buffs/StatDebuffs/TemporalSadness.cs +++ b/Buffs/StatDebuffs/TemporalSadness.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().tSad = npc.buffTime[buffIndex]; + if (npc.Calamity().tSad < npc.buffTime[buffIndex]) + npc.Calamity().tSad = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/TimeSlow.cs b/Buffs/StatDebuffs/TimeSlow.cs index a7244e3a5e..f4d9343c07 100644 --- a/Buffs/StatDebuffs/TimeSlow.cs +++ b/Buffs/StatDebuffs/TimeSlow.cs @@ -18,7 +18,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().timeSlow = npc.buffTime[buffIndex]; + if (npc.Calamity().timeSlow < npc.buffTime[buffIndex]) + npc.Calamity().timeSlow = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/WarCleave.cs b/Buffs/StatDebuffs/WarCleave.cs index 08537bc83a..e406260dd3 100644 --- a/Buffs/StatDebuffs/WarCleave.cs +++ b/Buffs/StatDebuffs/WarCleave.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().wCleave = npc.buffTime[buffIndex]; + if (npc.Calamity().wCleave < npc.buffTime[buffIndex]) + npc.Calamity().wCleave = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/WhisperingDeath.cs b/Buffs/StatDebuffs/WhisperingDeath.cs index e0e86ef1e2..f3e27198fd 100644 --- a/Buffs/StatDebuffs/WhisperingDeath.cs +++ b/Buffs/StatDebuffs/WhisperingDeath.cs @@ -24,7 +24,8 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.Calamity().wDeath = npc.buffTime[buffIndex]; + if (npc.Calamity().wDeath < npc.buffTime[buffIndex]) + npc.Calamity().wDeath = npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Projectiles/Rogue/ShroomerangSpore.cs b/Projectiles/Rogue/ShroomerangSpore.cs index 7135cb1310..2bf75fdea7 100644 --- a/Projectiles/Rogue/ShroomerangSpore.cs +++ b/Projectiles/Rogue/ShroomerangSpore.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.ignoreWater = true; projectile.timeLeft = 3600; + projectile.Calamity().rogue = true; } public override void AI()