11038 {
11040 {
11041 return;
11042 }
11045 {
11047 return;
11048 }
11050 {
11053 {
11055 }
11056 }
11057 if (
owner == Main.myPlayer)
11058 {
11059 float num = 1f;
11061 {
11062 num *= 2f;
11063 }
11065 {
11066 num *= 3f;
11067 }
11069 {
11070 num *= 1f;
11071 }
11073 {
11074 num *= 1.2f;
11075 }
11076 if (
aiStyle == 15 && (
ai[0] == 1f ||
ai[0] == 2f))
11077 {
11078 num *= 2f;
11079 }
11081 {
11082 num = 0.1f + Main.player[
owner].velocity.Length() / 7f * 0.9f;
11083 }
11085 {
11086 num = 1f;
11087 switch ((
int)
ai[1])
11088 {
11089 case 0:
11090 num = 1.5f;
11091 break;
11092 case 1:
11093 num = 1f;
11094 break;
11095 case 2:
11096 num = 1.5f;
11097 break;
11098 case 3:
11099 num = 0.1f;
11100 break;
11101 case 4:
11102 num = 1f;
11103 break;
11104 case 5:
11105 num = 1f;
11106 break;
11107 case 6:
11108 num = 1f;
11109 break;
11110 case 7:
11111 num = 0.25f;
11112 break;
11113 case 8:
11114 num = 1f;
11115 break;
11116 case 9:
11117 num = 0.75f;
11118 break;
11119 case 10:
11120 num = 0.5f;
11121 break;
11122 case 11:
11123 num = 0.5f;
11124 break;
11125 case 12:
11126 num = 0.5f;
11127 break;
11128 case 13:
11129 num = 0.5f;
11130 break;
11131 case 14:
11132 num = 0.5f;
11133 break;
11134 case 15:
11135 num = 0.5f;
11136 break;
11137 case 16:
11138 num = 0.5f;
11139 break;
11140 case 17:
11141 num = 1.5f;
11142 break;
11143 case 18:
11144 num = 1.6f;
11145 break;
11146 case 19:
11147 num = 1.8f;
11148 break;
11149 case 20:
11150 num = 1.9f;
11151 break;
11152 case 21:
11153 num = 1.7f;
11154 break;
11155 case 22:
11156 num = 2f;
11157 break;
11158 case 23:
11159 num = 1.9f;
11160 break;
11161 }
11162 }
11164 {
11165 num *= 0.5f;
11166 }
11171 {
11174 {
11176 if (projectile != null)
11177 {
11178 array = projectile.localNPCImmunity;
11179 }
11180 }
11182 for (
int i = 0;
i < 200 &&
flag4;
i++)
11183 {
11184 if (!Main.npc[i].active)
11185 {
11186 continue;
11187 }
11189 if (
flag2 && !Main.player[
owner].CanHitNPCWithMeleeHit(i))
11190 {
11192 }
11194 {
11195 continue;
11196 }
11197 Main.npc[
i].position += Main.npc[
i].netOffset;
11198 bool flag6 = !Main.npc[
i].friendly;
11200 flag6 |= Main.npc[
i].type == 22 &&
owner < 255 && Main.player[
owner].killGuide;
11201 flag6 |= Main.npc[
i].type == 54 &&
owner < 255 && Main.player[
owner].killClothier;
11202 if (
owner < 255 && !Main.player[
owner].CanNPCBeHitByPlayerOrPlayerProjectile(Main.npc[i],
this))
11203 {
11205 }
11206 bool flag7 = Main.npc[
i].friendly && !Main.npc[
i].dontTakeDamageFromHostiles;
11208 {
11211 {
11212 bool flag9 =
false;
11213 if (
type == 11 && (Main.npc[i].type == 47 || Main.npc[i].type == 57))
11214 {
11216 }
11217 else if (
type == 31 && Main.npc[i].type == 69)
11218 {
11220 }
11221 else if (Main.npc[i].trapImmune &&
trap)
11222 {
11224 }
11225 else if (Main.npc[i].immortal &&
npcProj)
11226 {
11228 }
11230 {
11232 if (Main.npc[i].type == 414)
11233 {
11238 rect.Width +=
num2 * 2;
11239 rect.Height +=
num2 * 2;
11241 }
11242 else
11243 {
11245 }
11247 {
11250 {
11252 {
11253 Main.player[
owner].TakeDamageFromJellyfish(i);
11254 }
11256 {
11257 continue;
11258 }
11259 }
11261 {
11263 if (Main.rand.Next(20) == 0)
11264 {
11266 position.X += Main.rand.Next(-256, 257);
11267 }
11268 if (Main.rand.Next(20) == 0)
11269 {
11271 position.Y += Main.rand.Next(-256, 257);
11272 }
11273 if (Main.rand.Next(2) == 0)
11274 {
11276 }
11277 if (Main.rand.Next(3) != 0)
11278 {
11282 {
11286 {
11288 }
11289 }
11290 }
11292 if (Main.rand.Next(7) == 0)
11293 {
11294 velocity.X += (float)Main.rand.Next(30, 31) * 0.01f;
11295 }
11296 if (Main.rand.Next(7) == 0)
11297 {
11298 velocity.Y += (float)Main.rand.Next(30, 31) * 0.01f;
11299 }
11302 if (Main.rand.Next(20) == 0)
11303 {
11305 }
11306 if (Main.rand.Next(50) == 0)
11307 {
11309 }
11310 if (Main.rand.Next(7) == 0)
11311 {
11313 position.X += Main.rand.Next(-64, 65);
11315 {
11317 }
11318 }
11319 if (Main.rand.Next(7) == 0)
11320 {
11322 position.Y += Main.rand.Next(-64, 65);
11324 {
11326 }
11327 }
11328 if (Main.rand.Next(14) == 0)
11329 {
11330 velocity.X *= -1f;
11331 }
11332 if (Main.rand.Next(14) == 0)
11333 {
11334 velocity.Y *= -1f;
11335 }
11336 if (Main.rand.Next(10) == 0)
11337 {
11338 velocity *= (float)Main.rand.Next(1, 201) * 0.0005f;
11339 }
11341 {
11343 }
11344 else
11345 {
11347 }
11349 }
11352 {
11354 }
11356 {
11357 nPC.ReflectProjectile(
this);
11358 Main.npc[
i].position -= Main.npc[
i].netOffset;
11359 return;
11360 }
11362 {
11364 }
11367 int num4 = Main.player[
owner].armorPenetration;
11371 {
11372 case 442:
11374 break;
11375 case 410:
11376 if (Main.remixWorld)
11377 {
11379 }
11380 break;
11381 case 864:
11383 break;
11384 case 916:
11386 break;
11387 case 917:
11389 break;
11390 case 595:
11392 break;
11393 case 493:
11394 case 494:
11396 break;
11397 case 150:
11398 case 151:
11399 case 152:
11401 break;
11402 case 189:
11404 if (flag && Main.player[
owner].strongBees)
11405 {
11407 }
11408 break;
11409 case 723:
11410 case 724:
11411 case 725:
11412 case 726:
11414 break;
11415 case 532:
11417 break;
11418 case 964:
11420 break;
11421 case 969:
11423 break;
11424 case 85:
11426 break;
11427 case 877:
11428 case 878:
11429 case 879:
11430 num3 *= Main.player[
owner].velocity.Length() / 7f;
11431 break;
11432 case 963:
11434 break;
11435 case 976:
11437 break;
11438 case 974:
11440 break;
11441 case 977:
11443 break;
11444 }
11446 {
11448 return;
11449 }
11453 {
11457 }
11459 {
11460 int num7 =
Math.
Max(0, Main.player[
owner].ownedProjectileCounts[831] - 1);
11461 num5 = (int)((
float)
num5 * (1f + (float)
num7 * 0.4f));
11462 }
11464 {
11465 int num8 =
Math.
Max(0, Main.player[
owner].ownedProjectileCounts[831] - 1);
11466 num5 = (int)((
float)
num5 * (1.5f + (float)
num8 * 0.4f));
11467 }
11469 {
11470 int num9 =
Math.
Max(0, Main.player[
owner].ownedProjectileCounts[970] - 1);
11473 {
11474 return;
11475 }
11476 float num11 = 0.55f;
11477 if (Main.hardMode)
11478 {
11480 }
11482 }
11483 if (flag &&
type == 189 && Main.player[
owner].strongBees)
11484 {
11486 }
11487 if (flag)
11488 {
11489 if (
melee && Main.rand.Next(1, 101) <= Main.player[
owner].meleeCrit)
11490 {
11492 }
11493 if (
ranged && Main.rand.Next(1, 101) <= Main.player[
owner].rangedCrit)
11494 {
11496 }
11497 if (
magic && Main.rand.Next(1, 101) <= Main.player[
owner].magicCrit)
11498 {
11500 }
11502 if ((uint)(
num12 - 688) <= 2
u)
11503 {
11504 if (Main.player[
owner].setMonkT3)
11505 {
11506 if (Main.rand.Next(4) == 0)
11507 {
11509 }
11510 }
11511 else if (Main.player[
owner].setMonkT2 && Main.rand.Next(6) == 0)
11512 {
11514 }
11515 }
11516 }
11519 {
11521 }
11523 {
11525 }
11527 {
11537 for (
int j = 0;
j <
NPC.maxBuffs;
j++)
11538 {
11539 if (
nPC.buffTime[
j] >= 1)
11540 {
11541 switch (
nPC.buffType[
j])
11542 {
11543 case 307:
11545 break;
11546 case 309:
11548 break;
11549 case 313:
11551 break;
11552 case 310:
11554 break;
11555 case 315:
11557 break;
11558 case 326:
11560 break;
11561 case 319:
11563 break;
11564 case 316:
11566 break;
11567 case 340:
11569 break;
11570 }
11571 }
11572 }
11574 {
11576 }
11578 {
11580 }
11582 {
11584 }
11586 {
11588 }
11590 {
11592 }
11594 {
11596 if (Main.rand.Next(100) < 12)
11597 {
11599 }
11600 }
11602 {
11606 Main.projectile[
num15].localNPCImmunity[
i] = -1;
11608 }
11610 {
11613 if (Main.rand.Next(10) == 0)
11614 {
11616 }
11618 {
11619 PositionInWorld = base.Center
11620 });
11621 }
11623 {
11624 nPC.RequestBuffRemoval(313);
11625 int num17 = (int)((
float)
num5 * 1.75f);
11627 Main.projectile[
num18].localNPCImmunity[
i] = -1;
11629 }
11630 }
11633 int num19 = ((!flag) ? Main.DamageVar(
num5) : Main.DamageVar(
num5, Main.player[
owner].luck));
11635 {
11637 }
11639 {
11641 }
11642 if (
type == 482 && (
nPC.aiStyle == 6 ||
nPC.aiStyle == 37))
11643 {
11645 }
11646 if (flag)
11647 {
11653 {
11654 case 972:
11656 break;
11657 case 973:
11659 break;
11660 case 984:
11661 case 985:
11662 settings.MovementVector =
velocity;
11664 break;
11665 case 982:
11667 break;
11668 case 983:
11670 break;
11671 }
11672 }
11674 {
11677 }
11678 if ((
type == 400 ||
type == 401 ||
type == 402) &&
nPC.type >= 13 &&
nPC.type <= 15)
11679 {
11682 {
11684 }
11685 }
11687 {
11689 }
11691 {
11692 float num20 = (60f -
ai[0]) / 2f;
11694 }
11696 {
11698 {
11700 {
11702 }
11706 }
11708 }
11709 else if (
type == 951)
11710 {
11712 vector2.X += (-0.5f + Main.rand.NextFloat()) * 13f;
11713 vector2.Y = -5f;
11717 }
11718 else if (
type == 582 ||
type == 902)
11719 {
11721 {
11723 }
11724 }
11726 {
11728 }
11729 else if (
type == 624)
11730 {
11732 if (
nPC.knockBackResist > 0f)
11733 {
11735 }
11738 if (
nPC.Center.X <
base.Center.X)
11739 {
11741 }
11742 else
11743 {
11745 }
11746 }
11748 {
11750 {
11752 }
11754 {
11756 }
11757 else
11758 {
11760 }
11761 }
11763 {
11765 {
11767 }
11769 {
11771 }
11772 else
11773 {
11775 }
11776 }
11778 {
11780 {
11782 }
11783 else
11784 {
11786 }
11787 }
11788 else if (
type == 908)
11789 {
11791 {
11793 }
11794 else
11795 {
11797 }
11798 }
11800 {
11801 int num22 = Main.rand.Next(2, 6);
11803 {
11807 vector3 *= (float)Main.rand.Next(35, 81) * 0.1f;
11810 }
11811 }
11813 {
11814 float x = Main.player[
owner].Center.X;
11815 if (
nPC.Center.X < x)
11816 {
11818 }
11819 else
11820 {
11822 }
11823 }
11825 {
11830 }
11832 {
11835 }
11837 {
11839 }
11841 {
11844 }
11845 if ((
type == 688 ||
type == 689 ||
type == 690) && nPC.type != 68 && nPC.defense < 999)
11846 {
11848 }
11850 {
11852 {
11855 }
11857 {
11859 }
11860 else
11861 {
11863 }
11864 }
11866 {
11868 }
11870 {
11872 if (
nPC.Center.X < Main.player[
owner].Center.X)
11873 {
11875 }
11876 else
11877 {
11879 }
11881 {
11890 {
11893 }
11894 }
11895 }
11897 {
11899 }
11901 {
11903 {
11908 }
11909 num19 = ((
ai[0] != 2f) ? ((
int)((double)
num19 * 0.15)) : ((int)((double)
num19 * 1.35)));
11910 }
11911 if (flag)
11912 {
11915 {
11916 Main.player[Main.myPlayer].lastCreatureHit =
num26;
11917 }
11918 }
11919 if (Main.netMode != 2 && flag)
11920 {
11923 {
11925 }
11926 }
11927 if (Main.expertMode)
11928 {
11930 {
11932 }
11933 if (
type == 280 && ((
nPC.type >= 134 &&
nPC.type <= 136) || nPC.type == 139))
11934 {
11936 }
11937 }
11939 {
11941 }
11943 {
11951 }
11952 if (
type == 323 && (
nPC.type == 159 ||
nPC.type == 158))
11953 {
11955 }
11956 if (
type == 981 &&
nPC.type == 104)
11957 {
11959 }
11961 {
11963 }
11965 {
11967 }
11969 {
11971 }
11973 {
11975 }
11977 {
11979 }
11981 {
11983 }
11985 {
11987 }
11989 {
11991 }
11993 {
11995 }
11997 {
11999 }
12001 {
12003 }
12005 {
12007 }
12009 {
12011 }
12013 {
12015 }
12017 {
12019 }
12021 {
12023 }
12025 {
12027 }
12029 {
12031 }
12033 {
12035 }
12037 {
12039 }
12041 {
12043 }
12045 {
12047 }
12049 {
12051 }
12053 {
12055 }
12057 {
12059 }
12061 {
12063 }
12065 {
12066 int[]
array2 =
new int[10];
12070 for (
int l = 0;
l < 200;
l++)
12071 {
12072 if (
l == i || !Main.npc[
l].CanBeChasedBy(
this))
12073 {
12074 continue;
12075 }
12076 float num32 = (base.Center - Main.npc[
l].Center).
Length();
12078 {
12082 {
12083 break;
12084 }
12085 }
12086 }
12088 {
12095 }
12096 }
12098 {
12101 }
12103 {
12105 Main.player[
owner].parryDamageBuff =
false;
12106 Main.player[
owner].ClearBuff(198);
12107 }
12109 if (flag &&
nPC.life > 5)
12110 {
12112 }
12114 {
12116 }
12118 {
12121 }
12124 {
12125 case 697:
12126 case 699:
12127 case 707:
12128 case 708:
12129 case 759:
12130 num34 = ((Main.player[
owner].Center.X <
nPC.Center.X) ? 1 : (-1));
12131 break;
12132 }
12134 {
12135 num34 = ((Main.player[
owner].Center.X <
nPC.Center.X) ? 1 : (-1));
12136 }
12138 {
12139 num34 = ((Main.player[
owner].Center.X <
nPC.Center.X) ? 1 : (-1));
12141 {
12143 }
12145 {
12147 }
12148 }
12150 {
12152 }
12155 if (flag &&
attempt.DidNPCDie())
12156 {
12158 }
12159 if (flag && Main.player[
owner].accDreamCatcher)
12160 {
12162 }
12167 {
12168 nPC.ReflectProjectile(
this);
12170 }
12172 {
12174 {
12176 }
12178 {
12182 }
12183 if ((
flag25 ||
nPC.value > 0f) && Main.player[
owner].hasLuckyCoin && Main.rand.Next(5) == 0)
12184 {
12186 if (Main.rand.Next(10) == 0)
12187 {
12189 }
12190 if (Main.rand.Next(100) == 0)
12191 {
12193 }
12195 Main.item[
num37].stack = Main.rand.Next(1, 11);
12196 Main.item[
num37].velocity.Y = (float)Main.rand.Next(-20, 1) * 0.2f;
12197 Main.item[
num37].velocity.X = (float)Main.rand.Next(10, 31) * 0.2f * (float)
num34;
12198 Main.item[
num37].timeLeftInWhichTheItemCannotBeTakenByEnemies = 60;
12199 if (Main.netMode == 1)
12200 {
12201 NetMessage.SendData(148, -1, -1,
null,
num37);
12202 }
12203 }
12204 if (
type == 999 &&
owner == Main.myPlayer && Main.rand.Next(3) == 0)
12205 {
12211 Main.projectile[
num38].melee =
true;
12212 }
12214 {
12215 if (
type == 304 && !Main.player[
owner].moonLeech)
12216 {
12218 }
12220 {
12221 if (Main.player[
owner].ghostHeal && !Main.player[
owner].moonLeech)
12222 {
12224 }
12225 if (Main.player[
owner].ghostHurt)
12226 {
12228 }
12229 if (
magic && Main.player[
owner].setNebula && Main.player[
owner].nebulaCD == 0 && Main.rand.Next(3) == 0)
12230 {
12231 Main.player[
owner].nebulaCD = 30;
12232 int num39 = Utils.SelectRandom<
int>(Main.rand, 3453, 3454, 3455);
12234 Main.item[
num40].velocity.Y = (float)Main.rand.Next(-20, 1) * 0.2f;
12235 Main.item[
num40].velocity.X = (float)Main.rand.Next(10, 31) * 0.2f * (float)
num34;
12236 if (Main.netMode == 1)
12237 {
12238 NetMessage.SendData(21, -1, -1,
null,
num40);
12239 }
12240 }
12241 }
12243 {
12244 if (Main.player[
owner].beetleOrbs == 0)
12245 {
12246 Main.player[
owner].beetleCounter +=
num35 * 3;
12247 }
12248 else if (Main.player[
owner].beetleOrbs == 1)
12249 {
12250 Main.player[
owner].beetleCounter +=
num35 * 2;
12251 }
12252 else
12253 {
12255 }
12256 Main.player[
owner].beetleCountdown = 0;
12257 }
12258 if (
arrow &&
type != 631 && Main.player[
owner].phantasmTime > 0)
12259 {
12260 Vector2 source = Main.player[
owner].position + Main.player[
owner].Size * Utils.RandomVector2(Main.rand, 0f, 1f);
12264 NewProjectile(
GetProjectileSource_FromThis(),
source.X,
source.Y,
vector8.X,
vector8.Y, 631,
num41, 0f,
owner, i, 15f);
12265 NewProjectile(
GetProjectileSource_FromThis(),
source.X,
source.Y,
vector8.X,
vector8.Y, 631,
num41, 0f,
owner, i, 30f);
12266 }
12269 {
12270 case 914:
12272 break;
12273 case 847:
12275 break;
12276 case 849:
12278 break;
12279 case 912:
12280 {
12283 {
12285 player2.coolWhipBuff = true;
12286 }
12288 break;
12289 }
12290 }
12291 }
12292 }
12294 {
12296 }
12297 if (flag &&
type == 913)
12298 {
12300 }
12301 if (Main.netMode != 0)
12302 {
12304 {
12305 NetMessage.SendData(28, -1, -1,
null, i,
num19,
num3,
num34, 1);
12306 }
12307 else
12308 {
12310 }
12311 }
12313 {
12315 }
12317 {
12319 }
12321 {
12323 {
12326 }
12327 }
12328 else if (
type == 434)
12329 {
12331 }
12333 {
12336 {
12338 }
12340 {
12342 }
12344 }
12345 else if (
type == 632)
12346 {
12348 }
12349 else if (
type == 514)
12350 {
12352 }
12353 else if (
type == 611)
12354 {
12356 {
12357 NewProjectile(
GetProjectileSource_FromThis(),
nPC.Center.X,
nPC.Center.Y, 0f, 0f, 612,
damage, 10f,
owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
12358 }
12360 }
12361 else if (
type == 595 ||
type == 735)
12362 {
12364 }
12365 else if (
type == 927)
12366 {
12368 }
12369 else if (
type == 286)
12370 {
12372 }
12373 else if (
type == 443)
12374 {
12376 }
12377 else if (
type >= 424 &&
type <= 426)
12378 {
12380 }
12381 else if (
type == 634 ||
type == 635)
12382 {
12384 }
12385 else if (
type == 659)
12386 {
12388 }
12389 else if (
type == 246)
12390 {
12392 }
12393 else if (
type == 249)
12394 {
12396 }
12397 else if (
type == 16)
12398 {
12400 }
12401 else if (
type == 409)
12402 {
12404 }
12405 else if (
type == 311)
12406 {
12408 }
12409 else if (
type == 582 ||
type == 902)
12410 {
12413 {
12416 }
12417 }
12418 else
12419 {
12421 {
12423 {
12425 }
12426 else
12427 {
12429 }
12432 Main.npc[
i].position -= Main.npc[
i].netOffset;
12433 break;
12434 }
12436 {
12440 {
12444 }
12445 }
12446 else if (
type == 661 ||
type == 856)
12447 {
12450 }
12451 else if (
type == 866)
12452 {
12457 {
12462 Main.npc[
i].position -= Main.npc[
i].netOffset;
12463 break;
12464 }
12465 if (
owner == Main.myPlayer)
12466 {
12471 {
12473 }
12475 {
12477 }
12478 }
12479 }
12481 {
12484 }
12486 {
12488 }
12489 }
12491 {
12493 }
12495 {
12497 {
12499 }
12502 {
12503 Main.npc[
i].position -= Main.npc[
i].netOffset;
12505 {
12508 }
12510 }
12511 }
12513 {
12517 }
12519 {
12522 }
12524 {
12527 }
12528 else if (
type == 607)
12529 {
12533 }
12535 {
12539 }
12540 else if (
type == 617)
12541 {
12544 }
12545 else if (
type == 656)
12546 {
12550 }
12551 else if (
type == 618)
12552 {
12555 }
12556 else if (
type == 642)
12557 {
12560 }
12561 else if (
type == 857)
12562 {
12565 }
12566 else if (
type == 611 ||
type == 612)
12567 {
12570 }
12571 else if (
type == 645)
12572 {
12576 {
12580 }
12581 }
12584 {
12586 {
12588 }
12589 }
12590 else if (
type == 699)
12591 {
12593 }
12594 else if (
type == 706)
12595 {
12597 }
12598 else if (
type == 728)
12599 {
12601 }
12602 else if (
type == 34)
12603 {
12605 {
12608 }
12609 }
12610 else if (
type == 79)
12611 {
12613 {
12616 }
12618 {
12619 PositionInWorld =
nPC.Center,
12621 });
12622 }
12623 else if (
type == 931)
12624 {
12627 {
12630 }
12631 }
12633 {
12635 {
12636 Main.player[
owner].MinionAttackTargetNPC =
i;
12637 }
12638 }
12639 else if (
type == 623)
12640 {
12642 {
12643 PositionInWorld =
Vector2.
Lerp(
base.Center,
nPC.Hitbox.ClosestPointInRect(
base.Center), 0.5f) +
new Vector2(0f, Main.rand.NextFloatDirection() * 10f),
12644 MovementVector =
new Vector2(
direction, Main.rand.NextFloatDirection() * 0.5f) * (3f + 3f * Main.rand.NextFloat())
12645 });
12646 }
12648 {
12649 Main.player[
owner].SetMeleeHitCooldown(i, Main.player[
owner].itemAnimation);
12650 }
12651 }
12652 }
12653 }
12654 }
12655 Main.npc[
i].position -= Main.npc[
i].netOffset;
12656 }
12657 }
12658 if (
flag3 && Main.player[Main.myPlayer].hostile)
12659 {
12660 for (
int m = 0;
m < 255;
m++)
12661 {
12663 {
12664 continue;
12665 }
12668 {
12669 continue;
12670 }
12673 {
12675 }
12677 {
12678 continue;
12679 }
12681 {
12683 {
12687 }
12689 }
12691 {
12693 {
12695 }
12697 {
12699 }
12700 else
12701 {
12703 }
12704 }
12706 {
12708 {
12710 }
12712 {
12714 }
12715 else
12716 {
12718 }
12719 }
12722 {
12724 }
12727 {
12729 }
12731 if (
melee && Main.rand.Next(1, 101) <= Main.player[
owner].meleeCrit)
12732 {
12734 }
12735 int num46 = Main.DamageVar((
int)((float)
damage * num), Main.player[
owner].luck);
12738 {
12740 }
12744 {
12746 }
12748 {
12750 }
12752 {
12754 }
12755 if (Main.netMode != 0)
12756 {
12758 }
12761 {
12764 {
12765 break;
12766 }
12767 }
12769 {
12773 }
12775 {
12778 }
12780 {
12783 }
12784 }
12785 }
12786 }
12787 if (
type == 10 && Main.netMode != 1)
12788 {
12789 for (
int n = 0;
n < 200;
n++)
12790 {
12793 {
12794 continue;
12795 }
12796 if (
nPC2.type == 534)
12797 {
12799 {
12800 nPC2.Transform(441);
12801 }
12802 }
12803 else
12804 {
12806 {
12807 continue;
12808 }
12809 nPC2.Transform(683);
12812 if (Main.netMode == 2)
12813 {
12814 NetMessage.SendData(106, -1, -1,
null, (
int)
vector9.X,
vector9.Y);
12815 }
12816 if (!
NPC.unlockedSlimeYellowSpawn)
12817 {
12818 NPC.unlockedSlimeYellowSpawn = true;
12819 if (Main.netMode == 2)
12820 {
12821 NetMessage.SendData(7);
12822 }
12823 }
12824 }
12825 }
12826 }
12827 if ((
type == 11 ||
type == 463) && Main.netMode != 1)
12828 {
12829 bool crimson =
type == 463;
12831 {
12832 if (Main.npc[
num48].active)
12833 {
12836 {
12837 Main.npc[
num48].AttemptToConvertNPCToEvil(crimson);
12838 }
12839 }
12840 }
12841 }
12842 if (Main.netMode == 2 || !
hostile || Main.myPlayer >= 255 ||
damage <= 0)
12843 {
12844 return;
12845 }
12848 {
12849 case 452:
12850 case 454:
12851 case 455:
12852 case 462:
12854 break;
12855 case 871:
12856 case 872:
12857 case 873:
12858 case 874:
12859 case 919:
12860 case 923:
12861 case 924:
12863 break;
12864 }
12865 int myPlayer = Main.myPlayer;
12866 bool flag28 = Main.player[myPlayer].active && !Main.player[myPlayer].dead && (!Main.player[myPlayer].immune ||
num49 != -1);
12868 {
12869 flag28 =
ai[1] - 1f == (float)myPlayer;
12870 }
12871 if (Main.getGoodWorld &&
type == 281)
12872 {
12874 }
12876 {
12877 return;
12878 }
12880 num50 = ((!(Main.player[myPlayer].position.X + (float)(Main.player[myPlayer].width / 2) < position.X + (float)(
width / 2))) ? 1 : (-1));
12881 if (!Main.player[myPlayer].CanParryAgainst(Main.player[myPlayer].Hitbox,
base.Hitbox,
velocity))
12882 {
12885 if (
num52 > 0 && Main.player[myPlayer].HasNPCBannerBuff(
num52))
12886 {
12889 }
12890 if (Main.player[myPlayer].resistCold &&
coldDamage)
12891 {
12893 }
12895 {
12896 float num53 = Main.GameModeInfo.EnemyDamageMultiplier;
12897 if (Main.GameModeInfo.IsJourneyMode)
12898 {
12900 if (
power.GetIsUnlocked())
12901 {
12903 }
12904 }
12906 }
12909 {
12911 {
12914 }
12915 else
12916 {
12918 }
12919 }
12923 {
12925 }
12927 {
12929 }
12931 {
12932 Main.player[myPlayer].trapDebuffSource = true;
12933 if (Main.player[myPlayer].dead)
12934 {
12936 }
12937 }
12938 }
12939 if (true)
12940 {
12942 {
12944 }
12946 {
12948 }
12950 {
12952 }
12954 {
12956 }
12957 }
12958 }
static byte Max(byte val1, byte val2)
static PlayerDeathReason ByProjectile(int playerIndex, int projectileIndex)
Vector2 DirectionTo(Vector2 Destination)
static void HandleSpecialEvent(Player player, int eventID)
static readonly CreativePowerManager Instance
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static BannerEffect[] BannerStrength
static bool[] CountsAsCritter
static bool[] ReflectStarShotsInForTheWorthy
static bool[] BelongsToInvasionOldOnesArmy
static bool[] ZappingJellyfish
static bool[] ImmediatelyUpdatesNPCBuffFlags
static bool[] CultistIsResistantTo
static bool[] AllowsContactDamageFromJellyfish
static bool[] DontApplyParryDamageBuff
static bool[] IsARocketThatDealsDoubleDamageToPrimaryEnemy
static bool[] IsAMineThatDealsTripleDamageWhenStationary
static bool[] StardustDragon
static bool[] IsAGravestone
static readonly short Count
Projectile FindStardustDragonHeadOfOwner()
static void KillOldestJavelin(int protectedProjectileIndex, int projectileType, int targetNPCIndex, Point[] bufferForScan)
void ghostHeal(int dmg, Vector2 Position, Entity victim)
static Conditions.NotNull _cachedConditions_notNull
IEntitySource GetItemSource_OnHit(Entity victim, int itemSourceId)
IEntitySource GetProjectileSource_FromThis()
bool stopsDealingDamageAfterPenetrateHits
int CountEnemiesWhoAreImmuneToMeRightNow(int cap)
int FindTargetWithLineOfSight(float maxRange=800f)
static Point[] _javelinsMax8
void BombsHurtPlayers(Rectangle projRectangle, int j)
void SummonSuperStarSlash(Vector2 target)
void vampireHeal(int dmg, Vector2 Position, Entity victim)
void TryDoingOnHitEffects(Entity entity)
bool usesIDStaticNPCImmunity
static Conditions.IsSolid _cachedConditions_solid
void BetsySharpnel(int npcIndex)
static Point[] _javelinsMax6
bool appliesImmunityTimeOnSingleHits
static void EmitBlackLightningParticles(NPC targetNPC)
int idStaticNPCHitCooldown
void ghostHurt(int dmg, Vector2 Position, Entity victim)
static Point[] _javelinsMax10
bool CanHitWithMeleeWeapon(Entity ent)
bool usesLocalNPCImmunity
static bool IsNPCIndexImmuneToProjectileType(int projectileType, int npcIndex)
bool Colliding(Rectangle myRect, Rectangle targetRect)
void LightDisc_Bounce(Vector2 hitPoint, Vector2 normal)
static uint[][] perIDStaticNPCImmunity
Rectangle Damage_GetHitbox()
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
static GenSearch Chain(GenSearch search, params GenCondition[] conditions)
static bool Find(Point origin, GenSearch search, out Point result)
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)