pet battle logic