All cooldowns wrangled to the new data structure format
No files matched your search
@@ -2820,9 +2820,9 @@ namespace CalamityMod.CalPlayer
|
||||
int duration = chaosStateDuration;
|
||||
if (areThereAnyDamnBosses || areThereAnyDamnEvents)
|
||||
duration = (int)(chaosStateDurationBoss * 1.5);
|
||||
if (Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(EvasionScarfCooldown)))
|
||||
if (Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.EvasionScarf)))
|
||||
duration = (int)(duration * 1.5);
|
||||
else if (Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(CounterScarfCooldown)))
|
||||
else if (Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.CounterScarf)))
|
||||
duration *= 2;
|
||||
player.AddBuff(BuffID.ChaosState, duration, true);
|
||||
//Add a cooldown here so it can have the custom NR icon
|
||||
@@ -2831,10 +2831,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CalamityMod.AngelicAllianceHotKey.JustPressed && angelicAlliance && Main.myPlayer == player.whoAmI && !divineBless && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(DivineBlessCooldown)))
|
||||
if (CalamityMod.AngelicAllianceHotKey.JustPressed && angelicAlliance && Main.myPlayer == player.whoAmI && !divineBless && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.DivineBless)))
|
||||
{
|
||||
int seconds = CalamityUtils.SecondsToFrames(15f);
|
||||
player.AddBuff(ModContent.BuffType<DivineBless>(), seconds, false);
|
||||
player.AddBuff(ModContent.BuffType<Buffs.StatBuffs.DivineBless>(), seconds, false);
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AngelicAllianceActivation"), player.Center);
|
||||
|
||||
// Spawn an archangel for every minion you have
|
||||
@@ -2859,12 +2859,12 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
if (CalamityMod.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f &&
|
||||
wearingRogueArmor && rogueStealthMax > 0 && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(SandCloakCooldown)))
|
||||
wearingRogueArmor && rogueStealthMax > 0 && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.SandCloak)))
|
||||
{
|
||||
Cooldowns.Add(new SandCloakCooldown(CalamityUtils.SecondsToFrames(30f), player));
|
||||
rogueStealth -= rogueStealthMax * 0.25f;
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 7, 8, player.whoAmI);
|
||||
Main.PlaySound(SoundID.Item, player.position, 45);
|
||||
Cooldowns.Add(new Cooldowns.SandCloakCooldown(CalamityUtils.SecondsToFrames(30f), player));
|
||||
rogueStealth -= rogueStealthMax * 0.25f;
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 7, 8, player.whoAmI);
|
||||
Main.PlaySound(SoundID.Item, player.position, 45);
|
||||
}
|
||||
if (CalamityMod.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f &&
|
||||
wearingRogueArmor && rogueStealthMax > 0)
|
||||
@@ -2897,9 +2897,9 @@ namespace CalamityMod.CalPlayer
|
||||
int duration = chaosStateDuration;
|
||||
if (areThereAnyDamnBosses || areThereAnyDamnEvents)
|
||||
duration = chaosStateDurationBoss;
|
||||
if (Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(EvasionScarfCooldown)))
|
||||
if (Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.EvasionScarf)))
|
||||
duration = (int)(duration * 1.5);
|
||||
else if (Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(CounterScarfCooldown)))
|
||||
else if (Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.CounterScarf)))
|
||||
duration *= 2;
|
||||
player.AddBuff(BuffID.ChaosState, duration, true);
|
||||
|
||||
@@ -2922,18 +2922,18 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
if (CalamityMod.PlaguePackHotKey.JustPressed && hasJetpack && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f &&
|
||||
wearingRogueArmor && rogueStealthMax > 0 && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(JetpackCooldown)) && !player.mount.Active)
|
||||
wearingRogueArmor && rogueStealthMax > 0 && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(RogueBooster)) && !player.mount.Active)
|
||||
{
|
||||
jetPackDash = blunderBooster ? 15 : 10;
|
||||
jetPackDirection = player.direction;
|
||||
Cooldowns.Add(new JetpackCooldown(60, player, blunderBooster ? "birb" : "default"));
|
||||
Cooldowns.Add(new RogueBooster(60, player, blunderBooster ? "birb" : "default"));
|
||||
rogueStealth -= rogueStealthMax * 0.25f;
|
||||
Main.PlaySound(SoundID.Item66, player.Center);
|
||||
Main.PlaySound(SoundID.Item34, player.Center);
|
||||
}
|
||||
if (CalamityMod.TarraHotKey.JustPressed)
|
||||
{
|
||||
if (brimflameSet && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(BrimflameFrenzyCooldown)))
|
||||
if (brimflameSet && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(BrimflameFrenzy)))
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -2967,18 +2967,18 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tarraMelee && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(TarragonCloakCooldown)) && !tarragonCloak)
|
||||
if (tarraMelee && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.TarragonCloak)) && !tarragonCloak)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<TarragonCloak>(), 602, false);
|
||||
player.AddBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonCloak>(), 602, false);
|
||||
}
|
||||
}
|
||||
if (bloodflareRanged && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(BloodflareSoulCooldown)))
|
||||
if (bloodflareRanged && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(BloodflareRangedSet)))
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Cooldowns.Add(new BloodflareSoulCooldown(1800, player));
|
||||
Cooldowns.Add(new BloodflareRangedSet(1800, player));
|
||||
}
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/BloodflareRangerActivation"), player.Center);
|
||||
for (int d = 0; d < 64; d++)
|
||||
@@ -3020,7 +3020,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (omegaBlueSet && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(OmegaBlueCooldown)))
|
||||
if (omegaBlueSet && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(OmegaBlue)))
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -3075,10 +3075,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plagueReaper && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PlagueBlackoutCooldown)))
|
||||
if (plagueReaper && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PlagueBlackout)))
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/PlagueReaperAbility"), player.Center);
|
||||
Cooldowns.Add(new PlagueBlackoutCooldown(1800, player));
|
||||
Cooldowns.Add(new PlagueBlackout(1800, player));
|
||||
}
|
||||
if (forbiddenCirclet && forbiddenCooldown <= 0)
|
||||
{
|
||||
@@ -3111,7 +3111,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prismaticSet && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PrismaticLaserCooldown)) && prismaticLasers <= 0)
|
||||
if (prismaticSet && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PrismaticLaser)) && prismaticLasers <= 0)
|
||||
prismaticLasers = CalamityUtils.SecondsToFrames(35f);
|
||||
}
|
||||
if (CalamityMod.AstralArcanumUIHotkey.JustPressed && astralArcanum && !areThereAnyDamnBosses)
|
||||
@@ -3142,7 +3142,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Trigger for pressing the God Slayer dash key
|
||||
if (CalamityMod.GodSlayerDashHotKey.JustPressed && (player.controlUp || player.controlDown || player.controlLeft || player.controlRight) && !player.pulley && player.grappling[0] == -1 && !player.tongued && !player.mount.Active && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GodslayerDashCooldown)) && player.dashDelay == 0)
|
||||
if (CalamityMod.GodSlayerDashHotKey.JustPressed && (player.controlUp || player.controlDown || player.controlLeft || player.controlRight) && !player.pulley && player.grappling[0] == -1 && !player.tongued && !player.mount.Active && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GodSlayerDash)) && player.dashDelay == 0)
|
||||
godSlayerDashHotKeyPressed = true;
|
||||
|
||||
// Trigger for pressing the Rage hotkey.
|
||||
@@ -3876,7 +3876,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (sirenBoobs && NPC.downedBoss3)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(SirenIceShieldCooldown)))
|
||||
if (player.whoAmI == Main.myPlayer && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(AquaticHeartIceShield)))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<IceShieldBuff>(), 2);
|
||||
}
|
||||
@@ -4013,7 +4013,7 @@ namespace CalamityMod.CalPlayer
|
||||
//Add a cooldown display for potion sickness
|
||||
if (player.potionDelay > 0)
|
||||
{
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PotionSicknessDisplay)))
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PotionSickness)))
|
||||
{
|
||||
Cooldowns.Add(new PotionSicknessDisplay(player.potionDelay, player));
|
||||
}
|
||||
@@ -4021,7 +4021,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (player.chaosState)
|
||||
{
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(ChaosStateDisplay)))
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(ChaosState)))
|
||||
{
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
@@ -4159,14 +4159,14 @@ namespace CalamityMod.CalPlayer
|
||||
return true;
|
||||
}
|
||||
// Neither scarf can be used if either is on cooldown
|
||||
if (playerDashing && dashMod == 1 && player.dashDelay < 0 && dodgeScarf && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(CounterScarfCooldown) || cooldown.GetType() == typeof(EvasionScarfCooldown)))
|
||||
if (playerDashing && dashMod == 1 && player.dashDelay < 0 && dodgeScarf && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.CounterScarf) || cooldown.GetType() == typeof(Cooldowns.EvasionScarf)))
|
||||
{
|
||||
CounterScarfDodge();
|
||||
CounterScarfDodge();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Neither mirror can be used if either is on cooldown
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown)))
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodge)))
|
||||
{
|
||||
if (eclipseMirror)
|
||||
{
|
||||
@@ -4234,9 +4234,9 @@ namespace CalamityMod.CalPlayer
|
||||
private void CounterScarfDodge()
|
||||
{
|
||||
if (evasionScarf)
|
||||
Cooldowns.Add(new EvasionScarfCooldown(player.chaosState ? CalamityUtils.SecondsToFrames(20f) : CalamityUtils.SecondsToFrames(13f), player));
|
||||
Cooldowns.Add(new Cooldowns.EvasionScarf(player.chaosState ? CalamityUtils.SecondsToFrames(20f) : CalamityUtils.SecondsToFrames(13f), player));
|
||||
else
|
||||
Cooldowns.Add(new CounterScarfCooldown(player.chaosState ? 1800 : 900, player));
|
||||
Cooldowns.Add(new Cooldowns.CounterScarf(player.chaosState ? 1800 : 900, player));
|
||||
|
||||
player.GiveIFrames(player.longInvince ? 100 : 60, true);
|
||||
|
||||
@@ -4263,7 +4263,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && abyssalMirror && !eclipseMirror)
|
||||
{
|
||||
Cooldowns.Add(new GlobalDodgeCooldown(MirrorDodgeCooldown, player, "abyssmirror"));
|
||||
Cooldowns.Add(new GlobalDodge(MirrorDodgeCooldown, player, "abyssmirror"));
|
||||
|
||||
// TODO -- why is this here?
|
||||
player.noKnockback = true;
|
||||
@@ -4293,7 +4293,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && eclipseMirror)
|
||||
{
|
||||
Cooldowns.Add(new GlobalDodgeCooldown(MirrorDodgeCooldown, player, "eclipsemirror"));
|
||||
Cooldowns.Add(new GlobalDodge(MirrorDodgeCooldown, player, "eclipsemirror"));
|
||||
|
||||
// TODO -- why is this here?
|
||||
player.noKnockback = true;
|
||||
@@ -4406,7 +4406,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (nCore && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(NebulousCoreCooldown)))
|
||||
if (nCore && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.NebulousCore)))
|
||||
{
|
||||
Main.PlaySound(SoundID.Item, (int)player.position.X, (int)player.position.Y, 67);
|
||||
|
||||
@@ -4429,7 +4429,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.statLife > player.statLifeMax2)
|
||||
player.statLife = player.statLifeMax2;
|
||||
|
||||
Cooldowns.Add(new NebulousCoreCooldown(CalamityUtils.SecondsToFrames(90f), player));
|
||||
Cooldowns.Add(new Cooldowns.NebulousCore(CalamityUtils.SecondsToFrames(90f), player));
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -4450,7 +4450,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
player.AddBuff(ModContent.BuffType<SilvaRevival>(), silvaReviveDuration);
|
||||
|
||||
if (draconicSurge && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(DraconicElixirCooldown)))
|
||||
if (draconicSurge && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(DraconicElixir)))
|
||||
{
|
||||
player.statLife += player.statLifeMax2 / 2;
|
||||
player.HealEffect(player.statLifeMax2 / 2);
|
||||
@@ -4461,7 +4461,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DraconicSurgeBuff>()) > -1)
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<DraconicSurgeBuff>());
|
||||
Cooldowns.Add(new DraconicElixirCooldown(CalamityUtils.SecondsToFrames(60f), player));
|
||||
Cooldowns.Add(new DraconicElixir(CalamityUtils.SecondsToFrames(60f), player));
|
||||
|
||||
// Additional potion sickness time
|
||||
int additionalTime = 0;
|
||||
@@ -4493,9 +4493,9 @@ namespace CalamityMod.CalPlayer
|
||||
return false;
|
||||
}
|
||||
|
||||
if (permafrostsConcoction && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PermafrostConcoctionCooldown)))
|
||||
if (permafrostsConcoction && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PermafrostConcoction)))
|
||||
{
|
||||
Cooldowns.Add(new PermafrostConcoctionCooldown(CalamityUtils.SecondsToFrames(180f), player));
|
||||
Cooldowns.Add(new PermafrostConcoction(CalamityUtils.SecondsToFrames(180f), player));
|
||||
|
||||
player.AddBuff(ModContent.BuffType<Encased>(), CalamityUtils.SecondsToFrames(3f));
|
||||
|
||||
@@ -5413,16 +5413,16 @@ namespace CalamityMod.CalPlayer
|
||||
contactDamageReduction += 0.5;
|
||||
}
|
||||
|
||||
if (fleshTotem && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(FleshTotemCooldown)))
|
||||
if (fleshTotem && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.FleshTotem)))
|
||||
{
|
||||
Cooldowns.Add(new FleshTotemCooldown(1200, player, coreOfTheBloodGod ? "bloodgod" : "default")); //20 seconds
|
||||
contactDamageReduction += 0.5;
|
||||
Cooldowns.Add(new Cooldowns.FleshTotem(1200, player, coreOfTheBloodGod ? "bloodgod" : "default")); //20 seconds
|
||||
contactDamageReduction += 0.5;
|
||||
}
|
||||
|
||||
if (tarragonCloak && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(TarragonCloakCooldown)) && tarraMelee)
|
||||
contactDamageReduction += 0.5;
|
||||
if (tarragonCloak && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.TarragonCloak)) && tarraMelee)
|
||||
contactDamageReduction += 0.5;
|
||||
|
||||
if (bloodflareMelee && bloodflareFrenzy && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(BloodflareFrenzyCooldown)))
|
||||
if (bloodflareMelee && bloodflareFrenzy && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(BloodflareFrenzy)))
|
||||
contactDamageReduction += 0.5;
|
||||
|
||||
if (npc.Calamity().tSad > 0)
|
||||
@@ -5430,7 +5430,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (npc.Calamity().relicOfResilienceWeakness > 0)
|
||||
{
|
||||
contactDamageReduction += RelicOfResilience.WeaknessDR;
|
||||
contactDamageReduction += Items.Weapons.Typeless.RelicOfResilience.WeaknessDR;
|
||||
npc.Calamity().relicOfResilienceWeakness = 0;
|
||||
}
|
||||
|
||||
@@ -5556,7 +5556,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && damage > 0)
|
||||
{
|
||||
// Reflects count as dodges. They share the timer and can be disabled by Armageddon right click.
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown)) && !disableAllDodges)
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodge)) && !disableAllDodges)
|
||||
{
|
||||
// The Evolution
|
||||
if (projRefRare)
|
||||
@@ -5572,7 +5572,7 @@ namespace CalamityMod.CalPlayer
|
||||
projRefRareLifeRegenCounter = 300;
|
||||
projTypeJustHitBy = proj.type;
|
||||
|
||||
Cooldowns.Add(new GlobalDodgeCooldown(EvolutionReflectCooldown, player));
|
||||
Cooldowns.Add(new GlobalDodge(EvolutionReflectCooldown, player));
|
||||
// Send a Calamity dodge cooldown packet.
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
|
||||
SyncCooldown(false);
|
||||
@@ -5726,7 +5726,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && damage > 0)
|
||||
{
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown)) && !disableAllDodges && daedalusReflect && !projRefRare)
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodge)) && !disableAllDodges && daedalusReflect && !projRefRare)
|
||||
{
|
||||
projectileDamageReduction += 0.5;
|
||||
}
|
||||
@@ -6475,7 +6475,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Reflects count as dodges. They share the timer and can be disabled by Armageddon right click.
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown)) && !disableAllDodges)
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodge)) && !disableAllDodges)
|
||||
{
|
||||
if (daedalusReflect && !projRefRare)
|
||||
{
|
||||
@@ -6487,7 +6487,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
damage /= 2;
|
||||
|
||||
Cooldowns.Add(new GlobalDodgeCooldown(DaedalusReflectCooldown, player));
|
||||
Cooldowns.Add(new GlobalDodge(DaedalusReflectCooldown, player));
|
||||
|
||||
// No return because the projectile hit isn't canceled -- it only does half damage.
|
||||
}
|
||||
@@ -6665,7 +6665,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.body = mod.GetEquipSlot("MeldTransformationBody", EquipType.Body);
|
||||
player.head = mod.GetEquipSlot("MeldTransformationHead", EquipType.Head);
|
||||
}
|
||||
else if ((omegaBlueTransformationPower || omegaBlueTransformationForce) && Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(OmegaBlueCooldown) && cooldown.TimeLeft > 1500))
|
||||
else if ((omegaBlueTransformationPower || omegaBlueTransformationForce) && Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(OmegaBlue) && cooldown.TimeLeft > 1500))
|
||||
{
|
||||
player.head = mod.GetEquipSlot("OmegaBlueTransformationHead", EquipType.Head);
|
||||
}
|
||||
@@ -7172,7 +7172,7 @@ namespace CalamityMod.CalPlayer
|
||||
public override void PostHurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit)
|
||||
{
|
||||
if (!profanedCrystal && pArtifact)
|
||||
Cooldowns.Add(new ProfanedSoulArtifactCooldown(300, player));
|
||||
Cooldowns.Add(new Cooldowns.ProfanedSoulArtifact(300, player));
|
||||
|
||||
// Bloodflare Core defense shattering
|
||||
if (bloodflareCore)
|
||||
@@ -7354,16 +7354,16 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (inkBomb && !abyssalMirror && !eclipseMirror)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && !Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(InkBombCooldown)))
|
||||
if (player.whoAmI == Main.myPlayer && !Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.InkBomb)))
|
||||
{
|
||||
Cooldowns.Add(new InkBombCooldown(1200, player));
|
||||
rogueStealth += 0.5f;
|
||||
Cooldowns.Add(new Cooldowns.InkBomb(1200, player));
|
||||
rogueStealth += 0.5f;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 61);
|
||||
Main.PlaySound(SoundID.Item, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 61);
|
||||
int ink = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-0f, -4f), ModContent.ProjectileType<InkBombProjectile>(), 0, 0, player.whoAmI);
|
||||
if (ink.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[ink].Calamity().forceTypeless = true;
|
||||
Main.projectile[ink].Calamity().forceTypeless = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8109,7 +8109,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Cooldown for God Slayer Armor dash
|
||||
if (dashMod == 9)
|
||||
{
|
||||
Cooldowns.Add(new GodslayerDashCooldown(CalamityUtils.SecondsToFrames(35f), player));
|
||||
Cooldowns.Add(new GodSlayerDash(CalamityUtils.SecondsToFrames(35f), player));
|
||||
godSlayerDashHotKeyPressed = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -868,7 +868,7 @@ namespace CalamityMod.CalPlayer
|
||||
bool canProvideBuffs = profanedCrystalBuffs || (!profanedCrystal && pArtifact) || (profanedCrystal && CalamityWorld.downedSCal && CalamityWorld.downedExoMechs);
|
||||
bool attack = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] > 0;
|
||||
// Guardian bonuses if not burnt out
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(ProfanedSoulArtifactCooldown)) && canProvideBuffs)
|
||||
if (!Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.ProfanedSoulArtifact)) && canProvideBuffs)
|
||||
{
|
||||
bool healer = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] > 0;
|
||||
bool defend = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] > 0;
|
||||
@@ -1165,7 +1165,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(SilvaReviveCooldown)) && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(SilvaRevive)) && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
{
|
||||
silvaCountdown = 480;
|
||||
hasSilvaEffect = false;
|
||||
@@ -1179,7 +1179,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
tarraDefenseTime = 600;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
Cooldowns.Add(new TarragonCloakCooldown(1800, player));
|
||||
Cooldowns.Add(new Cooldowns.TarragonCloak(1800, player));
|
||||
}
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
@@ -1209,16 +1209,16 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
tarraThrowingCrits = 0;
|
||||
if (player.whoAmI == Main.myPlayer && !disableAllDodges)
|
||||
player.AddBuff(ModContent.BuffType<TarragonImmunity>(), 180, false);
|
||||
player.AddBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>(), 180, false);
|
||||
}
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = player.buffType[l];
|
||||
if (player.buffTime[l] <= 1 && hasBuff == ModContent.BuffType<TarragonImmunity>())
|
||||
if (player.buffTime[l] <= 1 && hasBuff == ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>())
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
Cooldowns.Add(new TarragonImmunityCooldown(1500, player));
|
||||
Cooldowns.Add(new Cooldowns.TarragonImmunityCooldown(1500, player));
|
||||
}
|
||||
|
||||
bool shouldAffect = CalamityLists.debuffList.Contains(hasBuff);
|
||||
@@ -1607,7 +1607,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
brimflameFrenzy = false;
|
||||
player.ClearBuff(ModContent.BuffType<BrimflameFrenzyBuff>());
|
||||
Cooldowns.Add(new BrimflameFrenzyCooldown(BrimflameScowl.CooldownLength, player));
|
||||
Cooldowns.Add(new BrimflameFrenzy(BrimflameScowl.CooldownLength, player));
|
||||
}
|
||||
if (!bloodflareMelee && bloodflareFrenzy)
|
||||
{
|
||||
@@ -1618,23 +1618,23 @@ namespace CalamityMod.CalPlayer
|
||||
if (!tarraMelee && tarragonCloak)
|
||||
{
|
||||
tarragonCloak = false;
|
||||
player.ClearBuff(ModContent.BuffType<TarragonCloak>());
|
||||
Cooldowns.Add(new TarragonCloakCooldown(1800, player));
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonCloak>());
|
||||
Cooldowns.Add(new Cooldowns.TarragonCloak(1800, player));
|
||||
}
|
||||
if (!tarraThrowing && tarragonImmunity)
|
||||
{
|
||||
tarragonImmunity = false;
|
||||
player.ClearBuff(ModContent.BuffType<TarragonImmunity>());
|
||||
Cooldowns.Add(new TarragonCloakCooldown(1500, player));
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>());
|
||||
Cooldowns.Add(new Cooldowns.TarragonCloak(1500, player));
|
||||
}
|
||||
if (!omegaBlueSet && Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(OmegaBlueCooldown) && cooldown.TimeLeft > 1500))
|
||||
if (!omegaBlueSet && Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(OmegaBlue) && cooldown.TimeLeft > 1500))
|
||||
{
|
||||
Cooldowns.Find(cooldown => cooldown.GetType() == typeof(OmegaBlueCooldown)).TimeLeft = 1500;
|
||||
Cooldowns.Find(cooldown => cooldown.GetType() == typeof(OmegaBlue)).TimeLeft = 1500;
|
||||
player.ClearBuff(ModContent.BuffType<AbyssalMadness>());
|
||||
}
|
||||
if (!plagueReaper && Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PlagueBlackoutCooldown) && cooldown.TimeLeft > 1500))
|
||||
if (!plagueReaper && Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(PlagueBlackout) && cooldown.TimeLeft > 1500))
|
||||
{
|
||||
Cooldowns.Find(cooldown => cooldown.GetType() == typeof(PlagueBlackoutCooldown)).TimeLeft = 1500;
|
||||
Cooldowns.Find(cooldown => cooldown.GetType() == typeof(PlagueBlackout)).TimeLeft = 1500;
|
||||
|
||||
}
|
||||
if (!prismaticSet && prismaticLasers > 1800)
|
||||
@@ -1645,9 +1645,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (!angelicAlliance && divineBless)
|
||||
{
|
||||
divineBless = false;
|
||||
player.ClearBuff(ModContent.BuffType<DivineBless>());
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.StatBuffs.DivineBless>());
|
||||
int seconds = CalamityUtils.SecondsToFrames(60f);
|
||||
Cooldowns.Add(new DivineBlessCooldown(seconds, player));
|
||||
Cooldowns.Add(new Cooldowns.DivineBless(seconds, player));
|
||||
}
|
||||
|
||||
// Armageddon's Dodge Disable feature puts Shadow Dodge/Holy Protection on permanent cooldown
|
||||
@@ -2608,7 +2608,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (blueCandle)
|
||||
player.moveSpeed += 0.1f;
|
||||
|
||||
if (Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(DraconicElixirCooldown))) // Weird mod conflicts with like Luiafk
|
||||
if (Cooldowns.Exists((object cooldown) => cooldown.GetType() == typeof(Cooldowns.DraconicElixir))) // Weird mod conflicts with like Luiafk
|
||||
{
|
||||
draconicSurge = false;
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DraconicSurgeBuff>()) > -1)
|
||||
@@ -3478,19 +3478,19 @@ namespace CalamityMod.CalPlayer
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = player.buffType[l];
|
||||
if (hasBuff == ModContent.BuffType<DivineBless>())
|
||||
if (hasBuff == ModContent.BuffType<Buffs.StatBuffs.DivineBless>())
|
||||
{
|
||||
angelicActivate = player.buffTime[l];
|
||||
}
|
||||
}
|
||||
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DivineBless>()) == -1)
|
||||
if (player.FindBuffIndex(ModContent.BuffType<Buffs.StatBuffs.DivineBless>()) == -1)
|
||||
angelicActivate = -1;
|
||||
|
||||
if (angelicActivate == 1)
|
||||
{
|
||||
int seconds = CalamityUtils.SecondsToFrames(60f);
|
||||
Cooldowns.Add(new DivineBlessCooldown(seconds, player));
|
||||
Cooldowns.Add(new Cooldowns.DivineBless(seconds, player));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,19 +4,15 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class SirenIceShieldCooldown : Cooldown
|
||||
public class AquaticHeartIceShield : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "SirenHeartShield";
|
||||
public AquaticHeartIceShield(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Ice Shield Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/SirenIceShield";
|
||||
public override string Texture => "CalamityMod/Cooldowns/AquaticHeartIceShield";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(163, 186, 198), new Color(146, 187, 255), (float)Math.Sin(Main.GlobalTime) * 0.5f + 0.5f);
|
||||
public override Color CooldownStartColor => new Color(124, 195, 214);
|
||||
public override Color CooldownEndColor => new Color(147, 230, 253);
|
||||
|
||||
|
||||
public SirenIceShieldCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 196 B |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class BloodflareFrenzy : CooldownHandler
|
||||
{
|
||||
public BloodflareFrenzy(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Blood Frenzy Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/BloodflareFrenzy";
|
||||
public override Color OutlineColor => new Color(229, 171, 124);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(149, 127, 109), new Color(220, 101, 101), 1 - instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(149, 127, 109), new Color(220, 101, 101), 1 - instance.Completion);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class BloodflareFrenzyCooldown : Cooldown
|
||||
{
|
||||
public override string ID => "BloodflareFrenzy";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Blood Frenzy Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/BloodflareFrenzy";
|
||||
public override Color OutlineColor => new Color(229, 171, 124);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(149, 127, 109), new Color(220, 101, 101), 1 - Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(149, 127, 109), new Color(220, 101, 101), 1 - Completion);
|
||||
|
||||
public BloodflareFrenzyCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,19 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class BloodflareSoulCooldown : Cooldown
|
||||
public class BloodflareRangedSet : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "BloodflareSoul";
|
||||
public BloodflareRangedSet(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Bloodflare Soul Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/BloodflareSoul";
|
||||
public override string Texture => "CalamityMod/Cooldowns/BloodflareSoul";
|
||||
public override Color OutlineColor => new Color(255, 205, 219);
|
||||
public override Color CooldownStartColor => new Color(216, 60, 90);
|
||||
public override Color CooldownEndColor => new Color(251, 106, 150);
|
||||
|
||||
public override LegacySoundStyle EndSound => AfflictedPlayer.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/BloodflareRangerRecharge");
|
||||
|
||||
public BloodflareSoulCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/BloodflareRangerRecharge");
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 160 B |
@@ -6,21 +6,18 @@ using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class BrimflameFrenzyCooldown : Cooldown
|
||||
public class BrimflameFrenzy : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "BrimflameFrenzy";
|
||||
public BrimflameFrenzy(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Brimflame Frenzy Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/BrimflameFrenzy";
|
||||
public override string Texture => "CalamityMod/Cooldowns/BrimflameFrenzy";
|
||||
public override Color OutlineColor => new Color(211, 124, 93);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - Completion);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - instance.Completion);
|
||||
|
||||
public override LegacySoundStyle EndSound => AfflictedPlayer.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/BrimflameRecharge");
|
||||
|
||||
public BrimflameFrenzyCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/BrimflameRecharge");
|
||||
|
||||
public override bool UseCustomExpandedDraw => true;
|
||||
|
||||
@@ -31,7 +28,7 @@ namespace CalamityMod.Cooldowns
|
||||
|
||||
Texture2D sprite = GetTexture(Texture + "Eyes");
|
||||
//Draw the icon
|
||||
spriteBatch.Draw(sprite, position, null, Color.Crimson * opacity * (1 - Completion), 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(sprite, position, null, Color.Crimson * opacity * (1 - instance.Completion), 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class ChaosState : CooldownHandler
|
||||
{
|
||||
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState;
|
||||
public override string DisplayName => "Teleportation Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/ChaosState" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
public override Color CooldownStartColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - instance.Completion);
|
||||
|
||||
//It's the same cooldown with different skins each time, basically.
|
||||
public string skinTexture;
|
||||
public Color outlineColor;
|
||||
public Color cooldownColorStart;
|
||||
public Color cooldownColorEnd;
|
||||
|
||||
public ChaosState(CooldownInstance? c, string skin = "") : base(c)
|
||||
{
|
||||
switch (skin)
|
||||
{
|
||||
case "spectralveil":
|
||||
skinTexture = "Veil";
|
||||
outlineColor = new Color(138, 120, 222);
|
||||
cooldownColorStart = new Color(46, 46, 134);
|
||||
cooldownColorEnd = new Color(81, 90, 156);
|
||||
break;
|
||||
|
||||
case "normalityrelocator":
|
||||
skinTexture = "NR";
|
||||
outlineColor = new Color(129, 239, 246);
|
||||
cooldownColorStart = new Color(134, 143, 151);
|
||||
cooldownColorEnd = new Color(129, 239, 246);
|
||||
break;
|
||||
|
||||
default:
|
||||
skinTexture = "";
|
||||
outlineColor = new Color(246, 116, 181);
|
||||
cooldownColorStart = new Color(223, 58, 140);
|
||||
cooldownColorEnd = new Color(255, 179, 218);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class ChaosStateDisplay : Cooldown
|
||||
{
|
||||
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && AfflictedPlayer.chaosState;
|
||||
public override string DisplayName => "Teleportation Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/ChaosState" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
public override Color CooldownStartColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - Completion);
|
||||
|
||||
//It's the same cooldown with different skins each time, basically.
|
||||
public string skinTexture;
|
||||
public Color outlineColor;
|
||||
public Color cooldownColorStart;
|
||||
public Color cooldownColorEnd;
|
||||
|
||||
public ChaosStateDisplay(int duration, Player player, string skin = "default") : base(duration, player)
|
||||
{
|
||||
switch (skin)
|
||||
{
|
||||
case "spectralveil":
|
||||
skinTexture = "Veil";
|
||||
outlineColor = new Color(138, 120, 222);
|
||||
cooldownColorStart = new Color(46, 46, 134);
|
||||
cooldownColorEnd = new Color(81, 90, 156);
|
||||
break;
|
||||
|
||||
case "normalityrelocator":
|
||||
skinTexture = "NR";
|
||||
outlineColor = new Color(129, 239, 246);
|
||||
cooldownColorStart = new Color(134, 143, 151);
|
||||
cooldownColorEnd = new Color(129, 239, 246);
|
||||
break;
|
||||
|
||||
default:
|
||||
skinTexture = "";
|
||||
outlineColor = new Color(246, 116, 181);
|
||||
cooldownColorStart = new Color(223, 58, 140);
|
||||
cooldownColorEnd = new Color(255, 179, 218);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,8 +44,40 @@ namespace CalamityMod.Cooldowns
|
||||
registry = new Cooldown[defaultSize];
|
||||
nameToNetID = new Dictionary<string, ushort>(defaultSize);
|
||||
|
||||
Register("AbyssalDivingSuitBreakingPlates", new DivingPlatesBreaking(null));
|
||||
Register("AbyssalDivingSuitBrokenPlates", new DivingPlatesBroken(null));
|
||||
// TODO -- CooldownHandlers should be ILoadable in 1.4
|
||||
|
||||
// Vanilla cooldowns represented by the interface
|
||||
Cooldown potionSickness = Register("PotionSickness", new PotionSickness(null));
|
||||
Cooldown chaosState = Register("ChaosState", new ChaosState(null));
|
||||
Cooldown globalDodge = Register("GlobalDodge", new GlobalDodge(null));
|
||||
|
||||
// Calamity cooldowns
|
||||
Cooldown aquaticHeartIceShield = Register("AquaticHeartIceShield", new AquaticHeartIceShield(null));
|
||||
Cooldown bloodflareFrenzy = Register("BloodflareFrenzy", new BloodflareFrenzy(null));
|
||||
Cooldown bloodflareRanged = Register("BloodflareRangedSet", new BloodflareRangedSet(null));
|
||||
Cooldown brimflameFrenzy = Register("BrimflameFrenzy", new BrimflameFrenzy(null));
|
||||
Cooldown counterScarf = Register("CounterScarf", new CounterScarf(null));
|
||||
Cooldown divineBless = Register("DivineBless", new DivineBless(null));
|
||||
Cooldown divingPlatesBreaking = Register("DivingPlatesBreaking", new DivingPlatesBreaking(null));
|
||||
Cooldown divingPlatesBroken = Register("DivingPlatesBroken", new DivingPlatesBroken(null));
|
||||
Cooldown draconicElixir = Register("DraconicElixir", new DraconicElixir(null));
|
||||
Cooldown evasionScarf = Register("EvasionScarf", new EvasionScarf(null));
|
||||
Cooldown fleshTotem = Register("FleshTotem", new FleshTotem(null));
|
||||
Cooldown godSlayerDash = Register("GodSlayerDash", new GodSlayerDash(null));
|
||||
Cooldown inkBomb = Register("InkBomb", new InkBomb(null));
|
||||
Cooldown lionHeartShield = Register("LionHeartShield", new LionHeartShield(null));
|
||||
Cooldown nebulousCore = Register("NebulousCore", new NebulousCore(null));
|
||||
Cooldown omegaBlue = Register("OmegaBlue", new OmegaBlue(null));
|
||||
Cooldown permafrostConcoction = Register("PermafrostConcoction", new PermafrostConcoction(null));
|
||||
Cooldown plagueBlackout = Register("PlagueBlackout", new PlagueBlackout(null));
|
||||
Cooldown prismaticLaser = Register("PrismaticLaser", new PrismaticLaser(null));
|
||||
Cooldown profanedSoulArtifact = Register("ProfanedSoulArtifact", new ProfanedSoulArtifact(null));
|
||||
Cooldown relicOfResilience = Register("RelicOfResilience", new RelicOfResilience(null));
|
||||
Cooldown rogueBooster = Register("RogueBooster", new RogueBooster(null));
|
||||
Cooldown sandCloak = Register("SandCloak", new SandCloak(null));
|
||||
Cooldown silvaRevive = Register("SilvaRevive", new SilvaRevive(null));
|
||||
Cooldown tarragonCloak = Register("TarragonCloak", new TarragonCloak(null));
|
||||
Cooldown universeSplitter = Register("UniverseSplitter", new UniverseSplitter(null));
|
||||
}
|
||||
|
||||
public static void Unload()
|
||||
@@ -56,17 +88,17 @@ namespace CalamityMod.Cooldowns
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a cooldown for use in netcode. Cooldowns are useless until this has been done.
|
||||
/// Registers a CooldownHandler for use in netcode, assigning it a Cooldown and thus a netID. Cooldowns are useless until this has been done.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool Register(string id, CooldownHandler h)
|
||||
/// <returns>The registered Cooldown.</returns>
|
||||
public static Cooldown Register(string id, CooldownHandler h)
|
||||
{
|
||||
int currentMaxID = registry.Length;
|
||||
|
||||
// This case only happens when you cap out at 65,536 cooldown registrations (which should never occur).
|
||||
// It just stops you from registering more cooldowns.
|
||||
if (nextCDNetID == currentMaxID)
|
||||
return false;
|
||||
return null;
|
||||
|
||||
Cooldown cd = new Cooldown(id, h);
|
||||
cd.netID = nextCDNetID;
|
||||
@@ -82,7 +114,7 @@ namespace CalamityMod.Cooldowns
|
||||
|
||||
registry = largerArray;
|
||||
}
|
||||
return true;
|
||||
return cd;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class CooldownHandler
|
||||
{
|
||||
public readonly CooldownInstance instance;
|
||||
public CooldownInstance instance;
|
||||
|
||||
public CooldownHandler(CooldownInstance? c)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Cooldowns
|
||||
/// For example, this is useful for cooldowns that don't tick down if there are any bosses alive.<br/>
|
||||
/// You can also use it so that cooldowns which persist through death do not tick down while the player is dead.
|
||||
/// </summary>
|
||||
public virtual bool CanTickDown() => true;
|
||||
public virtual bool CanTickDown => true;
|
||||
|
||||
/// <summary>
|
||||
/// Set this to true to make this cooldown remain even when the player dies.<br/>
|
||||
@@ -53,12 +53,12 @@ namespace CalamityMod.Cooldowns
|
||||
/// <summary>
|
||||
/// The name of the cooldown instance, appears when the player hovers over the indicator
|
||||
/// </summary>
|
||||
public virtual string DisplayName() => "";
|
||||
public virtual string DisplayName => "";
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this cooldown instance should appear in the cooldown rack UI.
|
||||
/// </summary>
|
||||
public virtual bool ShouldDisplay() => true;
|
||||
public virtual bool ShouldDisplay => true;
|
||||
|
||||
/// <summary>
|
||||
/// The texture of the cooldown indicator.<br/>
|
||||
@@ -93,17 +93,17 @@ namespace CalamityMod.Cooldowns
|
||||
/// The color used for the icon outline when rendering in expanded mode.<br/>
|
||||
/// In compact mode, this color is used for the overlay that goes above the icon.
|
||||
/// </summary>
|
||||
public virtual Color GetOutlineColor() => Color.White;
|
||||
public virtual Color OutlineColor => Color.White;
|
||||
/// <summary>
|
||||
/// The color used for the start of the circular cooldown timer rendered by shaders.<br/>
|
||||
/// This color is only used when drawing in expanded mode and is ignored if a charge bar texture is provided.
|
||||
/// </summary>
|
||||
public virtual Color GetCooldownStartColor() => Color.Gray;
|
||||
public virtual Color CooldownStartColor => Color.Gray;
|
||||
/// <summary>
|
||||
/// The color used for the end of the circular cooldown timer rendered by shaders.<br/>
|
||||
/// This color is only used when drawing in expanded mode and is ignored if a charge bar texture is provided.
|
||||
/// </summary>
|
||||
public virtual Color GetCooldownEndColor() => Color.White;
|
||||
public virtual Color CooldownEndColor => Color.White;
|
||||
|
||||
/// <summary>
|
||||
/// Set this to true to disable default drawing and instead call the function DrawExpanded.<br/>
|
||||
@@ -114,12 +114,11 @@ namespace CalamityMod.Cooldowns
|
||||
/// <summary>
|
||||
/// This method is called to render the cooldown when the cooldown rack is in expanded mode and UseCustomExpandedDraw is set to true.
|
||||
/// </summary>
|
||||
public virtual void DrawExpanded(CooldownInstance instance, SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
public virtual void DrawExpanded(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
Texture2D sprite = ModContent.GetTexture(Texture);
|
||||
Texture2D outline = ModContent.GetTexture(OutlineTexture);
|
||||
Texture2D barBase = ModContent.GetTexture(ChargeBarTexture);
|
||||
Color outlineColor = GetOutlineColor();
|
||||
|
||||
//Draw the ring
|
||||
spriteBatch.End();
|
||||
@@ -132,7 +131,7 @@ namespace CalamityMod.Cooldowns
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
//Draw the outline
|
||||
spriteBatch.Draw(outline, position, null, outlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(outline, position, null, OutlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
|
||||
//Draw the icon
|
||||
spriteBatch.Draw(sprite, position, null, Color.White * opacity, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
@@ -152,7 +151,7 @@ namespace CalamityMod.Cooldowns
|
||||
Texture2D sprite = ModContent.GetTexture(Texture);
|
||||
Texture2D outline = ModContent.GetTexture(OutlineTexture);
|
||||
Texture2D overlay = ModContent.GetTexture(OverlayTexture);
|
||||
Color outlineColor = GetOutlineColor();
|
||||
Color outlineColor = OutlineColor;
|
||||
|
||||
//Draw the outline
|
||||
spriteBatch.Draw(outline, position, null, outlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
@@ -174,12 +173,10 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
if (ChargeBarTexture == DefaultChargeBarTexture)
|
||||
{
|
||||
Color startColor = GetCooldownStartColor();
|
||||
Color endColor = GetCooldownEndColor();
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseOpacity(opacity);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseSaturation(1 - instance.Completion);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseColor(startColor);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseSecondaryColor(endColor);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseColor(CooldownStartColor);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].UseSecondaryColor(CooldownEndColor);
|
||||
GameShaders.Misc["CalamityMod:CircularBarShader"].Apply();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -4,19 +4,15 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class CounterScarfCooldown : Cooldown
|
||||
public class CounterScarf : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "CounterScarf";
|
||||
public CounterScarf(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Scarf Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/CounterScarf";
|
||||
public override string Texture => "CalamityMod/Cooldowns/CounterScarf";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(255, 115, 178), new Color(255, 76, 76), (float)Math.Sin(Main.GlobalTime * 2f) * 0.5f + 0.5f);
|
||||
public override Color CooldownStartColor => new Color(194, 75, 97);
|
||||
public override Color CooldownEndColor => new Color(255, 76, 76);
|
||||
|
||||
|
||||
public CounterScarfCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,25 +5,21 @@ using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class DivineBlessCooldown : Cooldown
|
||||
public class DivineBless : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "DivineBless";
|
||||
public DivineBless(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Divine Bless Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/DivineRecharge";
|
||||
public override string Texture => "CalamityMod/Cooldowns/DivineBless";
|
||||
public override Color OutlineColor => new Color(233, 192, 68);
|
||||
public override Color CooldownStartColor => new Color(177, 105, 33);
|
||||
public override Color CooldownEndColor => new Color(233, 192, 68);
|
||||
|
||||
|
||||
public DivineBlessCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCompleted()
|
||||
{
|
||||
if (AfflictedPlayer.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(AfflictedPlayer.Center, Vector2.Zero, ProjectileType<AllianceTriangle>(), 0, 0f, AfflictedPlayer.whoAmI);
|
||||
if (instance.player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(instance.player.Center, Vector2.Zero, ProjectileType<AllianceTriangle>(), 0, 0f, instance.player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
|
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 226 B |
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
@@ -16,22 +16,25 @@ namespace CalamityMod.Cooldowns
|
||||
|
||||
public DivingPlatesBreaking(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool CanTickDown() => !instance.player.Calamity().abyssalDivingSuit;
|
||||
public override bool ShouldDisplay() => instance.player.Calamity().abyssalDivingSuit;
|
||||
public override string DisplayName() => "Abyssal Diving Suit Plates Durability";
|
||||
public override string Texture => "CalamityMod/Cooldowns/AbyssalDivingSuitBreakingPlates";
|
||||
public override string OutlineTexture => "CalamityMod/Cooldowns/AbyssalDivingSuitBrokenPlatesOutline";
|
||||
public override string OverlayTexture => "CalamityMod/Cooldowns/AbyssalDivingSuitBrokenPlatesOverlay";
|
||||
public override Color GetOutlineColor()
|
||||
public override bool CanTickDown => !instance.player.Calamity().abyssalDivingSuit;
|
||||
public override bool ShouldDisplay => instance.player.Calamity().abyssalDivingSuit;
|
||||
public override string DisplayName => "Abyssal Diving Suit Plates Durability";
|
||||
public override string Texture => "CalamityMod/Cooldowns/DivingSuitBreakingPlates";
|
||||
public override string OutlineTexture => "CalamityMod/Cooldowns/DivingSuitBrokenPlatesOutline";
|
||||
public override string OverlayTexture => "CalamityMod/Cooldowns/DivingSuitBrokenPlatesOverlay";
|
||||
public override Color OutlineColor
|
||||
{
|
||||
if (instance.timeLeft == 0)
|
||||
return phase0Color;
|
||||
else if (instance.timeLeft == 1)
|
||||
return phase1Color;
|
||||
return phase2Color;
|
||||
get
|
||||
{
|
||||
if (instance.timeLeft == 0)
|
||||
return phase0Color;
|
||||
else if (instance.timeLeft == 1)
|
||||
return phase1Color;
|
||||
return phase2Color;
|
||||
}
|
||||
}
|
||||
public override Color GetCooldownStartColor() => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color GetCooldownEndColor() => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
|
||||
public override bool UseCustomCompactDraw => true;
|
||||
|
||||
@@ -39,32 +42,29 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
Texture2D sprite = GetTexture(Texture);
|
||||
Texture2D outline = GetTexture(OutlineTexture);
|
||||
Color outlineColor = GetOutlineColor();
|
||||
Color startColor = GetCooldownStartColor();
|
||||
|
||||
//Draw the outline
|
||||
spriteBatch.Draw(outline, position, null, outlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(outline, position, null, OutlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
//Draw the icon
|
||||
spriteBatch.Draw(sprite, position, null, Color.White * opacity, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
|
||||
DrawBorderStringEightWay(spriteBatch, Main.fontMouseText, (3 - instance.timeLeft).ToString(), position + new Vector2(-3, -3) * scale, startColor, Color.Black, scale);
|
||||
DrawBorderStringEightWay(spriteBatch, Main.fontMouseText, (3 - instance.timeLeft).ToString(), position + new Vector2(-3, -3) * scale, CooldownStartColor, Color.Black, scale);
|
||||
}
|
||||
}
|
||||
|
||||
public class DivingPlatesBroken : CooldownHandler
|
||||
{
|
||||
private static Color outlineColor = new Color(194, 173, 146);
|
||||
private static Color ringColorLerpStart = new Color(91, 121, 150);
|
||||
private static Color ringColorLerpEnd = new Color(30, 50, 77);
|
||||
|
||||
public DivingPlatesBroken(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay() => true;
|
||||
public override string DisplayName() => "Abyssal Diving Suit Broken Plates";
|
||||
public override string Texture => "CalamityMod/Cooldowns/AbyssalDivingSuitBrokenPlates";
|
||||
public override Color GetOutlineColor() => outlineColor;
|
||||
public override Color GetCooldownStartColor() => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color GetCooldownEndColor() => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Abyssal Diving Suit Broken Plates";
|
||||
public override string Texture => "CalamityMod/Cooldowns/DivingSuitBrokenPlates";
|
||||
public override Color OutlineColor => new Color(194, 173, 146);
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
|
||||
public override void OnCompleted() => instance.player.Calamity().abyssalDivingSuitPlateHits = 0;
|
||||
}
|
||||
@@ -4,19 +4,15 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class DraconicElixirCooldown : Cooldown
|
||||
public class DraconicElixir : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "DraconicElixir";
|
||||
public DraconicElixir(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Draconic Surge Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/DraconicElixir";
|
||||
public override string Texture => "CalamityMod/Cooldowns/DraconicElixir";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(141, 199, 90), new Color(221, 187, 106), (float)Math.Sin(Main.GlobalTime) * 0.5f + 0.5f);
|
||||
public override Color CooldownStartColor => new Color(165, 22, 46);
|
||||
public override Color CooldownEndColor => new Color(216, 103, 43);
|
||||
|
||||
|
||||
public DraconicElixirCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,18 +4,16 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class EvasionScarfCooldown : Cooldown
|
||||
// TODO -- Why do the two scarves not use the same cooldown? They're both called "Scarf Cooldown".
|
||||
public class EvasionScarf : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "EvasionScarf";
|
||||
public EvasionScarf(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Scarf Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/EvasionScarf";
|
||||
public override string Texture => "CalamityMod/Cooldowns/EvasionScarf";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(255, 194, 150), new Color(255, 160, 150), (float)Math.Sin(Main.GlobalTime * 2f) * 0.5f + 0.5f);
|
||||
public override Color CooldownStartColor => new Color(132, 23, 32);
|
||||
public override Color CooldownEndColor => new Color(164, 52, 45);
|
||||
|
||||
public EvasionScarfCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class FleshTotemCooldown : Cooldown
|
||||
public class FleshTotem : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "FleshTotem";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Contact Damage Halving Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/" + skinTexture;
|
||||
public override string Texture => "CalamityMod/Cooldowns/" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
public override Color CooldownStartColor => cooldownColorStart;
|
||||
public override Color CooldownEndColor => cooldownColorEnd;
|
||||
@@ -19,13 +17,13 @@ namespace CalamityMod.Cooldowns
|
||||
public Color cooldownColorStart;
|
||||
public Color cooldownColorEnd;
|
||||
|
||||
public FleshTotemCooldown(int duration, Player player, string skin = "default") : base(duration, player)
|
||||
public FleshTotem(CooldownInstance? c, string skin = "") : base(c)
|
||||
{
|
||||
switch (skin)
|
||||
{
|
||||
case "bloodgod":
|
||||
skinTexture = "BloodGodTotem";
|
||||
outlineColor = new Color(255, 162, 205);
|
||||
outlineColor = new Color(255, 162, 205);
|
||||
cooldownColorStart = new Color(193, 205, 255);
|
||||
cooldownColorEnd = new Color(255, 193, 219);
|
||||
break;
|
||||
@@ -1,14 +1,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class GlobalDodgeCooldown : Cooldown
|
||||
public class GlobalDodge : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "GlobalDodge";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Dodge Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/" + skinTexture;
|
||||
public override string Texture => "CalamityMod/Cooldowns/" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
public override Color CooldownStartColor => cooldownColorStart;
|
||||
public override Color CooldownEndColor => cooldownColorEnd;
|
||||
@@ -19,7 +17,7 @@ namespace CalamityMod.Cooldowns
|
||||
public Color cooldownColorStart;
|
||||
public Color cooldownColorEnd;
|
||||
|
||||
public GlobalDodgeCooldown(int duration, Player player, string skin = "default") : base(duration, player)
|
||||
public GlobalDodge(CooldownInstance? c, string skin = "") : base(c)
|
||||
{
|
||||
switch (skin)
|
||||
{
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class GodSlayerDash : CooldownHandler
|
||||
{
|
||||
public GodSlayerDash(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "God Slayer Dash Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/GodSlayerDash";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(173, 66, 203), new Color(252, 109, 202), instance.Completion);
|
||||
public override Color CooldownStartColor => new Color(252, 109, 202);
|
||||
public override Color CooldownEndColor => new Color(119, 254, 254);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class GodslayerDashCooldown : Cooldown
|
||||
{
|
||||
public override string SyncID => "GodslayerDash";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Godslayer Dash Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/GodslayerDash";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(173, 66, 203), new Color(252, 109, 202), Completion);
|
||||
public override Color CooldownStartColor => new Color(252, 109, 202);
|
||||
public override Color CooldownEndColor => new Color(119, 254, 254);
|
||||
|
||||
|
||||
public GodslayerDashCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class InkBomb : CooldownHandler
|
||||
{
|
||||
public InkBomb(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Ink Bomb Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/InkBomb";
|
||||
public override Color OutlineColor => new Color(205, 182, 137);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(177, 147, 89), new Color(105, 103, 126), instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(177, 147, 89), new Color(105, 103, 126), instance.Completion);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class InkBombCooldown : Cooldown
|
||||
{
|
||||
public override string SyncID => "InkBomb";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Ink Bomb Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/InkBomb";
|
||||
public override Color OutlineColor => new Color(205, 182, 137);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(177, 147, 89), new Color(105, 103, 126), Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(177, 147, 89), new Color(105, 103, 126), Completion);
|
||||
|
||||
|
||||
public InkBombCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class LionHeartShieldCooldown : Cooldown
|
||||
public class LionHeartShield : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "LionHeartShield";
|
||||
public LionHeartShield(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Energy Shell Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/LionHeartShield";
|
||||
public override Color OutlineColor => new Color(232, 239, 239);
|
||||
public override Color CooldownStartColor => new Color(17, 242, 244);
|
||||
public override Color CooldownEndColor => Color.White;
|
||||
|
||||
public LionHeartShieldCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,17 +3,15 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class NebulousCoreCooldown : Cooldown
|
||||
public class NebulousCore : CooldownHandler
|
||||
{
|
||||
public NebulousCore(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Nebulous Core Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/NebulousCore";
|
||||
public override Color OutlineColor => Color.Lerp(new Color(252, 109, 203), new Color(58, 91, 146), Completion);
|
||||
public override Color OutlineColor => Color.Lerp(new Color(252, 109, 203), new Color(58, 91, 146), instance.Completion);
|
||||
public override Color CooldownStartColor => new Color(148, 62, 216);
|
||||
public override Color CooldownEndColor => new Color(255, 187, 207);
|
||||
|
||||
public NebulousCoreCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Cooldowns;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -9,28 +8,25 @@ using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class OmegaBlueCooldown : Cooldown
|
||||
public class OmegaBlue : CooldownHandler
|
||||
{
|
||||
public override string ID => "OmegaBlue";
|
||||
public override bool ShouldDisplay(CooldownInstance instance) => true;
|
||||
public override string DisplayName(CooldownInstance instance) => instance.timeLeft > 1500 ? "Abyssal Madness" : "Abyssal Madness Cooldown";
|
||||
public override string Texture => TimeLeft > 1500 ? "CalamityMod/UI/CooldownIndicators/AbyssalMadnessActive" : "CalamityMod/UI/CooldownIndicators/AbyssalMadness";
|
||||
public override string OutlineTexture => "CalamityMod/UI/CooldownIndicators/AbyssalMadnessOutline";
|
||||
public override string OverlayTexture => "CalamityMod/UI/CooldownIndicators/AbyssalMadnessOverlay";
|
||||
public override Color OutlineColor => TimeLeft > 1500 ? new Color(231, 164, 1) : new Color(72, 135, 205);
|
||||
public override Color CooldownStartColor => TimeLeft > 1500 ? Color.Lerp(new Color(98, 110, 179), new Color(216, 176, 80), (TimeLeft - 1500) / 300f) : new Color(98, 110, 179);
|
||||
public override Color CooldownEndColor => TimeLeft > 1500 ? Color.Lerp(new Color(179, 132, 98), new Color(216, 176, 80), (TimeLeft - 1500) / 300f) : new Color(179, 132, 98);
|
||||
public override LegacySoundStyle EndSound => AfflictedPlayer.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/OmegaBlueRecharge");
|
||||
public OmegaBlue(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public OmegaBlueCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => instance.timeLeft > 1500 ? "Abyssal Madness" : "Abyssal Madness Cooldown";
|
||||
public override string Texture => instance.timeLeft > 1500 ? "CalamityMod/Cooldowns/OmegaBlueActive" : "CalamityMod/Cooldowns/OmegaBlue";
|
||||
public override string OutlineTexture => "CalamityMod/Cooldowns/OmegaBlueOutline";
|
||||
public override string OverlayTexture => "CalamityMod/Cooldowns/OmegaBlueOverlay";
|
||||
public override Color OutlineColor => instance.timeLeft > 1500 ? new Color(231, 164, 1) : new Color(72, 135, 205);
|
||||
public override Color CooldownStartColor => instance.timeLeft > 1500 ? Color.Lerp(new Color(98, 110, 179), new Color(216, 176, 80), (instance.timeLeft - 1500) / 300f) : new Color(98, 110, 179);
|
||||
public override Color CooldownEndColor => instance.timeLeft > 1500 ? Color.Lerp(new Color(179, 132, 98), new Color(216, 176, 80), (instance.timeLeft - 1500) / 300f) : new Color(179, 132, 98);
|
||||
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/OmegaBlueRecharge");
|
||||
|
||||
public override void OnCompleted()
|
||||
{
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(AfflictedPlayer.position, AfflictedPlayer.width, AfflictedPlayer.height, 20, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
int d = Dust.NewDust(instance.player.position, instance.player.width, instance.player.height, 20, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
@@ -39,7 +35,7 @@ namespace CalamityMod.Cooldowns
|
||||
}
|
||||
|
||||
//Charge down at first, and then charge back up
|
||||
private float AdjustedCompletion => TimeLeft > 1500 ? (TimeLeft - 1500) / 300f : 1 - TimeLeft / 1500f;
|
||||
private float AdjustedCompletion => instance.timeLeft > 1500 ? (instance.timeLeft - 1500) / 300f : 1 - instance.timeLeft / 1500f;
|
||||
|
||||
public override void ApplyBarShaders(float opacity)
|
||||
{
|
||||
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
@@ -3,18 +3,15 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class PermafrostConcoctionCooldown : Cooldown
|
||||
public class PermafrostConcoction : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "ConcoctionCooldown";
|
||||
public PermafrostConcoction(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Permafrost's Concoction Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/PermafrostConcoction";
|
||||
public override string Texture => "CalamityMod/Cooldowns/PermafrostConcoction";
|
||||
public override Color OutlineColor => new Color(0, 218, 255);
|
||||
public override Color CooldownStartColor => new Color(144, 184, 205);
|
||||
public override Color CooldownEndColor => new Color(232, 246, 254);
|
||||
|
||||
public PermafrostConcoctionCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,27 +4,26 @@ using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class PlagueBlackoutCooldown : Cooldown
|
||||
public class PlagueBlackout : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "PlagueBlackout";
|
||||
public override bool ShouldDisplay => TimeLeft <= 1500;
|
||||
public PlagueBlackout(CooldownInstance? c) : base(c) => instance.duration = 1500;
|
||||
|
||||
public override bool ShouldDisplay => instance.timeLeft <= 1500;
|
||||
public override string DisplayName => "Plague Blackout Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/PlagueBlackout";
|
||||
public override string Texture => "CalamityMod/Cooldowns/PlagueBlackout";
|
||||
public override Color OutlineColor => new Color(174, 237, 122);
|
||||
public override Color CooldownStartColor => Color.DarkSlateGray;
|
||||
public override Color CooldownEndColor => Color.DarkSlateGray;
|
||||
public override LegacySoundStyle EndSound => AfflictedPlayer.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/PlagueReaperRecharge");
|
||||
|
||||
public PlagueBlackoutCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
Duration = 1500;
|
||||
}
|
||||
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/PlagueReaperRecharge");
|
||||
|
||||
public override void OnCompleted()
|
||||
{
|
||||
Vector2 pos = instance.player.position;
|
||||
int w = instance.player.width;
|
||||
int h = instance.player.height;
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(AfflictedPlayer.position, AfflictedPlayer.width, AfflictedPlayer.height, 89, 0, 0, 100, default, 1.5f);
|
||||
int d = Dust.NewDust(pos, w, h, 89, 0, 0, 100, default, 1.5f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class PotionSickness : CooldownHandler
|
||||
{
|
||||
public PotionSickness(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0;
|
||||
public override string DisplayName => "Healing Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/PotionSickness";
|
||||
public override Color OutlineColor => new Color(255, 142, 165);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), instance.Completion);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class PotionSicknessDisplay : Cooldown
|
||||
{
|
||||
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && AfflictedPlayer.potionDelay > 0;
|
||||
public override string DisplayName => "Healing Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/PotionSickness";
|
||||
public override Color OutlineColor => new Color(255, 142, 165);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), Completion);
|
||||
|
||||
|
||||
public PotionSicknessDisplay(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,20 +4,17 @@ using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class PrismaticLaserCooldown : Cooldown
|
||||
public class PrismaticLaser : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "PrismaticLaser";
|
||||
public PrismaticLaser(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Prismatic Laser Barrage Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/PrismaticLaser";
|
||||
public override string Texture => "CalamityMod/Cooldowns/PrismaticLaser";
|
||||
public override Color OutlineColor => rainbowMode;
|
||||
public override Color CooldownStartColor => rainbowMode;
|
||||
public override Color CooldownEndColor => rainbowMode;
|
||||
|
||||
internal Color rainbowMode => MulticolorLerp(Main.GlobalTime * 0.3f % 1, new Color[] { new Color(103, 244, 251), new Color(255, 167, 236), new Color(255, 225, 136) });
|
||||
|
||||
public PrismaticLaserCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class ProfanedSoulArtifact : CooldownHandler
|
||||
{
|
||||
public ProfanedSoulArtifact(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Profaned Soul Artifact Burnout";
|
||||
public override string Texture => "CalamityMod/Cooldowns/ProfanedSoulArtifact";
|
||||
public override Color OutlineColor => new Color(255, 191, 73);
|
||||
public override Color CooldownStartColor => new Color(181, 136, 177);
|
||||
public override Color CooldownEndColor => new Color(255, 194, 161);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class ProfanedSoulArtifactCooldown : Cooldown
|
||||
{
|
||||
public override string SyncID => "PSABurnout";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Soul Artifact Burn Out";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/ProfanedSoulArtifact";
|
||||
public override Color OutlineColor => new Color(255, 191, 73);
|
||||
public override Color CooldownStartColor => new Color(181, 136, 177);
|
||||
public override Color CooldownEndColor => new Color(255, 194, 161);
|
||||
|
||||
public ProfanedSoulArtifactCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,15 @@ using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class RelicOfResilienceCooldown : Cooldown
|
||||
public class RelicOfResilience : CooldownHandler
|
||||
{
|
||||
public override string SyncID => "RelicOfResilience";
|
||||
public RelicOfResilience(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Relic of Resilience Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/RelicOfResilience";
|
||||
public override string Texture => "CalamityMod/Cooldowns/RelicOfResilience";
|
||||
public override Color OutlineColor => new Color(255, 191, 73);
|
||||
public override Color CooldownStartColor => new Color(122, 66, 59);
|
||||
public override Color CooldownEndColor => new Color(165, 103, 87);
|
||||
|
||||
public RelicOfResilienceCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,15 @@
|
||||
using CalamityMod.Cooldowns;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class JetpackCooldown : Cooldown
|
||||
public class RogueBooster : CooldownHandler
|
||||
{
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Jet Boost Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/" + skinTexture;
|
||||
public override string DisplayName => "Rogue Booster Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
public override Color CooldownStartColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - Completion);
|
||||
public override Color CooldownStartColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - instance.Completion);
|
||||
|
||||
//It's the same cooldown with different skins each time, basically.
|
||||
public string skinTexture;
|
||||
@@ -19,7 +17,7 @@ namespace CalamityMod.Cooldowns
|
||||
public Color cooldownColorStart;
|
||||
public Color cooldownColorEnd;
|
||||
|
||||
public JetpackCooldown(int duration, Player player, string skin = "default") : base(duration, player)
|
||||
public RogueBooster(CooldownInstance? c, string skin = "") : base(c)
|
||||
{
|
||||
switch (skin)
|
||||
{
|
||||
@@ -1,20 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class SandCloakCooldown : Cooldown
|
||||
public class SandCloak : CooldownHandler
|
||||
{
|
||||
public SandCloak(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Sand Cloak Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/SandCloak";
|
||||
public override string Texture => "CalamityMod/Cooldowns/SandCloak";
|
||||
public override Color OutlineColor => new Color(209, 176, 114);
|
||||
public override Color CooldownStartColor => new Color(100, 64, 44);
|
||||
public override Color CooldownEndColor => new Color(132, 95, 54);
|
||||
|
||||
|
||||
public SandCloakCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,19 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class SilvaReviveCooldown : Cooldown
|
||||
public class SilvaRevive : CooldownHandler
|
||||
{
|
||||
public SilvaRevive(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Silva Revive Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/SilvaRevive";
|
||||
public override string Texture => "CalamityMod/Cooldowns/SilvaRevive";
|
||||
public override Color OutlineColor => new Color(151, 211, 152);
|
||||
public override Color CooldownStartColor => new Color(226, 188, 74);
|
||||
public override Color CooldownEndColor => new Color(151, 211, 152);
|
||||
|
||||
public override bool CanTickDown => !CalamityPlayer.areThereAnyDamnBosses && !CalamityPlayer.areThereAnyDamnEvents;
|
||||
|
||||
public SilvaReviveCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class TarragonCloak : CooldownHandler
|
||||
{
|
||||
public TarragonCloak(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Tarragon Cloak Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/TarragonCloak";
|
||||
public override Color OutlineColor => new Color(158, 204, 173);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class TarragonCloakCooldown : Cooldown
|
||||
{
|
||||
public override string SyncID => "TarraCloak";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Tarragon Cloak Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/TarragonCloak";
|
||||
public override Color OutlineColor => new Color(158, 204, 173);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - Completion);
|
||||
|
||||
public TarragonCloakCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class TarragonImmunity : CooldownHandler
|
||||
{
|
||||
public TarragonImmunity(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Tarragon Immunity Cooldown";
|
||||
public override string Texture => "CalamityMod/Cooldowns/TarragonImmunity";
|
||||
public override Color OutlineColor => new Color(215, 182, 82);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class TarragonImmunityCooldown : Cooldown
|
||||
{
|
||||
public override string SyncID => "TarraImmune";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Tarragon Immunity Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/TarragonImmunity";
|
||||
public override Color OutlineColor => new Color(215, 182, 82);
|
||||
public override Color CooldownStartColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - Completion);
|
||||
|
||||
public TarragonImmunityCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,19 +4,17 @@ using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class UniverseSplitterCooldown : Cooldown
|
||||
public class UniverseSplitter : CooldownHandler
|
||||
{
|
||||
public UniverseSplitter(CooldownInstance? c) : base(c) { }
|
||||
|
||||
public override bool ShouldDisplay => true;
|
||||
public override string DisplayName => "Universe Splitter Cooldown";
|
||||
public override string Texture => "CalamityMod/UI/CooldownIndicators/UniverseSplitter";
|
||||
public override string Texture => "CalamityMod/Cooldowns/UniverseSplitter";
|
||||
public override Color OutlineColor => rainbowMode;
|
||||
public override Color CooldownStartColor => rainbowMode;
|
||||
public override Color CooldownEndColor => rainbowMode;
|
||||
|
||||
internal Color rainbowMode => MulticolorLerp(Main.GlobalTime * 0.3f % 1, new Color[] { new Color(236, 202, 255), new Color(192, 245, 255), new Color(255, 194, 205) });
|
||||
|
||||
public UniverseSplitterCooldown(int duration, Player player) : base(duration, player)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||