diff --git a/server/WORKLOG.md b/server/WORKLOG.md index 9b0db868..c9ed473a 100644 --- a/server/WORKLOG.md +++ b/server/WORKLOG.md @@ -10,6 +10,7 @@ # WORK WORK ## NOW cost system for items + be able to reclaim skills / specs from cryp design / implement specs combo specs randomise skill speed @@ -32,11 +33,6 @@ round system for games * aoe skills * combo skills -* keep track of games joined - * concede game on leave - * ko all cryps on team, check status - should correctly assign the winner and drop items - * skills * private fields for opponents diff --git a/server/src/vbox.rs b/server/src/vbox.rs index ddb258cf..256c25fc 100644 --- a/server/src/vbox.rs +++ b/server/src/vbox.rs @@ -123,7 +123,7 @@ enum ColourCode { pub struct Vbox { pub id: Uuid, pub balance: u16, - pub free: Vec, + pub free: Vec>, pub bound: Vec, pub instance: Uuid, pub account: Uuid, @@ -131,17 +131,33 @@ pub struct Vbox { impl Vbox { pub fn new(account_id: Uuid, instance_id: Uuid) -> Vbox { - Vbox { + let starting_items = vec![ + Var::Attack, + Var::Attack, + Var::Attack, + Var::Stam5, + Var::Stam5, + Var::Speed5, + Var::Speed5, + Var::Damage, + Var::Damage, + ]; + + let vbox = Vbox { id: Uuid::new_v4(), account: account_id, instance: instance_id, - free: vec![], + free: starting_items, bound: vec![], - balance: 0, - } + balance: 9, + }; + + vbox.fill(); + + return vbox; } - pub fn fill(&mut self, init: bool) -> &mut Vbox { + pub fn fill(&mut self) -> &mut Vbox { let colours = vec![ (Var::Red, 1), (Var::Green, 1), @@ -177,13 +193,6 @@ impl Vbox { free.push(vars[dist.sample(&mut rng)].0); } - // make sure there are 3 attacks in the first round - if init { - free[6] = Var::Attack; - free[7] = Var::Attack; - free[8] = Var::Attack; - } - self.free = free; self