20239 {
20240 if (Main.expertMode && ((npc.type == 266 && Main.rand.Next(3) == 0) || npc.type == 267))
20241 {
20242 int num = Main.rand.Next(9);
20243 if (
num == 2 ||
num == 4)
20244 {
20245 num = Main.rand.Next(9);
20246 }
20247 float num2 = (float)Main.rand.Next(75, 150) * 0.01f;
20249 {
20250 case 0:
20252 break;
20253 case 1:
20255 break;
20256 case 2:
20258 break;
20259 case 3:
20261 break;
20262 case 4:
20264 break;
20265 case 5:
20267 break;
20268 case 6:
20270 break;
20271 case 7:
20273 break;
20274 case 8:
20276 break;
20277 }
20278 }
20279 if (npc.type == 530 || npc.type == 531)
20280 {
20281 AddBuff(70, Main.rand.Next(240, 241));
20282 }
20283 if (npc.type == 159 || npc.type == 158)
20284 {
20285 AddBuff(30, Main.rand.Next(300, 600));
20286 }
20287 if (npc.type == 525)
20288 {
20290 }
20291 if (npc.type == 526)
20292 {
20294 }
20295 if (npc.type == 527)
20296 {
20298 }
20299 if (Main.expertMode && (npc.type == 49 || npc.type == 93 || npc.type == 51 || npc.type == 152 || npc.type == 634) && Main.rand.Next(10) == 0)
20300 {
20301 AddBuff(148, Main.rand.Next(1800, 5400));
20302 }
20303 if (Main.expertMode && npc.type == 222)
20304 {
20305 AddBuff(20, Main.rand.Next(60, 240));
20306 }
20307 if (Main.expertMode && (npc.type == 210 || npc.type == 211))
20308 {
20309 AddBuff(20, Main.rand.Next(60, 180));
20310 }
20311 if (Main.expertMode && npc.type == 35)
20312 {
20313 AddBuff(30, Main.rand.Next(180, 300));
20314 }
20315 if (Main.expertMode && npc.type == 36 && Main.rand.Next(2) == 0)
20316 {
20317 AddBuff(32, Main.rand.Next(30, 60));
20318 }
20319 if (npc.type >= 269 && npc.type <= 272)
20320 {
20321 if (Main.rand.Next(3) == 0)
20322 {
20324 }
20325 else if (Main.rand.Next(3) == 0)
20326 {
20328 }
20329 }
20330 if (npc.type >= 273 && npc.type <= 276 && Main.rand.Next(2) == 0)
20331 {
20333 }
20334 if (npc.type >= 277 && npc.type <= 280)
20335 {
20337 }
20338 if (npc.type == 371)
20339 {
20340 AddBuff(103, 60 * Main.rand.Next(3, 8));
20341 }
20342 if (npc.type == 370 && Main.expertMode)
20343 {
20344 int num3 = Utils.SelectRandom<
int>(Main.rand, 0, 148, 30);
20346 {
20348 }
20349 }
20350 if (((npc.type == 1 && npc.netID == -6) || npc.type == 81 || npc.type == 79 || npc.type == 183 || npc.type == 630) && Main.rand.Next(4) == 0)
20351 {
20353 }
20354 if ((npc.type == 23 || npc.type == 25) && Main.rand.Next(3) == 0)
20355 {
20357 }
20358 if ((npc.type == 34 || npc.type == 83 || npc.type == 84 || npc.type == 179 || npc.type == 289) && Main.rand.Next(3) == 0)
20359 {
20361 }
20362 if ((npc.type == 104 || npc.type == 102) && Main.rand.Next(8) == 0)
20363 {
20365 }
20366 if (npc.type == 75 && Main.rand.Next(10) == 0)
20367 {
20369 }
20370 if ((npc.type == 163 || npc.type == 238 || npc.type == 236 || npc.type == 237) && Main.rand.Next(10) == 0)
20371 {
20373 }
20374 if ((npc.type == 79 || npc.type == 103 || npc.type == 630) && Main.rand.Next(5) == 0)
20375 {
20377 }
20378 if ((npc.type == 75 || npc.type == 78 || npc.type == 82) && Main.rand.Next(8) == 0)
20379 {
20381 }
20382 if ((npc.type == 93 || npc.type == 109 || npc.type == 80) && Main.rand.Next(14) == 0)
20383 {
20385 }
20386 if (npc.type >= 305 && npc.type <= 314 && Main.rand.Next(10) == 0)
20387 {
20389 }
20390 if (npc.type == 77 && Main.rand.Next(6) == 0)
20391 {
20393 }
20394 if (npc.type == 112 && Main.rand.Next(20) == 0)
20395 {
20397 }
20398 if (npc.type == 182 && Main.rand.Next(25) == 0)
20399 {
20401 }
20402 if (npc.type == 141 && Main.rand.Next(2) == 0)
20403 {
20405 }
20406 if (npc.type == 147 && !
frozen && Main.rand.Next(12) == 0)
20407 {
20409 }
20410 if (npc.type == 150)
20411 {
20412 if (Main.rand.Next(2) == 0)
20413 {
20415 }
20416 if (!
frozen && Main.rand.Next(35) == 0)
20417 {
20419 }
20420 else if (!
frozen && Main.expertMode && Main.rand.Next(35) == 0)
20421 {
20423 }
20424 }
20425 if (npc.type == 184)
20426 {
20428 if (!
frozen && Main.rand.Next(15) == 0)
20429 {
20431 }
20432 else if (!
frozen && Main.expertMode && Main.rand.Next(25) == 0)
20433 {
20435 }
20436 }
20437 }
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Gives the player the provided buff. This accounts for if the player is immune to the buff....