Resprited Primordial Wyrm (#997)
Squashed due to an excessive number of merge commits --Ozzatron Co-authored-by: enamoured_ <xmmekxmwmxl@gmail.com>
No files matched your search
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
@@ -24,14 +24,14 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
this.HideFromBestiary();
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "Glow", AssetRequestMode.AsyncLoad);
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "_Lightmask", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
NPC.damage = 100;
|
||||
NPC.width = 60;
|
||||
NPC.width = 100;
|
||||
NPC.height = 88;
|
||||
NPC.defense = 0;
|
||||
NPC.LifeMaxNERB(2500000, 3000000);
|
||||
@@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm2").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm3").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 8.8 KiB |
@@ -23,14 +23,14 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
this.HideFromBestiary();
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "Glow", AssetRequestMode.AsyncLoad);
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "_Lightmask", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
NPC.damage = 100;
|
||||
NPC.width = 60;
|
||||
NPC.width = 110;
|
||||
NPC.height = 88;
|
||||
NPC.defense = 0;
|
||||
NPC.LifeMaxNERB(2500000, 3000000);
|
||||
@@ -192,7 +192,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm3").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm4").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
@@ -88,11 +88,12 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
NPCID.Sets.CantTakeLunchMoney[Type] = true;
|
||||
NPCID.Sets.BossBestiaryPriority.Add(Type);
|
||||
NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers()
|
||||
{
|
||||
Scale = 0.50f,
|
||||
PortraitScale = 0.6f,
|
||||
Scale = 0.5f,
|
||||
PortraitScale = 0.5f,
|
||||
PortraitPositionXOverride = 40,
|
||||
};
|
||||
value.Position.X += 55;
|
||||
@@ -100,7 +101,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
NPCID.Sets.NPCBestiaryDrawOffset[Type] = value;
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "Glow", AssetRequestMode.AsyncLoad);
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "_Lightmask", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
NPC.Calamity().canBreakPlayerDefense = true;
|
||||
NPC.npcSlots = 50f;
|
||||
NPC.GetNPCDamage();
|
||||
NPC.width = 254;
|
||||
NPC.width = 230;
|
||||
NPC.height = 138;
|
||||
NPC.LifeMaxNERB(2500000, 3000000);
|
||||
NPC.aiStyle = -1;
|
||||
@@ -470,23 +471,31 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item117, player.Center);
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, DustID.FrostHydra, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].velocity *= 0.6f;
|
||||
// Dust that moves in the opposite direction of the player
|
||||
Dust dust = Dust.NewDustDirect(player.position, player.width, player.height, DustID.MushroomSpray, -player.velocity.X, -player.velocity.Y, 1, Color.SkyBlue, 1);
|
||||
dust.velocity.Normalize();
|
||||
dust.velocity *= Main.rand.Next(20);
|
||||
dust.noGravity = true;
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].scale = 0.5f;
|
||||
Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
dust.scale = 0.5f;
|
||||
dust.fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, DustID.FrostHydra, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, DustID.FrostHydra, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].velocity *= 0.2f;
|
||||
// Dust that moves in the direction of PW
|
||||
Vector2 velocityToNPC = player.DirectionTo(NPC.Center) * Main.rand.Next(40);
|
||||
Dust dust = Dust.NewDustDirect(player.position, player.width, player.height, DustID.Flare, velocityToNPC.X * 5, velocityToNPC.Y * 5, 1, default, 3);
|
||||
dust.noGravity = true;
|
||||
// Dust that emanataes outward from the player's position
|
||||
dust = Dust.NewDustDirect(player.position, player.width, player.height, DustID.Flare, Main.rand.Next(5), Main.rand.Next(5), 1, default, 1);
|
||||
dust.fadeIn = 1f + Main.rand.Next(8) * 0.1f;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -505,7 +514,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue)
|
||||
{
|
||||
ChargeDust(7, (float)Math.PI);
|
||||
ChargeDust();
|
||||
|
||||
// Use a lerp to smoothly scale up velocity and turn speed
|
||||
chargeVelocityScalar += chargeVelocityScalarIncrement;
|
||||
@@ -693,7 +702,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue)
|
||||
{
|
||||
ChargeDust(7, (float)Math.PI);
|
||||
ChargeDust();
|
||||
|
||||
// Use a lerp to smoothly scale up velocity and turn speed
|
||||
chargeVelocityScalar += chargeVelocityScalarIncrement;
|
||||
@@ -805,7 +814,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue)
|
||||
{
|
||||
ChargeDust(7, (float)Math.PI);
|
||||
ChargeDust();
|
||||
|
||||
// Use a lerp to smoothly scale up velocity and turn speed
|
||||
chargeVelocityScalar += chargeVelocityScalarIncrement;
|
||||
@@ -1085,7 +1094,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue)
|
||||
{
|
||||
ChargeDust(7, (float)Math.PI);
|
||||
ChargeDust();
|
||||
|
||||
// Use a lerp to smoothly scale up velocity and turn speed
|
||||
chargeVelocityScalar += chargeVelocityScalarIncrement;
|
||||
@@ -1369,18 +1378,23 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
}
|
||||
}
|
||||
|
||||
private void ChargeDust(int dustAmt, float pie)
|
||||
private void ChargeDust()
|
||||
{
|
||||
for (int num1474 = 0; num1474 < dustAmt; num1474++)
|
||||
for (int dustCount = 0; dustCount < 5; dustCount++)
|
||||
{
|
||||
Vector2 dustRotation = Vector2.Normalize(NPC.velocity) * new Vector2((NPC.width + 50) / 2f, NPC.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)pie / (float)dustAmt) + NPC.Center;
|
||||
Vector2 dustVelocity = ((float)(Main.rand.NextDouble() * pie) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8);
|
||||
int chargeDust = Dust.NewDust(dustRotation + dustVelocity, 0, 0, DustID.DungeonWater, dustVelocity.X * 2f, dustVelocity.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[chargeDust].noGravity = true;
|
||||
Main.dust[chargeDust].noLight = true;
|
||||
Main.dust[chargeDust].velocity /= 4f;
|
||||
Main.dust[chargeDust].velocity -= NPC.velocity;
|
||||
// 184 and 77 offsets are for outer horns, 119 and 47 for inner
|
||||
//outer left horn
|
||||
Dust dust = Dust.NewDustPerfect(new Vector2(NPC.Center.X - 184, NPC.Center.Y + 77).RotatedBy(NPC.rotation, NPC.Center), DustID.MushroomSpray, -NPC.velocity, 1, Color.SkyBlue, 1f);
|
||||
dust.velocity.Normalize();
|
||||
//outer right horn
|
||||
dust = Dust.NewDustPerfect(new Vector2(NPC.Center.X + 184, NPC.Center.Y + 77).RotatedBy(NPC.rotation, NPC.Center), DustID.MushroomSpray, -NPC.velocity, 1, Color.SkyBlue, 1f);
|
||||
dust.velocity.Normalize();
|
||||
//inner left horn
|
||||
dust = Dust.NewDustPerfect(new Vector2(NPC.Center.X - 119, NPC.Center.Y + 47).RotatedBy(NPC.rotation, NPC.Center), DustID.MushroomSpray, -NPC.velocity, 1, Color.SkyBlue, 0.7f);
|
||||
dust.velocity.Normalize();
|
||||
//inner right horn
|
||||
dust = Dust.NewDustPerfect(new Vector2(NPC.Center.X + 119, NPC.Center.Y + 47).RotatedBy(NPC.rotation, NPC.Center), DustID.MushroomSpray, -NPC.velocity, 1, Color.SkyBlue, 0.7f);
|
||||
dust.velocity.Normalize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1428,7 +1442,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
if (NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
NPC.Opacity = 1f;
|
||||
return CalamityUtils.DrawAnimatedBestiaryWorm(spriteBatch, NPC, drawColor, TextureAssets.Npc[Type].Value, TextureAssets.Npc[ModContent.NPCType<PrimordialWyrmBody>()].Value, TextureAssets.Npc[ModContent.NPCType<PrimordialWyrmBodyAlt>()].Value, 3, 18, 0.4f, new Vector2(130, 60), 3, 10);
|
||||
return CalamityUtils.DrawAnimatedBestiaryWorm(spriteBatch, NPC, drawColor, TextureAssets.Npc[Type].Value, TextureAssets.Npc[ModContent.NPCType<PrimordialWyrmBody>()].Value, TextureAssets.Npc[ModContent.NPCType<PrimordialWyrmBodyAlt>()].Value, 3, 36, 0.2f, new Vector2(130, 60), 3, 10);
|
||||
}
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
@@ -1481,6 +1495,8 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, hit.HitDirection, -1f, 0, default, 1f);
|
||||
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm2").Type, 1f);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -22,14 +22,14 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
this.HideFromBestiary();
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "Glow", AssetRequestMode.AsyncLoad);
|
||||
GlowTexture = ModContent.Request<Texture2D>(Texture + "_Lightmask", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
NPC.damage = 100;
|
||||
NPC.width = 86;
|
||||
NPC.width = 100;
|
||||
NPC.height = 120;
|
||||
NPC.defense = 0;
|
||||
NPC.LifeMaxNERB(2500000, 3000000);
|
||||
@@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm4").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.Center, NPC.velocity, Mod.Find<ModGore>("PrimordialWyrm5").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 172 KiB |