perks/CurseDashCooldown.cs

A Perk class named CurseDashCooldown that represents a unique curse called "Weak Lungs". It registers the perk with a name, image and description string, and on Refresh it applies a multiplicative modification to the player's dash cooldown stat using a GetValue lookup.

🐞 Description claims -50% dash recharge speed but Refresh applies a 1.5x multiplier to PlayerStat.DashCooldown, which is a +50% cooldown not -50% recharge speed.
using System;
using Sandbox;

[Perk( Rarity.Unique, curse: true, disabled: true, alwaysOfferDebug: false )]
public class CurseDashCooldown : Perk
{
	private enum Mod { DashCooldown };

	static CurseDashCooldown()
	{
		Register<CurseDashCooldown>(
			name: "Weak Lungs",
			imagePath: "textures/icons/vector/curse_dash_cooldown.png",
			description: level => $"-{(int)GetValue( level, Mod.DashCooldown, true )}% dash recharge speed"
		);
	}

	public override void Start()
	{
		base.Start();
	}

	public override void Refresh()
	{
		base.Refresh();

		Player.Modify( this, PlayerStat.DashCooldown, GetValue( Level, Mod.DashCooldown ), ModifierType.Mult );
	}

	private static float GetValue( int level, Mod mod, bool isPercent = false )
	{
		switch ( mod )
		{
			case Mod.DashCooldown:
			default:
				return isPercent
					? 50f
					: 1f + 0.50f;
		}
	}
}