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

◆ StatusPlayer()

void Terraria.Projectile.StatusPlayer ( int i)
inline

Definition at line 11243 of file Projectile.cs.

11244 {
11245 if (Main.player[i].creativeGodMode)
11246 {
11247 return;
11248 }
11249 if (type == 119)
11250 {
11251 Main.player[i].AddBuff(324, 240);
11252 }
11253 if (type == 359)
11254 {
11255 Main.player[i].AddBuff(324, 420);
11256 }
11257 if (type == 472)
11258 {
11259 Main.player[i].AddBuff(149, Main.rand.Next(30, 150));
11260 }
11261 if (type == 961)
11262 {
11263 Main.player[i].AddBuff(47, 20);
11264 }
11265 if (type == 467)
11266 {
11267 Main.player[i].AddBuff(24, Main.rand.Next(30, 150));
11268 }
11269 if (type == 581)
11270 {
11271 if (Main.expertMode)
11272 {
11273 Main.player[i].AddBuff(164, Main.rand.Next(300, 540));
11274 }
11275 else if (Main.rand.Next(2) == 0)
11276 {
11277 Main.player[i].AddBuff(164, Main.rand.Next(360, 720));
11278 }
11279 }
11280 if (type == 687)
11281 {
11282 Main.player[i].AddBuff(24, 60 * Main.rand.Next(7, 11));
11283 }
11284 if (type == 258 && Main.rand.Next(2) == 0)
11285 {
11286 Main.player[i].AddBuff(24, 60 * Main.rand.Next(5, 8));
11287 }
11288 if (type == 572 && Main.rand.Next(3) != 0)
11289 {
11290 Main.player[i].AddBuff(20, Main.rand.Next(120, 240));
11291 }
11292 if (type == 276)
11293 {
11294 if (Main.expertMode)
11295 {
11296 Main.player[i].AddBuff(20, Main.rand.Next(120, 540));
11297 }
11298 else if (Main.rand.Next(2) == 0)
11299 {
11300 Main.player[i].AddBuff(20, Main.rand.Next(180, 420));
11301 }
11302 }
11303 if (type == 436 && Main.rand.Next(5) >= 2)
11304 {
11305 Main.player[i].AddBuff(31, 300);
11306 }
11307 if (type == 435 && Main.rand.Next(3) != 0)
11308 {
11309 Main.player[i].AddBuff(144, 300);
11310 }
11311 if (type == 682)
11312 {
11313 Main.player[i].AddBuff(196, 300);
11314 }
11315 if (type == 437)
11316 {
11317 Main.player[i].AddBuff(144, 60 * Main.rand.Next(4, 9));
11318 }
11319 if (type == 348)
11320 {
11321 if (Main.rand.Next(2) == 0)
11322 {
11323 Main.player[i].AddBuff(46, 600);
11324 }
11325 else
11326 {
11327 Main.player[i].AddBuff(46, 300);
11328 }
11329 if (Main.rand.Next(3) != 0)
11330 {
11331 if (Main.rand.Next(16) == 0)
11332 {
11333 Main.player[i].AddBuff(47, 60);
11334 }
11335 else if (Main.rand.Next(12) == 0)
11336 {
11337 Main.player[i].AddBuff(47, 40);
11338 }
11339 else if (Main.rand.Next(8) == 0)
11340 {
11341 Main.player[i].AddBuff(47, 20);
11342 }
11343 }
11344 }
11345 if (type == 349)
11346 {
11347 if (Main.rand.Next(3) == 0)
11348 {
11349 Main.player[i].AddBuff(46, 600);
11350 }
11351 else if (Main.rand.Next(2) == 0)
11352 {
11353 Main.player[i].AddBuff(46, 300);
11354 }
11355 }
11356 if (type >= 399 && type <= 402 && !hostile)
11357 {
11358 Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7));
11359 }
11360 if (type == 55 || type == 719)
11361 {
11362 if (Main.rand.Next(3) == 0)
11363 {
11364 Main.player[i].AddBuff(20, 600);
11365 }
11366 else if (Main.expertMode)
11367 {
11368 Main.player[i].AddBuff(20, Main.rand.Next(60, 300));
11369 }
11370 }
11371 if (type == 44 && Main.rand.Next(3) == 0)
11372 {
11373 Main.player[i].AddBuff(22, 900);
11374 }
11375 if (type == 293)
11376 {
11377 Main.player[i].AddBuff(80, 60 * Main.rand.Next(2, 7));
11378 }
11379 if (type == 299)
11380 {
11381 Main.player[i].AddBuff(23, 240);
11382 }
11383 if (type == 82 && Main.rand.Next(3) == 0)
11384 {
11385 Main.player[i].AddBuff(24, 420);
11386 }
11387 if (type == 285 && !hostile)
11388 {
11389 if (Main.rand.Next(3) == 0)
11390 {
11391 Main.player[i].AddBuff(31, 180);
11392 }
11393 else
11394 {
11395 Main.player[i].AddBuff(31, 60);
11396 }
11397 }
11398 if (type == 96 || type == 101)
11399 {
11400 if (Main.rand.Next(6) == 0)
11401 {
11402 Main.player[i].AddBuff(39, 180);
11403 }
11404 else if (Main.rand.Next(4) == 0)
11405 {
11406 Main.player[i].AddBuff(39, 180);
11407 }
11408 else if (Main.rand.Next(2) == 0)
11409 {
11410 Main.player[i].AddBuff(39, 120);
11411 }
11412 }
11413 else if (type == 288)
11414 {
11415 Main.player[i].AddBuff(69, 900);
11416 }
11417 else if (type == 253 && !hostile)
11418 {
11419 Main.player[i].AddBuff(324, 600);
11420 }
11421 if (type == 291 || type == 292)
11422 {
11423 Main.player[i].AddBuff(24, 60 * Main.rand.Next(8, 16));
11424 }
11425 if (type == 98)
11426 {
11427 Main.player[i].AddBuff(20, 600);
11428 }
11429 if (type == 184)
11430 {
11431 Main.player[i].AddBuff(20, 900);
11432 }
11433 if (type == 980)
11434 {
11435 Main.player[i].AddBuff(70, 300);
11436 }
11437 if (type == 290)
11438 {
11439 Main.player[i].AddBuff(32, 60 * Main.rand.Next(5, 16));
11440 }
11441 if (type == 174)
11442 {
11443 Main.player[i].AddBuff(46, 1200);
11444 if (!Main.player[i].frozen && Main.rand.Next(20) == 0)
11445 {
11446 Main.player[i].AddBuff(47, 90);
11447 }
11448 else if (!Main.player[i].frozen && Main.expertMode && Main.rand.Next(20) == 0)
11449 {
11450 Main.player[i].AddBuff(47, 60);
11451 }
11452 }
11453 if (type == 257)
11454 {
11455 Main.player[i].AddBuff(46, 2700);
11456 if (!Main.player[i].frozen && Main.rand.Next(5) == 0)
11457 {
11458 Main.player[i].AddBuff(47, 60);
11459 }
11460 }
11461 if (type == 177)
11462 {
11463 Main.player[i].AddBuff(46, 1500);
11464 if (!Main.player[i].frozen && Main.rand.Next(10) == 0)
11465 {
11466 Main.player[i].AddBuff(47, Main.rand.Next(30, 120));
11467 }
11468 }
11469 if (type == 128 && Main.rand.Next(3) == 0)
11470 {
11471 Main.player[i].AddBuff(44, 360);
11472 }
11473 if (type == 176)
11474 {
11475 if (Main.rand.Next(4) == 0)
11476 {
11477 Main.player[i].AddBuff(20, 1200);
11478 }
11479 else if (Main.rand.Next(2) == 0)
11480 {
11481 Main.player[i].AddBuff(20, 300);
11482 }
11483 }
11484 }
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool hostile
If True, this projectile will hurt players and friendly NPCs (F:Terraria.NPC.friendly) Defaults to ...

References Terraria.Main.expertMode, Terraria.Projectile.hostile, Terraria.Main.player, Terraria.Main.rand, and Terraria.Projectile.type.

Referenced by Terraria.Projectile.BombsHurtPlayers(), and Terraria.Projectile.Damage().

+ Here is the caller graph for this function: