cooldowns

This commit is contained in:
ntr 2019-04-01 10:41:51 +11:00
parent 414e8a927b
commit 56b0a7f890
3 changed files with 23 additions and 6 deletions

View File

@ -309,6 +309,11 @@ button:hover {
animation-iteration-count: 1;
}
.cryp-skill-btn[disabled] {
animation: none;
color: #333333;
}
.stack {
display: flex;
flex-flow: column;

View File

@ -49,9 +49,21 @@ function GamePanel(props) {
function Cryp(cryp) {
const skills = range(0, 4).map(i => {
const s = cryp.skills[i]
? cryp.skills[i].skill
: (<span>&nbsp;</span>);
const s = cryp.skills[i];
if (!s) {
return (
<button
disabled='true'
key={i}
className='cryp-skill-btn disabled'>
<span>&nbsp;</span>
</button>
);
}
const cdText = cryp.skills[i].cd > 0
? `- ${s.cd}`
: '';
const highlight = activeSkill
? activeSkill.crypId === cryp.id && activeSkill.skill === s
@ -60,9 +72,11 @@ function GamePanel(props) {
return (
<button
key={i}
disabled={!!cdText}
className={`cryp-skill-btn ${highlight ? 'active' : ''}`}
type="submit"
onClick={() => setActiveSkill(cryp.id, s)}>{s}
onClick={() => setActiveSkill(cryp.id, s)}>
{s.skill} {cdText}
</button>
);
});

View File

@ -26,8 +26,6 @@ put ticks on stack at start of phase
cryp vbox
update defensives in skill.rs
Skill::Slay -> red attack with bonus somethingorother for blue / maim no healing
consolidate buffs debuffs and disables
no more red/blue