This commit is contained in:
ntr
2019-05-30 12:51:12 +10:00
parent cfc3261c01
commit 6fffddd15c
5 changed files with 53 additions and 46 deletions
+5 -2
View File
@@ -166,8 +166,11 @@ impl Game {
}
fn skill_phase_start(mut self, num_resolutions: usize) -> Game {
let phase_add_time_ms = 60000 + num_resolutions * 2500;
self.phase_start = Utc::now();
let resolution_animation_ms = num_resolutions * 2500;
let phase_add_time_ms = 60000 + resolution_animation_ms;
self.phase_start = Utc::now()
.checked_add_signed(Duration::milliseconds(resolution_animation_ms as i64))
.expect("could not set phase start");
self.phase_end = Utc::now()
.checked_add_signed(Duration::milliseconds(phase_add_time_ms as i64))
.expect("could not set phase end");