Compare commits
No commits in common. "17f06fd1d84dc78b6e4fd09ca6250adf72ce30b9" and "a96752100a433a4c4fbab0b97782f56dd2298767" have entirely different histories.
17f06fd1d8
...
a96752100a
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
.env
|
|
||||||
database/*.db
|
|
BIN
database/auth.db
Normal file
BIN
database/auth.db
Normal file
Binary file not shown.
BIN
database/blueprints.db
Normal file
BIN
database/blueprints.db
Normal file
Binary file not shown.
BIN
database/fights.db
Normal file
BIN
database/fights.db
Normal file
Binary file not shown.
BIN
database/live.db
Normal file
BIN
database/live.db
Normal file
Binary file not shown.
4
docs/TODO.md
Normal file
4
docs/TODO.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# TODO
|
||||||
|
Currently, everything needs implemented.
|
||||||
|
|
||||||
|
First task is to finish building up the database structures.
|
34
docs/attributes.md
Normal file
34
docs/attributes.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Attributes
|
||||||
|
|
||||||
|
## Power
|
||||||
|
Power is the attribute that determines overall strike damage. Damage from weapon attacks, spells, or other strikes and specific skills will be directly influenced by Power. Power is a linear measure, with 1 Power = 1 damage in most cases.
|
||||||
|
|
||||||
|
## Accuracy
|
||||||
|
Accuracy determines the chance your attack, spell, or other skill will actually land on your opponent.
|
||||||
|
|
||||||
|
## Penetration
|
||||||
|
Penetration as a value determines your ability to make it through physical defenses; i.e. the enemy's Toughness and Armor.
|
||||||
|
|
||||||
|
## Focus
|
||||||
|
Focus is the same as Penetration but for causing magical damage, and helps go through magical defenses; i.e. the enemy's Resist.
|
||||||
|
|
||||||
|
## Evasion
|
||||||
|
Evasion is the attribute responsible for determining your chance to dodge any kind of attack. When calculating the chance, at base every 2 Evasion is 0.1% chance. The enemy's Accuracy negatively impacts this stat. The chance to dodge is capped at 85%.
|
||||||
|
|
||||||
|
## Toughness
|
||||||
|
Toughness affects your health pool and baseline defensive capability to physical attacks, such as weapons, projectiles, and physical skills.
|
||||||
|
|
||||||
|
## Armor
|
||||||
|
Armor is an additional layer of physical protection over Toughness. All armor grants some level of Armor, and it's effect is linear; 1 Armor = 1 point of damage negated.
|
||||||
|
|
||||||
|
## Resist
|
||||||
|
Resist is your defensive capacity against magic such as spells, magic skills, and magic weapons. Like Armor, this is a linear stat.
|
||||||
|
|
||||||
|
## Precision
|
||||||
|
Precision determines your Uber (Critical) Hit chance. In general, 2 points of Precision = 0.1% chance. No matter how high this value, your Uber Hit chance caps at 90%. Some equipment grants straight Uber Hit chance.
|
||||||
|
|
||||||
|
## Ferocity
|
||||||
|
Ferocity is a linear modifier of your Uber Hit damage; 1 Ferocity = 1% Uber Hit damage. Uber Hit damage increases cap at 300%.
|
||||||
|
|
||||||
|
## Luck
|
||||||
|
Luck is a modifier for gained XP/Silver. Like Precision, 2 points of Luck = 0.1% increase of these gains.
|
56
docs/captcha.md
Normal file
56
docs/captcha.md
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
Here is some example code for implementing a CAPTCHA, using the gd extension to create a server-rendered, randomized image.
|
||||||
|
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
// Start the session to store the CAPTCHA answer
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// Define the image dimensions
|
||||||
|
$width = 200;
|
||||||
|
$height = 60;
|
||||||
|
|
||||||
|
// Create the image resource
|
||||||
|
$image = imagecreatetruecolor($width, $height);
|
||||||
|
|
||||||
|
// Define colors
|
||||||
|
$bg_color = imagecolorallocate($image, 255, 255, 255); // White background
|
||||||
|
$text_color = imagecolorallocate($image, 0, 0, 0); // Black text
|
||||||
|
$noise_color = imagecolorallocate($image, 100, 100, 100); // Gray for noise
|
||||||
|
|
||||||
|
// Fill the background
|
||||||
|
imagefill($image, 0, 0, $bg_color);
|
||||||
|
|
||||||
|
// Generate a random math equation (e.g., 3 + 5)
|
||||||
|
$num1 = rand(1, 9);
|
||||||
|
$num2 = rand(1, 9);
|
||||||
|
$operator = rand(0, 1) ? '+' : '-'; // Randomly choose addition or subtraction
|
||||||
|
$equation = "$num1 $operator $num2 = ?";
|
||||||
|
$answer = $operator == '+' ? ($num1 + $num2) : ($num1 - $num2);
|
||||||
|
|
||||||
|
// Store the answer in the session
|
||||||
|
$_SESSION['captcha'] = $answer;
|
||||||
|
|
||||||
|
// Add noise to the image (random dots)
|
||||||
|
for ($i = 0; $i < 1000; $i++) {
|
||||||
|
imagesetpixel($image, rand(0, $width), rand(0, $height), $noise_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the path to the ZXX font
|
||||||
|
$font = __DIR__ . '/fonts/ZXX-Regular.ttf'; // Path to the ZXX font file
|
||||||
|
|
||||||
|
// Add the math equation using ZXX font
|
||||||
|
$font_size = 30;
|
||||||
|
$x = 20;
|
||||||
|
$y = 40;
|
||||||
|
imagettftext($image, $font_size, rand(-10, 10), $x, $y, $text_color, $font, $equation);
|
||||||
|
|
||||||
|
// Output the image as PNG
|
||||||
|
header('Content-Type: image/png');
|
||||||
|
imagepng($image);
|
||||||
|
|
||||||
|
// Free the image resource
|
||||||
|
imagedestroy($image);
|
||||||
|
?>
|
||||||
|
```
|
||||||
|
|
||||||
|
https://github.com/kawaiidesune/zxx
|
3
docs/items.md
Normal file
3
docs/items.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Items
|
||||||
|
|
||||||
|
Items consists of all item types in the game; useless flavor items, gear, consumables, etc.
|
|
@ -1,43 +1,4 @@
|
||||||
# Dragon Knight
|
# Tooltip
|
||||||
|
|
||||||
Below is the current project documentation.
|
|
||||||
|
|
||||||
## Attributes
|
|
||||||
|
|
||||||
### Power
|
|
||||||
Power is the attribute that determines overall strike damage. Damage from weapon attacks, spells, or other strikes and specific skills will be directly influenced by Power. Power is a linear measure, with 1 Power = 1 damage in most cases.
|
|
||||||
|
|
||||||
### Accuracy
|
|
||||||
Accuracy determines the chance your attack, spell, or other skill will actually land on your opponent.
|
|
||||||
|
|
||||||
### Penetration
|
|
||||||
Penetration as a value determines your ability to make it through physical defenses; i.e. the enemy's Toughness and Armor.
|
|
||||||
|
|
||||||
### Focus
|
|
||||||
Focus is the same as Penetration but for causing magical damage, and helps go through magical defenses; i.e. the enemy's Resist.
|
|
||||||
|
|
||||||
### Evasion
|
|
||||||
Evasion is the attribute responsible for determining your chance to dodge any kind of attack. When calculating the chance, at base every 2 Evasion is 0.1% chance. The enemy's Accuracy negatively impacts this stat. The chance to dodge is capped at 85%.
|
|
||||||
|
|
||||||
### Toughness
|
|
||||||
Toughness affects your health pool and baseline defensive capability to physical attacks, such as weapons, projectiles, and physical skills.
|
|
||||||
|
|
||||||
### Armor
|
|
||||||
Armor is an additional layer of physical protection over Toughness. All armor grants some level of Armor, and it's effect is linear; 1 Armor = 1 point of damage negated.
|
|
||||||
|
|
||||||
### Resist
|
|
||||||
Resist is your defensive capacity against magic such as spells, magic skills, and magic weapons. Like Armor, this is a linear stat.
|
|
||||||
|
|
||||||
### Precision
|
|
||||||
Precision determines your Uber (Critical) Hit chance. In general, 2 points of Precision = 0.1% chance. No matter how high this value, your Uber Hit chance caps at 90%. Some equipment grants straight Uber Hit chance.
|
|
||||||
|
|
||||||
### Ferocity
|
|
||||||
Ferocity is a linear modifier of your Uber Hit damage; 1 Ferocity = 1% Uber Hit damage. Uber Hit damage increases cap at 300%.
|
|
||||||
|
|
||||||
### Luck
|
|
||||||
Luck is a modifier for gained XP/Silver. Like Precision, 2 points of Luck = 0.1% increase of these gains.
|
|
||||||
|
|
||||||
## Tooltip
|
|
||||||
|
|
||||||
The tooltip library is Isotip, taken and modified by Sharkk! Here is the breakdown of the API.
|
The tooltip library is Isotip, taken and modified by Sharkk! Here is the breakdown of the API.
|
||||||
|
|
||||||
|
@ -135,62 +96,3 @@ The positionTooltip method will re-evaluate the position of a tooltip in relatio
|
||||||
```javascript
|
```javascript
|
||||||
Tooltip.positionTooltip( '.tooltip', '.tooltip-click', 'left' );
|
Tooltip.positionTooltip( '.tooltip', '.tooltip-click', 'left' );
|
||||||
```
|
```
|
||||||
|
|
||||||
## CAPTCHA
|
|
||||||
|
|
||||||
Here is some example code for implementing a CAPTCHA, using the gd extension to create a server-rendered, randomized image.
|
|
||||||
|
|
||||||
```php
|
|
||||||
<?php
|
|
||||||
// Start the session to store the CAPTCHA answer
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
// Define the image dimensions
|
|
||||||
$width = 200;
|
|
||||||
$height = 60;
|
|
||||||
|
|
||||||
// Create the image resource
|
|
||||||
$image = imagecreatetruecolor($width, $height);
|
|
||||||
|
|
||||||
// Define colors
|
|
||||||
$bg_color = imagecolorallocate($image, 255, 255, 255); // White background
|
|
||||||
$text_color = imagecolorallocate($image, 0, 0, 0); // Black text
|
|
||||||
$noise_color = imagecolorallocate($image, 100, 100, 100); // Gray for noise
|
|
||||||
|
|
||||||
// Fill the background
|
|
||||||
imagefill($image, 0, 0, $bg_color);
|
|
||||||
|
|
||||||
// Generate a random math equation (e.g., 3 + 5)
|
|
||||||
$num1 = rand(1, 9);
|
|
||||||
$num2 = rand(1, 9);
|
|
||||||
$operator = rand(0, 1) ? '+' : '-'; // Randomly choose addition or subtraction
|
|
||||||
$equation = "$num1 $operator $num2 = ?";
|
|
||||||
$answer = $operator == '+' ? ($num1 + $num2) : ($num1 - $num2);
|
|
||||||
|
|
||||||
// Store the answer in the session
|
|
||||||
$_SESSION['captcha'] = $answer;
|
|
||||||
|
|
||||||
// Add noise to the image (random dots)
|
|
||||||
for ($i = 0; $i < 1000; $i++) {
|
|
||||||
imagesetpixel($image, rand(0, $width), rand(0, $height), $noise_color);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the path to the ZXX font
|
|
||||||
$font = __DIR__ . '/fonts/ZXX-Regular.ttf'; // Path to the ZXX font file
|
|
||||||
|
|
||||||
// Add the math equation using ZXX font
|
|
||||||
$font_size = 30;
|
|
||||||
$x = 20;
|
|
||||||
$y = 40;
|
|
||||||
imagettftext($image, $font_size, rand(-10, 10), $x, $y, $text_color, $font, $equation);
|
|
||||||
|
|
||||||
// Output the image as PNG
|
|
||||||
header('Content-Type: image/png');
|
|
||||||
imagepng($image);
|
|
||||||
|
|
||||||
// Free the image resource
|
|
||||||
imagedestroy($image);
|
|
||||||
?>
|
|
||||||
```
|
|
||||||
|
|
||||||
https://github.com/kawaiidesune/zxx
|
|
|
@ -21,8 +21,6 @@ body {
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
background-position: center top;
|
background-position: center top;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
max-width: 1920px;
|
|
||||||
margin: 0px auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.button {
|
.ui.button {
|
||||||
|
@ -137,7 +135,6 @@ aside {
|
||||||
.box {
|
.box {
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
border-radius: 0.15rem;
|
border-radius: 0.15rem;
|
||||||
padding: 0.5rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,16 +41,6 @@ router_post($r, '/character/delete', 'char_controller_delete_post');
|
||||||
router_get($r, '/world', 'world_controller_get');
|
router_get($r, '/world', 'world_controller_get');
|
||||||
router_post($r, '/move', 'world_controller_move_post');
|
router_post($r, '/move', 'world_controller_move_post');
|
||||||
|
|
||||||
/*
|
|
||||||
Settings
|
|
||||||
*/
|
|
||||||
router_get($r, '/settings', 'settings_controller_get');
|
|
||||||
|
|
||||||
/*
|
|
||||||
Auctions
|
|
||||||
*/
|
|
||||||
router_get($r, '/auctions', 'auctions_controller_get');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Router
|
Router
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -23,8 +23,6 @@ require_once SRC . '/model/char.php';
|
||||||
require_once SRC . '/controller/char.php';
|
require_once SRC . '/controller/char.php';
|
||||||
require_once SRC . '/controller/auth.php';
|
require_once SRC . '/controller/auth.php';
|
||||||
require_once SRC . '/controller/world.php';
|
require_once SRC . '/controller/world.php';
|
||||||
require_once SRC . '/controller/settings.php';
|
|
||||||
require_once SRC . '/controller/auctions.php';
|
|
||||||
|
|
||||||
// Track the start time of the request
|
// Track the start time of the request
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
function auctions_controller_get()
|
|
||||||
{
|
|
||||||
auth_only();
|
|
||||||
|
|
||||||
$GLOBALS['active_nav_tab'] = 'auctions';
|
|
||||||
echo render('layouts/basic', ['view' => 'pages/auctions/index']);
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
function settings_controller_get()
|
|
||||||
{
|
|
||||||
auth_only();
|
|
||||||
|
|
||||||
$GLOBALS['active_nav_tab'] = 'settings';
|
|
||||||
echo render('layouts/basic', ['view' => 'pages/settings/index']);
|
|
||||||
}
|
|
|
@ -37,9 +37,7 @@
|
||||||
|
|
||||||
<aside id="right">
|
<aside id="right">
|
||||||
<?php if (user()): ?>
|
<?php if (user()): ?>
|
||||||
<div class="box">
|
// right nav
|
||||||
@TODO
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</aside>
|
</aside>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Auctions</h1>
|
|
||||||
<p>@TODO</p>
|
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Settings</h1>
|
|
||||||
<p>@TODO</p>
|
|
Loading…
Reference in New Issue
Block a user