Struct game_features::LootTree [−][src]
pub struct LootTree<R> { /* fields omitted */ }
Expand description
A loot tree based on the lower partial function construct. Each loot tree node has a chance associated with it.
Example: { chance: 5, result: “item1” } { chance: 2, result: “item2” }
Internally this becomes [0,infinite[ -> item1 [5,infinite[ -> item2 maximum = 7 exclusive (that means 6)
Chances will effectively be: [0,4] (5) -> item1 [5,6] (2) -> item2