fixed coordinate bug and made damageTiles works