Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Conditions.cs
Go to the documentation of this file.
2
4
5public class Conditions
6{
8 {
9 public bool CanDrop(DropAttemptInfo info)
10 {
11 return false;
12 }
13
14 public bool CanShowItemDropInUI()
15 {
16 return true;
17 }
18
20 {
21 return null;
22 }
23 }
24
26 {
27 public int aiSlotToCheck;
28
29 public float valueToMatch;
30
31 public IsUsingSpecificAIValues(int aislot, float valueToMatch)
32 {
33 aiSlotToCheck = aislot;
34 this.valueToMatch = valueToMatch;
35 }
36
37 public bool CanDrop(DropAttemptInfo info)
38 {
39 return info.npc.ai[aiSlotToCheck] == valueToMatch;
40 }
41
42 public bool CanShowItemDropInUI()
43 {
44 return true;
45 }
46
48 {
49 return null;
50 }
51 }
52
54 {
55 public bool CanDrop(DropAttemptInfo info)
56 {
57 if (!Main.snowMoon)
58 {
59 return false;
60 }
61 int num = NPC.waveNumber;
62 if (Main.expertMode)
63 {
64 num += 5;
65 }
66 int num2 = (int)((double)(28 - num) / 2.5);
67 if (Main.expertMode)
68 {
69 num2 -= 2;
70 }
71 if (num2 < 1)
72 {
73 num2 = 1;
74 }
75 return info.player.RollLuck(num2) == 0;
76 }
77
78 public bool CanShowItemDropInUI()
79 {
80 return true;
81 }
82
84 {
85 return Language.GetTextValue("Bestiary_ItemDropConditions.WaveBasedDrop");
86 }
87 }
88
90 {
91 public bool CanDrop(DropAttemptInfo info)
92 {
93 if (!Main.pumpkinMoon)
94 {
95 return false;
96 }
97 int num = NPC.waveNumber;
98 if (Main.expertMode)
99 {
100 num += 5;
101 }
102 int num2 = (int)((double)(24 - num) / 2.5);
103 if (Main.expertMode)
104 {
105 num2--;
106 }
107 if (num2 < 1)
108 {
109 num2 = 1;
110 }
111 return info.player.RollLuck(num2) == 0;
112 }
113
115 {
116 return true;
117 }
118
120 {
121 return Language.GetTextValue("Bestiary_ItemDropConditions.WaveBasedDrop");
122 }
123 }
124
126 {
127 public bool CanDrop(DropAttemptInfo info)
128 {
129 if (!Main.snowMoon)
130 {
131 return false;
132 }
133 int waveNumber = NPC.waveNumber;
134 if (NPC.waveNumber < 15)
135 {
136 return false;
137 }
138 int num = 4;
139 if (waveNumber == 16)
140 {
141 num = 4;
142 }
143 if (waveNumber == 17)
144 {
145 num = 3;
146 }
147 if (waveNumber == 18)
148 {
149 num = 3;
150 }
151 if (waveNumber == 19)
152 {
153 num = 2;
154 }
155 if (waveNumber >= 20)
156 {
157 num = 2;
158 }
159 if (Main.expertMode && Main.rand.Next(3) == 0)
160 {
161 num--;
162 }
163 return info.rng.Next(num) == 0;
164 }
165
167 {
168 return true;
169 }
170
172 {
173 return null;
174 }
175 }
176
178 {
179 public bool CanDrop(DropAttemptInfo info)
180 {
181 if (!Main.pumpkinMoon)
182 {
183 return false;
184 }
185 int waveNumber = NPC.waveNumber;
186 if (NPC.waveNumber < 15)
187 {
188 return false;
189 }
190 int num = 4;
191 if (waveNumber == 16)
192 {
193 num = 4;
194 }
195 if (waveNumber == 17)
196 {
197 num = 3;
198 }
199 if (waveNumber == 18)
200 {
201 num = 3;
202 }
203 if (waveNumber == 19)
204 {
205 num = 2;
206 }
207 if (waveNumber >= 20)
208 {
209 num = 2;
210 }
211 if (Main.expertMode && Main.rand.Next(3) == 0)
212 {
213 num--;
214 }
215 return info.rng.Next(num) == 0;
216 }
217
219 {
220 return true;
221 }
222
224 {
225 return null;
226 }
227 }
228
230 {
231 public bool CanDrop(DropAttemptInfo info)
232 {
233 return Main.pumpkinMoon;
234 }
235
237 {
238 return true;
239 }
240
242 {
243 return null;
244 }
245 }
246
248 {
249 public int neededWave;
250
252 {
253 this.neededWave = neededWave;
254 }
255
256 public bool CanDrop(DropAttemptInfo info)
257 {
258 return NPC.waveNumber >= neededWave;
259 }
260
262 {
263 return true;
264 }
265
267 {
268 return Language.GetTextValue("Bestiary_ItemDropConditions.PastWaveBasedDrop", neededWave);
269 }
270 }
271
273 {
274 public bool CanDrop(DropAttemptInfo info)
275 {
276 if (!Main.dayTime && Main.bloodMoon && !info.npc.SpawnedFromStatue)
277 {
278 return !info.IsInSimulation;
279 }
280 return false;
281 }
282
284 {
285 return true;
286 }
287
289 {
290 return null;
291 }
292 }
293
295 {
296 public bool CanDrop(DropAttemptInfo info)
297 {
299 {
300 return NPC.downedMechBoss3;
301 }
302 return false;
303 }
304
306 {
307 return true;
308 }
309
311 {
312 return null;
313 }
314 }
315
317 {
318 public bool CanDrop(DropAttemptInfo info)
319 {
320 return NPC.downedPlantBoss;
321 }
322
324 {
325 return true;
326 }
327
329 {
330 return null;
331 }
332 }
333
335 {
336 public bool CanDrop(DropAttemptInfo info)
337 {
338 return Main.hardMode;
339 }
340
342 {
343 return true;
344 }
345
347 {
348 return null;
349 }
350 }
351
353 {
354 public bool CanDrop(DropAttemptInfo info)
355 {
356 return !NPC.downedPlantBoss;
357 }
358
360 {
361 return true;
362 }
363
365 {
366 return null;
367 }
368 }
369
371 {
372 public bool CanDrop(DropAttemptInfo info)
373 {
374 return true;
375 }
376
378 {
379 return true;
380 }
381
383 {
384 return null;
385 }
386 }
387
389 {
390 public bool CanDrop(DropAttemptInfo info)
391 {
392 if (info.npc.value > 0f && Main.hardMode && (double)(info.npc.position.Y / 16f) < Main.worldSurface + 10.0 && (info.npc.Center.X / 16f < 380f || info.npc.Center.X / 16f > (float)(Main.maxTilesX - 380)))
393 {
394 return !info.IsInSimulation;
395 }
396 return false;
397 }
398
400 {
401 return true;
402 }
403
405 {
406 return Language.GetTextValue("Bestiary_ItemDropConditions.PirateMap");
407 }
408 }
409
411 {
412 public bool CanDrop(DropAttemptInfo info)
413 {
414 return Main.xMas;
415 }
416
418 {
419 return true;
420 }
421
423 {
424 return Language.GetTextValue("Bestiary_ItemDropConditions.IsChristmas");
425 }
426 }
427
429 {
430 public bool CanDrop(DropAttemptInfo info)
431 {
432 return !Main.expertMode;
433 }
434
436 {
437 return !Main.expertMode;
438 }
439
441 {
442 return Language.GetTextValue("Bestiary_ItemDropConditions.NotExpert");
443 }
444 }
445
447 {
448 public bool CanDrop(DropAttemptInfo info)
449 {
450 return !Main.masterMode;
451 }
452
454 {
455 return !Main.masterMode;
456 }
457
459 {
460 return Language.GetTextValue("Bestiary_ItemDropConditions.NotMasterMode");
461 }
462 }
463
465 {
466 public bool CanDrop(DropAttemptInfo info)
467 {
468 int type = 125;
469 if (info.npc.type == 125)
470 {
471 type = 126;
472 }
473 return !NPC.AnyNPCs(type);
474 }
475
477 {
478 return true;
479 }
480
482 {
483 return null;
484 }
485 }
486
488 {
489 public bool CanDrop(DropAttemptInfo info)
490 {
491 return info.npc.AI_120_HallowBoss_IsGenuinelyEnraged();
492 }
493
495 {
496 return true;
497 }
498
500 {
501 return Language.GetTextValue("Bestiary_ItemDropConditions.EmpressOfLightOnlyTookDamageWhileEnraged");
502 }
503 }
504
506 {
507 public bool CanDrop(DropAttemptInfo info)
508 {
509 return info.player.statLife < info.player.statLifeMax2;
510 }
511
513 {
514 return true;
515 }
516
518 {
519 return Language.GetTextValue("Bestiary_ItemDropConditions.PlayerNeedsHealing");
520 }
521 }
522
524 {
525 private static int[] _targetList = new int[4] { 127, 126, 125, 134 };
526
527 public bool CanDrop(DropAttemptInfo info)
528 {
530 {
531 return false;
532 }
533 for (int i = 0; i < _targetList.Length; i++)
534 {
535 if (_targetList[i] != info.npc.type && NPC.AnyNPCs(_targetList[i]))
536 {
537 return false;
538 }
539 }
540 return true;
541 }
542
544 {
545 if (Main.remixWorld)
546 {
547 return Main.getGoodWorld;
548 }
549 return false;
550 }
551
553 {
554 return null;
555 }
556 }
557
559 {
560 public bool CanDrop(DropAttemptInfo info)
561 {
562 if (info.npc.boss)
563 {
564 return Main.expertMode;
565 }
566 return false;
567 }
568
570 {
571 return Main.expertMode;
572 }
573
575 {
576 return Language.GetTextValue("Bestiary_ItemDropConditions.LegacyHack_IsBossAndExpert");
577 }
578 }
579
581 {
582 public bool CanDrop(DropAttemptInfo info)
583 {
584 if (info.npc.boss)
585 {
586 return !Main.expertMode;
587 }
588 return false;
589 }
590
592 {
593 return !Main.expertMode;
594 }
595
597 {
598 return Language.GetTextValue("Bestiary_ItemDropConditions.LegacyHack_IsBossAndNotExpert");
599 }
600 }
601
603 {
604 public bool CanDrop(DropAttemptInfo info)
605 {
606 return info.npc.boss;
607 }
608
610 {
611 return true;
612 }
613
615 {
616 return null;
617 }
618 }
619
621 {
622 public bool CanDrop(DropAttemptInfo info)
623 {
624 return Main.expertMode;
625 }
626
628 {
629 return Main.expertMode;
630 }
631
633 {
634 if (Main.masterMode)
635 {
636 return Language.GetTextValue("Bestiary_ItemDropConditions.IsMasterMode");
637 }
638 return Language.GetTextValue("Bestiary_ItemDropConditions.IsExpert");
639 }
640 }
641
643 {
644 public bool CanDrop(DropAttemptInfo info)
645 {
646 return Main.masterMode;
647 }
648
650 {
651 return Main.masterMode;
652 }
653
655 {
656 return Language.GetTextValue("Bestiary_ItemDropConditions.IsMasterMode");
657 }
658 }
659
661 {
662 public bool CanDrop(DropAttemptInfo info)
663 {
664 return WorldGen.crimson;
665 }
666
668 {
669 return WorldGen.crimson;
670 }
671
673 {
674 return Language.GetTextValue("Bestiary_ItemDropConditions.IsCrimson");
675 }
676 }
677
679 {
680 public bool CanDrop(DropAttemptInfo info)
681 {
682 return !WorldGen.crimson;
683 }
684
686 {
687 return !WorldGen.crimson;
688 }
689
691 {
692 return Language.GetTextValue("Bestiary_ItemDropConditions.IsCorruption");
693 }
694 }
695
697 {
698 public bool CanDrop(DropAttemptInfo info)
699 {
700 if (WorldGen.crimson)
701 {
702 return !Main.expertMode;
703 }
704 return false;
705 }
706
708 {
709 if (WorldGen.crimson)
710 {
711 return !Main.expertMode;
712 }
713 return false;
714 }
715
717 {
718 return Language.GetTextValue("Bestiary_ItemDropConditions.IsCrimsonAndNotExpert");
719 }
720 }
721
723 {
724 public bool CanDrop(DropAttemptInfo info)
725 {
726 if (!WorldGen.crimson)
727 {
728 return !Main.expertMode;
729 }
730 return false;
731 }
732
734 {
735 if (!WorldGen.crimson)
736 {
737 return !Main.expertMode;
738 }
739 return false;
740 }
741
743 {
744 return Language.GetTextValue("Bestiary_ItemDropConditions.IsCorruptionAndNotExpert");
745 }
746 }
747
749 {
750 public bool CanDrop(DropAttemptInfo info)
751 {
752 float num = 500f * Main.GameModeInfo.EnemyMoneyDropMultiplier;
753 float num2 = 40f * Main.GameModeInfo.EnemyDamageMultiplier;
754 float num3 = 20f * Main.GameModeInfo.EnemyDefenseMultiplier;
755 if (Main.halloween && info.npc.value > 0f && info.npc.value < num && (float)info.npc.damage < num2 && (float)info.npc.defense < num3)
756 {
757 return !info.IsInSimulation;
758 }
759 return false;
760 }
761
763 {
764 return true;
765 }
766
768 {
769 return Language.GetTextValue("Bestiary_ItemDropConditions.HalloweenWeapons");
770 }
771 }
772
774 {
775 public bool CanDrop(DropAttemptInfo info)
776 {
778 {
779 if (!info.player.ZoneCorrupt)
780 {
781 return info.player.ZoneCrimson;
782 }
783 return true;
784 }
785 return false;
786 }
787
789 {
790 return true;
791 }
792
794 {
795 return Language.GetTextValue("Bestiary_ItemDropConditions.SoulOfNight");
796 }
797 }
798
800 {
801 public bool CanDrop(DropAttemptInfo info)
802 {
804 {
805 return info.player.ZoneHallow;
806 }
807 return false;
808 }
809
811 {
812 return true;
813 }
814
816 {
817 return Language.GetTextValue("Bestiary_ItemDropConditions.SoulOfLight");
818 }
819 }
820
822 {
823 public bool CanDrop(DropAttemptInfo info)
824 {
825 return !info.npc.SpawnedFromStatue;
826 }
827
829 {
830 return true;
831 }
832
834 {
835 return Language.GetTextValue("Bestiary_ItemDropConditions.NotFromStatue");
836 }
837 }
838
840 {
841 public bool CanDrop(DropAttemptInfo info)
842 {
843 if (Main.halloween && info.npc.lifeMax > 1 && info.npc.damage > 0 && !info.npc.friendly && info.npc.type != 121 && info.npc.type != 23 && info.npc.value > 0f)
844 {
845 return !info.IsInSimulation;
846 }
847 return false;
848 }
849
851 {
852 return true;
853 }
854
856 {
857 return Language.GetTextValue("Bestiary_ItemDropConditions.HalloweenGoodieBagDrop");
858 }
859 }
860
862 {
863 public bool CanDrop(DropAttemptInfo info)
864 {
865 if (Main.xMas && info.npc.lifeMax > 1 && info.npc.damage > 0 && !info.npc.friendly && info.npc.type != 121 && info.npc.type != 23 && info.npc.value > 0f)
866 {
867 return !info.IsInSimulation;
868 }
869 return false;
870 }
871
873 {
874 return true;
875 }
876
878 {
879 return Language.GetTextValue("Bestiary_ItemDropConditions.XmasPresentDrop");
880 }
881 }
882
884 {
885 public bool CanDrop(DropAttemptInfo info)
886 {
887 if (info.npc.lifeMax > 5 && info.npc.value > 0f && !info.npc.friendly && Main.hardMode && info.npc.position.Y / 16f > (float)Main.UnderworldLayer)
888 {
889 return !info.IsInSimulation;
890 }
891 return false;
892 }
893
895 {
896 return true;
897 }
898
900 {
901 return Language.GetTextValue("Bestiary_ItemDropConditions.LivingFlames");
902 }
903 }
904
906 {
907 public string neededName;
908
909 public NamedNPC(string neededName)
910 {
911 this.neededName = neededName;
912 }
913
914 public bool CanDrop(DropAttemptInfo info)
915 {
916 return info.npc.GivenOrTypeName == neededName;
917 }
918
920 {
921 return true;
922 }
923
925 {
926 return Language.GetTextValue("Bestiary_ItemDropConditions.NamedNPC");
927 }
928 }
929
931 {
932 public bool CanDrop(DropAttemptInfo info)
933 {
934 if (info.npc.value > 0f && Main.hardMode && !info.IsInSimulation)
935 {
936 return info.player.ZoneHallow;
937 }
938 return false;
939 }
940
942 {
943 return true;
944 }
945
947 {
948 return Language.GetTextValue("Bestiary_ItemDropConditions.HallowKeyCondition");
949 }
950 }
951
953 {
954 public bool CanDrop(DropAttemptInfo info)
955 {
956 if (info.npc.value > 0f && Main.hardMode && !info.IsInSimulation)
957 {
958 return info.player.ZoneJungle;
959 }
960 return false;
961 }
962
964 {
965 return true;
966 }
967
969 {
970 return Language.GetTextValue("Bestiary_ItemDropConditions.JungleKeyCondition");
971 }
972 }
973
975 {
976 public bool CanDrop(DropAttemptInfo info)
977 {
978 if (info.npc.value > 0f && Main.hardMode && !info.IsInSimulation)
979 {
980 return info.player.ZoneCorrupt;
981 }
982 return false;
983 }
984
986 {
987 return true;
988 }
989
991 {
992 return Language.GetTextValue("Bestiary_ItemDropConditions.CorruptKeyCondition");
993 }
994 }
995
997 {
998 public bool CanDrop(DropAttemptInfo info)
999 {
1000 if (info.npc.value > 0f && Main.hardMode && !info.IsInSimulation)
1001 {
1002 return info.player.ZoneCrimson;
1003 }
1004 return false;
1005 }
1006
1008 {
1009 return true;
1010 }
1011
1013 {
1014 return Language.GetTextValue("Bestiary_ItemDropConditions.CrimsonKeyCondition");
1015 }
1016 }
1017
1019 {
1020 public bool CanDrop(DropAttemptInfo info)
1021 {
1022 if (info.npc.value > 0f && Main.hardMode && !info.IsInSimulation)
1023 {
1024 return info.player.ZoneSnow;
1025 }
1026 return false;
1027 }
1028
1030 {
1031 return true;
1032 }
1033
1035 {
1036 return Language.GetTextValue("Bestiary_ItemDropConditions.FrozenKeyCondition");
1037 }
1038 }
1039
1041 {
1042 public bool CanDrop(DropAttemptInfo info)
1043 {
1044 if (info.npc.value > 0f && Main.hardMode && !info.IsInSimulation && info.player.ZoneDesert)
1045 {
1046 return !info.player.ZoneBeach;
1047 }
1048 return false;
1049 }
1050
1052 {
1053 return true;
1054 }
1055
1057 {
1058 return Language.GetTextValue("Bestiary_ItemDropConditions.DesertKeyCondition");
1059 }
1060 }
1061
1063 {
1064 public bool CanDrop(DropAttemptInfo info)
1065 {
1066 return NPC.downedMechBossAny;
1067 }
1068
1070 {
1071 return true;
1072 }
1073
1075 {
1076 return Language.GetTextValue("Bestiary_ItemDropConditions.BeatAnyMechBoss");
1077 }
1078 }
1079
1081 {
1082 public bool CanDrop(DropAttemptInfo info)
1083 {
1084 if (!Main.hardMode && info.npc.HasPlayerTarget && info.npc.lifeMax > 5 && !info.npc.friendly && info.npc.value > 0f && info.npc.position.Y / 16f > (float)(Main.maxTilesY - 350) && NPC.downedBoss3)
1085 {
1086 return !info.IsInSimulation;
1087 }
1088 return false;
1089 }
1090
1092 {
1093 return true;
1094 }
1095
1097 {
1098 return Language.GetTextValue("Bestiary_ItemDropConditions.YoyoCascade");
1099 }
1100 }
1101
1103 {
1104 public bool CanDrop(DropAttemptInfo info)
1105 {
1106 if (Main.hardMode && info.npc.HasPlayerTarget && info.player.ZoneSnow && info.npc.lifeMax > 5 && !info.npc.friendly && info.npc.value > 0f)
1107 {
1108 return !info.IsInSimulation;
1109 }
1110 return false;
1111 }
1112
1114 {
1115 return true;
1116 }
1117
1119 {
1120 return Language.GetTextValue("Bestiary_ItemDropConditions.YoyosAmarok");
1121 }
1122 }
1123
1125 {
1126 public bool CanDrop(DropAttemptInfo info)
1127 {
1128 if (Main.hardMode && info.player.ZoneJungle && NPC.downedMechBossAny && info.npc.lifeMax > 5 && info.npc.HasPlayerTarget && !info.npc.friendly && info.npc.value > 0f)
1129 {
1130 return !info.IsInSimulation;
1131 }
1132 return false;
1133 }
1134
1136 {
1137 return true;
1138 }
1139
1141 {
1142 return Language.GetTextValue("Bestiary_ItemDropConditions.YoyosYelets");
1143 }
1144 }
1145
1147 {
1148 public bool CanDrop(DropAttemptInfo info)
1149 {
1150 if (Main.hardMode && info.player.ZoneDungeon && NPC.downedPlantBoss && info.npc.lifeMax > 5 && info.npc.HasPlayerTarget && !info.npc.friendly && info.npc.value > 0f)
1151 {
1152 return !info.IsInSimulation;
1153 }
1154 return false;
1155 }
1156
1158 {
1159 return true;
1160 }
1161
1163 {
1164 return Language.GetTextValue("Bestiary_ItemDropConditions.YoyosKraken");
1165 }
1166 }
1167
1169 {
1170 public bool CanDrop(DropAttemptInfo info)
1171 {
1172 if (Main.hardMode && !info.player.ZoneDungeon && (double)(info.npc.position.Y / 16f) > (Main.rockLayer + (double)(Main.maxTilesY * 2)) / 3.0 && info.npc.lifeMax > 5 && info.npc.HasPlayerTarget && !info.npc.friendly && info.npc.value > 0f)
1173 {
1174 return !info.IsInSimulation;
1175 }
1176 return false;
1177 }
1178
1180 {
1181 return true;
1182 }
1183
1185 {
1186 return Language.GetTextValue("Bestiary_ItemDropConditions.YoyosHelFire");
1187 }
1188 }
1189
1191 {
1192 public bool CanDrop(DropAttemptInfo info)
1193 {
1195 }
1196
1198 {
1199 return true;
1200 }
1201
1203 {
1204 return Language.GetTextValue("Bestiary_ItemDropConditions.IsItAHappyWindyDay");
1205 }
1206 }
1207
1209 {
1210 public bool CanDrop(DropAttemptInfo info)
1211 {
1212 if (Main.remixWorld)
1213 {
1214 return !Main.hardMode;
1215 }
1216 return false;
1217 }
1218
1220 {
1221 if (Main.remixWorld)
1222 {
1223 return !Main.hardMode;
1224 }
1225 return false;
1226 }
1227
1229 {
1230 return null;
1231 }
1232 }
1233
1235 {
1236 public bool CanDrop(DropAttemptInfo info)
1237 {
1238 if (Main.remixWorld)
1239 {
1240 return Main.hardMode;
1241 }
1242 return false;
1243 }
1244
1246 {
1247 if (Main.remixWorld)
1248 {
1249 return Main.hardMode;
1250 }
1251 return false;
1252 }
1253
1255 {
1256 return null;
1257 }
1258 }
1259
1261 {
1262 public bool CanDrop(DropAttemptInfo info)
1263 {
1264 return Main.remixWorld;
1265 }
1266
1268 {
1269 return Main.remixWorld;
1270 }
1271
1273 {
1274 return null;
1275 }
1276 }
1277
1279 {
1280 public bool CanDrop(DropAttemptInfo info)
1281 {
1282 return !Main.remixWorld;
1283 }
1284
1286 {
1287 return !Main.remixWorld;
1288 }
1289
1291 {
1292 return null;
1293 }
1294 }
1295
1297 {
1298 public bool CanDrop(DropAttemptInfo info)
1299 {
1301 }
1302
1304 {
1306 }
1307
1309 {
1310 return null;
1311 }
1312 }
1313
1315 {
1316 public bool CanDrop(DropAttemptInfo info)
1317 {
1319 }
1320
1322 {
1324 }
1325
1327 {
1328 return null;
1329 }
1330 }
1331
1333 {
1334 public bool CanDrop(DropAttemptInfo info)
1335 {
1336 return Main.dontStarveWorld;
1337 }
1338
1340 {
1341 return Main.dontStarveWorld;
1342 }
1343
1345 {
1346 return null;
1347 }
1348 }
1349
1351 {
1352 public bool CanDrop(DropAttemptInfo info)
1353 {
1354 return !Main.dontStarveWorld;
1355 }
1356
1358 {
1359 return !Main.dontStarveWorld;
1360 }
1361
1363 {
1364 return null;
1365 }
1366 }
1367
1369 {
1370 if (info.npc.boss)
1371 {
1372 return false;
1373 }
1374 switch (info.npc.type)
1375 {
1376 case 1:
1377 case 13:
1378 case 14:
1379 case 15:
1380 case 121:
1381 case 535:
1382 return false;
1383 default:
1384 if (Main.remixWorld)
1385 {
1386 if (!Main.hardMode || info.npc.lifeMax <= 1 || info.npc.friendly || info.npc.value < 1f)
1387 {
1388 return false;
1389 }
1390 }
1391 else if (!Main.hardMode || info.npc.lifeMax <= 1 || info.npc.friendly || (double)info.npc.position.Y <= Main.rockLayer * 16.0 || info.npc.value < 1f)
1392 {
1393 return false;
1394 }
1395 return true;
1396 }
1397 }
1398}
static bool SoulOfWhateverConditionCanDrop(DropAttemptInfo info)
static string GetTextValue(string key)
Definition Language.cs:15
static bool halloween
Definition Main.cs:688
static int maxTilesY
Definition Main.cs:1116
static double worldSurface
Definition Main.cs:1272
static double rockLayer
Definition Main.cs:1274
static bool expertMode
Definition Main.cs:2737
static bool masterMode
Definition Main.cs:2717
static bool dayTime
Definition Main.cs:1282
static bool bloodMoon
Definition Main.cs:1296
static bool xMas
Definition Main.cs:686
static bool WindyEnoughForKiteDrops
Definition Main.cs:2873
static int maxTilesX
Definition Main.cs:1114
static bool getGoodWorld
Definition Main.cs:341
static GameModeData GameModeInfo
Definition Main.cs:2682
static UnifiedRandom rand
Definition Main.cs:1387
static bool dontStarveWorld
Definition Main.cs:345
static bool tenthAnniversaryWorld
Definition Main.cs:343
static int UnderworldLayer
Definition Main.cs:2825
static bool snowMoon
Definition Main.cs:1300
static bool pumpkinMoon
Definition Main.cs:1298
static bool hardMode
Definition Main.cs:1022
static bool remixWorld
Definition Main.cs:349
static bool downedMechBoss2
Definition NPC.cs:425
static int waveNumber
Definition NPC.cs:77
static bool downedMechBossAny
Definition NPC.cs:421
static bool downedMechBoss3
Definition NPC.cs:427
static bool AnyNPCs(int Type)
Definition NPC.cs:86689
static bool downedBoss3
Definition NPC.cs:349
static bool downedPlantBoss
Definition NPC.cs:363
static bool downedMechBoss1
Definition NPC.cs:423
static bool crimson
Definition WorldGen.cs:932