+static uint8_t is_effort_finished(struct MapObjAct * moa,
+ struct MapObj * map_object)
+{
+ if (moa->func != actor_move)
+ {
+ if (map_object->progress == moa->effort)
+ {
+ return 1;
+ }
+ }
+ else if (strchr("8624", map_object->arg))
+ {
+ if (map_object->progress == moa->effort)
+ {
+ return 1;
+ }
+ }
+ else if (strchr("1379", map_object->arg))
+ {
+ uint16_t diagonal_effort = (moa->effort * world.map.dist_diagonal)
+ / world.map.dist_orthogonal;
+ if (map_object->progress == diagonal_effort)
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+