if self.falling_anim and self:canPeeOrPuke(current) and self.has_fallen == 1 then self:setNextAction(FallingAction():setMustHappen(), 0) self.has_fallen = 2 if self.has_fallen == 2 then self:setNextAction{name = "on_ground"} self.on_ground = true end if self.on_ground then self:setNextAction{name = "get_up"} end if current.name == "idle" or current.name == "walk" then self:queueAction({ name = current.name, x = current.x, y = current.y, must_happen = current.must_happen, is_entering = current.is_entering, }, 2) else self:queueAction({ name = current.name, room_type = current.room_type, message_sent = true, diagnosis_room = current.diagnosis_room, treatment_room = current.treatment_room, }, 2) end if current.on_interrupt then current.on_interrupt(current, self) else self:finishAction() end self.on_ground = false if math.random(1, 5) == 3 then self:shake_fist() end self:fallingAnnounce() self:changeAttribute("happiness", -0.05) -- falling makes you very unhappy else return end