vbox wip
This commit is contained in:
parent
26250d5b74
commit
9e16201f3d
@ -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
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ enum ColourCode {
|
||||
pub struct Vbox {
|
||||
pub id: Uuid,
|
||||
pub balance: u16,
|
||||
pub free: Vec<Var>,
|
||||
pub free: Vec<Vec<Var>>,
|
||||
pub bound: Vec<Var>,
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user