stats nerfed a bit
This commit is contained in:
parent
a24a64c811
commit
17690e434e
@ -154,21 +154,28 @@ impl Cryp {
|
||||
|
||||
pub fn create(mut self) -> Cryp {
|
||||
let mut rng = thread_rng();
|
||||
let max = match self.lvl == 64 {
|
||||
true => u64::max_value(),
|
||||
let stam_max = 2_u64.pow(self.lvl.into());
|
||||
|
||||
let stam_min = match self.lvl == 1 {
|
||||
true => 2_u64,
|
||||
false => 2_u64.pow(self.lvl.saturating_sub(1).into()),
|
||||
};
|
||||
|
||||
let min = match self.lvl == 1 {
|
||||
let other_max = match self.lvl == 1 {
|
||||
true => 2_u64,
|
||||
false => 2_u64.pow(self.lvl.saturating_sub(1).into()),
|
||||
};
|
||||
|
||||
let other_min = match self.lvl == 1 {
|
||||
true => 2_u64,
|
||||
false => 2_u64.pow(self.lvl.saturating_sub(2).into()),
|
||||
};
|
||||
|
||||
self.xp = max;
|
||||
self.xp = stam_max;
|
||||
|
||||
self.phys_dmg.set(rng.gen_range(min, max));
|
||||
self.spell_dmg.set(rng.gen_range(min, max));
|
||||
self.stamina.set(rng.gen_range(min, max));
|
||||
self.phys_dmg.set(rng.gen_range(other_min, other_max));
|
||||
self.spell_dmg.set(rng.gen_range(other_min, other_max));
|
||||
self.stamina.set(rng.gen_range(stam_min, stam_max));
|
||||
self.hp.set(self.stamina.base);
|
||||
|
||||
self
|
||||
|
||||
@ -690,14 +690,14 @@ fn generate_mob(lvl: u8) -> Cryp {
|
||||
let mut rng = thread_rng();
|
||||
|
||||
// rng panics on min == max
|
||||
let mob_lvl: u8 = match lvl {
|
||||
1 => 1,
|
||||
_ => rng.gen_range(lvl.saturating_sub(2), lvl)
|
||||
};
|
||||
// let mob_lvl: u8 = match lvl {
|
||||
// 1 => 1,
|
||||
// _ => rng.gen_range(lvl.saturating_sub(2), lvl)
|
||||
// };
|
||||
|
||||
return Cryp::new()
|
||||
.named(&"bamboo basher".to_string())
|
||||
.level(mob_lvl)
|
||||
.level(lvl)
|
||||
.create();
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user