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

◆ AI_193_Flamethrower()

void Terraria.Projectile.AI_193_Flamethrower ( )
inlineprivate

Definition at line 42377 of file Projectile.cs.

42378 {
42379 //IL_003f: Unknown result type (might be due to invalid IL or missing references)
42380 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
42381 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
42382 //IL_0276: Unknown result type (might be due to invalid IL or missing references)
42383 //IL_027b: Unknown result type (might be due to invalid IL or missing references)
42384 //IL_027e: Unknown result type (might be due to invalid IL or missing references)
42385 //IL_0283: Unknown result type (might be due to invalid IL or missing references)
42386 //IL_0285: Unknown result type (might be due to invalid IL or missing references)
42387 //IL_028a: Unknown result type (might be due to invalid IL or missing references)
42388 //IL_028f: Unknown result type (might be due to invalid IL or missing references)
42389 //IL_029d: Unknown result type (might be due to invalid IL or missing references)
42390 //IL_02a7: Unknown result type (might be due to invalid IL or missing references)
42391 //IL_02ac: Unknown result type (might be due to invalid IL or missing references)
42392 //IL_02b3: Unknown result type (might be due to invalid IL or missing references)
42393 //IL_02c7: Unknown result type (might be due to invalid IL or missing references)
42394 //IL_02cc: Unknown result type (might be due to invalid IL or missing references)
42395 //IL_02d1: Unknown result type (might be due to invalid IL or missing references)
42396 //IL_02d8: Unknown result type (might be due to invalid IL or missing references)
42397 //IL_02dd: Unknown result type (might be due to invalid IL or missing references)
42398 //IL_02fb: Unknown result type (might be due to invalid IL or missing references)
42399 //IL_0312: Unknown result type (might be due to invalid IL or missing references)
42400 //IL_0314: Unknown result type (might be due to invalid IL or missing references)
42401 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
42402 //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
42403 //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
42404 //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
42405 //IL_0116: Unknown result type (might be due to invalid IL or missing references)
42406 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
42407 //IL_01a7: Unknown result type (might be due to invalid IL or missing references)
42408 //IL_01b1: Unknown result type (might be due to invalid IL or missing references)
42409 //IL_01b6: Unknown result type (might be due to invalid IL or missing references)
42410 //IL_01be: Unknown result type (might be due to invalid IL or missing references)
42411 //IL_01c4: Unknown result type (might be due to invalid IL or missing references)
42412 //IL_01ce: Unknown result type (might be due to invalid IL or missing references)
42413 //IL_01f8: Unknown result type (might be due to invalid IL or missing references)
42414 //IL_0222: Unknown result type (might be due to invalid IL or missing references)
42415 //IL_0227: Unknown result type (might be due to invalid IL or missing references)
42416 //IL_022c: Unknown result type (might be due to invalid IL or missing references)
42417 localAI[0] += 1f;
42418 int num = 60;
42419 int num2 = 12;
42420 int num3 = num + num2;
42421 if (localAI[0] >= (float)num3)
42422 {
42423 Kill();
42424 }
42425 if (localAI[0] >= (float)num)
42426 {
42427 velocity *= 0.95f;
42428 }
42429 bool flag = ai[0] == 1f;
42430 int num4 = 50;
42431 int num5 = num4;
42432 if (flag)
42433 {
42434 num4 = 0;
42435 num5 = num;
42436 }
42437 if (localAI[0] < (float)num5 && Main.rand.NextFloat() < 0.25f)
42438 {
42439 short num6 = (short)(flag ? 135 : 6);
42440 Dust dust = Dust.NewDustDirect(base.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(localAI[0], 0f, 72f, 0.5f, 1f), 4, 4, num6, velocity.X * 0.2f, velocity.Y * 0.2f, 100);
42441 if (Main.rand.Next(4) == 0)
42442 {
42443 dust.noGravity = true;
42444 dust.scale *= 3f;
42445 dust.velocity.X *= 2f;
42446 dust.velocity.Y *= 2f;
42447 }
42448 else
42449 {
42450 dust.scale *= 1.5f;
42451 }
42452 dust.scale *= 1.5f;
42453 dust.velocity *= 1.2f;
42454 dust.velocity += velocity * 1f * Utils.Remap(localAI[0], 0f, (float)num * 0.75f, 1f, 0.1f) * Utils.Remap(localAI[0], 0f, (float)num * 0.1f, 0.1f, 1f);
42455 dust.customData = 1;
42456 }
42457 if (num4 > 0 && localAI[0] >= (float)num4 && Main.rand.NextFloat() < 0.5f)
42458 {
42459 Vector2 center = Main.player[owner].Center;
42460 Vector2 vector = (base.Center - center).SafeNormalize(Vector2.Zero).RotatedByRandom(0.19634954631328583) * 7f;
42461 short num7 = 31;
42462 Dust dust2 = Dust.NewDustDirect(base.Center + Main.rand.NextVector2Circular(50f, 50f) - vector * 2f, 4, 4, num7, 0f, 0f, 150, new Color(80, 80, 80));
42463 dust2.noGravity = true;
42464 dust2.velocity = vector;
42465 dust2.scale *= 1.1f + Main.rand.NextFloat() * 0.2f;
42466 dust2.customData = -0.3f - 0.15f * Main.rand.NextFloat();
42467 }
42468 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....

References Terraria.Dust.NewDustDirect(), Terraria.Main.player, Terraria.Main.rand, and Terraria.Utils.Remap().

+ Here is the call graph for this function: