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

◆ AI_152_SuperStarSlash()

void Terraria.Projectile.AI_152_SuperStarSlash ( )
inlineprivate

Definition at line 21117 of file Projectile.cs.

21118 {
21119 //IL_005e: Unknown result type (might be due to invalid IL or missing references)
21120 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
21121 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
21122 //IL_0147: Unknown result type (might be due to invalid IL or missing references)
21123 //IL_0101: Unknown result type (might be due to invalid IL or missing references)
21124 //IL_0115: Unknown result type (might be due to invalid IL or missing references)
21125 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
21126 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
21127 //IL_0121: Unknown result type (might be due to invalid IL or missing references)
21128 //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
21129 //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
21130 //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
21131 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
21132 //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
21133 //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
21134 //IL_043b: Unknown result type (might be due to invalid IL or missing references)
21135 //IL_01f3: Unknown result type (might be due to invalid IL or missing references)
21136 //IL_015d: Unknown result type (might be due to invalid IL or missing references)
21137 //IL_018f: Unknown result type (might be due to invalid IL or missing references)
21138 //IL_0195: Unknown result type (might be due to invalid IL or missing references)
21139 //IL_01aa: Unknown result type (might be due to invalid IL or missing references)
21140 //IL_01af: Unknown result type (might be due to invalid IL or missing references)
21141 //IL_01c3: Unknown result type (might be due to invalid IL or missing references)
21142 //IL_01c9: Unknown result type (might be due to invalid IL or missing references)
21143 //IL_01d3: Unknown result type (might be due to invalid IL or missing references)
21144 //IL_01d8: Unknown result type (might be due to invalid IL or missing references)
21145 //IL_01dd: Unknown result type (might be due to invalid IL or missing references)
21146 //IL_02b3: Unknown result type (might be due to invalid IL or missing references)
21147 //IL_02b8: Unknown result type (might be due to invalid IL or missing references)
21148 //IL_02bd: Unknown result type (might be due to invalid IL or missing references)
21149 //IL_02d6: Unknown result type (might be due to invalid IL or missing references)
21150 //IL_02db: Unknown result type (might be due to invalid IL or missing references)
21151 //IL_0333: Unknown result type (might be due to invalid IL or missing references)
21152 //IL_0353: Unknown result type (might be due to invalid IL or missing references)
21153 //IL_0359: Unknown result type (might be due to invalid IL or missing references)
21154 //IL_036d: Unknown result type (might be due to invalid IL or missing references)
21155 //IL_0377: Unknown result type (might be due to invalid IL or missing references)
21156 //IL_037c: Unknown result type (might be due to invalid IL or missing references)
21157 //IL_03a9: Unknown result type (might be due to invalid IL or missing references)
21158 //IL_03c9: Unknown result type (might be due to invalid IL or missing references)
21159 //IL_03cf: Unknown result type (might be due to invalid IL or missing references)
21160 //IL_03dc: Unknown result type (might be due to invalid IL or missing references)
21161 //IL_03e1: Unknown result type (might be due to invalid IL or missing references)
21162 //IL_03e6: Unknown result type (might be due to invalid IL or missing references)
21163 //IL_0404: Unknown result type (might be due to invalid IL or missing references)
21164 //IL_040a: Unknown result type (might be due to invalid IL or missing references)
21165 //IL_040b: Unknown result type (might be due to invalid IL or missing references)
21166 //IL_0420: Unknown result type (might be due to invalid IL or missing references)
21167 //IL_0425: Unknown result type (might be due to invalid IL or missing references)
21168 float num = (float)Math.PI / 2f;
21169 bool flag = true;
21170 if (type == 976)
21171 {
21172 flag = false;
21173 }
21174 if (flag)
21175 {
21176 alpha -= 10;
21177 int num2 = 100;
21178 if (alpha < num2)
21179 {
21180 alpha = num2;
21181 }
21182 }
21183 if (soundDelay == 0)
21184 {
21185 if (type == 977)
21186 {
21187 soundDelay = -1;
21189 }
21190 else if (type == 976)
21191 {
21192 soundDelay = -1;
21193 }
21194 else
21195 {
21196 soundDelay = 20 + Main.rand.Next(40);
21198 }
21199 }
21200 if (ai[0] != 0f)
21201 {
21202 if (type == 976)
21203 {
21204 velocity = velocity.RotatedBy(ai[0]);
21205 }
21206 else
21207 {
21208 int num3 = 10 * MaxUpdates;
21209 velocity = velocity.RotatedBy(ai[0] / (float)num3);
21210 }
21211 }
21212 if (type == 977)
21213 {
21214 velocity *= 0.96f;
21215 if (Main.rand.Next(8) == 0)
21216 {
21217 Dust dust = Dust.NewDustDirect(base.Center, 0, 0, 172, velocity.X * 0.1f, velocity.Y * 0.1f, 100, default(Color), 0.9f);
21218 dust.noGravity = true;
21219 dust.position = base.Center;
21220 dust.velocity = Main.rand.NextVector2Circular(1f, 1f) + velocity * 0.5f;
21221 }
21222 }
21223 if (type == 976)
21224 {
21225 if (Collision.LavaCollision(position, width, height))
21226 {
21227 Kill();
21228 return;
21229 }
21230 if (++frameCounter >= 2)
21231 {
21232 frameCounter = 0;
21233 if (++frame >= 7)
21234 {
21235 frame = 0;
21236 }
21237 }
21238 float fromValue = 60 - timeLeft;
21239 float fromMax = ai[1] + 20f;
21240 float num4 = Utils.Remap(fromValue, ai[1], fromMax, 0f, 1f) * Utils.Remap(fromValue, ai[1], ai[1] + 60f, 1f, 0f);
21241 velocity = velocity.SafeNormalize(Vector2.UnitY) * (4f + 12f * (1f - num4));
21242 Opacity = Utils.Remap(fromValue, 0f, 10f, 0f, 1f) * Utils.Remap(fromValue, 30f, 60f, 1f, 0f);
21243 num = 0f;
21244 if (Main.rand.Next(3) == 0)
21245 {
21246 Dust dust2 = Dust.NewDustDirect(position, width, height, 40, 0f, 0f, 0, default(Color), 1.2f);
21247 dust2.noGravity = true;
21248 dust2.velocity = velocity * 0.5f;
21249 }
21250 if (localAI[1] == 0f)
21251 {
21252 localAI[1] = 1f;
21253 for (int i = 0; i < 10; i++)
21254 {
21255 Dust.NewDustDirect(position, width, height, 40, 0f, 0f, 0, default(Color), 0.7f).velocity = velocity.SafeNormalize(Vector2.UnitY).RotatedBy(Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.25f) * (Main.rand.NextFloat() * 3f);
21256 }
21257 }
21258 }
21259 rotation = velocity.ToRotation() + num;
21260 tileCollide = false;
21261 }
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
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 Item1
Definition SoundID.cs:679
static readonly SoundStyle Item9
Definition SoundID.cs:695
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...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

References Terraria.Projectile.ai, Terraria.Projectile.alpha, Terraria.Projectile.frame, Terraria.Projectile.frameCounter, Terraria.Entity.height, Terraria.ID.SoundID.Item1, Terraria.ID.SoundID.Item9, Terraria.Projectile.Kill(), Terraria.Collision.LavaCollision(), Terraria.Projectile.localAI, Terraria.Projectile.MaxUpdates, Terraria.Dust.NewDustDirect(), Terraria.Projectile.Opacity, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Utils.Remap(), Terraria.Projectile.rotation, Terraria.Projectile.soundDelay, Terraria.Projectile.tileCollide, Terraria.Projectile.timeLeft, Terraria.Projectile.type, Terraria.Entity.velocity, and Terraria.Entity.width.

+ Here is the call graph for this function: