Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
66e28dd715
6 files changed
+20
-18
No files matched your search
@@ -45,8 +45,7 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
for (int doom = 0; doom < 200; doom++)
|
||||
{
|
||||
if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType<SlimeGodRun>() ||
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0 ||
|
||||
Main.npc[doom].type == NPCID.TheDestroyerBody || Main.npc[doom].type == NPCID.TheDestroyerTail)
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
|
||||
{
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to change the rules."), 1000.0, 0, false);
|
||||
Main.npc[doom].active = false;
|
||||
|
||||
@@ -52,8 +52,7 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
for (int doom = 0; doom < 200; doom++)
|
||||
{
|
||||
if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType<SlimeGodRun>() ||
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0 ||
|
||||
Main.npc[doom].type == NPCID.TheDestroyerBody || Main.npc[doom].type == NPCID.TheDestroyerTail)
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
|
||||
{
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to change the rules."), 1000.0, 0, false);
|
||||
Main.npc[doom].active = false;
|
||||
|
||||
@@ -46,8 +46,7 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
for (int doom = 0; doom < 200; doom++)
|
||||
{
|
||||
if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType<SlimeGodRun>() ||
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0 ||
|
||||
Main.npc[doom].type == NPCID.TheDestroyerBody || Main.npc[doom].type == NPCID.TheDestroyerTail)
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
|
||||
{
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to change the rules."), 1000.0, 0, false);
|
||||
Main.npc[doom].active = false;
|
||||
|
||||
@@ -47,8 +47,7 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
for (int doom = 0; doom < 200; doom++)
|
||||
{
|
||||
if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType<SlimeGodRun>() ||
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0 ||
|
||||
Main.npc[doom].type == NPCID.TheDestroyerBody || Main.npc[doom].type == NPCID.TheDestroyerTail)
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
|
||||
{
|
||||
player.KillMeForGood();
|
||||
Main.npc[doom].active = false;
|
||||
|
||||
@@ -60,8 +60,7 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
for (int doom = 0; doom < 200; doom++)
|
||||
{
|
||||
if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType<SlimeGodRun>() ||
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0 ||
|
||||
Main.npc[doom].type == NPCID.TheDestroyerBody || Main.npc[doom].type == NPCID.TheDestroyerTail)
|
||||
Main.npc[doom].type == ModContent.NPCType<SlimeGodRunSplit>() || Main.npc[doom].type == ModContent.NPCType<SlimeGod>() || Main.npc[doom].type == ModContent.NPCType<SlimeGodSplit>())) || CalamityWorld.DoGSecondStageCountdown > 0)
|
||||
{
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to change the rules."), 1000.0, 0, false);
|
||||
Main.npc[doom].active = false;
|
||||
|
||||
@@ -4260,20 +4260,27 @@ namespace CalamityMod.NPCs
|
||||
// Check if other segments are still alive, if not, die
|
||||
if (npc.type > NPCID.TheDestroyer)
|
||||
{
|
||||
bool flag = false;
|
||||
if (npc.ai[1] <= 0f)
|
||||
flag = true;
|
||||
else if (Main.npc[(int)npc.ai[1]].life <= 0)
|
||||
flag = true;
|
||||
|
||||
if (flag)
|
||||
bool shouldDespawn = true;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type == NPCID.TheDestroyer)
|
||||
shouldDespawn = false;
|
||||
}
|
||||
if (!shouldDespawn)
|
||||
{
|
||||
if (npc.ai[1] > 0f)
|
||||
shouldDespawn = false;
|
||||
else if (Main.npc[(int)npc.ai[1]].life > 0)
|
||||
shouldDespawn = false;
|
||||
}
|
||||
if (shouldDespawn)
|
||||
{
|
||||
npc.life = 0;
|
||||
npc.HitEffect(0, 10.0);
|
||||
npc.checkDead();
|
||||
npc.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.type == NPCID.TheDestroyerBody)
|
||||
{
|
||||
// Gain more defense as health lowers with a max of 30, lose defense if probe has been launched
|
||||
|
||||
Reference in new issue
Block a user