Merge: Voidfrost / Nightwither split

This commit is contained in:
Cameron Ewell authored and GitHub committed 2024-07-30 20:16:16 -04:00
commit ef6c6849e6
52 files changed
+227 -63

No files matched your search

+6 -6
View File
@@ -37,16 +37,16 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool(hasDebuffResistance ? 4 : 2))
{
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Cyan : Color.Turquoise, Color.PaleTurquoise, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
GeneralParticleHandler.SpawnParticle(spark);
}
for (int i = 0; i < (hasDebuffResistance ? 1 : 2); i++)
{
Vector2 dustCorner = Player.position - 2f * Vector2.One;
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 160 : 206, dustVel.X, dustVel.Y);
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
Main.dust[d].scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.4f) : Main.rand.NextFloat(0.5f, 0.7f);
Main.dust[d].scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.3f) : Main.rand.NextFloat(0.5f, 0.5f);
Main.dust[d].alpha = 235;
}
}
@@ -57,16 +57,16 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool(3))
{
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
CritSpark spark = new CritSpark(npcSize, Vect, Main.rand.NextBool() ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, 0.8f, 15, 2f, 1.9f);
CritSpark spark = new CritSpark(npcSize, Vect, Main.rand.NextBool() ? Color.Cyan : Color.Turquoise, Color.PaleTurquoise, 0.8f, 15, 2f, 1.9f);
GeneralParticleHandler.SpawnParticle(spark);
}
for (int i = 0; i < 2; i++)
{
Vector2 dustCorner = npc.position - 2f * Vector2.One;
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 160 : 206, dustVel.X, dustVel.Y);
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
Main.dust[d].scale = Main.rand.NextFloat(0.6f, 0.8f);
Main.dust[d].scale = Main.rand.NextFloat(0.5f, 0.5f);
Main.dust[d].alpha = 235;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 623 B

