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