Method BuyStat
BuyStat(Stat, int)
Spends available stat points to increase a specific stat.
public void BuyStat(Stat stat, int amount)
Parameters
statStatThe stat to increase (Strength, Dexterity, Intelligence, etc)
amountintNumber of stat points to spend
Remarks
Stats influence various character attributes:
- Strength: Increases physical damage and amount of health
- Dexterity: Improves attack speed and dodge chance
- Intelligence: Enhances magic damage and mana pool
// Spend 5 points on strength
BuyStat(Stat.Strength, 5);if (StatPoints >= 5)
{
// Spend points if we have enough
BuyStat(Stat.Strength, 3);
BuyStat(Stat.Dexterity, 2);
Say($"Spent 5 stat points! {StatPoints} remaining");
}
else
{
Say($"Need more stat points! Only have {StatPoints}");
}