diff --git a/server/src/cryp.rs b/server/src/cryp.rs index 7baa26fc..7bd5cc47 100644 --- a/server/src/cryp.rs +++ b/server/src/cryp.rs @@ -173,35 +173,18 @@ impl Cryp { pub fn roll_stat(&mut self, stat: Stat) -> &mut Cryp { let mut rng = thread_rng(); - // let stam_max = match self.lvl == 64 { - // true => u64::max_value(), - // false => match self.lvl == 1 { - // true => 4_u64, - // false => 2_u64.pow(self.lvl.into()), - // }, - // }; + let stam_min = 512u64.saturating_mul(self.lvl.into()); + let stam_max = 1024u64.saturating_mul(self.lvl.into()); - // let stam_min = match self.lvl == 1 { - // true => 2_u64, - // false => 2_u64.pow(self.lvl.saturating_sub(1).into()), - // }; - - // let other_max = match self.lvl == 1 { - // true => 4_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()), - // }; + let stat_min = 128u64.saturating_mul(self.lvl.into()); + let stat_max = 256u64.saturating_mul(self.lvl.into()); match stat { - Stat::PhysicalDamage => self.phys_dmg.set(rng.gen_range(128, 256)), - Stat::SpellDamage => self.spell_dmg.set(rng.gen_range(128, 256)), - Stat::Speed => self.speed.set(rng.gen_range(128, 256)), + Stat::PhysicalDamage => self.phys_dmg.set(rng.gen_range(stat_min, stat_max)), + Stat::SpellDamage => self.spell_dmg.set(rng.gen_range(stat_min, stat_max)), + Stat::Speed => self.speed.set(rng.gen_range(stat_min, stat_max)), Stat::Stamina => { - self.stamina.set(rng.gen_range(512, 1024)); + self.stamina.set(rng.gen_range(stam_min, stam_max)); self.hp.set(self.stamina.base) }, _ => panic!("{:?} not a rollable stat", stat), @@ -539,7 +522,7 @@ pub fn cryp_spawn(params: CrypSpawnParams, tx: &mut Transaction, account: &Accou let cryp = Cryp::new() .named(¶ms.name) .learn(Skill::Attack) - .level(10) + .level(1) .set_account(account.id) .create(); diff --git a/server/src/skill.rs b/server/src/skill.rs index f7076cfe..6496678d 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -602,7 +602,7 @@ impl Skill { // Strangle - Skill::Stun => 5, + Skill::Stun => 2, Skill::Evasion => 3, // additional layer of dmg avoidance // -----------------