@extends('layouts.admin') @section('title','Games') @section('admin-content')
CHOOSE YOUR LUCKY MOMENT

Games.

Choose a game. Open Settings to customise, preview or activate it.

Active game: {{ ['lucky-wheel'=>'Lucky Wheel','lucky-gift-box'=>'Lucky Gift Box','lucky-scratch-card'=>'Lucky Scratch Card','lucky-angpao-tree'=>'Lucky Ang Pao Tree','cat-treasure-hunt'=>"Cat’s Treasure Hunt",'lucky-claw-machine'=>'Lucky Claw Machine','lucky-capsule-machine'=>'Lucky Capsule Machine'][$activeGame] }}. Games share receipt plays, prize stock and reward history. Changing games keeps remaining plays.

@foreach(['lucky-wheel'=>['Lucky Wheel','Turn the wheel for a little surprise.','wheel'],'lucky-gift-box'=>['Lucky Gift Box','Choose a gift and discover your lucky moment.','gift'],'lucky-scratch-card'=>['Lucky Scratch Card','Scratch away the coating to discover your reward.','scratch'],'lucky-angpao-tree'=>['Lucky Ang Pao Tree','Shake the tree and open your lucky red packet.','angpao'],'cat-treasure-hunt'=>["Cat’s Treasure Hunt",'Send a curious cat to find your hidden surprise.','treasure'],'lucky-claw-machine'=>['Lucky Claw Machine','Grab a capsule and open your lucky surprise.','claw'],'lucky-capsule-machine'=>['Lucky Capsule Machine','Turn the handle and open a lucky capsule.','capsule']] as $key=>[$name,$description,$art])

{{ $name }}

{{ $description }}

@if(app(\App\Services\TeamAccess::class)->can(auth()->user(),'games.activate'))
@csrf @if($key!=='lucky-wheel')@foreach((match($key){'lucky-gift-box'=>$gift,'lucky-scratch-card'=>$scratch,'lucky-angpao-tree'=>$angpao,'lucky-claw-machine'=>$claw,'cat-treasure-hunt'=>$treasure,default=>$capsule}) as $field=>$value)@endforeach @endif
@endif
@endforeach
@foreach(['lucky-wheel'=>'Lucky Wheel','lucky-gift-box'=>'Lucky Gift Box','lucky-scratch-card'=>'Lucky Scratch Card','lucky-angpao-tree'=>'Lucky Ang Pao Tree','cat-treasure-hunt'=>"Cat’s Treasure Hunt",'lucky-claw-machine'=>'Lucky Claw Machine','lucky-capsule-machine'=>'Lucky Capsule Machine'] as $key=>$name) has('errors')&&old('game')===$key) data-auto-open @endif>

{{ $name }} settings

@csrf
@if(session()->has('errors')&&old('game')===$key)@endif @if($key==='lucky-wheel')

Your existing wheel layout, prize images and appearance settings are kept.

Preview or activate this game below. Layout and appearance open their existing settings pages.

@elseif($key==='lucky-angpao-tree')

Choose your tree design. Manage Game Prizes controls the hanging packets when this game is active. Each row is one packet; repeat prizes to add more packets without changing their winning chances.

@foreach(['fan'=>'Golden Fan Tree','garden'=>'Paper-Cut Garden Tree','blossom'=>'Blossom Fortune Tree'] as $design=>$label)@endforeach
@foreach(['heading'=>'Heading','intro'=>'Instructions','button'=>'Draw button label'] as $field=>$label)@endforeach

Three seconds of shaking, then one packet falls. The customer opens it to reveal their saved reward. Preview uses samples only.

@elseif($key==='cat-treasure-hunt')

Draws directly from active, in-stock prizes with positive weights in Prizes & odds. Four hiding spots are visual choices and do not affect the odds. Game Prize Pool assignments are not needed.

@foreach(['heading'=>'Heading','intro'=>'Instructions','button'=>'Search button label'] as $field=>$label)@endforeach

Preview creates sample rewards only. Each search uses one play. Skip animation and reduced-motion preferences are supported.

@elseif($key==='lucky-claw-machine')

Rewards come directly from active, in-stock prizes with positive weights in Prizes & odds. Each automatic grab retrieves one capsule. Button timing does not change the winning chance.

@foreach(['heading'=>'Heading','intro'=>'Instructions','button'=>'Draw button label'] as $field=>$label)@endforeach

Preview creates sample rewards only. Skip animation and reduced-motion preferences are supported.

@elseif($key==='lucky-capsule-machine')

Capsule Machine draws directly from active, in-stock prizes with positive weights in Prizes & odds. Game Prize Pool assignments are not needed.

@foreach(['machine_color'=>'Machine colour','capsule_color'=>'Capsule colour'] as $field=>$label)@endforeach

Starting the machine uses one receipt play and saves the weighted reward before the capsule drops. Skip animation is available. Preview creates sample results only.

@elseif($key==='lucky-scratch-card')

Scratch Card selects rewards directly from active, in-stock prizes with positive weights in Prizes & odds β†—. Wheel slots and Game Prize Pool assignments are not used.

Starting a card uses one receipt play and saves the weighted reward before scratching. Reveal without scratching is available for accessibility. Preview creates sample results only.

@else

The actual reward uses the prize weights and assigned prize pool. High-value PIN displays in the other boxes are a separate showcase.

Preview uses sample rewards only. Reduced-motion preferences skip effects. Sound stays optional. Saving settings does not activate the game. @endif
@endforeach @endsection @push('scripts')@endpush