Weapon adjustments.

New sprites.
Boss changes.
Boss HP bar changes.
This commit is contained in:
Andrew Marheine committed 2019-09-15 13:38:30 -05:00
1 parent f7921040b5
commit 978f58f304
12 files changed
+86 -52

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 296 B

+3 -4
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons
public override void SetDefaults()
{
item.damage = 260;
item.damage = 280;
item.magic = true;
item.mana = 5;
item.width = 84;
@@ -50,8 +50,7 @@ namespace CalamityMod.Items.Weapons
{
if (player.altFunctionUse == 2)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BigBeamofDeath"), (int)((double)damage * 1.7), knockBack, player.whoAmI, 0.0f, 0.0f);
return false;
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BigBeamofDeath"), (int)((double)damage * 2.1), knockBack, player.whoAmI, 0.0f, 0.0f);
}
else
{
@@ -75,8 +74,8 @@ namespace CalamityMod.Items.Weapons
Main.projectile[laser].timeLeft = 120;
Main.projectile[laser].tileCollide = false;
}
return false;
}
return false;
}
public override void AddRecipes()
+2 -2
View File
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons
item.mana = 42;
item.width = 16;
item.height = 16;
item.useTime = 42;
item.useAnimation = 42;
item.useTime = 21;
item.useAnimation = 21;
item.useStyle = 5;
item.useTurn = false;
item.noMelee = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 705 B

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 927 B

