85828 {
85829
85830
85831
85836 if ((
double)player.position.Y > Main.worldSurface * 16.0 + (
double)(
logicCheckScreenHeight / 2) || player.nearbyActiveNPCs >
num)
85837 {
85838 return;
85839 }
85840 float num2 = player.nearbyActiveNPCs /
num;
85842 if (Main.expertMode)
85843 {
85844 num3 = (int)((
double)
num3 * 0.85);
85845 }
85846 if (Main.GameModeInfo.IsJourneyMode)
85847 {
85850 {
85851 if (
power.GetShouldDisableSpawnsFor(
plr))
85852 {
85853 return;
85854 }
85856 {
85858 }
85859 }
85860 }
85861 if (Main.rand.Next(
num3) != 0)
85862 {
85863 return;
85864 }
85874 {
85875 return;
85876 }
85878 if (Main.rand.Next(200) == 0)
85879 {
85880 Main.npc[
num8].SetDefaults(-4);
85881 }
85882 else if (Main.expertMode)
85883 {
85884 if (Main.rand.Next(7) == 0)
85885 {
85886 Main.npc[
num8].SetDefaults(-7);
85887 }
85888 else if (Main.rand.Next(3) == 0)
85889 {
85890 Main.npc[
num8].SetDefaults(-3);
85891 }
85892 }
85893 else if (Main.rand.Next(10) == 0)
85894 {
85895 Main.npc[
num8].SetDefaults(-7);
85896 }
85897 else if (Main.rand.Next(5) < 2)
85898 {
85899 Main.npc[
num8].SetDefaults(-3);
85900 }
85901 }
static readonly CreativePowerManager Instance
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
Spawns an NPC into the game world with the given type. This method should not be called on multipla...
static IEntitySource GetSpawnSourceForNaturalSpawn()