lvl 64 stam fix

This commit is contained in:
ntr 2018-12-11 14:39:44 +11:00
parent 17690e434e
commit 09c0a624d9
2 changed files with 12 additions and 1 deletions

View File

@ -154,7 +154,10 @@ impl Cryp {
pub fn create(mut self) -> Cryp {
let mut rng = thread_rng();
let stam_max = 2_u64.pow(self.lvl.into());
let stam_max = match self.lvl == 64 {
true => u64::max_value(),
false => 2_u64.pow(self.lvl.into()),
};
let stam_min = match self.lvl == 1 {
true => 2_u64,

View File

@ -407,6 +407,14 @@ impl Game {
}
fn log_resolution(&mut self, source: &Cryp, target: &Cryp, cast: &Cast) -> &mut Game {
match cast.resolution.disable.disabled {
true => {
self.log.push(format!("{:?} {:?} {:?} disabled [{:?}]", source.name, cast.skill, target.name, cast.resolution.disable.effects));
return self;
},
false => (),
};
for result in cast.resolution.results.iter() {
match result {
ResolutionResult::Damage { amount, category: _, immunity: _ } => {