+10 -3
View File
@@ -262,12 +262,19 @@ namespace CalamityMod.NPCs
npc.TargetClosest(true);
float velocityX = 6f + (6f * (1f - lifeRatio));
npc.velocity.X = velocityX * (float)npc.direction;
npc.velocity.Y = -14.5f;
if (npc.target >= 0 && CalamityWorld.revenge && player.position.Y < npc.position.Y + (float)npc.height)
if (CalamityWorld.revenge)
{
if (Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height)
npc.velocity.Y = -14.5f;
else
npc.velocity.Y = 1f;
npc.noTileCollide = true;
}
else
npc.velocity.Y = -14.5f;
npc.ai[0] = 4f;
npc.ai[1] = 0f;
+27 -14
View File
@@ -8670,10 +8670,18 @@ namespace CalamityMod.NPCs
velocityX *= 1.5f;
npc.velocity.X = velocityX * (float)npc.direction;
npc.velocity.Y = -12.1f;
if (npc.target >= 0 && Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height)
if (CalamityWorld.revenge)
{
if (Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height)
npc.velocity.Y = -12.1f;
else
npc.velocity.Y = 1f;
npc.noTileCollide = true;
}
else
npc.velocity.Y = -12.1f;
npc.ai[0] = 1f;
npc.ai[1] = 0f;
@@ -10366,21 +10374,21 @@ namespace CalamityMod.NPCs
npc.knockBackResist = 0f;
npc.damage = npc.defDamage;
// Percent life remaining
float lifeRatio = (float)npc.life / (float)npc.lifeMax;
// Phases
bool phase2 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.1f;
if (!Main.eclipse)
npc.ai[0] = -1f;
else if (npc.target < 0 || Main.player[npc.target].dead || !Main.player[npc.target].active)
{
npc.TargetClosest(true);
Vector2 vector235 = Main.player[npc.target].Center - npc.Center;
if (Main.player[npc.target].dead || vector235.Length() > 4000f)
if (Main.player[npc.target].dead)
npc.ai[0] = -1f;
}
else
{
Vector2 vector236 = Main.player[npc.target].Center - npc.Center;
if (npc.ai[0] > 1f && vector236.Length() > 3000f)
npc.ai[0] = 1f;
}
if (npc.ai[0] == -1f)
{
@@ -10431,7 +10439,7 @@ namespace CalamityMod.NPCs
npc.ai[2] = 0f;
npc.ai[3] = 0f;
}
else if (value38.Length() > 240f)
else if (value38.Length() > 600f)
{
float scaleFactor15 = 15f;
float num1354 = 30f;
@@ -10446,7 +10454,7 @@ namespace CalamityMod.NPCs
npc.ai[1] += 1f;
if (npc.ai[1] >= 20f && Main.netMode != NetmodeID.MultiplayerClient)
if (npc.ai[1] >= 10f && Main.netMode != NetmodeID.MultiplayerClient)
{
npc.ai[1] = 0f;
npc.ai[2] = 0f;
@@ -10456,6 +10464,11 @@ namespace CalamityMod.NPCs
while (npc.ai[0] == 0f)
{
int num1355 = Main.rand.Next(3);
if (phase3)
num1355 = 1;
else if (phase2)
num1355 = Main.rand.Next(2);
if (num1355 == 0 && Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1))
npc.ai[0] = 2f;
else if (num1355 == 1)
@@ -10636,7 +10649,7 @@ namespace CalamityMod.NPCs
{
if (npc.ai[0] == 3.2f)
{
npc.damage = (int)((double)npc.defDamage * 1.5);
npc.damage = (int)((double)npc.defDamage * 1.2);
npc.collideX = false;
npc.collideY = false;
npc.noTileCollide = true;
@@ -10690,7 +10703,7 @@ namespace CalamityMod.NPCs
while (!WorldGen.SolidTile(num1361, num1362) && (double)num1362 < Main.worldSurface)
num1362++;
if ((new Vector2((float)(num1361 * 16 + 8), (float)(num1362 * 16 + 8)) - Main.player[npc.target].Center).Length() < 3600f)
if ((new Vector2((float)(num1361 * 16 + 8), (float)(num1362 * 16 + 8)) - Main.player[npc.target].Center).Length() < 5600f)
{
npc.ai[0] = 4.1f;
npc.ai[1] = (float)num1361;
+7 -4
View File
@@ -678,14 +678,17 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.Golem)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 5.0) : (int)(npc.lifeMax * 2.5);
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 7.0) : (int)(npc.lifeMax * 4.0);
npc.npcSlots = 64f;
}
else if (npc.type == NPCID.GolemHead || npc.type == NPCID.GolemHeadFree)
else if (npc.type == NPCID.GolemHead)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.0) : (int)(npc.lifeMax * 2.0);
if (npc.type == NPCID.GolemHeadFree)
npc.dontTakeDamage = false;
}
else if (npc.type == NPCID.GolemHeadFree)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.25) : (int)(npc.lifeMax * 1.1);
npc.dontTakeDamage = false;
}
else if (npc.type == NPCID.Plantera)
{
+19 -6
View File
@@ -102,8 +102,13 @@ namespace CalamityMod.NPCs.Scavenger
// Percent life remaining
float lifeRatio = (float)npc.life / (float)npc.lifeMax;
Lighting.AddLight((int)(npc.position.X - 100f) / 16, (int)(npc.position.Y - 20f) / 16, 0f, 0.51f, 2f);
Lighting.AddLight((int)(npc.position.X + 100f) / 16, (int)(npc.position.Y - 20f) / 16, 0f, 0.51f, 2f);
// Large fire light
Lighting.AddLight((int)(npc.Center.X - 110f) / 16, (int)(npc.Center.Y - 30f) / 16, 0f, 0.5f, 2f);
Lighting.AddLight((int)(npc.Center.X + 110f) / 16, (int)(npc.Center.Y - 30f) / 16, 0f, 0.5f, 2f);
// Small fire light
Lighting.AddLight((int)(npc.Center.X - 40f) / 16, (int)(npc.Center.Y - 60f) / 16, 0f, 0.25f, 1f);
Lighting.AddLight((int)(npc.Center.X + 40f) / 16, (int)(npc.Center.Y - 60f) / 16, 0f, 0.25f, 1f);
CalamityGlobalNPC.scavenger = npc.whoAmI;
@@ -387,12 +392,20 @@ namespace CalamityMod.NPCs.Scavenger
{
npc.TargetClosest(true);
float speedX = ((enrage || npc.GetGlobalNPC<CalamityGlobalNPC>(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio));
npc.velocity.X = speedX * (float)npc.direction;
npc.velocity.Y = -15.2f;
float velocityX = ((enrage || npc.GetGlobalNPC<CalamityGlobalNPC>(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio));
npc.velocity.X = velocityX * (float)npc.direction;
if (CalamityWorld.revenge)
{
if (Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height)
npc.velocity.Y = -15.2f;
else
npc.velocity.Y = 1f;
if (npc.target >= 0 && CalamityWorld.revenge && Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height)
npc.noTileCollide = true;
}
else
npc.velocity.Y = -15.2f;
npc.ai[0] = 1f;
npc.ai[1] = 0f;
+2 -15
View File
@@ -109,19 +109,10 @@ namespace CalamityMod.Projectiles.Ranged
if (projectile.ai[0] == 1f)
{
projectile.tileCollide = false;
int num988 = 15;
bool flag54 = false;
bool flag55 = false;
float[] var_2_2CB4E_cp_0 = projectile.localAI;
int var_2_2CB4E_cp_1 = 0;
float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1];
var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f;
if (projectile.localAI[0] % 30f == 0f)
{
flag55 = true;
}
projectile.localAI[0] += 1f;
int num989 = (int)projectile.ai[1];
if (projectile.localAI[0] >= (float)(60 * num988))
if (projectile.localAI[0] >= 360f)
{
flag54 = true;
}
@@ -133,10 +124,6 @@ namespace CalamityMod.Projectiles.Ranged
{
projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f;
projectile.gfxOffY = Main.npc[num989].gfxOffY;
if (flag55)
{
Main.npc[num989].HitEffect(0, 1.0);
}
}
else
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

+16 -4
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.UI
internal static class BossHealthBarManager
{
private static readonly int MAX_BARS = 4; //4
private static readonly int MAX_BARS = 4;
public static bool SHOULD_DRAW_SMALLTEXT_HEALTH = true;
@@ -96,7 +96,14 @@ namespace CalamityMod.UI
OneToMany[NPCID.PrimeCannon] = SkelePrime;
OneToMany[NPCID.PrimeLaser] = SkelePrime;
int[] Saucer = new int[] { NPCID.MartianSaucerCore, NPCID.MartianSaucerTurret, NPCID.MartianSaucerCannon };
int[] Golem = new int[] { NPCID.Golem, NPCID.GolemFistLeft, NPCID.GolemFistRight, NPCID.GolemHead, NPCID.GolemHeadFree };
OneToMany[NPCID.Golem] = Golem;
OneToMany[NPCID.GolemFistLeft] = Golem;
OneToMany[NPCID.GolemFistRight] = Golem;
OneToMany[NPCID.GolemHead] = Golem;
OneToMany[NPCID.GolemHeadFree] = Golem;
int[] Saucer = new int[] { NPCID.MartianSaucerCore, NPCID.MartianSaucerTurret, NPCID.MartianSaucerCannon };
OneToMany[NPCID.MartianSaucerCore] = Saucer;
OneToMany[NPCID.MartianSaucerTurret] = Saucer;
OneToMany[NPCID.MartianSaucerCannon] = Saucer;
@@ -239,7 +246,8 @@ namespace CalamityMod.UI
MinibossHPBarList.Add(calamity.NPCType("ProvSpawnDefense"));
MinibossHPBarList.Add(calamity.NPCType("ProvSpawnOffense"));
MinibossHPBarList.Add(calamity.NPCType("ProvSpawnHealer"));
}
MinibossHPBarList.Add(calamity.NPCType("PolterPhantom"));
}
}
public static void Unload()
@@ -281,7 +289,11 @@ namespace CalamityMod.UI
{
AttemptAddBar(i, NPCID.SkeletronPrime);
}
else if (Main.npc[i].type == NPCID.MartianSaucerCore)
else if (Main.npc[i].type == NPCID.Golem)
{
AttemptAddBar(i, NPCID.Golem);
}
else if (Main.npc[i].type == NPCID.MartianSaucerCore)
{
AttemptAddBar(i, NPCID.MartianSaucerCore);
}