public void ReadjustMaxes(BuffBox buffs) { MaxHealth = Convert.ToDecimal(GetWillpowerBaseByLevel(Level)) * (1.0M + (buffs.HealthBonusPercent() / 100.0M)); MaxMana = Convert.ToDecimal(GetManaBaseByLevel(Level)) * (1.0M + (buffs.ManaBonusPercent() / 100.0M)); ExtraInventory = buffs.ExtraInventorySpace(); SneakPercent = buffs.SneakPercent(); MoveActionPointDiscount = buffs.MoveActionPointDiscount(); ForceWithinBounds(); }
public void ReadjustMaxes(BuffBox buffs) { // readjust this health/mana by grabbing base amount plus effects from buffs this.MaxHealth = Convert.ToDecimal(PlayerProcedures.GetWillpowerBaseByLevel(this.Level)) * (1.0M + (buffs.HealthBonusPercent() / 100.0M)); this.MaxMana = Convert.ToDecimal(PlayerProcedures.GetManaBaseByLevel(this.Level)) * (1.0M + (buffs.ManaBonusPercent() / 100.0M)); // keep this's health within proper bounds if (this.MaxHealth < 1) { this.MaxHealth = 1; } if (this.MaxMana < 1) { this.MaxMana = 1; } if (this.Health > this.MaxHealth) { this.Health = this.MaxHealth; } if (this.Mana > this.MaxMana) { this.Mana = this.MaxMana; } if (this.Health < 0) { this.Health = 0; } if (this.Mana < 0) { this.Mana = 0; } this.ExtraInventory = buffs.ExtraInventorySpace(); SneakPercent = buffs.SneakPercent(); MoveActionPointDiscount = buffs.MoveActionPointDiscount(); }