From 247004d180bc1ad36bb7cf95a5fa0d450aa37f79 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 28 Mar 2021 17:41:14 -0400 Subject: [PATCH] Loot tables can now recursively specify loot tables. Mercahnts broken. --- assets/common/item_price_calculation.ron | 52 ++-- assets/common/loot_tables/animal_ice.ron | 4 + assets/common/loot_tables/animal_parts.ron | 3 + assets/common/loot_tables/armor_cloth.ron | 38 +++ assets/common/loot_tables/armor_heavy.ron | 21 ++ assets/common/loot_tables/armor_light.ron | 27 +++ assets/common/loot_tables/armor_misc.ron | 12 + assets/common/loot_tables/armor_nature.ron | 32 +++ assets/common/loot_tables/cave_large.ron | 89 +++++++ assets/common/loot_tables/consumables.ron | 14 ++ assets/common/loot_tables/crafting.ron | 12 + assets/common/loot_tables/cultists.ron | 188 +++++++++++++++ assets/common/loot_tables/fallback.ron | 4 + assets/common/loot_tables/fish.ron | 3 + assets/common/loot_tables/food.ron | 14 ++ assets/common/loot_tables/humanoids.ron | 31 +++ assets/common/loot_tables/husk.ron | 3 + assets/common/loot_tables/loot_table.ron | 4 - .../loot_tables/loot_table_animal_ice.ron | 4 - .../loot_tables/loot_table_animal_parts.ron | 3 - .../loot_tables/loot_table_armor_cloth.ron | 38 --- .../loot_tables/loot_table_armor_heavy.ron | 21 -- .../loot_tables/loot_table_armor_light.ron | 27 --- .../loot_tables/loot_table_armor_misc.ron | 12 - .../loot_tables/loot_table_armor_nature.ron | 32 --- .../loot_tables/loot_table_cave_large.ron | 91 ------- .../loot_tables/loot_table_consumables.ron | 14 -- .../loot_tables/loot_table_crafting.ron | 13 - .../loot_tables/loot_table_cultists.ron | 227 ------------------ assets/common/loot_tables/loot_table_fish.ron | 3 - assets/common/loot_tables/loot_table_food.ron | 14 -- .../loot_tables/loot_table_humanoids.ron | 31 --- assets/common/loot_tables/loot_table_husk.ron | 3 - .../loot_tables/loot_table_maneater.ron | 5 - .../loot_tables/loot_table_miniboss.ron | 15 -- .../common/loot_tables/loot_table_raptor.ron | 4 - .../common/loot_tables/loot_table_rocks.ron | 6 - .../common/loot_tables/loot_table_saurok.ron | 19 -- .../common/loot_tables/loot_table_troll.ron | 4 - .../loot_tables/loot_table_villager.ron | 45 ---- .../loot_tables/loot_table_weapon_common.ron | 45 ---- .../loot_tables/loot_table_weapon_rare.ron | 42 ---- .../loot_table_weapon_uncommon.ron | 91 ------- .../common/loot_tables/loot_table_wendigo.ron | 3 - assets/common/loot_tables/maneater.ron | 5 + assets/common/loot_tables/mindflayer.ron | 23 +- assets/common/loot_tables/miniboss.ron | 15 ++ assets/common/loot_tables/raptor.ron | 4 + assets/common/loot_tables/rocks.ron | 6 + assets/common/loot_tables/saurok.ron | 19 ++ assets/common/loot_tables/troll.ron | 4 + assets/common/loot_tables/villager.ron | 45 ++++ assets/common/loot_tables/weapon_common.ron | 45 ++++ assets/common/loot_tables/weapon_rare.ron | 42 ++++ assets/common/loot_tables/weapon_uncommon.ron | 91 +++++++ assets/common/loot_tables/wendigo.ron | 3 + common/src/bin/csv_export/main.rs | 13 +- common/src/bin/csv_import/main.rs | 24 +- common/src/comp/inventory/item/mod.rs | 50 ++-- common/src/comp/inventory/loadout_builder.rs | 53 ++-- common/src/comp/inventory/trade_pricing.rs | 60 ++--- common/src/lottery.rs | 29 ++- server/src/events/entity_manipulation.rs | 100 ++++---- world/src/site/dungeon/mod.rs | 160 ++++++------ 64 files changed, 1072 insertions(+), 1082 deletions(-) create mode 100644 assets/common/loot_tables/animal_ice.ron create mode 100644 assets/common/loot_tables/animal_parts.ron create mode 100644 assets/common/loot_tables/armor_cloth.ron create mode 100644 assets/common/loot_tables/armor_heavy.ron create mode 100644 assets/common/loot_tables/armor_light.ron create mode 100644 assets/common/loot_tables/armor_misc.ron create mode 100644 assets/common/loot_tables/armor_nature.ron create mode 100644 assets/common/loot_tables/cave_large.ron create mode 100644 assets/common/loot_tables/consumables.ron create mode 100644 assets/common/loot_tables/crafting.ron create mode 100644 assets/common/loot_tables/cultists.ron create mode 100644 assets/common/loot_tables/fallback.ron create mode 100644 assets/common/loot_tables/fish.ron create mode 100644 assets/common/loot_tables/food.ron create mode 100644 assets/common/loot_tables/humanoids.ron create mode 100644 assets/common/loot_tables/husk.ron delete mode 100644 assets/common/loot_tables/loot_table.ron delete mode 100644 assets/common/loot_tables/loot_table_animal_ice.ron delete mode 100644 assets/common/loot_tables/loot_table_animal_parts.ron delete mode 100644 assets/common/loot_tables/loot_table_armor_cloth.ron delete mode 100644 assets/common/loot_tables/loot_table_armor_heavy.ron delete mode 100644 assets/common/loot_tables/loot_table_armor_light.ron delete mode 100644 assets/common/loot_tables/loot_table_armor_misc.ron delete mode 100644 assets/common/loot_tables/loot_table_armor_nature.ron delete mode 100644 assets/common/loot_tables/loot_table_cave_large.ron delete mode 100644 assets/common/loot_tables/loot_table_consumables.ron delete mode 100644 assets/common/loot_tables/loot_table_crafting.ron delete mode 100644 assets/common/loot_tables/loot_table_cultists.ron delete mode 100644 assets/common/loot_tables/loot_table_fish.ron delete mode 100644 assets/common/loot_tables/loot_table_food.ron delete mode 100644 assets/common/loot_tables/loot_table_humanoids.ron delete mode 100644 assets/common/loot_tables/loot_table_husk.ron delete mode 100644 assets/common/loot_tables/loot_table_maneater.ron delete mode 100644 assets/common/loot_tables/loot_table_miniboss.ron delete mode 100644 assets/common/loot_tables/loot_table_raptor.ron delete mode 100644 assets/common/loot_tables/loot_table_rocks.ron delete mode 100644 assets/common/loot_tables/loot_table_saurok.ron delete mode 100644 assets/common/loot_tables/loot_table_troll.ron delete mode 100644 assets/common/loot_tables/loot_table_villager.ron delete mode 100644 assets/common/loot_tables/loot_table_weapon_common.ron delete mode 100644 assets/common/loot_tables/loot_table_weapon_rare.ron delete mode 100644 assets/common/loot_tables/loot_table_weapon_uncommon.ron delete mode 100644 assets/common/loot_tables/loot_table_wendigo.ron create mode 100644 assets/common/loot_tables/maneater.ron create mode 100644 assets/common/loot_tables/miniboss.ron create mode 100644 assets/common/loot_tables/raptor.ron create mode 100644 assets/common/loot_tables/rocks.ron create mode 100644 assets/common/loot_tables/saurok.ron create mode 100644 assets/common/loot_tables/troll.ron create mode 100644 assets/common/loot_tables/villager.ron create mode 100644 assets/common/loot_tables/weapon_common.ron create mode 100644 assets/common/loot_tables/weapon_rare.ron create mode 100644 assets/common/loot_tables/weapon_uncommon.ron create mode 100644 assets/common/loot_tables/wendigo.ron diff --git a/assets/common/item_price_calculation.ron b/assets/common/item_price_calculation.ron index f3efc8bb03..0cb4c3be87 100644 --- a/assets/common/item_price_calculation.ron +++ b/assets/common/item_price_calculation.ron @@ -2,35 +2,35 @@ loot_tables: [ // balance the loot tables against each other (higher= more common= smaller price) // the fact that loot tables have an own probability not accessible outside of the lottery call doesn't help here - (0.5,"common.loot_tables.loot_table_animal_ice"), - (4,"common.loot_tables.loot_table_animal_parts"), - (1,"common.loot_tables.loot_table_armor_cloth"), - (0.01,"common.loot_tables.loot_table_armor_heavy"), - (0.1,"common.loot_tables.loot_table_armor_light"), - (0.1,"common.loot_tables.loot_table_armor_misc"), - (0.5,"common.loot_tables.loot_table_armor_nature"), - (0.1,"common.loot_tables.loot_table_cave_large"), - (0.1,"common.loot_tables.loot_table_consumables"), + (0.5,"common.loot_tables.animal_ice"), + (4,"common.loot_tables.animal_parts"), + (1,"common.loot_tables.armor_cloth"), + (0.01,"common.loot_tables.armor_heavy"), + (0.1,"common.loot_tables.armor_light"), + (0.1,"common.loot_tables.armor_misc"), + (0.5,"common.loot_tables.armor_nature"), + (0.1,"common.loot_tables.cave_large"), + (0.1,"common.loot_tables.consumables"), // loot_table_crafting is a rare roll on crate/mud sprite looting - (0.05,"common.loot_tables.loot_table_crafting"), - (0.005,"common.loot_tables.loot_table_cultists"), - (1,"common.loot_tables.loot_table_fish"), - (1,"common.loot_tables.loot_table_food"), - (0.1,"common.loot_tables.loot_table_humanoids"), - (1,"common.loot_tables.loot_table_maneater"), + (0.05,"common.loot_tables.crafting"), + (0.005,"common.loot_tables.cultists"), + (1,"common.loot_tables.fish"), + (1,"common.loot_tables.food"), + (0.1,"common.loot_tables.humanoids"), + (1,"common.loot_tables.maneater"), (0.0001,"common.loot_tables.mindflayer"), - (0.001,"common.loot_tables.loot_table_miniboss"), - (0.05,"common.loot_tables.loot_table_raptor"), + (0.001,"common.loot_tables.miniboss"), + (0.05,"common.loot_tables.raptor"), // loot_table_rocks is dropped by rock monsters, but is also the only source of stones to econsim until cave_scatter information is turned into a loot table - (0.2,"common.loot_tables.loot_table_rocks"), - (1,"common.loot_tables.loot_table"), - (0.04,"common.loot_tables.loot_table_saurok"), - (0.02,"common.loot_tables.loot_table_troll"), - (0.05,"common.loot_tables.loot_table_villager"), - (1,"common.loot_tables.loot_table_weapon_common"), - (0.008,"common.loot_tables.loot_table_weapon_rare"), - (0.01,"common.loot_tables.loot_table_weapon_uncommon"), - (0.01,"common.loot_tables.loot_table_wendigo"), + (0.2,"common.loot_tables.rocks"), + (1,"common.loot_tables.fallback"), + (0.04,"common.loot_tables.saurok"), + (0.02,"common.loot_tables.troll"), + (0.05,"common.loot_tables.villager"), + (1,"common.loot_tables.weapon_common"), + (0.008,"common.loot_tables.weapon_rare"), + (0.01,"common.loot_tables.weapon_uncommon"), + (0.01,"common.loot_tables.wendigo"), // we probably want to include all the scattered scatter information //(0.5,"common.cave_scatter"), ], diff --git a/assets/common/loot_tables/animal_ice.ron b/assets/common/loot_tables/animal_ice.ron new file mode 100644 index 0000000000..e9ac2d3b94 --- /dev/null +++ b/assets/common/loot_tables/animal_ice.ron @@ -0,0 +1,4 @@ +[ + (2.0, Item("common.items.crafting_ing.icy_fang")), + (1.0, Item("common.items.crafting_ing.leather_scraps")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/animal_parts.ron b/assets/common/loot_tables/animal_parts.ron new file mode 100644 index 0000000000..38b242b969 --- /dev/null +++ b/assets/common/loot_tables/animal_parts.ron @@ -0,0 +1,3 @@ +[ + (2.0, Item("common.items.crafting_ing.leather_scraps")), +] diff --git a/assets/common/loot_tables/armor_cloth.ron b/assets/common/loot_tables/armor_cloth.ron new file mode 100644 index 0000000000..dce00687c7 --- /dev/null +++ b/assets/common/loot_tables/armor_cloth.ron @@ -0,0 +1,38 @@ +[ + // belts + (0.33, Item("common.items.armor.cloth_blue.belt")), + (0.33, Item("common.items.armor.cloth_green.belt")), + (0.33, Item("common.items.armor.cloth_purple.belt")), + // chests + (0.08, Item("common.items.armor.cloth_blue.chest")), + (0.08, Item("common.items.armor.cloth_green.chest")), + (0.08, Item("common.items.armor.cloth_purple.chest")), + (0.08, Item("common.items.armor.misc.chest.worker_green_0")), + (0.08, Item("common.items.armor.misc.chest.worker_green_1")), + (0.08, Item("common.items.armor.misc.chest.worker_orange_0")), + (0.08, Item("common.items.armor.misc.chest.worker_orange_1")), + (0.08, Item("common.items.armor.misc.chest.worker_purple_0")), + (0.08, Item("common.items.armor.misc.chest.worker_purple_1")), + (0.08, Item("common.items.armor.misc.chest.worker_red_0")), + (0.08, Item("common.items.armor.misc.chest.worker_red_1")), + (0.08, Item("common.items.armor.misc.chest.worker_yellow_0")), + (0.08, Item("common.items.armor.misc.chest.worker_yellow_1")), + // shoes + (0.33, Item("common.items.armor.cloth_blue.foot")), + (0.33, Item("common.items.armor.cloth_green.foot")), + (0.33, Item("common.items.armor.cloth_purple.foot")), + // pants + (0.25, Item("common.items.armor.cloth_blue.pants")), + (0.25, Item("common.items.armor.cloth_green.pants")), + (0.25, Item("common.items.armor.cloth_purple.pants")), + (0.25, Item("common.items.armor.misc.pants.worker_blue")), + // shoulders + (0.25, Item("common.items.armor.cloth_blue.shoulder_0")), + (0.25, Item("common.items.armor.cloth_blue.shoulder_1")), + (0.25, Item("common.items.armor.cloth_green.shoulder")), + (0.25, Item("common.items.armor.cloth_purple.shoulder")), + //gloves + (0.33, Item("common.items.armor.cloth_blue.hand")), + (0.33, Item("common.items.armor.cloth_green.hand")), + (0.33, Item("common.items.armor.cloth_purple.hand")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor_heavy.ron b/assets/common/loot_tables/armor_heavy.ron new file mode 100644 index 0000000000..20b8d601f4 --- /dev/null +++ b/assets/common/loot_tables/armor_heavy.ron @@ -0,0 +1,21 @@ +[ + // belts + (0.67, Item("common.items.armor.plate.belt")), + (0.33, Item("common.items.armor.steel.belt")), + // chests + (0.67, Item("common.items.armor.plate.chest")), + (0.33, Item("common.items.armor.steel.chest")), + // shoes + (0.67, Item("common.items.armor.plate.foot")), + (0.33, Item("common.items.armor.steel.foot")), + // pants + (0.67, Item("common.items.armor.plate.pants")), + (0.66, Item("common.items.armor.steel.pants")), + // shoulders + (0.4, Item("common.items.armor.plate.shoulder")), + (0.37, Item("common.items.armor.misc.shoulder.iron_spikes")), + (0.33, Item("common.items.armor.steel.shoulder")), + //gloves + (0.67, Item("common.items.armor.plate.hand")), + (0.33, Item("common.items.armor.steel.hand")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor_light.ron b/assets/common/loot_tables/armor_light.ron new file mode 100644 index 0000000000..77f29476b8 --- /dev/null +++ b/assets/common/loot_tables/armor_light.ron @@ -0,0 +1,27 @@ +[ + // belts + (0.5, Item("common.items.armor.swift.belt")), + (0.5, Item("common.items.armor.agile.belt")), + // chests + (0.5, Item("common.items.armor.swift.chest")), + (0.5, Item("common.items.armor.agile.chest")), + // shoes + (0.5, Item("common.items.armor.swift.foot")), + (0.5, Item("common.items.armor.agile.foot")), + // pants + (0.33, Item("common.items.armor.swift.pants")), + (0.33, Item("common.items.armor.agile.pants")), + (0.33, Item("common.items.armor.misc.pants.hunting")), + // shoulders + (0.1, Item("common.items.armor.misc.shoulder.leather_strip")), + (0.2, Item("common.items.armor.swift.shoulder")), + (0.2, Item("common.items.armor.agile.shoulder")), + (0.2, Item("common.items.armor.agile.shoulder")), + (0.07, Item("common.items.armor.misc.shoulder.leather_iron_0")), + (0.07, Item("common.items.armor.misc.shoulder.leather_iron_1")), + (0.07, Item("common.items.armor.misc.shoulder.leather_iron_2")), + (0.07, Item("common.items.armor.misc.shoulder.leather_iron_3")), + //gloves + (0.5, Item("common.items.armor.swift.hand")), + (0.5, Item("common.items.armor.agile.hand")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor_misc.ron b/assets/common/loot_tables/armor_misc.ron new file mode 100644 index 0000000000..95d602e405 --- /dev/null +++ b/assets/common/loot_tables/armor_misc.ron @@ -0,0 +1,12 @@ +[ + // rings + (0.15, Item("common.items.armor.misc.ring.scratched")), + (0.05, Item("common.items.armor.misc.ring.gold")), + // capes + (0.25, Item("common.items.armor.misc.back.short_0")), + (0.25, Item("common.items.armor.misc.back.short_1")), + // necks + (0.25, Item("common.items.armor.misc.neck.plain_0")), + // misc + (0.05, Item("common.items.glider.glider_blue")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor_nature.ron b/assets/common/loot_tables/armor_nature.ron new file mode 100644 index 0000000000..f95a29302a --- /dev/null +++ b/assets/common/loot_tables/armor_nature.ron @@ -0,0 +1,32 @@ +[ + // belts + (0.4, Item("common.items.armor.druid.belt")), + (0.2, Item("common.items.armor.twigs.belt")), + (0.2, Item("common.items.armor.twigsflowers.belt")), + (0.2, Item("common.items.armor.twigsleaves.belt")), + // chests + (0.4, Item("common.items.armor.druid.chest")), + (0.2, Item("common.items.armor.twigs.chest")), + (0.2, Item("common.items.armor.twigsflowers.chest")), + (0.2, Item("common.items.armor.twigsleaves.chest")), + // shoes + (0.4, Item("common.items.armor.druid.foot")), + (0.2, Item("common.items.armor.twigs.foot")), + (0.2, Item("common.items.armor.twigsflowers.foot")), + (0.2, Item("common.items.armor.twigsleaves.foot")), + // pants + (0.4, Item("common.items.armor.druid.pants")), + (0.2, Item("common.items.armor.twigs.pants")), + (0.2, Item("common.items.armor.twigsflowers.pants")), + (0.2, Item("common.items.armor.twigsleaves.pants")), + // shoulders + (0.4, Item("common.items.armor.druid.shoulder")), + (0.2, Item("common.items.armor.twigs.shoulder")), + (0.2, Item("common.items.armor.twigsflowers.shoulder")), + (0.2, Item("common.items.armor.twigsleaves.shoulder")), + //gloves + (0.4, Item("common.items.armor.druid.hand")), + (0.2, Item("common.items.armor.twigs.hand")), + (0.2, Item("common.items.armor.twigsflowers.hand")), + (0.2, Item("common.items.armor.twigsleaves.hand")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/cave_large.ron b/assets/common/loot_tables/cave_large.ron new file mode 100644 index 0000000000..9b2d880b93 --- /dev/null +++ b/assets/common/loot_tables/cave_large.ron @@ -0,0 +1,89 @@ +[ + // Misc + (0.25, Item("common.items.armor.misc.neck.plain_1")), + (2.0, Item("common.items.crafting_ing.cloth_scraps")), + (1.0, Item("common.items.crafting_ing.empty_vial")), + (0.1, Item("common.items.glider.glider_blue")), + (0.05, Item("common.items.glider.glider_morpho")), + (0.05, Item("common.items.glider.glider_monarch")), + (0.05, Item("common.items.glider.glider_moth")), + (0.05, Item("common.items.armor.misc.ring.gold")), + (0.1, Item("common.items.lantern.geode_purp")), + // swords + (0.03, Item("common.items.weapons.sword.steel-0")), + (0.03, Item("common.items.weapons.sword.steel-1")), + (0.03, Item("common.items.weapons.sword.steel-2")), + (0.03, Item("common.items.weapons.sword.steel-3")), + (0.03, Item("common.items.weapons.sword.steel-4")), + (0.03, Item("common.items.weapons.sword.steel-5")), + (0.03, Item("common.items.weapons.sword.steel-6")), + (0.03, Item("common.items.weapons.sword.steel-7")), + (0.03, Item("common.items.weapons.sword.steel-8")), + (0.02, Item("common.items.weapons.sword.cobalt-0")), + (0.02, Item("common.items.weapons.sword.cobalt-1")), + (0.02, Item("common.items.weapons.sword.cobalt-2")), + (0.02, Item("common.items.weapons.sword.cobalt-3")), + (0.01, Item("common.items.weapons.sword.bloodsteel-0")), + (0.01, Item("common.items.weapons.sword.bloodsteel-1")), + (0.01, Item("common.items.weapons.sword.bloodsteel-2")), + // axes + (0.02, Item("common.items.weapons.axe.bloodsteel_axe-0")), + (0.02, Item("common.items.weapons.axe.bloodsteel_axe-1")), + (0.02, Item("common.items.weapons.axe.bloodsteel_axe-2")), + (0.01, Item("common.items.weapons.axe.cobalt_axe-0")), + (0.01, Item("common.items.weapons.axe.cobalt_axe-1")), + (0.001, Item("common.items.weapons.axe.malachite_axe-0")), + (0.04, Item("common.items.weapons.axe.iron_axe-7")), + (0.04, Item("common.items.weapons.axe.iron_axe-8")), + (0.04, Item("common.items.weapons.axe.iron_axe-9")), + (0.04, Item("common.items.weapons.axe.steel_axe-0")), + (0.04, Item("common.items.weapons.axe.steel_axe-1")), + (0.04, Item("common.items.weapons.axe.steel_axe-2")), + (0.04, Item("common.items.weapons.axe.steel_axe-3")), + (0.04, Item("common.items.weapons.axe.steel_axe-4")), + (0.04, Item("common.items.weapons.axe.steel_axe-5")), + (0.04, Item("common.items.weapons.axe.steel_axe-6")), + // healing sceptre + (0.2, Item("common.items.weapons.sceptre.staff_nature")), + (0.1, Item("common.items.weapons.sceptre.fork0")), + (0.1, Item("common.items.weapons.sceptre.emerald")), + (0.1, Item("common.items.weapons.sceptre.coralline_cane")), + (0.001, Item("common.items.weapons.sceptre.sceptre_velorite_0")), + // staves + (0.2, Item("common.items.weapons.staff.bone_staff")), + (0.2, Item("common.items.weapons.staff.ley_seeker")), + (0.10, Item("common.items.weapons.staff.fiery_wishing_rod")), + (0.10, Item("common.items.weapons.staff.heated_arm")), + (0.10, Item("common.items.weapons.staff.golden_khakkara")), + (0.10, Item("common.items.weapons.staff.crimson_eye")), + (0.10, Item("common.items.weapons.staff.solar")), + (0.05, Item("common.items.weapons.staff.lava_rod")), + (0.05, Item("common.items.weapons.staff.dragon_tongue")), + (0.01, Item("common.items.weapons.staff.orc_iron")), + // hammers + (0.3, Item("common.items.weapons.hammer.cobalt_hammer-0")), + (0.3, Item("common.items.weapons.hammer.cobalt_hammer-1")), + (0.15, Item("common.items.weapons.hammer.runic_hammer")), + (0.15, Item("common.items.weapons.hammer.ramshead_hammer")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-7")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-8")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-0")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-1")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-2")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-3")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-4")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-5")), + // bows + (0.03, Item("common.items.weapons.bow.metal-0")), + (0.03, Item("common.items.weapons.bow.metal-1")), + (0.03, Item("common.items.weapons.bow.metal-2")), + (0.03, Item("common.items.weapons.bow.metal-3")), + (0.03, Item("common.items.weapons.bow.metal-4")), + (0.02, Item("common.items.weapons.bow.frostwood-0")), + (0.02, Item("common.items.weapons.bow.frostwood-1")), + (0.02, Item("common.items.weapons.bow.frostwood-2")), + (0.01, Item("common.items.weapons.bow.eldwood-0")), + (0.01, Item("common.items.weapons.bow.eldwood-1")), + (0.01, Item("common.items.weapons.bow.eldwood-2")), + (0.001, Item("common.items.weapons.bow.velorite")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/consumables.ron b/assets/common/loot_tables/consumables.ron new file mode 100644 index 0000000000..e234582077 --- /dev/null +++ b/assets/common/loot_tables/consumables.ron @@ -0,0 +1,14 @@ +[ + // potions + (1.0, Item("common.items.consumable.potion_minor")), + (0.1, Item("common.items.consumable.potion_med")), + (0.01, Item("common.items.consumable.potion_big")), + // bombs + (0.6, Item("common.items.utility.bomb")), + (0.2, Item("common.items.utility.bomb_pile")), + // velorite + (1.0, Item("common.items.ore.veloritefrag")), + (0.5, Item("common.items.ore.velorite")), + // misc + (0.1, Item("common.items.utility.collar")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/crafting.ron b/assets/common/loot_tables/crafting.ron new file mode 100644 index 0000000000..d66fb70e63 --- /dev/null +++ b/assets/common/loot_tables/crafting.ron @@ -0,0 +1,12 @@ +[ + // crafting ingredients + (2.0, Item("common.items.crafting_ing.leather_scraps")), + (4.0, Item("common.items.crafting_ing.cloth_scraps")), + (1.0, Item("common.items.crafting_ing.empty_vial")), + (0.5, Item("common.items.crafting_ing.amethyst")), + (0.5, Item("common.items.crafting_ing.topaz")), + (0.4, Item("common.items.crafting_ing.sapphire")), + (0.35, Item("common.items.crafting_ing.emerald")), + (0.25, Item("common.items.crafting_ing.ruby")), + (0.1, Item("common.items.crafting_ing.diamond")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/cultists.ron b/assets/common/loot_tables/cultists.ron new file mode 100644 index 0000000000..fe76e4b3d3 --- /dev/null +++ b/assets/common/loot_tables/cultists.ron @@ -0,0 +1,188 @@ +[ + (3.0, Item("common.items.food.cheese")), + (3.0, Item("common.items.food.apple")), + (3.0, Item("common.items.food.mushroom")), + (3.0, Item("common.items.food.coconut")), + (5.0, Item("common.items.crafting_ing.cloth_scraps")), + (0.5, Item("common.items.food.apple_mushroom_curry")), + (0.5, Item("common.items.food.apple_stick")), + (0.5, Item("common.items.food.mushroom_stick")), + (4.0, Item("common.items.crafting_ing.empty_vial")), + (0.25, Item("common.items.armor.misc.neck.plain_1")), + (0.1, Item("common.items.glider.glider_blue")), + (0.5, Item("common.items.utility.firework_purple")), + (0.5, Item("common.items.utility.bomb")), + (0.5, Item("common.items.armor.misc.ring.gold")), + (0.25, Item("common.items.armor.misc.ring.skull")), + (0.5, Item("common.items.armor.plate.belt")), + (0.3, Item("common.items.armor.steel.belt")), + (0.5, Item("common.items.armor.plate.chest")), + (0.3, Item("common.items.armor.steel.chest")), + (0.5, Item("common.items.armor.plate.foot")), + (0.3, Item("common.items.armor.steel.foot")), + (0.5, Item("common.items.armor.plate.pants")), + (0.3, Item("common.items.armor.steel.pants")), + (0.4, Item("common.items.armor.plate.shoulder")), + (0.37, Item("common.items.armor.misc.shoulder.iron_spikes")), + (0.33, Item("common.items.armor.steel.shoulder")), + (0.67, Item("common.items.armor.plate.hand")), + (0.33, Item("common.items.armor.steel.hand")), + (0.5, Item("common.items.armor.swift.belt")), + (0.5, Item("common.items.armor.agile.belt")), + (0.5, Item("common.items.armor.swift.chest")), + (0.5, Item("common.items.armor.agile.chest")), + (0.5, Item("common.items.armor.swift.foot")), + (0.5, Item("common.items.armor.agile.foot")), + (0.33, Item("common.items.armor.swift.pants")), + (0.33, Item("common.items.armor.agile.pants")), + (0.33, Item("common.items.armor.misc.pants.hunting")), + (0.6, Item("common.items.armor.misc.shoulder.leather_strip")), + (0.4, Item("common.items.armor.swift.shoulder")), + (0.4, Item("common.items.armor.agile.shoulder")), + (0.3, Item("common.items.armor.misc.shoulder.leather_iron_0")), + (0.3, Item("common.items.armor.misc.shoulder.leather_iron_1")), + (0.3, Item("common.items.armor.misc.shoulder.leather_iron_2")), + (0.3, Item("common.items.armor.misc.shoulder.leather_iron_3")), + (0.5, Item("common.items.armor.swift.hand")), + (0.5, Item("common.items.armor.agile.hand")), + (0.001, Item("common.items.armor.misc.back.backpack")), + (0.1, Item("common.items.armor.misc.bag.heavy_seabag")), + (0.1, Item("common.items.weapons.sword.wood-0")), + (0.1, Item("common.items.weapons.sword.wood-1")), + (0.1, Item("common.items.weapons.sword.wood-2")), + (0.1, Item("common.items.weapons.sword.stone-0")), + (0.1, Item("common.items.weapons.sword.stone-1")), + (0.1, Item("common.items.weapons.sword.stone-2")), + (0.05, Item("common.items.weapons.sword.bronze-0")), + (0.05, Item("common.items.weapons.sword.bronze-1")), + (0.05, Item("common.items.weapons.sword.bronze-2")), + (0.2, Item("common.items.weapons.axe.orc_axe-0")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-0")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-1")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-2")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-3")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-4")), + (0.25, Item("common.items.weapons.sceptre.staff_nature")), + (0.15, Item("common.items.weapons.hammer.flimsy_hammer")), + (0.1, Item("common.items.weapons.hammer.wood_hammer-0")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-0")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-1")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-2")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-3")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-0")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-1")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-2")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-3")), + (0.2, Item("common.items.weapons.bow.rawwood-0")), + (0.2, Item("common.items.weapons.bow.rawwood-1")), + (0.1, Item("common.items.weapons.bow.wood-0")), + (0.1, Item("common.items.weapons.bow.wood-1")), + (0.1, Item("common.items.weapons.bow.wood-2")), + (0.1, Item("common.items.weapons.bow.wood-3")), + (0.1, Item("common.items.weapons.bow.wood-4")), + (0.05, Item("common.items.weapons.bow.bone-0")), + (0.05, Item("common.items.weapons.bow.bone-1")), + (0.05, Item("common.items.weapons.bow.bone-2")), + (0.05, Item("common.items.weapons.bow.bone-3")), + (0.04, Item("common.items.weapons.sword.iron-0")), + (0.04, Item("common.items.weapons.sword.iron-1")), + (0.04, Item("common.items.weapons.sword.iron-2")), + (0.04, Item("common.items.weapons.sword.iron-3")), + (0.04, Item("common.items.weapons.sword.iron-4")), + (0.04, Item("common.items.weapons.sword.iron-5")), + (0.04, Item("common.items.weapons.sword.iron-6")), + (0.04, Item("common.items.weapons.sword.iron-7")), + (0.04, Item("common.items.weapons.sword.iron-8")), + (0.04, Item("common.items.weapons.sword.iron-9")), + (0.04, Item("common.items.weapons.sword.iron-10")), + (0.03, Item("common.items.weapons.sword.steel-0")), + (0.03, Item("common.items.weapons.sword.steel-1")), + (0.03, Item("common.items.weapons.sword.steel-2")), + (0.03, Item("common.items.weapons.sword.steel-3")), + (0.03, Item("common.items.weapons.sword.steel-4")), + (0.03, Item("common.items.weapons.sword.steel-5")), + (0.03, Item("common.items.weapons.sword.steel-6")), + (0.03, Item("common.items.weapons.sword.steel-7")), + (0.03, Item("common.items.weapons.sword.steel-8")), + (0.15, Item("common.items.weapons.axe.bronze_axe-0")), + (0.15, Item("common.items.weapons.axe.bronze_axe-1")), + (0.15, Item("common.items.weapons.axe.bronze_axe-2")), + (0.04, Item("common.items.weapons.axe.iron_axe-0")), + (0.04, Item("common.items.weapons.axe.iron_axe-1")), + (0.04, Item("common.items.weapons.axe.iron_axe-2")), + (0.04, Item("common.items.weapons.axe.iron_axe-3")), + (0.04, Item("common.items.weapons.axe.iron_axe-4")), + (0.04, Item("common.items.weapons.axe.iron_axe-5")), + (0.04, Item("common.items.weapons.axe.iron_axe-6")), + (0.04, Item("common.items.weapons.axe.iron_axe-7")), + (0.04, Item("common.items.weapons.axe.iron_axe-8")), + (0.04, Item("common.items.weapons.axe.iron_axe-9")), + (0.04, Item("common.items.weapons.axe.steel_axe-0")), + (0.04, Item("common.items.weapons.axe.steel_axe-1")), + (0.04, Item("common.items.weapons.axe.steel_axe-2")), + (0.04, Item("common.items.weapons.axe.steel_axe-3")), + (0.04, Item("common.items.weapons.axe.steel_axe-4")), + (0.04, Item("common.items.weapons.axe.steel_axe-5")), + (0.04, Item("common.items.weapons.axe.steel_axe-6")), + (0.5, Item("common.items.weapons.sceptre.staff_nature")), + (0.4, Item("common.items.weapons.staff.bone_staff")), + (0.40, Item("common.items.weapons.staff.crimson_eye")), + (0.2, Item("common.items.weapons.staff.aurora")), + (0.20, Item("common.items.weapons.staff.frostwood_torch")), + (0.15, Item("common.items.weapons.hammer.bronze_hammer-0")), + (0.15, Item("common.items.weapons.hammer.bronze_hammer-1")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-0")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-1")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-2")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-3")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-4")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-5")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-6")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-7")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-8")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-0")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-1")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-2")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-3")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-4")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-5")), + (0.04, Item("common.items.weapons.bow.hardwood-0")), + (0.04, Item("common.items.weapons.bow.hardwood-1")), + (0.04, Item("common.items.weapons.bow.hardwood-2")), + (0.04, Item("common.items.weapons.bow.hardwood-3")), + (0.04, Item("common.items.weapons.bow.hardwood-4")), + (0.04, Item("common.items.weapons.bow.hardwood-5")), + (0.03, Item("common.items.weapons.bow.metal-0")), + (0.03, Item("common.items.weapons.bow.metal-1")), + (0.03, Item("common.items.weapons.bow.metal-2")), + (0.03, Item("common.items.weapons.bow.metal-3")), + (0.03, Item("common.items.weapons.bow.metal-4")), + (0.2, Item("common.items.weapons.sword.cobalt-0")), + (0.2, Item("common.items.weapons.sword.cobalt-1")), + (0.2, Item("common.items.weapons.sword.cobalt-2")), + (0.2, Item("common.items.weapons.sword.cobalt-3")), + (0.1, Item("common.items.weapons.sword.bloodsteel-0")), + (0.1, Item("common.items.weapons.sword.bloodsteel-1")), + (0.1, Item("common.items.weapons.sword.bloodsteel-2")), + (0.2, Item("common.items.weapons.axe.bloodsteel_axe-0")), + (0.2, Item("common.items.weapons.axe.bloodsteel_axe-1")), + (0.2, Item("common.items.weapons.axe.bloodsteel_axe-2")), + (0.25, Item("common.items.weapons.sceptre.staff_nature")), + (0.2, Item("common.items.weapons.staff.infused_tower")), + (0.10, Item("common.items.weapons.staff.lava_rod")), + (0.10, Item("common.items.weapons.staff.dragon_tongue")), + (0.1, Item("common.items.weapons.staff.flamethrower_0")), + (0.04, Item("common.items.weapons.staff.bent_fuse")), + (0.04, Item("common.items.weapons.sceptre.emerald")), + (0.04, Item("common.items.weapons.staff.orc_iron")), + (0.01, Item("common.items.weapons.hammer.cobalt_hammer-0")), + (0.01, Item("common.items.weapons.hammer.cobalt_hammer-1")), + (0.01, Item("common.items.weapons.hammer.runic_hammer")), + (0.1, Item("common.items.weapons.hammer.ramshead_hammer")), + (0.2, Item("common.items.weapons.bow.frostwood-0")), + (0.2, Item("common.items.weapons.bow.frostwood-1")), + (0.2, Item("common.items.weapons.bow.frostwood-2")), + (0.1, Item("common.items.weapons.bow.eldwood-0")), + (0.1, Item("common.items.weapons.bow.eldwood-1")), + (0.1, Item("common.items.weapons.bow.eldwood-2")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/fallback.ron b/assets/common/loot_tables/fallback.ron new file mode 100644 index 0000000000..781d5d2999 --- /dev/null +++ b/assets/common/loot_tables/fallback.ron @@ -0,0 +1,4 @@ +[ + // Fallback loot table + (1.0, Item("common.items.food.cheese")), +] diff --git a/assets/common/loot_tables/fish.ron b/assets/common/loot_tables/fish.ron new file mode 100644 index 0000000000..edfafbbe43 --- /dev/null +++ b/assets/common/loot_tables/fish.ron @@ -0,0 +1,3 @@ +[ + (1.0, Item("common.items.food.fish")), +] diff --git a/assets/common/loot_tables/food.ron b/assets/common/loot_tables/food.ron new file mode 100644 index 0000000000..1d631f5cef --- /dev/null +++ b/assets/common/loot_tables/food.ron @@ -0,0 +1,14 @@ +[ + // simple + (3.0, Item("common.items.food.cheese")), + (3.0, Item("common.items.food.apple")), + (3.0, Item("common.items.food.mushroom")), + (1.0, Item("common.items.food.coconut")), + (1.0, Item("common.items.food.lettuce")), + (1.0, Item("common.items.food.tomato")), + (2.0, Item("common.items.food.carrot")), + // crafted + (0.05, Item("common.items.food.apple_mushroom_curry")), + (0.1, Item("common.items.food.apple_stick")), + (0.1, Item("common.items.food.mushroom_stick")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/humanoids.ron b/assets/common/loot_tables/humanoids.ron new file mode 100644 index 0000000000..baf4a1ed6b --- /dev/null +++ b/assets/common/loot_tables/humanoids.ron @@ -0,0 +1,31 @@ +[ + // Crafting Ingredients + (2.0, Item("common.items.crafting_ing.empty_vial")), + (0.1, Item("common.items.crafting_ing.diamond")), + (4.0, Item("common.items.crafting_ing.cloth_scraps")), + // Consumables + (0.2, Item("common.items.consumable.potion_minor")), + // Ring + (0.02, Item("common.items.armor.misc.ring.gold")), + // Utility + (0.05, Item("common.items.utility.collar")), + // Food + (1.0, Item("common.items.food.coconut")), + (0.05, Item("common.items.food.apple_mushroom_curry")), + (0.1, Item("common.items.food.apple_stick")), + (0.1, Item("common.items.food.mushroom_stick")), + // Weapons + (0.1, Item("common.items.weapons.sword.wood-0")), + (0.1, Item("common.items.weapons.sword.wood-1")), + (0.1, Item("common.items.weapons.sword.wood-2")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-0")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-1")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-2")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-3")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-4")), + (0.25, Item("common.items.weapons.sceptre.staff_nature")), + (0.15, Item("common.items.weapons.hammer.flimsy_hammer")), + (0.1, Item("common.items.weapons.hammer.wood_hammer-0")), + (0.15, Item("common.items.weapons.bow.rawwood-0")), + (0.15, Item("common.items.weapons.bow.rawwood-1")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/husk.ron b/assets/common/loot_tables/husk.ron new file mode 100644 index 0000000000..be0a0aeef5 --- /dev/null +++ b/assets/common/loot_tables/husk.ron @@ -0,0 +1,3 @@ +[ + (1.0, Item("common.items.crafting_ing.stones")), +] diff --git a/assets/common/loot_tables/loot_table.ron b/assets/common/loot_tables/loot_table.ron deleted file mode 100644 index 9504a3ce9d..0000000000 --- a/assets/common/loot_tables/loot_table.ron +++ /dev/null @@ -1,4 +0,0 @@ -[ - // Fallback loot table - (1, "common.items.food.mushroom"), -] diff --git a/assets/common/loot_tables/loot_table_animal_ice.ron b/assets/common/loot_tables/loot_table_animal_ice.ron deleted file mode 100644 index a1ca41a531..0000000000 --- a/assets/common/loot_tables/loot_table_animal_ice.ron +++ /dev/null @@ -1,4 +0,0 @@ -[ - (2, "common.items.crafting_ing.icy_fang"), - (1, "common.items.crafting_ing.leather_scraps"), -] diff --git a/assets/common/loot_tables/loot_table_animal_parts.ron b/assets/common/loot_tables/loot_table_animal_parts.ron deleted file mode 100644 index 6358ba4cbe..0000000000 --- a/assets/common/loot_tables/loot_table_animal_parts.ron +++ /dev/null @@ -1,3 +0,0 @@ -[ - (2, "common.items.crafting_ing.leather_scraps"), -] diff --git a/assets/common/loot_tables/loot_table_armor_cloth.ron b/assets/common/loot_tables/loot_table_armor_cloth.ron deleted file mode 100644 index e05ff8303a..0000000000 --- a/assets/common/loot_tables/loot_table_armor_cloth.ron +++ /dev/null @@ -1,38 +0,0 @@ -[ - // belts - (0.33, "common.items.armor.cloth_blue.belt"), - (0.33, "common.items.armor.cloth_green.belt"), - (0.33, "common.items.armor.cloth_purple.belt"), - // chests - (0.08, "common.items.armor.cloth_blue.chest"), - (0.08, "common.items.armor.cloth_green.chest"), - (0.08, "common.items.armor.cloth_purple.chest"), - (0.08, "common.items.armor.misc.chest.worker_green_0"), - (0.08, "common.items.armor.misc.chest.worker_green_1"), - (0.08, "common.items.armor.misc.chest.worker_orange_0"), - (0.08, "common.items.armor.misc.chest.worker_orange_1"), - (0.08, "common.items.armor.misc.chest.worker_purple_0"), - (0.08, "common.items.armor.misc.chest.worker_purple_1"), - (0.08, "common.items.armor.misc.chest.worker_red_0"), - (0.08, "common.items.armor.misc.chest.worker_red_1"), - (0.08, "common.items.armor.misc.chest.worker_yellow_0"), - (0.08, "common.items.armor.misc.chest.worker_yellow_1"), - // shoes - (0.33, "common.items.armor.cloth_blue.foot"), - (0.33, "common.items.armor.cloth_green.foot"), - (0.33, "common.items.armor.cloth_purple.foot"), - // pants - (0.25, "common.items.armor.cloth_blue.pants"), - (0.25, "common.items.armor.cloth_green.pants"), - (0.25, "common.items.armor.cloth_purple.pants"), - (0.25, "common.items.armor.misc.pants.worker_blue"), - // shoulders - (0.25, "common.items.armor.cloth_blue.shoulder_0"), - (0.25, "common.items.armor.cloth_blue.shoulder_1"), - (0.25, "common.items.armor.cloth_green.shoulder"), - (0.25, "common.items.armor.cloth_purple.shoulder"), - //gloves - (0.33, "common.items.armor.cloth_blue.hand"), - (0.33, "common.items.armor.cloth_green.hand"), - (0.33, "common.items.armor.cloth_purple.hand"), -] diff --git a/assets/common/loot_tables/loot_table_armor_heavy.ron b/assets/common/loot_tables/loot_table_armor_heavy.ron deleted file mode 100644 index d855f91675..0000000000 --- a/assets/common/loot_tables/loot_table_armor_heavy.ron +++ /dev/null @@ -1,21 +0,0 @@ -[ - // belts - (0.67, "common.items.armor.plate.belt"), - (0.33, "common.items.armor.steel.belt"), - // chests - (0.67, "common.items.armor.plate.chest"), - (0.33, "common.items.armor.steel.chest"), - // shoes - (0.67, "common.items.armor.plate.foot"), - (0.33, "common.items.armor.steel.foot"), - // pants - (0.67, "common.items.armor.plate.pants"), - (0.66, "common.items.armor.steel.pants"), - // shoulders - (0.40, "common.items.armor.plate.shoulder"), - (0.37, "common.items.armor.misc.shoulder.iron_spikes"), - (0.33, "common.items.armor.steel.shoulder"), - //gloves - (0.67, "common.items.armor.plate.hand"), - (0.33, "common.items.armor.steel.hand"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_armor_light.ron b/assets/common/loot_tables/loot_table_armor_light.ron deleted file mode 100644 index a782d48a51..0000000000 --- a/assets/common/loot_tables/loot_table_armor_light.ron +++ /dev/null @@ -1,27 +0,0 @@ -[ - // belts - (0.50, "common.items.armor.swift.belt"), - (0.50, "common.items.armor.agile.belt"), - // chests - (0.50, "common.items.armor.swift.chest"), - (0.50, "common.items.armor.agile.chest"), - // shoes - (0.50, "common.items.armor.swift.foot"), - (0.50, "common.items.armor.agile.foot"), - // pants - (0.33, "common.items.armor.swift.pants"), - (0.33, "common.items.armor.agile.pants"), - (0.33, "common.items.armor.misc.pants.hunting"), - // shoulders - (0.10, "common.items.armor.misc.shoulder.leather_strip"), - (0.20, "common.items.armor.swift.shoulder"), - (0.20, "common.items.armor.agile.shoulder"), - (0.20, "common.items.armor.agile.shoulder"), - (0.07, "common.items.armor.misc.shoulder.leather_iron_0"), - (0.07, "common.items.armor.misc.shoulder.leather_iron_1"), - (0.07, "common.items.armor.misc.shoulder.leather_iron_2"), - (0.07, "common.items.armor.misc.shoulder.leather_iron_3"), - //gloves - (0.50, "common.items.armor.swift.hand"), - (0.50, "common.items.armor.agile.hand"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_armor_misc.ron b/assets/common/loot_tables/loot_table_armor_misc.ron deleted file mode 100644 index beba2e7b11..0000000000 --- a/assets/common/loot_tables/loot_table_armor_misc.ron +++ /dev/null @@ -1,12 +0,0 @@ -[ - // rings - (0.15, "common.items.armor.misc.ring.scratched"), - (0.05, "common.items.armor.misc.ring.gold"), - // capes - (0.25, "common.items.armor.misc.back.short_0"), - (0.25, "common.items.armor.misc.back.short_1"), - // necks - (0.25, "common.items.armor.misc.neck.plain_0"), - // misc - (0.05, "common.items.glider.glider_blue"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_armor_nature.ron b/assets/common/loot_tables/loot_table_armor_nature.ron deleted file mode 100644 index 1bb0bb6531..0000000000 --- a/assets/common/loot_tables/loot_table_armor_nature.ron +++ /dev/null @@ -1,32 +0,0 @@ -[ - // belts - (0.40, "common.items.armor.druid.belt"), - (0.20, "common.items.armor.twigs.belt"), - (0.20, "common.items.armor.twigsflowers.belt"), - (0.20, "common.items.armor.twigsleaves.belt"), - // chests - (0.40, "common.items.armor.druid.chest"), - (0.20, "common.items.armor.twigs.chest"), - (0.20, "common.items.armor.twigsflowers.chest"), - (0.20, "common.items.armor.twigsleaves.chest"), - // shoes - (0.40, "common.items.armor.druid.foot"), - (0.20, "common.items.armor.twigs.foot"), - (0.20, "common.items.armor.twigsflowers.foot"), - (0.20, "common.items.armor.twigsleaves.foot"), - // pants - (0.40, "common.items.armor.druid.pants"), - (0.20, "common.items.armor.twigs.pants"), - (0.20, "common.items.armor.twigsflowers.pants"), - (0.20, "common.items.armor.twigsleaves.pants"), - // shoulders - (0.40, "common.items.armor.druid.shoulder"), - (0.20, "common.items.armor.twigs.shoulder"), - (0.20, "common.items.armor.twigsflowers.shoulder"), - (0.20, "common.items.armor.twigsleaves.shoulder"), - //gloves - (0.40, "common.items.armor.druid.hand"), - (0.20, "common.items.armor.twigs.hand"), - (0.20, "common.items.armor.twigsflowers.hand"), - (0.20, "common.items.armor.twigsleaves.hand"), -] \ 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 deleted file mode 100644 index 2a8142e807..0000000000 --- a/assets/common/loot_tables/loot_table_cave_large.ron +++ /dev/null @@ -1,91 +0,0 @@ -[ - // Misc - (0.25, "common.items.armor.misc.neck.plain_1"), - (2.0, "common.items.crafting_ing.cloth_scraps"), - (1.0, "common.items.crafting_ing.empty_vial"), - (0.1, "common.items.glider.glider_blue"), - (0.05, "common.items.glider.glider_morpho"), - (0.05, "common.items.glider.glider_monarch"), - (0.05, "common.items.glider.glider_moth"), - (0.05, "common.items.armor.misc.ring.gold"), - (0.1, "common.items.lantern.geode_purp"), - // swords - (0.03, "common.items.weapons.sword.steel-0"), - (0.03, "common.items.weapons.sword.steel-1"), - (0.03, "common.items.weapons.sword.steel-2"), - (0.03, "common.items.weapons.sword.steel-3"), - (0.03, "common.items.weapons.sword.steel-4"), - (0.03, "common.items.weapons.sword.steel-5"), - (0.03, "common.items.weapons.sword.steel-6"), - (0.03, "common.items.weapons.sword.steel-7"), - (0.03, "common.items.weapons.sword.steel-8"), - (0.02, "common.items.weapons.sword.cobalt-0"), - (0.02, "common.items.weapons.sword.cobalt-1"), - (0.02, "common.items.weapons.sword.cobalt-2"), - (0.02, "common.items.weapons.sword.cobalt-3"), - (0.01, "common.items.weapons.sword.bloodsteel-0"), - (0.01, "common.items.weapons.sword.bloodsteel-1"), - (0.01, "common.items.weapons.sword.bloodsteel-2"), - // axes - (0.02, "common.items.weapons.axe.bloodsteel_axe-0"), - (0.02, "common.items.weapons.axe.bloodsteel_axe-1"), - (0.02, "common.items.weapons.axe.bloodsteel_axe-2"), - (0.01, "common.items.weapons.axe.cobalt_axe-0"), - (0.01, "common.items.weapons.axe.cobalt_axe-1"), - (0.001, "common.items.weapons.axe.malachite_axe-0"), - (0.04, "common.items.weapons.axe.iron_axe-7"), - (0.04, "common.items.weapons.axe.iron_axe-8"), - (0.04, "common.items.weapons.axe.iron_axe-9"), - (0.04, "common.items.weapons.axe.steel_axe-0"), - (0.04, "common.items.weapons.axe.steel_axe-1"), - (0.04, "common.items.weapons.axe.steel_axe-2"), - (0.04, "common.items.weapons.axe.steel_axe-3"), - (0.04, "common.items.weapons.axe.steel_axe-4"), - (0.04, "common.items.weapons.axe.steel_axe-5"), - (0.04, "common.items.weapons.axe.steel_axe-6"), - // healing staff - (0.2, "common.items.weapons.sceptre.staff_nature"), - (0.1, "common.items.weapons.sceptre.fork0"), - (0.1, "common.items.weapons.sceptre.emerald"), - (0.1, "common.items.weapons.sceptre.coralline_cane"), - (0.001, "common.items.weapons.sceptre.sceptre_velorite_0"), - // staves - (0.20, "common.items.weapons.staff.bone_staff"), - (0.20, "common.items.weapons.staff.ley_seeker"), - (0.10, "common.items.weapons.staff.fiery_wishing_rod"), - (0.10, "common.items.weapons.staff.heated_arm"), - (0.10, "common.items.weapons.staff.golden_khakkara"), - (0.10, "common.items.weapons.staff.crimson_eye"), - (0.10, "common.items.weapons.staff.solar"), - (0.05, "common.items.weapons.staff.lava_rod"), - (0.05, "common.items.weapons.staff.dragon_tongue"), - (0.01, "common.items.weapons.staff.orc_iron"), - // hammers - (0.30, "common.items.weapons.hammer.cobalt_hammer-0"), - (0.30, "common.items.weapons.hammer.cobalt_hammer-1"), - (0.15, "common.items.weapons.hammer.runic_hammer"), - (0.15, "common.items.weapons.hammer.ramshead_hammer"), - (0.04, "common.items.weapons.hammer.iron_hammer-7"), - (0.04, "common.items.weapons.hammer.iron_hammer-8"), - (0.05, "common.items.weapons.hammer.steel_hammer-0"), - (0.05, "common.items.weapons.hammer.steel_hammer-1"), - (0.05, "common.items.weapons.hammer.steel_hammer-2"), - (0.05, "common.items.weapons.hammer.steel_hammer-3"), - (0.05, "common.items.weapons.hammer.steel_hammer-4"), - (0.05, "common.items.weapons.hammer.steel_hammer-5"), - // bows - (0.03, "common.items.weapons.bow.metal-0"), - (0.03, "common.items.weapons.bow.metal-1"), - (0.03, "common.items.weapons.bow.metal-2"), - (0.03, "common.items.weapons.bow.metal-3"), - (0.03, "common.items.weapons.bow.metal-4"), - (0.02, "common.items.weapons.bow.frostwood-0"), - (0.02, "common.items.weapons.bow.frostwood-1"), - (0.02, "common.items.weapons.bow.frostwood-2"), - (0.01, "common.items.weapons.bow.eldwood-0"), - (0.01, "common.items.weapons.bow.eldwood-1"), - (0.01, "common.items.weapons.bow.eldwood-2"), - (0.001, "common.items.weapons.bow.velorite"), - - -] diff --git a/assets/common/loot_tables/loot_table_consumables.ron b/assets/common/loot_tables/loot_table_consumables.ron deleted file mode 100644 index f4dfab8089..0000000000 --- a/assets/common/loot_tables/loot_table_consumables.ron +++ /dev/null @@ -1,14 +0,0 @@ -[ - // potions - (1, "common.items.consumable.potion_minor"), - (0.1, "common.items.consumable.potion_med"), - (0.01, "common.items.consumable.potion_big"), - // bombs - (0.6, "common.items.utility.bomb"), - (0.2, "common.items.utility.bomb_pile"), - // velorite - (1, "common.items.ore.veloritefrag"), - (0.5, "common.items.ore.velorite"), - // misc - (0.1, "common.items.utility.collar"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_crafting.ron b/assets/common/loot_tables/loot_table_crafting.ron deleted file mode 100644 index a4eb6e81aa..0000000000 --- a/assets/common/loot_tables/loot_table_crafting.ron +++ /dev/null @@ -1,13 +0,0 @@ -[ - // crafting ingredients - (2, "common.items.crafting_ing.leather_scraps"), - (4, "common.items.crafting_ing.cloth_scraps"), - (1, "common.items.crafting_ing.empty_vial"), - (0.5, "common.items.crafting_ing.amethyst"), - (0.5, "common.items.crafting_ing.topaz"), - (0.4, "common.items.crafting_ing.sapphire"), - (0.35, "common.items.crafting_ing.emerald"), - (0.25, "common.items.crafting_ing.ruby"), - (0.10, "common.items.crafting_ing.diamond"), - -] diff --git a/assets/common/loot_tables/loot_table_cultists.ron b/assets/common/loot_tables/loot_table_cultists.ron deleted file mode 100644 index b2357169b9..0000000000 --- a/assets/common/loot_tables/loot_table_cultists.ron +++ /dev/null @@ -1,227 +0,0 @@ -[ - // Food - // simple - (3, "common.items.food.cheese"), - (3, "common.items.food.apple"), - (3, "common.items.food.mushroom"), - (3, "common.items.food.coconut"), - (5, "common.items.crafting_ing.cloth_scraps"), - // crafted - (0.5, "common.items.food.apple_mushroom_curry"), - (0.5, "common.items.food.apple_stick"), - (0.5, "common.items.food.mushroom_stick"), - // Misc - (4, "common.items.crafting_ing.empty_vial"), - (0.25, "common.items.armor.misc.neck.plain_1"), - (0.1, "common.items.glider.glider_blue"), - (0.5, "common.items.utility.firework_purple"), - (0.5, "common.items.utility.bomb"), - (0.5, "common.items.armor.misc.ring.gold"), - (0.25, "common.items.armor.misc.ring.skull"), - // Heavy Armour - // belts - (0.5, "common.items.armor.plate.belt"), - (0.3, "common.items.armor.steel.belt"), - // chests - (0.5, "common.items.armor.plate.chest"), - (0.3, "common.items.armor.steel.chest"), - // shoes - (0.5, "common.items.armor.plate.foot"), - (0.3, "common.items.armor.steel.foot"), - // pants - (0.5, "common.items.armor.plate.pants"), - (0.3, "common.items.armor.steel.pants"), - // shoulders - (0.40, "common.items.armor.plate.shoulder"), - (0.37, "common.items.armor.misc.shoulder.iron_spikes"), - (0.33, "common.items.armor.steel.shoulder"), - //gloves - (0.67, "common.items.armor.plate.hand"), - (0.33, "common.items.armor.steel.hand"), - //Light Armour - // belts - (0.50, "common.items.armor.swift.belt"), - (0.50, "common.items.armor.agile.belt"), - // chests - (0.50, "common.items.armor.swift.chest"), - (0.50, "common.items.armor.agile.chest"), - // shoes - (0.50, "common.items.armor.swift.foot"), - (0.50, "common.items.armor.agile.foot"), - // pants - (0.33, "common.items.armor.swift.pants"), - (0.33, "common.items.armor.agile.pants"), - (0.33, "common.items.armor.misc.pants.hunting"), - // shoulders - (0.6, "common.items.armor.misc.shoulder.leather_strip"), - (0.4, "common.items.armor.swift.shoulder"), - (0.4, "common.items.armor.agile.shoulder"), - (0.3, "common.items.armor.misc.shoulder.leather_iron_0"), - (0.3, "common.items.armor.misc.shoulder.leather_iron_1"), - (0.3, "common.items.armor.misc.shoulder.leather_iron_2"), - (0.3, "common.items.armor.misc.shoulder.leather_iron_3"), - //gloves - (0.50, "common.items.armor.swift.hand"), - (0.50, "common.items.armor.agile.hand"), - //backpack - (0.001, "common.items.armor.misc.back.backpack"), - (0.1, "common.items.armor.misc.bag.heavy_seabag"), - // Common Weapons - // swords - (0.10, "common.items.weapons.sword.wood-0"), - (0.10, "common.items.weapons.sword.wood-1"), - (0.10, "common.items.weapons.sword.wood-2"), - (0.10, "common.items.weapons.sword.stone-0"), - (0.10, "common.items.weapons.sword.stone-1"), - (0.10, "common.items.weapons.sword.stone-2"), - (0.05, "common.items.weapons.sword.bronze-0"), - (0.05, "common.items.weapons.sword.bronze-1"), - (0.05, "common.items.weapons.sword.bronze-2"), - // axes - (0.20, "common.items.weapons.axe.orc_axe-0"), - (0.10, "common.items.weapons.axe.worn_iron_axe-0"), - (0.10, "common.items.weapons.axe.worn_iron_axe-1"), - (0.10, "common.items.weapons.axe.worn_iron_axe-2"), - (0.10, "common.items.weapons.axe.worn_iron_axe-3"), - (0.10, "common.items.weapons.axe.worn_iron_axe-4"), - // healing staff - (0.25, "common.items.weapons.sceptre.staff_nature"), - // hammers - (0.15, "common.items.weapons.hammer.flimsy_hammer"), - (0.10, "common.items.weapons.hammer.wood_hammer-0"), - (0.10, "common.items.weapons.hammer.stone_hammer-0"), - (0.10, "common.items.weapons.hammer.stone_hammer-1"), - (0.10, "common.items.weapons.hammer.stone_hammer-2"), - (0.10, "common.items.weapons.hammer.stone_hammer-3"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-0"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-1"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-2"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-3"), - // bows - (0.20, "common.items.weapons.bow.rawwood-0"), - (0.20, "common.items.weapons.bow.rawwood-1"), - (0.10, "common.items.weapons.bow.wood-0"), - (0.10, "common.items.weapons.bow.wood-1"), - (0.10, "common.items.weapons.bow.wood-2"), - (0.10, "common.items.weapons.bow.wood-3"), - (0.10, "common.items.weapons.bow.wood-4"), - (0.05, "common.items.weapons.bow.bone-0"), - (0.05, "common.items.weapons.bow.bone-1"), - (0.05, "common.items.weapons.bow.bone-2"), - (0.05, "common.items.weapons.bow.bone-3"), - // Uncommon Weapons - // swords - (0.04, "common.items.weapons.sword.iron-0"), - (0.04, "common.items.weapons.sword.iron-1"), - (0.04, "common.items.weapons.sword.iron-2"), - (0.04, "common.items.weapons.sword.iron-3"), - (0.04, "common.items.weapons.sword.iron-4"), - (0.04, "common.items.weapons.sword.iron-5"), - (0.04, "common.items.weapons.sword.iron-6"), - (0.04, "common.items.weapons.sword.iron-7"), - (0.04, "common.items.weapons.sword.iron-8"), - (0.04, "common.items.weapons.sword.iron-9"), - (0.04, "common.items.weapons.sword.iron-10"), - (0.03, "common.items.weapons.sword.steel-0"), - (0.03, "common.items.weapons.sword.steel-1"), - (0.03, "common.items.weapons.sword.steel-2"), - (0.03, "common.items.weapons.sword.steel-3"), - (0.03, "common.items.weapons.sword.steel-4"), - (0.03, "common.items.weapons.sword.steel-5"), - (0.03, "common.items.weapons.sword.steel-6"), - (0.03, "common.items.weapons.sword.steel-7"), - (0.03, "common.items.weapons.sword.steel-8"), - // axes - (0.15, "common.items.weapons.axe.bronze_axe-0"), - (0.15, "common.items.weapons.axe.bronze_axe-1"), - (0.15, "common.items.weapons.axe.bronze_axe-2"), - (0.04, "common.items.weapons.axe.iron_axe-0"), - (0.04, "common.items.weapons.axe.iron_axe-1"), - (0.04, "common.items.weapons.axe.iron_axe-2"), - (0.04, "common.items.weapons.axe.iron_axe-3"), - (0.04, "common.items.weapons.axe.iron_axe-4"), - (0.04, "common.items.weapons.axe.iron_axe-5"), - (0.04, "common.items.weapons.axe.iron_axe-6"), - (0.04, "common.items.weapons.axe.iron_axe-7"), - (0.04, "common.items.weapons.axe.iron_axe-8"), - (0.04, "common.items.weapons.axe.iron_axe-9"), - (0.04, "common.items.weapons.axe.steel_axe-0"), - (0.04, "common.items.weapons.axe.steel_axe-1"), - (0.04, "common.items.weapons.axe.steel_axe-2"), - (0.04, "common.items.weapons.axe.steel_axe-3"), - (0.04, "common.items.weapons.axe.steel_axe-4"), - (0.04, "common.items.weapons.axe.steel_axe-5"), - (0.04, "common.items.weapons.axe.steel_axe-6"), - // healing staff - (0.5, "common.items.weapons.sceptre.staff_nature"), - // staves - (0.40, "common.items.weapons.staff.bone_staff"), - (0.40, "common.items.weapons.staff.crimson_eye"), - (0.20, "common.items.weapons.staff.aurora"), - (0.20, "common.items.weapons.staff.frostwood_torch"), - // hammers - (0.15, "common.items.weapons.hammer.bronze_hammer-0"), - (0.15, "common.items.weapons.hammer.bronze_hammer-1"), - (0.04, "common.items.weapons.hammer.iron_hammer-0"), - (0.04, "common.items.weapons.hammer.iron_hammer-1"), - (0.04, "common.items.weapons.hammer.iron_hammer-2"), - (0.04, "common.items.weapons.hammer.iron_hammer-3"), - (0.04, "common.items.weapons.hammer.iron_hammer-4"), - (0.04, "common.items.weapons.hammer.iron_hammer-5"), - (0.04, "common.items.weapons.hammer.iron_hammer-6"), - (0.04, "common.items.weapons.hammer.iron_hammer-7"), - (0.04, "common.items.weapons.hammer.iron_hammer-8"), - (0.05, "common.items.weapons.hammer.steel_hammer-0"), - (0.05, "common.items.weapons.hammer.steel_hammer-1"), - (0.05, "common.items.weapons.hammer.steel_hammer-2"), - (0.05, "common.items.weapons.hammer.steel_hammer-3"), - (0.05, "common.items.weapons.hammer.steel_hammer-4"), - (0.05, "common.items.weapons.hammer.steel_hammer-5"), - // bows - (0.04, "common.items.weapons.bow.hardwood-0"), - (0.04, "common.items.weapons.bow.hardwood-1"), - (0.04, "common.items.weapons.bow.hardwood-2"), - (0.04, "common.items.weapons.bow.hardwood-3"), - (0.04, "common.items.weapons.bow.hardwood-4"), - (0.04, "common.items.weapons.bow.hardwood-5"), - (0.03, "common.items.weapons.bow.metal-0"), - (0.03, "common.items.weapons.bow.metal-1"), - (0.03, "common.items.weapons.bow.metal-2"), - (0.03, "common.items.weapons.bow.metal-3"), - (0.03, "common.items.weapons.bow.metal-4"), - // Rare Weapons - // swords - (0.20, "common.items.weapons.sword.cobalt-0"), - (0.20, "common.items.weapons.sword.cobalt-1"), - (0.20, "common.items.weapons.sword.cobalt-2"), - (0.20, "common.items.weapons.sword.cobalt-3"), - (0.10, "common.items.weapons.sword.bloodsteel-0"), - (0.10, "common.items.weapons.sword.bloodsteel-1"), - (0.10, "common.items.weapons.sword.bloodsteel-2"), - // axes - (0.20, "common.items.weapons.axe.bloodsteel_axe-0"), - (0.20, "common.items.weapons.axe.bloodsteel_axe-1"), - (0.20, "common.items.weapons.axe.bloodsteel_axe-2"), - // healing staff - (0.25, "common.items.weapons.sceptre.staff_nature"), - // staves - (0.2, "common.items.weapons.staff.infused_tower"), - (0.10, "common.items.weapons.staff.lava_rod"), - (0.10, "common.items.weapons.staff.dragon_tongue"), - (0.10, "common.items.weapons.staff.flamethrower_0"), - (0.04, "common.items.weapons.staff.bent_fuse"), - (0.04, "common.items.weapons.sceptre.emerald"), - (0.04, "common.items.weapons.staff.orc_iron"), - // hammers - (0.01, "common.items.weapons.hammer.cobalt_hammer-0"), - (0.01, "common.items.weapons.hammer.cobalt_hammer-1"), - (0.01, "common.items.weapons.hammer.runic_hammer"), - (0.1, "common.items.weapons.hammer.ramshead_hammer"), - // bows - (0.20, "common.items.weapons.bow.frostwood-0"), - (0.20, "common.items.weapons.bow.frostwood-1"), - (0.20, "common.items.weapons.bow.frostwood-2"), - (0.10, "common.items.weapons.bow.eldwood-0"), - (0.10, "common.items.weapons.bow.eldwood-1"), - (0.10, "common.items.weapons.bow.eldwood-2"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_fish.ron b/assets/common/loot_tables/loot_table_fish.ron deleted file mode 100644 index c7268289e5..0000000000 --- a/assets/common/loot_tables/loot_table_fish.ron +++ /dev/null @@ -1,3 +0,0 @@ -[ - (1, "common.items.food.fish"), -] diff --git a/assets/common/loot_tables/loot_table_food.ron b/assets/common/loot_tables/loot_table_food.ron deleted file mode 100644 index 85257308bb..0000000000 --- a/assets/common/loot_tables/loot_table_food.ron +++ /dev/null @@ -1,14 +0,0 @@ -[ - // simple - (3, "common.items.food.cheese"), - (3, "common.items.food.apple"), - (3, "common.items.food.mushroom"), - (1, "common.items.food.coconut"), - (1, "common.items.food.lettuce"), - (1, "common.items.food.tomato"), - (2, "common.items.food.carrot"), - // crafted - (0.05, "common.items.food.apple_mushroom_curry"), - (0.10, "common.items.food.apple_stick"), - (0.10, "common.items.food.mushroom_stick"), -] diff --git a/assets/common/loot_tables/loot_table_humanoids.ron b/assets/common/loot_tables/loot_table_humanoids.ron deleted file mode 100644 index cbaeadef71..0000000000 --- a/assets/common/loot_tables/loot_table_humanoids.ron +++ /dev/null @@ -1,31 +0,0 @@ -[ - // Crafting Ingredients - (2, "common.items.crafting_ing.empty_vial"), - (0.10, "common.items.crafting_ing.diamond"), - (4, "common.items.crafting_ing.cloth_scraps"), - // Consumables - (0.2, "common.items.consumable.potion_minor"), - // Ring - (0.02, "common.items.armor.misc.ring.gold"), - // Utility - (0.05, "common.items.utility.collar"), - // Food - (1, "common.items.food.coconut"), - (0.05, "common.items.food.apple_mushroom_curry"), - (0.10, "common.items.food.apple_stick"), - (0.10, "common.items.food.mushroom_stick"), - // Weapons - (0.10, "common.items.weapons.sword.wood-0"), - (0.10, "common.items.weapons.sword.wood-1"), - (0.10, "common.items.weapons.sword.wood-2"), - (0.10, "common.items.weapons.axe.worn_iron_axe-0"), - (0.10, "common.items.weapons.axe.worn_iron_axe-1"), - (0.10, "common.items.weapons.axe.worn_iron_axe-2"), - (0.10, "common.items.weapons.axe.worn_iron_axe-3"), - (0.10, "common.items.weapons.axe.worn_iron_axe-4"), - (0.25, "common.items.weapons.sceptre.staff_nature"), - (0.15, "common.items.weapons.hammer.flimsy_hammer"), - (0.10, "common.items.weapons.hammer.wood_hammer-0"), - (0.15, "common.items.weapons.bow.rawwood-0"), - (0.15, "common.items.weapons.bow.rawwood-1"), -] diff --git a/assets/common/loot_tables/loot_table_husk.ron b/assets/common/loot_tables/loot_table_husk.ron deleted file mode 100644 index eb55933d9a..0000000000 --- a/assets/common/loot_tables/loot_table_husk.ron +++ /dev/null @@ -1,3 +0,0 @@ -[ - (1, "common.items.crafting_ing.stones"), -] diff --git a/assets/common/loot_tables/loot_table_maneater.ron b/assets/common/loot_tables/loot_table_maneater.ron deleted file mode 100644 index 524a6b2030..0000000000 --- a/assets/common/loot_tables/loot_table_maneater.ron +++ /dev/null @@ -1,5 +0,0 @@ -[ - (1, "common.items.flowers.red"), - (1, "common.items.crafting_ing.twigs"), - (0.5, "common.items.food.coconut"), -] diff --git a/assets/common/loot_tables/loot_table_miniboss.ron b/assets/common/loot_tables/loot_table_miniboss.ron deleted file mode 100644 index 8c926aca5b..0000000000 --- a/assets/common/loot_tables/loot_table_miniboss.ron +++ /dev/null @@ -1,15 +0,0 @@ -[ - // armor - (1, "common.items.armor.cultist.belt"), - (1, "common.items.armor.cultist.chest"), - (1, "common.items.armor.cultist.foot"), - (1, "common.items.armor.cultist.hand"), - (1, "common.items.armor.cultist.pants"), - (1, "common.items.armor.cultist.shoulder"), - (1, "common.items.armor.misc.back.dungeon_purple"), - (1, "common.items.armor.misc.ring.skull"), - // weapons - (1, "common.items.weapons.staff.cultist_staff"), - (1, "common.items.weapons.hammer.cultist_purp_2h-0"), - (1, "common.items.weapons.sword.cultist"), -] diff --git a/assets/common/loot_tables/loot_table_raptor.ron b/assets/common/loot_tables/loot_table_raptor.ron deleted file mode 100644 index 2561842b99..0000000000 --- a/assets/common/loot_tables/loot_table_raptor.ron +++ /dev/null @@ -1,4 +0,0 @@ -[ - (2, "common.items.crafting_ing.raptor_feather"), - (1, "common.items.crafting_ing.leather_scraps"), -] diff --git a/assets/common/loot_tables/loot_table_rocks.ron b/assets/common/loot_tables/loot_table_rocks.ron deleted file mode 100644 index 83a5e7a33c..0000000000 --- a/assets/common/loot_tables/loot_table_rocks.ron +++ /dev/null @@ -1,6 +0,0 @@ -[ - (1, "common.items.crafting_ing.stones"), - (0.05, "common.items.crafting_ing.diamond"), - (0.10, "common.items.ore.velorite"), - (0.20, "common.items.ore.veloritefrag"), -] diff --git a/assets/common/loot_tables/loot_table_saurok.ron b/assets/common/loot_tables/loot_table_saurok.ron deleted file mode 100644 index 830f8dc884..0000000000 --- a/assets/common/loot_tables/loot_table_saurok.ron +++ /dev/null @@ -1,19 +0,0 @@ -[ - (2, "common.items.crafting_ing.empty_vial"), - (0.01, "common.items.crafting_ing.diamond"), - (3, "common.items.crafting_ing.cloth_scraps"), - (2, "common.items.crafting_ing.leather_scraps"), - // Consumables - (0.5, "common.items.consumable.potion_minor"), - // Ring - (0.2, "common.items.armor.misc.ring.gold"), - // Utility - (0.1, "common.items.utility.collar"), - // Bag - (0.1, "common.items.armor.misc.bag.liana_kit"), - // Food - (2.0, "common.items.food.coconut"), - (0.3, "common.items.food.apple_mushroom_curry"), - (0.6, "common.items.food.apple_stick"), - (0.8, "common.items.food.mushroom_stick"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_troll.ron b/assets/common/loot_tables/loot_table_troll.ron deleted file mode 100644 index 9c15f4cc66..0000000000 --- a/assets/common/loot_tables/loot_table_troll.ron +++ /dev/null @@ -1,4 +0,0 @@ -[ - (1, "common.items.crafting_ing.leather_troll"), - (0.25, "common.items.crafting_ing.leather_scraps"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_villager.ron b/assets/common/loot_tables/loot_table_villager.ron deleted file mode 100644 index 341a7f26d8..0000000000 --- a/assets/common/loot_tables/loot_table_villager.ron +++ /dev/null @@ -1,45 +0,0 @@ -[ - // Crafting Ingredients - (2, "common.items.crafting_ing.bowl"), - (1, "common.items.crafting_ing.empty_vial"), - (0.10, "common.items.crafting_ing.diamond"), - (1, "common.items.crafting_ing.cloth_scraps"), - // Consumables - (0.2, "common.items.consumable.potion_minor"), - // Armour - (1, "common.items.armor.misc.chest.worker_green_0"), - (1, "common.items.armor.misc.chest.worker_green_1"), - (1, "common.items.armor.misc.chest.worker_orange_0"), - (1, "common.items.armor.misc.chest.worker_orange_1"), - (1, "common.items.armor.misc.chest.worker_purple_0"), - (1, "common.items.armor.misc.chest.worker_purple_1"), - (1, "common.items.armor.misc.chest.worker_red_0"), - (1, "common.items.armor.misc.chest.worker_red_1"), - (1, "common.items.armor.misc.chest.worker_yellow_0"), - (1, "common.items.armor.misc.chest.worker_yellow_1"), - (1, "common.items.armor.misc.pants.worker_blue"), - // Utility - (0.05, "common.items.utility.collar"), - // Food - (0.5, "common.items.food.coconut"), - (0.5, "common.items.food.lettuce"), - (0.75, "common.items.food.carrot"), - (0.75, "common.items.food.tomato"), - (0.05, "common.items.food.apple_mushroom_curry"), - (0.10, "common.items.food.apple_stick"), - (0.10, "common.items.food.mushroom_stick"), - // Weapons - (0.15, "common.items.weapons.sword.wood-0"), - (0.15, "common.items.weapons.sword.wood-1"), - (0.15, "common.items.weapons.sword.wood-2"), - (0.10, "common.items.weapons.axe.worn_iron_axe-0"), - (0.10, "common.items.weapons.axe.worn_iron_axe-1"), - (0.10, "common.items.weapons.axe.worn_iron_axe-2"), - (0.10, "common.items.weapons.axe.worn_iron_axe-3"), - (0.10, "common.items.weapons.axe.worn_iron_axe-4"), - (0.25, "common.items.weapons.sceptre.staff_nature"), - (0.15, "common.items.weapons.hammer.flimsy_hammer"), - (0.10, "common.items.weapons.hammer.wood_hammer-0"), - (0.15, "common.items.weapons.bow.rawwood-0"), - (0.15, "common.items.weapons.bow.rawwood-1"), -] diff --git a/assets/common/loot_tables/loot_table_weapon_common.ron b/assets/common/loot_tables/loot_table_weapon_common.ron deleted file mode 100644 index afa2715550..0000000000 --- a/assets/common/loot_tables/loot_table_weapon_common.ron +++ /dev/null @@ -1,45 +0,0 @@ -[ - // swords - (0.15, "common.items.weapons.sword.starter"), - (0.10, "common.items.weapons.sword.wood-0"), - (0.10, "common.items.weapons.sword.wood-1"), - (0.10, "common.items.weapons.sword.wood-2"), - (0.05, "common.items.weapons.sword.stone-0"), - (0.05, "common.items.weapons.sword.stone-1"), - (0.05, "common.items.weapons.sword.stone-2"), - // axes - (0.30, "common.items.weapons.axe.starter_axe"), - (0.20, "common.items.weapons.axe.orc_axe-0"), - (0.10, "common.items.weapons.axe.worn_iron_axe-0"), - (0.10, "common.items.weapons.axe.worn_iron_axe-1"), - (0.10, "common.items.weapons.axe.worn_iron_axe-2"), - (0.10, "common.items.weapons.axe.worn_iron_axe-3"), - (0.10, "common.items.weapons.axe.worn_iron_axe-4"), - // healing staff - (0.30, "common.items.weapons.sceptre.starter_sceptre"), - (0.10, "common.items.weapons.sceptre.moon0"), - (0.10, "common.items.weapons.sceptre.druids_arbor"), - // staves - (1.00, "common.items.weapons.staff.starter_staff"), - // hammers - (0.15, "common.items.weapons.hammer.starter_hammer"), - (0.15, "common.items.weapons.hammer.flimsy_hammer"), - (0.10, "common.items.weapons.hammer.wood_hammer-0"), - (0.10, "common.items.weapons.hammer.stone_hammer-0"), - (0.10, "common.items.weapons.hammer.stone_hammer-1"), - (0.10, "common.items.weapons.hammer.stone_hammer-2"), - (0.10, "common.items.weapons.hammer.stone_hammer-3"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-0"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-1"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-2"), - (0.05, "common.items.weapons.hammer.worn_iron_hammer-3"), - // bows - (0.15, "common.items.weapons.bow.starter"), - (0.10, "common.items.weapons.bow.rawwood-0"), - (0.10, "common.items.weapons.bow.rawwood-1"), - (0.05, "common.items.weapons.bow.wood-0"), - (0.05, "common.items.weapons.bow.wood-1"), - (0.05, "common.items.weapons.bow.wood-2"), - (0.05, "common.items.weapons.bow.wood-3"), - (0.05, "common.items.weapons.bow.wood-4"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_weapon_rare.ron b/assets/common/loot_tables/loot_table_weapon_rare.ron deleted file mode 100644 index 28484be0bc..0000000000 --- a/assets/common/loot_tables/loot_table_weapon_rare.ron +++ /dev/null @@ -1,42 +0,0 @@ -[ - // swords - (0.20, "common.items.weapons.sword.cobalt-0"), - (0.20, "common.items.weapons.sword.cobalt-1"), - (0.20, "common.items.weapons.sword.cobalt-2"), - (0.20, "common.items.weapons.sword.cobalt-3"), - (0.10, "common.items.weapons.sword.bloodsteel-0"), - (0.10, "common.items.weapons.sword.bloodsteel-1"), - (0.10, "common.items.weapons.sword.bloodsteel-2"), - // axes - (0.20, "common.items.weapons.axe.bloodsteel_axe-0"), - (0.20, "common.items.weapons.axe.bloodsteel_axe-1"), - (0.20, "common.items.weapons.axe.bloodsteel_axe-2"), - (0.30, "common.items.weapons.axe.cobalt_axe-0"), - (0.30, "common.items.weapons.axe.cobalt_axe-1"), - (0.10, "common.items.weapons.axe.malachite_axe-0"), - // healing staff - (0.15, "common.items.weapons.sceptre.loops0"), - (0.10, "common.items.weapons.sceptre.fork0"), - (0.10, "common.items.weapons.sceptre.emerald"), - (0.10, "common.items.weapons.sceptre.coralline_cane"), - // staves - (1.00, "common.items.weapons.staff.crimson_eye"), - (0.7, "common.items.weapons.staff.aurora"), - (0.7, "common.items.weapons.staff.frostwood_torch"), - (0.5, "common.items.weapons.staff.lava_rod"), - (0.5, "common.items.weapons.staff.dragon_tongue"), - (0.75, "common.items.weapons.staff.infused_tower"), - (0.5, "common.items.weapons.staff.flamethrower_0"), - // hammers - (0.30, "common.items.weapons.hammer.cobalt_hammer-0"), - (0.30, "common.items.weapons.hammer.cobalt_hammer-1"), - (0.15, "common.items.weapons.hammer.runic_hammer"), - (0.15, "common.items.weapons.hammer.ramshead_hammer"), - // bows - (0.20, "common.items.weapons.bow.frostwood-0"), - (0.20, "common.items.weapons.bow.frostwood-1"), - (0.20, "common.items.weapons.bow.frostwood-2"), - (0.10, "common.items.weapons.bow.eldwood-0"), - (0.10, "common.items.weapons.bow.eldwood-1"), - (0.10, "common.items.weapons.bow.eldwood-2"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_weapon_uncommon.ron b/assets/common/loot_tables/loot_table_weapon_uncommon.ron deleted file mode 100644 index ec870786e0..0000000000 --- a/assets/common/loot_tables/loot_table_weapon_uncommon.ron +++ /dev/null @@ -1,91 +0,0 @@ -[ - // swords - (0.15, "common.items.weapons.sword.bronze-0"), - (0.15, "common.items.weapons.sword.bronze-1"), - (0.15, "common.items.weapons.sword.bronze-2"), - (0.04, "common.items.weapons.sword.iron-0"), - (0.04, "common.items.weapons.sword.iron-1"), - (0.04, "common.items.weapons.sword.iron-2"), - (0.04, "common.items.weapons.sword.iron-3"), - (0.04, "common.items.weapons.sword.iron-4"), - (0.04, "common.items.weapons.sword.iron-5"), - (0.04, "common.items.weapons.sword.iron-6"), - (0.04, "common.items.weapons.sword.iron-7"), - (0.04, "common.items.weapons.sword.iron-8"), - (0.04, "common.items.weapons.sword.iron-9"), - (0.04, "common.items.weapons.sword.iron-10"), - (0.03, "common.items.weapons.sword.steel-0"), - (0.03, "common.items.weapons.sword.steel-1"), - (0.03, "common.items.weapons.sword.steel-2"), - (0.03, "common.items.weapons.sword.steel-3"), - (0.03, "common.items.weapons.sword.steel-4"), - (0.03, "common.items.weapons.sword.steel-5"), - (0.03, "common.items.weapons.sword.steel-6"), - (0.03, "common.items.weapons.sword.steel-7"), - (0.03, "common.items.weapons.sword.steel-8"), - // axes - (0.15, "common.items.weapons.axe.bronze_axe-0"), - (0.15, "common.items.weapons.axe.bronze_axe-1"), - (0.15, "common.items.weapons.axe.bronze_axe-2"), - (0.04, "common.items.weapons.axe.iron_axe-0"), - (0.04, "common.items.weapons.axe.iron_axe-1"), - (0.04, "common.items.weapons.axe.iron_axe-2"), - (0.04, "common.items.weapons.axe.iron_axe-3"), - (0.04, "common.items.weapons.axe.iron_axe-4"), - (0.04, "common.items.weapons.axe.iron_axe-5"), - (0.04, "common.items.weapons.axe.iron_axe-6"), - (0.04, "common.items.weapons.axe.iron_axe-7"), - (0.04, "common.items.weapons.axe.iron_axe-8"), - (0.04, "common.items.weapons.axe.iron_axe-9"), - (0.04, "common.items.weapons.axe.steel_axe-0"), - (0.04, "common.items.weapons.axe.steel_axe-1"), - (0.04, "common.items.weapons.axe.steel_axe-2"), - (0.04, "common.items.weapons.axe.steel_axe-3"), - (0.04, "common.items.weapons.axe.steel_axe-4"), - (0.04, "common.items.weapons.axe.steel_axe-5"), - (0.04, "common.items.weapons.axe.steel_axe-6"), - // healing staff - (0.5, "common.items.weapons.sceptre.staff_nature"), - (0.15, "common.items.weapons.sceptre.root_green0"), - (0.25, "common.items.weapons.sceptre.totem_green"), - // staves - (1.00, "common.items.weapons.staff.bone_staff"), - (0.7, "common.items.weapons.staff.heated_arm"), - (0.7, "common.items.weapons.staff.golden_khakkara"), - (0.7, "common.items.weapons.staff.fiery_wishing_rod"), - (0.7, "common.items.weapons.staff.solar"), - // hammers - (0.15, "common.items.weapons.hammer.bronze_hammer-0"), - (0.15, "common.items.weapons.hammer.bronze_hammer-1"), - (0.04, "common.items.weapons.hammer.iron_hammer-0"), - (0.04, "common.items.weapons.hammer.iron_hammer-1"), - (0.04, "common.items.weapons.hammer.iron_hammer-2"), - (0.04, "common.items.weapons.hammer.iron_hammer-3"), - (0.04, "common.items.weapons.hammer.iron_hammer-4"), - (0.04, "common.items.weapons.hammer.iron_hammer-5"), - (0.04, "common.items.weapons.hammer.iron_hammer-6"), - (0.04, "common.items.weapons.hammer.iron_hammer-7"), - (0.04, "common.items.weapons.hammer.iron_hammer-8"), - (0.05, "common.items.weapons.hammer.steel_hammer-0"), - (0.05, "common.items.weapons.hammer.steel_hammer-1"), - (0.05, "common.items.weapons.hammer.steel_hammer-2"), - (0.05, "common.items.weapons.hammer.steel_hammer-3"), - (0.05, "common.items.weapons.hammer.steel_hammer-4"), - (0.05, "common.items.weapons.hammer.steel_hammer-5"), - // bows - (0.15, "common.items.weapons.bow.bone-0"), - (0.15, "common.items.weapons.bow.bone-1"), - (0.15, "common.items.weapons.bow.bone-2"), - (0.15, "common.items.weapons.bow.bone-3"), - (0.04, "common.items.weapons.bow.hardwood-0"), - (0.04, "common.items.weapons.bow.hardwood-1"), - (0.04, "common.items.weapons.bow.hardwood-2"), - (0.04, "common.items.weapons.bow.hardwood-3"), - (0.04, "common.items.weapons.bow.hardwood-4"), - (0.04, "common.items.weapons.bow.hardwood-5"), - (0.03, "common.items.weapons.bow.metal-0"), - (0.03, "common.items.weapons.bow.metal-1"), - (0.03, "common.items.weapons.bow.metal-2"), - (0.03, "common.items.weapons.bow.metal-3"), - (0.03, "common.items.weapons.bow.metal-4"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/loot_table_wendigo.ron b/assets/common/loot_tables/loot_table_wendigo.ron deleted file mode 100644 index cb0ef91842..0000000000 --- a/assets/common/loot_tables/loot_table_wendigo.ron +++ /dev/null @@ -1,3 +0,0 @@ -[ - (1, "common.items.crafting_ing.icy_fang"), -] \ No newline at end of file diff --git a/assets/common/loot_tables/maneater.ron b/assets/common/loot_tables/maneater.ron new file mode 100644 index 0000000000..0e7d5ff5b0 --- /dev/null +++ b/assets/common/loot_tables/maneater.ron @@ -0,0 +1,5 @@ +[ + (1.0, Item("common.items.flowers.red")), + (1.0, Item("common.items.crafting_ing.twigs")), + (0.5, Item("common.items.food.coconut")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/mindflayer.ron b/assets/common/loot_tables/mindflayer.ron index d5fb91477d..d95c23599c 100644 --- a/assets/common/loot_tables/mindflayer.ron +++ b/assets/common/loot_tables/mindflayer.ron @@ -1,17 +1,16 @@ [ // Crafting material - (2.0, "common.items.crafting_ing.mindflayer_bag_damaged"), + (2.0, Item("common.items.crafting_ing.mindflayer_bag_damaged")), // Legendary weapons - (1.0, "common.items.weapons.sword.caladbolg"), - (1.0, "common.items.weapons.axe.parashu"), - (1.0, "common.items.weapons.hammer.mjolnir"), - (1.0, "common.items.weapons.bow.sagitta"), - (0.5, "common.items.weapons.staff.phoenix"), - (0.5, "common.items.weapons.staff.laevateinn"), - (0.5, "common.items.weapons.sceptre.root_evil"), - (0.5, "common.items.weapons.sceptre.caduceus"), - + (1.0, Item("common.items.weapons.sword.caladbolg")), + (1.0, Item("common.items.weapons.axe.parashu")), + (1.0, Item("common.items.weapons.hammer.mjolnir")), + (1.0, Item("common.items.weapons.bow.sagitta")), + (0.5, Item("common.items.weapons.staff.phoenix")), + (0.5, Item("common.items.weapons.staff.laevateinn")), + (0.5, Item("common.items.weapons.sceptre.root_evil")), + (0.5, Item("common.items.weapons.sceptre.caduceus")), // Rare misc items - (0.5, "common.items.boss_drops.lantern"), - (0.5, "common.items.glider.glider_purp"), + (0.5, Item("common.items.boss_drops.lantern")), + (0.5, Item("common.items.glider.glider_purp")), ] \ No newline at end of file diff --git a/assets/common/loot_tables/miniboss.ron b/assets/common/loot_tables/miniboss.ron new file mode 100644 index 0000000000..a4ab093eba --- /dev/null +++ b/assets/common/loot_tables/miniboss.ron @@ -0,0 +1,15 @@ +[ + // armor + (1.0, Item("common.items.armor.cultist.belt")), + (1.0, Item("common.items.armor.cultist.chest")), + (1.0, Item("common.items.armor.cultist.foot")), + (1.0, Item("common.items.armor.cultist.hand")), + (1.0, Item("common.items.armor.cultist.pants")), + (1.0, Item("common.items.armor.cultist.shoulder")), + (1.0, Item("common.items.armor.misc.back.dungeon_purple")), + (1.0, Item("common.items.armor.misc.ring.skull")), + // weapons + (1.0, Item("common.items.weapons.staff.cultist_staff")), + (1.0, Item("common.items.weapons.hammer.cultist_purp_2h-0")), + (1.0, Item("common.items.weapons.sword.cultist")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/raptor.ron b/assets/common/loot_tables/raptor.ron new file mode 100644 index 0000000000..5cb6de2720 --- /dev/null +++ b/assets/common/loot_tables/raptor.ron @@ -0,0 +1,4 @@ +[ + (2.0, Item("common.items.crafting_ing.raptor_feather")), + (1.0, Item("common.items.crafting_ing.leather_scraps")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/rocks.ron b/assets/common/loot_tables/rocks.ron new file mode 100644 index 0000000000..61321fafd1 --- /dev/null +++ b/assets/common/loot_tables/rocks.ron @@ -0,0 +1,6 @@ +[ + (1.0, Item("common.items.crafting_ing.stones")), + (0.05, Item("common.items.crafting_ing.diamond")), + (0.1, Item("common.items.ore.velorite")), + (0.2, Item("common.items.ore.veloritefrag")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/saurok.ron b/assets/common/loot_tables/saurok.ron new file mode 100644 index 0000000000..d338fd6f9d --- /dev/null +++ b/assets/common/loot_tables/saurok.ron @@ -0,0 +1,19 @@ +[ + (2.0, Item("common.items.crafting_ing.empty_vial")), + (0.01, Item("common.items.crafting_ing.diamond")), + (3.0, Item("common.items.crafting_ing.cloth_scraps")), + (2.0, Item("common.items.crafting_ing.leather_scraps")), + // Consumables + (0.5, Item("common.items.consumable.potion_minor")), + // Ring + (0.2, Item("common.items.armor.misc.ring.gold")), + // Utility + (0.1, Item("common.items.utility.collar")), + // Bag + (0.1, Item("common.items.armor.misc.bag.liana_kit")), + // Food + (2.0, Item("common.items.food.coconut")), + (0.3, Item("common.items.food.apple_mushroom_curry")), + (0.6, Item("common.items.food.apple_stick")), + (0.8, Item("common.items.food.mushroom_stick")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/troll.ron b/assets/common/loot_tables/troll.ron new file mode 100644 index 0000000000..6e758cd219 --- /dev/null +++ b/assets/common/loot_tables/troll.ron @@ -0,0 +1,4 @@ +[ + (1.0, Item("common.items.crafting_ing.leather_troll")), + (0.25, Item("common.items.crafting_ing.leather_scraps")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/villager.ron b/assets/common/loot_tables/villager.ron new file mode 100644 index 0000000000..b84678fe17 --- /dev/null +++ b/assets/common/loot_tables/villager.ron @@ -0,0 +1,45 @@ +[ + // Crafting Ingredients + (2.0, Item("common.items.crafting_ing.bowl")), + (1.0, Item("common.items.crafting_ing.empty_vial")), + (0.1, Item("common.items.crafting_ing.diamond")), + (1.0, Item("common.items.crafting_ing.cloth_scraps")), + // Consumables + (0.2, Item("common.items.consumable.potion_minor")), + // Armour + (1.0, Item("common.items.armor.misc.chest.worker_green_0")), + (1.0, Item("common.items.armor.misc.chest.worker_green_1")), + (1.0, Item("common.items.armor.misc.chest.worker_orange_0")), + (1.0, Item("common.items.armor.misc.chest.worker_orange_1")), + (1.0, Item("common.items.armor.misc.chest.worker_purple_0")), + (1.0, Item("common.items.armor.misc.chest.worker_purple_1")), + (1.0, Item("common.items.armor.misc.chest.worker_red_0")), + (1.0, Item("common.items.armor.misc.chest.worker_red_1")), + (1.0, Item("common.items.armor.misc.chest.worker_yellow_0")), + (1.0, Item("common.items.armor.misc.chest.worker_yellow_1")), + (1.0, Item("common.items.armor.misc.pants.worker_blue")), + // Utility + (0.05, Item("common.items.utility.collar")), + // Food + (0.5, Item("common.items.food.coconut")), + (0.5, Item("common.items.food.lettuce")), + (0.75, Item("common.items.food.carrot")), + (0.75, Item("common.items.food.tomato")), + (0.05, Item("common.items.food.apple_mushroom_curry")), + (0.1, Item("common.items.food.apple_stick")), + (0.1, Item("common.items.food.mushroom_stick")), + // Weapons + (0.15, Item("common.items.weapons.sword.wood-0")), + (0.15, Item("common.items.weapons.sword.wood-1")), + (0.15, Item("common.items.weapons.sword.wood-2")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-0")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-1")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-2")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-3")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-4")), + (0.25, Item("common.items.weapons.sceptre.staff_nature")), + (0.15, Item("common.items.weapons.hammer.flimsy_hammer")), + (0.1, Item("common.items.weapons.hammer.wood_hammer-0")), + (0.15, Item("common.items.weapons.bow.rawwood-0")), + (0.15, Item("common.items.weapons.bow.rawwood-1")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/weapon_common.ron b/assets/common/loot_tables/weapon_common.ron new file mode 100644 index 0000000000..c30fe31cf0 --- /dev/null +++ b/assets/common/loot_tables/weapon_common.ron @@ -0,0 +1,45 @@ +[ + // swords + (0.15, Item("common.items.weapons.sword.starter")), + (0.1, Item("common.items.weapons.sword.wood-0")), + (0.1, Item("common.items.weapons.sword.wood-1")), + (0.1, Item("common.items.weapons.sword.wood-2")), + (0.05, Item("common.items.weapons.sword.stone-0")), + (0.05, Item("common.items.weapons.sword.stone-1")), + (0.05, Item("common.items.weapons.sword.stone-2")), + // axes + (0.3, Item("common.items.weapons.axe.starter_axe")), + (0.2, Item("common.items.weapons.axe.orc_axe-0")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-0")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-1")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-2")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-3")), + (0.1, Item("common.items.weapons.axe.worn_iron_axe-4")), + // healing staff + (0.3, Item("common.items.weapons.sceptre.starter_sceptre")), + (0.10, Item("common.items.weapons.sceptre.moon0")), + (0.10, Item("common.items.weapons.sceptre.druids_arbor")), + // staves + (1.0, Item("common.items.weapons.staff.starter_staff")), + // hammers + (0.15, Item("common.items.weapons.hammer.starter_hammer")), + (0.15, Item("common.items.weapons.hammer.flimsy_hammer")), + (0.1, Item("common.items.weapons.hammer.wood_hammer-0")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-0")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-1")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-2")), + (0.1, Item("common.items.weapons.hammer.stone_hammer-3")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-0")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-1")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-2")), + (0.05, Item("common.items.weapons.hammer.worn_iron_hammer-3")), + // bows + (0.15, Item("common.items.weapons.bow.starter")), + (0.1, Item("common.items.weapons.bow.rawwood-0")), + (0.1, Item("common.items.weapons.bow.rawwood-1")), + (0.05, Item("common.items.weapons.bow.wood-0")), + (0.05, Item("common.items.weapons.bow.wood-1")), + (0.05, Item("common.items.weapons.bow.wood-2")), + (0.05, Item("common.items.weapons.bow.wood-3")), + (0.05, Item("common.items.weapons.bow.wood-4")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/weapon_rare.ron b/assets/common/loot_tables/weapon_rare.ron new file mode 100644 index 0000000000..6850259597 --- /dev/null +++ b/assets/common/loot_tables/weapon_rare.ron @@ -0,0 +1,42 @@ +[ + // swords + (0.2, Item("common.items.weapons.sword.cobalt-0")), + (0.2, Item("common.items.weapons.sword.cobalt-1")), + (0.2, Item("common.items.weapons.sword.cobalt-2")), + (0.2, Item("common.items.weapons.sword.cobalt-3")), + (0.1, Item("common.items.weapons.sword.bloodsteel-0")), + (0.1, Item("common.items.weapons.sword.bloodsteel-1")), + (0.1, Item("common.items.weapons.sword.bloodsteel-2")), + // axes + (0.2, Item("common.items.weapons.axe.bloodsteel_axe-0")), + (0.2, Item("common.items.weapons.axe.bloodsteel_axe-1")), + (0.2, Item("common.items.weapons.axe.bloodsteel_axe-2")), + (0.3, Item("common.items.weapons.axe.cobalt_axe-0")), + (0.3, Item("common.items.weapons.axe.cobalt_axe-1")), + (0.1, Item("common.items.weapons.axe.malachite_axe-0")), + // healing sceptre + (0.15, Item("common.items.weapons.sceptre.loops0")), + (0.1, Item("common.items.weapons.sceptre.fork0")), + (0.10, Item("common.items.weapons.sceptre.emerald")), + (0.10, Item("common.items.weapons.sceptre.coralline_cane")), + // staves + (1.00, Item("common.items.weapons.staff.crimson_eye")), + (0.7, Item("common.items.weapons.staff.aurora")), + (0.7, Item("common.items.weapons.staff.frostwood_torch")), + (0.5, Item("common.items.weapons.staff.lava_rod")), + (0.5, Item("common.items.weapons.staff.dragon_tongue")), + (0.75, Item("common.items.weapons.staff.infused_tower")), + (0.5, Item("common.items.weapons.staff.flamethrower_0")), + // hammers + (0.3, Item("common.items.weapons.hammer.cobalt_hammer-0")), + (0.3, Item("common.items.weapons.hammer.cobalt_hammer-1")), + (0.15, Item("common.items.weapons.hammer.runic_hammer")), + (0.15, Item("common.items.weapons.hammer.ramshead_hammer")), + // bows + (0.2, Item("common.items.weapons.bow.frostwood-0")), + (0.2, Item("common.items.weapons.bow.frostwood-1")), + (0.2, Item("common.items.weapons.bow.frostwood-2")), + (0.1, Item("common.items.weapons.bow.eldwood-0")), + (0.1, Item("common.items.weapons.bow.eldwood-1")), + (0.1, Item("common.items.weapons.bow.eldwood-2")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/weapon_uncommon.ron b/assets/common/loot_tables/weapon_uncommon.ron new file mode 100644 index 0000000000..9a134d32e5 --- /dev/null +++ b/assets/common/loot_tables/weapon_uncommon.ron @@ -0,0 +1,91 @@ +[ + // swords + (0.15, Item("common.items.weapons.sword.bronze-0")), + (0.15, Item("common.items.weapons.sword.bronze-1")), + (0.15, Item("common.items.weapons.sword.bronze-2")), + (0.04, Item("common.items.weapons.sword.iron-0")), + (0.04, Item("common.items.weapons.sword.iron-1")), + (0.04, Item("common.items.weapons.sword.iron-2")), + (0.04, Item("common.items.weapons.sword.iron-3")), + (0.04, Item("common.items.weapons.sword.iron-4")), + (0.04, Item("common.items.weapons.sword.iron-5")), + (0.04, Item("common.items.weapons.sword.iron-6")), + (0.04, Item("common.items.weapons.sword.iron-7")), + (0.04, Item("common.items.weapons.sword.iron-8")), + (0.04, Item("common.items.weapons.sword.iron-9")), + (0.04, Item("common.items.weapons.sword.iron-10")), + (0.03, Item("common.items.weapons.sword.steel-0")), + (0.03, Item("common.items.weapons.sword.steel-1")), + (0.03, Item("common.items.weapons.sword.steel-2")), + (0.03, Item("common.items.weapons.sword.steel-3")), + (0.03, Item("common.items.weapons.sword.steel-4")), + (0.03, Item("common.items.weapons.sword.steel-5")), + (0.03, Item("common.items.weapons.sword.steel-6")), + (0.03, Item("common.items.weapons.sword.steel-7")), + (0.03, Item("common.items.weapons.sword.steel-8")), + // axes + (0.15, Item("common.items.weapons.axe.bronze_axe-0")), + (0.15, Item("common.items.weapons.axe.bronze_axe-1")), + (0.15, Item("common.items.weapons.axe.bronze_axe-2")), + (0.04, Item("common.items.weapons.axe.iron_axe-0")), + (0.04, Item("common.items.weapons.axe.iron_axe-1")), + (0.04, Item("common.items.weapons.axe.iron_axe-2")), + (0.04, Item("common.items.weapons.axe.iron_axe-3")), + (0.04, Item("common.items.weapons.axe.iron_axe-4")), + (0.04, Item("common.items.weapons.axe.iron_axe-5")), + (0.04, Item("common.items.weapons.axe.iron_axe-6")), + (0.04, Item("common.items.weapons.axe.iron_axe-7")), + (0.04, Item("common.items.weapons.axe.iron_axe-8")), + (0.04, Item("common.items.weapons.axe.iron_axe-9")), + (0.04, Item("common.items.weapons.axe.steel_axe-0")), + (0.04, Item("common.items.weapons.axe.steel_axe-1")), + (0.04, Item("common.items.weapons.axe.steel_axe-2")), + (0.04, Item("common.items.weapons.axe.steel_axe-3")), + (0.04, Item("common.items.weapons.axe.steel_axe-4")), + (0.04, Item("common.items.weapons.axe.steel_axe-5")), + (0.04, Item("common.items.weapons.axe.steel_axe-6")), + // healing sceptre + (0.5, Item("common.items.weapons.sceptre.staff_nature")), + (0.15, Item("common.items.weapons.sceptre.root_green0")), + (0.25, Item("common.items.weapons.sceptre.totem_green")), + // staves + (1.0, Item("common.items.weapons.staff.bone_staff")), + (0.7, Item("common.items.weapons.staff.heated_arm")), + (0.7, Item("common.items.weapons.staff.golden_khakkara")), + (0.7, Item("common.items.weapons.staff.fiery_wishing_rod")), + (0.7, Item("common.items.weapons.staff.solar")), + // hammers + (0.15, Item("common.items.weapons.hammer.bronze_hammer-0")), + (0.15, Item("common.items.weapons.hammer.bronze_hammer-1")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-0")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-1")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-2")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-3")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-4")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-5")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-6")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-7")), + (0.04, Item("common.items.weapons.hammer.iron_hammer-8")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-0")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-1")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-2")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-3")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-4")), + (0.05, Item("common.items.weapons.hammer.steel_hammer-5")), + // bows + (0.15, Item("common.items.weapons.bow.bone-0")), + (0.15, Item("common.items.weapons.bow.bone-1")), + (0.15, Item("common.items.weapons.bow.bone-2")), + (0.15, Item("common.items.weapons.bow.bone-3")), + (0.04, Item("common.items.weapons.bow.hardwood-0")), + (0.04, Item("common.items.weapons.bow.hardwood-1")), + (0.04, Item("common.items.weapons.bow.hardwood-2")), + (0.04, Item("common.items.weapons.bow.hardwood-3")), + (0.04, Item("common.items.weapons.bow.hardwood-4")), + (0.04, Item("common.items.weapons.bow.hardwood-5")), + (0.03, Item("common.items.weapons.bow.metal-0")), + (0.03, Item("common.items.weapons.bow.metal-1")), + (0.03, Item("common.items.weapons.bow.metal-2")), + (0.03, Item("common.items.weapons.bow.metal-3")), + (0.03, Item("common.items.weapons.bow.metal-4")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/wendigo.ron b/assets/common/loot_tables/wendigo.ron new file mode 100644 index 0000000000..6a47d4575b --- /dev/null +++ b/assets/common/loot_tables/wendigo.ron @@ -0,0 +1,3 @@ +[ + (1.0, Item("common.items.crafting_ing.icy_fang")), +] \ No newline at end of file diff --git a/common/src/bin/csv_export/main.rs b/common/src/bin/csv_export/main.rs index 4cccbc707d..ea3696b607 100644 --- a/common/src/bin/csv_export/main.rs +++ b/common/src/bin/csv_export/main.rs @@ -17,7 +17,7 @@ use veloren_common::{ ItemKind, }, }, - lottery::Lottery, + lottery::{Lottery, LootSpec}, }; #[derive(StructOpt)] @@ -219,11 +219,11 @@ fn all_items() -> Result<(), Box> { fn loot_table(loot_table: &str) -> Result<(), Box> { let mut wtr = csv::Writer::from_path("loot_table.csv")?; - wtr.write_record(&["Item", "Relative Chance"])?; + wtr.write_record(&["Kind", "Item", "Relative Chance"])?; let loot_table = "common.loot_tables.".to_owned() + loot_table; - let loot_table = Lottery::::load_expect(&loot_table).read(); + let loot_table = Lottery::::load_expect(&loot_table).read(); for (i, (chance, item)) in loot_table.iter().enumerate() { let chance = if let Some((next_chance, _)) = loot_table.iter().nth(i + 1) { @@ -236,7 +236,12 @@ fn loot_table(loot_table: &str) -> Result<(), Box> { .div(10_f32.powi(5)) .to_string(); - wtr.write_record(&[item, &chance])?; + let (kind, item) = match item { + LootSpec::Item(item) => ("Item", item), + LootSpec::LootTable(table) => ("LootTable", table), + }; + + wtr.write_record(&[kind, item, &chance])?; } wtr.flush()?; diff --git a/common/src/bin/csv_import/main.rs b/common/src/bin/csv_import/main.rs index ef6fd0c4da..14750b5062 100644 --- a/common/src/bin/csv_import/main.rs +++ b/common/src/bin/csv_import/main.rs @@ -6,11 +6,17 @@ use serde::Serialize; use std::{error::Error, fs::File, io::Write}; use structopt::StructOpt; -use comp::item::{ - armor::{ArmorKind, Protection}, - ItemDesc, ItemKind, ItemTag, Quality, +use veloren_common::{ + assets::ASSETS_PATH, + comp::{ + self, + item::{ + armor::{ArmorKind, Protection}, + ItemDesc, ItemKind, ItemTag, Quality, + }, + }, + lottery::LootSpec, }; -use veloren_common::{assets::ASSETS_PATH, comp}; #[derive(StructOpt)] struct Cli { @@ -372,17 +378,21 @@ fn loot_table(loot_table: &str) -> Result<(), Box> { .map(|(i, x)| (x.to_string(), i)) .collect(); - let mut items = Vec::<(f32, String)>::new(); + let mut items = Vec::<(f32, LootSpec)>::new(); for record in rdr.records() { if let Ok(ref record) = record { - let item = record.get(headers["Item"]).expect("No item"); + let item = match record.get(headers["Kind"]).expect("No loot specifier") { + "Item" => LootSpec::Item(record.get(headers["Item"]).expect("No item").to_string()), + "LootTable" => LootSpec::LootTable(record.get(headers["Item"]).expect("No loot table").to_string()), + _ => panic!("Loot specifier kind must be either \"Item\" or \"LootTable\""), + }; let chance: f32 = record .get(headers["Relative Chance"]) .expect("No chance for item in entry") .parse() .expect("Not an f32 for chance in entry"); - items.push((chance, item.to_string())); + items.push((chance, item)); } } diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index e86661dd85..ec49927469 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -13,7 +13,7 @@ use crate::{ CharacterAbility, }, effect::Effect, - lottery::Lottery, + lottery::{Lottery, LootSpec}, recipe::RecipeInput, terrain::{Block, SpriteKind}, }; @@ -601,44 +601,44 @@ impl Item { // Containers // IMPORTANT: Add any new container to `SpriteKind::is_container` SpriteKind::Chest => { - chosen = Lottery::::load_expect(match rng.gen_range(0..7) { - 0 => "common.loot_tables.loot_table_weapon_uncommon", - 1 => "common.loot_tables.loot_table_weapon_common", - 2 => "common.loot_tables.loot_table_armor_light", - 3 => "common.loot_tables.loot_table_armor_cloth", - 4 => "common.loot_tables.loot_table_armor_heavy", - _ => "common.loot_tables.loot_table_armor_misc", + chosen = Lottery::::load_expect(match rng.gen_range(0..7) { + 0 => "common.loot_tables.weapon_uncommon", + 1 => "common.loot_tables.weapon_common", + 2 => "common.loot_tables.armor_light", + 3 => "common.loot_tables.armor_cloth", + 4 => "common.loot_tables.armor_heavy", + _ => "common.loot_tables.armor_misc", }) .read(); - chosen.choose() + return Some(chosen.choose().to_item()) }, SpriteKind::ChestBurried => { - chosen = Lottery::::load_expect(match rng.gen_range(0..7) { - 1 => "common.loot_tables.loot_table_weapon_common", - 2 => "common.loot_tables.loot_table_armor_light", - 3 => "common.loot_tables.loot_table_armor_cloth", - _ => "common.loot_tables.loot_table_armor_misc", + chosen = Lottery::::load_expect(match rng.gen_range(0..7) { + 1 => "common.loot_tables.weapon_common", + 2 => "common.loot_tables.armor_light", + 3 => "common.loot_tables.armor_cloth", + _ => "common.loot_tables.armor_misc", }) .read(); - chosen.choose() + return Some(chosen.choose().to_item()) }, SpriteKind::Mud => { - chosen = Lottery::::load_expect(match rng.gen_range(0..5) { - 0 => "common.loot_tables.loot_table_crafting", - 1 => "common.loot_tables.loot_table_weapon_common", - 2 => "common.loot_tables.loot_table_armor_misc", - _ => "common.loot_tables.loot_table_rocks", + chosen = Lottery::::load_expect(match rng.gen_range(0..5) { + 0 => "common.loot_tables.crafting", + 1 => "common.loot_tables.weapon_common", + 2 => "common.loot_tables.armor_misc", + _ => "common.loot_tables.rocks", }) .read(); - chosen.choose() + return Some(chosen.choose().to_item()) }, SpriteKind::Crate => { - chosen = Lottery::::load_expect(match rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_crafting", - _ => "common.loot_tables.loot_table_food", + chosen = Lottery::::load_expect(match rng.gen_range(0..4) { + 0 => "common.loot_tables.crafting", + _ => "common.loot_tables.food", }) .read(); - chosen.choose() + return Some(chosen.choose().to_item()) }, SpriteKind::Beehive => "common.items.crafting_ing.honey", diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 8986cf0aee..a928859bc2 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -568,18 +568,19 @@ impl LoadoutBuilder { .unwrap_or_default() / 10.0; for s in backpack.slots_mut() { - if coins > 0 { - let mut coin_item = - Item::new_from_asset_expect("common.items.utility.coins"); - coin_item - .set_amount(coins) - .expect("coins should be stackable"); - *s = Some(coin_item); - coins = 0; - } else if let Some(item_id) = TradePricing::random_item(Good::Armor, armor) - { - *s = Some(Item::new_from_asset_expect(&item_id)); - } + // TODO: Re-implement later + // if coins > 0 { + // let mut coin_item = + // Item::new_from_asset_expect("common.items.utility.coins"); + // coin_item + // .set_amount(coins) + // .expect("coins should be stackable"); + // *s = Some(coin_item); + // coins = 0; + // } else if let Some(item_id) = TradePricing::random_item(Good::Armor, armor) + // { + // *s = Some(Item::new_from_asset_expect(&item_id)); + // } } let mut bag1 = Item::new_from_asset_expect( "common.items.armor.misc.bag.reliable_backpack", @@ -591,9 +592,9 @@ impl LoadoutBuilder { .unwrap_or_default() / 10.0; for i in bag1.slots_mut() { - if let Some(item_id) = TradePricing::random_item(Good::Tools, weapon) { - *i = Some(Item::new_from_asset_expect(&item_id)); - } + // if let Some(item_id) = TradePricing::random_item(Good::Tools, weapon) { + // *i = Some(Item::new_from_asset_expect(&item_id)); + // } } let mut bag2 = Item::new_from_asset_expect( "common.items.armor.misc.bag.reliable_backpack", @@ -605,11 +606,11 @@ impl LoadoutBuilder { .unwrap_or_default() / 10.0; for i in bag2.slots_mut() { - if let Some(item_id) = - TradePricing::random_item(Good::Ingredients, ingredients) - { - *i = Some(Item::new_from_asset_expect(&item_id)); - } + // if let Some(item_id) = + // TradePricing::random_item(Good::Ingredients, ingredients) + // { + // *i = Some(Item::new_from_asset_expect(&item_id)); + // } } let mut bag3 = Item::new_from_asset_expect( "common.items.armor.misc.bag.reliable_backpack", @@ -621,9 +622,9 @@ impl LoadoutBuilder { .unwrap_or_default() / 10.0; for i in bag3.slots_mut() { - if let Some(item_id) = TradePricing::random_item(Good::Food, food) { - *i = Some(Item::new_from_asset_expect(&item_id)); - } + // if let Some(item_id) = TradePricing::random_item(Good::Food, food) { + // *i = Some(Item::new_from_asset_expect(&item_id)); + // } } let mut bag4 = Item::new_from_asset_expect( "common.items.armor.misc.bag.reliable_backpack", @@ -635,9 +636,9 @@ impl LoadoutBuilder { .unwrap_or_default() / 10.0; for i in bag4.slots_mut() { - if let Some(item_id) = TradePricing::random_item(Good::Potions, potions) { - *i = Some(Item::new_from_asset_expect(&item_id)); - } + // if let Some(item_id) = TradePricing::random_item(Good::Potions, potions) { + // *i = Some(Item::new_from_asset_expect(&item_id)); + // } } LoadoutBuilder::new() .active_item(active_item) diff --git a/common/src/comp/inventory/trade_pricing.rs b/common/src/comp/inventory/trade_pricing.rs index de4953a7cc..4797009630 100644 --- a/common/src/comp/inventory/trade_pricing.rs +++ b/common/src/comp/inventory/trade_pricing.rs @@ -184,15 +184,16 @@ impl TradePricing { let mut result = TradePricing::default(); let files = TradingPriceFile::load_expect("common.item_price_calculation"); let contents = files.read(); - for i in contents.loot_tables.iter() { - if PRICING_DEBUG { - info!(?i); - } - let loot = ProbabilityFile::load_expect(&i.1); - for j in loot.read().content.iter() { - add(&mut result.get_list_by_path_mut(&j.1), &j.1, i.0 * j.0); - } - } + // TODO: Re-enable this + // for i in contents.loot_tables.iter() { + // if PRICING_DEBUG { + // info!(?i); + // } + // let loot = ProbabilityFile::load_expect(&i.1); + // for j in loot.read().content.iter() { + // add(&mut result.get_list_by_path_mut(&j.1), &j.1, i.0 * j.0); + // } + // } // Apply recipe book let book = default_recipe_book().read(); @@ -289,27 +290,28 @@ impl TradePricing { result } - fn random_item_impl(&self, good: Good, amount: f32) -> Option { - if good == Good::Coin { - Some(TradePricing::COIN_ITEM.into()) - } else { - let table = self.get_list(good); - let upper = table.len(); - let lower = table - .iter() - .enumerate() - .find(|i| i.1.1 * amount >= 1.0) - .map(|i| i.0) - .unwrap_or(upper - 1); - let index = (rand::random::() * ((upper - lower) as f32)).floor() as usize + lower; - //.gen_range(lower..upper); - table.get(index).map(|i| i.0.clone()) - } - } + // TODO: Re-enable later + // fn random_item_impl(&self, good: Good, amount: f32) -> Option { + // if good == Good::Coin { + // Some(TradePricing::COIN_ITEM.into()) + // } else { + // let table = self.get_list(good); + // let upper = table.len(); + // let lower = table + // .iter() + // .enumerate() + // .find(|i| i.1.1 * amount >= 1.0) + // .map(|i| i.0) + // .unwrap_or(upper - 1); + // let index = (rand::random::() * ((upper - lower) as f32)).floor() as usize + lower; + // //.gen_range(lower..upper); + // table.get(index).map(|i| i.0.clone()) + // } + // } - pub fn random_item(good: Good, amount: f32) -> Option { - TRADE_PRICING.random_item_impl(good, amount) - } + // pub fn random_item(good: Good, amount: f32) -> Option { + // TRADE_PRICING.random_item_impl(good, amount) + // } pub fn get_material(item: &str) -> (Good, f32) { if item == TradePricing::COIN_ITEM { diff --git a/common/src/lottery.rs b/common/src/lottery.rs index 556008d112..3976d7a986 100644 --- a/common/src/lottery.rs +++ b/common/src/lottery.rs @@ -26,9 +26,9 @@ // Cheese drop rate = 3/X = 29.6% // Coconut drop rate = 1/X = 9.85% -use crate::assets; +use crate::{assets::{self, AssetExt}, comp::Item}; use rand::prelude::*; -use serde::{de::DeserializeOwned, Deserialize}; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Deserialize)] pub struct Lottery { @@ -72,6 +72,23 @@ impl Lottery { pub fn total(&self) -> f32 { self.total } } +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub enum LootSpec { + Item(String), + LootTable(String), +} + +impl LootSpec { + pub fn to_item(&self) -> Item { + match self { + Self::Item(item) => Item::new_from_asset_expect(&item), + Self::LootTable(table) => { + Lottery::::load_expect(&table).read().choose().to_item() + }, + } + } +} + #[cfg(test)] mod tests { use super::*; @@ -79,13 +96,13 @@ mod tests { #[test] fn test_loot_table() { - let test = Lottery::::load_expect("common.loot_tables.loot_table"); + let test = Lottery::::load_expect("common.loot_tables.fallback"); - for (_, item_asset_specifier) in test.read().iter() { + for (_, to_itemifier) in test.read().iter() { assert!( - Item::new_from_asset(item_asset_specifier).is_ok(), + Item::new_from_asset(to_itemifier).is_ok(), "Invalid loot table item '{}'", - item_asset_specifier + to_itemifier ); } } diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 1cbb08b29c..350bd3bdaa 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -15,10 +15,10 @@ use common::{ chat::{KillSource, KillType}, inventory::item::MaterialStatManifest, object, Alignment, Body, CharacterState, Energy, EnergyChange, Group, Health, HealthChange, - HealthSource, Inventory, Item, Player, Poise, PoiseChange, PoiseSource, Pos, Stats, + HealthSource, Inventory, Player, Poise, PoiseChange, PoiseSource, Pos, Stats, }, event::{EventBus, ServerEvent}, - lottery::Lottery, + lottery::{Lottery, LootSpec}, outcome::Outcome, resources::Time, rtsim::RtSimEntity, @@ -343,25 +343,25 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc let old_body = state.ecs().write_storage::().remove(entity); let mut rng = rand::thread_rng(); let mut lottery = || { - Lottery::::load_expect(match old_body { + Lottery::::load_expect(match old_body { Some(common::comp::Body::Humanoid(_)) => match rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_light", - 2 => "common.loot_tables.loot_table_armor_cloth", - 3 => "common.loot_tables.loot_table_weapon_common", + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_light", + 2 => "common.loot_tables.armor_cloth", + 3 => "common.loot_tables.weapon_common", 4 => "common.loots_tables.loot_table_armor_misc", - _ => "common.loot_tables.loot_table_humanoids", + _ => "common.loot_tables.humanoids", }, Some(common::comp::Body::QuadrupedSmall(quadruped_small)) => { match quadruped_small.species { quadruped_small::Species::Dodarock => match rng.gen_range(0..6) { - 1 => "common.loot_tables.loot_table_rocks", - _ => "common.loot_tables.loot_table_rocks", + 1 => "common.loot_tables.rocks", + _ => "common.loot_tables.rocks", }, _ => match rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_food", - 2 => "common.loot_tables.loot_table_animal_parts", - _ => "common.loot_tables.loot_table_animal_parts", + 0 => "common.loot_tables.food", + 2 => "common.loot_tables.animal_parts", + _ => "common.loot_tables.animal_parts", }, } }, @@ -369,82 +369,82 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc match quadruped_medium.species { quadruped_medium::Species::Frostfang | quadruped_medium::Species::Roshwalr => { - "common.loot_tables.loot_table_animal_ice" + "common.loot_tables.animal_ice" }, _ => match rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_food", - 2 => "common.loot_tables.loot_table_animal_parts", - _ => "common.loot_tables.loot_table_animal_parts", + 0 => "common.loot_tables.food", + 2 => "common.loot_tables.animal_parts", + _ => "common.loot_tables.animal_parts", }, } }, Some(common::comp::Body::BirdMedium(_)) => match rng.gen_range(0..3) { - 0 => "common.loot_tables.loot_table_food", - _ => "common.loot_tables.loot_table", + 0 => "common.loot_tables.food", + _ => "common.loot_tables.fallback", }, - Some(common::comp::Body::FishMedium(_)) => "common.loot_tables.loot_table_fish", - Some(common::comp::Body::FishSmall(_)) => "common.loot_tables.loot_table_fish", + Some(common::comp::Body::FishMedium(_)) => "common.loot_tables.fish", + Some(common::comp::Body::FishSmall(_)) => "common.loot_tables.fish", Some(common::comp::Body::BipedLarge(biped_large)) => match biped_large.species { biped_large::Species::Wendigo => match rng.gen_range(0..7) { - 0 => "common.loot_tables.loot_table_food", - 1 => "common.loot_tables.loot_table_wendigo", - 2 => "common.loot_tables.loot_table_weapon_uncommon", - _ => "common.loot_tables.loot_table_cave_large", + 0 => "common.loot_tables.food", + 1 => "common.loot_tables.wendigo", + 2 => "common.loot_tables.weapon_uncommon", + _ => "common.loot_tables.cave_large", }, biped_large::Species::Troll => match rng.gen_range(0..10) { - 0 => "common.loot_tables.loot_table_food", - 1 => "common.loot_tables.loot_table_cave_large", - 2 => "common.loot_tables.loot_table_weapon_uncommon", - _ => "common.loot_tables.loot_table_troll", + 0 => "common.loot_tables.food", + 1 => "common.loot_tables.cave_large", + 2 => "common.loot_tables.weapon_uncommon", + _ => "common.loot_tables.troll", }, biped_large::Species::Occultsaurok | biped_large::Species::Mightysaurok - | biped_large::Species::Slysaurok => "common.loot_tables.loot_table_saurok", + | biped_large::Species::Slysaurok => "common.loot_tables.saurok", _ => match rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_food", - 1 => "common.loot_tables.loot_table_armor_nature", - _ => "common.loot_tables.loot_table_cave_large", + 0 => "common.loot_tables.food", + 1 => "common.loot_tables.armor_nature", + _ => "common.loot_tables.cave_large", }, }, Some(common::comp::Body::Golem(_)) => match rng.gen_range(0..9) { - 0 => "common.loot_tables.loot_table_food", - 2 => "common.loot_tables.loot_table_armor_light", - 3 => "common.loot_tables.loot_table_armor_heavy", - 5 => "common.loot_tables.loot_table_weapon_common", - 6 => "common.loot_tables.loot_table_weapon_uncommon", - 7 => "common.loot_tables.loot_table_weapon_rare", - _ => "common.loot_tables.loot_table", + 0 => "common.loot_tables.food", + 2 => "common.loot_tables.armor_light", + 3 => "common.loot_tables.armor_heavy", + 5 => "common.loot_tables.weapon_common", + 6 => "common.loot_tables.weapon_uncommon", + 7 => "common.loot_tables.weapon_rare", + _ => "common.loot_tables.fallback", }, Some(common::comp::Body::Theropod(theropod)) => match theropod.species { theropod::Species::Sandraptor | theropod::Species::Snowraptor | theropod::Species::Woodraptor => match rng.gen_range(0..3) { - 0 => "common.loot_tables.loot_table_raptor", - _ => "common.loot_tables.loot_table_animal_parts", + 0 => "common.loot_tables.raptor", + _ => "common.loot_tables.animal_parts", }, - _ => "common.loot_tables.loot_table_animal_parts", + _ => "common.loot_tables.animal_parts", }, - Some(common::comp::Body::Dragon(_)) => "common.loot_tables.loot_table_weapon_rare", + Some(common::comp::Body::Dragon(_)) => "common.loot_tables.weapon_rare", Some(common::comp::Body::QuadrupedLow(quadruped_low)) => { match quadruped_low.species { quadruped_low::Species::Maneater => { - "common.loot_tables.loot_table_maneater" + "common.loot_tables.maneater" }, _ => match rng.gen_range(0..3) { - 0 => "common.loot_tables.loot_table_food", - 1 => "common.loot_tables.loot_table_animal_parts", - _ => "common.loot_tables.loot_table", + 0 => "common.loot_tables.food", + 1 => "common.loot_tables.animal_parts", + _ => "common.loot_tables.fallback", }, } }, - _ => "common.loot_tables.loot_table", + _ => "common.loot_tables.fallback", }) }; let item = { let mut item_drops = state.ecs().write_storage::(); item_drops.remove(entity).map_or_else( - || Item::new_from_asset_expect(lottery().read().choose()), + || lottery().read().choose().to_item(), |item_drop| item_drop.0, ) }; diff --git a/world/src/site/dungeon/mod.rs b/world/src/site/dungeon/mod.rs index c05e5107d9..3c5c96ad91 100644 --- a/world/src/site/dungeon/mod.rs +++ b/world/src/site/dungeon/mod.rs @@ -16,7 +16,7 @@ use common::{ {self}, }, generation::{ChunkSupplement, EntityInfo}, - lottery::Lottery, + lottery::{LootSpec, Lottery}, store::{Id, Store}, terrain::{Block, BlockKind, SpriteKind, Structure, StructuresGroup, TerrainChunkSize}, vol::{BaseVol, ReadVol, RectSizedVol, RectVolSize, WriteVol}, @@ -553,52 +553,52 @@ impl Floor { // Bad let chosen = match room.difficulty { 0 => { - Lottery::::load_expect(match dynamic_rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_cloth", - _ => "common.loot_tables.loot_table_weapon_common", + Lottery::::load_expect(match dynamic_rng.gen_range(0..4) { + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_cloth", + _ => "common.loot_tables.weapon_common", }) }, 1 => { - Lottery::::load_expect(match dynamic_rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_light", - _ => "common.loot_tables.loot_table_weapon_uncommon", + Lottery::::load_expect(match dynamic_rng.gen_range(0..4) { + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_light", + _ => "common.loot_tables.weapon_uncommon", }) }, 2 => { - Lottery::::load_expect(match dynamic_rng.gen_range(0..4) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_heavy", - _ => "common.loot_tables.loot_table_weapon_rare", + Lottery::::load_expect(match dynamic_rng.gen_range(0..4) { + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_heavy", + _ => "common.loot_tables.weapon_rare", }) }, 3 => { - Lottery::::load_expect(match dynamic_rng.gen_range(0..10) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_heavy", - 2 => "common.loot_tables.loot_table_weapon_rare", - _ => "common.loot_tables.loot_table_cultists", + Lottery::::load_expect(match dynamic_rng.gen_range(0..10) { + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_heavy", + 2 => "common.loot_tables.weapon_rare", + _ => "common.loot_tables.cultists", }) }, 4 => { - Lottery::::load_expect(match dynamic_rng.gen_range(0..6) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_misc", - 2 => "common.loot_tables.loot_table_weapon_rare", - _ => "common.loot_tables.loot_table_cultists", + Lottery::::load_expect(match dynamic_rng.gen_range(0..6) { + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_misc", + 2 => "common.loot_tables.weapon_rare", + _ => "common.loot_tables.cultists", }) }, 5 => { - Lottery::::load_expect(match dynamic_rng.gen_range(0..5) { - 0 => "common.loot_tables.loot_table_humanoids", - 1 => "common.loot_tables.loot_table_armor_misc", - 2 => "common.loot_tables.loot_table_weapon_rare", - _ => "common.loot_tables.loot_table_cultists", + Lottery::::load_expect(match dynamic_rng.gen_range(0..5) { + 0 => "common.loot_tables.humanoids", + 1 => "common.loot_tables.armor_misc", + 2 => "common.loot_tables.weapon_rare", + _ => "common.loot_tables.cultists", }) }, - _ => Lottery::::load_expect( - "common.loot_tables.loot_table_armor_misc", + _ => Lottery::::load_expect( + "common.loot_tables.armor_misc", ), }; let chosen = chosen.read(); @@ -617,7 +617,7 @@ impl Floor { .with_alignment(comp::Alignment::Enemy) .with_loadout_config(loadout_builder::LoadoutConfig::CultistAcolyte) .with_skillset_config(common::skillset_builder::SkillSetConfig::CultistAcolyte) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_level(dynamic_rng.gen_range((room.difficulty as f32).powf(1.25) + 3.0..(room.difficulty as f32).powf(1.5) + 4.0).round() as u16); let entity = match room.difficulty { 0 => entity @@ -632,7 +632,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Gnarling, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( match dynamic_rng.gen_range(0..5) { 0 => { @@ -661,7 +661,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Adlet, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( match dynamic_rng.gen_range(0..5) { 0 => "common.items.npc_weapons.biped_small.adlet.adlet_bow", @@ -686,7 +686,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Sahagin, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( match dynamic_rng.gen_range(0..5) { 0 => { @@ -714,7 +714,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Haniwa, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( match dynamic_rng.gen_range(0..5) { 0 => { @@ -742,7 +742,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Myrmidon, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( match dynamic_rng.gen_range(0..5) { 0 => { @@ -767,7 +767,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Warlock, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( "common.items.weapons.staff.cultist_staff", )), @@ -783,7 +783,7 @@ impl Floor { .with_skillset_config( common::skillset_builder::SkillSetConfig::Warlord, ) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_main_tool(comp::Item::new_from_asset_expect( match dynamic_rng.gen_range(0..5) { 0 => "common.items.weapons.axe.malachite_axe-0", @@ -818,29 +818,29 @@ impl Floor { if tile_pos == boss_spawn_tile && tile_wcenter.xy() == wpos2d { let chosen = match room.difficulty { - 0 => Lottery::::load_expect( - "common.loot_tables.loot_table_weapon_uncommon", + 0 => Lottery::::load_expect( + "common.loot_tables.weapon_uncommon", ), - 1 => Lottery::::load_expect( - "common.loot_tables.loot_table_weapon_uncommon", + 1 => Lottery::::load_expect( + "common.loot_tables.weapon_uncommon", ), - 2 => Lottery::::load_expect( - "common.loot_tables.loot_table_armor_heavy", + 2 => Lottery::::load_expect( + "common.loot_tables.armor_heavy", ), - 3 => Lottery::::load_expect( - "common.loot_tables.loot_table_weapon_rare", + 3 => Lottery::::load_expect( + "common.loot_tables.weapon_rare", ), - 4 => Lottery::::load_expect( - "common.loot_tables.loot_table_miniboss", + 4 => Lottery::::load_expect( + "common.loot_tables.miniboss", ), - 5 => Lottery::::load_expect( + 5 => Lottery::::load_expect( match dynamic_rng.gen_range(0..3) { 0 => "common.loot_tables.mindflayer", - _ => "common.loot_tables.loot_table_miniboss", + _ => "common.loot_tables.miniboss", }, ), - _ => Lottery::::load_expect( - "common.loot_tables.loot_table_armor_misc", + _ => Lottery::::load_expect( + "common.loot_tables.armor_misc", ), }; let chosen = chosen.read(); @@ -855,7 +855,7 @@ impl Floor { ), )) .with_name("Harvester".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 1 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -866,7 +866,7 @@ impl Floor { ), )) .with_name("Yeti".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 2 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -877,7 +877,7 @@ impl Floor { ), )) .with_name("Tidal Warrior".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 3 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -888,7 +888,7 @@ impl Floor { ), )) .with_name("Clay Golem".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 4 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -899,7 +899,7 @@ impl Floor { ), )) .with_name("Minotaur".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 5 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -910,7 +910,7 @@ impl Floor { ), )) .with_name("Mindflayer".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_skillset_config( common::skillset_builder::SkillSetConfig::Mindflayer, ), @@ -961,26 +961,26 @@ impl Floor { if tile_pos == miniboss_spawn_tile && tile_wcenter.xy() == wpos2d { let chosen = match room.difficulty { - 0 => Lottery::::load_expect( - "common.loot_tables.loot_table_animal_parts", + 0 => Lottery::::load_expect( + "common.loot_tables.animal_parts", ), - 1 => Lottery::::load_expect( - "common.loot_tables.loot_table_animal_parts", + 1 => Lottery::::load_expect( + "common.loot_tables.animal_parts", ), - 2 => Lottery::::load_expect( - "common.loot_tables.loot_table_animal_parts", + 2 => Lottery::::load_expect( + "common.loot_tables.animal_parts", ), - 3 => Lottery::::load_expect( - "common.loot_tables.loot_table_weapon_rare", + 3 => Lottery::::load_expect( + "common.loot_tables.weapon_rare", ), - 4 => Lottery::::load_expect( - "common.loot_tables.loot_table_weapon_rare", + 4 => Lottery::::load_expect( + "common.loot_tables.weapon_rare", ), - 5 => Lottery::::load_expect( - "common.loot_tables.loot_table_husk", + 5 => Lottery::::load_expect( + "common.loot_tables.husk", ), - _ => Lottery::::load_expect( - "common.loot_tables.loot_table_armor_misc", + _ => Lottery::::load_expect( + "common.loot_tables.armor_misc", ), }; let chosen = chosen.read(); @@ -995,7 +995,7 @@ impl Floor { ), )) .with_name("Bonerattler".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 1 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -1006,9 +1006,7 @@ impl Floor { ) )) .with_name("Bonerattler".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect( - chosen - )); + .with_loot_drop(chosen.to_item()); 3 ], 2 => { @@ -1022,7 +1020,7 @@ impl Floor { ), )) .with_name("Hakulaq".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) }); entities }, @@ -1032,7 +1030,7 @@ impl Floor { comp::humanoid::Body::random(), )) .with_name("Animal Trainer".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)) + .with_loot_drop(chosen.to_item()) .with_loadout_config(loadout_builder::LoadoutConfig::CultistAcolyte) .with_skillset_config( common::skillset_builder::SkillSetConfig::CultistAcolyte @@ -1056,7 +1054,7 @@ impl Floor { ), )) .with_name("Tamed Darkhound".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), EntityInfo::at(tile_wcenter.map(|e| e as f32)) .with_body(comp::Body::QuadrupedMedium( comp::quadruped_medium::Body::random_with( @@ -1065,7 +1063,7 @@ impl Floor { ), )) .with_name("Tamed Darkhound".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 4 => vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -1076,7 +1074,7 @@ impl Floor { ), )) .with_name("Dullahan Guard".to_string()) - .with_loot_drop(comp::Item::new_from_asset_expect(chosen)), + .with_loot_drop(chosen.to_item()), ], 5 => { let mut entities = Vec::new();