46943 {
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102
47103
47104
47105
47106
47107
47108
47109
47110
47111
47112
47113
47114
47115
47116
47117
47118
47119
47120
47121
47122
47123
47124
47125
47126
47127
47128
47129
47130
47131
47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
47142
47143
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955
47956
47957
47958
47959
47960
47962 {
47963 return;
47964 }
47967 int damage =
sItem.damage;
47969 {
47971 }
47973 {
47976 {
47978 }
47979 }
47984 if (
sItem.useAmmo > 0)
47985 {
47987 }
47988 else
47989 {
47991 }
47993 {
47997 }
47999 {
48001 }
48003 {
48005 }
48007 {
48009 }
48011 {
48013 }
48014 if (
sItem.type == 3542)
48015 {
48016 if (Main.rand.Next(100) < 20)
48017 {
48020 }
48021 else
48022 {
48024 }
48025 }
48026 if (
sItem.type == 1928)
48027 {
48029 }
48030 if (
sItem.type == 3063)
48031 {
48033 }
48034 if (
sItem.type == 1306)
48035 {
48037 }
48038 if (
sItem.type == 1227)
48039 {
48041 }
48043 {
48044 return;
48045 }
48046 if (
whoAmI != Main.myPlayer)
48047 {
48049 return;
48050 }
48054 {
48056 }
48058 {
48060 }
48061 if (
sItem.type == 682)
48062 {
48064 }
48065 if (
sItem.type == 725)
48066 {
48068 }
48069 if (
sItem.type == 2796)
48070 {
48072 }
48073 if (
sItem.type == 2223)
48074 {
48076 }
48077 if (
sItem.type == 5117)
48078 {
48080 }
48082 {
48084 }
48089 if (!
sItem.ChangePlayerDirectionOnShoot)
48090 {
48092 }
48093 Vector2
unitX = Vector2.UnitX;
48095 Vector2
val =
default(Vector2);
48100 {
48102 }
48103 if (
vector != Vector2.Zero)
48104 {
48106 }
48109 {
48111 {
48113 }
48114 else
48115 {
48117 }
48118 }
48120 {
48121 pointPoisition.Y = base.position.Y + (float)(
height / 3);
48122 }
48123 if (
sItem.type == 5117)
48124 {
48125 pointPoisition.Y = base.position.Y + (float)(
height / 3);
48126 }
48127 if (
sItem.type == 517)
48128 {
48129 pointPoisition.X += (float)Main.rand.Next(-3, 4) * 3.5f;
48130 pointPoisition.Y += (float)Main.rand.Next(-3, 4) * 3.5f;
48131 }
48132 if (
sItem.type == 2611)
48133 {
48136 {
48138 }
48140 }
48141 if (
sItem.type == 3827)
48142 {
48146 val =
default(Vector2);
48148 }
48150 {
48154 }
48156 {
48159 }
48160 if (
sItem.type == 3007)
48161 {
48164 }
48168 {
48172 }
48174 {
48175 num113 = Main.screenPosition.Y + (float)Main.screenHeight - (
float)Main.mouseY -
pointPoisition.Y;
48176 }
48180 {
48184 }
48185 else
48186 {
48188 }
48189 if (
sItem.type == 1929 ||
sItem.type == 2270)
48190 {
48191 num102 += (float)Main.rand.Next(-50, 51) * 0.03f /
num124;
48192 num113 += (float)Main.rand.Next(-50, 51) * 0.03f /
num124;
48193 }
48197 {
48198 for (
int j = 0;
j < 1000;
j++)
48199 {
48200 if (Main.projectile[
j].active && Main.projectile[
j].owner ==
whoAmI && (Main.projectile[
j].type == 250 || Main.projectile[
j].type == 251))
48201 {
48202 Main.projectile[
j].Kill();
48203 }
48204 }
48205 }
48207 {
48209 }
48211 {
48214 }
48216 {
48220 val =
default(Vector2);
48223 {
48225 }
48226 }
48228 {
48229 Vector2
v2 =
default(Vector2);
48234 val =
default(Vector2);
48238 }
48240 {
48241 pointPoisition.X = (float)Main.mouseX + Main.screenPosition.X;
48242 pointPoisition.Y = (float)Main.mouseY + Main.screenPosition.Y;
48244 {
48245 pointPoisition.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY;
48246 }
48248 }
48249 Vector2
velocity =
default(Vector2);
48254 if (
sItem.useStyle == 5)
48255 {
48256 if (
sItem.type == 3029)
48257 {
48258 Vector2
vector54 =
default(Vector2);
48260 vector54.X = (float)Main.mouseX + Main.screenPosition.X -
pointPoisition.X;
48261 vector54.Y = (float)Main.mouseY + Main.screenPosition.Y -
pointPoisition.Y - 1000
f;
48263 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
48264 NetMessage.SendData(41, -1, -1,
null,
whoAmI);
48265 }
48266 else if (
sItem.type == 4381)
48267 {
48268 Vector2
vector56 =
default(Vector2);
48270 vector56.X = (float)Main.mouseX + Main.screenPosition.X -
pointPoisition.X;
48271 vector56.Y = (float)Main.mouseY + Main.screenPosition.Y -
pointPoisition.Y - 1000
f;
48273 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
48274 NetMessage.SendData(41, -1, -1,
null,
whoAmI);
48275 }
48276 else if (
sItem.type == 3779)
48277 {
48279 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
48280 NetMessage.SendData(41, -1, -1,
null,
whoAmI);
48281 }
48282 else
48283 {
48285 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
48286 NetMessage.SendData(41, -1, -1,
null,
whoAmI);
48287 }
48288 }
48289 if (
sItem.useStyle == 13)
48290 {
48292 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
48293 NetMessage.SendData(41, -1, -1,
null,
whoAmI);
48294 }
48296 {
48297 return;
48298 }
48300 {
48302 float num156 = (float)Main.screenHeight / Main.GameViewMatrix.Zoom.Y;
48305 {
48307 }
48308 float num167 =
num102 + (float)Main.rand.Next(-40, 41) * 0.01f;
48309 float num178 =
num113 + (float)Main.rand.Next(-40, 41) * 0.01f;
48313 Main.projectile[
num2].ai[1] = 1
f;
48316 {
48318 }
48320 {
48322 }
48326 NetMessage.SendData(27, -1, -1,
null,
num2);
48327 }
48328 else if (
sItem.type == 3029)
48329 {
48332 {
48333 if (Main.rand.Next(3) == 0)
48334 {
48336 }
48337 }
48338 else if (Main.rand.Next(3) == 0)
48339 {
48341 }
48343 {
48345 pointPoisition.X = (pointPoisition.X * 10
f +
base.Center.X) / 11
f + (
float)Main.rand.Next(-100, 101);
48346 pointPoisition.Y -= 150 *
k;
48350 {
48352 }
48354 {
48356 }
48361 float num23 =
num102 + (float)Main.rand.Next(-40, 41) * 0.03f;
48362 float speedY =
num113 + (float)Main.rand.Next(-40, 41) * 0.03f;
48363 num23 *= (float)Main.rand.Next(75, 150) * 0.01f;
48364 pointPoisition.X += Main.rand.Next(-50, 51);
48366 Main.projectile[
num34].noDropItem =
true;
48367 }
48368 }
48369 else if (
sItem.type == 4381)
48370 {
48371 int num45 = Main.rand.Next(1, 3);
48372 if (Main.rand.Next(3) == 0)
48373 {
48375 }
48377 {
48379 pointPoisition.X = (pointPoisition.X * 10
f +
base.Center.X) / 11
f + (
float)Main.rand.Next(-30, 31);
48380 pointPoisition.Y -= 150
f * Main.rand.NextFloat();
48384 {
48386 }
48388 {
48390 }
48395 float num56 =
num102 + (float)Main.rand.Next(-20, 21) * 0.03f;
48396 float speedY3 =
num113 + (float)Main.rand.Next(-40, 41) * 0.03f;
48397 num56 *= (float)Main.rand.Next(55, 80) * 0.01f;
48398 pointPoisition.X += Main.rand.Next(-50, 51);
48400 Main.projectile[
num67].noDropItem =
true;
48401 }
48402 }
48403 else if (
sItem.type == 98 ||
sItem.type == 533)
48404 {
48405 float speedX =
num102 + (float)Main.rand.Next(-40, 41) * 0.01f;
48406 float speedY4 =
num113 + (float)Main.rand.Next(-40, 41) * 0.01f;
48408 }
48409 else if (
sItem.type == 1319)
48410 {
48411 float speedX2 =
num102 + (float)Main.rand.Next(-40, 41) * 0.02f;
48412 float speedY5 =
num113 + (float)Main.rand.Next(-40, 41) * 0.02f;
48414 }
48415 else if (
sItem.type == 3107)
48416 {
48417 float speedX3 =
num102 + (float)Main.rand.Next(-40, 41) * 0.02f;
48418 float speedY6 =
num113 + (float)Main.rand.Next(-40, 41) * 0.02f;
48420 }
48422 {
48423 Vector2
vector57 =
default(Vector2);
48424 ((Vector2)(
ref vector57)).
_002Ector((
float)Main.mouseX + Main.screenPosition.X, (float)Main.mouseY + Main.screenPosition.Y);
48426 bool flag2 =
false;
48428 {
48430 }
48432 {
48434 {
48436 }
48437 else
48438 {
48440 }
48441 }
48442 }
48443 else if (
sItem.type == 3053)
48444 {
48445 bool flag3 =
false;
48447 {
48449 }
48450 Vector2
vector2 =
default(Vector2);
48455 {
48456 Vector2
vector3 =
default(Vector2);
48457 ((Vector2)(
ref vector3)).
_002Ector((
float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
48460 }
48463 float num77 = (float)Main.rand.Next(10, 80) * 0.001f;
48464 if (Main.rand.Next(2) == 0)
48465 {
48467 }
48468 float num87 = (float)Main.rand.Next(10, 80) * 0.001f;
48469 if (Main.rand.Next(2) == 0)
48470 {
48472 }
48474 {
48476 }
48477 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
vector2.X,
vector2.Y,
projToShoot,
Damage,
KnockBack, i,
num87,
num77);
48478 }
48479 else if (
sItem.type == 3019)
48480 {
48481 Vector2
vector4 =
default(Vector2);
48484 vector4.X += (float)Main.rand.Next(-100, 101) * 0.01f *
num98 * 0.15f;
48485 vector4.Y += (float)Main.rand.Next(-100, 101) * 0.01f *
num98 * 0.15f;
48486 float num103 =
num102 + (float)Main.rand.Next(-40, 41) * 0.03f;
48487 float num104 =
num113 + (float)Main.rand.Next(-40, 41) * 0.03f;
48490 num103 *= (float)Main.rand.Next(50, 150) * 0.01f;
48491 num104 *= (float)Main.rand.Next(50, 150) * 0.01f;
48492 Vector2
vector5 =
default(Vector2);
48494 vector5.X += (float)Main.rand.Next(-100, 101) * 0.025f;
48495 vector5.Y += (float)Main.rand.Next(-100, 101) * 0.025f;
48500 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num103,
num104,
projToShoot,
Damage,
KnockBack, i,
vector4.X,
vector4.Y);
48501 }
48502 else if (
sItem.type == 2797)
48503 {
48506 {
48508 }
48509 float ai = Utils.ToRotation(
new Vector2(
num102,
num113));
48511 int num106 = Main.rand.Next(4, 5);
48512 if (Main.rand.Next(4) == 0)
48513 {
48515 }
48517 {
48518 float num107 = (float)Main.rand.NextDouble() * 0.2f + 0.05f;
48521 val =
default(Vector2);
48526 }
48527 }
48528 else if (
sItem.type == 2270)
48529 {
48530 float num109 =
num102 + (float)Main.rand.Next(-40, 41) * 0.05f;
48531 float num110 =
num113 + (float)Main.rand.Next(-40, 41) * 0.05f;
48532 if (Main.rand.Next(3) == 0)
48533 {
48534 num109 *= 1
f + (float)Main.rand.Next(-30, 31) * 0.02f;
48535 num110 *= 1
f + (float)Main.rand.Next(-30, 31) * 0.02f;
48536 }
48538 }
48539 else if (
sItem.type == 5117)
48540 {
48541 float speedX4 =
num102 + (float)Main.rand.Next(-15, 16) * 0.075f;
48542 float speedY7 =
num113 + (float)Main.rand.Next(-15, 16) * 0.075f;
48543 int num111 = Main.rand.Next(Main.projFrames[
sItem.shoot]);
48545 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
speedX4,
speedY7,
projToShoot,
damage2,
KnockBack, i, 0
f,
num111);
48546 }
48547 else if (
sItem.type == 1930)
48548 {
48549 int num112 = 2 + Main.rand.Next(3);
48551 {
48554 float num116 = 0.025f * (float)
n;
48561 float x = pointPoisition.X +
num102 * (float)(
num112 -
n) * 1.75f;
48562 float y = pointPoisition.Y +
num113 * (float)(
num112 -
n) * 1.75f;
48563 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo, x, y,
num114,
num115,
projToShoot,
Damage,
KnockBack, i, Main.rand.Next(0, 10 * (
n + 1)));
48564 }
48565 }
48566 else if (
sItem.type == 1931)
48567 {
48570 {
48572 pointPoisition.X = (pointPoisition.X +
base.Center.X) / 2
f + (
float)Main.rand.Next(-200, 201);
48573 pointPoisition.Y -= 100 *
num118;
48577 {
48578 num113 = Main.screenPosition.Y + (float)Main.screenHeight - (
float)Main.mouseY -
pointPoisition.Y;
48579 }
48581 {
48583 }
48585 {
48587 }
48592 float speedX5 =
num102 + (float)Main.rand.Next(-40, 41) * 0.02f;
48593 float speedY8 =
num113 + (float)Main.rand.Next(-40, 41) * 0.02f;
48594 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
speedX5,
speedY8,
projToShoot,
Damage,
KnockBack, i, 0
f, Main.rand.Next(5));
48595 }
48596 }
48597 else if (
sItem.type == 2750)
48598 {
48601 {
48603 pointPoisition.X = (pointPoisition.X +
base.Center.X) / 2
f + (
float)Main.rand.Next(-200, 201);
48604 pointPoisition.Y -= 100 *
num120;
48605 num102 = (float)Main.mouseX + Main.screenPosition.X -
pointPoisition.X + (
float)Main.rand.Next(-40, 41) * 0.03f;
48608 {
48609 num113 = Main.screenPosition.Y + (float)Main.screenHeight - (
float)Main.mouseY -
pointPoisition.Y;
48610 }
48612 {
48614 }
48616 {
48618 }
48624 float num122 =
num113 + (float)Main.rand.Next(-40, 41) * 0.02f;
48625 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num121 * 0.75f,
num122 * 0.75f,
projToShoot + Main.rand.Next(3),
Damage,
KnockBack, i, 0
f, 0.5f + (float)Main.rand.NextDouble() * 0.3f);
48626 }
48627 }
48628 else if (
sItem.type == 3570)
48629 {
48632 {
48634 pointPoisition.X = (pointPoisition.X +
base.Center.X) / 2
f + (
float)Main.rand.Next(-200, 201);
48635 pointPoisition.Y -= 100 *
num125;
48640 {
48642 }
48644 {
48646 }
48652 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
vector8.X,
vector8.Y,
projToShoot,
Damage,
KnockBack, i, 0
f,
ai2);
48653 }
48654 }
48655 else if (
sItem.type == 5065)
48656 {
48658 Vector2
zero = Vector2.Zero;
48660 }
48661 else if (
sItem.type == 3065)
48662 {
48663 Vector2
vector9 = Main.screenPosition +
new Vector2((
float)Main.mouseX, (
float)Main.mouseY);
48666 {
48667 num126 = base.Center.Y - 200
f;
48668 }
48670 {
48672 pointPoisition.Y -= 100 *
num127;
48675 {
48677 }
48679 {
48681 }
48687 float speedY9 =
num113 + (float)Main.rand.Next(-40, 41) * 0.02f;
48688 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
speedX6,
speedY9,
projToShoot,
Damage,
KnockBack, i, 0
f,
num126);
48689 }
48690 }
48691 else if (
sItem.type == 2624)
48692 {
48695 Vector2
vector11 =
default(Vector2);
48701 {
48705 val =
default(Vector2);
48708 {
48710 }
48712 Main.projectile[
num132].noDropItem =
true;
48713 }
48714 }
48715 else if (
sItem.type == 1929)
48716 {
48717 float speedX7 =
num102 + (float)Main.rand.Next(-40, 41) * 0.03f;
48718 float speedY10 =
num113 + (float)Main.rand.Next(-40, 41) * 0.03f;
48720 }
48721 else if (
sItem.type == 1553)
48722 {
48723 float speedX8 =
num102 + (float)Main.rand.Next(-40, 41) * 0.005f;
48724 float speedY2 =
num113 + (float)Main.rand.Next(-40, 41) * 0.005f;
48726 }
48727 else if (
sItem.type == 518)
48728 {
48731 num133 += (float)Main.rand.Next(-40, 41) * 0.04f;
48732 num134 += (float)Main.rand.Next(-40, 41) * 0.04f;
48734 }
48735 else if (
sItem.type == 1265)
48736 {
48739 num136 += (float)Main.rand.Next(-30, 31) * 0.03f;
48740 num137 += (float)Main.rand.Next(-30, 31) * 0.03f;
48742 }
48743 else if (
sItem.type == 4262)
48744 {
48745 float num138 = 2.6666667f;
48747 _ = (int)
base.Bottom.X / 16;
48749 float num140 =
Math.Abs((
float)Main.mouseX + Main.screenPosition.X -
base.position.X) / 16
f;
48751 {
48753 }
48756 {
48758 }
48759 Point point =
base.Center.ToTileCoordinates();
48762 {
48763 if (Collision.CanHitLine(
base.Center, 1, 1,
base.Center +
new Vector2((
float)(16 *
num141 *
direction), 0
f), 1, 1) &&
WorldUtils.
Find(
new Point(point.X +
direction *
num141, point.Y),
Searches.
Chain(
new Searches.
Down(
maxDistance),
new Terraria.
WorldBuilding.
Conditions.
MysticSnake()),
out var result))
48764 {
48767 {
48770 {
48772 break;
48773 }
48774 }
48776 {
48779 {
48780 Projectile projectile = Main.projectile[
num143];
48781 if (projectile.active && projectile.owner ==
whoAmI && projectile.type ==
projToShoot)
48782 {
48783 if (projectile.ai[1] == 2
f)
48784 {
48785 projectile.timeLeft = 4;
48786 }
48787 else
48788 {
48789 projectile.Kill();
48790 }
48791 }
48792 }
48794 break;
48795 }
48796 }
48797 }
48798 }
48799 else if (
sItem.type == 4952)
48800 {
48801 Vector2
vector14 = Main.rand.NextVector2Circular(1
f, 1
f) + Main.rand.NextVector2CircularEdge(3
f, 3
f);
48803 {
48805 }
48810 if (tile !=
null && tile.nactive() && Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type] && !
TileID.
Sets.
Platforms[tile.type])
48811 {
48813 }
48814 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
vector14.X,
vector14.Y,
projToShoot,
Damage,
KnockBack, i, -1
f,
num144 % 1
f);
48815 }
48816 else if (
sItem.type == 4953)
48817 {
48820 Vector2
vector15 =
default(Vector2);
48828 {
48830 }
48834 val =
default(Vector2);
48837 {
48839 }
48846 {
48848 }
48851 {
48854 }
48856 {
48858 v3 =
v3.SafeNormalize(Vector2.Zero) * (
speed * 2
f);
48860 }
48861 else
48862 {
48864 Main.projectile[
num151].noDropItem =
true;
48865 }
48866 }
48867 else if (
sItem.type == 534)
48868 {
48869 int num152 = Main.rand.Next(4, 6);
48871 {
48874 num154 += (float)Main.rand.Next(-40, 41) * 0.05f;
48875 num155 += (float)Main.rand.Next(-40, 41) * 0.05f;
48877 }
48878 }
48879 else if (
sItem.type == 4703)
48880 {
48883 Vector2
v4 =
default(Vector2);
48885 {
48891 val =
default(Vector2);
48893 v4 =
v4.SafeNormalize(Vector2.Zero) *
num159;
48896 x2 += (float)Main.rand.Next(-40, 41) * 0.05f;
48897 y2 += (float)Main.rand.Next(-40, 41) * 0.05f;
48899 }
48900 }
48901 else if (
sItem.type == 4270)
48902 {
48908 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
vector19.X,
vector19.Y,
vector20.X,
vector20.Y,
projToShoot,
Damage,
KnockBack, i, 0
f, Main.rand.NextFloat() * 0.5f + 0.6f);
48909 }
48910 else if (
sItem.type == 4715)
48911 {
48912 Vector2
vector21 = Main.MouseWorld;
48916 {
48918 vector21 = nPC.Center + nPC.velocity * 20
f;
48919 }
48922 {
48923 vector21 += Main.rand.NextVector2Circular(24
f, 24
f);
48925 {
48928 }
48929 }
48930 Vector2
vector23 = Main.rand.NextVector2CircularEdge(1
f, 1
f);
48932 {
48934 }
48936 {
48937 vector23.Y = (0
f - Main.rand.NextFloat()) * 0.5
f - 0.5
f;
48938 }
48940 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
vector23.X,
vector23.Y,
projToShoot,
Damage,
KnockBack, i,
vector21.X,
vector21.Y);
48941 }
48942 else if (
sItem.type == 4722)
48943 {
48944 Vector2
vector24 = Main.MouseWorld;
48948 {
48950 vector24 = nPC2.Center + nPC2.velocity * 20
f;
48951 }
48953 Vector2
vector26 = Main.rand.NextVector2CircularEdge(1
f, 1
f);
48956 Vector2
vector28 =
default(Vector2);
48958 {
48960 {
48961 vector24 += Main.rand.NextVector2Circular(24
f, 24
f);
48963 {
48966 }
48971 }
48975 float num168 = 12
f + Main.rand.NextFloat() * 2
f;
48980 {
48984 val =
default(Vector2);
48986 }
48991 }
48992 }
48993 else if (
sItem.type == 4607)
48994 {
48997 val =
default(Vector2);
48999 val =
default(Vector2);
49001 }
49002 else if (
sItem.type == 5069)
49003 {
49006 val =
default(Vector2);
49008 val =
default(Vector2);
49010 }
49011 else if (
sItem.type == 5114)
49012 {
49015 val =
default(Vector2);
49017 val =
default(Vector2);
49019 }
49020 else if (
sItem.type == 2188)
49021 {
49023 if (Main.rand.Next(3) == 0)
49024 {
49026 }
49027 if (Main.rand.Next(4) == 0)
49028 {
49030 }
49031 if (Main.rand.Next(5) == 0)
49032 {
49034 }
49036 {
49049 }
49050 }
49051 else if (
sItem.type == 1308)
49052 {
49054 if (Main.rand.Next(3) == 0)
49055 {
49057 }
49059 {
49072 }
49073 }
49074 else if (
sItem.type == 1258)
49075 {
49078 num181 += (float)Main.rand.Next(-40, 41) * 0.01f;
49079 num182 += (float)Main.rand.Next(-40, 41) * 0.01f;
49080 pointPoisition.X += (float)Main.rand.Next(-40, 41) * 0.05f;
49081 pointPoisition.Y += (float)Main.rand.Next(-45, 36) * 0.05f;
49083 }
49084 else if (
sItem.type == 964)
49085 {
49086 int num183 = Main.rand.Next(3, 5);
49088 {
49091 num185 += (float)Main.rand.Next(-35, 36) * 0.04f;
49092 num186 += (float)Main.rand.Next(-35, 36) * 0.04f;
49094 }
49095 }
49096 else if (
sItem.type == 1569)
49097 {
49099 if (Main.rand.Next(2) == 0)
49100 {
49102 }
49103 if (Main.rand.Next(4) == 0)
49104 {
49106 }
49107 if (Main.rand.Next(8) == 0)
49108 {
49110 }
49111 if (Main.rand.Next(16) == 0)
49112 {
49114 }
49116 {
49120 num3 += (float)Main.rand.Next(-35, 36) *
num5;
49121 num4 += (float)Main.rand.Next(-35, 36) *
num5;
49129 }
49130 }
49132 {
49133 bool num190 = sItem.type == 3571 || sItem.type == 3569;
49134 int num6 = (int)((
float)Main.mouseX + Main.screenPosition.X) / 16;
49135 int num7 = (int)((
float)Main.mouseY + Main.screenPosition.Y) / 16;
49137 {
49138 num7 = (int)(Main.screenPosition.Y + (
float)Main.screenHeight - (float)Main.mouseY) / 16;
49139 }
49141 {
49143 {
49144 }
49146 }
49148 switch (
sItem.type)
49149 {
49150 case 1572:
49152 break;
49153 case 5119:
49155 break;
49156 }
49158 Main.projectile[
num9].originalDamage = damage;
49160 }
49161 else if (
sItem.type == 1244 ||
sItem.type == 1256)
49162 {
49164 Main.projectile[
num10].ai[0] = (float)Main.mouseX + Main.screenPosition.X;
49165 Main.projectile[
num10].ai[1] = (float)Main.mouseY + Main.screenPosition.Y;
49166 }
49167 else if (
sItem.type == 1229)
49168 {
49170 if (Main.rand.Next(3) == 0)
49171 {
49173 }
49175 {
49179 {
49180 num14 += (float)Main.rand.Next(-35, 36) * 0.04f;
49181 num15 += (float)Main.rand.Next(-35, 36) * 0.04f;
49182 }
49184 {
49185 num14 += (float)Main.rand.Next(-35, 36) * 0.04f;
49186 num15 += (float)Main.rand.Next(-35, 36) * 0.04f;
49187 }
49189 {
49190 num14 += (float)Main.rand.Next(-35, 36) * 0.04f;
49191 num15 += (float)Main.rand.Next(-35, 36) * 0.04f;
49192 }
49194 Main.projectile[
num16].noDropItem =
true;
49195 }
49196 }
49197 else if (
sItem.type == 1121)
49198 {
49199 int num17 = Main.rand.Next(1, 4);
49200 if (Main.rand.Next(6) == 0)
49201 {
49203 }
49204 if (Main.rand.Next(6) == 0)
49205 {
49207 }
49209 {
49211 }
49213 {
49216 num19 += (float)Main.rand.Next(-35, 36) * 0.02f;
49217 num20 += (float)Main.rand.Next(-35, 36) * 0.02f;
49219 Main.projectile[
num21].magic =
true;
49220 }
49221 }
49222 else if (
sItem.type == 1155)
49223 {
49224 int num22 = Main.rand.Next(2, 5);
49226 {
49229 num25 += (float)Main.rand.Next(-35, 36) * 0.02f;
49230 num26 += (float)Main.rand.Next(-35, 36) * 0.02f;
49232 }
49233 }
49234 else if (
sItem.type == 1801)
49235 {
49236 int num27 = Main.rand.Next(2, 4);
49238 {
49241 num29 += (float)Main.rand.Next(-35, 36) * 0.05f;
49242 num30 += (float)Main.rand.Next(-35, 36) * 0.05f;
49244 }
49245 }
49246 else if (
sItem.type == 679)
49247 {
49249 {
49252 num32 += (float)Main.rand.Next(-40, 41) * 0.05f;
49253 num33 += (float)Main.rand.Next(-40, 41) * 0.05f;
49255 }
49256 }
49257 else if (
sItem.type == 1156)
49258 {
49260 {
49263 num36 += (float)Main.rand.Next(-40, 41) * 0.05f;
49264 num37 += (float)Main.rand.Next(-40, 41) * 0.05f;
49266 }
49267 }
49268 else if (
sItem.type == 4682)
49269 {
49271 {
49274 num39 += (float)Main.rand.Next(-20, 21) * 0.1f;
49275 num40 += (float)Main.rand.Next(-20, 21) * 0.1f;
49277 }
49278 }
49279 else if (
sItem.type == 2623)
49280 {
49282 {
49285 num42 += (float)Main.rand.Next(-40, 41) * 0.1f;
49286 num43 += (float)Main.rand.Next(-40, 41) * 0.1f;
49288 }
49289 }
49290 else if (
sItem.type == 3210)
49291 {
49292 Vector2
vector32 =
default(Vector2);
49294 vector32.X += (float)Main.rand.Next(-30, 31) * 0.04f;
49295 vector32.Y += (float)Main.rand.Next(-30, 31) * 0.03f;
49297 vector32 *= (float)Main.rand.Next(70, 91) * 0.1f;
49298 vector32.X += (float)Main.rand.Next(-30, 31) * 0.04f;
49299 vector32.Y += (float)Main.rand.Next(-30, 31) * 0.03f;
49301 }
49302 else if (
sItem.type == 434)
49303 {
49307 {
49308 num44 += (float)Main.rand.Next(-40, 41) * 0.01f;
49309 num46 += (float)Main.rand.Next(-40, 41) * 0.01f;
49312 }
49314 {
49315 num44 += (float)Main.rand.Next(-20, 21) * 0.01f;
49316 num46 += (float)Main.rand.Next(-20, 21) * 0.01f;
49319 }
49321 }
49322 else if (
sItem.type == 1157)
49323 {
49327 val =
default(Vector2);
49329 val =
default(Vector2);
49331 Main.projectile[
num47].localAI[0] = 30
f;
49332 }
49333 else if (
sItem.type == 1802)
49334 {
49337 val =
default(Vector2);
49339 val =
default(Vector2);
49341 }
49342 else if (
sItem.type == 2364 ||
sItem.type == 2365)
49343 {
49346 val =
default(Vector2);
49348 val =
default(Vector2);
49350 }
49351 else if (
sItem.type == 2535)
49352 {
49358 val =
default(Vector2);
49362 val =
default(Vector2);
49365 }
49366 else if (
sItem.type == 2551)
49367 {
49370 val =
default(Vector2);
49372 val =
default(Vector2);
49376 }
49377 else if (
sItem.type == 2584)
49378 {
49381 val =
default(Vector2);
49383 val =
default(Vector2);
49385 }
49386 else if (
sItem.type == 2621)
49387 {
49390 val =
default(Vector2);
49392 val =
default(Vector2);
49394 }
49396 {
49399 val =
default(Vector2);
49401 val =
default(Vector2);
49403 }
49404 else if (
sItem.type == 3531)
49405 {
49409 {
49410 if (Main.projectile[
num50].active && Main.projectile[
num50].owner == Main.myPlayer)
49411 {
49412 if (
num48 == -1 && Main.projectile[
num50].type == 625)
49413 {
49415 }
49416 if (
num49 == -1 && Main.projectile[
num50].type == 628)
49417 {
49419 }
49421 {
49422 break;
49423 }
49424 }
49425 }
49427 {
49430 pointPoisition.X = (float)Main.mouseX + Main.screenPosition.X;
49431 pointPoisition.Y = (float)Main.mouseY + Main.screenPosition.Y;
49438 Main.projectile[
num51].originalDamage = damage;
49439 Main.projectile[
num52].originalDamage = damage;
49440 Main.projectile[
num53].originalDamage = damage;
49441 Main.projectile[
num54].originalDamage = damage;
49442 }
49444 {
49445 int num55 = (int)Main.projectile[
num49].ai[0];
49449 Main.projectile[
num57].netUpdate =
true;
49450 Main.projectile[
num57].ai[1] = 1
f;
49452 Main.projectile[
num58].netUpdate =
true;
49453 Main.projectile[
num58].ai[1] = 1
f;
49455 Main.projectile[
num49].netUpdate =
true;
49456 Main.projectile[
num49].ai[1] = 1
f;
49457 Main.projectile[
num57].originalDamage = damage;
49458 Main.projectile[
num58].originalDamage = damage;
49459 Main.projectile[
num49].originalDamage = damage;
49460 }
49461 }
49462 else if (
sItem.type == 1309 ||
sItem.type == 4758 ||
sItem.type == 4269 ||
sItem.type == 5005)
49463 {
49466 val =
default(Vector2);
49468 val =
default(Vector2);
49470 }
49472 {
49474 {
49477 {
49479 {
49481 }
49483 {
49485 }
49487 {
49489 }
49490 }
49491 }
49493 }
49494 else if (
sItem.type == 3006)
49495 {
49498 }
49499 else if (
sItem.type == 3014)
49500 {
49502 pointPoisition3.X = Main.MouseWorld.X;
49503 pointPoisition3.Y = Main.MouseWorld.Y;
49506 {
49507 pointPoisition.X +=
num102;
49508 pointPoisition.Y +=
num113;
49511 {
49513 break;
49514 }
49515 }
49516 bool flag5 =
false;
49521 {
49522 }
49524 {
49526 }
49530 {
49532 }
49537 {
49539 }
49543 {
49544 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y, 0
f, 0
f,
projToShoot,
Damage,
KnockBack, i,
num64,
num65);
49545 }
49546 }
49547 else if (
sItem.type == 3384)
49548 {
49550 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num102,
num113,
projToShoot,
Damage,
KnockBack, i, 0
f,
num68);
49551 }
49552 else if (
sItem.type == 3473)
49553 {
49554 float ai4 = (Main.rand.NextFloat() - 0.5f) * ((
float)Math.PI / 4
f);
49555 Vector2
vector34 =
default(Vector2);
49557 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
vector34.X,
vector34.Y,
projToShoot,
Damage,
KnockBack, i, 0
f,
ai4);
49558 }
49559 else if (
sItem.type == 4956)
49560 {
49562 Vector2
vector35 =
default(Vector2);
49566 {
49568 }
49573 {
49577 {
49579 }
49582 {
49584 }
49586 {
49587 vector36 += Main.rand.NextVector2Circular(150
f, 150
f);
49588 }
49589 }
49591 float ai5 = Main.rand.Next(-100, 101);
49593 }
49594 else if (
sItem.type == 3836)
49595 {
49599 }
49600 else if (
sItem.type == 3858)
49601 {
49603 Vector2
vector37 =
default(Vector2);
49606 {
49608 float ai7 = (0.3f + 0.7f * Main.rand.NextFloat()) *
speed * 1.75
f * (
float)
direction;
49610 }
49611 else
49612 {
49614 }
49615 }
49616 else if (
sItem.type == 3859)
49617 {
49618 Vector2
vector38 =
default(Vector2);
49625 {
49629 val =
default(Vector2);
49631 }
49632 }
49633 else if (
sItem.type == 3870)
49634 {
49637 {
49639 }
49640 Vector2
vector41 =
default(Vector2);
49646 {
49650 val =
default(Vector2);
49652 }
49653 }
49654 else if (
sItem.type == 3542)
49655 {
49656 float num75 = (Main.rand.NextFloat() - 0.5f) * ((
float)Math.PI / 4
f) * 0.7
f;
49658 {
49663 val =
default(Vector2);
49665 {
49666 break;
49667 }
49668 num75 = (Main.rand.NextFloat() - 0.5f) * ((
float)Math.PI / 4
f) * 0.7
f;
49669 }
49672 val =
default(Vector2);
49675 }
49676 else if (
sItem.type == 3779)
49677 {
49678 float num78 = Main.rand.NextFloat() * ((float)
Math.PI * 2
f);
49680 {
49685 val =
default(Vector2);
49687 {
49688 break;
49689 }
49690 num78 = Main.rand.NextFloat() * ((float)
Math.PI * 2
f);
49691 }
49694 val =
default(Vector2);
49697 }
49698 else if (
sItem.type == 3787)
49699 {
49700 float f = Main.rand.NextFloat() * ((float)
Math.PI * 2
f);
49705 {
49708 {
49709 break;
49710 }
49711 f = Main.rand.NextFloat() * ((float)
Math.PI * 2
f);
49712 }
49718 }
49719 else if (
sItem.type == 3788)
49720 {
49721 Vector2
vector47 =
default(Vector2);
49725 {
49729 double radians16 =
num81 * (Main.rand.NextFloat() * 0.5f + 0.5f);
49730 val =
default(Vector2);
49735 double radians17 = (0
f -
num81) * (Main.rand.NextFloat() * 0.5f + 0.5f);
49736 val =
default(Vector2);
49738 }
49740 }
49741 else if (
sItem.type == 4463 ||
sItem.type == 486)
49742 {
49744 }
49745 else if (
sItem.type == 46)
49746 {
49748 double radians18 = (float)
Math.PI * 2
f * Main.rand.NextFloatDirection() * 0.05f;
49749 val =
default(Vector2);
49753 {
49756 }
49757 else
49758 {
49760 }
49762 if ((
float)Main.rand.Next(100) <
meleeCrit)
49763 {
49766 }
49768 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49769 }
49770 else if (
sItem.type == 273)
49771 {
49773 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f),
projToShoot,
Damage,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale);
49774 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2(
num102,
num113),
projToShoot,
Damage,
KnockBack, i, (
float)
direction *
gravDir * 0.1
f, 30
f,
adjustedItemScale);
49775 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49776 }
49777 else if (
sItem.type == 368)
49778 {
49780 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f),
projToShoot,
Damage,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale2);
49781 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49782 }
49783 else if (
sItem.type == 1826)
49784 {
49786 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f),
projToShoot,
Damage,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale3);
49787 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49788 }
49789 else if (
sItem.type == 675)
49790 {
49792 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f), 972,
Damage,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale4);
49793 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2(
num102,
num113),
projToShoot,
Damage / 2,
KnockBack, i, (
float)
direction *
gravDir, 32
f,
adjustedItemScale4);
49794 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49795 }
49796 else if (
sItem.type == 674)
49797 {
49799 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f),
projToShoot,
Damage,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale5);
49800 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f), 982, 0,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale5);
49801 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49802 }
49803 else if (
sItem.type == 757)
49804 {
49806 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2((
float)
direction, 0
f), 984,
Damage,
KnockBack, i, (
float)
direction *
gravDir,
itemAnimationMax,
adjustedItemScale6);
49807 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
MountedCenter,
new Vector2(
num102,
num113) * 5
f,
projToShoot,
Damage,
KnockBack, i, (
float)
direction *
gravDir, 18
f,
adjustedItemScale6);
49808 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49809 }
49810 else if (
sItem.type == 190)
49811 {
49816 {
49818 vector49 = Main.rand.NextVector2FromRectangle(
nPC4.Hitbox);
49819 }
49820 else
49821 {
49822 vector49 += Main.rand.NextVector2Circular(20
f, 20
f);
49823 }
49832 {
49834 }
49841 {
49846 val =
default(Vector2);
49848 }
49849 float num89 =
v7.ToRotation();
49852 val =
default(Vector2);
49855 {
49857 }
49859 {
49863 val =
default(Vector2);
49865 }
49867 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
49868 }
49869 else if (
sItem.type == 3475)
49870 {
49871 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num102,
num113, 615,
Damage,
KnockBack, i, 5 * Main.rand.Next(0, 20));
49872 }
49873 else if (
sItem.type == 3930)
49874 {
49875 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num102,
num113, 714,
Damage,
KnockBack, i, 5 * Main.rand.Next(0, 20));
49876 }
49877 else if (
sItem.type == 3540)
49878 {
49880 }
49881 else if (
sItem.type == 5451)
49882 {
49884 {
49887 {
49889 }
49890 }
49892 }
49893 else if (
sItem.type == 3854)
49894 {
49896 }
49897 else if (
sItem.type == 3546)
49898 {
49900 {
49903 num92 += (float)Main.rand.Next(-40, 41) * 0.05f;
49904 num93 += (float)Main.rand.Next(-40, 41) * 0.05f;
49908 val =
default(Vector2);
49910 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
vector52.X,
vector52.Y,
num92,
num93, 167 + Main.rand.Next(4),
Damage,
KnockBack, i, 0
f, 1
f);
49911 }
49912 }
49913 else if (
sItem.type == 3350)
49914 {
49917 num94 += (float)Main.rand.Next(-1, 2) * 0.5f;
49918 num95 += (float)Main.rand.Next(-1, 2) * 0.5f;
49920 {
49922 }
49923 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y -
gravDir * 4
f,
num94,
num95,
projToShoot,
Damage,
KnockBack, i, 0
f, (
float)Main.rand.Next(12) / 6
f);
49924 }
49925 else if (
sItem.type == 3852)
49926 {
49928 {
49930 }
49931 else
49932 {
49934 }
49935 }
49937 {
49943 switch (
sItem.type)
49944 {
49945 case 3824:
49946 case 3825:
49947 case 3826:
49949 num97 = Projectile.GetBallistraShotDelay(
this);
49950 break;
49951 case 3832:
49952 case 3833:
49953 case 3834:
49954 num99 = Projectile.GetExplosiveTrapCooldown(
this);
49955 break;
49956 case 3818:
49959 break;
49960 case 3819:
49963 break;
49964 case 3820:
49967 break;
49968 }
49969 int num100 = Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
worldX,
worldY -
pushYUp, 0
f, 0
f,
projToShoot,
Damage,
KnockBack, i,
num96,
num97);
49970 Main.projectile[
num100].originalDamage = damage;
49973 }
49974 else if (
sItem.type == 65)
49975 {
49976 Vector2
vector53 =
default(Vector2);
49978 new Vector2(100
f, 0
f);
49983 {
49985 }
49987 }
49988 else if (
sItem.type == 4923)
49989 {
49991 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num102,
num113,
projToShoot,
Damage,
KnockBack, i, 0
f,
adjustedItemScale7);
49992 }
49993 else if (
sItem.type == 1910)
49994 {
49996 }
49997 else if (
sItem.type == 5134)
49998 {
49999 Projectile.NewProjectile(
projectileSource_Item_WithPotentialAmmo,
pointPoisition.X,
pointPoisition.Y,
num102,
num113,
projToShoot,
Damage,
KnockBack, i, 0
f, 1
f);
50000 }
50001 else
50002 {
50004 if (
sItem.type == 726)
50005 {
50006 Main.projectile[
num101].magic =
true;
50007 }
50009 {
50010 Main.projectile[
num101].melee =
true;
50011 }
50013 {
50016 }
50017 if (
sItem.type == 760)
50018 {
50020 }
50022 {
50025 }
50027 {
50028 Main.projectile[
num101].ai[1] = Main.rand.Next(3);
50029 }
50030 if (
sItem.type == 949)
50031 {
50032 Main.projectile[
num101].ai[1] = 1
f;
50033 }
50034 if (Main.projectile[
num101].aiStyle == 99)
50035 {
50037 }
50038 if (Main.projectile[
num101].aiStyle == 160 && Main.IsItAHappyWindyDay)
50039 {
50041 }
50042 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
50043 }
50044 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static void HandleSpecialEvent(Player player, int eventID)
static bool[] gunProj
If true for a given item type (F:Terraria.Item.type), then that item shoot projectiles that manually ...
static bool[] NoMeleeSpeedVelocityScaling
If true for a given projectile type (F:Terraria.Projectile.type), then its velocity will not scale wi...
static bool[] IsAGolfBall
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile is a kind of g...
static void ModifyShootStats(Player player, Item item, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
static bool CanShoot(Player player, Item item)
static bool Shoot(Player player, Item item, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
static DamageClass Throwing
Class provided for modders who want to coordinate throwing accessories and items. Not used by any van...
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
bool PickAmmo(Item weapon, out int projToShoot, out float speed, out int damage, out float knockBack, out int usedAmmoItemId, bool dontConsume=false)
A more-convenient-to-call variant of the vanilla PickAmmo method, which handles most vanilla ammuniti...
void PayDD2CrystalsBeforeUse(Item item)
bool ItemAnimationJustStarted
Returns true if the item animation is in its first frame.
float ThrownVelocity
Multiplier to shot projectile velocity before throwing. Result will be capped to 16f....
bool strongBees
If true, then the bees created by F:Terraria.Player.honeyCombItem have a chance to be stronger.
void UpdateMaxTurrets()
Kills F:Terraria.Projectile.sentry projectiles exceeding the players current F:Terraria....
void FindSentryRestingSpot(int checkProj, out int worldX, out int worldY, out int pushYUp)
Vector2 MountedCenter
Returns the player's center adjusted for mount and step stool usage. Typically used in conjunction wi...
IEntitySource GetProjectileSource_Item_WithPotentialAmmo(Item item, int ammoItemId)
bool GetSparkleGuitarTarget(out List< NPC > validTargets)
void LimitPointToPlayerReachableArea(ref Vector2 pointPoisition)
void ApplyItemTime(Item sItem, float multiplier=1f, bool? callUseItem=null)
float miscCounterNormalized
float GetWeaponKnockback(Item sItem)
Vector2 GetFarthestSpawnPositionOnLine(Vector2 startPos, float speedX, float speedY)
Vector2 RotatedRelativePoint(Vector2 pos, bool reverseRotation=false, bool addGfxOffY=true)
Takes an input position and returns the position adjusted to the players visual rotation and offset....
float GetAdjustedItemScale(Item item)
Used to determine what the overall scale of an item should be. M:Terraria.ModLoader....
void DestroyOldestProximityMinesOverMinesCap(int minesCap)
Point FindSharpTearsSpot(Vector2 targetSpot)
bool GetZenithTarget(Vector2 searchCenter, float maxDistance, out int npcTargetIndex)
int nextCycledSpiderMinionType
bool TryPlacingAGolfBallNearANearbyTee(Vector2 placePosition)
int SpawnMinionOnCursor(IEntitySource projectileSource, int ownerIndex, int minionProjectileId, int originalDamageNotScaledByMinionDamage, float KnockBack, Vector2 offsetFromCursor=default(Vector2), Vector2 velocityOnSpawn=default(Vector2))
int overrideFishingBobber
static GenSearch Chain(GenSearch search, params GenCondition[] conditions)
static bool Find(Point origin, GenSearch search, out Point result)
This object encapsulates context information about the source of a particular spawning event of an It...
static int GetRandomProfileIndex()