guardians now work in remix
This commit is contained in:
1 parent
f617a8c127
commit
60b87ace2b
4 files changed
+23
-24
No files matched your search
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return !NPC.AnyNPCs(ModContent.NPCType<ProfanedGuardianCommander>()) && (Main.dayTime || Main.zenithWorld) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive;
|
||||
return !NPC.AnyNPCs(ModContent.NPCType<ProfanedGuardianCommander>()) && (Main.dayTime || Main.remixWorld) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive;
|
||||
}
|
||||
|
||||
public override bool? UseItem(Player player)
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
Player player = Main.LocalPlayer;
|
||||
TooltipLine line1 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
|
||||
|
||||
if (Main.zenithWorld)
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
line1.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld";
|
||||
}
|
||||
|
||||
@@ -287,11 +287,11 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
if ((!Main.dayTime && !Main.zenithWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
if ((!Main.dayTime && !Main.remixWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
{
|
||||
NPC.TargetClosest(false);
|
||||
player = Main.player[NPC.target];
|
||||
if ((!Main.dayTime && !Main.zenithWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
if ((!Main.dayTime && !Main.remixWorld) || !player.active || player.dead || Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
{
|
||||
if (NPC.velocity.Y > 3f)
|
||||
NPC.velocity.Y = 3f;
|
||||
@@ -1024,7 +1024,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommanderGlow").Value;
|
||||
Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f);
|
||||
if (Main.zenithWorld)
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianCommanderGlowNight").Value;
|
||||
color37 = Color.Cyan;
|
||||
|
||||
@@ -387,23 +387,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
}
|
||||
|
||||
// This causes bugs due to the return
|
||||
/*if (Main.zenithWorld)
|
||||
{
|
||||
if (Math.Abs(NPC.Center.X - player.Center.X) > 10f)
|
||||
{
|
||||
float playerLocation = NPC.Center.X - player.Center.X;
|
||||
NPC.direction = playerLocation < 0f ? 1 : -1;
|
||||
NPC.spriteDirection = NPC.direction;
|
||||
}
|
||||
// Block the main guardian
|
||||
Vector2 guardPos = Main.npc[CalamityGlobalNPC.doughnutBoss].Center;
|
||||
Vector2 playerPos = player.Center;
|
||||
Vector2 midPoint = ((guardPos - playerPos) / 1.25f) + playerPos;
|
||||
NPC.position = midPoint;
|
||||
return;
|
||||
}*/
|
||||
|
||||
float moveVelocity = (bossRush || biomeEnraged) ? 24f : death ? 22f : revenge ? 21f : expertMode ? 20f : 18f;
|
||||
if (Main.getGoodWorld)
|
||||
moveVelocity *= 1.25f;
|
||||
@@ -703,6 +686,22 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
NPC.velocity *= 0.97f;
|
||||
}
|
||||
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
if (Math.Abs(NPC.Center.X - player.Center.X) > 10f)
|
||||
{
|
||||
float playerLocation = NPC.Center.X - player.Center.X;
|
||||
NPC.direction = playerLocation < 0f ? 1 : -1;
|
||||
NPC.spriteDirection = NPC.direction;
|
||||
}
|
||||
// Block the main guardian
|
||||
Vector2 guardPos = Main.npc[CalamityGlobalNPC.doughnutBoss].Center;
|
||||
Vector2 playerPos = player.Center;
|
||||
Vector2 midPoint = ((guardPos - playerPos) / 1.25f) + playerPos;
|
||||
NPC.position = midPoint;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckActive() => false;
|
||||
@@ -749,7 +748,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianDefenderGlow").Value;
|
||||
Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f);
|
||||
if (Main.zenithWorld)
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianDefenderGlowNight").Value;
|
||||
color37 = Color.Cyan;
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianHealerGlow").Value;
|
||||
Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f);
|
||||
if (Main.zenithWorld)
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
texture2D15 = ModContent.Request<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianHealerGlowNight").Value;
|
||||
color37 = Color.Cyan;
|
||||
|
||||
Reference in new issue
Block a user