diff --git a/client/src/components/game.component.jsx b/client/src/components/game.component.jsx index 93714885..e1115ee6 100644 --- a/client/src/components/game.component.jsx +++ b/client/src/components/game.component.jsx @@ -190,6 +190,8 @@ function GamePanel(props) { } function OpponentCryp(cryp, i) { + const ko = cryp.green_life.value === 0 ? 'ko' : ''; + const stats = [STATS.greenLife, STATS.redLife, STATS.blueLife].map((s, j) => (
{s.svg(`stat-icon ${s.colour}`)} @@ -200,7 +202,7 @@ function GamePanel(props) { return (
selectSkillTarget(cryp.id)} >
diff --git a/server/WORKLOG.md b/server/WORKLOG.md index 2930f570..093775c7 100644 --- a/server/WORKLOG.md +++ b/server/WORKLOG.md @@ -19,7 +19,9 @@ *CLIENT* * general * icons change with % - * colour vbox icons + +* game + * resolve animations + effects *SERVER* var / skill info rpc diff --git a/server/src/player.rs b/server/src/player.rs index d0e3f4f2..701353ce 100644 --- a/server/src/player.rs +++ b/server/src/player.rs @@ -118,7 +118,13 @@ impl Player { false => 2, }; - if self.vbox.bound.len() < 3 { + + let num_colours = self.vbox.bound + .iter() + .filter(|v| [Var::Red, Var::Green, Var::Blue].contains(v)) + .count(); + + if self.vbox.bound.len() < 3 || num_colours < 2 { if (needs_skills && self.vbox.bits < 4) || self.vbox.bits < 5 { // println!("insufficient balance"); return self; diff --git a/server/src/vbox.rs b/server/src/vbox.rs index 2605dafd..e35593f2 100644 --- a/server/src/vbox.rs +++ b/server/src/vbox.rs @@ -526,7 +526,7 @@ impl Vbox { .iter() .enumerate() .map(|(i, index)| { - self.bound.remove(*index - i) + self.bound.remove(index.saturating_sub(i)) }) .collect::>();