diff --git a/vacation.p8 b/vacation.p8 index fe02c8c..b5b21dc 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -1307,7 +1307,7 @@ function toyphin:update() new_y = 64 + ((dy + y - 64)/dy * -3.8) dy = -3.8 else - dy = (dy - 7.6) / 3 + dy = (dy - 7.6) / 2.5 end else -- brake @@ -1316,7 +1316,7 @@ function toyphin:update() new_y = 64 dy = 0 else - dy /= 2 + dy /= 1.75 end end elseif new_y >= 64 and y < 64 then @@ -1328,7 +1328,7 @@ function toyphin:update() new_y = 64 - ((dy - y + 64)/dy * 3.8) dy = 3.8 else - dy = (7.6 + dy) / 3 + dy = (7.6 + dy) / 2.5 end else --brake @@ -1337,7 +1337,7 @@ function toyphin:update() new_y = 64 dy = 0 else - dy /= 2 + dy /= 1.75 end end end @@ -1346,22 +1346,21 @@ function toyphin:update() local wet, st = y > 64, phinstate_error if dy < -2.15 then st = wet and phinstate_rise_full or phinstate_jump_full - elseif dy <= -1 and (y < 60 or y > 68) then + elseif dy <= -1.45 then st = wet and phinstate_rise_wax or phinstate_jump_wane - elseif dy <= -1 then - st = phinstate_nrm - elseif dy < 1 then - -- handle idle special case later - st = wet and phinstate_return or phinstate_crest - elseif dy <= 2.15 and (y < 60 or y < 68) then - st = wet and phinstate_dive_wane or phinstate_fall_wax + elseif dy < 1.45 then + if y > 50 and y < 78 then + st = phinstate_nrm + else + st = wet and phinstate_return or phinstate_crest + end elseif dy <= 2.15 then - st = phinstate_nrm + st = wet and phinstate_dive_wane or phinstate_fall_wax else st = wet and phinstate_dive_full or phinstate_fall_full end - if (y == 64 and dy == 0) st = phinstate_nrm + if (y > 50 and y < 78 and dy > -1.35 and dy <1.35 ) st = phinstate_nrm -- test mode --if (btn(5)) self.exiting = true self.x, self.y, self.dy, self.state = x, y, dy, st