TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ SpawnNPC_SpawnFrog()

static void Terraria.NPC.SpawnNPC_SpawnFrog ( int spawnTileX,
int spawnTileY,
int plr )
inlinestatic

Definition at line 90231 of file NPC.cs.

90232 {
90233 if (!unlockedSlimeYellowSpawn && Main.player[plr].RollLuck(30) == 0 && !AnyNPCs(687))
90234 {
90235 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16, 687);
90236 }
90237 else if (Main.player[plr].RollLuck(goldCritterChance) == 0)
90238 {
90239 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16, 445);
90240 }
90241 else
90242 {
90243 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16, 361);
90244 }
90245 }
static int goldCritterChance
Definition NPC.cs:468
static bool AnyNPCs(int Type)
Returns true if there are any active NPC in the world of the given NPC type (F:Terraria....
Definition NPC.cs:106615
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...
Definition NPC.cs:91239
static bool unlockedSlimeYellowSpawn
Definition NPC.cs:758
static IEntitySource GetSpawnSourceForNaturalSpawn()
Definition NPC.cs:107538

References Terraria.Main.player.