44094 {
44095
44096
44097
44098
44099
44100
44101
44102
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148
44149
44150
44151
44152
44153
44154
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166
44167
44168
44169
44170
44171
44172
44173
44174
44175
44176
44177
44178
44179
44180
44181
44182
44183
44184
44185
44186
44187
44188
44189
44190
44191
44192
44193
44194
44195
44196
44197
44198
44199
44200
44201
44202
44203
44204
44205
44206
44207
44208
44209
44210
44211
44212
44213
44214
44215
44216
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239
44240
44241
44242
44243
44244
44245
44246
44247
44248
44249
44250
44251
44252
44253
44254
44255
44256
44257
44258
44259
44260
44261
44262
44263
44264
44265
44266
44267
44268
44269
44270
44271
44272
44273
44274
44275
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285
44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
44325
44326
44327
44328
44329
44330
44331
44332
44333
44334
44335
44336
44337
44338
44339
44340
44341
44342
44343
44344
44345
44346
44347
44348
44349
44350
44351
44352
44353
44354
44355
44356
44357
44358
44359
44360
44361
44362
44363
44364
44365
44366
44367
44368
44369
44370
44371
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398 if (
sItem.type == 989 && Main.rand.Next(5) == 0)
44399 {
44400 int num30 = Main.rand.Next(3);
44402 {
44403 0 => 15,
44404 1 => 57,
44405 _ => 58,
44406 },
direction * 2, 0
f, 150,
default(Color), 1.3f);
44407 Dust
obj = Main.dust[
num];
44408 obj.velocity *= 0.2f;
44409 }
44410 if (
sItem.type == 2880 && Main.rand.Next(2) == 0)
44411 {
44412 int type2 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
44415 obj2.velocity *= 0.2f;
44416 Main.dust[
num12].noGravity =
true;
44417 }
44418 if ((
sItem.type == 44 ||
sItem.type == 45 ||
sItem.type == 103 ||
sItem.type == 104) && Main.rand.Next(15) == 0)
44419 {
44421 }
44422 if (
sItem.type == 46 && Main.rand.Next(15) == 0)
44423 {
44425 }
44427 {
44428 if (Main.rand.Next(5) == 0)
44429 {
44431 }
44433 Main.dust[
num23].noGravity =
true;
44434 Main.dust[
num23].velocity.X /= 2
f;
44435 Main.dust[
num23].velocity.Y /= 2
f;
44436 }
44437 if (
sItem.type == 723 && Main.rand.Next(2) == 0)
44438 {
44440 Main.dust[
num24].noGravity =
true;
44441 }
44442 if (
sItem.type == 65)
44443 {
44444 if (Main.rand.Next(5) == 0)
44445 {
44447 }
44448 if (Main.rand.Next(10) == 0)
44449 {
44451 }
44452 }
44453 if (
sItem.type == 3065)
44454 {
44457 obj3.velocity *= 0.5f;
44458 if (Main.rand.Next(8) == 0)
44459 {
44462 obj4.velocity *= 0.5f;
44464 obj5.velocity +=
new Vector2((
float)
direction, 0
f);
44465 }
44466 }
44467 if (
sItem.type == 190)
44468 {
44470 Main.dust[
num27].noGravity =
true;
44471 }
44472 else if (
sItem.type == 213 ||
sItem.type == 5295)
44473 {
44475 Main.dust[
num28].noGravity =
true;
44476 }
44477 if (
sItem.type == 121)
44478 {
44479 for (int i = 0; i < 2; i++)
44480 {
44483 Dust.NewDustPerfect(
location, 6,
vector * 4
f, 100,
default(Color), 2.5
f).noGravity =
true;
44484 }
44485 }
44487 {
44489 Main.dust[
num29].noGravity =
true;
44490 }
44491 if (
sItem.type == 155)
44492 {
44494 Main.dust[
num2].noGravity =
true;
44496 obj6.velocity *= 0.1f;
44497 }
44498 if (
sItem.type == 676 && Main.rand.Next(3) == 0)
44499 {
44501 Main.dust[
num3].noGravity =
true;
44503 obj7.velocity *= 0.2f;
44504 }
44505 if (
sItem.type == 3063)
44506 {
44508 Main.dust[
num4].color = Main.hslToRgb(Main.rand.NextFloat(), 1
f, 0.5f);
44509 Main.dust[
num4].noGravity =
true;
44511 obj8.velocity /= 2
f;
44512 }
44513 if (
sItem.type == 3823)
44514 {
44516 dust.noGravity = true;
44517 dust.velocity *= 2
f;
44518 dust.fadeIn = 0.9f;
44519 }
44520 if (
sItem.type == 724 && Main.rand.Next(5) == 0)
44521 {
44523 Main.dust[
num5].noGravity =
true;
44525 obj9.velocity *= 0.2f;
44526 }
44528 {
44529 for (
int j = 0;
j < 2;
j++)
44530 {
44533 Dust.NewDustPerfect(
location2, 5,
vector2 * 2
f, 100,
default(Color), 0.7
f + Main.rand.NextFloat() * 0.6f);
44534 if (Main.rand.Next(20) == 0)
44535 {
44538 Main.dust[
num6].fadeIn = 1.2f;
44539 Main.dust[
num6].noGravity =
true;
44541 obj10.velocity *= 0.25f;
44544 }
44545 }
44546 }
44547 if (
sItem.type == 367)
44548 {
44550 if (Main.rand.Next(3) == 0)
44551 {
44553 Main.dust[
num7].noGravity =
true;
44554 Main.dust[
num7].velocity.X /= 2
f;
44555 Main.dust[
num7].velocity.Y /= 2
f;
44557 }
44558 if (Main.rand.Next(4) == 0)
44559 {
44562 obj12.velocity *= 0
f;
44563 }
44564 }
44565 else if (
sItem.type != 368)
44566 {
44568 }
44570 {
44573 float num10 = 0.5f;
44574 if (
sItem.type == 198 ||
sItem.type == 3764)
44575 {
44579 }
44580 else if (
sItem.type == 199 ||
sItem.type == 3765)
44581 {
44585 }
44586 else if (
sItem.type == 200 ||
sItem.type == 3766)
44587 {
44591 }
44592 else if (
sItem.type == 201 ||
sItem.type == 3767)
44593 {
44597 }
44598 else if (
sItem.type == 202 ||
sItem.type == 3768)
44599 {
44603 }
44604 else if (
sItem.type == 203 ||
sItem.type == 3769)
44605 {
44609 }
44610 else if (
sItem.type == 4258 ||
sItem.type == 4259)
44611 {
44615 }
44617 }
44619 {
44621 Main.dust[
num11].noGravity =
true;
44623 obj13.velocity *= 0.7f;
44624 Main.dust[
num11].velocity.Y -= 0.5f;
44625 }
44627 {
44629 {
44630 if (Main.rand.Next(3) == 0)
44631 {
44633 Main.dust[
num13].noGravity =
true;
44634 Main.dust[
num13].fadeIn = 1.5f;
44636 obj14.velocity *= 0.25f;
44637 }
44638 }
44640 {
44641 if (Main.rand.Next(2) == 0)
44642 {
44644 Main.dust[
num14].noGravity =
true;
44646 obj15.velocity *= 0.7f;
44647 Main.dust[
num14].velocity.Y -= 0.5f;
44648 }
44649 }
44651 {
44652 if (Main.rand.Next(2) == 0)
44653 {
44655 Main.dust[
num15].noGravity =
true;
44657 obj16.velocity *= 0.7f;
44658 Main.dust[
num15].velocity.Y -= 0.5f;
44659 }
44660 }
44662 {
44664 if (Main.rand.Next(2) == 0)
44665 {
44667 Main.dust[
num16].noGravity =
true;
44668 Main.dust[
num16].velocity.X /= 2
f;
44669 Main.dust[
num16].velocity.Y /= 2
f;
44670 }
44671 }
44673 {
44674 if (Main.rand.Next(2) == 0)
44675 {
44678 Main.dust[
num17].velocity.Y += 0.2f;
44679 Main.dust[
num17].noGravity =
true;
44680 }
44681 }
44683 {
44684 if (Main.rand.Next(2) == 0)
44685 {
44688 Main.dust[
num18].velocity.Y += 0.2f;
44689 Main.dust[
num18].noGravity =
true;
44690 }
44691 }
44693 {
44694 if (Main.rand.Next(20) == 0)
44695 {
44696 int type3 = Main.rand.Next(139, 143);
44698 Main.dust[
num19].velocity.X *= 1
f + (float)Main.rand.Next(-50, 51) * 0.01f;
44699 Main.dust[
num19].velocity.Y *= 1
f + (float)Main.rand.Next(-50, 51) * 0.01f;
44700 Main.dust[
num19].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
44701 Main.dust[
num19].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
44702 Main.dust[
num19].scale *= 1
f + (float)Main.rand.Next(-30, 31) * 0.01f;
44703 }
44704 if (Main.rand.Next(40) == 0)
44705 {
44706 int type4 = Main.rand.Next(276, 283);
44708 Main.gore[
num20].velocity.X *= 1
f + (float)Main.rand.Next(-50, 51) * 0.01f;
44709 Main.gore[
num20].velocity.Y *= 1
f + (float)Main.rand.Next(-50, 51) * 0.01f;
44710 Main.gore[
num20].scale *= 1
f + (float)Main.rand.Next(-20, 21) * 0.01f;
44711 Main.gore[
num20].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
44712 Main.gore[
num20].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
44713 }
44714 }
44716 {
44718 Main.dust[
num21].noGravity =
true;
44719 Main.dust[
num21].fadeIn = 1.5f;
44721 obj17.velocity *= 0.25f;
44722 }
44723 }
44725 {
44727 Main.dust[
num22].noGravity =
true;
44728 Main.dust[
num22].velocity.X *= 2
f;
44729 Main.dust[
num22].velocity.Y *= 2
f;
44730 }
44733 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
static void MeleeEffects(Player player, Item sItem, Rectangle itemRectangle)
void GetPointOnSwungItemPath(float spriteWidth, float spriteHeight, float normalizedPointOnPath, float itemScale, out Vector2 location, out Vector2 outwardDirection)
byte meleeEnchant
The vanilla flask effect which the player currently has active; these affect all melee weapons and wh...
float GetAdjustedItemScale(Item item)
Used to determine what the overall scale of an item should be. M:Terraria.ModLoader....