Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateLunarApocalypse()

static void Terraria.WorldGen.UpdateLunarApocalypse ( )
inlinestatic

Definition at line 76747 of file WorldGen.cs.

76748 {
76749 if (!NPC.LunarApocalypseIsUp)
76750 {
76751 return;
76752 }
76753 bool flag = false;
76754 bool flag2 = false;
76755 bool flag3 = false;
76756 bool flag4 = false;
76757 bool flag5 = false;
76758 for (int i = 0; i < 200; i++)
76759 {
76760 if (Main.npc[i].active)
76761 {
76762 switch (Main.npc[i].type)
76763 {
76764 case 398:
76765 flag = true;
76766 break;
76767 case 517:
76768 flag2 = true;
76769 break;
76770 case 422:
76771 flag3 = true;
76772 break;
76773 case 507:
76774 flag4 = true;
76775 break;
76776 case 493:
76777 flag5 = true;
76778 break;
76779 }
76780 }
76781 }
76782 if (!flag2)
76783 {
76784 NPC.TowerActiveSolar = false;
76785 }
76786 if (!flag3)
76787 {
76788 NPC.TowerActiveVortex = false;
76789 }
76790 if (!flag4)
76791 {
76792 NPC.TowerActiveNebula = false;
76793 }
76794 if (!flag5)
76795 {
76796 NPC.TowerActiveStardust = false;
76797 }
76798 if (!NPC.TowerActiveSolar && !NPC.TowerActiveVortex && !NPC.TowerActiveNebula && !NPC.TowerActiveStardust && !flag)
76799 {
76800 StartImpendingDoom(3600);
76801 }
76802 }
static void StartImpendingDoom(int countdownTime)

References Terraria.NPC.LunarApocalypseIsUp, Terraria.Main.npc, Terraria.NPC.TowerActiveNebula, Terraria.NPC.TowerActiveSolar, Terraria.NPC.TowerActiveStardust, and Terraria.NPC.TowerActiveVortex.

Referenced by Terraria.NPC.DoDeathEvents().