slayerd = ((kills - flagKills) + assists + 1.3 * flagKills)/(.5 * (deaths + 2 * betrayals) + .1);
slayer = (int) (Math.toDegrees(Math.atan(slayerd)) * 7);
// Second, it calculates the flag portion, which maxes out at 1370.
flagd = (Math.abs((flagCaps - betrayals) + (0.7 * flagSteals) + (0.3 * flagCarrierKills) + (0.5 * flagTouches)))/((0.3 * betrayals) + .01);
flag = (int) (Math.toDegrees(Math.atan(flagd)) * 15.2222);
// Adjust for instances where the players team won, but the player focused more on slaying.
// The player would have still helped his team win, so his rating is given a slight bump,
// proportional to the margin of victory.
if (teamCaps > opCaps && flag < 1100)
{
slayer = slayer + ((teamCaps - opCaps) * 70);
}
// Finally, add them up.
rating = (int) (slayer + flag);