1 - Tried to fix Leviathan circular hitboxes so that they actually work.
2 - Adjusted some Malice Mode bosses again. 3 - Nerfed Septic Skewer bacteria damage and spawn rate. 4 - The Hive rockets no longer fall. 5 - Life steal now works on Rev+ Golem.
This commit is contained in:
1 parent
0ff2c177cc
commit
21601af221
16 files changed
+36
-101
No files matched your search
@@ -2847,7 +2847,7 @@ namespace CalamityMod.CalPlayer
|
||||
double startAngle = Math.Atan2(player.velocity.X, player.velocity.Y) - spread / 2;
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int damage = (int)(600 * player.RangedDamage());
|
||||
int damage = (int)(400 * player.RangedDamage());
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
|
||||
@@ -1695,10 +1695,6 @@ namespace CalamityMod
|
||||
NPCID.TheDestroyerTail,
|
||||
NPCID.EaterofWorldsBody,
|
||||
NPCID.EaterofWorldsTail,
|
||||
NPCID.GolemHead,
|
||||
NPCID.GolemHeadFree,
|
||||
NPCID.GolemFistRight,
|
||||
NPCID.GolemFistLeft,
|
||||
NPCID.MoonLordCore
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
@@ -20,7 +19,6 @@ using System.IO;
|
||||
using System.Threading;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
+2
-2
@@ -3264,8 +3264,8 @@ namespace CalamityMod.NPCs
|
||||
|
||||
void CustomGravity()
|
||||
{
|
||||
float gravity = 0.3f + 0.15f * enrageScale;
|
||||
float maxFallSpeed = 10f + 5f * enrageScale;
|
||||
float gravity = 0.36f + 0.12f * enrageScale;
|
||||
float maxFallSpeed = 12f + 4f * enrageScale;
|
||||
|
||||
if (calamityGlobalNPC.newAI[0] > 1f)
|
||||
maxFallSpeed *= calamityGlobalNPC.newAI[0];
|
||||
|
||||
@@ -10098,7 +10098,7 @@ namespace CalamityMod.NPCs
|
||||
velocity *= 1.5f;
|
||||
|
||||
if (enrage)
|
||||
velocity *= 2f;
|
||||
velocity *= 1.5f;
|
||||
|
||||
int type = ProjectileID.Fireball;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
@@ -10288,7 +10288,7 @@ namespace CalamityMod.NPCs
|
||||
npc.ai[1] = 0f;
|
||||
|
||||
Vector2 vector81 = new Vector2(npc.Center.X, npc.Center.Y + 10f);
|
||||
float num655 = enrage ? 16f : 8f;
|
||||
float num655 = turboEnrage ? 16f : enrage ? 12f : 8f;
|
||||
float num656 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector81.X;
|
||||
float num657 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector81.Y;
|
||||
float num658 = (float)Math.Sqrt(num656 * num656 + num657 * num657);
|
||||
@@ -10338,7 +10338,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
npc.ai[1] = 0f;
|
||||
|
||||
float num663 = enrage ? 18f : 12f;
|
||||
float num663 = turboEnrage ? 18f : enrage ? 15f : 12f;
|
||||
float num664 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector82.X;
|
||||
float num665 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector82.Y;
|
||||
float num666 = (float)Math.Sqrt(num664 * num664 + num665 * num665);
|
||||
@@ -10683,7 +10683,7 @@ namespace CalamityMod.NPCs
|
||||
npc.ai[1] = 0f;
|
||||
|
||||
Vector2 vector88 = new Vector2(npc.Center.X, npc.Center.Y - 10f);
|
||||
float num706 = enrage ? 10f : 5f;
|
||||
float num706 = turboEnrage ? 10f : enrage ? 7.5f : 5f;
|
||||
float num709 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector88.X;
|
||||
float num710 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector88.Y;
|
||||
float num711 = (float)Math.Sqrt(num709 * num709 + num710 * num710);
|
||||
|
||||
+20
-19
@@ -619,38 +619,27 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
// Can only hit the target if within certain distance.
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
Rectangle npcHitbox = npc.Hitbox;
|
||||
Rectangle targetHitbox = target.Hitbox;
|
||||
|
||||
Vector2 npcHitboxCenter = new Vector2(npcHitbox.X + (npcHitbox.Width / 2), npcHitbox.Y + (npcHitbox.Height / 2));
|
||||
Vector2 npcCenter = npc.Center;
|
||||
|
||||
// NOTE: Tail and mouth hitboxes are interchangeable, each hitbox is the same size and is located to the right or left of the body hitbox.
|
||||
// Width = 225, Height = 225
|
||||
Rectangle mouthHitbox = new Rectangle((int)(npcHitboxCenter.X - (npc.width / 2f)), (int)(npcHitboxCenter.Y - (npc.height / 4f)), npc.width / 4, npc.height / 2);
|
||||
Rectangle mouthHitbox = new Rectangle((int)(npcCenter.X - (npc.width / 2f)), (int)(npcCenter.Y - (npc.height / 4f)), npc.width / 4, npc.height / 2);
|
||||
// Width = 450, Height = 450
|
||||
Rectangle bodyHitbox = new Rectangle((int)(npcHitboxCenter.X - (npc.width / 4f)), (int)(npcHitboxCenter.Y - (npc.height / 2f)), npc.width / 2, npc.height);
|
||||
Rectangle bodyHitbox = new Rectangle((int)(npcCenter.X - (npc.width / 4f)), (int)(npcCenter.Y - (npc.height / 2f)), npc.width / 2, npc.height);
|
||||
// Width = 225, Height = 225
|
||||
Rectangle tailHitbox = new Rectangle((int)(npcHitboxCenter.X + (npc.width / 2f)), (int)(npcHitboxCenter.Y - (npc.height / 4f)), npc.width / 4, npc.height / 2);
|
||||
Rectangle tailHitbox = new Rectangle((int)(npcCenter.X + (npc.width / 2f)), (int)(npcCenter.Y - (npc.height / 4f)), npc.width / 4, npc.height / 2);
|
||||
|
||||
Vector2 mouthHitboxCenter = new Vector2(mouthHitbox.X + (mouthHitbox.Width / 2), mouthHitbox.Y + (mouthHitbox.Height / 2));
|
||||
Vector2 bodyHitboxCenter = new Vector2(bodyHitbox.X + (bodyHitbox.Width / 2), bodyHitbox.Y + (bodyHitbox.Height / 2));
|
||||
Vector2 tailHitboxCenter = new Vector2(tailHitbox.X + (tailHitbox.Width / 2), tailHitbox.Y + (tailHitbox.Height / 2));
|
||||
|
||||
Rectangle targetHitbox = target.Hitbox;
|
||||
|
||||
float mouthDist1 = Vector2.Distance(mouthHitboxCenter, targetHitbox.TopLeft());
|
||||
float mouthDist2 = Vector2.Distance(mouthHitboxCenter, targetHitbox.TopRight());
|
||||
float mouthDist3 = Vector2.Distance(mouthHitboxCenter, targetHitbox.BottomLeft());
|
||||
float mouthDist4 = Vector2.Distance(mouthHitboxCenter, targetHitbox.BottomRight());
|
||||
|
||||
float bodyDist1 = Vector2.Distance(bodyHitboxCenter, targetHitbox.TopLeft());
|
||||
float bodyDist2 = Vector2.Distance(bodyHitboxCenter, targetHitbox.TopRight());
|
||||
float bodyDist3 = Vector2.Distance(bodyHitboxCenter, targetHitbox.BottomLeft());
|
||||
float bodyDist4 = Vector2.Distance(bodyHitboxCenter, targetHitbox.BottomRight());
|
||||
|
||||
float tailDist1 = Vector2.Distance(tailHitboxCenter, targetHitbox.TopLeft());
|
||||
float tailDist2 = Vector2.Distance(tailHitboxCenter, targetHitbox.TopRight());
|
||||
float tailDist3 = Vector2.Distance(tailHitboxCenter, targetHitbox.BottomLeft());
|
||||
float tailDist4 = Vector2.Distance(tailHitboxCenter, targetHitbox.BottomRight());
|
||||
|
||||
float minMouthDist = mouthDist1;
|
||||
if (mouthDist2 < minMouthDist)
|
||||
minMouthDist = mouthDist2;
|
||||
@@ -659,6 +648,13 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
if (mouthDist4 < minMouthDist)
|
||||
minMouthDist = mouthDist4;
|
||||
|
||||
bool insideMouthHitbox = minMouthDist <= 225f;
|
||||
|
||||
float bodyDist1 = Vector2.Distance(bodyHitboxCenter, targetHitbox.TopLeft());
|
||||
float bodyDist2 = Vector2.Distance(bodyHitboxCenter, targetHitbox.TopRight());
|
||||
float bodyDist3 = Vector2.Distance(bodyHitboxCenter, targetHitbox.BottomLeft());
|
||||
float bodyDist4 = Vector2.Distance(bodyHitboxCenter, targetHitbox.BottomRight());
|
||||
|
||||
float minBodyDist = bodyDist1;
|
||||
if (bodyDist2 < minBodyDist)
|
||||
minBodyDist = bodyDist2;
|
||||
@@ -667,6 +663,13 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
if (bodyDist4 < minBodyDist)
|
||||
minBodyDist = bodyDist4;
|
||||
|
||||
bool insideBodyHitbox = minBodyDist <= 450f;
|
||||
|
||||
float tailDist1 = Vector2.Distance(tailHitboxCenter, targetHitbox.TopLeft());
|
||||
float tailDist2 = Vector2.Distance(tailHitboxCenter, targetHitbox.TopRight());
|
||||
float tailDist3 = Vector2.Distance(tailHitboxCenter, targetHitbox.BottomLeft());
|
||||
float tailDist4 = Vector2.Distance(tailHitboxCenter, targetHitbox.BottomRight());
|
||||
|
||||
float minTailDist = tailDist1;
|
||||
if (tailDist2 < minTailDist)
|
||||
minTailDist = tailDist2;
|
||||
@@ -675,8 +678,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
if (tailDist4 < minTailDist)
|
||||
minTailDist = tailDist4;
|
||||
|
||||
bool insideMouthHitbox = minMouthDist <= 225f;
|
||||
bool insideBodyHitbox = minBodyDist <= 450f;
|
||||
bool insideTailHitbox = minTailDist <= 225f;
|
||||
|
||||
return insideMouthHitbox || insideBodyHitbox || insideTailHitbox;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (npc.ai[0] == 0f)
|
||||
{
|
||||
npc.noTileCollide = true;
|
||||
float num659 = 21f;
|
||||
float num659 = 40f;
|
||||
if (npc.life < npc.lifeMax / 2 || death)
|
||||
{
|
||||
num659 += 1f;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (npc.ai[0] == 0f)
|
||||
{
|
||||
npc.noTileCollide = true;
|
||||
float num659 = 21f;
|
||||
float num659 = 40f;
|
||||
if (npc.life < npc.lifeMax / 2 || death)
|
||||
{
|
||||
num659 += 1f;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (npc.timeLeft < 1800)
|
||||
npc.timeLeft = 1800;
|
||||
|
||||
float speed = 21f;
|
||||
float speed = 40f;
|
||||
float centerX = Main.npc[CalamityGlobalNPC.scavenger].Center.X - npc.Center.X;
|
||||
float centerY = Main.npc[CalamityGlobalNPC.scavenger].Center.Y - npc.Center.Y;
|
||||
centerY -= 20f;
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
if (npc.ai[0] == 0f)
|
||||
{
|
||||
float num659 = 21f;
|
||||
float num659 = 40f;
|
||||
Vector2 vector79 = new Vector2(center.X, center.Y);
|
||||
float num660 = Main.npc[CalamityGlobalNPC.scavenger].Center.X - vector79.X;
|
||||
float num661 = Main.npc[CalamityGlobalNPC.scavenger].Center.Y - vector79.Y;
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
if (npc.ai[0] == 0f)
|
||||
{
|
||||
float num659 = 21f;
|
||||
float num659 = 40f;
|
||||
Vector2 vector79 = new Vector2(center.X, center.Y);
|
||||
float num660 = Main.npc[CalamityGlobalNPC.scavenger].Center.X - vector79.X;
|
||||
float num661 = Main.npc[CalamityGlobalNPC.scavenger].Center.Y - vector79.Y;
|
||||
|
||||
@@ -63,22 +63,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Main.dust[num252].noGravity = true;
|
||||
Main.dust[num252].position = projectile.Center + new Vector2(0f, (float)(-(float)projectile.height / 2 - 6)).RotatedBy((double)projectile.rotation, default) * 1.1f;
|
||||
}
|
||||
projectile.ai[0] += 1f;
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
if (projectile.ai[0] > 10f || projectile.ai[0] > 5f)
|
||||
{
|
||||
projectile.ai[0] = 10f;
|
||||
if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X * 0.97f;
|
||||
if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01)
|
||||
{
|
||||
projectile.velocity.X = 0f;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
|
||||
@@ -79,22 +79,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Main.dust[num252].position = projectile.Center + new Vector2(0f, (float)(-(float)projectile.height / 2 - 6)).RotatedBy((double)projectile.rotation, default) * 1.1f;
|
||||
}
|
||||
}
|
||||
projectile.ai[0] += 1f;
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
if (projectile.ai[0] > 10f || projectile.ai[0] > 5f)
|
||||
{
|
||||
projectile.ai[0] = 10f;
|
||||
if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X * 0.97f;
|
||||
if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01)
|
||||
{
|
||||
projectile.velocity.X = 0f;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
|
||||
@@ -79,22 +79,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Main.dust[num252].position = projectile.Center + new Vector2(0f, (float)(-(float)projectile.height / 2 - 6)).RotatedBy((double)projectile.rotation, default) * 1.1f;
|
||||
}
|
||||
}
|
||||
projectile.ai[0] += 1f;
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
if (projectile.ai[0] > 10f || projectile.ai[0] > 5f)
|
||||
{
|
||||
projectile.ai[0] = 10f;
|
||||
if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X * 0.97f;
|
||||
if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01)
|
||||
{
|
||||
projectile.velocity.X = 0f;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
|
||||
@@ -79,22 +79,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Main.dust[num252].position = projectile.Center + new Vector2(0f, (float)(-(float)projectile.height / 2 - 6)).RotatedBy((double)projectile.rotation, default) * 1.1f;
|
||||
}
|
||||
}
|
||||
projectile.ai[0] += 1f;
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
if (projectile.ai[0] > 10f || projectile.ai[0] > 5f)
|
||||
{
|
||||
projectile.ai[0] = 10f;
|
||||
if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X * 0.97f;
|
||||
if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01)
|
||||
{
|
||||
projectile.velocity.X = 0f;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
|
||||
@@ -39,13 +39,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
projectile.alpha = 0;
|
||||
}
|
||||
if ((int)projectile.ai[1] % 4 == 0 && projectile.owner == Main.myPlayer && Main.rand.NextBool(5))
|
||||
if (projectile.ai[1] % 8f == 0f && projectile.owner == Main.myPlayer && Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 vector63 = vector62 * -1f;
|
||||
vector63.Normalize();
|
||||
vector63 *= (float)Main.rand.Next(45, 65) * 0.1f;
|
||||
vector63 = vector63.RotatedBy((Main.rand.NextDouble() - 0.5) * MathHelper.PiOver2, default);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType<SepticSkewerBacteria>(), (int)((double)projectile.damage * 0.4), projectile.knockBack * 0.2f, projectile.owner, -10f, 0f);
|
||||
vector63 *= Main.rand.Next(45, 65) * 0.1f;
|
||||
vector63 = vector63.RotatedBy((Main.rand.NextDouble() - 0.5) * MathHelper.PiOver2);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType<SepticSkewerBacteria>(), (int)(projectile.damage * 0.25), projectile.knockBack * 0.2f, projectile.owner, -10f, 0f);
|
||||
}
|
||||
if (player.dead)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user