Skip to content

Commit

Permalink
voodoo view, premium column
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasan Huseyin Gucuyener committed Jan 23, 2018
1 parent 74d4d00 commit 7701b06
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 1 deletion.
22 changes: 22 additions & 0 deletions app/Http/Controllers/CityController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Created by PhpStorm.
* User: Osein
* Date: 1/22/2018
* Time: 10:41 PM
*/

namespace App\Http\Controllers;

class CityController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}

public function getVoodoo()
{
return view('city.voodoo');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddPremiumColumnToUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function(Blueprint $table) {
$table->unsignedInteger('premium');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function(Blueprint $table) {
$table->dropColumn('premium');
});
}
}
19 changes: 19 additions & 0 deletions database/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* @property int name_change
* @property int vacation
* @property int show_picture
* @property int premium
*/
class User extends Authenticatable
{
Expand Down Expand Up @@ -930,6 +931,24 @@ public function setShowPicture(bool $show_picture): User
return $this;
}

/**
* @return int
*/
public function getPremium(): int
{
return $this->premium;
}

/**
* @param int $premium
* @return User
*/
public function setPremium(int $premium)
{
$this->premium = $premium;
return $this;
}

/**
* Returns user level
* @param $exp
Expand Down
28 changes: 28 additions & 0 deletions resources/lang/en/city.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* Created by PhpStorm.
* User: Osein
* Date: 1/22/2018
* Time: 10:44 PM
*/

return [
// City -> Library Strings
'city_library_not_enough_gold' => 'Not enough gold.',
'city_library_not_enough_hellstone' => 'Not enough hellstone.',
'city_library_name_change_success' => 'Name change success.',

// City -> Church Strings
'city_church_healing_success' => 'The reverend tends to your wounds and you immediately feel better.',

// City -> Graveyard Strings
'city_graveyard_gravedigger' => 'Gravedigger',
'city_graveyard_graveyard_gardener' => 'Graveyard Gardener',
'city_graveyard_corpse_predator' => 'Corpse Predator',
'city_graveyard_graveyard_guard' => 'Graveyard Guard',
'city_graveyard_employee_manager' => 'Employee Manager',
'city_graveyard_tombstone_designer' => 'Tombstone Designer',
'city_graveyard_crypt_designer' => 'Crypt Designer',
'city_graveyard_graveyard_manager' => 'Graveyard Manager',
'city_graveyard_graveyard_master' => 'Graveyard Master',
];
16 changes: 16 additions & 0 deletions resources/lang/en/clan.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Created by PhpStorm.
* User: Osein
* Date: 1/22/2018
* Time: 10:44 PM
*/

return [
// Clan Strings
'clan_homepage_homepage' => 'Homepage',
'clan_homepage_header' => 'set as homepage',
'clan_rename_rename_clan' => 'rename clan',
'clan_rename_new_name' => 'New clan name',
'clan_rename_new_tag' => 'New clan tag',
];
6 changes: 6 additions & 0 deletions resources/lang/en/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@
'home_register_activation_info' => 'An e-mail containing your activation link will be sent to your email address. Please activate the account within the next 3 days.',
'home_register_accept_agb' => 'I accept the Terms and Conditions.',

// Highscore Strings
'highscore_my_position' => 'My position',
'highscore_player_highscore' => 'Player - Highscore',
'highscore_clan_highscore' => 'Clan - Highscore',
'highscore_show_limit' => '(Maximum of 5 options possible)',

];
136 changes: 136 additions & 0 deletions resources/views/city/voodoo.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
@extends('index')

@section('content')
<div id="voodoo">
<!-- box HEADER START -->
<div class="wrap-top-left clearfix">
<div class="wrap-top-right clearfix">
<div class="wrap-top-middle clearfix"></div>
</div>
</div>
<!-- box HEADER END -->
<!-- box CONTENT START -->
<div class="wrap-left clearfix">
<div class="wrap-content wrap-right clearfix">
<!-- CONTENT START -->
<h2>{{user_race_logo_small()}} Voodoo Shop</h2>
<div class="buildingDesc clearfix">
<img class="npc-logo" src="{{asset('img/city/npc/0_6.jpg')}}" align="left">

<h3>You feel a magical energy streaming through you...</h3>

<p>Welcome to the Voodoo Shop, a really wondrous place. With a short look into the shop you can guess what kind of mysterious items might be hidden here. Suddenly a goblin appears behind the dusty bar and bows to you: "What can I do for you, Sir?"</p>

