55519 {
55520
55521
55522
55523
55524
55525
55526
55527
55528
55529
55530
55531
55532
55533
55534
55535
55536
55537
55538
55539
55540
55541
55542
55543
55544
55545
55546 if ((
type == 170 ||
type == 171 ||
type == 180) && Main.rand.Next(1000) == 0)
55547 {
55549 }
55552 {
55554 {
55555 velocity.X = oldVelocity.X * -0.5f;
55557 {
55559 }
55561 {
55563 }
55564 }
55566 {
55567 velocity.Y = oldVelocity.Y * -0.5f;
55569 {
55571 }
55573 {
55575 }
55576 }
55577 }
55579 {
55583 {
55585 }
55588 {
55590 }
55591 }
55592 else
55593 {
55595 }
55597 {
55599 {
55601 {
55605 }
55606 }
55607 else if (
ai[1] == 0
f)
55608 {
55610 }
55612 {
55616 }
55618 {
55621 }
55622 else
55623 {
55627 }
55631 {
55632 velocity.X -= 0.08f;
55634 {
55635 velocity.X -= 0.04f;
55636 }
55638 {
55639 velocity.X -= 0.2f;
55640 }
55642 {
55644 }
55645 }
55647 {
55648 velocity.X += 0.08f;
55650 {
55651 velocity.X += 0.04f;
55652 }
55654 {
55655 velocity.X += 0.2f;
55656 }
55658 {
55660 }
55661 }
55663 {
55664 velocity.Y -= 0.1f;
55666 {
55667 velocity.Y -= 0.05f;
55668 }
55670 {
55671 velocity.Y -= 0.15f;
55672 }
55674 {
55675 velocity.Y = -2.5f;
55676 }
55677 }
55679 {
55680 velocity.Y += 0.1f;
55682 {
55683 velocity.Y += 0.05f;
55684 }
55686 {
55687 velocity.Y += 0.15f;
55688 }
55690 {
55691 velocity.Y = 2.5f;
55692 }
55693 }
55694 }
55695 else if (
type == 116)
55696 {
55700 {
55701 velocity.X -= 0.1f;
55703 {
55704 velocity.X -= 0.1f;
55705 }
55707 {
55708 velocity.X -= 0.2f;
55709 }
55711 {
55713 }
55714 }
55716 {
55717 velocity.X += 0.1f;
55719 {
55720 velocity.X += 0.1f;
55721 }
55723 {
55724 velocity.X += 0.2f;
55725 }
55727 {
55729 }
55730 }
55732 {
55733 velocity.Y -= 0.04f;
55735 {
55736 velocity.Y -= 0.05f;
55737 }
55739 {
55740 velocity.Y -= 0.15f;
55741 }
55743 {
55744 velocity.Y = -2.5f;
55745 }
55746 }
55748 {
55749 velocity.Y += 0.04f;
55751 {
55752 velocity.Y += 0.05f;
55753 }
55755 {
55756 velocity.Y += 0.15f;
55757 }
55759 {
55760 velocity.Y = 2.5f;
55761 }
55762 }
55763 if (Main.rand.Next(40) == 0)
55764 {
55767 Main.dust[
num].velocity.X *= 0.5f;
55768 Main.dust[
num].velocity.Y *= 0.1f;
55770 }
55771 }
55772 else if (
type == 133)
55773 {
55775 {
55777 {
55778 velocity.X -= 0.1f;
55780 {
55781 velocity.X -= 0.1f;
55782 }
55784 {
55785 velocity.X += 0.05f;
55786 }
55788 {
55790 }
55791 }
55793 {
55794 velocity.X += 0.1f;
55796 {
55797 velocity.X += 0.1f;
55798 }
55800 {
55801 velocity.X -= 0.05f;
55802 }
55804 {
55806 }
55807 }
55809 {
55810 velocity.Y -= 0.1f;
55812 {
55813 velocity.Y -= 0.1f;
55814 }
55816 {
55817 velocity.Y += 0.05f;
55818 }
55820 {
55822 }
55823 }
55825 {
55826 velocity.Y += 0.1f;
55828 {
55829 velocity.Y += 0.1f;
55830 }
55832 {
55833 velocity.Y -= 0.05f;
55834 }
55836 {
55838 }
55839 }
55840 }
55841 else
55842 {
55844 {
55845 velocity.X -= 0.1f;
55847 {
55848 velocity.X -= 0.1f;
55849 }
55851 {
55852 velocity.X += 0.05f;
55853 }
55855 {
55857 }
55858 }
55860 {
55861 velocity.X += 0.1f;
55863 {
55864 velocity.X += 0.1f;
55865 }
55867 {
55868 velocity.X -= 0.05f;
55869 }
55871 {
55873 }
55874 }
55876 {
55877 velocity.Y -= 0.04f;
55879 {
55880 velocity.Y -= 0.05f;
55881 }
55883 {
55884 velocity.Y += 0.03f;
55885 }
55887 {
55888 velocity.Y = -1.5f;
55889 }
55890 }
55892 {
55893 velocity.Y += 0.04f;
55895 {
55896 velocity.Y += 0.05f;
55897 }
55899 {
55900 velocity.Y -= 0.03f;
55901 }
55903 {
55904 velocity.Y = 1.5f;
55905 }
55906 }
55907 }
55908 }
55909 else
55910 {
55916 {
55917 velocity.X -= 0.1f;
55919 {
55920 velocity.X -= 0.1f;
55921 }
55923 {
55924 velocity.X += 0.05f;
55925 }
55927 {
55928 velocity.X = 0
f -
num2;
55929 }
55930 }
55932 {
55933 velocity.X += 0.1f;
55935 {
55936 velocity.X += 0.1f;
55937 }
55939 {
55940 velocity.X -= 0.05f;
55941 }
55943 {
55945 }
55946 }
55948 {
55949 velocity.Y -= 0.04f;
55951 {
55952 velocity.Y -= 0.05f;
55953 }
55955 {
55956 velocity.Y += 0.03f;
55957 }
55959 {
55960 velocity.Y = 0
f -
num3;
55961 }
55962 }
55964 {
55965 velocity.Y += 0.04f;
55967 {
55968 velocity.Y += 0.05f;
55969 }
55971 {
55972 velocity.Y -= 0.03f;
55973 }
55975 {
55977 }
55978 }
55979 }
55981 {
55984 Main.dust[
num4].velocity.X *= 0.5f;
55985 Main.dust[
num4].velocity.Y *= 0.1f;
55987 }
55989 {
55991 {
55992 velocity.Y *= 0.95f;
55993 }
55994 velocity.Y -= 0.5f;
55996 {
55998 }
56000 }
56001 }
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 ...
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
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.
void EncourageDespawn(int despawnTime)
int lifeMax
The maximum life of this NPC.
void TargetClosest(bool faceTarget=true)
bool noGravity
If true, the npc will not be affected by gravity. Demon Eyes and other floating npc use this....
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
float scale
Makes the NPC bigger or smaller. Bigger than 1f is bigger. Defaults to 1f.
static bool DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged(int npcID, Vector2 npcPosition, int target=255)
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
int alpha
0 is opaque, and 255 is transparent. Note that this is the opposite of how alpha is typically express...
bool noTileCollide
If true, the npc does not collide with tiles, making the npc pass through tiles freely....
int life
The current life of the NPC. Automatically set to the value of F:Terraria.NPC.lifeMax at the end of S...