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

◆ getGoodAdjustments()

void Terraria.NPC.getGoodAdjustments ( )
inlineprivate

Definition at line 12891 of file NPC.cs.

12892 {
12893 float num = scale;
12894 if (type == 13)
12895 {
12896 scale *= 1.35f;
12897 defense += 2;
12898 }
12899 else if (type == 14)
12900 {
12901 scale *= 1.4f;
12902 defense += 2;
12903 }
12904 else if (type == 15)
12905 {
12906 scale *= 1.4f;
12907 defense += 2;
12908 }
12909 else if (type == 35)
12910 {
12911 scale *= 1.25f;
12912 }
12913 else if (type == 36)
12914 {
12915 scale *= 1.15f;
12916 }
12917 else if (type == 113)
12918 {
12919 scale *= 0.65f;
12920 lifeMax = (int)((double)lifeMax * 1.5);
12921 defense += 3;
12922 }
12923 else if (type == 114)
12924 {
12925 scale *= 0.65f;
12926 lifeMax = (int)((double)lifeMax * 1.5);
12927 defense += 3;
12928 }
12929 else if (type == 115)
12930 {
12931 scale *= 1.4f;
12932 }
12933 else if (type == 116)
12934 {
12935 scale *= 1.4f;
12936 }
12937 else if (type == 222)
12938 {
12939 scale *= 1.2f;
12940 }
12941 else if (type == 245)
12942 {
12943 canDisplayBuffs = false;
12944 scale *= 0.5f;
12945 }
12946 else if (type == 246)
12947 {
12948 canDisplayBuffs = false;
12949 scale *= 0.5f;
12950 }
12951 else if (type == 247 || type == 248)
12952 {
12953 canDisplayBuffs = false;
12954 scale *= 0.5f;
12955 }
12956 else if (type == 249)
12957 {
12958 scale *= 0.5f;
12959 }
12960 else if (type == 262)
12961 {
12962 scale *= 1.3f;
12963 }
12964 else if (type == 266)
12965 {
12966 defense = (int)((double)defense * 1.5);
12967 damage = (int)((double)damage * 1.2);
12968 scale *= 1.1f;
12969 }
12970 else if (type == 125)
12971 {
12972 scale *= 0.8f;
12973 }
12974 else if (type == 126)
12975 {
12976 scale *= 0.8f;
12977 }
12978 else if (type == 127)
12979 {
12980 scale *= 1.1f;
12981 }
12982 else if (type == 128)
12983 {
12984 scale *= 1.1f;
12985 }
12986 else if (type == 129)
12987 {
12988 scale *= 1.1f;
12989 }
12990 else if (type == 130)
12991 {
12992 scale *= 1.1f;
12993 }
12994 else if (type == 131)
12995 {
12996 scale *= 1.1f;
12997 }
12998 else if (type == 134)
12999 {
13000 scale *= 1.3f;
13001 }
13002 else if (type == 135)
13003 {
13004 scale *= 1.3f;
13005 }
13006 else if (type == 136)
13007 {
13008 scale *= 1.3f;
13009 }
13010 else
13011 {
13012 if (type != 139)
13013 {
13014 return;
13015 }
13016 scale *= 1.6f;
13017 }
13019 {
13020 scale = num;
13021 return;
13022 }
13023 width = (int)((float)width * scale);
13024 height = (int)((float)height * scale);
13025 }
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
int defense
How resistant to damage this NPC is. The List of NPCs wiki pagecan be useful for finding appropriat...
Definition NPC.cs:1033
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
bool canDisplayBuffs
Definition NPC.cs:658
float scale
Makes the NPC bigger or smaller. Bigger than 1f is bigger. Defaults to 1f.
Definition NPC.cs:1104
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
bool IsABestiaryIconDummy
Definition NPC.cs:432

References Terraria.NPC.canDisplayBuffs, Terraria.NPC.damage, Terraria.NPC.defense, Terraria.Entity.height, Terraria.NPC.IsABestiaryIconDummy, Terraria.NPC.lifeMax, Terraria.NPC.scale, Terraria.NPC.type, and Terraria.Entity.width.

Referenced by Terraria.NPC.SetDefaults().

+ Here is the caller graph for this function: