join diamond
This commit is contained in:
parent
ae5f09a5c8
commit
4408f71a9a
@ -108,11 +108,10 @@ pub fn item_drop(tx: &mut Transaction, account_id: Uuid, mode: GameMode) -> Resu
|
||||
let log_normal = LogNormal::new(1.0, 1.0);
|
||||
let num_drops = log_normal.sample(&mut rng).floor() as u16;
|
||||
|
||||
let actions = mode_drops(mode);
|
||||
println!("{:?} drops", num_drops);
|
||||
|
||||
for _i in 0..num_drops {
|
||||
let actions = mode_drops(mode);
|
||||
|
||||
let dist = WeightedIndex::new(actions.iter().map(|item| item.1)).unwrap();
|
||||
let kind = actions[dist.sample(&mut rng)].0;
|
||||
let item = Item::new(kind, account_id);
|
||||
|
||||
@ -254,6 +254,7 @@ fn add_shape(shape: Shape, gr: &mut ZoneGraph, start: NodeIndex, x: i8, y: i8) -
|
||||
gr.add_edge(bottom, bottom_tip, ());
|
||||
|
||||
let side = gr.add_node(Encounter::new("NORMAL", x + 2, y));
|
||||
gr.add_edge(start, side, ());
|
||||
gr.add_edge(top, side, ());
|
||||
gr.add_edge(bottom, side, ());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user