diff --git a/NPCs/Chunky.cs b/NPCs/Chunky.cs index 95799975..c2d75e2a 100644 --- a/NPCs/Chunky.cs +++ b/NPCs/Chunky.cs @@ -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) diff --git a/NPCs/DemonEyeWandering.cs b/NPCs/DemonEyeWandering.cs index 390edb33..a80f5351 100644 --- a/NPCs/DemonEyeWandering.cs +++ b/NPCs/DemonEyeWandering.cs @@ -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) diff --git a/NPCs/Meatball.cs b/NPCs/Meatball.cs index 88856255..fd2e8f73 100644 --- a/NPCs/Meatball.cs +++ b/NPCs/Meatball.cs @@ -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) diff --git a/NPCs/SpawnOfOcram.cs b/NPCs/SpawnOfOcram.cs index 40c38139..cb62dd3d 100644 --- a/NPCs/SpawnOfOcram.cs +++ b/NPCs/SpawnOfOcram.cs @@ -48,7 +48,7 @@ public override void SetDefaults() public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (NPC.downedGolemBoss && !NPC.AnyNPCs(ModContent.NPCType())) + if (NPC.downedGolemBoss && !NPC.AnyNPCs(NPC.type)) { return SpawnCondition.OverworldNightMonster.Chance * 0.005f; } @@ -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 diff --git a/NPCs/StoneSoldier.cs b/NPCs/StoneSoldier.cs index 6a26667a..0db55967 100644 --- a/NPCs/StoneSoldier.cs +++ b/NPCs/StoneSoldier.cs @@ -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)