public void AddBonusToInventory(Bonus bonus) { Validation.ValidateData.CheckIsNull(bonus, nameof(bonus)); this.inventory.Add(bonus); }
public virtual void ApplyBonus(Bonus bonus) { this.HealthPoints += bonus.HealthBoost; if (this.HealthPoints > DefaultMaxHealth) { this.HealthPoints = DefaultMaxHealth; } this.ManaPoints += bonus.ManaBoost; if (this.ManaPoints > DefaultMaxMana) { this.ManaPoints = DefaultMaxMana; } }