Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
fca10eb985
163 files changed
+437
-224
No files matched your search
@@ -4975,57 +4975,6 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region On Hit
|
||||
public override void OnHitByNPC(NPC npc, int damage, bool crit)
|
||||
{
|
||||
if (sulfurSet)
|
||||
npc.AddBuff(BuffID.Poisoned, 120);
|
||||
|
||||
if (npc.type == NPCID.ShadowFlameApparition || (npc.type == NPCID.ChaosBall && (Main.hardMode || areThereAnyDamnBosses)))
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
|
||||
}
|
||||
else if (npc.type == NPCID.Spazmatism && npc.ai[0] != 1f && npc.ai[0] != 2f && npc.ai[0] != 0f)
|
||||
{
|
||||
Player.AddBuff(BuffID.Bleeding, 600);
|
||||
}
|
||||
else if (npc.type == NPCID.Plantera && npc.life < npc.lifeMax / 2)
|
||||
{
|
||||
Player.AddBuff(BuffID.Poisoned, 600);
|
||||
}
|
||||
else if (npc.type == NPCID.PlanterasTentacle)
|
||||
{
|
||||
Player.AddBuff(BuffID.Poisoned, 300);
|
||||
}
|
||||
else if (npc.type == NPCID.AncientDoom)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
|
||||
}
|
||||
else if (npc.type == NPCID.AncientLight)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
|
||||
}
|
||||
else if (npc.type == NPCID.HallowBoss)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<HolyFlames>(), 480);
|
||||
}
|
||||
else if (npc.type == NPCID.BloodNautilus)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<BurningBlood>(), 480);
|
||||
}
|
||||
else if (npc.type == NPCID.GoblinShark || npc.type == NPCID.BloodEelHead)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<BurningBlood>(), 300);
|
||||
}
|
||||
else if (npc.type == NPCID.BloodEelBody)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<BurningBlood>(), 180);
|
||||
}
|
||||
else if (npc.type == NPCID.BloodEelTail)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<BurningBlood>(), 120);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitByProjectile(Projectile proj, int damage, bool crit)
|
||||
{
|
||||
if (sulfurSet && !proj.friendly)
|
||||
@@ -6886,6 +6835,9 @@ namespace CalamityMod.CalPlayer
|
||||
#region Defense Damage Function
|
||||
private void DealDefenseDamage(int damage)
|
||||
{
|
||||
if (damage <= 0)
|
||||
return;
|
||||
|
||||
double ratioToUse = DefenseDamageRatio;
|
||||
if (draedonsHeart)
|
||||
ratioToUse *= 0.5;
|
||||
|
||||
@@ -164,7 +164,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -250,7 +250,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -198,7 +198,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Venom, 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -256,7 +256,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
|
||||
|
||||
if (puffedUp)
|
||||
{
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.Center = ((player7.gravDir == 1f) ? player7.Top : player7.Bottom) + new Vector2((float)(player7.direction * 4), 0f);
|
||||
NPC.gfxOffY = player7.gfxOffY;
|
||||
NPC.velocity = Vector2.Zero;
|
||||
player7.AddBuff(163, 59, true);
|
||||
player7.AddBuff(BuffID.Obstructed, 59, true);
|
||||
}
|
||||
}
|
||||
NPC.rotation = NPC.velocity.X * 0.05f;
|
||||
@@ -548,7 +548,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -365,7 +365,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Darkness, 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Darkness, 120, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -298,7 +298,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -294,7 +294,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -558,7 +558,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,8 +241,11 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
player.AddBuff(BuffID.Darkness, 180, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
player.AddBuff(BuffID.Darkness, 180, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -167,7 +167,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 60, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 60, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 180, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -235,8 +235,11 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 240, true);
|
||||
player.AddBuff(BuffID.Electrified, 120, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 240, true);
|
||||
player.AddBuff(BuffID.Electrified, 120, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -94,7 +94,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 90, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Venom, 90, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -340,7 +340,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 90);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 90);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -642,7 +642,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 300, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -137,7 +137,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Poisoned, 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Poisoned, 240, true);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -133,7 +133,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 120, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -194,6 +194,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -497,7 +497,11 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
{
|
||||
|
||||
@@ -206,6 +206,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
CalamityGlobalNPC.DrawGlowmask(NPC, spriteBatch, ModContent.Request<Texture2D>(Texture + "Glow").Value);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,8 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,8 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 420);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 420);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -518,7 +518,11 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
{
|
||||
|
||||
@@ -171,7 +171,11 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
postAS.AddFail(ModContent.ItemType<CausticCroakerStaff>(), 20, hideLootReport: DownedBossSystem.downedAquaticScourge);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) => CalamityGlobalNPC.DrawGlowmask(NPC, spriteBatch, ModContent.Request<Texture2D>(Texture + "Glow").Value, true);
|
||||
}
|
||||
|
||||
@@ -230,6 +230,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,6 +200,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,6 +252,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
postPolter.AddFail(ModContent.ItemType<CorrodedFossil>(), 3, 1, 3, DownedBossSystem.downedPolterghast);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,7 +209,8 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
if (damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1435,7 +1435,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
if (NPC.Opacity == 1f)
|
||||
if (NPC.Opacity == 1f && damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<CrushDepth>(), 600, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,8 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,8 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,8 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 480, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 480, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,8 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,8 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<Irradiated>(), 120, true);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -119,7 +119,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -347,7 +347,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -179,7 +179,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public static void ModifyAstralachneaLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -128,7 +128,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot) => AstralachneaGround.ModifyAstralachneaLoot(npcLoot);
|
||||
|
||||
@@ -639,7 +639,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -178,7 +178,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
@@ -269,7 +270,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
private void DoKillDust()
|
||||
|
||||
@@ -304,7 +304,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -212,7 +212,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -139,7 +139,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -147,7 +147,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 60, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 60, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
+2
-1
@@ -304,7 +304,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 60, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 60, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -127,7 +127,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -505,7 +505,8 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 480, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 480, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,8 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180, true);
|
||||
}
|
||||
|
||||
public override bool CheckDead()
|
||||
|
||||
@@ -210,7 +210,8 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300, true);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -338,7 +338,8 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 480, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 480, true);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -191,7 +191,8 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180, true);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -113,7 +113,8 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240, true);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight) // 9 total frames
|
||||
|
||||
@@ -307,7 +307,8 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,8 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,8 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4149,6 +4149,12 @@ namespace CalamityMod.NPCs
|
||||
#region On Hit Player
|
||||
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage <= 0)
|
||||
return;
|
||||
|
||||
if (target.Calamity().sulfurSet)
|
||||
npc.AddBuff(BuffID.Poisoned, 120);
|
||||
|
||||
if (target.Calamity().snowman)
|
||||
{
|
||||
if (npc.type == NPCID.Demon || npc.type == NPCID.VoodooDemon || npc.type == NPCID.RedDevil)
|
||||
@@ -4159,6 +4165,27 @@ namespace CalamityMod.NPCs
|
||||
|
||||
switch (npc.type)
|
||||
{
|
||||
case NPCID.ShadowFlameApparition:
|
||||
target.AddBuff(BuffType<Shadowflame>(), 180);
|
||||
break;
|
||||
case NPCID.ChaosBall:
|
||||
if (Main.hardMode || CalamityPlayer.areThereAnyDamnBosses)
|
||||
target.AddBuff(BuffType<Shadowflame>(), 180);
|
||||
break;
|
||||
|
||||
case NPCID.Spazmatism:
|
||||
if (npc.ai[0] != 1f && npc.ai[0] != 2f && npc.ai[0] != 0f)
|
||||
target.AddBuff(BuffID.Bleeding, 600);
|
||||
break;
|
||||
|
||||
case NPCID.Plantera:
|
||||
if (npc.life < npc.lifeMax / 2)
|
||||
target.AddBuff(BuffID.Poisoned, 600);
|
||||
break;
|
||||
case NPCID.PlanterasTentacle:
|
||||
target.AddBuff(BuffID.Poisoned, 300);
|
||||
break;
|
||||
|
||||
case NPCID.Golem:
|
||||
target.AddBuff(BuffType<ArmorCrunch>(), 480);
|
||||
break;
|
||||
@@ -4170,6 +4197,32 @@ namespace CalamityMod.NPCs
|
||||
target.AddBuff(BuffType<ArmorCrunch>(), 240);
|
||||
break;
|
||||
|
||||
case NPCID.AncientDoom:
|
||||
target.AddBuff(BuffType<Shadowflame>(), 180);
|
||||
break;
|
||||
case NPCID.AncientLight:
|
||||
target.AddBuff(BuffType<HolyFlames>(), 180);
|
||||
break;
|
||||
|
||||
case NPCID.HallowBoss:
|
||||
target.AddBuff(BuffType<HolyFlames>(), 480);
|
||||
break;
|
||||
|
||||
case NPCID.BloodNautilus:
|
||||
target.AddBuff(BuffType<BurningBlood>(), 480);
|
||||
break;
|
||||
|
||||
case NPCID.GoblinShark:
|
||||
case NPCID.BloodEelHead:
|
||||
target.AddBuff(BuffType<BurningBlood>(), 300);
|
||||
break;
|
||||
case NPCID.BloodEelBody:
|
||||
target.AddBuff(BuffType<BurningBlood>(), 180);
|
||||
break;
|
||||
case NPCID.BloodEelTail:
|
||||
target.AddBuff(BuffType<BurningBlood>(), 120);
|
||||
break;
|
||||
|
||||
case NPCID.Lavabat:
|
||||
target.AddBuff(BuffID.OnFire, 180);
|
||||
break;
|
||||
|
||||
@@ -271,7 +271,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.VortexDebuff, 60, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.VortexDebuff, 60, true);
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
|
||||
@@ -130,7 +130,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -71,7 +71,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -64,7 +64,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -77,7 +77,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -95,7 +95,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -278,7 +278,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -250,7 +250,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -303,7 +303,8 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -1237,8 +1237,11 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 240, true);
|
||||
player.AddBuff(BuffID.Chilled, 120, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 240, true);
|
||||
player.AddBuff(BuffID.Chilled, 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,8 +94,11 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 240, true);
|
||||
player.AddBuff(BuffID.Chilled, 120, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 240, true);
|
||||
player.AddBuff(BuffID.Chilled, 120, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -161,7 +161,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 60, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 60, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -443,7 +443,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 30, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 30, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 240, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -769,7 +769,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 600, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 600, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 120, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 120, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,7 +210,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 90, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 90, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -506,8 +506,11 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 240, true);
|
||||
player.AddBuff(ModContent.BuffType<WhisperingDeath>(), 480, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 240, true);
|
||||
player.AddBuff(ModContent.BuffType<WhisperingDeath>(), 480, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2516,6 +2516,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
if (damage <= 0)
|
||||
return;
|
||||
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300, true);
|
||||
player.AddBuff(ModContent.BuffType<WhisperingDeath>(), 600, true);
|
||||
|
||||
|
||||
@@ -446,8 +446,11 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180, true);
|
||||
player.AddBuff(ModContent.BuffType<WhisperingDeath>(), 360, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180, true);
|
||||
player.AddBuff(ModContent.BuffType<WhisperingDeath>(), 360, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -657,7 +657,8 @@ namespace CalamityMod.NPCs.GreatSandShark
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 600, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 600, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
if (NPC.ai[1] == 1f)
|
||||
if (NPC.ai[1] == 1f || damage <= 0)
|
||||
return;
|
||||
|
||||
player.AddBuff(BuffID.Frostburn, 240, true);
|
||||
|
||||
@@ -256,7 +256,8 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Bleeding, 240, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -818,7 +818,8 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Bleeding, 600, true);
|
||||
if (damage > 0)
|
||||
target.AddBuff(BuffID.Bleeding, 600, true);
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
|
||||
@@ -98,8 +98,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 90, true);
|
||||
player.AddBuff(BuffID.Chilled, 60, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 90, true);
|
||||
player.AddBuff(BuffID.Chilled, 60, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -95,7 +95,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Confused, 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Confused, 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -75,7 +75,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Darkness, 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Darkness, 240, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -63,8 +63,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 120, true);
|
||||
player.AddBuff(BuffID.Chilled, 90, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 120, true);
|
||||
player.AddBuff(BuffID.Chilled, 90, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -97,8 +97,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 120, true);
|
||||
player.AddBuff(BuffID.Chilled, 90, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 120, true);
|
||||
player.AddBuff(BuffID.Chilled, 90, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -75,7 +75,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Weak, 240, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Weak, 240, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -97,7 +97,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 180, true);
|
||||
if (damage > 0)
|
||||
player.AddBuff(BuffID.Venom, 180, true);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -288,7 +288,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<ArmorCrunch>(), 180);
|
||||
if (damage > 0)
|
||||
player.AddBuff(ModContent.BuffType<ArmorCrunch>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -260,8 +260,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 180, true);
|
||||
player.AddBuff(BuffID.Chilled, 120, true);
|
||||
if (damage > 0)
|
||||
{
|
||||
player.AddBuff(BuffID.Frostburn, 180, true);
|
||||
player.AddBuff(BuffID.Chilled, 120, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
Loaded 100 of 163 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user