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

◆ GetStatScalingFactors()

static void Terraria.NPC.GetStatScalingFactors ( int numPlayers,
out float balance,
out float boost )
inlinestatic

Definition at line 12645 of file NPC.cs.

12646 {
12647 balance = 1f;
12648 boost = 0.35f;
12649 for (int i = 1; i < numPlayers; i++)
12650 {
12651 balance += boost;
12652 boost += (1f - boost) / 3f;
12653 }
12654 if (balance > 8f)
12655 {
12656 balance = (balance * 2f + 8f) / 3f;
12657 }
12658 if (balance > 1000f)
12659 {
12660 balance = 1000f;
12661 }
12662 }

Referenced by Terraria.NPC.GetBalance(), Terraria.NPC.GetMyBalance(), and Terraria.NPC.ScaleStats().