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

◆ ScaleStats_ApplyGameMode()

void Terraria.NPC.ScaleStats_ApplyGameMode ( GameModeData gameModeData)
inlineprivate

Definition at line 13268 of file NPC.cs.

13269 {
13270 bool num3 = type >= 0 && NPCID.Sets.ProjectileNPC[type];
13271 int num2 = 0;
13272 if (!gameModeData.IsJourneyMode && Main.getGoodWorld)
13273 {
13274 num2++;
13275 }
13276 if (!num3)
13277 {
13278 value = (int)(value * (gameModeData.EnemyMoneyDropMultiplier + (float)num2));
13279 lifeMax = (int)((float)lifeMax * (gameModeData.EnemyMaxLifeMultiplier + (float)num2));
13280 }
13281 damage = (int)((float)damage * (gameModeData.EnemyDamageMultiplier + (float)num2));
13283 }
static bool[] ProjectileNPC
If true for a given NPC type (F:Terraria.NPC.type), then that NPC is treated specially for difficulty...
Definition NPCID.cs:365
int damage
The amount of contact damage this NPC deals. Changing this WILL NOT change the amount of damage done...
Definition NPC.cs:1027
int lifeMax
The maximum life of this NPC.
Definition NPC.cs:1077
float knockBackResist
How much of the knockback it receives will actually apply. 1f: full knockback; 0f: no knockback....
Definition NPC.cs:1110
float value
How many copper coins the NPC will drop when killed (100 copper coins = 1 silver coin etc....
Definition NPC.cs:1156
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990

References Terraria.NPC.damage, Terraria.DataStructures.GameModeData.EnemyMoneyDropMultiplier, Terraria.Main.getGoodWorld, Terraria.DataStructures.GameModeData.IsJourneyMode, Terraria.NPC.knockBackResist, Terraria.DataStructures.GameModeData.KnockbackToEnemiesMultiplier, Terraria.NPC.lifeMax, Terraria.ID.NPCID.Sets.ProjectileNPC, Terraria.NPC.type, and Terraria.NPC.value.

Referenced by Terraria.NPC.ScaleStats().

+ Here is the caller graph for this function: