Compare commits
5 Commits
4eb4d29a5b
...
22522488d8
Author | SHA1 | Date | |
---|---|---|---|
22522488d8 | |||
b1b0868501 | |||
ee6938d9a5 | |||
9a4a92c57a | |||
bb82258e3d |
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
server/database/dragon.db
|
||||
server/database/dragon.db
|
||||
server/.installed
|
28
CHANGELOG.md
Normal file
28
CHANGELOG.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Changelog
|
||||
|
||||
This log contains all the notable changes to the codebase as they are done. This is done for historical and reference purposes.
|
||||
|
||||
## Update
|
||||
|
||||
The Update has not been merged into `master` yet, but it will be. In the meantime, `old` will remain an untouched archive of DK as it was left by Jamin. These are the documented changes to DK for "The Update"!
|
||||
|
||||
### Added
|
||||
|
||||
- New database wrapper! Allows easy access to the database, which itself has been changed (see changed notes). Can CRUD with a simple interface.
|
||||
- New render method! Uses an output buffer and `extract()` to safely render templates and allows us to use pure PHP for templating... which we *were* doing before, but now it's even better!
|
||||
- New background image; this one is small, but the old garrish yellow background has been replaced with a smooth white/gray background. The plan is to add a theme toggle later to use the retro look on demand.
|
||||
- Status points; to give the player more build agency, status points will be given per level-up. The number of points can be changed in the overall game settings.
|
||||
|
||||
### Changed
|
||||
|
||||
- The directory structure has been updated; public-facing assets and pages are now in `public/`. Pages, like install, fight, help, etc, now use a form of file-based routing. CSS and images are also in this folder. All server code has been moved to `server/` where it is safe and unviewable on a properly configured web server.
|
||||
- We're no longer using MySQL as the database! This was done for ease of install and operation; SQLite is plenty performant for Dragon Knight and makes it trivial to spin up new instances. The database is contained in `server/database/` as the file `dragon.db`. WAL mode is enabled, so you may see a couple extra files but this is expected.
|
||||
- `lib.php` renamed to `server/library.php`
|
||||
- The installer has been totally rewritten using the new database wrapper and a handful of new library functions.
|
||||
- Classes have been totally reworked! Prior, they were hard-coded into the game's overall settings. This made them highly inflexible and allowed only three classes which all needed their own level rows to define. This sucked! Now, classes are their own rows in the `classes` table, with starting stats and stat growth per-level. They also now have a special syntax in the `spells` field to detail at what level what spells the player gets.
|
||||
- The help pages have been moved to the new structure and have been renamed to "Guide".
|
||||
- Items now use a new special syntax similar to class spells to have multiple attributes; no more limits!
|
||||
|
||||
### Removed
|
||||
|
||||
- Difficulty levels; as this is an always-online game with other players, differences in difficulty at a base game level didn't make sense. While a cool feature, I don't think it's truly necessary and would be better used in an instance-by-instance basis.
|
|
@ -36,4 +36,9 @@ body {
|
|||
|
||||
.mb-2 {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.my-2 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
22
public/guide/index.php
Normal file
22
public/guide/index.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php // guide.php :: shows all kinds of useful information
|
||||
|
||||
const SERVER = '../../server';
|
||||
require_once SERVER.'/bootstrap.php';
|
||||
|
||||
if (!installed()) redirect('/install');
|
||||
|
||||
$db = new Database(DB);
|
||||
$control = $db->table('control')->select();
|
||||
|
||||
const GUIDES = ['main', 'items', 'monsters', 'spells', 'classes'];
|
||||
$guide = isset($_GET['guide']) ? $_GET['guide'] : 'main';
|
||||
|
||||
const TITLES = [
|
||||
'main' => 'Main',
|
||||
'items' => 'Items & Drops',
|
||||
'monsters' => 'Monsters',
|
||||
'spells' => 'Spells',
|
||||
'classes' => 'Classes'
|
||||
];
|
||||
|
||||
echo render('/guide/layout', ['guide' => $guide, 'db' => $db, 'control' => $control, 'title' => TITLES[$guide]]);
|
|
@ -1,5 +1,6 @@
|
|||
<?php // index.php :: Primary program script, evil alien overlord, you decide.
|
||||
|
||||
require_once '../server/bootstrap.php';
|
||||
const SERVER = '../server';
|
||||
require_once SERVER.'/bootstrap.php';
|
||||
|
||||
if (!installed()) redirect('/install');
|
|
@ -88,54 +88,53 @@ if ($step == 'second') {
|
|||
'name TEXT NOT NULL',
|
||||
'level INTEGER DEFAULT 1',
|
||||
'type INTEGER DEFAULT 1',
|
||||
"attr1 TEXT DEFAULT ''",
|
||||
"attr2 TEXT DEFAULT ''"
|
||||
"attr TEXT DEFAULT ''"
|
||||
]);
|
||||
|
||||
// Add default drops if complete install
|
||||
if ($complete) {
|
||||
$db->insert([
|
||||
['name' => 'Life Pebble', 'level' => 1, 'type' => 1, 'attr1' => 'hp,10', 'attr2' => '' ],
|
||||
['name' => 'Life Stone', 'level' => 10, 'type' => 1, 'attr1' => 'hp,25', 'attr2' => '' ],
|
||||
['name' => 'Life Rock', 'level' => 25, 'type' => 1, 'attr1' => 'hp,50', 'attr2' => '' ],
|
||||
['name' => 'Life Ore', 'level' => 50, 'type' => 1, 'attr1' => 'hp,100', 'attr2' => '' ],
|
||||
['name' => 'Life Gem', 'level' => 75, 'type' => 1, 'attr1' => 'hp,150', 'attr2' => '' ],
|
||||
['name' => 'Magic Pebble', 'level' => 1, 'type' => 1, 'attr1' => 'mp,10', 'attr2' => '' ],
|
||||
['name' => 'Magic Stone', 'level' => 10, 'type' => 1, 'attr1' => 'mp,25', 'attr2' => '' ],
|
||||
['name' => 'Magic Rock', 'level' => 25, 'type' => 1, 'attr1' => 'mp,50', 'attr2' => '' ],
|
||||
['name' => 'Magic Ore', 'level' => 50, 'type' => 1, 'attr1' => 'mp,100', 'attr2' => '' ],
|
||||
['name' => 'Magic Gem', 'level' => 75, 'type' => 1, 'attr1' => 'mp,150', 'attr2' => '' ],
|
||||
['name' => "Dragon's Scale", 'level' => 10, 'type' => 1, 'attr1' => 'def,25', 'attr2' => '' ],
|
||||
['name' => "Dragon's Plate", 'level' => 30, 'type' => 1, 'attr1' => 'def,50', 'attr2' => '' ],
|
||||
['name' => "Dragon's Claw", 'level' => 10, 'type' => 1, 'attr1' => 'atk,25', 'attr2' => '' ],
|
||||
['name' => "Dragon's Fang", 'level' => 30, 'type' => 1, 'attr1' => 'atk,50', 'attr2' => '' ],
|
||||
['name' => "Dragon's Tear", 'level' => 35, 'type' => 1, 'attr1' => 'str,75', 'attr2' => '' ],
|
||||
['name' => "Dragon's Wing", 'level' => 35, 'type' => 1, 'attr1' => 'dex,75', 'attr2' => '' ],
|
||||
['name' => "Demon's Sin", 'level' => 35, 'type' => 1, 'attr1' => 'hp,-50', 'attr2' => 'str,50' ],
|
||||
['name' => "Demon's Fall", 'level' => 35, 'type' => 1, 'attr1' => 'mp,-50', 'attr2' => 'str,50' ],
|
||||
['name' => "Demon's Lie", 'level' => 45, 'type' => 1, 'attr1' => 'hp,-100', 'attr2' => 'str,100' ],
|
||||
['name' => "Demon's Hate", 'level' => 45, 'type' => 1, 'attr1' => 'mp,-100', 'attr2' => 'str,100' ],
|
||||
['name' => "Angel's Joy", 'level' => 25, 'type' => 1, 'attr1' => 'hp,25', 'attr2' => 'str,25' ],
|
||||
['name' => "Angel's Rise", 'level' => 30, 'type' => 1, 'attr1' => 'hp,50', 'attr2' => 'str,50' ],
|
||||
['name' => "Angel's Truth", 'level' => 35, 'type' => 1, 'attr1' => 'hp,75', 'attr2' => 'str,75' ],
|
||||
['name' => "Angel's Grace", 'level' => 40, 'type' => 1, 'attr1' => 'hp,100', 'attr2' => 'str,100' ],
|
||||
['name' => "Seraph's Strength", 'level' => 25, 'type' => 1, 'attr1' => 'mp,25', 'attr2' => 'dex,25' ],
|
||||
['name' => "Seraph's Power", 'level' => 30, 'type' => 1, 'attr1' => 'mp,50', 'attr2' => 'dex,50' ],
|
||||
['name' => "Seraph's Justice", 'level' => 35, 'type' => 1, 'attr1' => 'mp,75', 'attr2' => 'dex,75' ],
|
||||
['name' => "Seraph's Judgement", 'level' => 40, 'type' => 1, 'attr1' => 'mp,100', 'attr2' => 'dex,100' ],
|
||||
['name' => 'Ruby', 'level' => 50, 'type' => 1, 'attr1' => 'hp,150', 'attr2' => '' ],
|
||||
['name' => 'Sapphire', 'level' => 50, 'type' => 1, 'attr1' => 'mp,150', 'attr2' => '' ],
|
||||
['name' => 'Emerald', 'level' => 50, 'type' => 1, 'attr1' => 'str,150', 'attr2' => '' ],
|
||||
['name' => 'Amethyst', 'level' => 50, 'type' => 1, 'attr1' => 'dex,150', 'attr2' => '' ],
|
||||
['name' => 'Topaz', 'level' => 50, 'type' => 1, 'attr1' => 'atk,150', 'attr2' => '' ],
|
||||
['name' => 'Diamond', 'level' => 50, 'type' => 1, 'attr1' => 'def,150', 'attr2' => '' ],
|
||||
['name' => "Ocean Blessing", 'level' => 77, 'type' => 1, 'attr1' => 'str,7007', 'attr2' => 'dex,7007'],
|
||||
['name' => 'Memory Tonic', 'level' => 5, 'type' => 1, 'attr1' => 'exp,10', 'attr2' => '' ],
|
||||
['name' => 'Memory Potion', 'level' => 30, 'type' => 1, 'attr1' => 'exp,20', 'attr2' => '' ],
|
||||
['name' => 'Memory Elixir', 'level' => 50, 'type' => 1, 'attr1' => 'exp,30', 'attr2' => '' ],
|
||||
['name' => 'Gold Tonic', 'level' => 5, 'type' => 1, 'attr1' => 'gold,10', 'attr2' => '' ],
|
||||
['name' => 'Gold Potion', 'level' => 30, 'type' => 1, 'attr1' => 'gold,20', 'attr2' => '' ],
|
||||
['name' => 'Gold Elixir', 'level' => 50, 'type' => 1, 'attr1' => 'gold,30', 'attr2' => '' ],
|
||||
['name' => 'Life Pebble', 'level' => 1, 'type' => 1, 'attr' => 'hp,10'],
|
||||
['name' => 'Life Stone', 'level' => 10, 'type' => 1, 'attr' => 'hp,25'],
|
||||
['name' => 'Life Rock', 'level' => 25, 'type' => 1, 'attr' => 'hp,50'],
|
||||
['name' => 'Life Ore', 'level' => 50, 'type' => 1, 'attr' => 'hp,100'],
|
||||
['name' => 'Life Gem', 'level' => 75, 'type' => 1, 'attr' => 'hp,150'],
|
||||
['name' => 'Magic Pebble', 'level' => 1, 'type' => 1, 'attr' => 'mp,10'],
|
||||
['name' => 'Magic Stone', 'level' => 10, 'type' => 1, 'attr' => 'mp,25'],
|
||||
['name' => 'Magic Rock', 'level' => 25, 'type' => 1, 'attr' => 'mp,50'],
|
||||
['name' => 'Magic Ore', 'level' => 50, 'type' => 1, 'attr' => 'mp,100'],
|
||||
['name' => 'Magic Gem', 'level' => 75, 'type' => 1, 'attr' => 'mp,150'],
|
||||
['name' => "Dragon's Scale", 'level' => 10, 'type' => 1, 'attr' => 'def,25'],
|
||||
['name' => "Dragon's Plate", 'level' => 30, 'type' => 1, 'attr' => 'def,50'],
|
||||
['name' => "Dragon's Claw", 'level' => 10, 'type' => 1, 'attr' => 'atk,25'],
|
||||
['name' => "Dragon's Fang", 'level' => 30, 'type' => 1, 'attr' => 'atk,50'],
|
||||
['name' => "Dragon's Tear", 'level' => 35, 'type' => 1, 'attr' => 'str,75'],
|
||||
['name' => "Dragon's Wing", 'level' => 35, 'type' => 1, 'attr' => 'dex,75'],
|
||||
['name' => "Demon's Sin", 'level' => 35, 'type' => 1, 'attr' => 'hp,-50|str,65'],
|
||||
['name' => "Demon's Fall", 'level' => 35, 'type' => 1, 'attr' => 'mp,-50|str,65'],
|
||||
['name' => "Demon's Lie", 'level' => 45, 'type' => 1, 'attr' => 'hp,-100|str,125'],
|
||||
['name' => "Demon's Hate", 'level' => 45, 'type' => 1, 'attr' => 'mp,-100|str,125'],
|
||||
['name' => "Angel's Joy", 'level' => 25, 'type' => 1, 'attr' => 'hp,25|str,25'],
|
||||
['name' => "Angel's Rise", 'level' => 30, 'type' => 1, 'attr' => 'hp,50|str,50'],
|
||||
['name' => "Angel's Truth", 'level' => 35, 'type' => 1, 'attr' => 'hp,75|str,75'],
|
||||
['name' => "Angel's Grace", 'level' => 40, 'type' => 1, 'attr' => 'hp,100|str,100'],
|
||||
['name' => "Seraph's Strength", 'level' => 25, 'type' => 1, 'attr' => 'mp,25|dex,25'],
|
||||
['name' => "Seraph's Power", 'level' => 30, 'type' => 1, 'attr' => 'mp,50|dex,50'],
|
||||
['name' => "Seraph's Justice", 'level' => 35, 'type' => 1, 'attr' => 'mp,75|dex,75'],
|
||||
['name' => "Seraph's Judgement", 'level' => 40, 'type' => 1, 'attr' => 'mp,100|dex,100'],
|
||||
['name' => 'Ruby', 'level' => 50, 'type' => 1, 'attr' => 'hp,150'],
|
||||
['name' => 'Sapphire', 'level' => 50, 'type' => 1, 'attr' => 'mp,150'],
|
||||
['name' => 'Emerald', 'level' => 50, 'type' => 1, 'attr' => 'str,150'],
|
||||
['name' => 'Amethyst', 'level' => 50, 'type' => 1, 'attr' => 'dex,150'],
|
||||
['name' => 'Topaz', 'level' => 50, 'type' => 1, 'attr' => 'atk,150'],
|
||||
['name' => 'Diamond', 'level' => 50, 'type' => 1, 'attr' => 'def,150'],
|
||||
['name' => "Ocean Blessing", 'level' => 77, 'type' => 1, 'attr' => 'str,7007|dex,7007'],
|
||||
['name' => 'Memory Tonic', 'level' => 5, 'type' => 1, 'attr' => 'exp,10',],
|
||||
['name' => 'Memory Potion', 'level' => 30, 'type' => 1, 'attr' => 'exp,20',],
|
||||
['name' => 'Memory Elixir', 'level' => 50, 'type' => 1, 'attr' => 'exp,30',],
|
||||
['name' => 'Gold Tonic', 'level' => 5, 'type' => 1, 'attr' => 'gold,10'],
|
||||
['name' => 'Gold Potion', 'level' => 30, 'type' => 1, 'attr' => 'gold,20'],
|
||||
['name' => 'Gold Elixir', 'level' => 50, 'type' => 1, 'attr' => 'gold,30'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -158,8 +157,7 @@ if ($step == 'second') {
|
|||
'type INTEGER DEFAULT 1',
|
||||
'name TEXT NOT NULL',
|
||||
'cost INTEGER DEFAULT 0',
|
||||
"attr1 TEXT DEFAULT ''",
|
||||
"attr2 TEXT DEFAULT ''",
|
||||
"attr TEXT DEFAULT ''",
|
||||
"icon TEXT DEFAULT ''"
|
||||
]);
|
||||
|
||||
|
@ -167,44 +165,44 @@ if ($step == 'second') {
|
|||
if ($complete) {
|
||||
$db->insert([
|
||||
// Type 1 - weapons
|
||||
['type' => 1, 'name' => 'Stick', 'cost' => 10, 'attr1' => 'atk,2', 'attr2' => '', 'icon' => 'stick.png' ],
|
||||
['type' => 1, 'name' => 'Branch', 'cost' => 30, 'attr1' => 'atk,4', 'attr2' => '', 'icon' => 'branch.png' ],
|
||||
['type' => 1, 'name' => 'Club', 'cost' => 40, 'attr1' => 'atk,6', 'attr2' => '', 'icon' => 'club.png' ],
|
||||
['type' => 1, 'name' => 'Dagger', 'cost' => 80, 'attr1' => 'atk,8', 'attr2' => '', 'icon' => 'dagger.png' ],
|
||||
['type' => 1, 'name' => 'Hatchet', 'cost' => 120, 'attr1' => 'atk,12', 'attr2' => '', 'icon' => 'hatchet.png' ],
|
||||
['type' => 1, 'name' => 'Axe', 'cost' => 200, 'attr1' => 'atk,18', 'attr2' => '', 'icon' => 'axe.png' ],
|
||||
['type' => 1, 'name' => 'Spear', 'cost' => 300, 'attr1' => 'atk,25', 'attr2' => '', 'icon' => 'spear.png' ],
|
||||
['type' => 1, 'name' => 'Poleaxe', 'cost' => 500, 'attr1' => 'atk,35', 'attr2' => '', 'icon' => 'poleaxe.png' ],
|
||||
['type' => 1, 'name' => 'Warhammer', 'cost' => 800, 'attr1' => 'atk,50', 'attr2' => '', 'icon' => 'warhammer.png' ],
|
||||
['type' => 1, 'name' => 'Longsword', 'cost' => 1200, 'attr1' => 'atk,65', 'attr2' => '', 'icon' => 'longsword.png' ],
|
||||
['type' => 1, 'name' => 'Claymore', 'cost' => 1800, 'attr1' => 'atk,85', 'attr2' => '', 'icon' => 'claymore.png' ],
|
||||
['type' => 1, 'name' => 'Demon Axe', 'cost' => 2800, 'attr1' => 'atk,125', 'attr2' => 'exp,-5', 'icon' => 'demonaxe.png' ],
|
||||
['type' => 1, 'name' => 'Dark Sword', 'cost' => 4500, 'attr1' => 'atk,225', 'attr2' => 'exp,-10', 'icon' => 'darksword.png' ],
|
||||
['type' => 1, 'name' => 'Magic Axe', 'cost' => 2800, 'attr1' => 'atk,95', 'attr2' => 'exp,5', 'icon' => 'magicaxe.png' ],
|
||||
['type' => 1, 'name' => 'Bright Sword', 'cost' => 4500, 'attr1' => 'atk,185', 'attr2' => 'exp,10', 'icon' => 'brightsword.png'],
|
||||
['type' => 1, 'name' => 'Dragonbane', 'cost' => 10000, 'attr1' => 'atk,300', 'attr2' => 'str,50', 'icon' => 'dragonbane.png' ],
|
||||
['type' => 1, 'name' => 'Stick', 'cost' => 10, 'attr' => 'atk,2', 'icon' => 'stick.png' ], // 1
|
||||
['type' => 1, 'name' => 'Branch', 'cost' => 30, 'attr' => 'atk,4', 'icon' => 'branch.png' ], // 2
|
||||
['type' => 1, 'name' => 'Club', 'cost' => 40, 'attr' => 'atk,6', 'icon' => 'club.png' ], // 3
|
||||
['type' => 1, 'name' => 'Dagger', 'cost' => 80, 'attr' => 'atk,8', 'icon' => 'dagger.png' ], // 4
|
||||
['type' => 1, 'name' => 'Hatchet', 'cost' => 120, 'attr' => 'atk,12', 'icon' => 'hatchet.png' ], // 5
|
||||
['type' => 1, 'name' => 'Axe', 'cost' => 200, 'attr' => 'atk,18', 'icon' => 'axe.png' ], // 6
|
||||
['type' => 1, 'name' => 'Spear', 'cost' => 300, 'attr' => 'atk,25', 'icon' => 'spear.png' ], // 7
|
||||
['type' => 1, 'name' => 'Poleaxe', 'cost' => 500, 'attr' => 'atk,35', 'icon' => 'poleaxe.png' ], // 8
|
||||
['type' => 1, 'name' => 'Warhammer', 'cost' => 800, 'attr' => 'atk,50', 'icon' => 'warhammer.png' ], // 9
|
||||
['type' => 1, 'name' => 'Longsword', 'cost' => 1200, 'attr' => 'atk,65', 'icon' => 'longsword.png' ], // 10
|
||||
['type' => 1, 'name' => 'Claymore', 'cost' => 1800, 'attr' => 'atk,85', 'icon' => 'claymore.png' ], // 11
|
||||
['type' => 1, 'name' => 'Demon Axe', 'cost' => 2800, 'attr' => 'atk,125|exp,-5', 'icon' => 'demonaxe.png' ], // 12
|
||||
['type' => 1, 'name' => 'Dark Sword', 'cost' => 4500, 'attr' => 'atk,225|exp,-10', 'icon' => 'darksword.png' ], // 13
|
||||
['type' => 1, 'name' => 'Magic Axe', 'cost' => 2800, 'attr' => 'atk,95|exp,5', 'icon' => 'magicaxe.png' ], // 14
|
||||
['type' => 1, 'name' => 'Bright Sword', 'cost' => 4500, 'attr' => 'atk,185|exp,10', 'icon' => 'brightsword.png'], // 15
|
||||
['type' => 1, 'name' => 'Dragonbane', 'cost' => 10000, 'attr' => 'atk,300|str,50', 'icon' => 'dragonbane.png' ], // 16
|
||||
|
||||
// Type 2 - armors
|
||||
['type' => 2, 'name' => 'Underwear', 'cost' => 25, 'attr1' => 'def,2', 'attr2' => 'gold,10', 'icon' => 'underwear.png' ],
|
||||
['type' => 2, 'name' => 'Clothes', 'cost' => 50, 'attr1' => 'def,5', 'attr2' => '', 'icon' => 'clothes.png' ],
|
||||
['type' => 2, 'name' => 'Leather', 'cost' => 75, 'attr1' => 'def,10', 'attr2' => '', 'icon' => 'leather.png' ],
|
||||
['type' => 2, 'name' => 'Hard Leather', 'cost' => 150, 'attr1' => 'def,25', 'attr2' => '', 'icon' => 'hardleather.png' ],
|
||||
['type' => 2, 'name' => 'Chainmail', 'cost' => 300, 'attr1' => 'def,35', 'attr2' => '', 'icon' => 'chainmail.png' ],
|
||||
['type' => 2, 'name' => 'Scale Armor', 'cost' => 900, 'attr1' => 'def,50', 'attr2' => '', 'icon' => 'scalearmor.png' ],
|
||||
['type' => 2, 'name' => 'Platemail', 'cost' => 1800, 'attr1' => 'def,100', 'attr2' => '', 'icon' => 'platemail.png' ],
|
||||
['type' => 2, 'name' => 'Magic Plate', 'cost' => 3000, 'attr1' => 'def,125', 'attr2' => 'mp,50', 'icon' => 'magicplate.png' ],
|
||||
['type' => 2, 'name' => 'Darkmail', 'cost' => 5000, 'attr1' => 'def,200', 'attr2' => 'exp,-10', 'icon' => 'darkmail.png' ],
|
||||
['type' => 2, 'name' => 'Dragon Plate', 'cost' => 10000, 'attr1' => 'def,165', 'attr2' => 'exp,10', 'icon' => 'dragonplate.png' ],
|
||||
['type' => 2, 'name' => 'Destiny Raiment', 'cost' => 50000, 'attr1' => 'def,200', 'attr2' => 'dex,50', 'icon' => 'destinyraiment.png'],
|
||||
['type' => 2, 'name' => 'Underwear', 'cost' => 25, 'attr' => 'def,2|gold,10', 'icon' => 'underwear.png' ], // 17
|
||||
['type' => 2, 'name' => 'Clothes', 'cost' => 50, 'attr' => 'def,5', 'icon' => 'clothes.png' ], // 18
|
||||
['type' => 2, 'name' => 'Leather', 'cost' => 75, 'attr' => 'def,10', 'icon' => 'leather.png' ], // 19
|
||||
['type' => 2, 'name' => 'Hard Leather', 'cost' => 150, 'attr' => 'def,25', 'icon' => 'hardleather.png' ], // 20
|
||||
['type' => 2, 'name' => 'Chainmail', 'cost' => 300, 'attr' => 'def,35', 'icon' => 'chainmail.png' ], // 21
|
||||
['type' => 2, 'name' => 'Scale Armor', 'cost' => 900, 'attr' => 'def,50', 'icon' => 'scalearmor.png' ], // 22
|
||||
['type' => 2, 'name' => 'Platemail', 'cost' => 1800, 'attr' => 'def,100', 'icon' => 'platemail.png' ], // 23
|
||||
['type' => 2, 'name' => 'Magic Plate', 'cost' => 3000, 'attr' => 'def,125|mp,50', 'icon' => 'magicplate.png' ], // 24
|
||||
['type' => 2, 'name' => 'Darkmail', 'cost' => 5000, 'attr' => 'def,200|exp,-10', 'icon' => 'darkmail.png' ], // 25
|
||||
['type' => 2, 'name' => 'Dragon Plate', 'cost' => 10000, 'attr' => 'def,165|exp,10', 'icon' => 'dragonplate.png' ], // 26
|
||||
['type' => 2, 'name' => 'Destiny Raiment', 'cost' => 50000, 'attr' => 'def,200|dex,50', 'icon' => 'destinyraiment.png'], // 27
|
||||
|
||||
// Type 3 - shields
|
||||
['type' => 3, 'name' => 'Reed Shield', 'cost' => 50, 'attr1' => 'def,5', 'attr2' => '', 'icon' => 'reedshield.png' ],
|
||||
['type' => 3, 'name' => 'Buckler', 'cost' => 100, 'attr1' => 'def,10', 'attr2' => '', 'icon' => 'nuckler.png' ],
|
||||
['type' => 3, 'name' => 'Round Shield', 'cost' => 500, 'attr1' => 'def,25', 'attr2' => '', 'icon' => 'roundshield.png' ],
|
||||
['type' => 3, 'name' => 'Tower Shield', 'cost' => 2500, 'attr1' => 'def,50', 'attr2' => '', 'icon' => 'towershield.png' ],
|
||||
['type' => 3, 'name' => 'Silver Shield', 'cost' => 10000, 'attr1' => 'def,100', 'attr2' => '', 'icon' => 'silvershield.png'],
|
||||
['type' => 3, 'name' => 'Dragon Shield', 'cost' => 25000, 'attr1' => 'def,125', 'attr2' => 'mp,100', 'icon' => 'dragonshield.png'],
|
||||
['type' => 3, 'name' => 'Aegis', 'cost' => 50000, 'attr1' => 'def,225', 'attr2' => 'exp,10', 'icon' => 'aegis.png' ]
|
||||
['type' => 3, 'name' => 'Reed Shield', 'cost' => 50, 'attr' => 'def,5', 'icon' => 'reedshield.png' ], // 28
|
||||
['type' => 3, 'name' => 'Buckler', 'cost' => 100, 'attr' => 'def,10', 'icon' => 'nuckler.png' ], // 29
|
||||
['type' => 3, 'name' => 'Round Shield', 'cost' => 500, 'attr' => 'def,25', 'icon' => 'roundshield.png' ], // 30
|
||||
['type' => 3, 'name' => 'Tower Shield', 'cost' => 2500, 'attr' => 'def,50', 'icon' => 'towershield.png' ], // 31
|
||||
['type' => 3, 'name' => 'Silver Shield', 'cost' => 10000, 'attr' => 'def,100', 'icon' => 'silvershield.png'], // 32
|
||||
['type' => 3, 'name' => 'Dragon Shield', 'cost' => 25000, 'attr' => 'def,125|mp,100', 'icon' => 'dragonshield.png'], // 33
|
||||
['type' => 3, 'name' => 'Aegis', 'cost' => 50000, 'attr' => 'def,225|exp,10', 'icon' => 'aegis.png' ] // 34
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -502,13 +500,13 @@ if ($step == 'second') {
|
|||
'player_id INTEGER DEFAULT 1',
|
||||
'monster_id INTEGER DEFAULT 1',
|
||||
'turn INTEGER DEFAULT 1',
|
||||
'user_hp INTEGER DEFAULT 0',
|
||||
'user_mp INTEGER DEFAULT 0',
|
||||
'player_hp INTEGER DEFAULT 0',
|
||||
'player_mp INTEGER DEFAULT 0',
|
||||
'monster_hp INTEGER DEFAULT 0',
|
||||
'monster_mp INTEGER DEFAULT 0',
|
||||
'user_uber_dmg INTEGER DEFAULT 0',
|
||||
'player_uber_dmg INTEGER DEFAULT 0',
|
||||
'monster_uber_dmg INTEGER DEFAULT 0',
|
||||
'user_uber_def INTEGER DEFAULT 0',
|
||||
'player_uber_def INTEGER DEFAULT 0',
|
||||
'monster_uber_def INTEGER DEFAULT 0',
|
||||
'monster_immune INTEGER DEFAULT 0',
|
||||
'monster_sleep INTEGER DEFAULT 0',
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,79 +1,10 @@
|
|||
<?php
|
||||
include('lib.php');
|
||||
$link = opendb();
|
||||
$controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
|
||||
$controlrow = mysql_fetch_array($controlquery);
|
||||
ob_start("ob_gzhandler");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><? echo $controlrow["gamename"]; ?> Help</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-image: url(images/background.jpg);
|
||||
color: black;
|
||||
font: 11px verdana;
|
||||
}
|
||||
table {
|
||||
border-style: none;
|
||||
padding: 0px;
|
||||
font: 11px verdana;
|
||||
}
|
||||
td {
|
||||
border-style: none;
|
||||
padding: 3px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.top {
|
||||
border-bottom: solid 2px black;
|
||||
}
|
||||
td.left {
|
||||
width: 150px;
|
||||
border-right: solid 2px black;
|
||||
}
|
||||
td.right {
|
||||
width: 150px;
|
||||
border-left: solid 2px black;
|
||||
}
|
||||
a {
|
||||
color: #663300;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #330000;
|
||||
}
|
||||
.small {
|
||||
font: 10px verdana;
|
||||
}
|
||||
.highlight {
|
||||
color: red;
|
||||
}
|
||||
.light {
|
||||
color: #999999;
|
||||
}
|
||||
.title {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin: 3px;
|
||||
}
|
||||
.copyright {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font: 10px verdana;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h1><? echo $controlrow["gamename"]; ?> Help: Items & Drops</h1>
|
||||
[ <a href="help.php">Return to Help</a> | <a href="index.php">Return to the game</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th> <th>Name</th> <th>Cost</th> <th>Attribute</th> <th>Special</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="5" bgcolor="#ffffff"><center><b>Items</b></center></td></tr>
|
25
server/templates/guide/layout.php
Normal file
25
server/templates/guide/layout.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?> | Guide</title>
|
||||
<link rel="stylesheet" href="/css/dragon.css">
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<div id="container">
|
||||
<h1><?= $control['game_name'] ?> Guide</h1>
|
||||
<?php if ($title !== 'Main'): ?>
|
||||
<h2><?= $title ?></h2>
|
||||
[ <a href="help.php">Return to Help</a> | <a href="index.php">Return to the game</a> ]
|
||||
<?php else: ?>
|
||||
[ <a href="index.php">Return to the game</a> ]
|
||||
<?php endif; ?>
|
||||
|
||||
<hr class="my-2">
|
||||
|
||||
<?= render("guide/$guide", $data) ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
194
server/templates/guide/main.php
Normal file
194
server/templates/guide/main.php
Normal file
|
@ -0,0 +1,194 @@
|
|||
<p>
|
||||
<h3>Table of Contents</h3>
|
||||
<ul>
|
||||
<li><a href="#intro">Introduction</a></li>
|
||||
<li><a href="#intown">Playing The Game: In Town</a></li>
|
||||
<li><a href="#exploring">Playing The Game: Exploring & Fighting</a></li>
|
||||
<li><a href="#status">Playing The Game: Status Panels</a></li>
|
||||
<li><a href="#items">Items & Drops</a></li>
|
||||
<li><a href="#monsters">Monsters</a></li>
|
||||
<li><a href="#spells">Spells</a></li>
|
||||
<li><a href="#classes">Classes</a></li>
|
||||
<li><a href="#credits">Credits</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<a name="intro"></a>
|
||||
<h3>Introduction</h3>
|
||||
|
||||
<p class="mb-1">
|
||||
Firstly, I'd like to say thank you for playing my game. The <i>Dragon Knight</i> game engine is the result of several months of
|
||||
planning, coding and testing. The original idea was to create a web-based tribute to the NES game, <i>Dragon
|
||||
Warrior</i>. In its current iteration, only the underlying fighting system really resembles that game, as almost
|
||||
everything else in DK has been made bigger and better. But you should still recognize bits and pieces as stemming
|
||||
from <i>Dragon Warrior</i> and other RPGs of old.
|
||||
</p>
|
||||
|
||||
<p class="mb-1">
|
||||
This is the first game I've ever written, and it has definitely been a positive experience. It got difficult at
|
||||
times, admittedly, but it was still a lot of fun to write, and even more fun to play. And I hope to use this
|
||||
experience so that if I ever want to create another game it will be even better than this one.
|
||||
</p>
|
||||
|
||||
<p class="mb-1">
|
||||
If you are a site administrator, and would like to install a copy of DK on your own server, you may visit the
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">development site</a> for <i>Dragon Knight</i>. This page
|
||||
includes the downloadable game souce code, as well as some other resources that developers and administrators may
|
||||
find valuable.
|
||||
</p>
|
||||
|
||||
<p class="mb-1">
|
||||
Once again, thanks for playing!<br /><br />
|
||||
<i>Jamin Seven</i><br />
|
||||
<i>Dragon Knight creator</i><br />
|
||||
<a href="http://www.se7enet.com" target="_new">My Homepage</a><br />
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight Homepage</a><br ><br />
|
||||
</p>
|
||||
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="intown"></a>Playing The Game: In Town</h3>
|
||||
When you begin a new game, the first thing you see is the Town screen. Towns serve four primary functions: healing, buying items,
|
||||
buying maps, and displaying game information.<br /><br />
|
||||
To heal yourself, click the "Rest at the Inn" link at the top of the town screen. Each town's Inn has a different price - some towns
|
||||
are cheap, others are expensive. No matter what town you're in, the Inns always serve the same function: they restore your current
|
||||
hit points, magic points, and travel points to their maximum amounts. Out in the field, you are free to use healing spells to restore
|
||||
your hit points, but when you run low on magic points, the only way to restore them is at an Inn.<br /><br />
|
||||
Buying weapons and armor is accomplished through the appropriately-named "Buy Weapons/Armor" link. Not every item is available in
|
||||
every town, so in order to get the most powerful items, you'll need to explore some of the outer towns. Once you've clicked the link,
|
||||
you are presented with a list of items available in this town's store. To the left of each item is an icon that represents its type:
|
||||
weapon, armor or shield. The amount of attack/defense power, as well as the item's price, are displayed to the right of the item name.
|
||||
You'll notice that some items have a red asterisk (<span class="highlight">*</span>) next to their names. These are items that come
|
||||
with special attributes that modify other parts of your character profile. See the Items & Drops table at the bottom of this page for
|
||||
more information about special items.<br /><br />
|
||||
Maps are the third function in towns. Buying a map to a town places the town in your Travel To box in the left status panel. Once
|
||||
you've purchased a town's map, you can click its name from your Travel To box and you will jump to that town. Travelling this way
|
||||
costs travel points, though, and you'll only be able to visit towns if you have enough travel points.<br /><br />
|
||||
The final function in towns is displaying game information and statistics. This includes the latest news post made by the game
|
||||
administrator, a list of players who have been online recently, and the Babble Box.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="exploring"></a>Playing The Game: Exploring & Fighting</h3>
|
||||
Once you're done in town, you are free to start exploring the world. Use the compass buttons on the left status panel to move around.
|
||||
The game world is basically a big square, divided into four quadrants. Each quadrant is <?= $control['game_size']; ?> spaces
|
||||
square. The first town is usually located at (0N,0E). Click the North button from the first town, and now you'll be at (1N,0E).
|
||||
Likewise, if you now click the West button, you'll be at (1N,1W). Monster levels increase with every 5 spaces you move outward
|
||||
from (0N,0E).<br /><br />
|
||||
While you're exploring, you will occasionally run into monsters. As in pretty much any other RPG game, you and the monster take turns
|
||||
hitting each other in an attempt to reduce each other's hit points to zero. Once you run into a monster, the Exploring screen changes
|
||||
to the Fighting screen.<br /><br />
|
||||
When a fight begins, you'll see the monster's name and hit points, and the game will ask you for your first command. You then get to
|
||||
pick whether you want to fight, use a spell, or run away. Note, though, that sometimes the monster has the chance to hit you
|
||||
first.<br /><br />
|
||||
The Fight button is pretty straightforward: you attack the monster, and the amount of damage dealt is based on your attack power and
|
||||
the monster's armor. On top of that, there are two other things that can happen: an Excellent Hit, which doubles your total attack
|
||||
damage; and a monster dodge, which results in you doing no damage to the monster.<br /><br />
|
||||
The Spell button allows you to pick an available spell and cast it. See the Spells list at the bottom of this page for more information
|
||||
about spells.<br /><br />
|
||||
Finally, there is the Run button, which lets you run away from a fight if the monster is too powerful. Be warned, though: it is
|
||||
possible for the monster to block you from running and attack you. So if your hit points are low, you may fare better by staying
|
||||
around monsters that you know can't do much damage to you.<br /><br />
|
||||
Once you've had your turn, the monster also gets his turn. It is also possible for you to dodge the monster's attack and take no
|
||||
damage.<br /><br />
|
||||
The end result of a fight is either you or the monster being knocked down to zero hit points. If you win, the monster dies and will
|
||||
give you a certain amount of experience and gold. There is also a chance that the monster will drop an item, which you can put into
|
||||
one of the three inventory slots to give you extra points in your character profile. If you lose and die, half of your gold is taken
|
||||
away - however, you are given back a few hit points to help you make it back to town (for example, if you don't have enough gold to
|
||||
pay for an Inn, and need to kill a couple low-level monsters to get the money).<br /><br />
|
||||
When the fight is over, you can continue exploring until you find another monster to beat into submission.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="status"></a>Playing The Game: Status Panels</h3>
|
||||
There are two status panels on the game screen: left and right.<br /><br />
|
||||
The left panel inclues your current location and play status (In Town, Exploring, Fighting), compass buttons for movement, and the
|
||||
Travel To list for jumping between towns. At the bottom of the left panel is also a list of game functions.<br /><br />
|
||||
The right panel displays some character statistics, your inventory, and quick spells.<br /><br />
|
||||
The Character section shows the most important character statistics. It also displays the status bars for your current hit points,
|
||||
magic points and travel points. These status bars are colored either green, yellow or red depending on your current amount of each
|
||||
stat. There is also a link to pop up your list of extended statistics, which shows more detailed character information.<br /><br />
|
||||
The Fast Spells section lists any Heal spells you've learned. You may use these links any time you are in town or exploring to cast
|
||||
the heal spell. These may not be used during fights, however - you have to use the Spells box on the fight screen for that.
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="items"></a>Spoilers: Items & Drops</h3>
|
||||
<a href="help_items.php">Click here</a> for the Items & Drops spoiler page.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="monsters"></a>Spoilers: Monsters</h3>
|
||||
<a href="help_monsters.php">Click here</a> for the Monsters spoiler page.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="spells"></a>Spoilers: Spells</h3>
|
||||
<a href="help_spells.php">Click here</a> for the Spells spoiler page.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="levels"></a>Spoilers: Levels</h3>
|
||||
<a href="help_levels.php">Click here</a> for the Levels spoiler page.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
<h3><a name="credits"></a>Credits</h3>
|
||||
<ul>
|
||||
<li /><b>All program code and stock graphics for the game were created by Jamin Seven</b>.<br /><br />
|
||||
<li />Major props go to a few people on the PHP manual site, for help with various chunks of code. The specific people are listed in the source code.<br /><br />
|
||||
<li />Super monkey love goes to Enix and the developers of <i>Dragon Warrior</i>. If it weren't for you guys, my game never would have been made.<br /><br />
|
||||
<li />Mega props go to Dalez from GameFAQs for his DW3 experience chart, which was where I got my experience levels from.<br /><br />
|
||||
<li />Mad crazy ninja love goes to the following people for help and support throughout the development process:<br /><br />
|
||||
<b>Ideas:</b> (whether they got used or not)
|
||||
<ul>
|
||||
<li />kushet
|
||||
<li />lghtning
|
||||
<li />Ebolamonkey3000
|
||||
<li />Crimson Scythe
|
||||
<li />SilDeath
|
||||
</ul><br />
|
||||
<b>Beta Testing:</b> (forums name if applicable, character name otherwise)
|
||||
<ul>
|
||||
<li />Ebolamonkey3000
|
||||
<li />lisi
|
||||
<li />Junglist
|
||||
<li />Crimson Scythe
|
||||
<li />Sk8erpunk69
|
||||
<li />lghtning
|
||||
<li />kushet
|
||||
<li />SilDeath
|
||||
<li />lowrider4life
|
||||
<li />dubiin
|
||||
<li />Sam Wise The Great
|
||||
</ul><br />
|
||||
<li />Apologies and lots of happy naked love to anyone I forgot.<br /><br />
|
||||
<li />And of course, thanks to <b>you</b> for playing my game!<br /><br />
|
||||
<li /><a href="../index.php?do=ninja">NINJA!</a>
|
||||
</ul>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<hr class="my-2" />
|
||||
|
||||
Please visit the following sites for more information:<br />
|
||||
<a href="http://www.se7enet.com" target="_new">Se7enet</a> (Jamin's homepage)<br />
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a> (official DK homepage)<br />
|
||||
<a href="http://se7enet.com/forums" target="_new">Forums</a> (official DK forums)<br /><br />
|
||||
All original coding and graphics for the <i>Dragon Knight</i> game engine are © 2003-2005 by Jamin Seven.<br /><br />
|
||||
[ <a href="#top">Top</a> ]
|
||||
<br /><br />
|
||||
|
||||
<footer>
|
||||
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">© 2003-2006 by renderse7en</td>
|
||||
</footer>
|
Loading…
Reference in New Issue
Block a user