Partials/Victory Conditions

Victory Conditions
The rank of battles and PvP is evaluated as follows (in order, from top to bottom):
 * Perfect S (完全勝利, Total Victory)
 * All enemy ships sunk and no damage taken.
 * S (勝利, Victory)
 * All enemy ships sunk and no allied ships sunk.
 * A (勝利, Victory)
 * Required number of enemy ships sunk and no allied ships sunk. The required number is defined by enemy ships sunk >= 60% of enemy ships rounded: at least 1 out of 2, 2 out of 3, 2 out of 4, 3 out of 5, and 4 out of 6.
 * B (戦術的勝利, Tactical Victory)
 * The allied damage gauge is higher than 250% of the enemy damage gauge: allied damage gauge > 2.5 * enemy damage gauge.
 * The damage gauge is defined as an integer percentage: floor(100 * total damage dealt / initial opponent HP) or floor(100 * (initial opponent HP - final opponent HP) / initial opponent HP).
 * Otherwise, if no allied ships sunk:
 * Enemy flagship sunk.
 * Or if one or more allied ships sunk:
 * All enemy ships sunk.
 * Or enemy flagship sunk and number of allied ships sunk < number of enemy ships sunk.
 * C (戦術的敗北, Tactical Defeat)
 * The allied damage gauge is higher than 90% of the enemy damage gauge: allied damage gauge > 0.9 * enemy damage gauge.
 * Or, if one or more allied ships sunk, enemy flagship sunk and number of allied ships sunk lower than number of enemy ships sunk. (incomplete)
 * E (敗北, Defeat)
 * All allied ships sunk except the flagship in a fleet of 2 or more ships. (incomplete)
 * D (敗北, Defeat)
 * Otherwise.