1 - Ceaseless Dust.

2 - Fixed some Ceaseless Void issues.
This commit is contained in:
Andrew Marheine committed 2021-05-29 11:22:48 -05:00
1 parent 2daab3e171
commit 62a4190da6
5 files changed
+40 -11

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Dusts
{
public class CeaselessDust : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.noGravity = true;
}
public override bool Update(Dust dust)
{
float scale = dust.scale;
Lighting.AddLight((int)(dust.position.X / 16f), (int)(dust.position.Y / 16f), scale * 0.4f, scale * 0.1f, scale);
dust.velocity *= 0.95f;
dust.scale -= 0.01f;
return false;
}
public override Color? GetAlpha(Dust dust, Color lightColor)
{
int newColor = (int)(250f * dust.scale);
return new Color(newColor, newColor, newColor, 0);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

+1 -7
View File
@@ -214,13 +214,9 @@ namespace CalamityMod.NPCs.Abyss
}
if (npc.velocity.X < 0f)
{
npc.spriteDirection = -1;
}
else if (npc.velocity.X > 0f)
{
npc.spriteDirection = 1;
}
if (Main.player[npc.target].dead)
{
@@ -242,9 +238,7 @@ namespace CalamityMod.NPCs.Abyss
npc.alpha -= 42;
if (npc.alpha < 0)
{
npc.alpha = 0;
}
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmTailHuge>()))
{
@@ -264,7 +258,7 @@ namespace CalamityMod.NPCs.Abyss
if (!detectsPlayer)
{
num192 += 800;
if (Math.Abs(npc.Center.X - num191) < 400f) //500
if (Math.Abs(npc.Center.X - num191) < 400f)
{
if (npc.velocity.X > 0f)
{
+6 -2
View File
@@ -4167,7 +4167,7 @@ namespace CalamityMod.NPCs
if (Main.rand.NextBool(var))
{
dustOffset = dustOffset.RotatedBy(angleIncrement);
int dust = Dust.NewDust(vector, 1, 1, (int)CalamityDusts.PurpleCosmolite);
int dust = Dust.NewDust(vector, 1, 1, ModContent.DustType<CeaselessDust>());
Main.dust[dust].position = vector + dustOffset;
Main.dust[dust].noGravity = true;
Main.dust[dust].fadeIn = 1f;
@@ -4213,7 +4213,11 @@ namespace CalamityMod.NPCs
npc.HealEffect(-damageAmt, true);
if (npc.life <= 0)
npc.StrikeNPCNoInteraction(9999, 0f, 0);
{
npc.life = 0;
npc.HitEffect();
npc.checkDead();
}
npc.netUpdate = true;
}
+2 -2
View File
@@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
// Distance from Ceaseless Void
double maxDistance = malice ? 1200D : death ? 1040D : revenge ? 960D : expertMode ? 880D : minMaxDistance;
double rateOfChangeIncrease = (maxDistance / minMaxDistance) - 1D;
double rateOfChange = (npc.ai[1] * 0.5f) + 1D + tileEnrageMult + rateOfChangeIncrease;
double rateOfChange = (npc.ai[1] * 0.5f) + 2D + (tileEnrageMult - 1f) + rateOfChangeIncrease;
if (npc.Calamity().newAI[0] == 0f)
{
distance += rateOfChange;
@@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
// Rotation velocity
float minRotationVelocity = 0.5f + tileEnrageMult - 1f;
float rotationVelocityIncrease = malice ? 0.4f : death ? 0.2f : revenge ? 0.15f : expertMode ? 0.1f : 0f;
float rotationVelocityIncrease = death ? 0.2f : revenge ? 0.15f : expertMode ? 0.1f : 0f;
rotationVelocityIncrease += rotationVelocityIncrease * (npc.ai[1] * 0.5f);
// Rotate around Ceaseless Void