78025 {
78026 bool flag = Main.netMode == 0;
78028 {
78030 flag = false;
78031 }
78033 {
78034 return 0.0;
78035 }
78037 num = Main.CalculateDamageNPCsTake((
int)num,
defense);
78038 if (crit)
78039 {
78040 num *= 2.0;
78041 }
78043 {
78045 }
78047 {
78049 {
78050 Color color = (crit ? CombatText.DamagedFriendlyCrit : CombatText.DamagedFriendly);
78052 }
78053 else
78054 {
78055 Color color2 = (crit ? CombatText.DamagedHostileCrit : CombatText.DamagedHostile);
78057 {
78058 color2 = (crit ? CombatText.OthersDamagedHostileCrit : CombatText.OthersDamagedHostile);
78059 }
78061 }
78062 }
78063 if (num >= 1.0)
78064 {
78065 if (flag)
78066 {
78068 }
78070 if ((
type == 438 ||
type == 379) && Main.netMode != 1)
78071 {
78072 int num2 = (int)(0f -
ai[3] - 1f);
78073 if (
num2 > -1 && Main.npc[
num2].localAI[0] == 0f)
78074 {
78075 Main.npc[
num2].localAI[0] = 1f;
78076 }
78077 }
78079 {
78080 if (
aiStyle == 7 && (
ai[0] == 3f ||
ai[0] == 4f ||
ai[0] == 16f ||
ai[0] == 17f))
78081 {
78084 {
78086 nPC.ai[1] = 300 + Main.rand.Next(300);
78088 nPC.localAI[3] = 0f;
78090 nPC.netUpdate = true;
78091 }
78092 }
78094 ai[1] = 300 + Main.rand.Next(300);
78099 }
78100 if (
aiStyle == 8 && Main.netMode != 1)
78101 {
78103 {
78105 }
78106 else if (
type == 283 ||
type == 284)
78107 {
78108 if (Main.rand.Next(2) == 0)
78109 {
78112 }
78113 }
78114 else if (
type == 533)
78115 {
78116 if (Main.rand.Next(3) != 0)
78117 {
78120 }
78121 }
78122 else
78123 {
78125 }
78127 }
78128 if (
aiStyle == 97 && Main.netMode != 1)
78129 {
78132 }
78134 {
78135 num = 0.0;
78139 }
78141 {
78143 }
78145 {
78147 }
78149 {
78151 }
78153 {
78155 }
78157 {
78159 {
78160 Main.npc[
realLife].life -= (int)num;
78163 }
78164 else
78165 {
78167 }
78168 }
78170 {
78173 {
78175 }
78177 {
78181 }
78183 {
78187 }
78189 {
78193 }
78195 {
78199 }
78201 {
78203 }
78204 if (crit)
78205 {
78207 }
78208 int num8 = (int)num * 10;
78209 if (Main.expertMode)
78210 {
78211 num8 = (int)num * 15;
78212 }
78214 {
78216 {
78218 {
78219 velocity.X -=
num3;
78220 }
78221 velocity.X -=
num3;
78223 {
78224 velocity.X = 0f -
num3;
78225 }
78226 }
78228 {
78230 {
78231 velocity.X +=
num3;
78232 }
78233 velocity.X +=
num3;
78235 {
78237 }
78238 }
78240 {
78242 }
78245 {
78246 velocity.Y +=
num3;
78248 {
78250 }
78251 }
78252 }
78253 else
78254 {
78256 {
78258 }
78259 else
78260 {
78262 }
78264 }
78265 }
78267 {
78268 for (
int i = 0;
i < 200;
i++)
78269 {
78270 if (Main.npc[i].active && (Main.npc[i].type == 113 || Main.npc[i].type == 114))
78271 {
78273 }
78274 }
78275 }
78276 else
78277 {
78279 }
78281 {
78283 }
78285 {
78287 }
78288 else
78289 {
78291 }
78292 return num;
78293 }
78294 return 0.0;
78295 }
static void PlaySound(int type, Vector2 position, int style=1)
static int ignorePlayerInteractions
void TargetClosest(bool faceTarget=true)
float takenDamageMultiplier
void HitEffect(int hitDirection=0, double dmg=10.0)
void PlayerInteraction(int player)
LegacySoundStyle HitSound