From 192533b1d369e0e593432b24f87d6af4095494a3 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Sat, 12 Oct 2024 10:46:03 -0500 Subject: [PATCH] Update project structure --- .env => .env.example | 0 .gitignore | 1 + docs/tooltip.md => README.md | 100 ++++++++++++++++++++++++++++- database/auth.db | Bin 45056 -> 0 bytes database/blueprints.db | Bin 16384 -> 0 bytes database/fights.db | Bin 45056 -> 0 bytes database/live.db | Bin 188416 -> 0 bytes docs/TODO.md | 4 -- docs/attributes.md | 34 ---------- docs/captcha.md | 56 ---------------- docs/items.md | 3 - public/assets/css/dragon.css | 3 + public/index.php | 10 +++ src/bootstrap.php | 2 + src/controller/auctions.php | 9 +++ src/controller/settings.php | 9 +++ templates/layouts/basic.php | 4 +- templates/pages/auctions/index.php | 2 + templates/pages/settings/index.php | 2 + 19 files changed, 140 insertions(+), 99 deletions(-) rename .env => .env.example (100%) create mode 100644 .gitignore rename docs/tooltip.md => README.md (55%) delete mode 100644 database/auth.db delete mode 100644 database/blueprints.db delete mode 100644 database/fights.db delete mode 100644 database/live.db delete mode 100644 docs/TODO.md delete mode 100644 docs/attributes.md delete mode 100644 docs/captcha.md delete mode 100644 docs/items.md create mode 100644 src/controller/auctions.php create mode 100644 src/controller/settings.php create mode 100644 templates/pages/auctions/index.php create mode 100644 templates/pages/settings/index.php diff --git a/.env b/.env.example similarity index 100% rename from .env rename to .env.example diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ + diff --git a/docs/tooltip.md b/README.md similarity index 55% rename from docs/tooltip.md rename to README.md index 19cd162..fbdff3b 100644 --- a/docs/tooltip.md +++ b/README.md @@ -1,4 +1,43 @@ -# Tooltip +# Dragon Knight + +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. @@ -96,3 +135,62 @@ The positionTooltip method will re-evaluate the position of a tooltip in relatio ```javascript 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 + +``` + +https://github.com/kawaiidesune/zxx diff --git a/database/auth.db b/database/auth.db deleted file mode 100644 index 7598b137bb7f74eb0d7115e5d129b90fbd738145..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45056 zcmeI)&2QRf90zb46B0tGyLA(asz^Q{H5o~3V_qXg3r(Da@)iiR&J|@Nn~_CMz}RSgswH zd)<9W(aJ}fq?YB{aLcuk6JmLRiKjP(B6G16lSwnflFZ_$;?l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z%VIPx1K$gM5_<1DJ}G9%>0z@OO-Q>J`XBv(^n-TS3x?#AKP28Dyl(fjOV{s(7h0Fn zgp<(!9FpF(9)nJ&m{rRe-}wJ)5H$U2HNXsO{xM<3#x2+Y{n~O zDkqRIH0w4ea VAOHd&00JNY0w4eaAh7=g{s8@S?gIb- diff --git a/database/fights.db b/database/fights.db deleted file mode 100644 index 5bd7e4ffe6be5ea9589673928f08b03513bd705e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45056 zcmeI&O>g2x7{GBLELm7peMu!wk>(h*+p0?sy_Rm=Dq2EP){!>q!E(%ySOMcTCYzpC zd);%tMNhr<3-s6z)JtbDCIRe$9JUAgM~WbxXU5ELo_P#1uYPX(u@wDLG<0L}ZQ-** zsZ{u0h(e)IQ-4p?U;3!37v=OH^<2F7I`3tz@OAL#C#tnpx-QiIs5!MS%KwyqFaNUh z*N#{ETOH)_e-XH-RqEgE7vK3oPu}{yTPM5;ox$jG?DYN1tJv{->47INx>n1!#8Kza zdMz?T#Ysn`;o=}2pz;3m>TZ31zxaLpc|54}NsZ{D;?G>*V*4w*sqh_+y zyBV_$oit#!z~Uf1(C9qM8Si;AUL|)t9k4K-KG68^WqG&0w^#h_(==C9nmk&P3dO+# zko0?LX67V~L-*D(2dwKoGzEmCw=y!E-u1jme_(>wPqG)?Qx-hMo2`>{rLUUDxl{2X5Al z_v!{)bg zoIKIZ`DvnC&1F?b<~Zz0R#|0009ILKmY**5YPhL|0fR+KmY**5I_I{1Q0*~0R#}(egVG!Z~q!I zLj({&009ILKmY**5I_I{1o-_wIe-8H2q1s}0tg_000IagfWY<(aQ}b%*O(b1fB*sr zAbK(tB!rVH77Z?W=uK?ZkGxtQoRkyV^={?cLcu>o6NzAn+*q zj5OY9-#lauW7mx?|z`~V&D3()uQk~^Q8n$9V73sm=gJKcV$=xY=-~@AOHaf zKmY;|fB*y_009U<-~$v;?xTfG=CZ8Fi4U+`6a@hYKmY;|fB*y_009U<00Izzz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nR76j!`! zNpnr_UGLe4qX7k92&+BY(7B>-KYCbFCMU(~Pw*PE6!!1KzWTZGv57F;ow43(6hxr1l?kBV6+j=Bqx7|zw_S;P=Vg7#)zt*E@2tWV=5P$##AOHaf zKmY;|fWS>6fWQC0Ng4u&0Rad=00Izz00bZa0SG_<0ub0kfh_sDFit)fC%+&+C2x|~ z$+yWj$zPH`BVQ$-BVQt4-NRj@Xb3<60uX=z1Rwwb2tWV=5P(3m1X2?TQ4~`XrDQ74 z*YXDvNs`o`ZA zsTj`@JC;wy#wf2W%BhK8A4}7G3*`Ic4Vr)#1Rwwb z2tWV=5P$##AOHafKmY>!B9MrQA|Y&<%durP%a)l8TTV={r7W{$KF^kt#Fq3v09_^$ zY#EEu!%nlccsxzMOMm}AC(!x-pOGKa`Tv*6i{yFo8hMU -``` - -https://github.com/kawaiidesune/zxx diff --git a/docs/items.md b/docs/items.md deleted file mode 100644 index d250712..0000000 --- a/docs/items.md +++ /dev/null @@ -1,3 +0,0 @@ -# Items - -Items consists of all item types in the game; useless flavor items, gear, consumables, etc. diff --git a/public/assets/css/dragon.css b/public/assets/css/dragon.css index 4d126aa..96893e9 100644 --- a/public/assets/css/dragon.css +++ b/public/assets/css/dragon.css @@ -21,6 +21,8 @@ body { background-attachment: fixed; background-position: center top; background-repeat: no-repeat; + max-width: 1920px; + margin: 0px auto; } .ui.button { @@ -135,6 +137,7 @@ aside { .box { background-color: rgba(0, 0, 0, 0.2); border-radius: 0.15rem; + padding: 0.5rem; } } diff --git a/public/index.php b/public/index.php index 0537ec6..be80561 100644 --- a/public/index.php +++ b/public/index.php @@ -41,6 +41,16 @@ router_post($r, '/character/delete', 'char_controller_delete_post'); router_get($r, '/world', 'world_controller_get'); 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 */ diff --git a/src/bootstrap.php b/src/bootstrap.php index b04586c..c38e013 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -23,6 +23,8 @@ require_once SRC . '/model/char.php'; require_once SRC . '/controller/char.php'; require_once SRC . '/controller/auth.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 define('START_TIME', microtime(true)); diff --git a/src/controller/auctions.php b/src/controller/auctions.php new file mode 100644 index 0000000..5194519 --- /dev/null +++ b/src/controller/auctions.php @@ -0,0 +1,9 @@ + 'pages/auctions/index']); +} diff --git a/src/controller/settings.php b/src/controller/settings.php new file mode 100644 index 0000000..b2521ff --- /dev/null +++ b/src/controller/settings.php @@ -0,0 +1,9 @@ + 'pages/settings/index']); +} diff --git a/templates/layouts/basic.php b/templates/layouts/basic.php index 4cff6fd..4e7a551 100644 --- a/templates/layouts/basic.php +++ b/templates/layouts/basic.php @@ -37,7 +37,9 @@ diff --git a/templates/pages/auctions/index.php b/templates/pages/auctions/index.php new file mode 100644 index 0000000..7ebdfa1 --- /dev/null +++ b/templates/pages/auctions/index.php @@ -0,0 +1,2 @@ +

Auctions

+

@TODO

diff --git a/templates/pages/settings/index.php b/templates/pages/settings/index.php new file mode 100644 index 0000000..a7d654c --- /dev/null +++ b/templates/pages/settings/index.php @@ -0,0 +1,2 @@ +

Settings

+

@TODO