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

◆ AI_189_Volcano()

void Terraria.Projectile.AI_189_Volcano ( )
inlineprivate

Definition at line 43483 of file Projectile.cs.

43484 {
43485 //IL_0015: Unknown result type (might be due to invalid IL or missing references)
43486 //IL_013d: Unknown result type (might be due to invalid IL or missing references)
43487 //IL_0149: Unknown result type (might be due to invalid IL or missing references)
43488 //IL_014e: Unknown result type (might be due to invalid IL or missing references)
43489 //IL_0156: Unknown result type (might be due to invalid IL or missing references)
43490 //IL_0174: Unknown result type (might be due to invalid IL or missing references)
43491 //IL_017a: Unknown result type (might be due to invalid IL or missing references)
43492 //IL_017c: Unknown result type (might be due to invalid IL or missing references)
43493 //IL_0197: Unknown result type (might be due to invalid IL or missing references)
43494 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)
43495 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
43496 //IL_0361: Unknown result type (might be due to invalid IL or missing references)
43497 //IL_036d: Unknown result type (might be due to invalid IL or missing references)
43498 //IL_0372: Unknown result type (might be due to invalid IL or missing references)
43499 //IL_0379: Unknown result type (might be due to invalid IL or missing references)
43500 //IL_0391: Unknown result type (might be due to invalid IL or missing references)
43501 //IL_0397: Unknown result type (might be due to invalid IL or missing references)
43502 //IL_0399: Unknown result type (might be due to invalid IL or missing references)
43503 //IL_03b4: Unknown result type (might be due to invalid IL or missing references)
43504 //IL_03c2: Unknown result type (might be due to invalid IL or missing references)
43505 //IL_03c8: Unknown result type (might be due to invalid IL or missing references)
43506 //IL_042e: Unknown result type (might be due to invalid IL or missing references)
43507 //IL_0433: Unknown result type (might be due to invalid IL or missing references)
43508 //IL_0444: Unknown result type (might be due to invalid IL or missing references)
43509 //IL_044e: Unknown result type (might be due to invalid IL or missing references)
43510 //IL_0453: Unknown result type (might be due to invalid IL or missing references)
43511 //IL_01f5: Unknown result type (might be due to invalid IL or missing references)
43512 //IL_0201: Unknown result type (might be due to invalid IL or missing references)
43513 //IL_0206: Unknown result type (might be due to invalid IL or missing references)
43514 //IL_020e: Unknown result type (might be due to invalid IL or missing references)
43515 //IL_022c: Unknown result type (might be due to invalid IL or missing references)
43516 //IL_0232: Unknown result type (might be due to invalid IL or missing references)
43517 //IL_0234: Unknown result type (might be due to invalid IL or missing references)
43518 //IL_024f: Unknown result type (might be due to invalid IL or missing references)
43519 //IL_025d: Unknown result type (might be due to invalid IL or missing references)
43520 //IL_0263: Unknown result type (might be due to invalid IL or missing references)
43521 //IL_0282: Unknown result type (might be due to invalid IL or missing references)
43522 //IL_028c: Unknown result type (might be due to invalid IL or missing references)
43523 //IL_0291: Unknown result type (might be due to invalid IL or missing references)
43524 //IL_04ad: Unknown result type (might be due to invalid IL or missing references)
43525 //IL_04b9: Unknown result type (might be due to invalid IL or missing references)
43526 //IL_04be: Unknown result type (might be due to invalid IL or missing references)
43527 //IL_04c6: Unknown result type (might be due to invalid IL or missing references)
43528 //IL_04e4: Unknown result type (might be due to invalid IL or missing references)
43529 //IL_04ea: Unknown result type (might be due to invalid IL or missing references)
43530 //IL_04ec: Unknown result type (might be due to invalid IL or missing references)
43531 //IL_0507: Unknown result type (might be due to invalid IL or missing references)
43532 //IL_0518: Unknown result type (might be due to invalid IL or missing references)
43533 //IL_051e: Unknown result type (might be due to invalid IL or missing references)
43534 //IL_0537: Unknown result type (might be due to invalid IL or missing references)
43535 //IL_0546: Unknown result type (might be due to invalid IL or missing references)
43536 //IL_054b: Unknown result type (might be due to invalid IL or missing references)
43537 //IL_0550: Unknown result type (might be due to invalid IL or missing references)
43538 //IL_02af: Unknown result type (might be due to invalid IL or missing references)
43539 //IL_02bb: Unknown result type (might be due to invalid IL or missing references)
43540 //IL_02c0: Unknown result type (might be due to invalid IL or missing references)
43541 //IL_02cf: Unknown result type (might be due to invalid IL or missing references)
43542 //IL_02d4: Unknown result type (might be due to invalid IL or missing references)
43543 //IL_02da: Unknown result type (might be due to invalid IL or missing references)
43544 //IL_02f8: Unknown result type (might be due to invalid IL or missing references)
43545 //IL_02fe: Unknown result type (might be due to invalid IL or missing references)
43546 //IL_0300: Unknown result type (might be due to invalid IL or missing references)
43547 //IL_031b: Unknown result type (might be due to invalid IL or missing references)
43548 if (soundDelay == 0)
43549 {
43550 soundDelay = -1;
43552 }
43553 alpha = (int)(255f * (1f - Utils.Remap(ai[0], 0f, 2f, 0f, 1f) * Utils.Remap(ai[0], 6f, 10f, 1f, 0f)));
43554 float num = width / 2;
43555 float num2 = height / 2;
43556 num = (num2 = 8f);
43557 scale = 1f + 1f * (ai[0] / 15f);
43558 if (++frameCounter >= 2)
43559 {
43560 frameCounter = 0;
43561 if (++frame >= 5)
43562 {
43563 Kill();
43564 return;
43565 }
43566 }
43567 ai[0] += 1f;
43568 if (ai[0] == 1f)
43569 {
43570 for (int i = 0; i < 20; i++)
43571 {
43572 int num3 = Utils.SelectRandom<int>(Main.rand, 6, 259, 158);
43573 Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(num, num2), num3, velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)Math.PI / 4f) * 0.6f) * (2f + 5f * Main.rand.NextFloat()), 200, default(Color), 1f + Main.rand.NextFloat()).customData = 0;
43574 }
43575 int num4 = Main.rand.Next(3, 7);
43576 for (int j = 0; j < num4 * 5; j++)
43577 {
43578 Dust dust3 = Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(num, num2), 31, velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)Math.PI / 4f) * 0.6f) * (2f + 5f * Main.rand.NextFloat()), 50, default(Color), 1f + Main.rand.NextFloat());
43579 dust3.noGravity = true;
43580 dust3.velocity *= 3f;
43581 }
43582 for (int k = 0; k < num4; k++)
43583 {
43584 Gore.NewGorePerfect(base.Center + Main.rand.NextVector2Circular(num, num2) - new Vector2(16f, 16f), velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)Math.PI / 4f) * 0.6f) * (0f + 4f * Main.rand.NextFloat()), 61 + Main.rand.Next(3));
43585 }
43586 }
43587 for (int l = 0; l < 2; l++)
43588 {
43589 if (Main.rand.Next(3) < 2)
43590 {
43591 Dust dust2 = Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(num, num2), 6, velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)Math.PI / 4f)) * (1.5f + 2f * Main.rand.NextFloat()), 90, default(Color), 2.5f);
43592 dust2.noGravity = true;
43593 dust2.fadeIn = 1f;
43594 if (Main.rand.Next(6) < 3)
43595 {
43596 dust2.noGravity = false;
43597 dust2.noLight = true;
43598 dust2.fadeIn = 0.4f;
43599 dust2.scale *= 0.3f;
43600 }
43601 else
43602 {
43603 dust2.velocity = DirectionFrom(dust2.position) * ((Vector2)(ref dust2.velocity)).Length() * 0.25f;
43604 }
43605 dust2.customData = 0;
43606 }
43607 }
43608 for (int m = 0; m < 2; m++)
43609 {
43610 if (!(Main.rand.NextFloat() < 0.5f))
43611 {
43612 int num5 = Utils.SelectRandom<int>(Main.rand, 6, 259, 158);
43613 Dust dust4 = Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(num, num2), num5, velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)Math.PI / 4f) * 0.5f) * (1f + 2f * Main.rand.NextFloat()), 200, default(Color), 1f + Main.rand.NextFloat());
43614 dust4.velocity *= new Vector2(0.6f, 1.5f);
43615 dust4.customData = 0;
43616 }
43617 }
43618 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 DirectionFrom(Vector2 Source)
Definition Entity.cs:298
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static readonly SoundStyle DD2_ExplosiveTrapExplode
Definition SoundID.cs:61
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....

References Terraria.ID.SoundID.DD2_ExplosiveTrapExplode, Terraria.Dust.NewDustPerfect(), Terraria.Gore.NewGorePerfect(), Terraria.Audio.SoundEngine.PlaySound(), Terraria.Main.rand, and Terraria.Utils.Remap().

+ Here is the call graph for this function: