From daf18c26b029451339739203babec20762cdd48d Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 24 Sep 2018 16:05:46 +1000 Subject: [PATCH 1/2] Some ui formatting for cryp stats and xp bar --- client/src/components/cryp.panel.jsx | 30 ++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) mode change 100755 => 100644 client/src/components/cryp.panel.jsx diff --git a/client/src/components/cryp.panel.jsx b/client/src/components/cryp.panel.jsx old mode 100755 new mode 100644 index 6de8e6af..35994db5 --- a/client/src/components/cryp.panel.jsx +++ b/client/src/components/cryp.panel.jsx @@ -2,7 +2,7 @@ const preact = require('preact'); function CrypPanel({ cryp, sendCombatPve }) { if (!cryp) return
not ready
; - + const xptolevel = Math.pow(2,(cryp.lvl + 1)); return (
@@ -43,17 +43,35 @@ function CrypPanel({ cryp, sendCombatPve }) {
-

Stat Area

-

{JSON.stringify(cryp.def)}

-

{JSON.stringify(cryp.dmg)}

-

{JSON.stringify(cryp.hp)}

-

{JSON.stringify(cryp.stam)}

+

Cryp Stats

+

Level - {cryp.lvl}

+
+
+
    Hit Points {cryp.hp}
+
    Attack Damage {cryp.dmg.value}
+
+
+
    Stamina {cryp.stam.value}
+
    Defense {cryp.def.value}
+
+
+
+ Progress to next level +
+
+ +
+
+ {cryp.xp} / {xptolevel} XP +
+
+
From 5836e93c3cbed8387794f74e58d18aaaa398ce0e Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 25 Sep 2018 17:29:42 +1000 Subject: [PATCH 2/2] Cryp battle UI panel --- client/src/components/cryp.battle.jsx | 100 ++++++++++++++++++++++++++ client/src/components/cryp.panel.jsx | 2 +- client/src/main.jsx | 3 + 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 client/src/components/cryp.battle.jsx diff --git a/client/src/components/cryp.battle.jsx b/client/src/components/cryp.battle.jsx new file mode 100644 index 00000000..b388afc2 --- /dev/null +++ b/client/src/components/cryp.battle.jsx @@ -0,0 +1,100 @@ +const preact = require('preact'); + +function CrypPanel() { + return ( +
+
+
+
+

Future Animation / Fizzy Area

+
+
+
+
+
+ +
+
+
+
+
+

Drake

+

Level 1

+
+
+

Flying

+

Fire

+

Stone

+
+
+
    5
+
    5
+
    5
+
+
+
5 / 5 HP
+ +
+
+
+
+
+
+
+
+
+
+
+
+
    10
+
    1
+
    40
+
+
+

Walking

+

Water

+

Rock

+
+
+

BB

+

Level 1

+
+
+
5 / 5 HP
+ +
+
+
+ +
+
+
+
+
+
+
+ Ability 1 +
+ Ability 3 +
+
+ Ability 2 +
+ Ability 4 +
+
+

Combat Log

+

"bamboo basher" deals 0 dmg to "drake" (0 blocked / 1 hp remaining)

+

"bamboo basher" deals 0 dmg to "drake" (0 blocked / 1 hp remaining)

+
+
+
+
+
+ +
+
+ ); +} + +module.exports = CrypPanel; diff --git a/client/src/components/cryp.panel.jsx b/client/src/components/cryp.panel.jsx index 35994db5..e6377064 100644 --- a/client/src/components/cryp.panel.jsx +++ b/client/src/components/cryp.panel.jsx @@ -47,7 +47,7 @@ function CrypPanel({ cryp, sendCombatPve }) {

Level - {cryp.lvl}

-
    Hit Points {cryp.hp}
+
    Hit Points {cryp.hp.value}
    Attack Damage {cryp.dmg.value}
diff --git a/client/src/main.jsx b/client/src/main.jsx index 15c676a4..1628edbf 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -12,6 +12,7 @@ const createSocket = require('./socket'); const CrypContainer = require('./components/cryp.container'); const LoginContainer = require('./components/login.container'); const Navbar = require('./components/navbar'); +const CrypBattle = require('./components/cryp.battle'); // Redux Store const store = createStore( @@ -40,6 +41,8 @@ const Cryps = () => (
+
+ );