stack
This commit is contained in:
parent
6cd844c53a
commit
414e8a927b
@ -289,7 +289,33 @@ button:hover {
|
||||
|
||||
/* GAME */
|
||||
|
||||
.game {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.game-cryp-ctr {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.game .cryp-box {
|
||||
flex: 1 1 60%;
|
||||
}
|
||||
|
||||
.cryp-skill-btn.active {
|
||||
animation: whiteblackglow 1s ease 0s 1 normal forwards;
|
||||
animation-iteration-count: 1;
|
||||
}
|
||||
|
||||
.stack {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.stack-line {
|
||||
padding-left: 2em;
|
||||
flex: 1 1 40%;
|
||||
}
|
||||
@ -18,10 +18,35 @@ function GamePanel(props) {
|
||||
|
||||
if (!game) return <div>...</div>;
|
||||
|
||||
function findCryp(id) {
|
||||
const team = game.teams.find(t => t.cryps.find(c => c.id === id));
|
||||
if (team) return team.cryps.find(c => c.id === id);
|
||||
return null;
|
||||
}
|
||||
|
||||
const otherTeams = game.teams.filter(t => t.id !== account.id);
|
||||
|
||||
const playerTeam = game.teams.find(t => t.id === account.id);
|
||||
|
||||
function stackElement(c, i) {
|
||||
let skills = game.stack.filter(s => s.source_cryp_id === c.id).map((s, j) => {
|
||||
const target = findCryp(s.target_cryp_id);
|
||||
return (
|
||||
<div key={j}>{s.skill} -> {target.name}</div>
|
||||
);
|
||||
});
|
||||
|
||||
if (!skills.length) skills = (<div> </div>);
|
||||
|
||||
return (
|
||||
<div
|
||||
key={i}
|
||||
className="stack-line">
|
||||
{skills}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Cryp(cryp) {
|
||||
const skills = range(0, 4).map(i => {
|
||||
const s = cryp.skills[i]
|
||||
@ -42,6 +67,8 @@ function GamePanel(props) {
|
||||
);
|
||||
});
|
||||
|
||||
const stackSkills = stackElement(cryp);
|
||||
|
||||
const stats = [
|
||||
{ stat: 'hp', colour: '#1FF01F' },
|
||||
{ stat: 'red_shield', colour: '#a52a2a' },
|
||||
@ -54,6 +81,7 @@ function GamePanel(props) {
|
||||
));
|
||||
|
||||
return (
|
||||
<div className="game-cryp-ctr" >
|
||||
<div
|
||||
key={cryp.id}
|
||||
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
||||
@ -71,6 +99,8 @@ function GamePanel(props) {
|
||||
{stats}
|
||||
</div>
|
||||
</div>
|
||||
{stackSkills}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -78,7 +108,7 @@ function GamePanel(props) {
|
||||
const cryps = team.cryps.map(c => Cryp(c));
|
||||
|
||||
return (
|
||||
<div className="three columns cryp-list">
|
||||
<div className="five columns cryp-list">
|
||||
{cryps}
|
||||
</div>
|
||||
);
|
||||
@ -139,11 +169,8 @@ function GamePanel(props) {
|
||||
<div> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="row game">
|
||||
{PlayerTeam(playerTeam, setActiveSkill)}
|
||||
<div className="two columns skill-lines-ctr">
|
||||
<div> </div>
|
||||
</div>
|
||||
<div className="three columns">
|
||||
{otherTeams.map(OpponentTeam)}
|
||||
</div>
|
||||
|
||||
@ -16,10 +16,12 @@
|
||||
# WORK WORK
|
||||
## NOW
|
||||
|
||||
fix taunt
|
||||
decay is op
|
||||
siphon might have a prob
|
||||
*CLIENT*
|
||||
show cooldowns
|
||||
|
||||
*SERVER*
|
||||
siphon might have a prob
|
||||
put ticks on stack at start of phase
|
||||
|
||||
cryp vbox
|
||||
update defensives in skill.rs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user