basic damage formula added, range check fixed