Removed Bloodletting Servants

This commit is contained in:
CongratsIsTrash committed 2025-06-22 18:08:22 -04:00
1 parent ca2007f7ce
commit 0e4299b94d
13 files changed
+10 -373

No files matched your search

-2
View File
@@ -308,7 +308,6 @@ namespace CalamityMod
40, // 48 in phase 2, 56 in phase 3
75 } }, // Vanilla: 113 in phase 2; Rev+: 90 in phase 2, 105 in phase 3
{ NPCID.ServantofCthulhu, new int[] { 18, 24, 30, 54 } },
{ ModContent.NPCType<BloodlettingServant>(), new int[] { 20, 26, 34, 63 } }, // In phase 2: 26, 34, 44, 82
{ ModContent.NPCType<Crabulon>(), new int[] { 40, 64, 80, 144 } },
{ ModContent.NPCType<CrabShroom>(), new int[] { 25, 50, 62, 111 } },
@@ -541,7 +540,6 @@ namespace CalamityMod
{ new Tuple<int, int>(ModContent.NPCType<DesertNuisanceHeadYoung>(), ModContent.ProjectileType<DesertScourgeSpit>()), new int[] { 26, 36, 44, 84 } },
{ new Tuple<int, int>(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 114 } },
{ new Tuple<int, int>(ModContent.NPCType<BloodlettingServant>(), ProjectileID.BloodShot), new int[] { 26, 36, 44, 84 } },
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBomb>()), new int[] { 32, 48, 60, 108 } },
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBombFall>()), new int[] { 32, 48, 60, 108 } },
+1 -1
View File
@@ -164,7 +164,7 @@ namespace CalamityMod.Events
ModContent.NPCType<DesertNuisanceBody>(), ModContent.NPCType<DesertNuisanceTail>(), ModContent.NPCType<DesertNuisanceHeadYoung>(),
ModContent.NPCType<DesertNuisanceBodyYoung>(), ModContent.NPCType<DesertNuisanceTailYoung>() }),
new Boss(NPCID.EyeofCthulhu, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.ServantofCthulhu, ModContent.NPCType<BloodlettingServant>() }),
new Boss(NPCID.EyeofCthulhu, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.ServantofCthulhu }),
new Boss(ModContent.NPCType<Crabulon>(), TimeChangeContext.Day, type =>
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

@@ -147,7 +147,6 @@ AeroSlime.DisplayName: Aero Slime
ArmoredDiggerHead.DisplayName: Armored Digger
MechanizedSerpent: Mechanized Serpent
AuroraSpirit.DisplayName: Aurora Spirit
BloodlettingServant.DisplayName: Bloodletting Servant
BloomSlime.DisplayName: Bloom Slime
Bohldohr.DisplayName: Bohldohr
BucketZombie.DisplayName: "{$NPCName.Zombie}"
-326
View File
@@ -1,326 +0,0 @@
using System;
using CalamityMod.Events;
using CalamityMod.Gores;
using CalamityMod.NPCs.VanillaNPCAIOverrides.RegularEnemies;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.NPCs.NormalNPCs
{
public class BloodlettingServant : ModNPC
{
private const float ChargeGateValue = 180f;
private const float ChargeTelegraphGateValue = 90f;
private const float ChargeDuration = 60f;
private const float ChargeDuration_Death = 50f;
public override void SetStaticDefaults()
{
Main.npcFrameCount[Type] = 6;
NPCID.Sets.TrailingMode[Type] = 1;
NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true };
NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData);
}
public override void SetDefaults()
{
NPC.aiStyle = -1;
AIType = -1;
NPC.GetNPCDamage();
NPC.width = 44;
NPC.height = 30;
if (Main.tenthAnniversaryWorld)
NPC.scale *= 0.5f;
if (CalamityWorld.LegendaryMode)
NPC.scale *= 1.1f;
NPC.defense = 5;
NPC.lifeMax = 96;
NPC.knockBackResist = 0f;
NPC.noGravity = true;
NPC.noTileCollide = true;
NPC.HitSound = SoundID.NPCHit1;
NPC.DeathSound = SoundID.NPCDeath1;
NPC.Calamity().VulnerableToCold = true;
NPC.Calamity().VulnerableToHeat = true;
NPC.Calamity().VulnerableToSickness = true;
}
public override void AI()
{
Lighting.AddLight(NPC.Center, 0.3f, 0.3f, 0.3f);
NPC.TargetClosest();
Player target = Main.player[NPC.target];
bool targetDead = target.dead;
bool phase2 = NPC.life < NPC.lifeMax * 0.5;
float enrageScale = 1f + NPC.ai[2];
float enrageScaleMaxSpeedBonus = 2f * enrageScale;
float maxSpeedX = (phase2 ? (CalamityWorld.death ? 10f : 8f) : (CalamityWorld.death ? 8f : 6f)) + enrageScaleMaxSpeedBonus;
float maxSpeedY = (phase2 ? (CalamityWorld.death ? 8f : 6f) : (CalamityWorld.death ? 4f : 3f)) + enrageScaleMaxSpeedBonus;
float xAccel = maxSpeedX * 0.01f;
float xAccelBoost1 = maxSpeedX * 0.01f;
float xAccelBoost2 = maxSpeedX * 0.0075f;
float yAccel = maxSpeedY * 0.01f;
float yAccelBoost1 = maxSpeedY * 0.01f;
float yAccelBoost2 = maxSpeedY * 0.0075f;
float chargeVelocity = 12f + enrageScaleMaxSpeedBonus * 2f;
bool attemptingToCharge = NPC.ai[0] >= ChargeGateValue;
bool farEnoughForCharge = NPC.Distance(target.Center) >= 320f;
bool closeEnoughForCharge = NPC.Distance(target.Center) < 480f;
bool charging = (attemptingToCharge && farEnoughForCharge && closeEnoughForCharge) || NPC.ai[1] > 0f;
float projectileShootGateValue = CalamityWorld.death ? 180f : 270f;
if (CalamityWorld.LegendaryMode)
projectileShootGateValue *= 0.5f;
Vector2 lookAt = target.Center - NPC.Center;
float rateOfRotation = charging ? 0f : 0.1f;
float chargeDuration = CalamityWorld.death ? ChargeDuration_Death : ChargeDuration;
NPC.Calamity().canBreakPlayerDefense = charging;
if (charging)
{
if (NPC.ai[1] == 0f)
{
SoundEngine.PlaySound(SoundID.NPCDeath9, NPC.Center);
NPC.velocity = lookAt.SafeNormalize(Vector2.UnitY) * chargeVelocity;
NPC.spriteDirection = lookAt.X < 0f ? -1 : 1;
NPC.rotation = NPC.velocity.ToRotation() + (lookAt.X < 0f ? MathHelper.Pi : 0f);
NPC.ai[1] = 1f;
if (NPC.ai[3] > projectileShootGateValue * 0.5f)
NPC.ai[3] = projectileShootGateValue * 0.5f;
NPC.ForceNetUpdate();
}
if (NPC.ai[1] < ChargeDuration + 1f)
{
NPC.ai[1] += 1f;
if (NPC.ai[1] > ChargeDuration + 1f - 10f)
NPC.velocity *= 0.8f;
if (NPC.ai[1] >= ChargeDuration + 1f)
{
NPC.ai[0] = 0f;
NPC.ai[1] = 0f;
NPC.ForceNetUpdate();
}
}
}
else
{
if (lookAt.X > 0f)
{
NPC.spriteDirection = 1;
NPC.rotation = lookAt.ToRotation();
}
if (lookAt.X < 0f)
{
NPC.spriteDirection = -1;
NPC.rotation = lookAt.ToRotation() + MathHelper.Pi;
}
}
if (phase2)
{
NPC.damage = (int)Math.Round(NPC.defDamage * 1.3);
if (NPC.ai[0] < ChargeGateValue && !targetDead)
{
NPC.ai[0] += 1f;
if (NPC.ai[0] == ChargeGateValue)
NPC.ForceNetUpdate();
}
}
else
NPC.damage = NPC.defDamage;
if (targetDead)
{
NPC.velocity.Y -= 0.04f;
if (NPC.timeLeft > 10)
NPC.timeLeft = 10;
}
else if (!attemptingToCharge)
{
DemonEyeAI.DemonEyeBatMovement(NPC, maxSpeedX, maxSpeedY, xAccel, xAccelBoost1, xAccelBoost2, yAccel, yAccelBoost1, yAccelBoost2);
NPC.ai[3] += enrageScale;
bool shootProjectile = Collision.CanHitLine(NPC.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(NPC.Center, target.Center) > 240f;
if (NPC.ai[3] >= projectileShootGateValue && shootProjectile)
{
NPC.ai[3] = 0f;
float projectileSpeed = CalamityWorld.death ? 16f : 12f;
Vector2 projectileVelocity = NPC.SafeDirectionTo(target.Center) * projectileSpeed;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int projType = ProjectileID.BloodShot;
int projDamage = NPC.GetProjectileDamage(projType);
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 10f, projectileVelocity, projType, projDamage, 0f, Main.myPlayer);
Main.projectile[proj].timeLeft = 600;
}
NPC.ForceNetUpdate();
}
float pushVelocity = 0.2f * enrageScale;
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active)
{
if (i != NPC.whoAmI && Main.npc[i].type == NPC.type)
{
if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 48f * NPC.scale)
{
if (NPC.position.X < Main.npc[i].position.X)
NPC.velocity.X -= pushVelocity;
else
NPC.velocity.X += pushVelocity;
if (NPC.position.Y < Main.npc[i].position.Y)
NPC.velocity.Y -= pushVelocity;
else
NPC.velocity.Y += pushVelocity;
}
}
}
}
}
else if (!charging)
{
Vector2 destination = target.Center + new Vector2(-280f * NPC.spriteDirection, -280f);
Vector2 desiredVelocity = NPC.SafeDirectionTo(destination, -Vector2.UnitY) * chargeVelocity;
NPC.SimpleFlyMovement(desiredVelocity, enrageScale);
}
if (Main.rand.NextBool(20))
{
Vector2 dustSpawnTopLeft = new Vector2(NPC.position.X, NPC.position.Y + NPC.height * 0.25f);
Dust blood = Dust.NewDustDirect(dustSpawnTopLeft, NPC.width, NPC.height / 2, DustID.Blood, NPC.velocity.X, 2f, 0, new Color(128, 0, 0, 255 - NPC.alpha), 1f);
blood.velocity.X *= 0.5f;
blood.velocity.Y *= 0.1f;
}
}
public override void FindFrame(int frameHeight)
{
NPC.frameCounter += 1D;
if (NPC.life < NPC.lifeMax * 0.5)
{
if (NPC.frame.Y < frameHeight * 3)
NPC.frame.Y = frameHeight * 3;
if (NPC.frameCounter >= 8D)
{
NPC.frameCounter = 0D;
NPC.frame.Y += frameHeight;
if (NPC.frame.Y > frameHeight * 5)
NPC.frame.Y = frameHeight * 3;
}
}
else
{
if (NPC.frameCounter >= 8D)
{
NPC.frameCounter = 0D;
NPC.frame.Y += frameHeight;
if (NPC.frame.Y > frameHeight * 2)
NPC.frame.Y = 0;
}
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
if (NPC.ai[0] >= ChargeTelegraphGateValue)
{
Texture2D npcTexture = TextureAssets.Npc[Type].Value;
Color originalColor = NPC.GetAlpha(drawColor);
Color newColor = new Color(192, 0, 0, 255 - NPC.alpha);
Vector2 drawPosition = NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY);
Vector2 origin = NPC.frame.Size() / 2;
SpriteEffects spriteEffects = SpriteEffects.None;
if (NPC.spriteDirection == 1)
spriteEffects = SpriteEffects.FlipHorizontally;
float telegraphScalar = MathHelper.Clamp((NPC.ai[0] - ChargeTelegraphGateValue) / ChargeTelegraphGateValue, 0f, 1f);
Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar);
if (CalamityClientConfig.Instance.Afterimages && NPC.ai[1] > 0f)
{
int afterimageAmount = 10;
int afterImageIncrement = 2;
for (int j = 0; j < afterimageAmount; j += afterImageIncrement)
{
Color afterimageColor = telegraphColor;
afterimageColor = Color.Lerp(afterimageColor, originalColor, 0.5f);
afterimageColor = NPC.GetAlpha(afterimageColor);
afterimageColor *= (afterimageAmount - j) / 15f;
Vector2 afterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos;
afterimagePos -= new Vector2(npcTexture.Width, npcTexture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f;
afterimagePos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY);
spriteBatch.Draw(npcTexture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f);
}
}
spriteBatch.Draw(npcTexture, drawPosition, NPC.frame, telegraphColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f);
return false;
}
return true;
}
public override void HitEffect(NPC.HitInfo hit)
{
if (Main.dedServ)
return;
if (NPC.life > 0)
{
for (int i = 0; i < hit.Damage / (double)NPC.lifeMax * 100; i++)
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f);
if (NPC.life < NPC.lifeMax * 0.5f && NPC.localAI[0] == 0f)
{
NPC.localAI[0] = 1f;
Gore.NewGore(NPC.GetSource_FromThis(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("BloodlettingServant1").Type);
for (int i = 0; i < 50; i++)
{
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 2f * hit.HitDirection, -2f);
Main.dust[dust].scale = Main.rand.NextFloat(1.6f, 2.4f);
Main.dust[dust].velocity *= Main.rand.NextFloat(1.6f, 2.4f);
Main.dust[dust].color = new Color(128, 0, 0, 255 - NPC.alpha);
}
}
}
else
{
for (int i = 0; i < 100; i++)
{
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 2f * hit.HitDirection, -2f);
Main.dust[dust].scale = Main.rand.NextFloat(1.6f, 2.4f);
Main.dust[dust].velocity *= Main.rand.NextFloat(1.6f, 2.4f);
Main.dust[dust].color = new Color(128, 0, 0, 255 - NPC.alpha);
}
for (int g = 2; g <= 4; g++)
{
Vector2 goreVel = NPC.velocity.RotatedByRandom(MathHelper.Pi);
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, goreVel, Mod.Find<ModGore>("BloodlettingServant" + g).Type);
}
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

