diff --git a/migrations/2026/02/Version20260215175312.php b/migrations/2026/02/Version20260215175312.php new file mode 100644 index 00000000..7a847d46 --- /dev/null +++ b/migrations/2026/02/Version20260215175312.php @@ -0,0 +1,62 @@ +. + */ + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +final class Version20260215175312 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // Forgotten Flowerpot + $this->addSql(<<addSql(<<. + */ + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +final class Version20260215224156 extends AbstractMigration +{ + public function getDescription(): string + { + return 'what is bird? who can say. this item group claims to be an authority, at any rate.'; + } + + public function up(Schema $schema): void + { + $this->addSql("INSERT INTO `item_group` (`id`, `name`, `is_craving`, `is_gift_shop`) VALUES (62, 'Bird Stuff', '0', '0') ON DUPLICATE KEY UPDATE id = id;"); + + $this->addSql(<<setSpice($spice); } + if($rng->rngNextInt(1, 8) === 8) + $newInventory[] = $inventoryService->receiveItem('Duck Pond', $user, $user, $user->getName() . ' got this from ' . $inventory->getItem()->getNameWithArticle() . '.', $location, $inventory->getLockedToOwner()); + return BoxHelpers::countRemoveFlushAndRespond('Opening the box revealed', $userStatsRepository, $user, $inventory, $newInventory, $responseService, $em); } } diff --git a/src/Controller/Item/Pinata/HatBoxController.php b/src/Controller/Item/Pinata/HatBoxController.php index dd28539f..71e84564 100644 --- a/src/Controller/Item/Pinata/HatBoxController.php +++ b/src/Controller/Item/Pinata/HatBoxController.php @@ -58,7 +58,6 @@ public function openHatBox( 'Merchant\'s Cap', 'Merchant\'s Other Cap', 'Much Too Tall', - 'Pizzaface', 'Propeller Beanie', 'Sombrero', 'Uncommon Blue', diff --git a/src/Controller/Item/Pinata/PizzaBoxController.php b/src/Controller/Item/Pinata/PizzaBoxController.php index 52080d1e..c01e2358 100644 --- a/src/Controller/Item/Pinata/PizzaBoxController.php +++ b/src/Controller/Item/Pinata/PizzaBoxController.php @@ -58,16 +58,22 @@ public function openPizzaBox( ->execute(); $numSlices = $rng->rngNextFromArray([ - 3, 3, 3, 3, 3, 4, 4, 4, 5, 6, // averages 3.8 (slightly less than 4, to avoid an infinite pizza box engine) + 1, 3, 3, 3, 3, 4, 4, 4, 5, 6, // averages less than 4, to avoid an infinite pizza box engine ]); - for($i = 0; $i < $numSlices; $i++) + if($numSlices === 1) + $newInventory[] = $inventoryService->receiveItem('Pizzaface', $user, $user, $description, $location, $locked); + else { - $newInventory[] = $inventoryService->receiveItem($rng->rngNextFromArray($possibleSlices), $user, $user, $description, $location, $locked) - ->setSpice($inventory->getSpice()) - ; + for($i = 0; $i < $numSlices; $i++) + { + $newInventory[] = $inventoryService->receiveItem($rng->rngNextFromArray($possibleSlices), $user, $user, $description, $location, $locked) + ->setSpice($inventory->getSpice()) + ; + } } + return BoxHelpers::countRemoveFlushAndRespond('You open the box, finding', $userStatsRepository, $user, $inventory, $newInventory, $responseService, $em); } diff --git a/src/Controller/Item/Scroll/FarmerController.php b/src/Controller/Item/Scroll/FarmerController.php index d1fc537f..69f25d90 100644 --- a/src/Controller/Item/Scroll/FarmerController.php +++ b/src/Controller/Item/Scroll/FarmerController.php @@ -21,6 +21,7 @@ use App\Functions\UserQuestRepository; use App\Service\Clock; use App\Service\InventoryService; +use App\Service\IRandom; use App\Service\ResponseService; use App\Service\UserStatsService; use Doctrine\ORM\EntityManagerInterface; @@ -37,7 +38,7 @@ class FarmerController public function invokeFarmerScroll( Inventory $inventory, ResponseService $responseService, InventoryService $inventoryService, UserStatsService $userStatsRepository, EntityManagerInterface $em, Clock $clock, - UserAccessor $userAccessor + UserAccessor $userAccessor, IRandom $rng ): JsonResponse { $user = $userAccessor->getUserOrThrow(); @@ -68,7 +69,14 @@ public function invokeFarmerScroll( } $items = [ - 'Straw Hat', $wheatOrCorn, 'Scythe', 'Creamy Milk', 'Egg', 'Grandparoot', 'Crooked Stick', 'Potato' + $rng->rngNextFromArray([ 'Straw Hat', 'Forgotten Flowerpot' ]), + $wheatOrCorn, + $rng->rngNextFromArray([ 'Scythe', 'Garden Shovel' ]), + $rng->rngNextFromArray([ 'Creamy Milk', 'Cheese', 'Plain Yogurt' ]), + 'Egg', + $rng->rngNextFromArray([ 'Potato', 'Carrot', 'Beans', 'Onion' ]), + 'Grandparoot', + 'Crooked Stick' ]; $newInventory = [];