108599 {
108600
108601
108602
108603
108605 {
108606 return;
108607 }
108610 {
108612 {
108614 }
108616 }
108618 {
108620 {
108622 }
108624 }
108626 {
108628 {
108630 }
108633 {
108635 }
108636 }
108638 {
108640 {
108642 }
108645 {
108647 }
108648 }
108650 {
108652 {
108654 }
108657 {
108659 }
108660 }
108662 {
108664 {
108666 }
108669 {
108671 }
108672 }
108674 {
108676 {
108678 }
108681 {
108683 }
108684 }
108686 {
108688 {
108690 }
108693 {
108695 }
108696 }
108698 {
108700 {
108702 }
108705 {
108707 }
108708 }
108710 {
108712 {
108714 }
108717 for (int i = 0; i < 1000; i++)
108718 {
108719 if (Main.projectile[i].active && Main.projectile[i].type == 598 && Main.projectile[i].ai[0] == 1
f && Main.projectile[i].ai[1] == (
float)
whoAmI)
108720 {
108722 }
108723 }
108726 {
108728 }
108729 }
108731 {
108733 {
108735 }
108738 for (
int j = 0;
j < 1000;
j++)
108739 {
108740 if (Main.projectile[
j].active && Main.projectile[
j].type == 971 && Main.projectile[
j].ai[0] == 1
f && Main.projectile[
j].ai[1] == (
float)
whoAmI)
108741 {
108743 }
108744 }
108747 {
108749 }
108750 }
108752 {
108754 {
108756 }
108759 for (
int k = 0;
k < 1000;
k++)
108760 {
108761 if (Main.projectile[
k].active && Main.projectile[
k].type == 975 && Main.projectile[
k].ai[0] == 1
f && Main.projectile[
k].ai[1] == (
float)
whoAmI)
108762 {
108764 }
108765 }
108768 {
108770 }
108771 }
108773 {
108775 {
108777 }
108780 for (
int l = 0;
l < 1000;
l++)
108781 {
108782 if (Main.projectile[
l].active && Main.projectile[
l].type == 636 && Main.projectile[
l].ai[0] == 1
f && Main.projectile[
l].ai[1] == (
float)
whoAmI)
108783 {
108785 }
108786 }
108788 {
108790 }
108793 {
108795 }
108796 }
108798 {
108800 {
108802 }
108804 for (
int m = 0;
m < 1000;
m++)
108805 {
108806 if (Main.projectile[
m].active && Main.projectile[
m].type == 614 && Main.projectile[
m].ai[0] == 1
f && Main.projectile[
m].ai[1] == (
float)
whoAmI)
108807 {
108809 }
108810 }
108813 {
108815 }
108816 }
108818 {
108822 {
108824 }
108826 {
108828 }
108830 {
108832 }
108834 {
108836 }
108838 {
108840 }
108841 if (Main.hardMode)
108842 {
108844 }
108846 {
108848 }
108850 {
108852 }
108854 {
108856 }
108858 {
108860 }
108862 {
108864 }
108866 {
108868 }
108869 if (Main.expertMode)
108870 {
108871 num4 *= Main.GameModeInfo.TownNPCDamageMultiplier;
108872 }
108876 {
108878 }
108879 }
108881 {
108883 {
108885 }
108888 {
108890 }
108891 }
108894 {
108896 }
108899 {
108902 {
108904 {
108906 }
108908 {
108910 }
108911 }
108912 }
108914 {
108916 {
108920 {
108922 }
108923 if (!Main.npc[
num5].immortal)
108924 {
108926 }
108928 if (Main.npc[
num5].life > 0 || Main.npc[
num5].immortal)
108929 {
108930 continue;
108931 }
108932 Main.npc[
num5].life = 1;
108933 if (Main.netMode != 1)
108934 {
108935 Main.npc[
num5].StrikeNPCNoInteraction(9999, 0
f, 0);
108936 if (Main.netMode == 2)
108937 {
108938 NetMessage.SendData(28, -1, -1,
null,
num5, 9999
f);
108939 }
108940 }
108941 }
108942 return;
108943 }
108945 {
108949 {
108951 }
108952 if (!Main.npc[
num6].immortal)
108953 {
108954 Main.npc[
num6].life--;
108955 }
108957 if (Main.npc[
num6].life > 0 || Main.npc[
num6].immortal)
108958 {
108959 continue;
108960 }
108961 Main.npc[
num6].life = 1;
108962 if (Main.netMode != 1)
108963 {
108964 Main.npc[
num6].StrikeNPCNoInteraction(9999, 0
f, 0);
108965 if (Main.netMode == 2)
108966 {
108967 NetMessage.SendData(28, -1, -1,
null,
num6, 9999
f);
108968 }
108969 }
108970 }
108971 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
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.
static void UpdateLifeRegen(NPC npc, ref int damage)
This serves as the central class from which NPC-related functions are carried out....
static bool downedMechBoss2
Denotes whether or not the Twins have been defeated at least once in the current world.
static bool downedBoss2
Denotes whether or not the Eater of Worlds OR the Brain of Cthulhu have been defeated at least once i...
int lifeMax
The maximum life of this NPC.
int lifeRegenExpectedLossPerSecond
static bool downedBoss1
Denotes whether or not the Eye of Cthulhu has been defeated at least once in the current world.
static bool downedMechBoss3
Denotes whether or not Skeletron Prime has been defeated at least once in the current world.
static bool downedQueenBee
Denotes whether or not at least one Queen Bee has been defeated in the current world.
static bool downedGolemBoss
Denotes whether or not Golem has been defeated at least once in the current world.
static bool downedAncientCultist
Denotes whether or not the Lunatic Cultist has been defeated at least once in the current world.
static bool downedBoss3
Denotes whether or not Skeletron has been defeated at least once in the current world.
int life
The current life of the NPC. Automatically set to the value of F:Terraria.NPC.lifeMax at the end of S...
static bool downedPlantBoss
Denotes whether or not Plantera has been defeated at least once in the current world.
int realLife
Stores the index (the F:Terraria.Entity.whoAmI) of a single NPC. This NPC will then share a health po...
static bool downedMechBoss1
Denotes whether or not the Destroyer has been defeated at least once in the current world.