This commit is contained in:
mountaindrew10 committed 2024-08-01 17:51:57 -05:00
commit 9d2606a8f8
10 files changed
+39 -21

No files matched your search

-5
View File
@@ -11,11 +11,6 @@ namespace CalamityMod.Items.Weapons.Rogue
[LegacyName("XerocPitchfork")]
public class ShardofAntumbra : RogueWeapon
{
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 99;
}
public override void SetDefaults()
{
Item.width = 48;
@@ -1427,7 +1427,6 @@ RoverDrive: {
If depleted, the barrier's health regenerates after not receiving damage for 10 seconds
Getting hit resets the timer
Can also be scrapped at an extractinator
'''
ShieldAdren: Halved Adrenaline loss if all damage is absorbed
}
+1 -1
View File
@@ -167,7 +167,7 @@ namespace CalamityMod.NPCs.SunkenSea
NPC.frameCounter = 0.0;
return;
}
NPC.frameCounter += 0.075f;
NPC.frameCounter += 0.1f;
NPC.frameCounter %= Main.npcFrameCount[NPC.type];
int frame = (int)NPC.frameCounter;
NPC.frame.Y = frame * frameHeight;
+3
View File
@@ -172,7 +172,10 @@ namespace CalamityMod.NPCs.SunkenSea
for (int i = 0; i < 2; i++)
{
int dustPos = NPC.spriteDirection == 1 ? -10 : 0;
if (ChildSafety.Disabled)
{
Dust.NewDust(new Vector2(NPC.Center.X + dustPos, NPC.position.Y + NPC.height / 4), 0, NPC.height / 2, DustID.Blood, -NPC.spriteDirection * Main.rand.NextFloat(4f, 5f), Main.rand.NextFloat(-3, 3), Scale: Main.rand.NextFloat(0.6f, 1f));
}
}
// Update the chain
+26 -10
View File
@@ -22,6 +22,7 @@ namespace CalamityMod.NPCs.SunkenSea
public static Texture2D BlueTexture;
public static Texture2D GoldTexture;
public float RandomOpacityOffset;
public ref float Variant => ref NPC.ai[1];
public ref float Leader => ref NPC.ai[2];
public ref float Role => ref NPC.ai[3];
@@ -87,6 +88,9 @@ namespace CalamityMod.NPCs.SunkenSea
{
Variant = (int)ShoalColor.Gold;
}
RandomOpacityOffset = Main.rand.NextFloat(MathHelper.TwoPi);
NPC.frameCounter = Main.rand.NextFloat(Main.npcFrameCount[Type]);
}
public override void AI()
@@ -209,23 +213,32 @@ namespace CalamityMod.NPCs.SunkenSea
}
Lighting.AddLight(NPC.Center, glowColor.R * intensity, glowColor.G * intensity, glowColor.B * intensity);
// Sprinkle down ash particles
// Trail glowing dust as they move
if (Main.rand.NextBool(120))
{
Color ashColor = new(40, 48, 41);
//Color ashColor = new(40, 48, 41);
int dustid = DustID.CoralTorch;
switch (Variant)
{
case (int)ShoalColor.Blue:
ashColor = new(44, 63, 66);
//ashColor = new(44, 63, 66);
dustid = DustID.BoneTorch;
break;
case (int)ShoalColor.Red:
ashColor = new(79, 41, 42);
//ashColor = new(79, 41, 42);
dustid = DustID.CrimsonTorch;
break;
case (int)ShoalColor.Gold:
ashColor = Color.Yellow;
//ashColor = Color.Yellow;
dustid = DustID.IchorTorch;
break;
}
Particle ash = new SquareAshParticle(NPC.Center, new Vector2(0, 4), 150, Main.rand.NextFloat(0.85f, 1f), ashColor);
GeneralParticleHandler.SpawnParticle(ash);
//Particle ash = new SquareAshParticle(NPC.Center, new Vector2(0, 4), 150, Main.rand.NextFloat(0.85f, 1f), ashColor);
//GeneralParticleHandler.SpawnParticle(ash);
Dust dust = Dust.NewDustDirect(NPC.position, NPC.width, NPC.height, dustid, Scale: 1.5f);
dust.noGravity = true;
dust.velocity = Vector2.Zero;
}
if (Variant == (int)ShoalColor.Gold)
{
@@ -305,7 +318,7 @@ namespace CalamityMod.NPCs.SunkenSea
public override void FindFrame(int frameHeight)
{
NPC.frameCounter += 0.075f;
NPC.frameCounter += 0.2f;
NPC.frameCounter %= Main.npcFrameCount[NPC.type];
int frame = (int)NPC.frameCounter;
NPC.frame.Y = frame * frameHeight;
@@ -338,7 +351,7 @@ namespace CalamityMod.NPCs.SunkenSea
// Spooky glowey aura effect
spriteBatch.End();
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/SmallBloom").Value;
Color glowColor = Color.SeaGreen;
switch (Variant)
{
@@ -352,7 +365,8 @@ namespace CalamityMod.NPCs.SunkenSea
glowColor = Color.Yellow;
break;
}
spriteBatch.Draw(bloom, NPC.position - Main.screenPosition + new Vector2(20, 5), null, glowColor * 0.4f, 0f, bloom.Size() / 2f, 0.5f, SpriteEffects.None, 0);
spriteBatch.Draw(bloom, NPC.Center - Main.screenPosition, null, glowColor * 0.45f, 0f, bloom.Size() / 2f, 0.3f, SpriteEffects.None, 0);
spriteBatch.End();
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
@@ -390,10 +404,12 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 3f + RandomOpacityOffset) / 2f + 0.5f;
Vector2 npcOffset = NPC.Center - screenPos;
npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f;
npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY);
spriteBatch.Draw(texture, npcOffset, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f);
spriteBatch.Draw(texture, npcOffset, NPC.frame, drawColor * MathHelper.Lerp(0.4f, 0.8f, sine), NPC.rotation, origin, NPC.scale, spriteEffects, 0f);
return false;
}
+1 -1
View File
@@ -161,7 +161,7 @@ namespace CalamityMod.NPCs.SunkenSea
NPC.frameCounter = 0.0;
return;
}
NPC.frameCounter += 0.075f;
NPC.frameCounter += 0.1f;
NPC.frameCounter %= Main.npcFrameCount[NPC.type];
int frame = (int)NPC.frameCounter;
NPC.frame.Y = frame * frameHeight;
+8 -3
View File
@@ -5,6 +5,7 @@ using CalamityMod.Items.Placeables.Banners;
using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
@@ -26,8 +27,8 @@ namespace CalamityMod.NPCs.SunkenSea
NPC.npcSlots = 0.1f;
NPC.noGravity = true;
NPC.damage = 0;
NPC.width = 36;
NPC.height = 22;
NPC.width = 32;
NPC.height = 26;
NPC.defense = 0;
NPC.lifeMax = 5;
NPC.aiStyle = -1;
@@ -49,6 +50,10 @@ namespace CalamityMod.NPCs.SunkenSea
});
}
public override void OnSpawn(IEntitySource source)
{
NPC.frameCounter = Main.rand.NextFloat(Main.npcFrameCount[Type]);
}
public override void AI()
{
NPC owner = Main.npc[(int)NPC.ai[2]];
@@ -321,7 +326,7 @@ namespace CalamityMod.NPCs.SunkenSea
NPC.frameCounter = 0.0;
return;
}
NPC.frameCounter += 0.075f;
NPC.frameCounter += 0.15f;
NPC.frameCounter %= Main.npcFrameCount[NPC.type];
int frame = (int)NPC.frameCounter;
NPC.frame.Y = frame * frameHeight;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 12 KiB