65733 {
65734
65735
65736
65737
65738
65739
65740
65741
65742
65743
65744
65745
65746
65747
65748
65749
65750
65751
65752
65753
65754
65755
65756
65757
65758
65759
65760
65761
65762
65763
65764
65765
65766
65767
65768
65769
65770
65771
65772
65773
65774
65775
65776
65777
65778
65779
65780
65781
65782
65783
65784
65785
65786
65787
65788
65789
65790
65791
65792
65793
65794
65795
65796
65797
65798
65799
65800
65801
65802
65803
65804
65805
65806
65807
65808
65809
65810
65811
65812
65813
65814
65815
65816
65817
65818
65819
65820
65821
65822
65823
65824
65825
65826
65827
65828
65829
65830
65831
65832
65833
65834
65835
65836
65837
65838
65839
65840
65841
65842
65843
65844
65845
65846
65847
65848
65849
65850
65851
65852
65853
65854
65855
65856
65857
65858
65859
65860
65861
65862
65863
65864
65865
65866
65867
65868
65869
65870
65871
65872
65873
65874
65875
65876
65877
65878
65879
65880
65881
65882
65883
65884
65885
65886
65887
65888
65889
65890
65891
65892
65893
65894
65895
65896
65897
65898
65899
65900
65901
65902
65903
65904
65905
65906
65907
65908
65909
65910
65911
65912
65913
65914
65922 float num44 = 0.45f;
65923 float num45 = 7.5f;
65932 float num8 = 1500
f;
65935 float amount = 1
f / 30
f;
65944 float num20 = 0.1f;
65950 {
65952 {
65957 }
65958 }
65959 else if (
ai[0] == 1
f)
65960 {
65962 {
65963 ai[2] = ((base.Center.X <
targetData.Center.X) ? 1 : (-1));
65964 }
65965 Vector2
destination = targetData.Center +
new Vector2((0
f -
ai[2]) * 300
f, -200
f);
65971 {
65973 if (
ai[3] == 5
f && Main.rand.Next(3) == 0)
65974 {
65976 }
65977 switch ((
int)
ai[3])
65978 {
65979 case 0:
65980 case 1:
65981 case 3:
65983 break;
65984 case 2:
65986 break;
65987 case 4:
65989 break;
65990 case 5:
65992 break;
65993 case 6:
65995 break;
65996 case 7:
65998 break;
65999 }
66006 {
66008 }
66010 {
66011 case 2:
66012 {
66017 {
66019 }
66021 break;
66022 }
66023 case 3:
66024 {
66025 Vector2
vector3 =
default(Vector2);
66029 break;
66030 }
66031 case 5:
66032 {
66037 {
66039 }
66041 break;
66042 }
66043 }
66044 }
66045 }
66046 else if (
ai[0] == 2
f)
66047 {
66049 {
66051 }
66053 {
66057 }
66058 }
66059 else if (
ai[0] == 3
f)
66060 {
66063 {
66064 activeSound.Position =
base.Center;
66065 }
66070 {
66071 Vector2
vector4 = targetData.Center +
new Vector2((
float)
num27 * (0
f -
num3), -250
f);
66074 {
66076 }
66077 else
66078 {
66080 }
66082 {
66084 }
66086 }
66088 {
66089 int num28 = ((targetData.Center.X >
base.Center.X) ? 1 : (-1));
66092 if (Main.netMode != 1)
66093 {
66095 }
66097 }
66099 {
66102 {
66104 }
66105 }
66107 {
66111 }
66112 }
66113 else if (
ai[0] == 4
f)
66114 {
66118 {
66119 Vector2
vector6 = targetData.Center +
new Vector2((
float)
num29 * (0
f -
num8), -350
f);
66125 {
66127 }
66129 }
66131 {
66133 v.Y *= 0.25f;
66134 v = v.SafeNormalize(Vector2.UnitX * (
float)
direction);
66138 {
66140 }
66142 }
66143 else
66144 {
66148 {
66150 }
66155 {
66157 }
66158 }
66160 {
66161 velocity.Y -= 0.1f;
66162 }
66165 {
66169 }
66170 }
66171 else if (
ai[0] == 5
f)
66172 {
66174 position.Y -=
num20;
66179 {
66181 }
66183 {
66188 }
66189 }
66190 else if (
ai[0] == 6
f)
66191 {
66193 {
66194 Vector2
destination2 = targetData.Center +
new Vector2(0
f, -200
f);
66201 {
66204 }
66205 }
66206 else
66207 {
66209 {
66211 }
66213 {
66215 }
66216 else
66217 {
66219 }
66221 {
66223 {
66225 }
66227 }
66229 if (
ai[1] == 20
f ||
ai[1] == 25
f ||
ai[1] == 30
f)
66230 {
66231 Point point =
base.Center.ToTileCoordinates();
66235 for (
int i = point.X -
num35; i <= point.X +
num35; i++)
66236 {
66238 for (
int j = point.Y -
num36 / 3;
j < point.Y +
num36;
j++)
66239 {
66243 {
66246 {
66248 obj.velocity.Y -= 3
f + (float)
num37 * 1.5
f;
66249 obj.velocity.Y *= Main.rand.NextFloat();
66250 obj.scale += (float)
num37 * 0.03
f;
66251 }
66252 for (
int l = 0;
l <
num38 - 1;
l++)
66253 {
66255 obj2.velocity.Y -= 1
f + (float)
num37;
66256 obj2.velocity.Y *= Main.rand.NextFloat();
66257 }
66258 if (
num38 > 0 && Main.rand.Next(3) != 0)
66259 {
66261 Gore gore = Gore.NewGoreDirect(
position, Vector2.Zero, 61 + Main.rand.Next(3), 1
f - (float)
num37 * 0.15
f +
num39 * 0.5
f);
66263 gore.velocity.Y *= Main.rand.NextFloat();
66264 gore.position =
new Vector2((
float)(i * 16 + 20), (
float)(
j * 16 + 20));
66265 }
66266 }
66268 }
66269 }
66270 }
66273 {
66275 }
66276 if (
flag3 && Main.netMode != 1)
66277 {
66278 for (
int m = 0;
m < 1;
m++)
66279 {
66280 Vector2
vector8 = base.Center + ((float)
Math.PI * 2
f * Main.rand.NextFloat()).ToRotationVector2() *
new Vector2(2
f, 1
f) * 300
f * (0.6f + Main.rand.NextFloat() * 0.4f);
66282 {
66286 }
66287 }
66289 for (
int n = 0;
n < 200;
n++)
66290 {
66292 if (
nPC.active &&
nPC.type == 549)
66293 {
66295 }
66296 }
66297 if (list.Count > 0)
66298 {
66300 {
66301 NPC nPC2 = list[Main.rand.Next(list.Count)];
66305 }
66306 }
66307 }
66309 }
66311 {
66315 }
66316 }
66319 {
66321 }
66323 {
66325 }
66327 {
66329 }
66331 float num42 = 0.04f;
66332 switch ((
int)
ai[0])
66333 {
66334 case 2:
66335 case 5:
66337 break;
66338 case 3:
66342 {
66344 }
66346 {
66349 }
66350 break;
66351 case 4:
66355 {
66357 }
66358 break;
66359 case 6:
66363 {
66365 }
66366 break;
66367 }
66369 {
66371 }
66373 {
66375 }
66377 {
66379 }
66380 }
static ? ActiveSound GetActiveSound(SlotId slotId)
static SlotId PlayTrackedSound(in SoundStyle style, Vector2? position=null)
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
float Distance(Vector2 Other)
Vector2 position
The position of this Entity in world coordinates.
Vector2 DirectionTo(Vector2 Destination)
static readonly SoundStyle DD2_BetsyFlyingCircleAttack
static readonly SoundStyle DD2_BetsyWindAttack
static readonly SoundStyle DD2_BetsySummon
static readonly SoundStyle DD2_BetsyFlameBreath
static readonly SoundStyle DD2_BetsyScream
static int CountNPCS(int Type)
Returns the number of active NPC in the world of the given NPC type (F:Terraria.NPC....
float[] localAI
Acts like F:Terraria.NPC.ai, but does not sync to the server. Many vanilla T:Terraria....
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
float value
How many copper coins the NPC will drop when killed (100 copper coins = 1 silver coin etc....
IEntitySource GetSpawnSourceForNPCFromNPCAI()
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
Spawns an NPC into the game world with the given type. This method should not be called on multipla...
IEntitySource GetSpawnSource_ForProjectile()
void SimpleFlyMovement(Vector2 desiredVelocity, float moveSpeed)
static void TargetClosestBetsy(NPC searcher, bool faceTarget=true, Vector2? checkPosition=null)