From e1a77d040d29901c458be2a5d8344c4d17153c04 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Sun, 11 Oct 2020 16:25:35 +0000 Subject: [PATCH] loot table adjustments - decrease blue glider drop rate - decrease cloth scaprs drop rate from villagers - add crafting mats to crates instead --- assets/common/loot_tables/loot_table_armor_misc.ron | 2 +- assets/common/loot_tables/loot_table_boss_cultist-leader.ron | 2 +- assets/common/loot_tables/loot_table_cave_large.ron | 3 +-- assets/common/loot_tables/loot_table_crafting.ron | 1 + assets/common/loot_tables/loot_table_cultists.ron | 4 ++-- assets/common/loot_tables/loot_table_food.ron | 4 +--- assets/common/loot_tables/loot_table_villager.ron | 2 +- common/src/comp/inventory/item/mod.rs | 5 ++++- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/assets/common/loot_tables/loot_table_armor_misc.ron b/assets/common/loot_tables/loot_table_armor_misc.ron index 2766961c25..ada12a5ac3 100644 --- a/assets/common/loot_tables/loot_table_armor_misc.ron +++ b/assets/common/loot_tables/loot_table_armor_misc.ron @@ -7,5 +7,5 @@ // necks (0.25, "common.items.armor.neck.neck_0"), // misc - (0.1, "common.items.glider.glider_blue"), + (0.05, "common.items.glider.glider_blue"), ] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_boss_cultist-leader.ron b/assets/common/loot_tables/loot_table_boss_cultist-leader.ron index f1829945df..15ca68b3f6 100644 --- a/assets/common/loot_tables/loot_table_boss_cultist-leader.ron +++ b/assets/common/loot_tables/loot_table_boss_cultist-leader.ron @@ -13,5 +13,5 @@ (1, "common.items.weapons.sword.cultist_purp_2h-0"), // misc (1, "common.items.boss_drops.lantern"), - (0.05, "common.items.glider.glider_purp"), + (0.1, "common.items.glider.glider_purp"), ] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_cave_large.ron b/assets/common/loot_tables/loot_table_cave_large.ron index 626b90cefb..73a7f93124 100644 --- a/assets/common/loot_tables/loot_table_cave_large.ron +++ b/assets/common/loot_tables/loot_table_cave_large.ron @@ -3,8 +3,7 @@ (0.25, "common.items.armor.neck.neck_1"), (0.2, "common.items.crafting_ing.cloth_scraps"), (1.0, "common.items.crafting_ing.empty_vial"), - (0.1, "common.items.glider.glider_blue"), - (1, "common.items.crafting_ing.cloth_scraps"), + (0.1, "common.items.glider.glider_blue"), // swords (0.07, "common.items.weapons.sword.greatsword_2h_fine-1"), (0.07, "common.items.weapons.sword.greatsword_2h_fine-2"), diff --git a/assets/common/loot_tables/loot_table_crafting.ron b/assets/common/loot_tables/loot_table_crafting.ron index 0e7185ff68..0e407f813c 100644 --- a/assets/common/loot_tables/loot_table_crafting.ron +++ b/assets/common/loot_tables/loot_table_crafting.ron @@ -1,6 +1,7 @@ [ // crafting ingredients (2, "common.items.crafting_ing.leather_scraps"), + (2, "common.items.crafting_ing.cloth_scraps"), (1, "common.items.crafting_ing.empty_vial"), (0.10, "common.items.crafting_ing.shiny_gem"), diff --git a/assets/common/loot_tables/loot_table_cultists.ron b/assets/common/loot_tables/loot_table_cultists.ron index 1eb417294b..fac1d2acab 100644 --- a/assets/common/loot_tables/loot_table_cultists.ron +++ b/assets/common/loot_tables/loot_table_cultists.ron @@ -5,7 +5,7 @@ (3, "common.items.food.apple"), (3, "common.items.food.mushroom"), (3, "common.items.food.coconut"), - (4, "common.items.crafting_ing.cloth_scraps"), + (3, "common.items.crafting_ing.cloth_scraps"), // crafted (0.5, "common.items.food.apple_mushroom_curry"), (0.5, "common.items.food.apple_stick"), @@ -14,7 +14,7 @@ (4, "common.items.crafting_ing.empty_vial"), (0.25, "common.items.armor.neck.neck_1"), (0.001, "common.items.glider.glider_purp"), - (0.5, "common.items.glider.glider_blue"), + (0.1, "common.items.glider.glider_blue"), (0.5, "common.items.utility.firework_purple"), (0.5, "common.items.utility.bomb"), // Heavy Armour diff --git a/assets/common/loot_tables/loot_table_food.ron b/assets/common/loot_tables/loot_table_food.ron index fabb0b44a7..33491204cb 100644 --- a/assets/common/loot_tables/loot_table_food.ron +++ b/assets/common/loot_tables/loot_table_food.ron @@ -7,7 +7,5 @@ // crafted (0.05, "common.items.food.apple_mushroom_curry"), (0.10, "common.items.food.apple_stick"), - (0.10, "common.items.food.mushroom_stick"), - // misc - (3, "common.items.crafting_ing.cloth_scraps"), + (0.10, "common.items.food.mushroom_stick"), ] diff --git a/assets/common/loot_tables/loot_table_villager.ron b/assets/common/loot_tables/loot_table_villager.ron index 85d02c9d4d..a798589728 100644 --- a/assets/common/loot_tables/loot_table_villager.ron +++ b/assets/common/loot_tables/loot_table_villager.ron @@ -2,7 +2,7 @@ // Crafting Ingredients (1, "common.items.crafting_ing.empty_vial"), (0.10, "common.items.crafting_ing.shiny_gem"), - (5, "common.items.crafting_ing.cloth_scraps"), + (1, "common.items.crafting_ing.cloth_scraps"), // Consumables (0.2, "common.items.consumable.potion_minor"), // Armour diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index a2bd213bb6..e632a2b055 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -327,7 +327,10 @@ impl Item { chosen.choose() }, SpriteKind::Crate => { - chosen = Lottery::::load_expect("common.loot_tables.loot_table_food"); + chosen = Lottery::::load_expect(match rng.gen_range(0, 4) { + 0 => "common.loot_tables.loot_table_crafting", + _ => "common.loot_tables.loot_table_food", + }); chosen.choose() }, SpriteKind::Beehive => "common.items.crafting_ing.honey",