Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ StatusPvP()

void Terraria.Projectile.StatusPvP ( int i)
inline

Definition at line 10443 of file Projectile.cs.

10444 {
10445 if ((melee || ProjectileID.Sets.IsAWhip[type]) && Main.player[owner].meleeEnchant > 0 && !noEnchantments)
10446 {
10447 byte meleeEnchant = Main.player[owner].meleeEnchant;
10448 if (meleeEnchant == 1)
10449 {
10450 Main.player[i].AddBuff(70, 60 * Main.rand.Next(5, 10), quiet: false);
10451 }
10452 if (meleeEnchant == 2)
10453 {
10454 Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7), quiet: false);
10455 }
10456 if (meleeEnchant == 3)
10457 {
10458 Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7), quiet: false);
10459 }
10460 if (meleeEnchant == 5)
10461 {
10462 Main.player[i].AddBuff(69, 60 * Main.rand.Next(10, 20), quiet: false);
10463 }
10464 if (meleeEnchant == 6)
10465 {
10466 Main.player[i].AddBuff(31, 60 * Main.rand.Next(1, 4), quiet: false);
10467 }
10468 if (meleeEnchant == 8)
10469 {
10470 Main.player[i].AddBuff(20, 60 * Main.rand.Next(5, 10), quiet: false);
10471 }
10472 }
10473 if (type == 978)
10474 {
10475 Main.player[i].AddBuff(24, 180);
10476 }
10477 if (type == 295 || type == 296)
10478 {
10479 Main.player[i].AddBuff(323, 60 * Main.rand.Next(8, 16), quiet: false);
10480 }
10481 if (type >= 399 && type <= 402)
10482 {
10483 Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7), quiet: false);
10484 }
10485 if (type == 478 || type == 480)
10486 {
10487 Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7), quiet: false);
10488 }
10489 if ((melee || ranged) && Main.player[owner].frostBurn && !noEnchantments)
10490 {
10491 Main.player[i].AddBuff(324, 60 * Main.rand.Next(1, 8), quiet: false);
10492 }
10493 if (melee && Main.player[owner].magmaStone && !noEnchantments)
10494 {
10495 if (Main.rand.Next(4) == 0)
10496 {
10497 Main.player[i].AddBuff(24, 360, quiet: false);
10498 }
10499 else if (Main.rand.Next(2) == 0)
10500 {
10501 Main.player[i].AddBuff(24, 240, quiet: false);
10502 }
10503 else
10504 {
10505 Main.player[i].AddBuff(24, 120, quiet: false);
10506 }
10507 }
10508 if (type == 2 && Main.rand.Next(3) == 0)
10509 {
10510 Main.player[i].AddBuff(24, 180, quiet: false);
10511 }
10512 if (type == 172)
10513 {
10514 if (Main.rand.Next(3) == 0)
10515 {
10516 Main.player[i].AddBuff(44, 240, quiet: false);
10517 }
10518 }
10519 else if (type == 15)
10520 {
10521 int num = 24;
10522 if (Main.remixWorld)
10523 {
10524 num = 323;
10525 }
10526 if (Main.rand.Next(2) == 0)
10527 {
10528 Main.player[i].AddBuff(num, 300, quiet: false);
10529 }
10530 }
10531 else if (type == 253)
10532 {
10533 if (Main.rand.Next(2) == 0)
10534 {
10535 Main.player[i].AddBuff(44, 480, quiet: false);
10536 }
10537 }
10538 else if (type == 19)
10539 {
10540 if (Main.rand.Next(5) == 0)
10541 {
10542 Main.player[i].AddBuff(24, 180, quiet: false);
10543 }
10544 }
10545 else if (type == 113)
10546 {
10547 if (Main.rand.Next(5) == 0)
10548 {
10549 Main.player[i].AddBuff(44, 180, quiet: false);
10550 }
10551 }
10552 else if (type == 33)
10553 {
10554 if (Main.rand.Next(5) == 0)
10555 {
10556 Main.player[i].AddBuff(20, 420, quiet: false);
10557 }
10558 }
10559 else if (type == 976)
10560 {
10561 if (Main.rand.Next(4) == 0)
10562 {
10563 Main.player[i].AddBuff(20, 420, quiet: false);
10564 }
10565 }
10566 else if (type == 34)
10567 {
10568 if (Main.rand.Next(2) == 0)
10569 {
10570 Main.player[i].AddBuff(24, 240, quiet: false);
10571 }
10572 }
10573 else if (type == 35)
10574 {
10575 if (Main.rand.Next(4) == 0)
10576 {
10577 Main.player[i].AddBuff(24, 180, quiet: false);
10578 }
10579 }
10580 else if (type == 54)
10581 {
10582 if (Main.rand.Next(2) == 0)
10583 {
10584 Main.player[i].AddBuff(20, 600, quiet: false);
10585 }
10586 }
10587 else if (type == 267)
10588 {
10589 if (Main.rand.Next(3) == 0)
10590 {
10591 Main.player[i].AddBuff(20, 3600, quiet: false);
10592 }
10593 else
10594 {
10595 Main.player[i].AddBuff(20, 1800, quiet: false);
10596 }
10597 }
10598 else if (type == 63)
10599 {
10600 if (Main.rand.Next(3) != 0)
10601 {
10602 Main.player[i].AddBuff(31, 120, quiet: false);
10603 }
10604 }
10605 else if (type == 85 || type == 188)
10606 {
10607 Main.player[i].AddBuff(24, 1200, quiet: false);
10608 }
10609 else if (type == 95 || type == 103 || type == 104 || type == 482)
10610 {
10611 Main.player[i].AddBuff(39, 420, quiet: false);
10612 }
10613 else if (type == 278 || type == 279 || type == 280)
10614 {
10615 Main.player[i].AddBuff(69, 900, quiet: false);
10616 }
10617 else if (type == 282 || type == 283)
10618 {
10619 Main.player[i].AddBuff(70, 600, quiet: false);
10620 }
10621 if (type == 163 || type == 310 || type == 1008 || type == 1010 || type == 1011)
10622 {
10623 if (Main.rand.Next(3) == 0)
10624 {
10625 Main.player[i].AddBuff(24, 600, quiet: false);
10626 }
10627 else
10628 {
10629 Main.player[i].AddBuff(24, 300, quiet: false);
10630 }
10631 }
10632 if (type == 1009)
10633 {
10634 Main.player[i].AddBuff(39, 300, quiet: false);
10635 }
10636 else if (type == 265)
10637 {
10638 Main.player[i].AddBuff(20, 1200, quiet: false);
10639 }
10640 else if (type == 355)
10641 {
10642 Main.player[i].AddBuff(70, 1800, quiet: false);
10643 }
10644 }

References Terraria.ID.ProjectileID.Sets.IsAWhip, Terraria.Projectile.melee, Terraria.Projectile.noEnchantments, Terraria.Projectile.owner, Terraria.Main.player, Terraria.Main.rand, Terraria.Projectile.ranged, Terraria.Main.remixWorld, and Terraria.Projectile.type.

Referenced by Terraria.Projectile.Damage().