bugfixes
This commit is contained in:
1 parent
3ca8d9c709
commit
67ecbccf79
3 files changed
+16
-22
No files matched your search
@@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
global.unbreakableDR = true;
|
||||
NPC.chaseable = false;
|
||||
}
|
||||
NPC.LifeMaxNERB(750000, 900000, 1500000);
|
||||
NPC.LifeMaxNERB(760000, 910000, 1500000);
|
||||
NPC.aiStyle = -1;
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = 0f;
|
||||
@@ -149,19 +149,20 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
|
||||
if (NPC.life > Main.npc[(int)NPC.ai[1]].life)
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
NPC.life = Main.npc[(int)NPC.ai[2]].life;
|
||||
NPC.lifeMax = Main.npc[(int)NPC.ai[2]].lifeMax;NPC.life = NPC.lifeMax;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
float lifeRatio = Main.npc[(int)NPC.ai[2]].life / (float)Main.npc[(int)NPC.ai[2]].lifeMax;
|
||||
|
||||
bool phase2 = lifeRatio < 0.65f;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (phase2)
|
||||
if (phase2 && !phase2Started && Main.npc[(int)NPC.ai[2]].localAI[2] <= 60)
|
||||
{
|
||||
|
||||
phase2Started = true;
|
||||
|
||||
// Once before DoG spawns, set new size
|
||||
@@ -264,7 +265,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
// Decide segment offset stuff.
|
||||
NPC.rotation = directionToNextSegment.ToRotation() + MathHelper.PiOver2;
|
||||
NPC.Center = aheadSegment.Center - directionToNextSegment.SafeNormalize(Vector2.Zero) * NPC.scale * NPC.width;
|
||||
NPC.Center = aheadSegment.Center - directionToNextSegment.SafeNormalize(Vector2.Zero) * NPC.scale * (phase2Started ? 80 : NPC.width );
|
||||
NPC.spriteDirection = (directionToNextSegment.X > 0).ToDirectionInt();
|
||||
|
||||
// Velocity variables
|
||||
|
||||
@@ -42,11 +42,9 @@ using Terraria.GameContent;
|
||||
using Terraria.GameContent.Bestiary;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
@@ -289,6 +287,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
NPC.Calamity().VulnerableToElectricity = true;
|
||||
NPC.Calamity().VulnerableToSickness = false;
|
||||
|
||||
NPC.life = NPC.lifeMax;
|
||||
}
|
||||
|
||||
public override void BossHeadSlot(ref int index)
|
||||
@@ -536,9 +536,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
// Continuously reset certain things.
|
||||
AttemptingToEnterPortal = false;
|
||||
|
||||
// Worm variable
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
|
||||
// Despawn
|
||||
if (player.dead)
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.width = 66;
|
||||
NPC.height = 66;
|
||||
NPC.defense = 50;
|
||||
NPC.LifeMaxNERB(750000, 900000, 1500000);
|
||||
NPC.LifeMaxNERB(760000, 910000, 1500000);
|
||||
NPC.aiStyle = -1;
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = 0f;
|
||||
@@ -152,30 +152,26 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
|
||||
if (NPC.life > Main.npc[(int)NPC.ai[1]].life)
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
NPC.life = Main.npc[(int)NPC.ai[2]].life;
|
||||
NPC.lifeMax = Main.npc[(int)NPC.ai[2]].lifeMax;
|
||||
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
float lifeRatio = Main.npc[(int)NPC.ai[2]].life / (float)Main.npc[(int)NPC.ai[2]].lifeMax;
|
||||
|
||||
bool phase2 = lifeRatio < 0.65f;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (phase2)
|
||||
if (phase2 && !phase2Started && Main.npc[(int)NPC.ai[2]].localAI[2] <= 60)
|
||||
{
|
||||
phase2Started = true;
|
||||
|
||||
// Once before DoG spawns, set new size
|
||||
if (Main.npc[(int)NPC.ai[2]].localAI[2] == 60f)
|
||||
{
|
||||
NPC.position = NPC.Center;
|
||||
NPC.width = (int)(80 * NPC.scale);
|
||||
NPC.height = (int)(140 * NPC.scale);
|
||||
NPC.height = (int)(80 * NPC.scale);
|
||||
NPC.frame = new Rectangle(0, 0, 86, 148);
|
||||
NPC.position -= NPC.Size * 0.5f;
|
||||
NPC.ForceNetUpdate(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (invinceTime > 0)
|
||||
|
||||
Reference in new issue
Block a user