cleanup and check for enemy team in pvp

This commit is contained in:
ntr
2018-12-03 13:33:54 +11:00
parent ba1e909d89
commit b38be6d7bb
3 changed files with 82 additions and 79 deletions
+2 -2
View File
@@ -156,12 +156,12 @@ impl Cryp {
let mut rng = thread_rng();
let max = match self.lvl == 64 {
true => u64::max_value(),
false => 2_u64.pow(self.lvl.into()),
false => 2_u64.pow(self.lvl.saturating_sub(1).into()),
};
let min = match self.lvl == 1 {
true => 2_u64,
false => 2_u64.pow(self.lvl.saturating_sub(1).into()),
false => 2_u64.pow(self.lvl.saturating_sub(2).into()),
};
self.xp = max;