Reworked the cooldown + further tweaks
No files matched your search
@@ -1617,7 +1617,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
SoundEngine.PlaySound(BlazingCore.ParrySuccessSound, Player.Center);
|
||||
blazingCoreSuccessfulParry = 60;
|
||||
Player.AddCooldown(ParryCooldown.ID, 60 * 30, false); //cooldown is frames in seconds multiplied by the desired amount of seconds
|
||||
Player.AddCooldown(ParryCooldown.ID, 60 * 30, false, "blazingcore"); //cooldown is frames in seconds multiplied by the desired amount of seconds
|
||||
}
|
||||
|
||||
if (blazingCoreParry > 1)
|
||||
@@ -1631,12 +1631,12 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.GiveIFrames(60, true);
|
||||
flameLickedShellEmpoweredParry = true;
|
||||
modifiers.SourceDamage *= 0.1f; //90% dr
|
||||
modifiers.SourceDamage.Flat *= 0.1f; //90% dr
|
||||
modifiers.DisableSound();
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(ProfanedGuardianDefender.ShieldDeathSound, Player.Center);
|
||||
Player.AddCooldown(ParryCooldown.ID, 60 * 20, false);
|
||||
Player.AddCooldown(ParryCooldown.ID, 60 * 20, false, "flamelickedshell");
|
||||
FlameLickedShell.handleParry(Player);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 200 B |
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
@@ -7,11 +8,37 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public static new string ID => "ParryCooldown";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override bool SavedWithPlayer => false;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override string Texture => "CalamityMod/Cooldowns/ParryCooldown";
|
||||
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 override string Texture => "CalamityMod/Cooldowns/" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
public override Color CooldownStartColor => cooldownColorStart;
|
||||
public override Color CooldownEndColor => cooldownColorEnd;
|
||||
|
||||
//It's the same cooldown with different skins each time, basically.
|
||||
public string skinTexture;
|
||||
public Color outlineColor;
|
||||
public Color cooldownColorStart;
|
||||
public Color cooldownColorEnd;
|
||||
|
||||
public ParryCooldown() : this("") { }
|
||||
public ParryCooldown(string skin)
|
||||
{
|
||||
switch (skin)
|
||||
{
|
||||
case "blazingcore":
|
||||
skinTexture = "BlazingCoreParry";
|
||||
outlineColor = new Color(255, 191, 73);
|
||||
cooldownColorStart = new Color(181, 136, 177);
|
||||
cooldownColorEnd = new Color(255, 194, 161);
|
||||
break;
|
||||
|
||||
case "flamelickedshell":
|
||||
skinTexture = "FlameLickedShellParry";
|
||||
outlineColor = new Color(211, 124, 93);
|
||||
cooldownColorStart = Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - (instance?.Completion ?? 0));
|
||||
cooldownColorEnd = Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - (instance?.Completion ?? 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
float radians = j - (totalProjectiles - 1f) / 2f;
|
||||
Vector2 offset = velocity.RotatedBy(offsetAngle * radians);
|
||||
int proj = Projectile.NewProjectile(player.GetSource_FromThis(), player.Center + offset, projectileVelocity * 1.05f, type, damage, 2f, Main.myPlayer);
|
||||
Projectile.NewProjectile(player.GetSource_FromThis(), player.Center + offset, projectileVelocity * 1.5f, type, damage, 2f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
totalProjectiles = 12;
|
||||
|
||||