Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
checkArmorPenetration()
int Terraria.NPC.checkArmorPenetration
(
int
armorPenetration
,
float
armorPenetrationPercent
)
inline
Definition at line
77993
of file
NPC.cs
.
77994
{
77995
if
(
ichor
)
77996
{
77997
armorPenetration += 15;
77998
}
77999
if
(
betsysCurse
)
78000
{
78001
armorPenetration += 40;
78002
}
78003
armorPenetration += (int)((
float
)
defense
*
armorPenetrationPercent
);
78004
if
(armorPenetration <= 0 ||
defense
<= 0)
78005
{
78006
return
0;
78007
}
78008
if
(armorPenetration >
defense
)
78009
{
78010
return
defense
/ 2;
78011
}
78012
return
armorPenetration / 2;
78013
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
Terraria.NPC.defense
int defense
Definition
NPC.cs:463
Terraria.NPC.ichor
bool ichor
Definition
NPC.cs:223
Terraria.NPC.betsysCurse
bool betsysCurse
Definition
NPC.cs:281
Referenced by
Terraria.Player.ApplyDamageToNPC()
.
Terraria
NPC
Generated by
1.10.0