diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01150a92..e6f4521c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+## [1.5.7] - 2019-10-18
+### Changed
+ - Made available skill / effect information during the combat phase.
+ - Highlighting a skill replace the effect area with the skill description including speed multiplier.
+ - Highlighting an effect with replace the targetting arrow / anim skill text with effect info.
+ - You can now preview combinations before you create them
+ - After selecting the three items for a combo hover over the combine button for info
+
## [1.5.6] - 2019-10-17
We've updated the UI during the vbox / buy phase to give a better indication of valid actions.
diff --git a/WORKLOG.md b/WORKLOG.md
index 1bc09a79..10423c7d 100644
--- a/WORKLOG.md
+++ b/WORKLOG.md
@@ -3,10 +3,7 @@
*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
@@ -19,6 +16,8 @@
* serde serialize privatise
* chat
+* Convert spec 'Plus' -> '+' when it appears as combo text in combiner and in info text
+
## SOON
* equip from shop (buy and equip without putting in your inventory) for bases
@@ -73,6 +72,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..909a088a 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 {
@@ -396,6 +408,10 @@
.skills button {
font-size: 50%;
}
+
+ .skill-description {
+ font-size: 65%;
+ }
}
.player {
diff --git a/client/src/actions.jsx b/client/src/actions.jsx
index 415c5d4f..8c58ed0d 100644
--- a/client/src/actions.jsx
+++ b/client/src/actions.jsx
@@ -21,8 +21,12 @@ export const setCombiner = value => ({ type: 'SET_COMBINER', value: Array.from(v
export const setConstructEditId = value => ({ type: 'SET_CONSTRUCT_EDIT_ID', value });
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 setGameSkillInfo = value => ({ type: 'SET_GAME_SKILL_INFO', value });
+export const setGameEffectInfo = value => ({ type: 'SET_GAME_EFFECT_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 });
export const setInstance = value => ({ type: 'SET_INSTANCE', value });
diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx
index 34349422..186a55ef 100644
--- a/client/src/components/game.construct.jsx
+++ b/client/src/components/game.construct.jsx
@@ -2,10 +2,13 @@ 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 actions = require('../actions');
const SkillBtn = require('./skill.btn');
@@ -19,6 +22,8 @@ const addState = connect(
animFocus,
animating,
animText,
+ gameSkillInfo,
+ itemInfo,
} = state;
function selectSkillTarget(targetConstructId) {
@@ -40,8 +45,19 @@ const addState = connect(
animText,
activeSkill,
selectSkillTarget,
+ gameSkillInfo,
+ itemInfo,
};
+ },
+
+ function receiveDispatch(dispatch) {
+ function setGameEffectInfo(info) {
+ dispatch(actions.setGameEffectInfo(info));
+ }
+
+ return { setGameEffectInfo };
}
+
);
const eventClasses = (animating, animFocus, construct, postSkill) => {
@@ -77,6 +93,10 @@ class GameConstruct extends Component {
selectSkillTarget,
animFocus,
animText,
+
+ setGameEffectInfo,
+ gameSkillInfo,
+ itemInfo,
} = this.props;
const ko = construct.green_life.value === 0 ? 'ko' : '';
@@ -96,9 +116,33 @@ class GameConstruct extends Component {
let crypSkills =
;
if (player) crypSkills = ( {skills}
);
- const effects = construct.effects.length
- ? construct.effects.map(c => {c.effect} - {c.duration}T
)
- : null;
+ function hoverInfo(e, info) {
+ e.stopPropagation();
+ return setGameEffectInfo(info);
+ }
+ const effectBox = () => {
+ if (gameSkillInfo && gameSkillInfo.constructId === construct.id) {
+ const fullInfo = itemInfo.items.find(k => k.item === gameSkillInfo.skill) || INFO[gameSkillInfo.skill];
+ const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat)/;
+ const infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
+ const speed = Speed {shapes.SpeedStat()} multiplier {fullInfo.speed * 4}%
;
+ return (
+
+
{gameSkillInfo.skill}
+
{infoDescription}
+ {speed}
+
);
+ }
+ const effects = construct.effects.length
+ ? construct.effects.map(c =>
+ hoverInfo(e, c)}
+ onMouseOut={e => hoverInfo(e, null)}
+ > {c.effect} - {c.duration}T
)
+ : null;
+ return ( {effects}
);
+ }
return (
{crypSkills}
-
{effects}
+ {effectBox()}
{stats}
diff --git a/client/src/components/skill.btn.jsx b/client/src/components/skill.btn.jsx
index 32baa084..87d0cc89 100644
--- a/client/src/components/skill.btn.jsx
+++ b/client/src/components/skill.btn.jsx
@@ -23,18 +23,24 @@ const addState = connect(
dispatch(actions.setActiveSkill(constructId, skill));
}
- return { setActiveSkill };
+ function setGameSkillInfo(info) {
+ dispatch(actions.setGameSkillInfo(info));
+ }
+
+ return { setActiveSkill, setGameSkillInfo };
}
);
function Skill(props) {
const {
+ animating,
construct,
game,
i,
activeSkill,
setActiveSkill,
+ setGameSkillInfo,
} = props;
if (!game) return false;
@@ -42,6 +48,11 @@ function Skill(props) {
const s = construct.skills[i];
const ko = construct.green_life.value === 0 ? 'ko' : '';
+ function hoverInfo(e, info) {
+ e.stopPropagation();
+ if (animating) return false;
+ return setGameSkillInfo(info);
+ }
if (!s || !game) {
return (