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

◆ BoulderExplosion()

void Terraria.Projectile.BoulderExplosion ( )
inlineprivate

Definition at line 77901 of file Projectile.cs.

77902 {
77903 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
77904 //IL_0050: Unknown result type (might be due to invalid IL or missing references)
77905 //IL_0055: Unknown result type (might be due to invalid IL or missing references)
77906 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
77907 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
77908 //IL_0086: Unknown result type (might be due to invalid IL or missing references)
77909 //IL_008c: Unknown result type (might be due to invalid IL or missing references)
77910 int num = Main.rand.Next(2, 5);
77911 Vector2 vector = default(Vector2);
77912 for (int i = 0; i < num; i++)
77913 {
77914 float num2 = 8f;
77915 ((Vector2)(ref vector))._002Ector(Main.rand.NextFloat() - 0.5f, (0f - Main.rand.NextFloat()) / 2f);
77916 ((Vector2)(ref vector)).Normalize();
77917 vector *= num2;
77918 int num3 = (int)((double)damage * 0.75);
77919 int num4 = NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector.X, vector.Y, 1005, num3, 0f, Main.myPlayer);
77920 Main.projectile[num4].timeLeft = 300;
77921 }
77922 }
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
IEntitySource GetProjectileSource_FromThis()
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...

References Terraria.Main.myPlayer, Terraria.Main.projectile, and Terraria.Main.rand.