summaryrefslogtreecommitdiff
path: root/includes/score.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/score.inc')
-rw-r--r--includes/score.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/score.inc b/includes/score.inc
index 21baf67..703b9cc 100644
--- a/includes/score.inc
+++ b/includes/score.inc
@@ -1,7 +1,6 @@
<?php
function calculateScore($metadata, $name) {
- $scoreHost = $metadata["host"] ? 10000 : 0;
$scoreFictive = $metadata["fictive"] ? 200 : 0;
$scoreLittle = $metadata["little"] === 2 ? 100 : ($metadata["little"] === 1 ? 50 : ($metadata["little"] === 3 ? 75 : 0));
$scoreNotTalking = $metadata["not_talking"] ? -200 : 0;
@@ -13,16 +12,17 @@ function calculateScore($metadata, $name) {
$relations = (count($metadata["marefriends"]) * ($metadata["little"] ? 1 : 2)) + count($metadata["sisters"]);
$scoreRelations = $relations * 50;
+ $scoreLeader = $metadata["leader"] ? 10000 : 0;
+ $scorePersecutor = $metadata["persecutor"] ? -10000 : 0;
+
$scoreAdd = 0;
if ($name === "Cloudy Dreams") $scoreAdd += 250;
- if ($name === "Zoom Zephyrwing") $scoreAdd += 2500;
- if ($name === "Thunder") $scoreAdd += 2500;
- if ($name === "Scoots/Mia") $scoreAdd -= 495;
+ if ($name === "Scootaloo") $scoreAdd -= 235;
- $score = $scoreHost + $scoreFictive + $scoreLittle + $scoreNotTalking + $scoreProtector + $scoreSharedMemory + $scoreRelations + $scoreSpecies + $scoreName + $scoreMedian + $scoreAdd;
+ $score = $scoreLeader + $scorePersecutor + $scoreFictive + $scoreLittle + $scoreNotTalking + $scoreProtector + $scoreSharedMemory + $scoreRelations + $scoreSpecies + $scoreName + $scoreMedian + $scoreAdd;
return [
- "host" => $scoreHost,
+ "leader" => $scoreLeader,
"fictive" => $scoreFictive,
"little" => $scoreLittle,
"median" => $scoreMedian,
@@ -32,6 +32,7 @@ function calculateScore($metadata, $name) {
"shared_memory" => $scoreSharedMemory,
"relations" => $scoreRelations,
"species" => $scoreSpecies,
+ "persecutor" => $scorePersecutor,
"additional" => $scoreAdd,
"total" => $score
];