calculates AP gain by codename for ingress