diff --git a/WORKLOG.md b/WORKLOG.md index 4aa80673..fc056a15 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -3,10 +3,8 @@ *PRODUCTION* -* border colours for skills e.g. strike red border, slay half red half green * rename vbox to shop * combat phase info system -* drag and drop buy / equip / unequip items * mobile styles * mobile info page @@ -71,6 +69,7 @@ $$$ * Highlight (dota) colour * fx colours + styles +* ??? (PROBS NOT) drag and drop buy / equip / unequip items ??? * modules * troll life -> dmg * prince of peace diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index 4f22174a..415174ff 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -204,6 +204,7 @@ .resolving-skill { grid-area: target; + text-align: center; align-self: center; height: auto; svg { @@ -213,6 +214,17 @@ } } +.skill-description { + padding-left: 1em; + padding-right: 1em; + text-align: center; + svg { + display: inline; + height: 1em; + margin-right: 0.1em + } +} + /* some stupid bug in chrome makes it fill the entire screen */ @media screen and (-webkit-min-device-pixel-ratio:0) { #targeting { diff --git a/client/src/actions.jsx b/client/src/actions.jsx index 85b113de..01b1cd88 100644 --- a/client/src/actions.jsx +++ b/client/src/actions.jsx @@ -18,6 +18,7 @@ export const setConstructEditId = value => ({ type: 'SET_CONSTRUCT_EDIT_ID', val export const setConstructs = value => ({ type: 'SET_CONSTRUCTS', value }); export const setConstructRename = value => ({ type: 'SET_CONSTRUCT_RENAME', value }); export const setGame = value => ({ type: 'SET_GAME', value }); +export const setGameInfo = value => ({ type: 'SET_GAME_INFO', value }); export const setInfo = value => ({ type: 'SET_INFO', value }); export const setEmail = value => ({ type: 'SET_EMAIL', value }); export const setInvite = value => ({ type: 'SET_INVITE', value }); diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index 34349422..204e5bda 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -2,10 +2,12 @@ const { connect } = require('preact-redux'); const { Component } = require('preact'); const preact = require('preact'); const range = require('lodash/range'); +const reactStringReplace = require('react-string-replace'); const { STATS } = require('../utils'); const { ConstructAvatar, ConstructText } = require('./construct'); const shapes = require('./shapes'); +const { INFO } = require('./../constants'); const SkillBtn = require('./skill.btn'); @@ -19,6 +21,9 @@ const addState = connect( animFocus, animating, animText, + + gameInfo, + itemInfo, } = state; function selectSkillTarget(targetConstructId) { @@ -40,6 +45,9 @@ const addState = connect( animText, activeSkill, selectSkillTarget, + + gameInfo, + itemInfo, }; } ); @@ -77,6 +85,9 @@ class GameConstruct extends Component { selectSkillTarget, animFocus, animText, + + gameInfo, + itemInfo, } = this.props; const ko = construct.green_life.value === 0 ? 'ko' : ''; @@ -96,9 +107,23 @@ class GameConstruct extends Component { let crypSkills =
; if (player) crypSkills = (