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

◆ NinjaDodge()

void Terraria.Player.NinjaDodge ( )
inline

Definition at line 36053 of file Player.cs.

36054 {
36056 for (int i = 0; i < 100; i++)
36057 {
36058 int num = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 2f);
36059 Main.dust[num].position.X += Main.rand.Next(-20, 21);
36060 Main.dust[num].position.Y += Main.rand.Next(-20, 21);
36061 Main.dust[num].velocity *= 0.4f;
36062 Main.dust[num].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
36063 Main.dust[num].shader = GameShaders.Armor.GetSecondaryShader(cWaist, this);
36064 if (Main.rand.Next(2) == 0)
36065 {
36066 Main.dust[num].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
36067 Main.dust[num].noGravity = true;
36068 }
36069 }
36070 int num2 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
36071 Main.gore[num2].scale = 1.5f;
36072 Main.gore[num2].velocity.X = (float)Main.rand.Next(-50, 51) * 0.01f;
36073 Main.gore[num2].velocity.Y = (float)Main.rand.Next(-50, 51) * 0.01f;
36074 Main.gore[num2].velocity *= 0.4f;
36075 num2 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
36076 Main.gore[num2].scale = 1.5f;
36077 Main.gore[num2].velocity.X = 1.5f + (float)Main.rand.Next(-50, 51) * 0.01f;
36078 Main.gore[num2].velocity.Y = 1.5f + (float)Main.rand.Next(-50, 51) * 0.01f;
36079 Main.gore[num2].velocity *= 0.4f;
36080 num2 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
36081 Main.gore[num2].scale = 1.5f;
36082 Main.gore[num2].velocity.X = -1.5f - (float)Main.rand.Next(-50, 51) * 0.01f;
36083 Main.gore[num2].velocity.Y = 1.5f + (float)Main.rand.Next(-50, 51) * 0.01f;
36084 Main.gore[num2].velocity *= 0.4f;
36085 num2 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
36086 Main.gore[num2].scale = 1.5f;
36087 Main.gore[num2].velocity.X = 1.5f + (float)Main.rand.Next(-50, 51) * 0.01f;
36088 Main.gore[num2].velocity.Y = -1.5f - (float)Main.rand.Next(-50, 51) * 0.01f;
36089 Main.gore[num2].velocity *= 0.4f;
36090 num2 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
36091 Main.gore[num2].scale = 1.5f;
36092 Main.gore[num2].velocity.X = -1.5f - (float)Main.rand.Next(-50, 51) * 0.01f;
36093 Main.gore[num2].velocity.Y = -1.5f - (float)Main.rand.Next(-50, 51) * 0.01f;
36094 Main.gore[num2].velocity *= 0.4f;
36095 if (whoAmI == Main.myPlayer)
36096 {
36097 NetMessage.SendData(62, -1, -1, null, whoAmI, 1f);
36098 }
36099 }
Vector2 position
Definition Entity.cs:14
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7
void SetImmuneTimeForAllTypes(int time)
Definition Player.cs:36009

References Terraria.Graphics.Shaders.GameShaders.Armor, Terraria.Main.dust, Terraria.Main.gore, Terraria.Main.myPlayer, Terraria.Dust.NewDust(), Terraria.Gore.NewGore(), Terraria.Main.rand, and Terraria.NetMessage.SendData().