42829 {
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
42861
42862
42863
42864
42865
42866
42867
42868
42869
42870
42871
42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883
42884
42885
42886
42887
42888
42889
42890
42891
42892
42893
42894
42895
42896
42897
42898
42899
42900
42901
42902
42903
42904
42905
42906
42907
42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
42963
42964
42965
42966
42967
42968
42969
42970
42971
42972
42973
42974
42975
42976
42983 {
42988 }
42990 {
42992 }
42995 {
42997 }
42999 {
43001 }
43004 {
43007 return;
43008 }
43014 {
43017 {
43019 }
43021 {
43026 {
43030 {
43032 break;
43033 }
43034 }
43036 {
43038 }
43039 }
43046 float f =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.7f;
43047 Vector2
vector = base.Center +
f.ToRotationVector2() * 84
f *
scale;
43048 if (Main.rand.Next(5) == 0)
43049 {
43050 Dust
dust5 = Dust.NewDustPerfect(
vector, 14,
null, 150,
default(Color), 1.4f);
43051 dust5.noLight = (dust5.noLightEmittence = true);
43052 }
43053 for (
int i = 0; (float)i < 3
f *
Opacity; i++)
43054 {
43056 int num3 = ((Main.rand.NextFloat() <
Opacity) ? 75 : 27);
43058 dust6.noGravity = true;
43059 dust6.customData =
Opacity * 0.2f;
43060 }
43061 }
43063 {
43064 return;
43065 }
43068 {
43070 }
43077 {
43079 new Vector2(32
f, 32
f);
43082 {
43083 bool flag2 =
false;
43085 {
43089 {
43091 break;
43092 }
43093 }
43095 {
43097 }
43098 }
43100 {
43102 }
43104 {
43106 }
43107 }
43108 float num6 =
rotation + Main.rand.NextFloatDirection() * ((float)
Math.PI / 2
f) * 0.9f;
43110 (
num6 +
ai[0] * ((float)
Math.PI / 2
f)).ToRotationVector2();
43111 Color value = default(Color);
43113 Color
value2 =
default(Color);
43115 Lighting.AddLight(
base.Center +
rotation.ToRotationVector2() * 85
f *
scale, ((Color)(
ref value)).ToVector3());
43116 for (
int j = 0;
j < 3;
j++)
43117 {
43118 if (Main.rand.NextFloat() <
Opacity + 0.1f)
43119 {
43120 Color.Lerp(Color.Lerp(Color.Lerp(
value2, value, Utils.Remap(
fromValue, 0
f, 0.6f, 0
f, 1
f)), Color.White, Utils.Remap(
fromValue, 0.6f, 0.8f, 0
f, 0.5f)), Color.White, Main.rand.NextFloat() * 0.3f);
43122 dust3.scale *= 0.7f;
43123 dust3.velocity += player.velocity * 0.1f;
43124 dust3.position -= dust3.velocity * 6
f;
43125 }
43126 }
43128 {
43131 }
43133 {
43136 for (
int k = 0;
k < 4;
k++)
43137 {
43138 float num7 = Main.rand.NextFloatDirection();
43142 Color.Lerp(Color.Lerp(Color.Lerp(
value2, value, Utils.Remap(
fromValue, 0
f, 0.6f, 0
f, 1
f)), Color.White, Utils.Remap(
fromValue, 0.6f, 0.8f, 0
f, 0.5f)), Color.White, Main.rand.NextFloat() * 0.3f);
43143 Dust
dust4 = Dust.NewDustPerfect(
vector3, 107,
velocity.RotatedBy(
num7 * ((
float)Math.PI / 4
f)) * 0.2f * Main.rand.NextFloat(), 100,
default(Color), 1.4f *
num8);
43144 dust4.velocity += player.velocity * 0.1f;
43145 dust4.position -= dust4.velocity * Main.rand.NextFloat() * 3
f;
43146 }
43147 }
43148 }
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 Item8
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....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool ownerHitCheck
If true, then this projectile will only deal damage if its owner has line of sight to the hit....
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....