Skip to content

Commit

Permalink
reduce spawn rate of stone soldier in hm
Browse files Browse the repository at this point in the history
  • Loading branch information
direwolf420 committed Apr 25, 2022
1 parent 672521b commit 4f6a604
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions NPCs/Chunky.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public override void HitEffect(int hitDirection, double damage)

public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (Main.hardMode) return SpawnCondition.Corruption.Chance * 0.05f;
return SpawnCondition.Corruption.Chance * 0.2f;
return SpawnCondition.Corruption.Chance * (Main.hardMode ? 0.05f : 0.2f);
}

public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
Expand Down
6 changes: 1 addition & 5 deletions NPCs/DemonEyeWandering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ public override void ModifyNPCLoot(NPCLoot npcLoot)

public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (Main.hardMode)
{
return SpawnCondition.OverworldNightMonster.Chance * 0.025f;
}
return 0f;
return SpawnCondition.OverworldNightMonster.Chance * (Main.hardMode ? 0.025f : 0f);
}

public override void HitEffect(int hitDirection, double damage)
Expand Down
3 changes: 1 addition & 2 deletions NPCs/Meatball.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public override void HitEffect(int hitDirection, double damage)

public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (Main.hardMode) return SpawnCondition.Crimson.Chance * 0.04f;
return SpawnCondition.Crimson.Chance * 0.15f;
return SpawnCondition.Crimson.Chance * (Main.hardMode ? 0.04f : 0.15f);
}

public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
Expand Down
4 changes: 2 additions & 2 deletions NPCs/SpawnOfOcram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override void SetDefaults()

public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (NPC.downedGolemBoss && !NPC.AnyNPCs(ModContent.NPCType<SpawnOfOcram>()))
if (NPC.downedGolemBoss && !NPC.AnyNPCs(NPC.type))
{
return SpawnCondition.OverworldNightMonster.Chance * 0.005f;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color d

Texture2D texture = TextureAssets.Npc[NPC.type].Value;

Vector2 drawOrigin = new Vector2(Terraria.GameContent.TextureAssets.Npc[NPC.type].Value.Width * 0.5f, NPC.height * 0.5f);
Vector2 drawOrigin = new Vector2(texture.Width * 0.5f, NPC.height * 0.5f);
//the higher the k, the older the position
//Length is implicitely set in TrailCacheLength up there
//start from half the length so the origninal sprite isnt super blurred
Expand Down
2 changes: 1 addition & 1 deletion NPCs/StoneSoldier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public override void SetDefaults()

public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
return SpawnCondition.Cavern.Chance * 0.04f;
return SpawnCondition.Cavern.Chance * (Main.hardMode ? 0.01f : 0.04f);
}

public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
Expand Down

0 comments on commit 4f6a604

Please sign in to comment.