Defines a GemSapphire class that extends Gem. It provides an ItemId constant, computes a move speed bonus based on gem level, returns description and upgrade description strings, and applies a multiplicative move speed modifier to the Player when the gem's effect starts.
using Sandbox;
public class GemSapphire : Gem
{
public const string ItemId = "gem_sapphire";
private static int GetMoveSpeed( int level ) => 1 + level * 1;
public static string Description( int level ) => $"+{GetMoveSpeed( level )}% move speed";
public static string UpgradeDescription( int level ) => $"+{GetMoveSpeed( level - 1 )}%→+{GetMoveSpeed( level )}% move speed";
public override void OnRunStart()
{
Player.Modify( this, PlayerStat.MoveSpeedMultiplier, 1f + GetMoveSpeed( Level ) * 0.01f, ModifierType.Mult );
}
}