The Evolution now has the new Black Belt dodge and cooldown stuff.

This commit is contained in:
mountaindrew10 committed 2024-03-10 01:33:13 -06:00
1 parent 582ca1487a
commit 4bb8ed8a22
3 files changed
+24 -5

No files matched your search

+4 -1
View File
@@ -41,8 +41,11 @@
internal static readonly int AmalgamDodgeCooldownMax = 5400;
internal static readonly int MirrorDodgeCooldownMin = 900;
internal static readonly int MirrorDodgeCooldownMax = 5400;
internal static readonly int DaedalusReflectCooldown = 5400;
internal static readonly int EvolutionReflectCooldown = 5400;
internal static readonly int EvolutionReflectCooldownMin = 900;
internal static readonly int EvolutionReflectCooldownMax = 5400;
#endregion
#region Damage
+16 -2
View File
@@ -896,9 +896,21 @@ namespace CalamityMod.CalPlayer
// This should probably be changed so that when the evolution reflects it gives you 1 frame of guaranteed free dodging everything.
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
{
double dodgeDamageGateValuePercent = 0.05;
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
// Reflects count as dodges. They share the timer and can be disabled by Armageddon right click.
if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID))
if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID) && proj.damage >= dodgeDamageGateValue)
{
double maxCooldownDurationDamagePercent = 0.5;
int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent));
// Just in case...
if (maxCooldownDurationDamageValue <= 0)
maxCooldownDurationDamageValue = 1;
float cooldownDurationScalar = MathHelper.Clamp((proj.damage - dodgeDamageGateValue) / maxCooldownDurationDamageValue, 0f, 1f);
// The Evolution
if (evolution)
{
@@ -913,7 +925,9 @@ namespace CalamityMod.CalPlayer
evolutionLifeRegenCounter = 300;
projTypeJustHitBy = proj.type;
Player.AddCooldown(GlobalDodge.ID, BalancingConstants.EvolutionReflectCooldown);
int cooldownDuration = (int)MathHelper.Lerp(BalancingConstants.EvolutionReflectCooldownMin, BalancingConstants.EvolutionReflectCooldownMax, cooldownDurationScalar);
Player.AddCooldown(GlobalDodge.ID, cooldownDuration);
return;
}
}
@@ -1828,8 +1828,10 @@ TheEvolution: {
Tooltip:
'''
You reflect projectiles when they hit you
Reflected projectiles deal no damage to you
This reflect has a 90 second cooldown which is shared with all other dodges and reflects
Reflected projectiles deal no damage to you
Projectiles that deal less than 5% of your max life in damage will not be reflected
The reflect has a cooldown that ranges between 15 and 90 seconds depending on the reflected projectile's damage
This cooldown is shared with all other dodges and reflects
After reflecting something, grants +1 HP/s life regen and accelerated life regen for 5 seconds
If the same enemy projectile type hits you again you will resist its damage by 15%
'''