Silva Revive
This commit is contained in:
1 parent
1eb1783348
commit
58d384d11d
3 files changed
+19
-5
No files matched your search
@@ -774,7 +774,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool hasSilvaEffect = false;
|
||||
public static int silvaReviveDuration = 480;
|
||||
public int silvaCountdown = silvaReviveDuration;
|
||||
public int silvaReviveCooldown = 0;
|
||||
public bool auricSet = false;
|
||||
public bool omegaBlueChestplate = false;
|
||||
public bool omegaBlueSet = false;
|
||||
|
||||
@@ -1106,8 +1106,6 @@ namespace CalamityMod.CalPlayer
|
||||
auralisAurora--;
|
||||
if (auralisAuroraCooldown > 0)
|
||||
auralisAuroraCooldown--;
|
||||
if (silvaReviveCooldown > 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
silvaReviveCooldown--;
|
||||
if (MythrilFlareSpawnCountdown > 0)
|
||||
MythrilFlareSpawnCountdown--;
|
||||
if (AdamantiteSetDecayDelay > 0)
|
||||
@@ -1152,7 +1150,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
|
||||
// 5 minutes
|
||||
silvaReviveCooldown = 18000;
|
||||
Cooldowns.Add(new SilvaReviveCooldown(18000, player));
|
||||
}
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
@@ -1168,7 +1166,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
if (silvaReviveCooldown <= 0 && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(SilvaReviveCooldown)) && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
{
|
||||
silvaCountdown = 480;
|
||||
hasSilvaEffect = false;
|
||||
|
||||
@@ -9,6 +9,7 @@ using Terraria.Audio;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.UI.CooldownIndicators
|
||||
{
|
||||
@@ -164,6 +165,22 @@ namespace CalamityMod.UI.CooldownIndicators
|
||||
}
|
||||
}
|
||||
|
||||
public class SilvaReviveCooldown : CooldownIndicator
|
||||
{
|
||||
public override bool DisplayMe => true;
|
||||
public override string Name => "Silva Revive Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/SilvaRevive";
|
||||
public override Color OutlineColor => new Color(151, 211, 152);
|
||||
public override Color CooldownColorStart => new Color(226, 188, 74);
|
||||
public override Color CooldownColorEnd => new Color(151, 211, 152);
|
||||
|
||||
public override bool CanTickDown => !CalamityPlayer.areThereAnyDamnBosses && !CalamityPlayer.areThereAnyDamnEvents;
|
||||
|
||||
public SilvaReviveCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class SandCloakCooldown : CooldownIndicator
|
||||
{
|
||||
public override string SyncID => "SandCloak";
|
||||
|
||||
Reference in new issue
Block a user