<p class="gold">Your possessions: {{prettyNumber(user()->getGold())}} {{gold_image_tag()}} + {{prettyNumber(user()->getHellstone())}} {{hellstone_image_tag()}}
</div>
<h2>{{user_race_logo_small()}}Become a Shadow-Lord now</h2>
<div class="table-wrap">
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tbody><tr>
<td class="no-bg" valign="center"><img src="{{asset('img/voodoo/shadowlord.jpg')}}" alt=""></td>
<td class="no-bg" valign="top">
<h3>How do I benefit in becoming a Shadow-Lord?</h3>
<p>
You get nothing for now LOLLLLL
<!--- No advertisements (no banners, popups etc.)<br>-->
<!--- Per activation, you receive a whole day`s pay in Gold<br>-->
<!--- Doubled action point regeneration rate<br>-->
<!--- Maximum number of action points +50%<br>-->
<!--- Hunt statistics<br>-->
<!--- Advanced opponent search<br>-->
<!--- Individual character pictures<br>-->
<!--- And an additional 100% healing potion<br>-->
<!--- 5 additional folders for your messaging system<br>-->
</p>
</td>
<td class="no-bg" valign="top" align="center">
<h3 style="padding:0 10px 15px; text-align:right;"><span style="color:orangered">14 days<br> for only <br>15 hellstones</span></h3>
<div class="btn-left right">
<div class="btn-right">
<a class="btn" @if(user()->hellstone > 14) href="{{url('city/voodoo/shadowlord?_')}}" @endif target="_top">buy now</a>
</div>
</div>
</td>
</tr>
@if(user()->getPremium() > time())
<tr>
<td class="no-bg" colspan="3" align="center">
<p class="info">You will be a Shadow-Lord until: {{date('D, d.m.Y - H:i:s', user()->getPremium())}}</p>
</td>
</tr>
@endif
</tbody></table> </div>
<h2>{{user_race_logo_small()}}Premium items</h2>
<div class="table-wrap">
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tbody><tr id="premItem_1">
<td class="no-bg" valign="center" width="150">
<img src="{{asset('img/voodoo/premium_item1.jpg')}}" alt=""></td>
<td class="no-bg" valign="top">
<h3>Metamorphosis stone</h3>
<p>You can change your race with the metamorphosis stone.<br>(You will automatically leave your clan; if you have founded a clan, it will be dissolved)</p>
<p class="gold">sale price: 50&nbsp;{{hellstone_image_tag()}}</p>
</td>
<td class="no-bg" valign="center" align="center" width="250">
<div id="confirmscreen_1" style="display:none;">
<table class="noBackground">
<tbody><tr>
<td colspan="2">
<span style="color:#FFCC33;">Are you sure you want to use the item now?</span>
</td>
</tr>
<tr>
<td width="50%">
<div class="btn-left right">
<div class="btn-right">
<a class="btn" @if(user()->getHellstone() >= 50) href="{{url('/test')}}" @else onclick="notConfirm(1)" @endif target="_top">Yes</a>
</div>
</div>
</td>
<td width="50%">
<div class="btn-left right">
<div class="btn-right">
<button class="btn" onclick="notConfirm(1)">No</button>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
<div id="usescreen_1">
<div class="btn-left right">
<div class="btn-right">
<button class="btn" onclick="confirmUserPremium(1)">Buy and use this item</button>
</div>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
<script type="text/javascript">
function confirmUserPremium(nr)
{
$('#usescreen_'+nr).css('display', 'none');
$('#confirmscreen_'+nr).css('display', 'block');
}
function notConfirm(nr)
{
$('#usescreen_'+nr).css('display', '');
$('#confirmscreen_'+nr).css('display', 'none');
}
</script>
<!-- CONTENT END -->
</div>
</div>
<!-- box CONTENT END -->
<!-- box FOOTER START -->
<div class="wrap-bottom-left">
<div class="wrap-bottom-right">
<div class="wrap-bottom-middle"></div>
</div>
</div>
<!-- box CONTENT END -->
</div>
@endsection
4 changes: 3 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@
Route::get('/index', 'ProfileController@getIndex');
Route::get('/logo', 'ProfileController@getLogo');
Route::post('/logo', 'ProfileController@postLogo');
});
});

Route::get('/voodoo', 'CityController@getVoodoo');

0 comments on commit 7701b06

Please sign in to comment.