DropTable
A small library for creating a loot table that can be use for receiving random loot in games.
It is simple to use, just create a new instance of DropTable
.
let table = ;
And start adding items.
table;
All weights are normalized so they don't need to be a percentage.
It also possible to initialize the DropTable
with a list of items.
let table = items;
Remove items by name:
table;
And of course get a random result
let result = table;