diff --git a/core/src/player.rs b/core/src/player.rs index cfab3bb9..5e5dde9c 100644 --- a/core/src/player.rs +++ b/core/src/player.rs @@ -159,6 +159,7 @@ impl Player { // do we have any colours in store? let colours = self.vbox.store[&ItemType::Colours].keys() .cloned() + .take(2) .collect::>(); // how about a base skill? @@ -168,11 +169,13 @@ impl Player { }; // if no: try to refill and start again - match colours.len() < 2 || base.is_none() { - true => match self.vbox_refill() { - Ok(_) => continue, - Err(_) => break, // give up - }, + match colours.len() != 2 || base.is_none() { + true => { + match self.vbox_refill() { + Ok(_) => continue, + Err(_) => break, // give up + }; + } false => { let mut vbox_items = HashMap::new(); vbox_items.insert(ItemType::Colours, colours); @@ -205,7 +208,7 @@ impl Player { // there's a bad bug here where if this apply fails // the item in question will be silently dropped let item = self.vbox.stash.remove(&i).unwrap(); - self.vbox_apply(item, construct_id).ok(); + self.vbox_apply(item, construct_id).unwrap(); continue; } // need to buy one @@ -213,6 +216,7 @@ impl Player { // do we have any colours in store? let colours = self.vbox.store[&ItemType::Colours].keys() .cloned() + .take(2) .collect::>(); // how about a base spec? @@ -222,7 +226,7 @@ impl Player { }; // if no: try to refill and start again - match colours.len() < 2 || base.is_none() { + match colours.len() != 2 || base.is_none() { true => match self.vbox_refill() { Ok(_) => continue, Err(_) => break, // give up