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

◆ UpdateBuffs()

void Terraria.Player.UpdateBuffs ( int i)
inline

Definition at line 9342 of file Player.cs.

9343 {
9344 if (soulDrain > 0 && whoAmI == Main.myPlayer)
9345 {
9346 AddBuff(151, 2);
9347 }
9348 if (Main.dontStarveWorld)
9349 {
9351 }
9352 for (int j = 0; j < maxBuffs; j++)
9353 {
9354 if (buffType[j] <= 0 || buffTime[j] <= 0)
9355 {
9356 continue;
9357 }
9358 if (whoAmI == Main.myPlayer && !BuffID.Sets.TimeLeftDoesNotDecrease[buffType[j]])
9359 {
9360 buffTime[j]--;
9361 }
9362 if (buffType[j] == 1)
9363 {
9364 lavaImmune = true;
9365 fireWalk = true;
9366 buffImmune[24] = true;
9367 }
9368 else if (BuffID.Sets.BasicMountData[buffType[j]] != null)
9369 {
9371 mount.SetMount(buffMountData.mountID, this, buffMountData.faceLeft);
9372 buffTime[j] = 10;
9373 }
9374 else if (buffType[j] == 158)
9375 {
9376 manaRegenDelayBonus += 0.5f;
9377 manaRegenBonus += 10;
9378 }
9379 else if (buffType[j] == 159 && inventory[selectedItem].melee)
9380 {
9381 armorPenetration += 12;
9382 }
9383 else if (buffType[j] == 192)
9384 {
9385 pickSpeed -= 0.2f;
9386 moveSpeed += 0.2f;
9387 }
9388 else if (buffType[j] == 321)
9389 {
9390 int num = 10;
9391 meleeCrit += num;
9392 rangedCrit += num;
9393 magicCrit += num;
9394 minionDamage += (float)num / 100f;
9395 }
9396 else if (buffType[j] == 2)
9397 {
9398 lifeRegen += 4;
9399 }
9400 else if (buffType[j] == 3)
9401 {
9402 moveSpeed += 0.25f;
9403 }
9404 else if (buffType[j] == 4)
9405 {
9406 gills = true;
9407 }
9408 else if (buffType[j] == 5)
9409 {
9410 statDefense += 8;
9411 }
9412 else if (buffType[j] == 6)
9413 {
9414 manaRegenBuff = true;
9415 }
9416 else if (buffType[j] == 7)
9417 {
9418 magicDamage += 0.2f;
9419 }
9420 else if (buffType[j] == 8)
9421 {
9422 slowFall = true;
9423 }
9424 else if (buffType[j] == 9)
9425 {
9426 findTreasure = true;
9427 }
9428 else if (buffType[j] == 343)
9429 {
9430 biomeSight = true;
9431 }
9432 else if (buffType[j] == 10)
9433 {
9434 invis = true;
9435 }
9436 else if (buffType[j] == 11)
9437 {
9438 Lighting.AddLight((int)(position.X + (float)(width / 2)) / 16, (int)(position.Y + (float)(height / 2)) / 16, 0.8f, 0.95f, 1f);
9439 }
9440 else if (buffType[j] == 12)
9441 {
9442 nightVision = true;
9443 }
9444 else if (buffType[j] == 13)
9445 {
9446 enemySpawns = true;
9447 }
9448 else if (buffType[j] == 14)
9449 {
9450 if (thorns < 1f)
9451 {
9452 thorns = 1f;
9453 }
9454 }
9455 else if (buffType[j] == 15)
9456 {
9457 waterWalk = true;
9458 }
9459 else if (buffType[j] == 16)
9460 {
9461 archery = true;
9462 }
9463 else if (buffType[j] == 17)
9464 {
9465 detectCreature = true;
9466 }
9467 else if (buffType[j] == 18)
9468 {
9469 gravControl = true;
9470 }
9471 else if (buffType[j] == 30)
9472 {
9473 bleed = true;
9474 }
9475 else if (buffType[j] == 31)
9476 {
9477 confused = true;
9478 }
9479 else if (buffType[j] == 32)
9480 {
9481 slow = true;
9482 }
9483 else if (buffType[j] == 35)
9484 {
9485 silence = true;
9486 }
9487 else if (buffType[j] == 160)
9488 {
9489 dazed = true;
9490 }
9491 else if (buffType[j] == 46)
9492 {
9493 chilled = true;
9494 }
9495 else if (buffType[j] == 47)
9496 {
9497 frozen = true;
9498 }
9499 else if (buffType[j] == 156)
9500 {
9501 stoned = true;
9502 }
9503 else if (buffType[j] == 69)
9504 {
9505 ichor = true;
9506 statDefense -= 15;
9507 }
9508 else if (buffType[j] == 36)
9509 {
9510 brokenArmor = true;
9511 }
9512 else if (buffType[j] == 48)
9513 {
9514 honey = true;
9515 }
9516 else if (buffType[j] == 59)
9517 {
9518 shadowDodge = true;
9519 }
9520 else if (buffType[j] == 93)
9521 {
9522 ammoBox = true;
9523 }
9524 else if (buffType[j] == 58)
9525 {
9526 palladiumRegen = true;
9527 }
9528 else if (buffType[j] == 306)
9529 {
9530 hasTitaniumStormBuff = true;
9531 }
9532 else if (buffType[j] == 88)
9533 {
9534 chaosState = true;
9535 }
9536 else if (buffType[j] == 215)
9537 {
9538 statDefense += 5;
9539 }
9540 else if (buffType[j] == 311)
9541 {
9542 summonerWeaponSpeedBonus += 0.35f;
9543 }
9544 else if (buffType[j] == 308)
9545 {
9546 summonerWeaponSpeedBonus += 0.25f;
9547 }
9548 else if (buffType[j] == 314)
9549 {
9550 summonerWeaponSpeedBonus += 0.12f;
9551 }
9552 else if (buffType[j] == 312)
9553 {
9554 coolWhipBuff = true;
9555 }
9556 else if (buffType[j] == 63)
9557 {
9558 moveSpeed += 1f;
9559 }
9560 else if (buffType[j] == 104)
9561 {
9562 pickSpeed -= 0.25f;
9563 }
9564 else if (buffType[j] == 105)
9565 {
9566 lifeMagnet = true;
9567 }
9568 else if (buffType[j] == 106)
9569 {
9570 calmed = true;
9571 }
9572 else if (buffType[j] == 121)
9573 {
9574 fishingSkill += 15;
9575 }
9576 else if (buffType[j] == 122)
9577 {
9578 sonarPotion = true;
9579 }
9580 else if (buffType[j] == 123)
9581 {
9582 cratePotion = true;
9583 }
9584 else if (buffType[j] == 107)
9585 {
9586 tileSpeed += 0.25f;
9587 wallSpeed += 0.25f;
9588 blockRange++;
9589 }
9590 else if (buffType[j] == 108)
9591 {
9592 kbBuff = true;
9593 }
9594 else if (buffType[j] == 109)
9595 {
9596 ignoreWater = true;
9597 accFlipper = true;
9598 }
9599 else if (buffType[j] == 110)
9600 {
9601 maxMinions++;
9602 }
9603 else if (buffType[j] == 150)
9604 {
9605 maxMinions++;
9606 }
9607 else if (buffType[j] == 348)
9608 {
9609 maxTurrets++;
9610 }
9611 else if (buffType[j] == 111)
9612 {
9613 dangerSense = true;
9614 }
9615 else if (buffType[j] == 112)
9616 {
9617 ammoPotion = true;
9618 }
9619 else if (buffType[j] == 113)
9620 {
9621 lifeForce = true;
9622 statLifeMax2 += statLifeMax / 5 / 20 * 20;
9623 }
9624 else if (buffType[j] == 114)
9625 {
9626 endurance += 0.1f;
9627 }
9628 else if (buffType[j] == 115)
9629 {
9630 meleeCrit += 10;
9631 rangedCrit += 10;
9632 magicCrit += 10;
9633 }
9634 else if (buffType[j] == 116)
9635 {
9636 inferno = true;
9637 Lighting.AddLight((int)(base.Center.X / 16f), (int)(base.Center.Y / 16f), 0.65f, 0.4f, 0.1f);
9638 int num2 = 323;
9639 float num3 = 200f;
9640 bool flag = infernoCounter % 60 == 0;
9641 int damage = 20;
9642 if (whoAmI != Main.myPlayer)
9643 {
9644 continue;
9645 }
9646 for (int k = 0; k < 200; k++)
9647 {
9648 NPC nPC = Main.npc[k];
9649 if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num2] && CanNPCBeHitByPlayerOrPlayerProjectile(nPC) && Vector2.Distance(base.Center, nPC.Center) <= num3)
9650 {
9651 if (nPC.FindBuffIndex(num2) == -1)
9652 {
9653 nPC.AddBuff(num2, 120);
9654 }
9655 if (flag)
9656 {
9657 ApplyDamageToNPC(nPC, damage, 0f, 0, crit: false);
9658 }
9659 }
9660 }
9661 if (!hostile)
9662 {
9663 continue;
9664 }
9665 for (int l = 0; l < 255; l++)
9666 {
9667 Player player = Main.player[l];
9668 if (player == this || !player.active || player.dead || !player.hostile || player.buffImmune[num2] || (player.team == team && player.team != 0) || !(Vector2.Distance(base.Center, player.Center) <= num3))
9669 {
9670 continue;
9671 }
9672 if (player.FindBuffIndex(num2) == -1)
9673 {
9674 player.AddBuff(num2, 120);
9675 }
9676 if (flag)
9677 {
9678 player.Hurt(PlayerDeathReason.LegacyEmpty(), damage, 0, pvp: true);
9679 if (Main.netMode != 0)
9680 {
9682 NetMessage.SendPlayerHurt(l, reason, damage, 0, critical: false, pvp: true, -1);
9683 }
9684 }
9685 }
9686 }
9687 else if (buffType[j] == 117)
9688 {
9689 meleeDamage += 0.1f;
9690 rangedDamage += 0.1f;
9691 magicDamage += 0.1f;
9692 minionDamage += 0.1f;
9693 }
9694 else if (buffType[j] == 119)
9695 {
9696 loveStruck = true;
9697 }
9698 else if (buffType[j] == 120)
9699 {
9700 stinky = true;
9701 }
9702 else if (buffType[j] == 124)
9703 {
9704 resistCold = true;
9705 }
9706 else if (buffType[j] == 257)
9707 {
9708 if (Main.myPlayer == whoAmI)
9709 {
9710 if (buffTime[j] > 36000)
9711 {
9712 luckPotion = 3;
9713 }
9714 else if (buffTime[j] > 18000)
9715 {
9716 luckPotion = 2;
9717 }
9718 else
9719 {
9720 luckPotion = 1;
9721 }
9722 }
9723 }
9724 else if (buffType[j] == 165)
9725 {
9726 lifeRegen += 6;
9727 statDefense += 8;
9728 dryadWard = true;
9729 if (thorns < 1f)
9730 {
9731 thorns += 0.5f;
9732 }
9733 }
9734 else if (buffType[j] == 144)
9735 {
9736 electrified = true;
9737 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 0.3f, 0.8f, 1.1f);
9738 }
9739 else if (buffType[j] == 94)
9740 {
9741 manaSick = true;
9743 }
9744 else if (buffType[j] >= 95 && buffType[j] <= 97)
9745 {
9746 buffTime[j] = 5;
9747 int num4 = (byte)(1 + buffType[j] - 95);
9748 if (beetleOrbs > 0 && beetleOrbs != num4)
9749 {
9750 if (beetleOrbs > num4)
9751 {
9752 DelBuff(j);
9753 j--;
9754 }
9755 else
9756 {
9757 for (int m = 0; m < maxBuffs; m++)
9758 {
9759 if (buffType[m] >= 95 && buffType[m] <= 95 + num4 - 1)
9760 {
9761 DelBuff(m);
9762 m--;
9763 }
9764 }
9765 }
9766 }
9767 beetleOrbs = num4;
9768 if (!beetleDefense)
9769 {
9770 beetleOrbs = 0;
9771 DelBuff(j);
9772 j--;
9773 }
9774 else
9775 {
9776 beetleBuff = true;
9777 }
9778 }
9779 else if (buffType[j] >= 170 && buffType[j] <= 172)
9780 {
9781 buffTime[j] = 5;
9782 int num5 = (byte)(1 + buffType[j] - 170);
9783 if (solarShields > 0 && solarShields != num5)
9784 {
9785 if (solarShields > num5)
9786 {
9787 DelBuff(j);
9788 j--;
9789 }
9790 else
9791 {
9792 for (int n = 0; n < maxBuffs; n++)
9793 {
9794 if (buffType[n] >= 170 && buffType[n] <= 170 + num5 - 1)
9795 {
9796 DelBuff(n);
9797 n--;
9798 }
9799 }
9800 }
9801 }
9803 if (!setSolar)
9804 {
9805 solarShields = 0;
9806 DelBuff(j);
9807 j--;
9808 }
9809 }
9810 else if (buffType[j] >= 98 && buffType[j] <= 100)
9811 {
9812 int num6 = (byte)(1 + buffType[j] - 98);
9813 if (beetleOrbs > 0 && beetleOrbs != num6)
9814 {
9815 if (beetleOrbs > num6)
9816 {
9817 DelBuff(j);
9818 j--;
9819 }
9820 else
9821 {
9822 for (int num7 = 0; num7 < maxBuffs; num7++)
9823 {
9824 if (buffType[num7] >= 98 && buffType[num7] <= 98 + num6 - 1)
9825 {
9826 DelBuff(num7);
9827 num7--;
9828 }
9829 }
9830 }
9831 }
9832 beetleOrbs = num6;
9833 meleeDamage += 0.1f * (float)beetleOrbs;
9834 meleeSpeed += 0.1f * (float)beetleOrbs;
9835 if (!beetleOffense)
9836 {
9837 beetleOrbs = 0;
9838 DelBuff(j);
9839 j--;
9840 }
9841 else
9842 {
9843 beetleBuff = true;
9844 }
9845 }
9846 else if (buffType[j] >= 176 && buffType[j] <= 178)
9847 {
9848 int num8 = nebulaLevelMana;
9849 int num9 = (byte)(1 + buffType[j] - 176);
9850 if (num8 > 0 && num8 != num9)
9851 {
9852 if (num8 > num9)
9853 {
9854 DelBuff(j);
9855 j--;
9856 }
9857 else
9858 {
9859 for (int num10 = 0; num10 < maxBuffs; num10++)
9860 {
9861 if (buffType[num10] >= 176 && buffType[num10] <= 178 + num9 - 1)
9862 {
9863 DelBuff(num10);
9864 num10--;
9865 }
9866 }
9867 }
9868 }
9870 if (buffTime[j] == 2 && nebulaLevelMana > 1)
9871 {
9873 buffType[j]--;
9874 buffTime[j] = 480;
9875 }
9876 }
9877 else if (buffType[j] >= 173 && buffType[j] <= 175)
9878 {
9879 int num11 = nebulaLevelLife;
9880 int num12 = (byte)(1 + buffType[j] - 173);
9881 if (num11 > 0 && num11 != num12)
9882 {
9883 if (num11 > num12)
9884 {
9885 DelBuff(j);
9886 j--;
9887 }
9888 else
9889 {
9890 for (int num13 = 0; num13 < maxBuffs; num13++)
9891 {
9892 if (buffType[num13] >= 173 && buffType[num13] <= 175 + num12 - 1)
9893 {
9894 DelBuff(num13);
9895 num13--;
9896 }
9897 }
9898 }
9899 }
9901 if (buffTime[j] == 2 && nebulaLevelLife > 1)
9902 {
9904 buffType[j]--;
9905 buffTime[j] = 480;
9906 }
9908 }
9909 else if (buffType[j] >= 179 && buffType[j] <= 181)
9910 {
9912 int num15 = (byte)(1 + buffType[j] - 179);
9913 if (num14 > 0 && num14 != num15)
9914 {
9915 if (num14 > num15)
9916 {
9917 DelBuff(j);
9918 j--;
9919 }
9920 else
9921 {
9922 for (int num16 = 0; num16 < maxBuffs; num16++)
9923 {
9924 if (buffType[num16] >= 179 && buffType[num16] <= 181 + num15 - 1)
9925 {
9926 DelBuff(num16);
9927 num16--;
9928 }
9929 }
9930 }
9931 }
9933 if (buffTime[j] == 2 && nebulaLevelDamage > 1)
9934 {
9936 buffType[j]--;
9937 buffTime[j] = 480;
9938 }
9939 float num17 = 0.15f * (float)nebulaLevelDamage;
9940 meleeDamage += num17;
9942 magicDamage += num17;
9944 }
9945 else if (buffType[j] == 62)
9946 {
9947 if ((double)statLife <= (double)statLifeMax2 * 0.5)
9948 {
9949 Lighting.AddLight((int)(base.Center.X / 16f), (int)(base.Center.Y / 16f), 0.1f, 0.2f, 0.45f);
9950 iceBarrier = true;
9951 endurance += 0.25f;
9953 if (iceBarrierFrameCounter > 2)
9954 {
9957 if (iceBarrierFrame >= 12)
9958 {
9959 iceBarrierFrame = 0;
9960 }
9961 }
9962 }
9963 else
9964 {
9965 DelBuff(j);
9966 j--;
9967 }
9968 }
9969 else if (buffType[j] == 49)
9970 {
9971 for (int num18 = 191; num18 <= 194; num18++)
9972 {
9974 {
9975 pygmy = true;
9976 }
9977 }
9978 if (!pygmy)
9979 {
9980 DelBuff(j);
9981 j--;
9982 }
9983 else
9984 {
9985 buffTime[j] = 18000;
9986 }
9987 }
9988 else if (buffType[j] == 83)
9989 {
9990 if (ownedProjectileCounts[317] > 0)
9991 {
9992 raven = true;
9993 }
9994 if (!raven)
9995 {
9996 DelBuff(j);
9997 j--;
9998 }
9999 else
10000 {
10001 buffTime[j] = 18000;
10002 }
10003 }
10004 else if (buffType[j] == 64)
10005 {
10006 if (ownedProjectileCounts[266] > 0)
10007 {
10008 slime = true;
10009 }
10010 if (!slime)
10011 {
10012 DelBuff(j);
10013 j--;
10014 }
10015 else
10016 {
10017 buffTime[j] = 18000;
10018 }
10019 }
10020 else if (buffType[j] == 125)
10021 {
10022 if (ownedProjectileCounts[373] > 0)
10023 {
10024 hornetMinion = true;
10025 }
10026 if (!hornetMinion)
10027 {
10028 DelBuff(j);
10029 j--;
10030 }
10031 else
10032 {
10033 buffTime[j] = 18000;
10034 }
10035 }
10036 else if (buffType[j] == 126)
10037 {
10038 if (ownedProjectileCounts[375] > 0)
10039 {
10040 impMinion = true;
10041 }
10042 if (!impMinion)
10043 {
10044 DelBuff(j);
10045 j--;
10046 }
10047 else
10048 {
10049 buffTime[j] = 18000;
10050 }
10051 }
10052 else if (buffType[j] == 133)
10053 {
10054 if (ownedProjectileCounts[390] > 0 || ownedProjectileCounts[391] > 0 || ownedProjectileCounts[392] > 0)
10055 {
10056 spiderMinion = true;
10057 }
10058 if (!spiderMinion)
10059 {
10060 DelBuff(j);
10061 j--;
10062 }
10063 else
10064 {
10065 buffTime[j] = 18000;
10066 }
10067 }
10068 else if (buffType[j] == 134)
10069 {
10070 if (ownedProjectileCounts[387] > 0 || ownedProjectileCounts[388] > 0)
10071 {
10072 twinsMinion = true;
10073 }
10074 if (!twinsMinion)
10075 {
10076 DelBuff(j);
10077 j--;
10078 }
10079 else
10080 {
10081 buffTime[j] = 18000;
10082 }
10083 }
10084 else if (buffType[j] == 135)
10085 {
10086 if (ownedProjectileCounts[393] > 0 || ownedProjectileCounts[394] > 0 || ownedProjectileCounts[395] > 0)
10087 {
10088 pirateMinion = true;
10089 }
10090 if (!pirateMinion)
10091 {
10092 DelBuff(j);
10093 j--;
10094 }
10095 else
10096 {
10097 buffTime[j] = 18000;
10098 }
10099 }
10100 else if (buffType[j] == 214)
10101 {
10102 if (ownedProjectileCounts[758] > 0)
10103 {
10104 vampireFrog = true;
10105 }
10106 if (!vampireFrog)
10107 {
10108 DelBuff(j);
10109 j--;
10110 }
10111 else
10112 {
10113 buffTime[j] = 18000;
10114 }
10115 }
10116 else if (buffType[j] == 139)
10117 {
10118 if (ownedProjectileCounts[407] > 0)
10119 {
10120 sharknadoMinion = true;
10121 }
10122 if (!sharknadoMinion)
10123 {
10124 DelBuff(j);
10125 j--;
10126 }
10127 else
10128 {
10129 buffTime[j] = 18000;
10130 }
10131 }
10132 else if (buffType[j] == 140)
10133 {
10134 if (ownedProjectileCounts[423] > 0)
10135 {
10136 UFOMinion = true;
10137 }
10138 if (!UFOMinion)
10139 {
10140 DelBuff(j);
10141 j--;
10142 }
10143 else
10144 {
10145 buffTime[j] = 18000;
10146 }
10147 }
10148 else if (buffType[j] == 182)
10149 {
10150 if (ownedProjectileCounts[613] > 0)
10151 {
10152 stardustMinion = true;
10153 }
10154 if (!stardustMinion)
10155 {
10156 DelBuff(j);
10157 j--;
10158 }
10159 else
10160 {
10161 buffTime[j] = 18000;
10162 }
10163 }
10164 else if (buffType[j] == 213)
10165 {
10166 if (ownedProjectileCounts[755] > 0)
10167 {
10168 batsOfLight = true;
10169 }
10170 if (!batsOfLight)
10171 {
10172 DelBuff(j);
10173 j--;
10174 }
10175 else
10176 {
10177 buffTime[j] = 18000;
10178 }
10179 }
10180 else if (buffType[j] == 216)
10181 {
10182 bool flag2 = true;
10183 if (ownedProjectileCounts[759] > 0)
10184 {
10185 babyBird = true;
10186 }
10187 else if (whoAmI == Main.myPlayer)
10188 {
10189 if (numMinions < maxMinions)
10190 {
10191 int num19 = FindItem(4281);
10192 if (num19 != -1)
10193 {
10195 int num20 = Projectile.NewProjectile(GetProjectileSource_Item(item), base.Top, Vector2.Zero, item.shoot, item.damage, item.knockBack, whoAmI);
10196 Main.projectile[num20].originalDamage = item.damage;
10197 babyBird = true;
10198 }
10199 }
10200 if (!babyBird)
10201 {
10202 DelBuff(j);
10203 j--;
10204 flag2 = false;
10205 }
10206 }
10207 if (flag2)
10208 {
10209 buffTime[j] = 18000;
10210 }
10211 }
10212 else if (buffType[j] == 325)
10213 {
10214 if (ownedProjectileCounts[951] > 0)
10215 {
10216 flinxMinion = true;
10217 }
10218 if (!flinxMinion)
10219 {
10220 DelBuff(j);
10221 j--;
10222 }
10223 else
10224 {
10225 buffTime[j] = 18000;
10226 }
10227 }
10228 else if (buffType[j] == 335)
10229 {
10230 if (ownedProjectileCounts[970] > 0)
10231 {
10232 abigailMinion = true;
10233 }
10234 if (!abigailMinion)
10235 {
10236 DelBuff(j);
10237 j--;
10238 }
10239 else
10240 {
10241 buffTime[j] = 18000;
10242 }
10243 if (whoAmI == Main.myPlayer)
10244 {
10246 }
10247 }
10248 else if (buffType[j] == 263)
10249 {
10250 if (ownedProjectileCounts[831] > 0)
10251 {
10252 stormTiger = true;
10253 }
10254 if (!stormTiger)
10255 {
10256 DelBuff(j);
10257 j--;
10258 }
10259 else
10260 {
10261 buffTime[j] = 18000;
10262 }
10263 if (whoAmI == Main.myPlayer)
10264 {
10266 }
10267 }
10268 else if (buffType[j] == 271)
10269 {
10270 if (ownedProjectileCounts[864] > 0)
10271 {
10272 smolstar = true;
10273 }
10274 if (!smolstar)
10275 {
10276 DelBuff(j);
10277 j--;
10278 }
10279 else
10280 {
10281 buffTime[j] = 18000;
10282 }
10283 }
10284 else if (buffType[j] == 322)
10285 {
10286 if (ownedProjectileCounts[946] > 0)
10287 {
10288 empressBlade = true;
10289 }
10290 if (!empressBlade)
10291 {
10292 DelBuff(j);
10293 j--;
10294 }
10295 else
10296 {
10297 buffTime[j] = 18000;
10298 }
10299 }
10300 else if (buffType[j] == 187)
10301 {
10302 if (ownedProjectileCounts[623] > 0)
10303 {
10304 stardustGuardian = true;
10305 }
10306 if (!stardustGuardian)
10307 {
10308 DelBuff(j);
10309 j--;
10310 }
10311 else
10312 {
10313 buffTime[j] = 18000;
10314 }
10315 }
10316 else if (buffType[j] == 188)
10317 {
10318 if (ownedProjectileCounts[625] > 0)
10319 {
10320 stardustDragon = true;
10321 }
10322 if (!stardustDragon)
10323 {
10324 DelBuff(j);
10325 j--;
10326 }
10327 else
10328 {
10329 buffTime[j] = 18000;
10330 }
10331 }
10332 else if (buffType[j] == 161)
10333 {
10334 if (ownedProjectileCounts[533] > 0)
10335 {
10336 DeadlySphereMinion = true;
10337 }
10338 if (!DeadlySphereMinion)
10339 {
10340 DelBuff(j);
10341 j--;
10342 }
10343 else
10344 {
10345 buffTime[j] = 18000;
10346 }
10347 }
10348 else if (buffType[j] == 90)
10349 {
10350 mount.SetMount(0, this);
10351 buffTime[j] = 10;
10352 }
10353 else if (buffType[j] == 128)
10354 {
10355 mount.SetMount(1, this);
10356 buffTime[j] = 10;
10357 }
10358 else if (buffType[j] == 129)
10359 {
10360 mount.SetMount(2, this);
10361 buffTime[j] = 10;
10362 }
10363 else if (buffType[j] == 130)
10364 {
10365 mount.SetMount(3, this);
10366 buffTime[j] = 10;
10367 }
10368 else if (buffType[j] == 131)
10369 {
10370 ignoreWater = true;
10371 accFlipper = true;
10372 mount.SetMount(4, this);
10373 buffTime[j] = 10;
10374 }
10375 else if (buffType[j] == 132)
10376 {
10377 mount.SetMount(5, this);
10378 buffTime[j] = 10;
10379 }
10380 else if (buffType[j] == 168)
10381 {
10382 ignoreWater = true;
10383 accFlipper = true;
10384 mount.SetMount(12, this);
10385 buffTime[j] = 10;
10386 }
10387 else if (buffType[j] == 141)
10388 {
10389 mount.SetMount(7, this);
10390 buffTime[j] = 10;
10391 }
10392 else if (buffType[j] == 142)
10393 {
10394 mount.SetMount(8, this);
10395 buffTime[j] = 10;
10396 }
10397 else if (buffType[j] == 143)
10398 {
10399 mount.SetMount(9, this);
10400 buffTime[j] = 10;
10401 }
10402 else if (buffType[j] == 162)
10403 {
10404 mount.SetMount(10, this);
10405 buffTime[j] = 10;
10406 }
10407 else if (buffType[j] == 193)
10408 {
10409 mount.SetMount(14, this);
10410 buffTime[j] = 10;
10411 }
10412 else if (buffType[j] == 212)
10413 {
10414 mount.SetMount(17, this);
10415 buffTime[j] = 10;
10416 }
10417 else if (buffType[j] == 230)
10418 {
10419 mount.SetMount(23, this);
10420 buffTime[j] = 10;
10421 }
10422 else if (buffType[j] == 265)
10423 {
10424 canFloatInWater = true;
10425 accFlipper = true;
10426 mount.SetMount(37, this);
10427 buffTime[j] = 10;
10428 }
10429 else if (buffType[j] == 275)
10430 {
10431 mount.SetMount(40, this);
10432 buffTime[j] = 10;
10433 }
10434 else if (buffType[j] == 276)
10435 {
10436 mount.SetMount(41, this);
10437 buffTime[j] = 10;
10438 }
10439 else if (buffType[j] == 277)
10440 {
10441 mount.SetMount(42, this);
10442 buffTime[j] = 10;
10443 }
10444 else if (buffType[j] == 278)
10445 {
10446 mount.SetMount(43, this);
10447 buffTime[j] = 10;
10448 }
10449 else if (buffType[j] == 279)
10450 {
10451 ignoreWater = true;
10452 accFlipper = true;
10453 mount.SetMount(44, this);
10454 buffTime[j] = 10;
10455 }
10456 else if (buffType[j] == 280)
10457 {
10458 mount.SetMount(45, this);
10459 buffTime[j] = 10;
10460 }
10461 else if (buffType[j] == 281)
10462 {
10463 mount.SetMount(46, this);
10464 buffTime[j] = 10;
10465 }
10466 else if (buffType[j] == 282)
10467 {
10468 mount.SetMount(47, this);
10469 buffTime[j] = 10;
10470 }
10471 else if (buffType[j] == 283)
10472 {
10473 mount.SetMount(48, this);
10474 buffTime[j] = 10;
10475 }
10476 else if (buffType[j] == 305)
10477 {
10478 ignoreWater = true;
10479 accFlipper = true;
10480 lavaImmune = true;
10481 mount.SetMount(49, this);
10482 buffTime[j] = 10;
10483 }
10484 else if (buffType[j] == 318)
10485 {
10486 mount.SetMount(50, this);
10487 buffTime[j] = 10;
10488 }
10489 else if (buffType[j] == 342)
10490 {
10491 mount.SetMount(52, this);
10492 buffTime[j] = 10;
10493 }
10494 else if (buffType[j] == 37)
10495 {
10496 if (Main.wofNPCIndex >= 0 && Main.npc[Main.wofNPCIndex].type == 113)
10497 {
10498 gross = true;
10499 buffTime[j] = 10;
10500 }
10501 else
10502 {
10503 DelBuff(j);
10504 j--;
10505 }
10506 }
10507 else if (buffType[j] == 38)
10508 {
10509 buffTime[j] = 10;
10510 tongued = true;
10511 }
10512 else if (buffType[j] == 146)
10513 {
10514 moveSpeed += 0.1f;
10515 moveSpeed *= 1.1f;
10516 sunflower = true;
10517 }
10518 else if (buffType[j] == 19)
10519 {
10520 buffTime[j] = 18000;
10521 lightOrb = true;
10522 bool flag3 = true;
10523 if (ownedProjectileCounts[18] > 0)
10524 {
10525 flag3 = false;
10526 }
10527 if (flag3 && whoAmI == Main.myPlayer)
10528 {
10529 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 18, 0, 0f, whoAmI);
10530 }
10531 }
10532 else if (buffType[j] == 155)
10533 {
10534 buffTime[j] = 18000;
10535 crimsonHeart = true;
10536 bool flag4 = true;
10537 if (ownedProjectileCounts[500] > 0)
10538 {
10539 flag4 = false;
10540 }
10541 if (flag4 && whoAmI == Main.myPlayer)
10542 {
10543 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 500, 0, 0f, whoAmI);
10544 }
10545 }
10546 else if (buffType[j] == 191)
10547 {
10549 }
10550 else if (buffType[j] == 202)
10551 {
10553 }
10554 else if (buffType[j] == 217)
10555 {
10557 }
10558 else if (buffType[j] == 219)
10559 {
10561 }
10562 else if (buffType[j] == 258)
10563 {
10565 }
10566 else if (buffType[j] == 259)
10567 {
10569 }
10570 else if (buffType[j] == 260)
10571 {
10573 }
10574 else if (buffType[j] == 261)
10575 {
10577 }
10578 else if (buffType[j] == 262)
10579 {
10581 }
10582 else if (buffType[j] == 264)
10583 {
10585 }
10586 else if (buffType[j] == 266)
10587 {
10589 }
10590 else if (buffType[j] == 267)
10591 {
10593 }
10594 else if (buffType[j] == 268)
10595 {
10597 }
10598 else if (buffType[j] == 274)
10599 {
10601 }
10602 else if (buffType[j] == 284)
10603 {
10605 }
10606 else if (buffType[j] == 285)
10607 {
10609 }
10610 else if (buffType[j] == 286)
10611 {
10613 }
10614 else if (buffType[j] == 287)
10615 {
10617 }
10618 else if (buffType[j] == 288)
10619 {
10621 }
10622 else if (buffType[j] == 289)
10623 {
10625 }
10626 else if (buffType[j] == 290)
10627 {
10629 }
10630 else if (buffType[j] == 291)
10631 {
10633 }
10634 else if (buffType[j] == 292)
10635 {
10637 }
10638 else if (buffType[j] == 293)
10639 {
10641 }
10642 else if (buffType[j] == 294)
10643 {
10645 }
10646 else if (buffType[j] == 295)
10647 {
10649 }
10650 else if (buffType[j] == 296)
10651 {
10653 }
10654 else if (buffType[j] == 297)
10655 {
10657 }
10658 else if (buffType[j] == 298)
10659 {
10661 }
10662 else if (buffType[j] == 299)
10663 {
10665 }
10666 else if (buffType[j] == 300)
10667 {
10669 }
10670 else if (buffType[j] == 301)
10671 {
10673 }
10674 else if (buffType[j] == 302)
10675 {
10677 }
10678 else if (buffType[j] == 303)
10679 {
10681 }
10682 else if (buffType[j] == 304)
10683 {
10685 }
10686 else if (buffType[j] == 317)
10687 {
10689 }
10690 else if (buffType[j] == 327)
10691 {
10693 }
10694 else if (buffType[j] == 328)
10695 {
10697 }
10698 else if (buffType[j] == 329)
10699 {
10701 }
10702 else if (buffType[j] == 330)
10703 {
10705 }
10706 else if (buffType[j] == 331)
10707 {
10709 }
10710 else if (buffType[j] == 341)
10711 {
10714 }
10715 else if (buffType[j] == 345)
10716 {
10718 }
10719 else if (buffType[j] == 349)
10720 {
10722 }
10723 else if (buffType[j] == 351)
10724 {
10726 }
10727 else if (buffType[j] == 352)
10728 {
10730 }
10731 else if (buffType[j] == 354)
10732 {
10734 }
10735 else if (buffType[j] == 200)
10736 {
10738 }
10739 else if (buffType[j] == 201)
10740 {
10742 }
10743 else if (buffType[j] == 218)
10744 {
10746 }
10747 else if (buffType[j] == 190)
10748 {
10749 buffTime[j] = 18000;
10751 bool flag5 = true;
10752 if (ownedProjectileCounts[650] > 0)
10753 {
10754 flag5 = false;
10755 }
10756 if (flag5 && whoAmI == Main.myPlayer)
10757 {
10758 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 650, 0, 0f, whoAmI);
10759 }
10760 }
10761 else if (buffType[j] == 27 || buffType[j] == 101 || buffType[j] == 102)
10762 {
10763 buffTime[j] = 18000;
10764 bool flag6 = true;
10765 int num21 = 72;
10766 if (buffType[j] == 27)
10767 {
10768 blueFairy = true;
10769 }
10770 if (buffType[j] == 101)
10771 {
10772 num21 = 86;
10773 redFairy = true;
10774 }
10775 if (buffType[j] == 102)
10776 {
10777 num21 = 87;
10778 greenFairy = true;
10779 }
10780 if (head == 45 && body == 26 && legs == 25)
10781 {
10782 num21 = 72;
10783 }
10785 {
10786 flag6 = false;
10787 }
10788 if (flag6 && whoAmI == Main.myPlayer)
10789 {
10790 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, num21, 0, 0f, whoAmI);
10791 }
10792 }
10793 else if (buffType[j] == 40)
10794 {
10795 buffTime[j] = 18000;
10796 bunny = true;
10797 bool flag7 = true;
10798 if (ownedProjectileCounts[111] > 0)
10799 {
10800 flag7 = false;
10801 }
10802 if (flag7 && whoAmI == Main.myPlayer)
10803 {
10804 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 111, 0, 0f, whoAmI);
10805 }
10806 }
10807 else if (buffType[j] == 148)
10808 {
10809 rabid = true;
10810 if (Main.rand.Next(1200) == 0)
10811 {
10812 int num22 = Main.rand.Next(6);
10813 float num23 = (float)Main.rand.Next(60, 100) * 0.01f;
10814 switch (num22)
10815 {
10816 case 0:
10817 AddBuff(22, (int)(60f * num23 * 3f));
10818 break;
10819 case 1:
10820 AddBuff(23, (int)(60f * num23 * 0.75f));
10821 break;
10822 case 2:
10823 AddBuff(31, (int)(60f * num23 * 1.5f));
10824 break;
10825 case 3:
10826 AddBuff(32, (int)(60f * num23 * 3.5f));
10827 break;
10828 case 4:
10829 AddBuff(33, (int)(60f * num23 * 5f));
10830 break;
10831 case 5:
10832 AddBuff(35, (int)(60f * num23 * 1f));
10833 break;
10834 }
10835 }
10836 meleeDamage += 0.2f;
10837 magicDamage += 0.2f;
10838 rangedDamage += 0.2f;
10839 minionDamage += 0.2f;
10840 }
10841 else if (buffType[j] == 41)
10842 {
10843 buffTime[j] = 18000;
10844 penguin = true;
10845 bool flag8 = true;
10846 if (ownedProjectileCounts[112] > 0)
10847 {
10848 flag8 = false;
10849 }
10850 if (flag8 && whoAmI == Main.myPlayer)
10851 {
10852 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 112, 0, 0f, whoAmI);
10853 }
10854 }
10855 else if (buffType[j] == 152)
10856 {
10857 buffTime[j] = 18000;
10858 magicLantern = true;
10859 if (ownedProjectileCounts[492] == 0 && whoAmI == Main.myPlayer)
10860 {
10861 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 492, 0, 0f, whoAmI);
10862 }
10863 }
10864 else if (buffType[j] == 91)
10865 {
10866 buffTime[j] = 18000;
10867 puppy = true;
10868 bool flag9 = true;
10869 if (ownedProjectileCounts[334] > 0)
10870 {
10871 flag9 = false;
10872 }
10873 if (flag9 && whoAmI == Main.myPlayer)
10874 {
10875 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 334, 0, 0f, whoAmI);
10876 }
10877 }
10878 else if (buffType[j] == 92)
10879 {
10880 buffTime[j] = 18000;
10881 grinch = true;
10882 bool flag10 = true;
10883 if (ownedProjectileCounts[353] > 0)
10884 {
10885 flag10 = false;
10886 }
10887 if (flag10 && whoAmI == Main.myPlayer)
10888 {
10889 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 353, 0, 0f, whoAmI);
10890 }
10891 }
10892 else if (buffType[j] == 84)
10893 {
10894 buffTime[j] = 18000;
10895 blackCat = true;
10896 bool flag11 = true;
10897 if (ownedProjectileCounts[319] > 0)
10898 {
10899 flag11 = false;
10900 }
10901 if (flag11 && whoAmI == Main.myPlayer)
10902 {
10903 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 319, 0, 0f, whoAmI);
10904 }
10905 }
10906 else if (buffType[j] == 61)
10907 {
10908 buffTime[j] = 18000;
10909 dino = true;
10910 bool flag12 = true;
10911 if (ownedProjectileCounts[236] > 0)
10912 {
10913 flag12 = false;
10914 }
10915 if (flag12 && whoAmI == Main.myPlayer)
10916 {
10917 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 236, 0, 0f, whoAmI);
10918 }
10919 }
10920 else if (buffType[j] == 154)
10921 {
10922 buffTime[j] = 18000;
10923 babyFaceMonster = true;
10924 bool flag13 = true;
10925 if (ownedProjectileCounts[499] > 0)
10926 {
10927 flag13 = false;
10928 }
10929 if (flag13 && whoAmI == Main.myPlayer)
10930 {
10931 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 499, 0, 0f, whoAmI);
10932 }
10933 }
10934 else if (buffType[j] == 65)
10935 {
10936 buffTime[j] = 18000;
10937 eyeSpring = true;
10938 bool flag14 = true;
10939 if (ownedProjectileCounts[268] > 0)
10940 {
10941 flag14 = false;
10942 }
10943 if (flag14 && whoAmI == Main.myPlayer)
10944 {
10945 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 268, 0, 0f, whoAmI);
10946 }
10947 }
10948 else if (buffType[j] == 66)
10949 {
10950 buffTime[j] = 18000;
10951 snowman = true;
10952 bool flag15 = true;
10953 if (ownedProjectileCounts[269] > 0)
10954 {
10955 flag15 = false;
10956 }
10957 if (flag15 && whoAmI == Main.myPlayer)
10958 {
10959 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 269, 0, 0f, whoAmI);
10960 }
10961 }
10962 else if (buffType[j] == 42)
10963 {
10964 buffTime[j] = 18000;
10965 turtle = true;
10966 bool flag16 = true;
10967 if (ownedProjectileCounts[127] > 0)
10968 {
10969 flag16 = false;
10970 }
10971 if (flag16 && whoAmI == Main.myPlayer)
10972 {
10973 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 127, 0, 0f, whoAmI);
10974 }
10975 }
10976 else if (buffType[j] == 45)
10977 {
10978 buffTime[j] = 18000;
10979 eater = true;
10980 bool flag17 = true;
10981 if (ownedProjectileCounts[175] > 0)
10982 {
10983 flag17 = false;
10984 }
10985 if (flag17 && whoAmI == Main.myPlayer)
10986 {
10987 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 175, 0, 0f, whoAmI);
10988 }
10989 }
10990 else if (buffType[j] == 50)
10991 {
10992 buffTime[j] = 18000;
10993 skeletron = true;
10994 bool flag18 = true;
10995 if (ownedProjectileCounts[197] > 0)
10996 {
10997 flag18 = false;
10998 }
10999 if (flag18 && whoAmI == Main.myPlayer)
11000 {
11001 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 197, 0, 0f, whoAmI);
11002 }
11003 }
11004 else if (buffType[j] == 51)
11005 {
11006 buffTime[j] = 18000;
11007 hornet = true;
11008 bool flag19 = true;
11009 if (ownedProjectileCounts[198] > 0)
11010 {
11011 flag19 = false;
11012 }
11013 if (flag19 && whoAmI == Main.myPlayer)
11014 {
11015 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 198, 0, 0f, whoAmI);
11016 }
11017 }
11018 else if (buffType[j] == 52)
11019 {
11020 buffTime[j] = 18000;
11021 tiki = true;
11022 bool flag20 = true;
11023 if (ownedProjectileCounts[199] > 0)
11024 {
11025 flag20 = false;
11026 }
11027 if (flag20 && whoAmI == Main.myPlayer)
11028 {
11029 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 199, 0, 0f, whoAmI);
11030 }
11031 }
11032 else if (buffType[j] == 53)
11033 {
11034 buffTime[j] = 18000;
11035 lizard = true;
11036 bool flag21 = true;
11037 if (ownedProjectileCounts[200] > 0)
11038 {
11039 flag21 = false;
11040 }
11041 if (flag21 && whoAmI == Main.myPlayer)
11042 {
11043 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 200, 0, 0f, whoAmI);
11044 }
11045 }
11046 else if (buffType[j] == 54)
11047 {
11048 buffTime[j] = 18000;
11049 parrot = true;
11050 bool flag22 = true;
11051 if (ownedProjectileCounts[208] > 0)
11052 {
11053 flag22 = false;
11054 }
11055 if (flag22 && whoAmI == Main.myPlayer)
11056 {
11057 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 208, 0, 0f, whoAmI);
11058 }
11059 }
11060 else if (buffType[j] == 55)
11061 {
11062 buffTime[j] = 18000;
11063 truffle = true;
11064 bool flag23 = true;
11065 if (ownedProjectileCounts[209] > 0)
11066 {
11067 flag23 = false;
11068 }
11069 if (flag23 && whoAmI == Main.myPlayer)
11070 {
11071 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 209, 0, 0f, whoAmI);
11072 }
11073 }
11074 else if (buffType[j] == 56)
11075 {
11076 buffTime[j] = 18000;
11077 sapling = true;
11078 bool flag24 = true;
11079 if (ownedProjectileCounts[210] > 0)
11080 {
11081 flag24 = false;
11082 }
11083 if (flag24 && whoAmI == Main.myPlayer)
11084 {
11085 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 210, 0, 0f, whoAmI);
11086 }
11087 }
11088 else if (buffType[j] == 85)
11089 {
11090 buffTime[j] = 18000;
11091 cSapling = true;
11092 bool flag25 = true;
11093 if (ownedProjectileCounts[324] > 0)
11094 {
11095 flag25 = false;
11096 }
11097 if (flag25 && whoAmI == Main.myPlayer)
11098 {
11099 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 324, 0, 0f, whoAmI);
11100 }
11101 }
11102 else if (buffType[j] == 81)
11103 {
11104 buffTime[j] = 18000;
11105 spider = true;
11106 bool flag26 = true;
11107 if (ownedProjectileCounts[313] > 0)
11108 {
11109 flag26 = false;
11110 }
11111 if (flag26 && whoAmI == Main.myPlayer)
11112 {
11113 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 313, 0, 0f, whoAmI);
11114 }
11115 }
11116 else if (buffType[j] == 82)
11117 {
11118 buffTime[j] = 18000;
11119 squashling = true;
11120 bool flag27 = true;
11121 if (ownedProjectileCounts[314] > 0)
11122 {
11123 flag27 = false;
11124 }
11125 if (flag27 && whoAmI == Main.myPlayer)
11126 {
11127 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 314, 0, 0f, whoAmI);
11128 }
11129 }
11130 else if (buffType[j] == 57)
11131 {
11132 buffTime[j] = 18000;
11133 wisp = true;
11134 bool flag28 = true;
11135 if (ownedProjectileCounts[211] > 0)
11136 {
11137 flag28 = false;
11138 }
11139 if (flag28 && whoAmI == Main.myPlayer)
11140 {
11141 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 211, 0, 0f, whoAmI);
11142 }
11143 }
11144 else if (buffType[j] == 60)
11145 {
11146 buffTime[j] = 18000;
11147 crystalLeaf = true;
11148 bool flag29 = true;
11149 for (int num24 = 0; num24 < 1000; num24++)
11150 {
11151 if (Main.projectile[num24].active && Main.projectile[num24].owner == whoAmI && Main.projectile[num24].type == 226)
11152 {
11153 if (!flag29)
11154 {
11155 Main.projectile[num24].Kill();
11156 }
11157 flag29 = false;
11158 }
11159 }
11160 if (flag29 && whoAmI == Main.myPlayer)
11161 {
11162 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 226, 0, 0f, whoAmI);
11163 }
11164 }
11165 else if (buffType[j] == 127)
11166 {
11167 buffTime[j] = 18000;
11168 zephyrfish = true;
11169 bool flag30 = true;
11170 if (ownedProjectileCounts[380] > 0)
11171 {
11172 flag30 = false;
11173 }
11174 if (flag30 && whoAmI == Main.myPlayer)
11175 {
11176 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 380, 0, 0f, whoAmI);
11177 }
11178 }
11179 else if (buffType[j] == 136)
11180 {
11181 buffTime[j] = 18000;
11182 miniMinotaur = true;
11183 bool flag31 = true;
11184 if (ownedProjectileCounts[398] > 0)
11185 {
11186 flag31 = false;
11187 }
11188 if (flag31 && whoAmI == Main.myPlayer)
11189 {
11190 Projectile.NewProjectile(GetProjectileSource_Buff(j), position.X + (float)(width / 2), position.Y + (float)(height / 2), 0f, 0f, 398, 0, 0f, whoAmI);
11191 }
11192 }
11193 else if (buffType[j] == 70)
11194 {
11195 venom = true;
11196 }
11197 else if (buffType[j] == 20)
11198 {
11199 poisoned = true;
11200 }
11201 else if (buffType[j] == 21)
11202 {
11204 }
11205 else if (buffType[j] == 22)
11206 {
11207 blind = true;
11208 }
11209 else if (buffType[j] == 80)
11210 {
11211 blackout = true;
11212 }
11213 else if (buffType[j] == 23)
11214 {
11215 noItems = true;
11216 cursed = true;
11217 }
11218 else if (buffType[j] == 24)
11219 {
11220 onFire = true;
11221 }
11222 else if (buffType[j] == 103)
11223 {
11224 dripping = true;
11225 }
11226 else if (buffType[j] == 137)
11227 {
11228 drippingSlime = true;
11229 }
11230 else if (buffType[j] == 320)
11231 {
11232 drippingSparkleSlime = true;
11233 }
11234 else if (buffType[j] == 67)
11235 {
11236 burned = true;
11237 }
11238 else if (buffType[j] == 68)
11239 {
11240 suffocating = true;
11241 }
11242 else if (buffType[j] == 39)
11243 {
11244 onFire2 = true;
11245 }
11246 else if (buffType[j] == 323)
11247 {
11248 onFire3 = true;
11249 }
11250 else if (buffType[j] == 44)
11251 {
11252 onFrostBurn = true;
11253 }
11254 else if (buffType[j] == 324)
11255 {
11256 onFrostBurn2 = true;
11257 }
11258 else if (buffType[j] == 353)
11259 {
11260 shimmering = true;
11261 frozen = true;
11262 fallStart = (int)(position.Y / 16f);
11263 if (Main.myPlayer != whoAmI)
11264 {
11265 continue;
11266 }
11267 if (position.Y / 16f > (float)Main.UnderworldLayer)
11268 {
11269 if (Main.myPlayer == whoAmI)
11270 {
11271 DelBuff(j);
11272 }
11273 continue;
11274 }
11275 if (shimmerWet)
11276 {
11277 buffTime[j] = 60;
11278 continue;
11279 }
11280 bool flag32 = false;
11281 for (int num25 = (int)(position.X / 16f); (float)num25 <= (position.X + (float)width) / 16f; num25++)
11282 {
11283 for (int num26 = (int)(position.Y / 16f); (float)num26 <= (position.Y + (float)height) / 16f; num26++)
11284 {
11285 if (WorldGen.SolidTile3(num25, num26))
11286 {
11287 flag32 = true;
11288 }
11289 }
11290 }
11291 if (flag32)
11292 {
11293 buffTime[j] = 6;
11294 }
11295 else
11296 {
11297 DelBuff(j);
11298 }
11299 }
11300 else if (buffType[j] == 163)
11301 {
11302 headcovered = true;
11303 bleed = true;
11304 }
11305 else if (buffType[j] == 164)
11306 {
11307 vortexDebuff = true;
11308 }
11309 else if (buffType[j] == 194)
11310 {
11311 windPushed = true;
11312 }
11313 else if (buffType[j] == 195)
11314 {
11315 witheredArmor = true;
11316 }
11317 else if (buffType[j] == 205)
11318 {
11319 ballistaPanic = true;
11320 }
11321 else if (buffType[j] == 196)
11322 {
11323 witheredWeapon = true;
11324 }
11325 else if (buffType[j] == 197)
11326 {
11327 slowOgreSpit = true;
11328 }
11329 else if (buffType[j] == 198)
11330 {
11331 parryDamageBuff = true;
11332 }
11333 else if (buffType[j] == 145)
11334 {
11335 moonLeech = true;
11336 }
11337 else if (buffType[j] == 149)
11338 {
11339 webbed = true;
11340 if (velocity.Y != 0f)
11341 {
11342 velocity = new Vector2(0f, 1E-06f);
11343 }
11344 else
11345 {
11347 }
11348 jumpHeight = 0;
11349 gravity = 0f;
11350 moveSpeed = 0f;
11351 dash = 0;
11352 dashType = 0;
11353 noKnockback = true;
11355 }
11356 else if (buffType[j] == 43)
11357 {
11358 defendedByPaladin = true;
11359 }
11360 else if (buffType[j] == 29)
11361 {
11362 magicCrit += 2;
11363 magicDamage += 0.05f;
11364 statManaMax2 += 20;
11365 manaCost -= 0.02f;
11366 }
11367 else if (buffType[j] == 28)
11368 {
11369 if (!Main.dayTime && wolfAcc && !merman)
11370 {
11371 lifeRegen++;
11372 wereWolf = true;
11373 meleeCrit += 2;
11374 meleeDamage += 0.051f;
11375 meleeSpeed += 0.051f;
11376 statDefense += 3;
11377 moveSpeed += 0.05f;
11378 }
11379 else
11380 {
11381 DelBuff(j);
11382 j--;
11383 }
11384 }
11385 else if (buffType[j] == 33)
11386 {
11387 meleeDamage -= 0.051f;
11388 meleeSpeed -= 0.051f;
11389 statDefense -= 4;
11390 moveSpeed -= 0.1f;
11391 }
11392 else if (buffType[j] == 25)
11393 {
11394 tipsy = true;
11395 statDefense -= 4;
11396 meleeCrit += 2;
11397 meleeDamage += 0.1f;
11398 meleeSpeed += 0.1f;
11399 }
11400 else if (buffType[j] == 26)
11401 {
11402 wellFed = true;
11403 statDefense += 2;
11404 meleeCrit += 2;
11405 meleeDamage += 0.05f;
11406 meleeSpeed += 0.05f;
11407 magicCrit += 2;
11408 magicDamage += 0.05f;
11409 rangedCrit += 2;
11410 rangedDamage += 0.05f;
11411 minionDamage += 0.05f;
11412 minionKB += 0.5f;
11413 moveSpeed += 0.2f;
11414 pickSpeed -= 0.05f;
11415 }
11416 else if (buffType[j] == 206)
11417 {
11418 wellFed = true;
11419 statDefense += 3;
11420 meleeCrit += 3;
11421 meleeDamage += 0.075f;
11422 meleeSpeed += 0.075f;
11423 magicCrit += 3;
11424 magicDamage += 0.075f;
11425 rangedCrit += 3;
11426 rangedDamage += 0.075f;
11427 minionDamage += 0.075f;
11428 minionKB += 0.75f;
11429 moveSpeed += 0.3f;
11430 pickSpeed -= 0.1f;
11431 }
11432 else if (buffType[j] == 207)
11433 {
11434 wellFed = true;
11435 statDefense += 4;
11436 meleeCrit += 4;
11437 meleeDamage += 0.1f;
11438 meleeSpeed += 0.1f;
11439 magicCrit += 4;
11440 magicDamage += 0.1f;
11441 rangedCrit += 4;
11442 rangedDamage += 0.1f;
11443 minionDamage += 0.1f;
11444 minionKB += 1f;
11445 moveSpeed += 0.4f;
11446 pickSpeed -= 0.15f;
11447 }
11448 else if (buffType[j] == 333)
11449 {
11450 hungry = true;
11451 statDefense -= 2;
11452 meleeCrit -= 2;
11453 meleeDamage -= 0.05f;
11454 meleeSpeed -= 0.05f;
11455 magicCrit -= 2;
11456 magicDamage -= 0.05f;
11457 rangedCrit -= 2;
11458 rangedDamage -= 0.05f;
11459 minionDamage -= 0.05f;
11460 minionKB -= 0.5f;
11461 pickSpeed += 0.05f;
11462 }
11463 else if (buffType[j] == 334)
11464 {
11465 starving = true;
11466 statDefense -= 4;
11467 meleeCrit -= 4;
11468 meleeDamage -= 0.1f;
11469 meleeSpeed -= 0.1f;
11470 magicCrit -= 4;
11471 magicDamage -= 0.1f;
11472 rangedCrit -= 4;
11473 rangedDamage -= 0.1f;
11474 minionDamage -= 0.1f;
11475 minionKB -= 1f;
11476 pickSpeed += 0.15f;
11477 }
11478 else if (buffType[j] == 336)
11479 {
11480 heartyMeal = true;
11481 }
11482 else if (buffType[j] == 71)
11483 {
11484 meleeEnchant = 1;
11485 }
11486 else if (buffType[j] == 73)
11487 {
11488 meleeEnchant = 2;
11489 }
11490 else if (buffType[j] == 74)
11491 {
11492 meleeEnchant = 3;
11493 }
11494 else if (buffType[j] == 75)
11495 {
11496 meleeEnchant = 4;
11497 }
11498 else if (buffType[j] == 76)
11499 {
11500 meleeEnchant = 5;
11501 }
11502 else if (buffType[j] == 77)
11503 {
11504 meleeEnchant = 6;
11505 }
11506 else if (buffType[j] == 78)
11507 {
11508 meleeEnchant = 7;
11509 }
11510 else if (buffType[j] == 79)
11511 {
11512 meleeEnchant = 8;
11513 }
11514 }
11516 if (whoAmI == Main.myPlayer && luckPotion != oldLuckPotion)
11517 {
11518 luckNeedsSync = true;
11520 }
11521 }
static PlayerDeathReason ByOther(int type)
bool shimmerWet
Definition Entity.cs:32
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
static BuffMountData[] BasicMountData
Definition BuffID.cs:32
static bool[] TimeLeftDoesNotDecrease
Definition BuffID.cs:24
void SetMount(int m, Player mountedPlayer, bool faceLeft=false)
Definition Mount.cs:5258
float moveSpeed
Definition Player.cs:2047
int nebulaLevelLife
Definition Player.cs:703
bool[] buffImmune
Definition Player.cs:1197
bool petFlagDynamiteKitten
Definition Player.cs:1767
bool petFlagDD2Dragon
Definition Player.cs:1747
bool parryDamageBuff
Definition Player.cs:2011
bool magicLantern
Definition Player.cs:1693
bool electrified
Definition Player.cs:911
bool loveStruck
Definition Player.cs:905
int FindItem(int netid)
Definition Player.cs:52383
static int manaSickTime
Definition Player.cs:749
float rangedDamage
Definition Player.cs:2027
bool petFlagFairyQueenPet
Definition Player.cs:1803
bool abigailMinion
Definition Player.cs:1017
bool dangerSense
Definition Player.cs:893
bool petFlagChesterPet
Definition Player.cs:1827
bool petFlagDukeFishronPet
Definition Player.cs:1797
bool palladiumRegen
Definition Player.cs:929
bool coolWhipBuff
Definition Player.cs:1717
bool babyFaceMonster
Definition Player.cs:1841
int manaRegenBonus
Definition Player.cs:803
bool petFlagLilHarpy
Definition Player.cs:1755
static readonly int maxBuffs
Definition Player.cs:1191
bool petFlagPumpkingPet
Definition Player.cs:1805
void BuffHandle_SpawnPetIfNeededAndSetTime(int buffIndex, ref bool petBool, int petProjID, int buffTimeToGive=18000)
Definition Player.cs:11668
float wallSpeed
Definition Player.cs:2051
float pickSpeed
Definition Player.cs:2049
bool empressBlade
Definition Player.cs:1013
bool onFrostBurn2
Definition Player.cs:1897
bool twinsMinion
Definition Player.cs:981
bool cratePotion
Definition Player.cs:953
bool petFlagKingSlimePet
Definition Player.cs:1775
bool DeadlySphereMinion
Definition Player.cs:993
int nebulaLevelDamage
Definition Player.cs:709
bool petFlagBabyRedPanda
Definition Player.cs:1763
bool beetleOffense
Definition Player.cs:683
bool drippingSparkleSlime
Definition Player.cs:1917
bool petFlagGlitteryButterfly
Definition Player.cs:1759
bool petFlagMoonLordPet
Definition Player.cs:1801
bool petFlagDeerclopsPet
Definition Player.cs:1823
float meleeSpeed
Definition Player.cs:2043
bool detectCreature
Definition Player.cs:2357
bool petFlagQueenSlimePet
Definition Player.cs:1817
bool petFlagBabyImp
Definition Player.cs:1761
bool petFlagBabyWerewolf
Definition Player.cs:1769
void UpdateAbigailStatus()
Definition Player.cs:11701
bool petFlagEyeOfCthulhuPet
Definition Player.cs:1777
float tileSpeed
Definition Player.cs:2053
bool companionCube
Definition Player.cs:1839
byte iceBarrierFrameCounter
Definition Player.cs:923
bool stardustGuardian
Definition Player.cs:997
bool suspiciouslookingTentacle
Definition Player.cs:1671
byte oldLuckPotion
Definition Player.cs:897
bool CanNPCBeHitByPlayerOrPlayerProjectile(NPC npc, Projectile projectile=null)
Definition Player.cs:19902
bool beetleBuff
Definition Player.cs:685
bool petFlagGlommerPet
Definition Player.cs:1821
int infernoCounter
Definition Player.cs:865
bool slowOgreSpit
Definition Player.cs:2009
bool petFlagPlanteraPet
Definition Player.cs:1793
int nebulaLevelMana
Definition Player.cs:705
bool petFlagShadowMimic
Definition Player.cs:1771
void UpdateStormTigerStatus()
Definition Player.cs:11721
bool petFlagDD2OgrePet
Definition Player.cs:1813
bool petFlagQueenBeePet
Definition Player.cs:1785
bool petFlagPlantero
Definition Player.cs:1765
float meleeDamage
Definition Player.cs:2023
bool stardustMinion
Definition Player.cs:995
bool witheredWeapon
Definition Player.cs:2007
bool witheredArmor
Definition Player.cs:2005
bool ballistaPanic
Definition Player.cs:2013
bool petFlagDD2Ghost
Definition Player.cs:1745
bool vortexDebuff
Definition Player.cs:2001
bool stardustDragon
Definition Player.cs:999
bool petFlagEaterOfWorldsPet
Definition Player.cs:1779
byte iceBarrierFrame
Definition Player.cs:921
IEntitySource GetProjectileSource_Item(Item item)
Definition Player.cs:9272
bool crimsonHeart
Definition Player.cs:1673
void RemoveAllGrapplingHooks()
Definition Player.cs:31290
void ApplyDamageToNPC(NPC npc, int damage, float knockback, int direction, bool crit)
Definition Player.cs:19845
bool sonarPotion
Definition Player.cs:955
byte meleeEnchant
Definition Player.cs:831
float minionDamage
Definition Player.cs:2039
bool petFlagLunaticCultistPet
Definition Player.cs:1799
bool lifeMagnet
Definition Player.cs:713
bool petFlagBabyShark
Definition Player.cs:1753
bool petFlagBrainOfCthulhuPet
Definition Player.cs:1781
bool spiderMinion
Definition Player.cs:983
IEntitySource GetProjectileSource_Buff(int buffIndex)
Definition Player.cs:9266
bool petFlagEverscreamPet
Definition Player.cs:1807
bool petFlagTwinsPet
Definition Player.cs:1789
bool luckNeedsSync
Definition Player.cs:2653
bool petFlagSkeletronPrimePet
Definition Player.cs:1791
bool petFlagBlueChickenPet
Definition Player.cs:1831
bool petFlagVoltBunny
Definition Player.cs:1773
static int jumpHeight
Definition Player.cs:2089
float manaRegenDelayBonus
Definition Player.cs:805
bool petFlagDirtiestBlock
Definition Player.cs:1837
void UpdateStarvingState(bool withEmote)
Definition Player.cs:11593
bool pirateMinion
Definition Player.cs:987
bool drippingSlime
Definition Player.cs:1915
bool sharknadoMinion
Definition Player.cs:989
bool shadowDodge
Definition Player.cs:925
bool petFlagMartianPet
Definition Player.cs:1811
float manaSickReduction
Definition Player.cs:755
float summonerWeaponSpeedBonus
Definition Player.cs:2045
bool findTreasure
Definition Player.cs:2351
bool petFlagFennecFox
Definition Player.cs:1757
float magicDamage
Definition Player.cs:2025
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Definition Player.cs:4441
float endurance
Definition Player.cs:899
bool petFlagBerniePet
Definition Player.cs:1819
bool manaRegenBuff
Definition Player.cs:1579
bool petFlagDD2Gato
Definition Player.cs:1743
bool petFlagJunimoPet
Definition Player.cs:1829
bool petFlagPigPet
Definition Player.cs:1825
bool resistCold
Definition Player.cs:909
void UpdateHungerBuffs()
Definition Player.cs:11540
bool petFlagUpbeatStar
Definition Player.cs:1749
int armorPenetration
Definition Player.cs:1551
bool iceBarrier
Definition Player.cs:891
bool petFlagDestroyerPet
Definition Player.cs:1787
static float manaSickLessDmg
Definition Player.cs:753
bool petFlagGolemPet
Definition Player.cs:1795
bool petFlagSugarGlider
Definition Player.cs:1751
bool petFlagDD2BetsyPet
Definition Player.cs:1815
byte luckPotion
Definition Player.cs:895
void DelBuff(int b)
Definition Player.cs:4602
int[] ownedProjectileCounts
Definition Player.cs:2545
Item[] inventory
Definition Player.cs:1257
bool petFlagSkeletronPet
Definition Player.cs:1783
bool beetleDefense
Definition Player.cs:681
bool petFlagIceQueenPet
Definition Player.cs:1809
bool hornetMinion
Definition Player.cs:977
bool petFlagSpiffo
Definition Player.cs:1833
bool petFlagCaveling
Definition Player.cs:1835
bool hasTitaniumStormBuff
Definition Player.cs:941
bool miniMinotaur
Definition Player.cs:1705
bool canFloatInWater
Definition Player.cs:2293
bool defendedByPaladin
Definition Player.cs:1085
static float Distance(Vector2 value1, Vector2 value2)
Definition Vector2.cs:91

References Terraria.Entity.active, Terraria.Player.AddBuff(), Terraria.Lighting.AddLight(), Terraria.ID.BuffID.Sets.BasicMountData, Terraria.Player.buffImmune, Terraria.DataStructures.PlayerDeathReason.ByOther(), Terraria.Entity.Center, Terraria.Main.dayTime, Terraria.Player.dead, Microsoft.Xna.Framework.Vector2.Distance(), Terraria.Main.dontStarveWorld, System.E, Terraria.Player.FindBuffIndex(), Terraria.Player.hostile, Terraria.Player.Hurt(), System.item, Terraria.DataStructures.PlayerDeathReason.LegacyEmpty(), Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Projectile.NewProjectile(), Terraria.Main.npc, Terraria.Main.player, Terraria.Main.projectile, Terraria.Main.rand, Terraria.NetMessage.SendPlayerHurt(), Terraria.WorldGen.SolidTile3(), Terraria.Player.team, Terraria.ID.BuffID.Sets.TimeLeftDoesNotDecrease, Terraria.Main.UnderworldLayer, Terraria.Main.wofNPCIndex, and Microsoft.Xna.Framework.Vector2.Zero.