Build world campaigns rewards and recaps

This commit is contained in:
2026-05-01 11:44:41 +02:00
parent 28e7e46e13
commit 257b0dbef6
100 changed files with 11300 additions and 367 deletions

View File

@@ -0,0 +1,60 @@
<?php
declare(strict_types=1);
namespace App\Enums;
enum WorldRewardType: string
{
case Participant = 'participant';
case Featured = 'featured';
case Finalist = 'finalist';
case Winner = 'winner';
case Spotlight = 'spotlight';
public function label(): string
{
return match ($this) {
self::Participant => 'Participant',
self::Featured => 'Featured',
self::Finalist => 'Finalist',
self::Winner => 'Winner',
self::Spotlight => 'Spotlight',
};
}
public function tone(): string
{
return match ($this) {
self::Participant => 'sky',
self::Featured => 'amber',
self::Finalist => 'violet',
self::Winner => 'emerald',
self::Spotlight => 'rose',
};
}
public function source(): string
{
return match ($this) {
self::Participant, self::Featured => 'automatic',
self::Finalist, self::Winner, self::Spotlight => 'manual',
};
}
public function isAutomatic(): bool
{
return $this->source() === 'automatic';
}
public function xpReward(): int
{
return match ($this) {
self::Participant => 20,
self::Featured => 40,
self::Finalist => 70,
self::Winner => 120,
self::Spotlight => 55,
};
}
}