@@ -338,16 +338,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int spawnType = NPCID.ServantofCthulhu;
if (death)
{
int maxBloodServants = 2;
bool spawnBloodServant = NPC.CountNPCS(ModContent.NPCType<BloodlettingServant>()) < maxBloodServants;
if (spawnBloodServant)
spawnType = ModContent.NPCType<BloodlettingServant>();
}
int servantSpawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, spawnType, 0, 0f, 0f, enrageScale);
int servantSpawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu, 0, 0f, 0f, enrageScale);
Main.npc[servantSpawn].velocity.X = servantSpawnVelocity.X;
Main.npc[servantSpawn].velocity.Y = servantSpawnVelocity.Y;
@@ -759,39 +750,23 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
Vector2 servantSpawnVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * servantAndProjectileVelocity;
Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset;
int spawnType = NPCID.ServantofCthulhu;
bool spawnServant = false;
float enrageScaleToPass = enrageScale;
if (death)
{
int maxBloodServants = 2;
bool spawnBloodServant = NPC.CountNPCS(ModContent.NPCType<BloodlettingServant>()) < maxBloodServants;
if (spawnBloodServant)
{
spawnType = ModContent.NPCType<BloodlettingServant>();
spawnServant = true;
enrageScaleToPass += 0.5f;
}
else
{
int maxServants = death ? 1 : 2;
spawnServant = (penultimatePhaseDeath || finalPhaseRev) ? false : NPC.CountNPCS(NPCID.ServantofCthulhu) < maxServants;
}
}
else
{
int maxServants = death ? (finalPhaseDeath ? 1 : penultimatePhaseDeath ? 2 : 3) : (finalPhaseRev ? 2 : 4);
spawnServant = NPC.CountNPCS(NPCID.ServantofCthulhu) < maxServants;
}
int maxServants = death ? (finalPhaseDeath ? 1 : penultimatePhaseDeath ? 2 : 3) : (finalPhaseRev ? 2 : 4);
bool spawnServant = NPC.CountNPCS(NPCID.ServantofCthulhu) < maxServants;
if (spawnServant)
{
SoundEngine.PlaySound(SoundID.NPCDeath13, servantSpawnCenter);
for (int m = 0; m < 10; m++)
Dust.NewDust(servantSpawnCenter, 20, 20, DustID.Blood, servantSpawnVelocity.X * 0.4f, servantSpawnVelocity.Y * 0.4f, 0, default, 1f);
}
if (Main.netMode != NetmodeID.MultiplayerClient)
{
if (spawnServant)
{
int eye = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, spawnType, 0, 0f, 0f, enrageScaleToPass);
int eye = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu, 0, 0f, 0f, enrageScaleToPass);
Main.npc[eye].velocity.X = servantSpawnVelocity.X;
Main.npc[eye].velocity.Y = servantSpawnVelocity.Y;
@@ -821,12 +796,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
}
}
}
if (spawnServant)
{
for (int m = 0; m < 10; m++)
Dust.NewDust(servantSpawnCenter, 20, 20, DustID.Blood, servantSpawnVelocity.X * 0.4f, servantSpawnVelocity.Y * 0.4f, 0, default, 1f);
}
}
float requiredDistanceForHorizontalCharge = 160f;
@@ -99,7 +99,6 @@ namespace CalamityMod.Systems.Collections
NPCType<DesertNuisanceTailYoung>(),
NPCType<PolterPhantom>(),
NPCType<PhantomFuckYou>(),
NPCType<BloodlettingServant>(),
NPCType<KingSlimeJewelEmerald>(),
NPCType<KingSlimeJewelRuby>(),
NPCType<KingSlimeJewelSapphire>(),
@@ -32,7 +32,6 @@ namespace CalamityMod.Systems.Collections
{ NPCID.EyeofCthulhu, 450000 }, // 30 seconds
{ NPCID.ServantofCthulhu, 6000 },
{ NPCType<BloodlettingServant>(), 12000 },
{ NPCID.EaterofWorldsHead, 10000 }, // 30 seconds + immunity timer at start
{ NPCID.EaterofWorldsBody, 10000 },
@@ -42,7 +42,6 @@ namespace CalamityMod.Systems.Collections
NPCType<KingSlimeJewelSapphire>(),
NPCType<KingSlimeJewelEmerald>(),
NPCID.EyeofCthulhu,
NPCType<BloodlettingServant>(),
NPCID.EaterofWorldsHead,
NPCID.EaterofWorldsBody,
NPCID.EaterofWorldsTail,