Fixed Pristine Fury Secondary and gave it "fuel"
Now has a fuel meter which recovers over time
This commit is contained in:
1 parent
92737aec9a
commit
a2f1a679e9
10 files changed
+95
-12
No files matched your search
@@ -302,6 +302,10 @@ namespace CalamityMod.CalPlayer
|
||||
public bool despoilerNerf = false;
|
||||
/// <summary> Variable used to trigger Molten Amputator's stealth effect on right-click. </summary>
|
||||
public int amputatorBuff = 0;
|
||||
/// <summary> Variable used to track the fuel of Pristine Fury right click </summary>
|
||||
public int furyFuelMax = 1800;
|
||||
public int furyFuel = 1800;
|
||||
public float furyRefuelTimer = 0;
|
||||
public int rOfResilienceCooldown = 0;
|
||||
public int rOfResilienceEffect = 0;
|
||||
public int rOfResilienceOrbitOffset = 0;
|
||||
|
||||
@@ -203,6 +203,16 @@ namespace CalamityMod.CalPlayer
|
||||
rage = 0f;
|
||||
}
|
||||
|
||||
if (furyFuel < furyFuelMax && furyRefuelTimer >= 0)
|
||||
{
|
||||
furyFuel += (int)furyRefuelTimer;
|
||||
furyRefuelTimer = MathHelper.Lerp(furyRefuelTimer, 25, 0.01f);
|
||||
if (furyFuel > furyFuelMax)
|
||||
furyFuel = furyFuelMax;
|
||||
}
|
||||
else if (furyRefuelTimer < 0)
|
||||
furyRefuelTimer++;
|
||||
|
||||
// De-equipping Draedon's Heart deletes all Adrenaline.
|
||||
if (!draedonsHeart && hadNanomachinesLastFrame)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class FuryFuel : CooldownHandler
|
||||
{
|
||||
public float CompletionPercentage => MathF.Round(instance.Completion * 100);
|
||||
private bool IsEmpty => CompletionPercentage == 100;
|
||||
private float TextXOffset => -5.4f;
|
||||
private Vector2 TextPosition => new(TextXOffset, 15);
|
||||
private Color TextColor => Color.White;
|
||||
private Color TextBorderColor = Color.Violet;
|
||||
|
||||
public static new string ID => "FuryFuel";
|
||||
public override bool CanTickDown => false;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override bool ShouldDisplay => instance.player.HeldItem.type == ItemType<PristineFury>();
|
||||
public override string Texture => "CalamityMod/Cooldowns/" + ID;
|
||||
|
||||
public override Color CooldownStartColor => IsEmpty ? Color.DimGray : Color.Lerp(Color.Purple, Color.SlateGray, instance.Completion);
|
||||
public override Color CooldownEndColor => IsEmpty ? Color.DimGray : Color.Lerp(Color.Orchid, Color.SlateGray, instance.Completion);
|
||||
|
||||
public override void DrawExpanded(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawExpanded(spriteBatch, position, opacity, scale);
|
||||
}
|
||||
|
||||
public override void DrawCompact(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawCompact(spriteBatch, position, opacity, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 368 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Rarities;
|
||||
@@ -8,6 +9,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
@@ -19,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public bool Trail = true;
|
||||
public int shotCount = 0;
|
||||
|
||||
public static int boomTime = 60;
|
||||
public static int boomTime = 6;
|
||||
|
||||
public override Color? TooltipExtensionColor => new Color(255, 140, 0);
|
||||
|
||||
@@ -56,20 +58,40 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
// Right click consumes ammo at the same rate but faster at spewing
|
||||
public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 0.5f : 1f;
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
int max = player.Calamity().furyFuelMax;
|
||||
if (player.Calamity().cooldowns.TryGetValue(FuryFuel.ID, out var cooldown))
|
||||
{
|
||||
cooldown.timeLeft = max - player.Calamity().furyFuel;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddCooldown(FuryFuel.ID, max);
|
||||
}
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return (player.altFunctionUse != 2); // Right click doesn't use ammo, it's crystal powder not gel
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(5f));
|
||||
Projectile.NewProjectile(source, position, newVel, ModContent.ProjectileType<PristineSecondary>(), (int) (damage * 0.7f), knockback, player.whoAmI); //.7x base damage
|
||||
player.Calamity().furyRefuelTimer = -50;
|
||||
if (player.Calamity().furyFuel > 0)
|
||||
{
|
||||
Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(5f));
|
||||
Projectile.NewProjectile(source, position, newVel, ModContent.ProjectileType<PristineSecondary>(), (int)(damage * 0.25f), knockback, player.whoAmI); //.25x base damage
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(position + velocity * 3f + new Vector2(0, -3), ModContent.DustType<LightDust>(), velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.5f, 2.5f), 0, default, Main.rand.NextFloat(0.4f, 0.8f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Color.Orchid;
|
||||
Dust dust = Dust.NewDustPerfect(position + velocity * 3f + new Vector2(0, -3), ModContent.DustType<LightDust>(), velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.5f, 2.5f), 0, default, Main.rand.NextFloat(0.4f, 0.8f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Color.Orchid;
|
||||
|
||||
CritSpark spark = new CritSpark(position + velocity * 3f + new Vector2(0, -3), velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.2f, 1.8f), Color.White, Color.Orchid, 0.9f, 18, 2f, 2.2f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
CritSpark spark = new CritSpark(position + velocity * 3f + new Vector2(0, -3), velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.2f, 1.8f), Color.White, Color.Orchid, 0.9f, 18, 2f, 2.2f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
player.Calamity().furyFuel -= 15;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -989,7 +989,7 @@ PristineFury: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires an intense helix of flames that burst into a column of smoke
|
||||
<right> to disperse flammable crystalline powder
|
||||
<right> to disperse a limited supply of flammable crystalline powder that restores over time
|
||||
Powder can be ignited, causuing it to explode for extra damage
|
||||
Both helix flames and other nearby explosions can ignite the powder
|
||||
Uses gel for ammo
|
||||
|
||||
@@ -92,6 +92,7 @@ Cooldowns: {
|
||||
DSOCritCooldown: Extra Critical Strike Chance
|
||||
ParryCooldown: Parry Ability Cooldown
|
||||
FleshTotem: Contact Damage Halving Cooldown
|
||||
FuryFuel: Crystal Powder
|
||||
GaelsRage: Gael's Greatsword Rage Cooldown
|
||||
GlobalDodge: Dodge Cooldown
|
||||
GodSlayerDash: God Slayer Dash Cooldown
|
||||
|
||||
@@ -50,7 +50,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
// Xyk: "This is probably too much lol"
|
||||
// Yeah I'd say 7x base damage is a bit much
|
||||
Projectile.damage *= (int) 5.5;
|
||||
// Xyk: Follow up, the inital damage is nerfed AND it has a "cooldown" 7x should now be fine...
|
||||
Projectile.damage *= (int)7;
|
||||
FogColor = Color.Lerp(Color.OrangeRed, Color.Goldenrod, Main.rand.NextFloat());
|
||||
|
||||
SoundStyle ignite = new("CalamityMod/Sounds/Custom/Providence/ProvidenceHolyBlastImpact");
|
||||
|
||||
Reference in new issue
Block a user