Abyssal Mirror and Eclipse Mirror now use the new dodge and cooldown system of the Black Belt, BoC and Amalgam.

This commit is contained in:
mountaindrew10 committed 2024-03-10 00:45:23 -06:00
1 parent eeeab07e8b
commit 582ca1487a
3 files changed
+35 -10

No files matched your search

+2 -1
View File
@@ -39,7 +39,8 @@
internal static readonly int BrainDodgeCooldownMax = 5400;
internal static readonly int AmalgamDodgeCooldownMin = 900;
internal static readonly int AmalgamDodgeCooldownMax = 5400;
internal static readonly int MirrorDodgeCooldown = 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;
#endregion
+27 -7
View File
@@ -135,11 +135,21 @@ namespace CalamityMod.CalPlayer
NetMessage.SendData(MessageID.Dodge, -1, -1, null, Player.whoAmI, 1f, 0f, 0f, 0, 0, 0);
}
public void AbyssMirrorDodge()
public void AbyssMirrorDodge(double dodgeDamageGateValuePercent, int dodgeDamageGateValue, int hitDamage)
{
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((hitDamage - dodgeDamageGateValue) / maxCooldownDurationDamageValue, 0f, 1f);
if (Player.whoAmI == Main.myPlayer && abyssalMirror && !eclipseMirror)
{
Player.AddCooldown(GlobalDodge.ID, BalancingConstants.MirrorDodgeCooldown, true, "abyssmirror");
int cooldownDuration = (int)MathHelper.Lerp(BalancingConstants.MirrorDodgeCooldownMin, BalancingConstants.MirrorDodgeCooldownMax, cooldownDurationScalar);
Player.AddCooldown(GlobalDodge.ID, cooldownDuration, true, "abyssmirror");
// TODO -- why is this here?
Player.noKnockback = true;
@@ -169,11 +179,21 @@ namespace CalamityMod.CalPlayer
}
}
public void EclipseMirrorDodge()
public void EclipseMirrorDodge(double dodgeDamageGateValuePercent, int dodgeDamageGateValue, int hitDamage)
{
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((hitDamage - dodgeDamageGateValue) / maxCooldownDurationDamageValue, 0f, 1f);
if (Player.whoAmI == Main.myPlayer && eclipseMirror)
{
Player.AddCooldown(GlobalDodge.ID, BalancingConstants.MirrorDodgeCooldown, true, "eclipsemirror");
int cooldownDuration = (int)MathHelper.Lerp(BalancingConstants.MirrorDodgeCooldownMin, BalancingConstants.MirrorDodgeCooldownMax, cooldownDurationScalar);
Player.AddCooldown(GlobalDodge.ID, cooldownDuration, true, "eclipsemirror");
// TODO -- why is this here?
Player.noKnockback = true;
@@ -1530,16 +1550,16 @@ namespace CalamityMod.CalPlayer
return true;
// Mirror evades do not work if the global dodge cooldown is active. This cooldown can be triggered by either mirror.
if (!Player.HasCooldown(GlobalDodge.ID))
if (!Player.HasCooldown(GlobalDodge.ID) && info.Damage >= dodgeDamageGateValue)
{
if (eclipseMirror)
{
EclipseMirrorDodge();
EclipseMirrorDodge(dodgeDamageGateValuePercent, dodgeDamageGateValue, info.Damage);
return true;
}
else if (abyssalMirror)
{
AbyssMirrorDodge();
AbyssMirrorDodge(dodgeDamageGateValuePercent, dodgeDamageGateValue, info.Damage);
return true;
}
}
@@ -60,7 +60,9 @@ AbyssalMirror: {
Significantly reduces enemy aggression, even in the abyss
Stealth generates 25% faster when standing still and 12% faster while moving
Grants the ability to evade attacks, releasing a cloud of lumenyl fluid which damages and stuns nearby enemies
Evading an attack grants a lot of stealth but has a 90 second cooldown
Attacks that deal less than 5% of your max life in damage will not be evaded
The evade has a cooldown that ranges between 15 and 90 seconds depending on the evaded attack's damage
Evading an attack grants a lot of stealth
This cooldown is shared with all other dodges and reflects
'Light does not reach the depths of the ocean'
'''
@@ -606,7 +608,9 @@ EclipseMirror: {
Mobile stealth generation accelerates while not attacking
Stealth strikes only expend 50% of your max stealth
Grants the ability to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area
Evading an attack grants full stealth but has a 90 second cooldown
Attacks that deal less than 5% of your max life in damage will not be evaded
The evade has a cooldown that ranges between 15 and 90 seconds depending on the evaded attack's damage
Evading an attack grants full stealth
This cooldown is shared with all other dodges and reflects
'Its reflection shows naught but darkness'
'''