+81
View File
@@ -0,0 +1,81 @@
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class Voidfrost : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().voidfrost = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().voidfrost < npc.buffTime[buffIndex])
npc.Calamity().voidfrost = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
{
Player Player = drawInfo.drawPlayer;
if (Main.rand.NextBool(5))
{
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
SnowflakeSparkle snowflake = new SnowflakeSparkle(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, 0.4f, 15, 2f, 1.9f);
GeneralParticleHandler.SpawnParticle(snowflake);
}
if (Main.rand.NextBool(40))
{
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
MediumMistParticle mist = new MediumMistParticle(Player.Calamity().RandomDebuffVisualSpot, Vect, new Color(172, 238, 255), new Color(145, 170, 188), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.02f);
GeneralParticleHandler.SpawnParticle(mist);
}
Vector2 dustCorner = Player.position - 2f * Vector2.One;
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
Main.dust[d].scale = Main.rand.NextFloat(1f, 0.3f);
Main.dust[d].alpha = 10;
}
internal static void DrawEffects(NPC npc, ref Color drawColor)
{
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
if (Main.rand.NextBool(5))
{
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
SnowflakeSparkle snowflake = new SnowflakeSparkle(npcSize, Vect, Main.rand.NextBool() ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, 0.8f, 15, 2f, 1.9f);
GeneralParticleHandler.SpawnParticle(snowflake);
}
if (Main.rand.NextBool(40))
{
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
MediumMistParticle mist = new MediumMistParticle(npcSize, Vect, new Color(172, 238, 255), new Color(145, 170, 188), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.02f);
GeneralParticleHandler.SpawnParticle(mist);
}
Vector2 dustCorner = npc.position - 2f * Vector2.One;
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
Main.dust[d].scale = Main.rand.NextFloat(1f, 0.3f);
Main.dust[d].alpha = 10;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

+3
View File
@@ -916,6 +916,7 @@ namespace CalamityMod.CalPlayer
public bool absorberAffliction = false;
public bool sulphurPoison = false;
public bool nightwither = false;
public bool voidfrost = false;
public bool eutrophication = false;
public bool iCantBreathe = false; //Frozen Lungs debuff
public bool cragsLava = false;
@@ -2001,6 +2002,7 @@ namespace CalamityMod.CalPlayer
snowmanNoseless = false;
sulphurPoison = false;
nightwither = false;
voidfrost = false;
eutrophication = false;
iCantBreathe = false;
cragsLava = false;
@@ -2432,6 +2434,7 @@ namespace CalamityMod.CalPlayer
abyssalDivingSuitPlateHits = 0;
sulphurPoison = false;
nightwither = false;
voidfrost = false;
eutrophication = false;
iCantBreathe = false;
cragsLava = false;
+3
View File
@@ -269,6 +269,9 @@ namespace CalamityMod.CalPlayer
if (calamityPlayer.nightwither && drawInfo.shadow == 0f) // Looks weaker if you have Moon Stone equipped
Nightwither.DrawEffects(drawInfo, reducedNightwitherDamage);
if (calamityPlayer.voidfrost && drawInfo.shadow == 0f)
Voidfrost.DrawEffects(drawInfo);
if (calamityPlayer.pFlames && drawInfo.shadow == 0f)
Plague.DrawEffects(drawInfo);
+1
View File
@@ -107,6 +107,7 @@ namespace CalamityMod.CalPlayer
ApplyDoTDebuff(daybroken, reducedDaybrokenDamage ? 20 : 40, purity);
ApplyDoTDebuff(nightwither, reducedNightwitherDamage ? 20 : 40, purity);
ApplyDoTDebuff(hFlames, 40, purity);
ApplyDoTDebuff(voidfrost, 40, purity);
ApplyDoTDebuff(vHex, 35);
ApplyDoTDebuff(cDepth, 18, purity);
ApplyDoTDebuff(astralInfection, 24, infectedJewel || purity);
-1
View File
@@ -3439,7 +3439,6 @@ namespace CalamityMod.CalPlayer
Player.lavaImmune = true;
Player.fireWalk = true;
Player.buffImmune[ModContent.BuffType<HolyFlames>()] = Main.dayTime || empowered;
Player.buffImmune[ModContent.BuffType<Nightwither>()] = !Main.dayTime || empowered;
Player.buffImmune[BuffID.OnFire] = true;
Player.buffImmune[BuffID.Burning] = true;
Player.buffImmune[BuffID.Daybreak] = true;
+6 -6
View File
@@ -290,6 +290,10 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<WhisperingDeath>(), 60);
break;
case ProjectileID.LunarFlare:
target.AddBuff(BuffType<Nightwither>(), 180);
break;
case ProjectileID.Cascade:
target.AddBuff(BuffID.OnFire, 60);
break;
@@ -1262,13 +1266,9 @@ namespace CalamityMod.CalPlayer
if (pSoulArtifact && !profanedCrystal)
target.AddBuff(BuffType<HolyFlames>(), 300);
if (profanedCrystalBuffs)
if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs))
{
bool empowered = pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
if (empowered || Main.dayTime)
target.AddBuff(BuffType<HolyFlames>(), 600);
if (empowered || !Main.dayTime)
target.AddBuff(BuffType<Nightwither>(), 600);
target.AddBuff(BuffType<HolyFlames>(), 600);
}
if (divineBless)
+1
View File
@@ -83,6 +83,7 @@ namespace CalamityMod.Items.Accessories
player.buffImmune[BuffID.Daybreak] = true;
player.buffImmune[ModContent.BuffType<Nightwither>()] = true;
player.buffImmune[ModContent.BuffType<HolyFlames>()] = true;
player.buffImmune[ModContent.BuffType<Voidfrost>()] = true;
// Immune to God Slayer Inferno itself
player.buffImmune[ModContent.BuffType<GodSlayerInferno>()] = true;
@@ -63,6 +63,7 @@ namespace CalamityMod.Items.Armor.Fearmonger
ModContent.BuffType<Shadowflame>(),
ModContent.BuffType<BrimstoneFlames>(),
ModContent.BuffType<HolyFlames>(),
ModContent.BuffType<Voidfrost>(),
ModContent.BuffType<GodSlayerInferno>(),
BuffID.Chilled,
BuffID.Frozen,
+3
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -34,12 +35,14 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
if (player.whoAmI == Main.myPlayer)
SpawnFlaresNPC(player, Item.knockBack, GetOnHitDamage(player), target);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
if (player.whoAmI == Main.myPlayer)
SpawnFlaresPvp(player, Item.knockBack, GetOnHitDamage(player), target);
}
@@ -1557,3 +1557,8 @@ AeolianEarthBuff: {
Damage reduction increased by 8%, damage increased by 18%
'''
}
Voidfrost: {
DisplayName: Voidfrost
Description: The emptiness of space devours all warmth and life
}
@@ -246,7 +246,7 @@ AsgardianAegis: {
Bleeding, Poisoned, Acid Venom, Sulphuric Poisoning, Slow, Confused,
Silenced, Cursed, Darkness, Webbed, Mighty Wind, Stoned, Armor Crunch,
Blackout, Brain Rot, Burning Blood, Cursed Inferno, Brimstone Flames,
Shadowflame, Daybroken, Nightwither, Holy Flames, God Slayer Inferno, Burning
Shadowflame, Daybroken, Nightwither, Holy Flames, Voidfrost, God Slayer Inferno, Burning
'''
}
+15
View File
@@ -285,6 +285,7 @@ namespace CalamityMod.NPCs
public int nightwither = 0;
public int shocked = 0;
public int transformerShocked = 0;
public int voidfrost = 0;
public int shellfishVore = 0;
public int clamDebuff = 0;
public int sulphurPoison = 0;
@@ -508,6 +509,7 @@ namespace CalamityMod.NPCs
myClone.nightwither = nightwither;
myClone.shocked = shocked;
myClone.transformerShocked = transformerShocked;
myClone.voidfrost = voidfrost;
myClone.shellfishVore = shellfishVore;
myClone.clamDebuff = clamDebuff;
myClone.sulphurPoison = sulphurPoison;
@@ -1029,6 +1031,13 @@ namespace CalamityMod.NPCs
ApplyDPSDebuff(baseNightwitherDoTValue, baseNightwitherDoTValue / 5, ref npc.lifeRegen, ref damage);
}
// Voidfrost
if (voidfrost > 0)
{
int baseVoidfrostDoTValue = (int)(300 * coldDamageMult);
ApplyDPSDebuff(baseVoidfrostDoTValue, baseVoidfrostDoTValue / 5, ref npc.lifeRegen, ref damage);
}
// Plague
if (pFlames > 0)
{
@@ -5260,6 +5269,8 @@ namespace CalamityMod.NPCs
shocked--;
if (transformerShocked > 0)
transformerShocked--;
if (voidfrost > 0)
voidfrost--;
if (shellfishVore > 0)
shellfishVore--;
if (clamDebuff > 0)
@@ -6638,6 +6649,9 @@ namespace CalamityMod.NPCs
if (pearlAura > 0)
PearlAura.DrawEffects(npc, ref drawColor);
if (voidfrost > 0)
Voidfrost.DrawEffects(npc, ref drawColor);
if (pFlames > 0) // Plague debuff
Plague.DrawEffects(npc, ref drawColor);
@@ -6853,6 +6867,7 @@ namespace CalamityMod.NPCs
("CalamityMod/Buffs/DamageOverTime/SulphuricPoisoning", NPC => NPC.Calamity().sulphurPoison > 0),
("CalamityMod/Buffs/DamageOverTime/Vaporfied", NPC => NPC.Calamity().vaporfied > 0),
("CalamityMod/Buffs/DamageOverTime/VermillionFlux", NPC => NPC.Calamity().vermillionFlux > 0),
("CalamityMod/Buffs/DamageOverTime/Voidfrost", NPC => NPC.Calamity().voidfrost > 0),
("CalamityMod/Buffs/DamageOverTime/VulnerabilityHex", NPC => NPC.Calamity().vulnerabilityHex > 0),
// All other important Calamity debuffs, in alphabetical order
+3 -3
View File
@@ -3059,11 +3059,11 @@ namespace CalamityMod.NPCs.Providence
Multiplier = 0.75f;
break;
case (int)Providence.BossMode.Blue: // Same as night
case (int)Providence.BossMode.Night:
case (int)Providence.BossMode.Blue: // Night Providence no longer inflicts a different debuff, but Blue GFB Providence does
BuffType = ModContent.BuffType<Nightwither>();
break;
case (int)Providence.BossMode.Night: //Same as Day, will inflict Holy Flames
break;
case (int)Providence.BossMode.Violet:
BuffType = ModContent.BuffType<Shadowflame>();
Multiplier = 0.60f;
+1 -1
View File
@@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Boss
if (info.Damage <= 0)
return;
target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
}
}
}
+1 -1
View File
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss
if (info.Damage <= 0)
return;
target.AddBuff(ModContent.BuffType<Nightwither>(), 80);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 80);
}
public override Color? GetAlpha(Color lightColor)
+1 -1
View File
@@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.velocity.Length() >= Projectile.ai[0])
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 180);
}
}
+1 -1
View File
@@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Boss
if (info.Damage <= 0)
return;
target.AddBuff(ModContent.BuffType<Nightwither>(), 80);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 80);
}
}
}
+6 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -57,6 +58,10 @@ namespace CalamityMod.Projectiles.Magic
Main.dust[moreGreen].fadeIn = 1f;
Main.dust[moreGreen].noGravity = true;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
public override void OnKill(int timeLeft)
{
+1 -1
View File
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Magic
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
}
public override void OnKill(int timeLeft)
+1 -1
View File
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
Player player = Main.player[Projectile.owner];
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
if (Projectile.localAI[1] <= 0f && Projectile.owner == Main.myPlayer)
{
+3 -3
View File
@@ -115,18 +115,18 @@ namespace CalamityMod.Projectiles.Melee
return new Color(150, Main.DiscoG, 255, 127);
}*/
// Only inflict Nightwither if not spawned from Icebreaker
// Only inflict Voidfrost if not spawned from Icebreaker
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (Projectile.ai[2] != 1f)
target.AddBuff(ModContent.BuffType<Nightwither>(), 420);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 420);
Projectile.direction = Main.player[Projectile.owner].direction;
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
if (Projectile.ai[2] != 1f)
target.AddBuff(ModContent.BuffType<Nightwither>(), 420);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 420);
Projectile.direction = Main.player[Projectile.owner].direction;
}
}
+1 -1
View File
@@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 240);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 240);
Projectile.localAI[1] = 4f;
}
}
+1 -1
View File
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
}
+1 -1
View File
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
}
+1 -1
View File
@@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 240);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 240);
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, radius, targetHitbox);
+6
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -65,6 +66,11 @@ namespace CalamityMod.Projectiles.Melee
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 200f, 10f, 20f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item122, Projectile.position);
+5
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -104,6 +105,10 @@ namespace CalamityMod.Projectiles.Melee
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Voidfrost>(), 800);
}
public override void OnKill(int timeLeft)
{
+6 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -44,5 +45,9 @@ namespace CalamityMod.Projectiles.Melee
CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 12f, 20f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Voidfrost>(), 80);
}
}
}
@@ -63,13 +63,13 @@ namespace CalamityMod.Projectiles.Melee.Shortswords
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 300);
SpawnMeteor(Main.player[Projectile.owner]);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 300);
SpawnMeteor(Main.player[Projectile.owner]);
}
+2
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Projectiles.BaseProjectiles;
using Microsoft.Xna.Framework;
@@ -70,5 +71,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
Main.dust[idx].velocity = Vector2.Zero;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
+4 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Weapons.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -151,6 +152,8 @@ namespace CalamityMod.Projectiles.Melee
float scale = Main.rand.NextFloat(1.0f, 1.8f);
Main.dust[idx].scale = scale;
}
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
public override void OnKill(int timeLeft)
+6 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -43,5 +44,9 @@ namespace CalamityMod.Projectiles.Melee
CalamityUtils.HomeInOnNPC(Projectile, true, 320f, 14f, 20f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 60);
}
}
}
-1
View File
@@ -73,7 +73,6 @@ namespace CalamityMod.Projectiles.Ranged
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 200f, speed, 12f);
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
+1 -1
View File
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 450);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 450);
SoundEngine.PlaySound(HalleysInferno.Hit, Projectile.Center);
// Dust emission on hit
+6 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -94,6 +95,10 @@ namespace CalamityMod.Projectiles.Ranged
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
public override void OnKill(int timeLeft)
{
+4 -3
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -74,13 +75,13 @@ namespace CalamityMod.Projectiles.Rogue
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 300);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 300);
target.AddBuff(ModContent.BuffType<GlacialState>(), 150);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
target.AddBuff(BuffID.Frostburn2, 300);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 300);
target.AddBuff(ModContent.BuffType<GlacialState>(), 150);
}
+4 -3
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
@@ -70,9 +71,9 @@ namespace CalamityMod.Projectiles.Rogue
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frostburn2, 120);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Frostburn2, 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
public override bool PreDraw(ref Color lightColor)
{
+6
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using Microsoft.Xna.Framework;
using Terraria;
@@ -51,6 +52,11 @@ namespace CalamityMod.Projectiles.Rogue
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Vortex, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
public override void OnKill(int timeLeft)
{
if (lunarEnhance)
+2 -2
View File
@@ -55,13 +55,13 @@ namespace CalamityMod.Projectiles.Rogue
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), Projectile.timeLeft);
target.AddBuff(ModContent.BuffType<Voidfrost>(), Projectile.timeLeft);
OnHitEffects();
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), Projectile.timeLeft);
target.AddBuff(ModContent.BuffType<Voidfrost>(), Projectile.timeLeft);
OnHitEffects();
}
+2 -2
View File
@@ -63,9 +63,9 @@ namespace CalamityMod.Projectiles.Rogue
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
public override bool OnTileCollide(Vector2 oldVelocity)
{
+2 -2
View File
@@ -96,9 +96,9 @@ namespace CalamityMod.Projectiles.Rogue
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 120);
public override bool OnTileCollide(Vector2 oldVelocity)
{
+3 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
using Microsoft.Xna.Framework;
@@ -351,7 +352,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
public override bool? CanDamage() => AttackMode == 2;
+2 -1
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
@@ -145,7 +146,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
public override bool? CanDamage() => AttackMode == 2;
+3 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -104,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
}
+3 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -125,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frostburn, 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
}
+6 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -45,5 +46,9 @@ namespace CalamityMod.Projectiles.Summon
}
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
float x4 = Main.rgbToHsl(new Color(103, 203, Main.DiscoB)).X;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<SiriusExplosion>(), Projectile.damage, Projectile.knockBack, Projectile.owner, x4, Projectile.whoAmI);
}
+1 -1
View File
@@ -231,6 +231,6 @@ namespace CalamityMod.Projectiles.Summon
return new Color(255 - Projectile.alpha, 255 - Projectile.alpha, 255 - Projectile.alpha, 0);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
+2 -2
View File
@@ -147,7 +147,7 @@ namespace CalamityMod
private static readonly int[] scalImmunities = new int[4] { BuffID.OnFire, BuffID.OnFire3, ModContent.BuffType<BrimstoneFlames>(), ModContent.BuffType<VulnerabilityHex>() };
private static readonly int[] astralEnemyImmunities = new int[2] { BuffID.Poisoned, ModContent.BuffType<AstralInfectionDebuff>() };
private static readonly int[] plagueEnemyImmunities = new int[3] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<Plague>() };
private static readonly int[] holyEnemyImmunities = new int[4] { BuffID.OnFire, BuffID.OnFire3, ModContent.BuffType<HolyFlames>(), ModContent.BuffType<Nightwither>() };
private static readonly int[] holyEnemyImmunities = new int[4] { BuffID.OnFire, BuffID.OnFire3, ModContent.BuffType<HolyFlames>(), BuffID.Daybreak };
#endregion
#region Load/Unload
@@ -271,7 +271,7 @@ namespace CalamityMod
{ ModContent.NPCType<CosmicLantern>(), immuneToEverything },
{ ModContent.NPCType<CosmicMine>(), immuneToEverything },
{ ModContent.NPCType<Polterghast>(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType<Nightwither>(), ModContent.BuffType<WhisperingDeath>() }) },
{ ModContent.NPCType<Polterghast>(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType<Nightwither>(), ModContent.BuffType<Voidfrost>(), ModContent.BuffType<WhisperingDeath>() }) },
{ ModContent.NPCType<PolterPhantom>(), immuneToEverything },
{ ModContent.NPCType<PhantomFuckYou>(), immuneToEverything },
{ ModContent.NPCType<PolterghastHook>(), immuneToEverything },