shield double try fix
This commit is contained in:
1 parent
480ee26464
commit
73f9ede9b4
4 files changed
+37
-7
No files matched your search
@@ -92,11 +92,19 @@ namespace CalamityMod.Cooldowns
|
||||
public override SoundStyle? EndSound => LunicCorpsHelmet.ActivationSound;
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().lunicCorpsSet;
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedLunicCorpsShieldSound = false;
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally.
|
||||
public override void Tick()
|
||||
{
|
||||
if (instance.player.whoAmI == Main.myPlayer)
|
||||
instance.player.Calamity().playedLunicCorpsShieldSound = false;
|
||||
}
|
||||
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest may refill normally.
|
||||
// The shield durability cooldown is added elsewhere, in Misc Effects.
|
||||
public override void OnCompleted()
|
||||
{
|
||||
if (instance.player.whoAmI != Main.myPlayer)
|
||||
return;
|
||||
|
||||
CalamityPlayer modPlayer = instance.player.Calamity();
|
||||
if (modPlayer.LunicCorpsShieldDurability <= 0)
|
||||
modPlayer.LunicCorpsShieldDurability = 1;
|
||||
|
||||
@@ -109,16 +109,23 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedProfanedSoulShieldSound = false;
|
||||
public override void Tick()
|
||||
{
|
||||
if (instance.player.whoAmI == Main.myPlayer)
|
||||
instance.player.Calamity().playedProfanedSoulShieldSound = false;
|
||||
}
|
||||
|
||||
public override SoundStyle? EndSound => Providence.BurnStartSound;
|
||||
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().pSoulArtifact;
|
||||
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally.
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest may refill normally.
|
||||
// The shield durability cooldown is added elsewhere, in Misc Effects.
|
||||
public override void OnCompleted()
|
||||
{
|
||||
if (instance.player.whoAmI != Main.myPlayer)
|
||||
return;
|
||||
|
||||
CalamityPlayer modPlayer = instance.player.Calamity();
|
||||
if (modPlayer.pSoulShieldDurability <= 0)
|
||||
modPlayer.pSoulShieldDurability = 1;
|
||||
|
||||
@@ -92,11 +92,19 @@ namespace CalamityMod.Cooldowns
|
||||
public override SoundStyle? EndSound => TheSponge.ActivationSound;
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().sponge;
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedSpongeShieldSound = false;
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally.
|
||||
public override void Tick()
|
||||
{
|
||||
if (instance.player.whoAmI == Main.myPlayer)
|
||||
instance.player.Calamity().playedSpongeShieldSound = false;
|
||||
}
|
||||
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest may refill normally.
|
||||
// The shield durability cooldown is added elsewhere, in Misc Effects.
|
||||
public override void OnCompleted()
|
||||
{
|
||||
if (instance.player.whoAmI != Main.myPlayer)
|
||||
return;
|
||||
|
||||
CalamityPlayer modPlayer = instance.player.Calamity();
|
||||
if (modPlayer.SpongeShieldDurability <= 0)
|
||||
modPlayer.SpongeShieldDurability = 1;
|
||||
|
||||
@@ -91,11 +91,18 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedRoverDriveShieldSound = false;
|
||||
public override void Tick()
|
||||
{
|
||||
if (instance.player.whoAmI == Main.myPlayer)
|
||||
instance.player.Calamity().playedRoverDriveShieldSound = false;
|
||||
}
|
||||
|
||||
// Rover Drive shields are recharged as a side effect of the cooldown completing client side
|
||||
public override void OnCompleted()
|
||||
{
|
||||
if (instance.player.whoAmI != Main.myPlayer)
|
||||
return;
|
||||
|
||||
CalamityPlayer modPlayer = instance.player.Calamity();
|
||||
if (modPlayer.RoverDriveShieldDurability <= 0)
|
||||
modPlayer.RoverDriveShieldDurability = 1;
|
||||
|
||||
Reference in new issue
Block a user