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

◆ AI_184_BadTorchLuck()

void Terraria.Projectile.AI_184_BadTorchLuck ( )
inlineprivate

Definition at line 44215 of file Projectile.cs.

44216 {
44217 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
44218 //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
44219 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
44220 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
44221 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
44222 //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
44223 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
44224 //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
44225 //IL_0108: Unknown result type (might be due to invalid IL or missing references)
44226 //IL_0112: Unknown result type (might be due to invalid IL or missing references)
44227 //IL_0117: Unknown result type (might be due to invalid IL or missing references)
44228 //IL_0137: Unknown result type (might be due to invalid IL or missing references)
44229 //IL_013c: Unknown result type (might be due to invalid IL or missing references)
44230 owner = 255;
44231 if (Main.player[Main.myPlayer].unlockedBiomeTorches)
44232 {
44233 damage = 0;
44234 }
44235 if (localAI[0] == 0f)
44236 {
44237 localAI[0] = 1f;
44239 }
44240 if (ai[1] > 0f)
44241 {
44242 ai[1] -= ((Vector2)(ref velocity)).Length();
44243 }
44244 else
44245 {
44246 tileCollide = true;
44247 }
44248 int num = (int)ai[0];
44249 float num2 = 4f;
44250 for (float num3 = 0f; num3 < num2; num3 += 1f)
44251 {
44252 int num4 = Dust.NewDust(position + velocity / num2 * num3, 4, 4, num, 0f, 0f, 100);
44253 if (Main.rand.Next(3) != 0)
44254 {
44255 Main.dust[num4].noGravity = true;
44256 }
44257 Dust obj = Main.dust[num4];
44258 obj.velocity *= 0.3f;
44259 if (num == 66)
44260 {
44261 Main.dust[num4].color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
44262 Main.dust[num4].noGravity = true;
44263 }
44264 }
44265 }
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 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
static readonly SoundStyle Item8
Definition SoundID.cs:693
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
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....
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...

References Terraria.Main.DiscoB, Terraria.Main.DiscoG, Terraria.Main.DiscoR, Terraria.Main.dust, Terraria.ID.SoundID.Item8, Terraria.Main.myPlayer, Terraria.Dust.NewDust(), Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Main.rand.

+ Here is the call graph for this function: