/** * Get health and energy the victim looses * * This is dependent on the rank difference * * Attacking a player with higher rank means the victim * will loose more health and energy * * @param \Kofradia\Game\Rank\Points Rank of victim * @return array( * health => int * energy => int) */ public function getAffectedTable(\Kofradia\Game\Rank\Points $rank_to) { $num_from = $this->up->getRank()->getPointsRank()->number; $num_to = $rank_to->number; $offset = $num_to - $num_from; $offset = max(-2, min(2, $offset)); return self::$affect[$offset]; }