42118 {
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153 if (!Main.npc[(
int)
ai[1]].active || Main.npc[(
int)
ai[1]].type != 20 || Main.npc[(
int)
ai[1]].ai[0] != 14
f)
42154 {
42156 return;
42157 }
42162 {
42164 }
42168 {
42170 }
42172 {
42174 }
42176 {
42180 }
42183 {
42185 if (Main.rand.NextFloat() <
num3)
42186 {
42188 }
42189 }
42190 if (Main.rand.Next(4) == 0)
42191 {
42193 Vector2
vector =
default(Vector2);
42194 ((Vector2)(
ref vector)).
_002Ector((
float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11));
42195 float num5 = Main.rand.Next(3, 9);
42198 Main.dust[
num6].noGravity =
true;
42200 if (Main.rand.Next(8) == 0)
42201 {
42203 Main.dust[
num6].scale += 0.5f;
42204 }
42205 else
42206 {
42208 }
42209 }
42210 if (Main.rand.Next(2) == 0)
42211 {
42212 Vector2
vector2 =
default(Vector2);
42213 ((Vector2)(
ref vector2)).
_002Ector((
float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11));
42214 float num7 = Main.rand.Next(3, 9);
42217 Main.dust[
num8].noGravity =
true;
42218 Main.dust[
num8].position = base.Center +
vector2 * 30
f;
42219 if (Main.rand.Next(8) == 0)
42220 {
42222 Main.dust[
num8].scale += 0.5f;
42223 }
42224 else
42225 {
42227 }
42228 }
42229 if (
ai[0] >= 30
f && Main.netMode != 2)
42230 {
42231 Player player = Main.player[Main.myPlayer];
42232 if (player.active && !player.dead &&
Distance(player.Center) <=
num && player.FindBuffIndex(165) == -1)
42233 {
42234 player.AddBuff(165, 120);
42235 }
42236 }
42237 if (
ai[0] >= 30
f &&
ai[0] % 10
f == 0
f && Main.netMode != 1)
42238 {
42239 for (int i = 0; i < 200; i++)
42240 {
42243 {
42244 if (
nPC.townNPC && (
nPC.FindBuffIndex(165) == -1 ||
nPC.buffTime[
nPC.FindBuffIndex(165)] <= 20))
42245 {
42246 nPC.AddBuff(165, 120);
42247 }
42248 else if (!
nPC.friendly &&
nPC.lifeMax > 5 && !
nPC.dontTakeDamage && (
nPC.FindBuffIndex(186) == -1 ||
nPC.buffTime[
nPC.FindBuffIndex(186)] <= 20) && (
nPC.dryadBane || Collision.CanHit(
base.Center, 1, 1,
nPC.position,
nPC.width,
nPC.height)))
42249 {
42250 nPC.AddBuff(186, 120);
42251 }
42252 }
42253 }
42254 }
42256 {
42258 }
42259 }
float Distance(Vector2 Other)
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
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 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....