@extends('home.layout')
@section('home-title')
Foraging
@endsection
@section('home-content')
{!! breadcrumbs(['Foraging' => 'foraging']) !!}
Welcome to foraging! Here you can choose an area to check for goodies.
Goods will be claimable after you return from scavenging! Usually, about
{{-- convert integer to minutes using carbon (multiple integer by 60) --}}
{{ config('lorekeeper.foraging.forage_time') . ' minute' . (config('lorekeeper.foraging.forage_time') > 1 ? 's' : '') }}
is the amount of time it takes to check out an area.
@if ($user->foraging->foraged_at)
Last Foraged: {!! pretty_date($user->foraging->foraged_at) !!}
Foraging Stamina Left: {{ $user->foraging->stamina }}
@endif
@if (config('lorekeeper.foraging.use_characters') && !$user->foraging->distribute_at)
Current Character
@if (!$user->foraging->character)
No character selected!
@else
@endif
{!! Form::open(['url' => 'foraging/edit/character']) !!}
{!! Form::select('character_id', $characters, $user->foraging->character_id, ['class' => 'form-control m-1', 'placeholder' => 'None Selected']) !!}
{!! Form::submit('Select Character', ['class' => 'btn btn-primary mb-2']) !!}
{!! Form::close() !!}
@endif
@if (config('lorekeeper.foraging.use_characters') && $user->foraging->character)
{!! $user->foraging->character->fullName !!}
@endif
Foraging complete in {{ $diff < 1 ? 'less than a minute' : $diff }}
Started {!! pretty_date($user->foraging->foraged_at) !!}
@elseif($user->foraging->distribute_at <= $now && $user->foraging->forage_id)
{{-- When foraging is done and we can claim --}}
@if (config('lorekeeper.foraging.use_characters') && $user->foraging->character)
@endif
{!! Form::open(['url' => 'foraging/claim']) !!}
@if ($user->foraging->forage->imageUr)
@endif
{!! $user->foraging->forage->fancyDisplayName !!}
{!! Form::submit('Claim Reward', ['class' => 'btn btn-primary m-2']) !!}
{!! Form::close() !!}
@elseif($user->foraging->stamina > 0)
{{-- Base State --}}
@if (!count($tables))
No active forages. Come back soon!
@else
@foreach ($tables->sortByDesc('is_visible') as $table)
{!! Form::open(['url' => 'foraging/forage/' . $table->id]) !!}
{!! Form::button(($table->isVisible ? '' : ' ') . 'Forage in the ' . $table->display_name, ['class' => 'btn btn-primary m-2', 'type' => 'submit']) !!}
- This forage costs {{ $table->stamina_cost }} stamina.
@if ($table->has_cost)
- This forage costs {!! $table->currency->display($table->currency_quantity) !!}.
@endif
{!! Form::close() !!}
@endforeach
@endif
@else
You've exhausted yourself today and have no stamina left. Come back tomorrow to continue foraging!
@endif
@endsection