Removed every instance of antibutcher

This commit is contained in:
Dominic authored and Cameron Ewell committed 2022-01-17 16:10:21 -05:00
1 parent 98107ebe0d
commit beb669be04
20 files changed
+6 -63

No files matched your search

-1
View File
@@ -81,7 +81,6 @@ namespace CalamityMod.Localization
new [] { "SCalFunnyCheatText", "Go to hell." },
new [] { "EdgyBossText", "Don't get cocky, kid!" },
new [] { "EdgyBossText2", "You think... you can butcher... ME!?" },
new [] { "EdgyBossText3", "A fatal mistake!" },
new [] { "EdgyBossText4", "Good luck recovering from that!" },
new [] { "EdgyBossText5", "Delicious..." },
@@ -1323,11 +1323,6 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm
return minDist <= 70f && npc.Opacity == 1f;
}
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
{
return !CalamityUtils.AntiButcher(npc, ref damage, 0.1f);
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
scale = 1.5f;
+1 -1
View File
@@ -347,7 +347,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
return false;
}
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
return true;
}
public override bool CheckDead()
@@ -2343,14 +2343,6 @@ namespace CalamityMod.NPCs.DevourerofGods
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
{
if (CalamityUtils.AntiButcher(npc, ref damage, 0.5f))
{
string key = "Mods.CalamityMod.EdgyBossText2";
Color messageColor = Color.Cyan;
CalamityUtils.DisplayLocalizedText(key, messageColor);
return false;
}
if (!Dying && (damage * (crit ? 2D : 1D)) >= npc.life)
{
damage = 0D;
+1 -1
View File
@@ -400,7 +400,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
return false;
}
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
return true;
}
public override bool CheckDead()
-2
View File
@@ -1367,8 +1367,6 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
return minDist <= 100f && npc.Opacity == 1f && AIState == (float)Phase.ChargeCombo;
}
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
scale = 2f;
-2
View File
@@ -856,8 +856,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
scale = 2f;
-2
View File
@@ -460,8 +460,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override void FindFrame(int frameHeight)
{
// Use telegraph frames when using gauss nuke
-2
View File
@@ -531,8 +531,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override void FindFrame(int frameHeight)
{
// Use telegraph frames when using deathrays
@@ -459,8 +459,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override void FindFrame(int frameHeight)
{
// Use telegraph frames when using plasma bolts
-2
View File
@@ -453,8 +453,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override void FindFrame(int frameHeight)
{
// Use telegraph frames when using tesla orbs
-2
View File
@@ -1173,8 +1173,6 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
return minDist <= 100f && npc.Opacity == 1f && AIState == (float)Phase.Charge;
}
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) => !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
scale = 2f;
+1 -1
View File
@@ -552,7 +552,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (npc.Calamity().newAI[2] < ThanatosHead.immunityTime)
damage *= 0.01;
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
return true;
}
public override void FindFrame(int frameHeight) // 5 total frames
+1 -1
View File
@@ -553,7 +553,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (npc.Calamity().newAI[2] < ThanatosHead.immunityTime)
damage *= 0.01;
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
return true;
}
public override void FindFrame(int frameHeight) // 5 total frames
+1 -1
View File
@@ -983,7 +983,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (npc.localAI[3] < immunityTime)
damage *= 0.01;
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
return true;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
+1 -1
View File
@@ -553,7 +553,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
if (npc.Calamity().newAI[2] < ThanatosHead.immunityTime)
damage *= 0.01;
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
return true;
}
public override void FindFrame(int frameHeight) // 5 total frames
@@ -2796,11 +2796,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
#endregion
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
{
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
}
// Prevent the player from accidentally killing SCal instead of having her turn into a town NPC.
public override bool CheckDead()
{
@@ -209,11 +209,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
}
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
{
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
SpriteEffects spriteEffects = SpriteEffects.None;
@@ -213,11 +213,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
}
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
{
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
SpriteEffects spriteEffects = SpriteEffects.None;
-14
View File
@@ -271,20 +271,6 @@ namespace CalamityMod
return ClosestNPCAt(origin, maxDistanceToCheck, ignoreTiles);
}
/// <summary>
/// Crude anti-butcher logic based on % max health.
/// </summary>
/// <param name="npc">The NPC attacked.</param>
/// <param name="damage">How much damage the attack would deal.</param>
/// <returns>Whether or not the anti-butcher was triggered.</returns>
public static bool AntiButcher(NPC npc, ref double damage, float healthPercent)
{
if (damage <= npc.lifeMax * healthPercent)
return false;
damage = 0D;
return true;
}
/// <summary>
/// Check if an NPC is organic
/// </summary>