This commit is contained in:
Dominic committed 2022-05-29 18:03:31 -05:00
commit be0d0217da
16 files changed
+102 -168

No files matched your search

+12 -1
View File
@@ -122,6 +122,7 @@ namespace CalamityMod.CalPlayer
public DoGCartSegment[] DoGCartSegments = new DoGCartSegment[DoGCartMount.SegmentCount];
public float SmoothenedMinecartRotation;
public bool LungingDown = false;
public int moveSpeedStat = 0;
#endregion
#region Speedrun Timer
@@ -1272,6 +1273,7 @@ namespace CalamityMod.CalPlayer
tag["exactRogueLevel"] = exactRogueLevel;
tag["itemTypeLastReforged"] = itemTypeLastReforged;
tag["reforgeTierSafety"] = reforgeTierSafety;
tag["moveSpeedStat"] = moveSpeedStat;
tag["defenseDamage"] = totalDefenseDamage;
tag["defenseDamageRecoveryFrames"] = defenseDamageRecoveryFrames;
tag["totalSpeedrunTicks"] = totalTicks;
@@ -1373,6 +1375,7 @@ namespace CalamityMod.CalPlayer
exactSummonLevel = tag.GetInt("exactSummonLevel");
exactRogueLevel = tag.GetInt("exactRogueLevel");
moveSpeedStat = tag.GetInt("moveSpeedStat");
totalDefenseDamage = tag.GetInt("defenseDamage");
defenseDamageRecoveryFrames = tag.GetInt("defenseDamageRecoveryFrames");
if (defenseDamageRecoveryFrames < 0)
@@ -3398,6 +3401,14 @@ namespace CalamityMod.CalPlayer
// Increase wall placement speed to speed up early game a bit and make building more fun
Player.wallSpeed += 0.5f;
// Takes the % move speed boost and reduces it to a quarter to get the actual speed increase
// 400% move speed boost = 80% run speed boost, so an 8 run speed would become 14.4 with a 400% move speed stat
float accRunSpeedMin = Player.accRunSpeed * 0.5f;
Player.accRunSpeed += Player.accRunSpeed * moveSpeedStat * 0.002f;
if (Player.accRunSpeed < accRunSpeedMin)
Player.accRunSpeed = accRunSpeedMin;
#region Melee Speed for Projectile Melee Weapons
float meleeSpeedMult = 0f;
if (community)
@@ -4713,7 +4724,7 @@ namespace CalamityMod.CalPlayer
damage = (int)(damage * 0.6);
break;
case ProjectileID.HallowStar:
damage = (int)(damage * 0.5);
damage = (int)(damage * 0.7);
break;
}
+3
View File
@@ -126,6 +126,9 @@ namespace CalamityMod.CalPlayer
// Limits
Limits();
// This is used to increase horizontal velocity based on the player's movement speed stat.
moveSpeedStat = (int)((Player.moveSpeed - 1f) * 100f);
// Double Jumps
DoubleJumps();
+6 -6
View File
@@ -1424,10 +1424,7 @@ namespace CalamityMod.Items
{
player.noFallDmg = true;
if (player.head == ArmorIDs.Head.StardustHelmet && player.body == ArmorIDs.Body.StardustPlate && player.legs == ArmorIDs.Legs.StardustLeggings)
{
player.maxMinions++;
player.GetDamage<SummonDamageClass>() += 0.05f;
}
player.GetDamage<SummonDamageClass>() += 0.1f;
}
else if (item.type == ItemID.FishronWings || item.type == ItemID.BetsyWings || item.type == ItemID.Yoraiz0rWings ||
item.type == ItemID.JimsWings || item.type == ItemID.SkiphsWings || item.type == ItemID.LokisWings ||
@@ -1574,15 +1571,18 @@ namespace CalamityMod.Items
public override void HorizontalWingSpeeds(Item item, Player player, ref float speed, ref float acceleration)
{
CalamityPlayer modPlayer = player.Calamity();
float moveSpeedBoost = modPlayer.moveSpeedStat * 0.001f;
float flightSpeedMult = 1f +
(modPlayer.soaring ? 0.1f : 0f) +
(modPlayer.profanedRage ? 0.05f : 0f) +
(modPlayer.draconicSurge ? 0.1f : 0f) +
(modPlayer.reaverSpeed ? 0.1f : 0f);
(modPlayer.reaverSpeed ? 0.1f : 0f) +
moveSpeedBoost;
float flightAccMult = 1f +
(modPlayer.draconicSurge ? 0.1f : 0f);
(modPlayer.draconicSurge ? 0.1f : 0f) +
moveSpeedBoost;
flightSpeedMult = MathHelper.Clamp(flightSpeedMult, 0.5f, 1.5f);
speed *= flightSpeedMult;
+5 -6
View File
@@ -500,6 +500,10 @@ namespace CalamityMod.Items
// Rebalances to vanilla item stats
#region Vanilla Item Rebalance Tooltips
// Frozen Turtle Shell rebalance.
if (item.type == ItemID.FrozenTurtleShell)
EditTooltipByNum(0, (line) => line.Text = "Puts a shell around the owner when below 50% life that reduces damage by 15%");
// Ale and Sake rebalance.
if (item.type == ItemID.Ale || item.type == ItemID.Sake)
EditTooltipByNum(0, (line) => line.Text = "Increases melee damage and speed by 10% and reduces defense by 10%");
@@ -726,11 +730,6 @@ namespace CalamityMod.Items
if (item.type == ItemID.AncientBattleArmorHat || item.type == ItemID.AncientBattleArmorShirt || item.type == ItemID.AncientBattleArmorPants
&& !Main.LocalPlayer.Calamity().forbiddenCirclet)
EditTooltipByName("SetBonus", (line) => line.Text += "\nThe minion damage nerf is reduced while wielding magic weapons");
// Stardust
// 1) Chest and Legs only give 1 minion slot each instead of 2 each.
if (item.type == ItemID.StardustBreastplate || item.type == ItemID.StardustLeggings)
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace('2', '1'));
#endregion
// Provide the full stats of every vanilla set of wings
@@ -855,7 +854,7 @@ namespace CalamityMod.Items
"while wearing the Solar Flare Armor");
if (item.type == ItemID.WingsStardust)
AddWingStats(9f, 2.5f, 3, 180, "+1 max minion and 5% increased minion damage while wearing the Stardust Armor");
AddWingStats(9f, 2.5f, 3, 180, "10% increased minion damage while wearing the Stardust Armor");
if (item.type == ItemID.WingsVortex)
AddWingStats(6.5f, 1.5f, 2, 180, "3% increased ranged damage and 7% increased ranged critical strike chance\n" +
+1
View File
@@ -402,6 +402,7 @@ namespace CalamityMod.Items
{ ItemID.SapphireStaff, Do(AutoReuse, DamageExact(25)) },
{ ItemID.SanguineStaff, Do(AutoReuse, UseExact(25)) },
{ ItemID.SawtoothShark, Do(TrueMelee, AxePower(45), UseTimeExact(4), TileBoostExact(-1)) },
{ ItemID.ScytheWhip, autoReuse },
{ ItemID.SDMG, pointBlank },
{ ItemID.Seedler, Do(DamageRatio(1.5f)) },
{ ItemID.Shackle, Do(DefenseDelta(+2)) },
@@ -1,26 +0,0 @@
using Terraria;
using Terraria.ID;
namespace CalamityMod.Items.VanillaArmorChanges
{
public class StardustArmorSetChange : VanillaArmorChange
{
public override int? HeadPieceID => ItemID.StardustHelmet;
public override int? BodyPieceID => ItemID.StardustBreastplate;
public override int? LegPieceID => ItemID.StardustLeggings;
public override string ArmorSetName => "Stardust";
public override void ApplyBodyPieceEffect(Player player)
{
player.maxMinions--;
}
public override void ApplyLegPieceEffect(Player player)
{
player.maxMinions--;
}
}
}
+1 -1
View File
@@ -4259,7 +4259,7 @@ namespace CalamityMod.NPCs
{
if (projectile.Calamity().pointBlankShotDuration > 0)
{
double pointBlankShotDamageMultiplier = 1D + (projectile.Calamity().pointBlankShotDuration / CalamityGlobalProjectile.basePointBlankShotDuration * 0.5);
double pointBlankShotDamageMultiplier = 1D + (projectile.Calamity().pointBlankShotDuration / (CalamityGlobalProjectile.basePointBlankShotDuration * 0.5));
damage = (int)(damage * pointBlankShotDamageMultiplier);
projectile.Calamity().pointBlankShotDuration = 0;
}
-35
View File
@@ -63,13 +63,6 @@ namespace CalamityMod.NPCs.DesertScourge
public override void AI()
{
Player player = Main.player[NPC.target];
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
float burrowTimeGateValue = death ? 420f : 540f;
bool burrow = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] >= burrowTimeGateValue;
if (NPC.ai[2] > 0f)
NPC.realLife = (int)NPC.ai[2];
@@ -110,34 +103,6 @@ namespace CalamityMod.NPCs.DesertScourge
if (Main.player[NPC.target].dead)
NPC.TargetClosest(false);
if (Main.netMode != NetmodeID.MultiplayerClient && revenge && !burrow)
{
NPC.localAI[0] += malice ? 6f : Main.rand.Next(4);
if (NPC.localAI[0] >= Main.rand.Next(1400, 26001))
{
NPC.localAI[0] = 0f;
if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height))
{
Vector2 vector104 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2));
float num942 = player.position.X + (float)player.width * 0.5f - vector104.X;
float num943 = player.position.Y + (float)player.height * 0.5f - vector104.Y;
float num944 = (float)Math.Sqrt((double)(num942 * num942 + num943 * num943));
int projectileType = ModContent.ProjectileType<SandBlast>();
float num941 = malice ? 9f : 6f;
num944 = num941 / num944;
num942 *= num944;
num943 *= num944;
vector104.X += num942 * 5f;
vector104.Y += num943 * 5f;
if (Main.rand.NextBool(2) || malice)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), vector104.X, vector104.Y, num942, num943, projectileType, NPC.GetProjectileDamage(projectileType), 0f, Main.myPlayer, 0f, 0f);
}
NPC.netUpdate = true;
}
}
}
Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f);
float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2);
float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2);
+46 -53
View File
@@ -128,8 +128,11 @@ namespace CalamityMod.NPCs.DevourerofGods
private int idleCounter = idleCounterMax;
private int postTeleportTimer = 0;
private int teleportTimer = -1;
private const int TimeBeforeTeleport_Death = 120;
private const int TimeBeforeTeleport_Revengeance = 140;
private const int TimeBeforeTeleport_Expert = 160;
private const int TimeBeforeTeleport_Normal = 180;
private bool spawnedGuardians3 = false;
private int preventBullshitHitsAtStartofFinalPhaseTimer = 0;
private const float alphaGateValue = 669f;
// Death animation variables
@@ -220,7 +223,6 @@ namespace CalamityMod.NPCs.DevourerofGods
writer.Write(laserWallPhase);
writer.Write(laserWallType_Phase2);
writer.Write(postTeleportTimer);
writer.Write(preventBullshitHitsAtStartofFinalPhaseTimer);
writer.Write(teleportTimer);
writer.Write(NPC.Opacity);
@@ -273,7 +275,6 @@ namespace CalamityMod.NPCs.DevourerofGods
laserWallPhase = reader.ReadInt32();
laserWallType_Phase2 = reader.ReadInt32();
postTeleportTimer = reader.ReadInt32();
preventBullshitHitsAtStartofFinalPhaseTimer = reader.ReadInt32();
teleportTimer = reader.ReadInt32();
NPC.Opacity = reader.ReadSingle();
@@ -322,14 +323,14 @@ namespace CalamityMod.NPCs.DevourerofGods
// Phase 1 phases
bool phase2 = lifeRatio < 0.9f;
bool phase3 = lifeRatio < 0.68f;
bool phase3 = lifeRatio < 0.75f;
bool summonSentinels = lifeRatio < 0.6f;
// Phase 2 phases
bool phase4 = lifeRatio < 0.48f;
bool phase5 = lifeRatio < 0.36f;
bool phase6 = lifeRatio < 0.18f;
bool phase7 = lifeRatio < 0.09f;
bool phase4 = lifeRatio < 0.5f;
bool phase5 = lifeRatio < 0.4f;
bool phase6 = lifeRatio < 0.2f;
bool phase7 = lifeRatio < 0.15f;
// Velocity variables
float fallSpeed = malice ? 19f : death ? 17.5f : 16f;
@@ -421,8 +422,15 @@ namespace CalamityMod.NPCs.DevourerofGods
}
// Teleport after the Phase 2 animation.
if (NPC.localAI[2] == 61f)
Teleport(player, malice, death, revenge, expertMode, phase5, true);
float timeWhenDoGShouldTeleportDuringPhase2Countdown = 61f;
if (NPC.localAI[2] == timeWhenDoGShouldTeleportDuringPhase2Countdown + ((CalamityWorld.death || BossRushEvent.BossRushActive) ? TimeBeforeTeleport_Death : CalamityWorld.revenge ? TimeBeforeTeleport_Revengeance : Main.expertMode ? TimeBeforeTeleport_Expert : TimeBeforeTeleport_Normal))
SpawnTeleportLocation(player, true);
if (NPC.localAI[2] == timeWhenDoGShouldTeleportDuringPhase2Countdown)
Teleport(player, malice, death, revenge, expertMode, phase5);
// Just in case the projectile cap is reached and the teleport rift doesn't spawn.
if (AwaitingPhase2Teleport && NPC.localAI[2] == 0f)
AwaitingPhase2Teleport = false;
// Be invincibile until the phase 2 teleport happens.
// This is done to prevent DoG from suddenly and weirdly re-appearing after entering the phase 1 portal.
@@ -461,7 +469,6 @@ namespace CalamityMod.NPCs.DevourerofGods
// Once before DoG spawns, set new size and become visible again.
if (NPC.localAI[2] == 60f)
{
preventBullshitHitsAtStartofFinalPhaseTimer = 180;
NPC.position = NPC.Center;
NPC.width = 186;
NPC.height = 186;
@@ -533,12 +540,14 @@ namespace CalamityMod.NPCs.DevourerofGods
else
{
// Immunity after teleport and when dying
NPC.dontTakeDamage = postTeleportTimer > 0 || preventBullshitHitsAtStartofFinalPhaseTimer > 0 || Dying;
NPC.dontTakeDamage = postTeleportTimer > 0 || Dying;
// Teleport
if (teleportTimer >= 0)
// Teleport countdown
if (teleportTimer > 0)
{
teleportTimer--;
// Teleport
if (teleportTimer == 0)
Teleport(player, malice, death, revenge, expertMode, phase5);
}
@@ -552,10 +561,14 @@ namespace CalamityMod.NPCs.DevourerofGods
}
// Laser walls
if (phase4 && !phase6 && postTeleportTimer <= 0)
if (phase4 && !spawnedGuardians3 && postTeleportTimer <= 0)
{
if (laserWallPhase == (int)LaserWallPhase.SetUp)
{
// Enter laser wall phase very quickly when final phase starts
if (phase6 && calamityGlobalNPC.newAI[3] < alphaGateValue)
calamityGlobalNPC.newAI[3] = alphaGateValue;
// Increment next laser wall phase timer
calamityGlobalNPC.newAI[3] += 1f;
@@ -563,10 +576,10 @@ namespace CalamityMod.NPCs.DevourerofGods
if (calamityGlobalNPC.newAI[3] > alphaGateValue)
{
// Disable teleports
if (teleportTimer >= 0)
if (teleportTimer > 0)
{
GetRiftLocation(false);
teleportTimer = -1;
teleportTimer = 0;
}
NPC.Opacity = 1f - (MathHelper.Clamp((calamityGlobalNPC.newAI[3] - alphaGateValue) * 5f, 0f, 255f) / 255f);
@@ -608,31 +621,19 @@ namespace CalamityMod.NPCs.DevourerofGods
}
else
{
// Set alpha after teleport
// Set opacity after teleport
if (postTeleportTimer > 0)
{
postTeleportTimer--;
if (postTeleportTimer < 0)
postTeleportTimer = 0;
NPC.Opacity = 1f - (postTeleportTimer / 255f);
}
else
{
NPC.Opacity += 0.024f;
if (NPC.Opacity >= 1f)
if (NPC.Opacity > 1f)
NPC.Opacity = 1f;
}
// This exists so that DoG doesn't sometimes hit the player when he goes to phase 2 or final phase
if (preventBullshitHitsAtStartofFinalPhaseTimer > 0)
{
preventBullshitHitsAtStartofFinalPhaseTimer--;
if (NPC.Opacity > 0.996f)
NPC.Opacity = 0.996f;
}
// Reset laser wall phase
if (laserWallPhase > (int)LaserWallPhase.SetUp)
laserWallPhase = (int)LaserWallPhase.SetUp;
@@ -640,9 +641,9 @@ namespace CalamityMod.NPCs.DevourerofGods
// Enter final phase
if (!spawnedGuardians3 && phase6)
{
SpawnTeleportLocation(player);
preventBullshitHitsAtStartofFinalPhaseTimer = 180;
// Reset laser wall timers to 0
calamityGlobalNPC.newAI[1] = 0f;
calamityGlobalNPC.newAI[3] = 0f;
// Anger message
string key = "Mods.CalamityMod.EdgyBossText11";
@@ -693,7 +694,7 @@ namespace CalamityMod.NPCs.DevourerofGods
calamityGlobalNPC.newAI[0] = 0f;
// Laser walls
if (!phase6 && laserWallPhase == (int)LaserWallPhase.FireLaserWalls)
if (!spawnedGuardians3 && laserWallPhase == (int)LaserWallPhase.FireLaserWalls)
{
float spawnOffset = 1500f;
float divisor = malice ? 80f : 120f;
@@ -848,7 +849,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
// Set flight time to max during laser walls
if (!phase6 && laserWallPhase == (int)LaserWallPhase.FireLaserWalls)
if (!spawnedGuardians3 && laserWallPhase == (int)LaserWallPhase.FireLaserWalls)
{
if (Main.netMode != NetmodeID.Server)
{
@@ -921,7 +922,7 @@ namespace CalamityMod.NPCs.DevourerofGods
int num44 = (int)(player.Center.Y / 16f);
// Charge at target for 1.5 seconds
bool flyAtTarget = (!phase4 || phase6) && calamityGlobalNPC.newAI[2] > phaseLimit - 90 && revenge;
bool flyAtTarget = (!phase4 || spawnedGuardians3) && calamityGlobalNPC.newAI[2] > phaseLimit - 90 && revenge;
for (int num45 = num43 - 2; num45 <= num43 + 2; num45++)
{
@@ -1108,9 +1109,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (increaseSpeedMore)
{
if (laserWallPhase == (int)LaserWallPhase.SetUp && calamityGlobalNPC.newAI[3] <= alphaGateValue)
{
SpawnTeleportLocation(player);
}
else
groundPhaseTurnSpeed *= 4f;
}
@@ -2043,32 +2042,26 @@ namespace CalamityMod.NPCs.DevourerofGods
NPC.life = Main.npc[(int)NPC.ai[0]].life;
}
private void SpawnTeleportLocation(Player player)
private void SpawnTeleportLocation(Player player, bool phase2Transition = false)
{
if (teleportTimer > -1 || player.dead || !player.active)
if (teleportTimer > 0 || player.dead || !player.active)
return;
teleportTimer = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 120 : CalamityWorld.revenge ? 140 : Main.expertMode ? 160 : 180;
if (!phase2Transition)
teleportTimer = (CalamityWorld.death || BossRushEvent.BossRushActive) ? TimeBeforeTeleport_Death : CalamityWorld.revenge ? TimeBeforeTeleport_Revengeance : Main.expertMode ? TimeBeforeTeleport_Expert : TimeBeforeTeleport_Normal;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int randomRange = 48;
float distance = 640f;
float distance = 500f;
Vector2 targetVector = player.Center + player.velocity.SafeNormalize(Vector2.UnitX) * distance + new Vector2(Main.rand.Next(-randomRange, randomRange + 1), Main.rand.Next(-randomRange, randomRange + 1));
SoundEngine.PlaySound(SoundID.Item109, player.Center);
Projectile.NewProjectile(NPC.GetSource_FromAI(), targetVector, Vector2.Zero, ModContent.ProjectileType<DoGTeleportRift>(), 0, 0f, Main.myPlayer, NPC.whoAmI);
}
}
private void Teleport(Player player, bool malice, bool death, bool revenge, bool expertMode, bool phase5, bool phase2Transition = false)
private void Teleport(Player player, bool malice, bool death, bool revenge, bool expertMode, bool phase5)
{
if (Main.netMode != NetmodeID.MultiplayerClient && phase2Transition)
{
int randomRange = 48;
float distance = 1080f;
Vector2 targetVector = player.Center + player.velocity.SafeNormalize(Vector2.UnitX) * distance + new Vector2(Main.rand.Next(-randomRange, randomRange + 1), Main.rand.Next(-randomRange, randomRange + 1));
Projectile.NewProjectile(NPC.GetSource_FromAI(), targetVector, Vector2.Zero, ModContent.ProjectileType<DoGTeleportRift>(), 0, 0f, Main.myPlayer, NPC.whoAmI);
}
Vector2 newPosition = GetRiftLocation(true);
if ((!AwaitingPhase2Teleport && (player.dead || !player.active)) || newPosition == default)
@@ -2400,7 +2393,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (dist4 < minDist)
minDist = dist4;
return minDist <= (Phase2Started ? 80f : 55f) && (NPC.Opacity >= 1f || postTeleportTimer > 0) && preventBullshitHitsAtStartofFinalPhaseTimer <= 0;
return minDist <= (Phase2Started ? 80f : 55f) && (NPC.Opacity >= 1f || postTeleportTimer > 0);
}
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
+1 -1
View File
@@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.DevourerofGods
NPC.Opacity = Main.npc[CalamityGlobalNPC.DoGHead].Opacity;
// Fly up and despawn if DoG enters phase 2 and isn't in the final Cosmic Guardian spawn phase.
bool flyAwayAndDespawn = (Main.npc[CalamityGlobalNPC.DoGHead].life / (float)Main.npc[CalamityGlobalNPC.DoGHead].lifeMax < 0.6f && Main.npc[CalamityGlobalNPC.DoGHead].life / (float)Main.npc[CalamityGlobalNPC.DoGHead].lifeMax > 0.18f) || Main.npc[CalamityGlobalNPC.DoGHead].life <= 1;
bool flyAwayAndDespawn = (Main.npc[CalamityGlobalNPC.DoGHead].life / (float)Main.npc[CalamityGlobalNPC.DoGHead].lifeMax < 0.6f && Main.npc[CalamityGlobalNPC.DoGHead].life / (float)Main.npc[CalamityGlobalNPC.DoGHead].lifeMax > 0.2f) || Main.npc[CalamityGlobalNPC.DoGHead].life <= 1;
if (flyAwayAndDespawn)
{
// Prevents them from doing damage while despawning.
+1 -1
View File
@@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.DevourerofGods
{
float intensity = GetIntensity();
float lifeRatio = Main.npc[DoGIndex].life / (float)Main.npc[DoGIndex].lifeMax;
double blackScreenLife_GateValue = (lifeRatio < 0.6f && Main.npc[DoGIndex].localAI[2] <= 2f) ? 0.09 : 0.66;
double blackScreenLife_GateValue = (lifeRatio < 0.6f && Main.npc[DoGIndex].localAI[2] <= 2f) ? 0.15 : 0.75;
if (Main.npc[DoGIndex].life < Main.npc[DoGIndex].lifeMax * blackScreenLife_GateValue || CalamityWorld.death || BossRushEvent.BossRushActive)
{
spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight),
+5 -16
View File
@@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.StormWeaver
if (NPC.ai[0] % bodySegmentDivisor == 0f)
{
NPC.TargetClosest();
float projectileVelocity = death ? 5f : revenge ? 4.75f : expertMode ? 4.5f : 4f;
float projectileVelocity = death ? 6.25f : revenge ? 5.75f : expertMode ? 5.5f : 5f;
Vector2 velocityVector = Vector2.Normalize(player.Center - NPC.Center) * projectileVelocity;
int type = ModContent.ProjectileType<DestroyerElectricLaser>();
int damage = NPC.GetProjectileDamage(type);
@@ -250,8 +250,8 @@ namespace CalamityMod.NPCs.StormWeaver
float lifeRatio = NPC.life / (float)NPC.lifeMax;
bool phase2 = lifeRatio < 0.8f;
bool phase3 = lifeRatio < 0.6f;
bool phase4 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.65f;
bool phase4 = lifeRatio < 0.5f;
// Gate value that decides when Storm Weaver will charge
float chargePhaseGateValue = malice ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
@@ -319,8 +319,8 @@ namespace CalamityMod.NPCs.StormWeaver
float lifeRatio = NPC.life / (float)NPC.lifeMax;
bool phase3 = lifeRatio < 0.6f;
bool phase4 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.65f;
bool phase4 = lifeRatio < 0.5f;
// Gate value that decides when Storm Weaver will charge
float chargePhaseGateValue = malice ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
@@ -338,17 +338,6 @@ namespace CalamityMod.NPCs.StormWeaver
return false;
}
public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
{
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x) && NPC.life / (float)NPC.lifeMax >= 0.8f)
{
if (projectile.penetrate == -1 && !projectile.minion)
projectile.penetrate = 1;
else if (projectile.penetrate >= 1)
projectile.penetrate = 1;
}
}
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
+15 -16
View File
@@ -148,10 +148,10 @@ namespace CalamityMod.NPCs.StormWeaver
bool phase2 = lifeRatio < 0.8f;
// Start calling down frost waves from the sky in sheets
bool phase3 = lifeRatio < 0.6f;
bool phase3 = lifeRatio < 0.65f;
// Lightning strike flash phase and start summoning tornadoes
bool phase4 = lifeRatio < 0.4f;
bool phase4 = lifeRatio < 0.5f;
// Update armored settings to naked settings
if (phase2)
@@ -394,35 +394,34 @@ namespace CalamityMod.NPCs.StormWeaver
// Start fast at index 0, become slower as each projectile spawns and then become faster past the central wave
int centralWave = totalWaves / 2;
float oneSixth = 1f / 6f;
float velocityY = 8f;
float velocityY = 6f;
int wavePatternType = revenge ? Main.rand.Next(3) : expertMode ? Main.rand.Next(2) + 1 : 2;
for (int x = 0; x < totalWaves; x++)
{
switch (wavePatternType)
{
// Starts at 8, central point is 6 and the end is 8
// Starts at 6, central point is 4.5 and the end is 6
case 0:
if (x != 0)
{
if (x <= centralWave)
velocityY -= oneSixth;
velocityY -= 0.125f;
else
velocityY += oneSixth;
velocityY += 0.125f;
}
break;
// Starts at 8 and alternates between 6 and 8
// Starts at 6 and alternates between 4.5 and 6
case 1:
if (x != 0)
{
if (x % 2 == 0)
velocityY += 2f;
velocityY += 1.5f;
else
velocityY -= 2f;
velocityY -= 1.5f;
}
break;
@@ -430,7 +429,7 @@ namespace CalamityMod.NPCs.StormWeaver
// Flat line of slower waves
case 2:
velocityY = 7f;
velocityY = 5.25f;
break;
}
@@ -455,7 +454,7 @@ namespace CalamityMod.NPCs.StormWeaver
int projectileType = ModContent.ProjectileType<StormMarkHostile>();
int tornadoDamage = NPC.GetProjectileDamage(projectileType);
int totalTornadoes = revenge ? 5 : 3;
float spawnDistance = revenge ? 640f : 960f;
float spawnDistance = revenge ? 720f : 960f;
for (int i = 0; i < totalTornadoes; i++)
{
Vector2 spawnPosition = Main.player[NPC.target].Center + Vector2.UnitX * spawnDistance * (i - totalTornadoes / 2);
@@ -748,8 +747,8 @@ namespace CalamityMod.NPCs.StormWeaver
float lifeRatio = NPC.life / (float)NPC.lifeMax;
bool phase2 = lifeRatio < 0.8f;
bool phase3 = lifeRatio < 0.6f;
bool phase4 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.65f;
bool phase4 = lifeRatio < 0.5f;
// Gate value that decides when Storm Weaver will charge
float chargePhaseGateValue = malice ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
@@ -817,8 +816,8 @@ namespace CalamityMod.NPCs.StormWeaver
float lifeRatio = NPC.life / (float)NPC.lifeMax;
bool phase3 = lifeRatio < 0.6f;
bool phase4 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.65f;
bool phase4 = lifeRatio < 0.5f;
// Gate value that decides when Storm Weaver will charge
float chargePhaseGateValue = malice ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
+4 -4
View File
@@ -242,8 +242,8 @@ namespace CalamityMod.NPCs.StormWeaver
float lifeRatio = NPC.life / (float)NPC.lifeMax;
bool phase2 = lifeRatio < 0.8f;
bool phase3 = lifeRatio < 0.6f;
bool phase4 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.65f;
bool phase4 = lifeRatio < 0.5f;
// Gate value that decides when Storm Weaver will charge
float chargePhaseGateValue = malice ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
@@ -319,8 +319,8 @@ namespace CalamityMod.NPCs.StormWeaver
float lifeRatio = NPC.life / (float)NPC.lifeMax;
bool phase3 = lifeRatio < 0.6f;
bool phase4 = lifeRatio < 0.4f;
bool phase3 = lifeRatio < 0.65f;
bool phase4 = lifeRatio < 0.5f;
// Gate value that decides when Storm Weaver will charge
float chargePhaseGateValue = malice ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
+1 -1
View File
@@ -244,6 +244,7 @@ namespace CalamityMod.Projectiles
case ProjectileID.EnchantedBoomerang:
case ProjectileID.IceBoomerang:
case ProjectileID.FruitcakeChakram:
case ProjectileID.BlueMoon:
projectile.extraUpdates = 1;
break;
@@ -273,7 +274,6 @@ namespace CalamityMod.Projectiles
projectile.localNPCHitCooldown = 20;
break;
case ProjectileID.BlueMoon:
case ProjectileID.Flamarang:
projectile.extraUpdates = 2;
break;
+1 -1
View File
@@ -543,7 +543,7 @@ namespace CalamityMod
{
{ new Tuple<int, int>(ModContent.NPCType<KingSlimeJewel>(), ModContent.ProjectileType<JewelProjectile>()), new int[] { 22, 36, 44, 48, 66 } },
{ new Tuple<int, int>(ModContent.NPCType<DesertScourgeBody>(), ModContent.ProjectileType<SandBlast>()), new int[] { 26, 44, 60, 68, 90 } },
{ new Tuple<int, int>(ModContent.NPCType<DesertScourgeHead>(), ModContent.ProjectileType<SandBlast>()), new int[] { 26, 44, 60, 68, 90 } },
{ new Tuple<int, int>(ModContent.NPCType<CrabulonIdle>(), ModContent.ProjectileType<MushBomb>()), new int[] { 32, 48, 60, 68, 90 } },
{ new Tuple<int, int>(ModContent.NPCType<CrabulonIdle>(), ModContent.ProjectileType<MushBombFall>()), new int[] { 32, 48, 60, 68, 90 } },