43151 {
43152
43153
43154
43155
43156
43157
43158
43159
43160
43161
43162
43163
43164
43165
43166
43167
43168
43169
43170
43171
43172
43173
43174
43175
43176
43177
43178
43179
43180
43181
43182
43183
43184
43185
43186
43187
43188
43189
43190
43191
43192
43193
43194
43195
43196
43197
43198
43199
43200
43201
43202
43203
43204
43205
43206
43207
43208
43209
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43292 {
43295 {
43296 soundEffectInstance.Volume *= 0.65f;
43297 }
43298 }
43309 {
43310 case 982:
43312 break;
43313 case 997:
43315 break;
43316 case 983:
43319 break;
43320 case 984:
43322 break;
43323 }
43324 base.Center = player.RotatedRelativePoint(player.MountedCenter) -
velocity;
43327 {
43329 {
43334 }
43335 if (Main.rand.Next(2) == 0)
43336 {
43337 float f =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.7f;
43338 Vector2
vector = base.Center +
f.ToRotationVector2() * 84
f *
scale;
43339 if (Main.rand.Next(5) == 0)
43340 {
43341 Dust
dust7 = Dust.NewDustPerfect(
vector, 14,
null, 150,
default(Color), 1.4f);
43342 dust7.noLight = (dust7.noLightEmittence = true);
43343 }
43344 if (Main.rand.Next(2) == 0)
43345 {
43346 Dust.NewDustPerfect(
vector, 27, (Vector2?)
new Vector2(player.velocity.X * 0.2f + (
float)(player.direction * 3), player.velocity.Y * 0.2f), 100,
default(Color), 1.4f).noGravity =
true;
43347 }
43348 }
43349 }
43351 {
43352 float num10 =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.7f;
43355 if (Main.rand.NextFloat() * 2
f <
Opacity)
43356 {
43357 Dust
dust8 = Dust.NewDustPerfect(
base.Center +
num10.ToRotationVector2() * (Main.rand.NextFloat() * 80
f *
scale + 20
f *
scale), 278,
vector3 * 1
f, 100, Color.Lerp(Color.Gold, Color.White, Main.rand.NextFloat() * 0.3f), 0.4
f);
43358 dust8.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f;
43359 dust8.noGravity = true;
43360 }
43361 if (Main.rand.NextFloat() * 1.5f <
Opacity)
43362 {
43364 }
43365 }
43367 {
43368 float num11 =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.7f;
43369 _ = base.Center +
num11.ToRotationVector2() * 84
f *
scale;
43371 if (Main.rand.NextFloat() * 2
f <
Opacity)
43372 {
43373 Dust
dust9 = Dust.NewDustPerfect(
base.Center +
num11.ToRotationVector2() * (Main.rand.NextFloat() * 80
f *
scale + 20
f *
scale), 6,
vector4 * 4
f, 0,
default(Color), 0.4f);
43374 dust9.noGravity = true;
43375 dust9.scale = 1.4f;
43376 }
43377 }
43379 {
43380 float num2 =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.7f;
43383 if (Main.rand.NextFloat() <
Opacity)
43384 {
43385 Dust
dust10 = Dust.NewDustPerfect(
base.Center +
num2.ToRotationVector2() * (Main.rand.NextFloat() * 80
f *
scale + 20
f *
scale), 278,
vector6 * 1
f, 100, Color.Lerp(Color.HotPink, Color.White, Main.rand.NextFloat() * 0.3f), 0.4
f);
43386 dust10.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f;
43387 dust10.noGravity = true;
43388 }
43389 if (Main.rand.NextFloat() * 1.5f <
Opacity)
43390 {
43392 }
43393 }
43395 {
43396 float num3 =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.7f;
43399 Color value = default(Color);
43401 Color
value2 =
default(Color);
43403 Lighting.AddLight(
base.Center, ((Color)(
ref value2)).ToVector3());
43404 if (Main.rand.NextFloat() * 2
f <
Opacity)
43405 {
43407 value3 = Color.Lerp(
value3, Color.White, Utils.Remap(
num, 0.6f, 0.8f, 0
f, 0.5f));
43408 Dust
dust11 = Dust.NewDustPerfect(
base.Center +
num3.ToRotationVector2() * (Main.rand.NextFloat() * 80
f *
scale + 20
f *
scale), 278,
vector8 * 1
f, 100, Color.Lerp(
value3, Color.White, Main.rand.NextFloat() * 0.3f), 0.4
f);
43409 dust11.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f;
43410 dust11.noGravity = true;
43411 }
43412 if (Main.rand.NextFloat() <
Opacity)
43413 {
43414 Color.Lerp(Color.Lerp(Color.Lerp(
value2, value, Utils.Remap(
num, 0
f, 0.6f, 0
f, 1
f)), Color.White, Utils.Remap(
num, 0.6f, 0.8f, 0
f, 0.5f)), Color.White, Main.rand.NextFloat() * 0.3f);
43416 dust6.velocity += player.velocity * 0.1f;
43417 dust6.velocity +=
new Vector2((
float)player.direction, 0
f);
43418 dust6.position -= dust6.velocity * 6
f;
43419 }
43420 }
43423 {
43425 }
43426 }
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.
Vector2 position
The position of this Entity in world coordinates.
static readonly SoundStyle Item60
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
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....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....
This data type describes in detail how a sound should be played. Passable to the M:Terraria....