Normal enemies
This commit is contained in:
1 parent
008530b3be
commit
4ef59b4959
8 files changed
+19
-19
No files matched your search
@@ -5602,7 +5602,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int slimeAmt = CalamityWorld.LegendaryMode ? Main.rand.Next(6) + 10 : Main.rand.Next(2) + 2; // 2 to 3 extra
|
||||
int slimeAmt = Main.rand.Next(2) + 2; // 2 to 3 extra
|
||||
for (int s = 0; s < slimeAmt; s++)
|
||||
{
|
||||
int slime = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)(npc.position.Y + npc.height), NPCID.BlueSlime, 0, 0f, 0f, 0f, 0f, 255);
|
||||
@@ -5610,8 +5610,8 @@ namespace CalamityMod.NPCs
|
||||
npc2.SetDefaults(NPCID.BabySlime);
|
||||
npc2.velocity.X = npc.velocity.X * 2f;
|
||||
npc2.velocity.Y = npc.velocity.Y;
|
||||
npc2.velocity.X += Main.rand.Next(-20, 20) * (CalamityWorld.LegendaryMode ? 0.5f : 0.1f) + s * npc.direction * (CalamityWorld.LegendaryMode ? 0.5f : 0.3f);
|
||||
npc2.velocity.Y -= Main.rand.Next(0, 10) * (CalamityWorld.LegendaryMode ? 0.5f : 0.1f) + s;
|
||||
npc2.velocity.X += Main.rand.Next(-20, 20) * 0.1f + s * npc.direction * 0.3f;
|
||||
npc2.velocity.Y -= Main.rand.Next(10) * 0.1f + s;
|
||||
npc2.ai[0] = -1000 * Main.rand.Next(3);
|
||||
|
||||
if (Main.dedServ && slime < Main.maxNPCs)
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses && NPC.downedPlantBoss && !NPC.AnyNPCs(ModContent.NPCType<ArmoredDiggerHead>()))
|
||||
{
|
||||
float spawnRateDivisor = CalamityWorld.LegendaryMode ? 125f : CalamityWorld.revenge ? 425f : 500f;
|
||||
float spawnRateDivisor = CalamityWorld.revenge ? 425f : 500f;
|
||||
return 1 / spawnRateDivisor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
npcPos.X += velocity.X;
|
||||
npcPos.Y += velocity.Y;
|
||||
int spread = CalamityWorld.LegendaryMode ? 100 : 20;
|
||||
for (int i = 0; i < (CalamityWorld.LegendaryMode ? 10 : 2); i++)
|
||||
int spread = 20;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
velocity = Main.player[NPC.target].Center - npcPos;
|
||||
targetDist = velocity.Length();
|
||||
@@ -404,7 +404,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
return SpawnCondition.Sky.Chance * (CalamityWorld.LegendaryMode ? 0.5f : 0.1f);
|
||||
return SpawnCondition.Sky.Chance * 0.1f;
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
// Spawn some off-screen enemies to act as threats if the player enters the field.
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int enemiesToSpawn = CalamityWorld.LegendaryMode ? 4 : CalamityWorld.death ? 3 : CalamityWorld.revenge ? 2 : 1;
|
||||
int enemiesToSpawn = Main.getGoodWorld ? 4 : CalamityWorld.death ? 3 : CalamityWorld.revenge ? 2 : 1;
|
||||
for (int i = 0; i < enemiesToSpawn; i++)
|
||||
{
|
||||
int tries = 0;
|
||||
@@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
else if (tries < 500 && Main.zenithWorld)
|
||||
{
|
||||
//Summon the army
|
||||
int npcToSpawn = CalamityWorld.LegendaryMode ? 0 : Main.rand.Next(0, 4);
|
||||
int npcToSpawn = Main.rand.Next(0, 4);
|
||||
switch (enemiesToSpawn)
|
||||
{
|
||||
case 0:
|
||||
@@ -186,11 +186,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
Dust.NewDust(npcAtIndex.position, npcAtIndex.width, npcAtIndex.height, DustID.Electric);
|
||||
}
|
||||
}
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
laserDelay--;
|
||||
NPC.spriteDirection = (player.Center.X - NPC.Center.X < 0).ToDirectionInt();
|
||||
for (int times = CalamityWorld.LegendaryMode ? 3 : 2; times > 0 && laserDelay == 0; times--)
|
||||
for (int times = 3; times > 0 && laserDelay == 0; times--)
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.UnitX * 6f * NPC.spriteDirection, NPC.SafeDirectionTo(player.Center, Vector2.UnitY) * 4.5f, ProjectileID.SaucerMissile, 10, 0f);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
int spread = 15;
|
||||
for (int times = CalamityWorld.LegendaryMode ? 3 : 2; times > 0; times--)
|
||||
for (int times = 3; times > 0; times--)
|
||||
{
|
||||
Vector2 velocity = NPC.SafeDirectionTo(player.Center, Vector2.UnitY) * 6f;
|
||||
Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-2, 3), velocity.Y + Main.rand.Next(-2, 3)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
|
||||
@@ -128,8 +128,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
NPC.direction = direction;
|
||||
NPC.ForceNetUpdate();
|
||||
}
|
||||
//GOTTA GO FAST (Legendary only)
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
//GOTTA GO FAST (FTW only)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
NPC.velocity *= 1.01f;
|
||||
//Overcharged
|
||||
|
||||
@@ -317,8 +317,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
}
|
||||
}
|
||||
}
|
||||
//Become a spark piñata in Legendary
|
||||
if (CalamityWorld.LegendaryMode && Supercharged)
|
||||
//Become a spark piñata in FTW
|
||||
if (Main.getGoodWorld && Supercharged)
|
||||
{
|
||||
for (int Sparks = Main.rand.Next(2, 5); Sparks > 0; Sparks--)
|
||||
{
|
||||
|
||||
@@ -97,11 +97,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
if (Supercharged)
|
||||
{
|
||||
SuperchargeTimer--;
|
||||
NPC.defense = CalamityWorld.LegendaryMode ? 20 : 13;
|
||||
NPC.defense = Main.getGoodWorld ? 20 : 13;
|
||||
}
|
||||
else if (!Supercharged)
|
||||
{
|
||||
NPC.defense = CalamityWorld.LegendaryMode ? 10 : 4;
|
||||
NPC.defense = Main.getGoodWorld ? 10 : 4;
|
||||
}
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
@@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
Main.projectile[mine].hostile = true;
|
||||
Main.projectile[mine].timeLeft = 60;
|
||||
}
|
||||
mineDelay = CalamityWorld.LegendaryMode ? 3 : 5;
|
||||
mineDelay = 3;
|
||||
}
|
||||
else if (Main.zenithWorld && mineDelay >= 1)
|
||||
mineDelay--;
|
||||
|
||||
Reference in new issue
Block a user