fixed get attacker input algorithm

made a clever (i think) exit condition for this particular get attacker input algorithm