1 - Rev+ Plantera charge afterimages.
2 - Fixed an issue with Rev+ Plantera's phase 2 seed spreads not being fast enough.
This commit is contained in:
1 parent
ebc51fbaf5
commit
072f2259fe
5 files changed
+33
-21
No files matched your search
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor.Reaver
|
||||
modPlayer.reaverDefense = true;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.setBonus = this.GetLocalizedValue("SetBonus");
|
||||
//Reaver Rage provides 30% damage to offset the helm "bonus", 5 def, and 5% melee speed.
|
||||
// Reaver Rage provides 30% damage to offset the helm "bonus", 5 def, and 5% melee speed.
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -1119,6 +1119,13 @@ namespace CalamityMod.NPCs
|
||||
#endregion
|
||||
|
||||
#region Set Defaults
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
// Set Plantera to be able to update oldPos[x]
|
||||
// This is only used for her Rev+ AI charge attacks
|
||||
NPCID.Sets.TrailingMode[NPCID.Plantera] = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults(NPC npc)
|
||||
{
|
||||
ShouldFallThroughPlatforms = false;
|
||||
@@ -7184,6 +7191,24 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
float telegraphScalar = MathHelper.Clamp((Math.Abs(PlanteraAI.StopChargeGateValue) - telegraphTimer) / Math.Abs(PlanteraAI.StopChargeGateValue), 0f, 1f);
|
||||
Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar);
|
||||
|
||||
if (CalamityConfig.Instance.Afterimages)
|
||||
{
|
||||
int afterimageAmount = 10;
|
||||
int afterImageIncrement = 2;
|
||||
for (int j = 0; j < afterimageAmount; j += afterImageIncrement)
|
||||
{
|
||||
Color afterimageColor = telegraphColor;
|
||||
afterimageColor = Color.Lerp(afterimageColor, originalColor, 0.5f);
|
||||
afterimageColor = npc.GetAlpha(afterimageColor);
|
||||
afterimageColor *= (afterimageAmount - j) / 15f;
|
||||
Vector2 afterimagePos = npc.oldPos[j] + new Vector2(npc.width, npc.height) / 2f - screenPos;
|
||||
afterimagePos -= new Vector2(npcTexture.Width, npcTexture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f;
|
||||
afterimagePos += origin * npc.scale + new Vector2(0f, npc.gfxOffY) + glowOffset;
|
||||
spriteBatch.Draw(npcTexture, afterimagePos, npc.frame, afterimageColor, npc.rotation, origin, npc.scale, spriteEffects, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
spriteBatch.Draw(npcTexture, drawPosition, npc.frame, telegraphColor, npc.rotation, origin, npc.scale, spriteEffects, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-18
@@ -127,9 +127,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
public override void ModifyTypeName(ref string typeName)
|
||||
{
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
typeName = CalamityUtils.GetTextValue("NPCs.BoomerDuke");
|
||||
}
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
@@ -139,9 +137,8 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
{
|
||||
int frameChangeFrequency = tired ? 14 : 7;
|
||||
if (NPC.ai[0] == 5f || NPC.ai[0] == 12f)
|
||||
{
|
||||
frameChangeFrequency = tired ? 12 : 6;
|
||||
}
|
||||
|
||||
NPC.frameCounter += 1D;
|
||||
if (NPC.frameCounter > frameChangeFrequency)
|
||||
{
|
||||
@@ -149,18 +146,15 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
NPC.frame.Y += frameHeight;
|
||||
}
|
||||
if (NPC.frame.Y >= frameHeight * 6)
|
||||
{
|
||||
NPC.frame.Y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (NPC.ai[0] == 1f || NPC.ai[0] == 6f || NPC.ai[0] == 11f)
|
||||
{
|
||||
NPC.frame.Y = frameHeight * 2;
|
||||
}
|
||||
|
||||
if (NPC.ai[0] == 2f || NPC.ai[0] == 7f || NPC.ai[0] == 14f)
|
||||
{
|
||||
NPC.frame.Y = frameHeight * 6;
|
||||
}
|
||||
|
||||
if (NPC.ai[0] == 3f || NPC.ai[0] == 8f || NPC.ai[0] == 13f || NPC.ai[0] == -1f)
|
||||
{
|
||||
int frameChangeGateValue = 120;
|
||||
@@ -173,19 +167,16 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
NPC.frame.Y += frameHeight;
|
||||
}
|
||||
if (NPC.frame.Y >= frameHeight * 6)
|
||||
{
|
||||
NPC.frame.Y = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NPC.frame.Y = frameHeight * 5;
|
||||
if (NPC.ai[2] > (frameChangeGateValue - 40) && NPC.ai[2] < (frameChangeGateValue - 15))
|
||||
{
|
||||
NPC.frame.Y = frameHeight * 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (NPC.ai[0] == 4f || NPC.ai[0] == 9f)
|
||||
{
|
||||
int secondFrameChangeGateValue = 180;
|
||||
@@ -198,17 +189,13 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
NPC.frame.Y += frameHeight;
|
||||
}
|
||||
if (NPC.frame.Y >= frameHeight * 6)
|
||||
{
|
||||
NPC.frame.Y = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NPC.frame.Y = frameHeight * 5;
|
||||
if (NPC.ai[2] > (secondFrameChangeGateValue - 50) && NPC.ai[2] < (secondFrameChangeGateValue - 25))
|
||||
{
|
||||
NPC.frame.Y = frameHeight * 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, perturbedSpeed * projectileSpeed * 0.25f, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileSpeed);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), spawnOffset, perturbedSpeed * projectileSpeed * 0.5f, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileSpeed);
|
||||
}
|
||||
|
||||
if (death)
|
||||
|
||||
@@ -2265,7 +2265,7 @@ namespace CalamityMod.Projectiles
|
||||
if (projectile.ai[2] > 0f)
|
||||
{
|
||||
if (projectile.velocity.Length() < projectile.ai[2])
|
||||
projectile.velocity *= 1.025f;
|
||||
projectile.velocity *= 1.012f;
|
||||
}
|
||||
|
||||
projectile.frameCounter++;
|
||||
|
||||
Reference in new issue
Block a user