Error fixing for various NPCs.
This commit is contained in:
1 parent
78c967e973
commit
774792e234
78 files changed
+256
-255
No files matched your search
@@ -170,13 +170,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -189,8 +189,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,13 +220,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -238,8 +238,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 120, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,13 +170,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -187,8 +187,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 90, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,13 +109,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && NPC.CountNPCS(ModContent.NPCType<PerforatorHive>()) < 1)
|
||||
{
|
||||
|
||||
@@ -603,13 +603,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -644,8 +644,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 300, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -449,13 +449,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -511,8 +511,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,13 +545,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -585,8 +585,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -578,15 +578,15 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < damage / NPC.lifeMax * 100.0; k++)
|
||||
for (int k = 0; k < hit.Damage / NPC.lifeMax * 100.0; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
|
||||
@@ -165,13 +165,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -188,8 +188,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 90, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,13 +164,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -209,8 +209,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 60, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 60, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,13 +165,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -187,8 +187,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BurningBlood>(), 60, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 60, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,22 +66,22 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.PlagueBoomSound, NPC.Center);
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -129,14 +129,14 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.PlagueBoomSound, NPC.Center);
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,8 +149,8 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,22 +130,22 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 120, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.PlagueBoomSound, NPC.Center);
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -130,22 +130,22 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.PlagueBoomSound, NPC.Center);
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -617,7 +617,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -665,8 +665,8 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,14 +57,14 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.PlagueBoomSound, NPC.Center);
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -86,8 +86,8 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType<PlagueCellCanister>(), 1, 3, 4);
|
||||
|
||||
@@ -182,22 +182,22 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.PlagueBoomSound, NPC.Center);
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -246,15 +246,15 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
if (CalamityWorld.getFixedBoi) // it is the plague, you get very sick.
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 240, true);
|
||||
player.AddBuff(BuffID.Poisoned, 240, true);
|
||||
player.AddBuff(BuffID.Venom, 240, true);
|
||||
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 240, true);
|
||||
target.AddBuff(BuffID.Poisoned, 240, true);
|
||||
target.AddBuff(BuffID.Venom, 240, true);
|
||||
}
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 240, true);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 240, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,13 +262,13 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,15 +131,15 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
if (CalamityWorld.getFixedBoi) // it is the plague, you get very sick.
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 300, true);
|
||||
player.AddBuff(BuffID.Poisoned, 300, true);
|
||||
player.AddBuff(BuffID.Venom, 300, true);
|
||||
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 300, true);
|
||||
target.AddBuff(BuffID.Poisoned, 300, true);
|
||||
target.AddBuff(BuffID.Venom, 300, true);
|
||||
}
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 300, true);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 300, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1117,7 +1117,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
{
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -1320,15 +1320,15 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
if (CalamityWorld.getFixedBoi) // it is the plague, you get very sick.
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 480, true);
|
||||
player.AddBuff(BuffID.Poisoned, 480, true);
|
||||
player.AddBuff(BuffID.Venom, 480, true);
|
||||
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 480, true);
|
||||
target.AddBuff(BuffID.Poisoned, 480, true);
|
||||
target.AddBuff(BuffID.Venom, 480, true);
|
||||
}
|
||||
player.AddBuff(ModContent.BuffType<Plague>(), 480, true);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 480, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hit.HitDirection, -1f, 0, default, 1f);
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
NPC.position.X = NPC.position.X + (NPC.width / 2);
|
||||
|
||||
@@ -518,8 +518,8 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.MoonLeech, 360, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.MoonLeech, 360, true);
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
@@ -536,7 +536,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hit.HitDirection, -1f, 0, default, 1f);
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
NPC.position.X = NPC.position.X + (NPC.width / 2);
|
||||
|
||||
@@ -1333,8 +1333,8 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.MoonLeech, 900, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.MoonLeech, 900, true);
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
@@ -1351,7 +1351,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, hit.HitDirection, -1f, 0, default, 1f);
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
NPC.position.X = NPC.position.X + (NPC.width / 2);
|
||||
|
||||
@@ -476,13 +476,13 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 180, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1195,8 +1195,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<HolyFlames>(), 300, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 300, true);
|
||||
}
|
||||
|
||||
public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment)/* tModPorter Note: bossLifeScale -> balance (bossAdjustment is different, see the docs for details) */
|
||||
@@ -1208,7 +1208,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -1221,7 +1221,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
for (int k = 0; k < 50; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,8 +897,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<HolyFlames>(), 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 240, true);
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile projectile, ref NPC.HitModifiers modifiers)
|
||||
@@ -921,7 +921,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -934,7 +934,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
for (int k = 0; k < 50; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -580,14 +580,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<HolyFlames>(), 180, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -600,7 +600,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
for (int k = 0; k < 50; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,8 +330,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<HolyFlames>(), 120, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
@@ -359,7 +359,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
for (int k = 0; k < 30; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -188,7 +188,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
}
|
||||
|
||||
for (int k = 0; k < 30; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -197,7 +197,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
}
|
||||
|
||||
for (int k = 0; k < 50; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
}
|
||||
|
||||
for (int k = 0; k < 30; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2451,7 +2451,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
int dustType = ProvUtils.GetDustID(currentMode);
|
||||
for (int k = 0; k < 15; k++)
|
||||
{
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dustType, hitDirection, -1f, 0, default, 1f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dustType, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -870,8 +870,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 2f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 2f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -885,8 +885,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, hitDirection, -1f, 0, default, 2f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, hit.HitDirection, -1f, 0, default, 2f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -960,8 +960,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<ArmorCrunch>(), 480, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 480, true);
|
||||
}
|
||||
|
||||
public override void BossLoot(ref string name, ref int potionType)
|
||||
|
||||
@@ -294,8 +294,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
@@ -303,9 +303,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (NPC.life > 0)
|
||||
{
|
||||
int num285 = 0;
|
||||
while (num285 < damage / NPC.lifeMax * 100.0)
|
||||
while (num285 < hit.Damage / NPC.lifeMax * 100.0)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
num285++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,8 +295,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
@@ -304,9 +304,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (NPC.life > 0)
|
||||
{
|
||||
int num285 = 0;
|
||||
while (num285 < damage / NPC.lifeMax * 100.0)
|
||||
while (num285 < hit.Damage / NPC.lifeMax * 100.0)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
num285++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,9 +113,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (NPC.life > 0)
|
||||
{
|
||||
int num285 = 0;
|
||||
while ((double)num285 < damage / (double)NPC.lifeMax * 100.0)
|
||||
while ((double)num285 < hit.Damage / (double)NPC.lifeMax * 100.0)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, (float)hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, (float)hit.HitDirection, -1f, 0, default, 1f);
|
||||
num285++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -206,8 +206,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -89,8 +89,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -91,8 +91,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,9 +128,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage <= 0)
|
||||
if (hurtInfo.Damage <= 0)
|
||||
return;
|
||||
player.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240, true);
|
||||
|
||||
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240, true);
|
||||
SoundEngine.PlaySound(SoundID.Item14, NPC.Center);
|
||||
NPC.ai[0] = 0f;
|
||||
NPC.life = 0;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 204, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 204, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -1014,8 +1014,8 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<WhisperingDeath>(), 420, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 420, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
}
|
||||
public override void OnKill()
|
||||
@@ -86,8 +86,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Weak, 90, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Weak, 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,13 +48,13 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,8 +92,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Weak, 90, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Weak, 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,13 +63,13 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,8 +107,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Darkness, 90, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Darkness, 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,13 +155,13 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,8 +177,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Darkness, 90, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Darkness, 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -688,7 +688,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,8 +699,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Darkness, 300, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Darkness, 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -701,7 +701,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,8 +712,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Weak, 300, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Weak, 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -649,18 +649,18 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson;
|
||||
color.A = 150;
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, color, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, color, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
int debufftype = CalamityWorld.getFixedBoi ? BuffID.VortexDebuff : BuffID.Slow;
|
||||
player.AddBuff(debufftype, 180, true);
|
||||
player.AddBuff(BuffID.Weak, 180, true);
|
||||
player.AddBuff(BuffID.Darkness, 180, true);
|
||||
target.AddBuff(debufftype, 180, true);
|
||||
target.AddBuff(BuffID.Weak, 180, true);
|
||||
target.AddBuff(BuffID.Darkness, 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -726,8 +726,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Darkness, 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Darkness, 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -701,7 +701,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
dustColor.A = 150;
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 4, hit.HitDirection, -1f, NPC.alpha, dustColor, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -739,8 +739,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Weak, 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Weak, 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,8 +320,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
int buffDuration = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] >= chargePhaseGateValue ? 240 : 120;
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Electrified, buffDuration, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, buffDuration, true);
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
@@ -332,7 +332,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
|
||||
@@ -890,8 +890,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
int buffDuration = NPC.Calamity().newAI[0] >= chargePhaseGateValue ? 480 : 240;
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Electrified, buffDuration, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, buffDuration, true);
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
@@ -902,7 +902,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
|
||||
@@ -320,14 +320,14 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
int buffDuration = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] >= chargePhaseGateValue ? 120 : 60;
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Electrified, buffDuration, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, buffDuration, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
|
||||
@@ -218,8 +218,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
@@ -228,7 +228,7 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 15; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -131,8 +131,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 120, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
@@ -158,13 +158,13 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -90,8 +90,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
@@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -109,8 +109,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
@@ -132,13 +132,13 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 15; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -102,8 +102,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
@@ -154,13 +154,13 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 15; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -93,8 +93,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
@@ -116,13 +116,13 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -324,8 +324,8 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
@@ -361,13 +361,13 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -157,13 +157,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,13 +124,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -225,13 +225,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -217,13 +217,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -152,21 +152,21 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Electrified, 120, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,13 +478,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -183,7 +183,7 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
}
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,13 +153,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 25; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 68, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,13 +312,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -133,13 +133,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -130,13 +130,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -130,13 +130,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -130,13 +130,13 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 37, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
|
||||
@@ -2892,7 +2892,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
@@ -2931,8 +2931,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 600, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 600, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2936,8 +2936,8 @@ namespace CalamityMod.NPCs.Yharon
|
||||
#region On Hit Player
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Dragonfire>(), 240, true);
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Dragonfire>(), 240, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -3110,7 +3110,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user