74830 {
74831
74832
74833
74834
74835
74836
74837
74838
74839
74840
74841
74842
74843
74844
74845
74846
74847
74848
74849
74850
74851
74852
74853
74854
74855
74856
74857
74858
74859
74860
74861
74862
74863
74864
74865
74866
74867
74868
74869
74870
74871
74872
74873
74874
74875
74876
74877
74878
74879
74880
74881
74882
74883
74884
74885
74886
74887
74888
74889
74890
74891
74892
74893
74894
74895
74896
74897
74898
74899
74900
74901
74902
74903
74904
74905
74906
74907
74908
74909
74910
74911
74912
74913
74914
74915
74916
74917
74918
74919
74920
74921
74922
74923
74924
74925
74926
74927
74928
74929
74930
74931
74932
74933
74934
74935
74936
74937
74938
74939
74940
74941
74942
74943
74944
74945
74957 {
74958 case 663:
74959 {
74960 Lighting.AddLight(
base.Center,
new Vector3(0.4
f, 0.2
f, 0.1
f));
74961 Lighting.AddLight(
base.Bottom +
new Vector2(0
f, -10
f),
new Vector3(0.4
f, 0.2
f, 0.1
f));
74964 {
74966 }
74967 Rectangle
r3 =
default(Rectangle);
74970 {
74972 }
74973 for (
int m = 0;
m < 1;
m++)
74974 {
74975 if (Main.rand.Next(2) == 0)
74976 {
74977 Dust
dust3 = Dust.NewDustDirect(
r3.TopLeft() +
new Vector2(-2
f, -2
f), r3.Width + 4, r3.Height + 4, 270, -
direction * 2, -2
f, 200,
new Color(255, 255, 255, 0));
74978 dust3.fadeIn = 0.6f + Main.rand.NextFloat() * 0.6f;
74979 dust3.scale = 0.4f;
74980 dust3.noGravity = true;
74981 dust3.noLight = true;
74982 dust3.velocity = Vector2.Zero;
74983 dust3.velocity.X = (float)(-
direction) * Main.rand.NextFloat() *
dust3.fadeIn;
74984 }
74985 }
74988 {
74990 }
74993 for (
int n = 0;
n < 1;
n++)
74994 {
74995 if (Main.rand.Next(5) == 0)
74996 {
74997 Dust
dust6 = Dust.NewDustDirect(
r3.TopLeft(),
r3.Width,
r3.Height, 6);
75000 dust6.noGravity = true;
75001 dust6.noLight = true;
75002 dust6.velocity *= 2
f;
75003 }
75004 }
75005 break;
75006 }
75007 case 665:
75008 {
75009 Lighting.AddLight(
base.Center,
new Vector3(0.4
f, 0.2
f, 0.1
f) * 1.2f);
75010 Lighting.AddLight(
base.Bottom +
new Vector2(0
f, -10
f),
new Vector3(0.4
f, 0.2
f, 0.1
f) * 1.2f);
75017 {
75019 }
75020 Rectangle
r2 =
default(Rectangle);
75023 {
75025 }
75026 for (
int k = 0;
k < 1;
k++)
75027 {
75028 if (Main.rand.Next(2) == 0)
75029 {
75030 Dust
dust2 = Dust.NewDustDirect(
r2.TopLeft() +
new Vector2(-2
f, -2
f), r2.Width + 4, r2.Height + 4, 270, -
direction * 2, -2
f, 200,
new Color(255, 255, 255, 0));
75031 dust2.fadeIn = 0.6f + Main.rand.NextFloat() * 0.6f;
75032 dust2.scale = 0.4f;
75033 dust2.noGravity = true;
75034 dust2.noLight = true;
75035 dust2.velocity = Vector2.Zero;
75036 dust2.velocity.X = (float)(-
direction) * Main.rand.NextFloat() *
dust2.fadeIn;
75037 }
75038 }
75041 {
75043 }
75046 for (
int l = 0;
l < 2;
l++)
75047 {
75048 if (Main.rand.Next(5) == 0)
75049 {
75050 Dust
dust5 = Dust.NewDustDirect(
r2.TopLeft(),
r2.Width,
r2.Height, 6);
75053 dust5.noGravity = true;
75054 dust5.noLight = true;
75055 dust5.velocity *= 2
f;
75056 }
75057 }
75058 break;
75059 }
75060 case 667:
75061 {
75062 Lighting.AddLight(
base.Center,
new Vector3(0.4
f, 0.2
f, 0.1
f) * 1.5f);
75063 Lighting.AddLight(
base.Bottom +
new Vector2(0
f, -10
f),
new Vector3(0.4
f, 0.2
f, 0.1
f) * 1.5f);
75070 {
75072 }
75073 Rectangle
r =
default(Rectangle);
75076 {
75078 }
75079 for (int i = 0; i < 1; i++)
75080 {
75081 if (Main.rand.Next(2) == 0)
75082 {
75083 Dust dust = Dust.NewDustDirect(
r.TopLeft() +
new Vector2(-2
f, -2
f), r.Width + 4, r.Height + 4, 270, -
direction * 2, -2
f, 200,
new Color(255, 255, 255, 0));
75084 dust.fadeIn = 0.6f + Main.rand.NextFloat() * 0.6f;
75085 dust.scale = 0.4f;
75086 dust.noGravity = true;
75087 dust.noLight = true;
75088 dust.velocity = Vector2.Zero;
75089 dust.velocity.X = (float)(-
direction) * Main.rand.NextFloat() * dust.fadeIn;
75090 }
75091 }
75094 {
75096 }
75099 for (
int j = 0;
j < 3;
j++)
75100 {
75101 if (Main.rand.Next(5) == 0)
75102 {
75103 Dust
dust4 = Dust.NewDustDirect(
r.TopLeft(),
r.Width,
r.Height, 6);
75104 dust4.fadeIn = 1.1f;
75106 dust4.noGravity = true;
75107 dust4.noLight = true;
75108 dust4.velocity *= 2.4f;
75109 }
75110 }
75111 break;
75112 }
75113 }
75114 if (Main.player[
owner].setApprenticeT2)
75115 {
75119 }
75121 {
75126 }
75128 {
75132 {
75134 }
75135 else
75136 {
75138 }
75140 {
75143 {
75148 }
75149 }
75150 }
75151 else if (
ai[0] == 2
f)
75152 {
75154 if (
ai[1] == (
float)
num4)
75155 {
75156 Vector2
vector2 =
default(Vector2);
75160 {
75162 }
75164 if (
owner == Main.myPlayer)
75165 {
75167 }
75168 }
75170 {
75173 }
75174 }
75177 velocity.Y += 0.2f;
75178 }
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
Vector2 DirectionTo(Vector2 Destination)
int height
The height of this Entity's hitbox, in pixels.
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....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
int AI_130_FlameBurstTower_FindTarget(float shot_range, float angleRatioMax, Vector2 shootingSpot, bool canChangeDirection=true)
IEntitySource GetProjectileSource_FromThis()
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....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
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:...
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...