From 0a29d93164b79bb55b9e55364795520b8ef58c45 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 30 Mar 2021 16:06:53 -0400 Subject: [PATCH] Converted all armor in loot tables to reference armor set loot tables. --- assets/common/item_price_calculation.ron | 6 +-- assets/common/loot_tables/armor/agile.ron | 9 +++++ .../common/loot_tables/armor/armor_cloth.ron | 38 ------------------- .../common/loot_tables/armor/armor_heavy.ron | 21 ---------- .../common/loot_tables/armor/armor_light.ron | 27 ------------- .../common/loot_tables/armor/armor_misc.ron | 12 ------ .../common/loot_tables/armor/armor_nature.ron | 32 ---------------- assets/common/loot_tables/armor/cloth.ron | 34 +++++++++++++++++ assets/common/loot_tables/armor/cultist.ron | 8 ++++ assets/common/loot_tables/armor/druid.ron | 8 ++++ assets/common/loot_tables/armor/plate.ron | 8 ++++ assets/common/loot_tables/armor/steel.ron | 8 ++++ assets/common/loot_tables/armor/swift.ron | 8 ++++ assets/common/loot_tables/armor/twigs.ron | 8 ++++ .../common/loot_tables/armor/twigsflowers.ron | 8 ++++ .../common/loot_tables/armor/twigsleaves.ron | 8 ++++ assets/common/loot_tables/cultists.ron | 35 ++--------------- assets/common/loot_tables/miniboss.ron | 7 +--- common/src/comp/inventory/item/mod.rs | 16 ++++---- server/src/events/entity_manipulation.rs | 24 ++++++------ world/src/site/dungeon/mod.rs | 33 ++++++++-------- 21 files changed, 149 insertions(+), 209 deletions(-) create mode 100644 assets/common/loot_tables/armor/agile.ron delete mode 100644 assets/common/loot_tables/armor/armor_cloth.ron delete mode 100644 assets/common/loot_tables/armor/armor_heavy.ron delete mode 100644 assets/common/loot_tables/armor/armor_light.ron delete mode 100644 assets/common/loot_tables/armor/armor_misc.ron delete mode 100644 assets/common/loot_tables/armor/armor_nature.ron create mode 100644 assets/common/loot_tables/armor/cloth.ron create mode 100644 assets/common/loot_tables/armor/cultist.ron create mode 100644 assets/common/loot_tables/armor/druid.ron create mode 100644 assets/common/loot_tables/armor/plate.ron create mode 100644 assets/common/loot_tables/armor/steel.ron create mode 100644 assets/common/loot_tables/armor/swift.ron create mode 100644 assets/common/loot_tables/armor/twigs.ron create mode 100644 assets/common/loot_tables/armor/twigsflowers.ron create mode 100644 assets/common/loot_tables/armor/twigsleaves.ron diff --git a/assets/common/item_price_calculation.ron b/assets/common/item_price_calculation.ron index 6f071e774d..d181a8d158 100644 --- a/assets/common/item_price_calculation.ron +++ b/assets/common/item_price_calculation.ron @@ -3,11 +3,7 @@ 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 (4,"common.loot_tables.wild_animal"), - (1,"common.loot_tables.armor.armor_cloth"), - (0.01,"common.loot_tables.armor.armor_heavy"), - (0.1,"common.loot_tables.armor.armor_light"), - (0.1,"common.loot_tables.armor.armor_misc"), - (0.5,"common.loot_tables.armor.armor_nature"), + (1,"common.loot_tables.armor.cloth"), (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 diff --git a/assets/common/loot_tables/armor/agile.ron b/assets/common/loot_tables/armor/agile.ron new file mode 100644 index 0000000000..1cd2150a6c --- /dev/null +++ b/assets/common/loot_tables/armor/agile.ron @@ -0,0 +1,9 @@ +[ + (1.0, Item("common.items.armor.agile.back")), + (1.0, Item("common.items.armor.agile.belt")), + (1.0, Item("common.items.armor.agile.chest")), + (1.0, Item("common.items.armor.agile.foot")), + (1.0, Item("common.items.armor.agile.hand")), + (1.0, Item("common.items.armor.agile.pants")), + (1.0, Item("common.items.armor.agile.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/armor_cloth.ron b/assets/common/loot_tables/armor/armor_cloth.ron deleted file mode 100644 index dce00687c7..0000000000 --- a/assets/common/loot_tables/armor/armor_cloth.ron +++ /dev/null @@ -1,38 +0,0 @@ -[ - // 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/armor_heavy.ron b/assets/common/loot_tables/armor/armor_heavy.ron deleted file mode 100644 index 20b8d601f4..0000000000 --- a/assets/common/loot_tables/armor/armor_heavy.ron +++ /dev/null @@ -1,21 +0,0 @@ -[ - // 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/armor_light.ron b/assets/common/loot_tables/armor/armor_light.ron deleted file mode 100644 index 77f29476b8..0000000000 --- a/assets/common/loot_tables/armor/armor_light.ron +++ /dev/null @@ -1,27 +0,0 @@ -[ - // 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/armor_misc.ron b/assets/common/loot_tables/armor/armor_misc.ron deleted file mode 100644 index 95d602e405..0000000000 --- a/assets/common/loot_tables/armor/armor_misc.ron +++ /dev/null @@ -1,12 +0,0 @@ -[ - // 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/armor_nature.ron b/assets/common/loot_tables/armor/armor_nature.ron deleted file mode 100644 index f95a29302a..0000000000 --- a/assets/common/loot_tables/armor/armor_nature.ron +++ /dev/null @@ -1,32 +0,0 @@ -[ - // 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/armor/cloth.ron b/assets/common/loot_tables/armor/cloth.ron new file mode 100644 index 0000000000..76265a4eb1 --- /dev/null +++ b/assets/common/loot_tables/armor/cloth.ron @@ -0,0 +1,34 @@ +[ + (1.0, Item("common.items.armor.cloth_purple.belt")), + (1.0, Item("common.items.armor.cloth_purple.chest")), + (1.0, Item("common.items.armor.cloth_purple.foot")), + (1.0, Item("common.items.armor.cloth_purple.hand")), + (1.0, Item("common.items.armor.cloth_purple.pants")), + (1.0, Item("common.items.armor.cloth_purple.shoulder")), + (1.0, Item("common.items.armor.cloth_green.belt")), + (1.0, Item("common.items.armor.cloth_green.chest")), + (1.0, Item("common.items.armor.cloth_green.foot")), + (1.0, Item("common.items.armor.cloth_green.hand")), + (1.0, Item("common.items.armor.cloth_green.pants")), + (1.0, Item("common.items.armor.cloth_green.shoulder")), + (1.0, Item("common.items.armor.cloth_blue.belt")), + (1.0, Item("common.items.armor.cloth_blue.chest")), + (1.0, Item("common.items.armor.cloth_blue.foot")), + (1.0, Item("common.items.armor.cloth_blue.hand")), + (1.0, Item("common.items.armor.cloth_blue.pants")), + (1.0, Item("common.items.armor.cloth_blue.shoulder_0")), + (1.0, Item("common.items.armor.cloth_blue.shoulder_1")), + (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_purple_brown")), + (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")), + (1.0, Item("common.items.armor.misc.pants.worker_brown")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/cultist.ron b/assets/common/loot_tables/armor/cultist.ron new file mode 100644 index 0000000000..8b4cc7cb56 --- /dev/null +++ b/assets/common/loot_tables/armor/cultist.ron @@ -0,0 +1,8 @@ +[ + (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")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/druid.ron b/assets/common/loot_tables/armor/druid.ron new file mode 100644 index 0000000000..13b73adcde --- /dev/null +++ b/assets/common/loot_tables/armor/druid.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.druid.belt")), + (1.0, Item("common.items.armor.druid.chest")), + (1.0, Item("common.items.armor.druid.foot")), + (1.0, Item("common.items.armor.druid.hand")), + (1.0, Item("common.items.armor.druid.pants")), + (1.0, Item("common.items.armor.druid.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/plate.ron b/assets/common/loot_tables/armor/plate.ron new file mode 100644 index 0000000000..e7ba66a81b --- /dev/null +++ b/assets/common/loot_tables/armor/plate.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.plate.belt")), + (1.0, Item("common.items.armor.plate.chest")), + (1.0, Item("common.items.armor.plate.foot")), + (1.0, Item("common.items.armor.plate.hand")), + (1.0, Item("common.items.armor.plate.pants")), + (1.0, Item("common.items.armor.plate.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/steel.ron b/assets/common/loot_tables/armor/steel.ron new file mode 100644 index 0000000000..b189ec8186 --- /dev/null +++ b/assets/common/loot_tables/armor/steel.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.steel.belt")), + (1.0, Item("common.items.armor.steel.chest")), + (1.0, Item("common.items.armor.steel.foot")), + (1.0, Item("common.items.armor.steel.hand")), + (1.0, Item("common.items.armor.steel.pants")), + (1.0, Item("common.items.armor.steel.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/swift.ron b/assets/common/loot_tables/armor/swift.ron new file mode 100644 index 0000000000..8d1bb0d7ea --- /dev/null +++ b/assets/common/loot_tables/armor/swift.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.swift.belt")), + (1.0, Item("common.items.armor.swift.chest")), + (1.0, Item("common.items.armor.swift.foot")), + (1.0, Item("common.items.armor.swift.hand")), + (1.0, Item("common.items.armor.swift.pants")), + (1.0, Item("common.items.armor.swift.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/twigs.ron b/assets/common/loot_tables/armor/twigs.ron new file mode 100644 index 0000000000..c8dc254ba2 --- /dev/null +++ b/assets/common/loot_tables/armor/twigs.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.twigs.belt")), + (1.0, Item("common.items.armor.twigs.chest")), + (1.0, Item("common.items.armor.twigs.foot")), + (1.0, Item("common.items.armor.twigs.hand")), + (1.0, Item("common.items.armor.twigs.pants")), + (1.0, Item("common.items.armor.twigs.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/twigsflowers.ron b/assets/common/loot_tables/armor/twigsflowers.ron new file mode 100644 index 0000000000..e62be86dfa --- /dev/null +++ b/assets/common/loot_tables/armor/twigsflowers.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.twigsflowers.belt")), + (1.0, Item("common.items.armor.twigsflowers.chest")), + (1.0, Item("common.items.armor.twigsflowers.foot")), + (1.0, Item("common.items.armor.twigsflowers.hand")), + (1.0, Item("common.items.armor.twigsflowers.pants")), + (1.0, Item("common.items.armor.twigsflowers.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/armor/twigsleaves.ron b/assets/common/loot_tables/armor/twigsleaves.ron new file mode 100644 index 0000000000..0e109d00ba --- /dev/null +++ b/assets/common/loot_tables/armor/twigsleaves.ron @@ -0,0 +1,8 @@ +[ + (1.0, Item("common.items.armor.twigsleaves.belt")), + (1.0, Item("common.items.armor.twigsleaves.chest")), + (1.0, Item("common.items.armor.twigsleaves.foot")), + (1.0, Item("common.items.armor.twigsleaves.hand")), + (1.0, Item("common.items.armor.twigsleaves.pants")), + (1.0, Item("common.items.armor.twigsleaves.shoulder")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/cultists.ron b/assets/common/loot_tables/cultists.ron index fe76e4b3d3..521a6ffbda 100644 --- a/assets/common/loot_tables/cultists.ron +++ b/assets/common/loot_tables/cultists.ron @@ -14,37 +14,10 @@ (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")), + (2.0, LootTable("common.loot_tables.armor.swift")), + (2.0, LootTable("common.loot_tables.armor.agile")), + (3.0, LootTable("common.loot_tables.armor.plate")), + (2.0, LootTable("common.loot_tables.armor.steel")), (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")), diff --git a/assets/common/loot_tables/miniboss.ron b/assets/common/loot_tables/miniboss.ron index a4ab093eba..14f6453f3c 100644 --- a/assets/common/loot_tables/miniboss.ron +++ b/assets/common/loot_tables/miniboss.ron @@ -1,11 +1,6 @@ [ // 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")), + (6.0, LootTable("common.loot_tables.armor.cultist")), (1.0, Item("common.items.armor.misc.back.dungeon_purple")), (1.0, Item("common.items.armor.misc.ring.skull")), // weapons diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 44ba29a281..ed0739fdd7 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -604,10 +604,10 @@ impl Item { 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.armor_light", - 3 => "common.loot_tables.armor.armor_cloth", - 4 => "common.loot_tables.armor.armor_heavy", - _ => "common.loot_tables.armor.armor_misc", + 2 => "common.loot_tables.armor.swift", + 3 => "common.loot_tables.armor.cloth", + 4 => "common.loot_tables.armor.plate", + _ => "common.loot_tables.fallback", }) .read(); return Some(chosen.choose().to_item(None)); @@ -615,9 +615,9 @@ impl Item { SpriteKind::ChestBurried => { chosen = Lottery::::load_expect(match rng.gen_range(0..7) { 1 => "common.loot_tables.weapon_common", - 2 => "common.loot_tables.armor.armor_light", - 3 => "common.loot_tables.armor.armor_cloth", - _ => "common.loot_tables.armor.armor_misc", + 2 => "common.loot_tables.armor.swift", + 3 => "common.loot_tables.armor.cloth", + _ => "common.loot_tables.fallback", }) .read(); return Some(chosen.choose().to_item(None)); @@ -626,7 +626,7 @@ impl Item { 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.armor_misc", + 2 => "common.loot_tables.fallback", _ => "common.loot_tables.rocks", }) .read(); diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 697a6db940..ffed52ea76 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -341,13 +341,13 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc let mut rng = rand::thread_rng(); let mut lottery = || { Lottery::::load_expect(match old_body { - Some(common::comp::Body::Humanoid(_)) => match rng.gen_range(0..4) { + Some(common::comp::Body::Humanoid(_)) => match rng.gen_range(0..5) { 0 => "common.loot_tables.humanoids", - 1 => "common.loot_tables.armor.armor_light", - 2 => "common.loot_tables.armor.armor_cloth", + 1 => "common.loot_tables.armor.swift", + 2 => "common.loot_tables.armor.cloth", 3 => "common.loot_tables.weapon_common", - 4 => "common.loots_tables.loot_table_armor_misc", - _ => "common.loot_tables.humanoids", + 4 => "common.loot_tables.humanoids", + _ => "common.loots_tables.fallback", }, Some(common::comp::Body::QuadrupedSmall(quadruped_small)) => { match quadruped_small.species { @@ -388,19 +388,17 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc biped_large::Species::Occultsaurok | biped_large::Species::Mightysaurok | biped_large::Species::Slysaurok => "common.loot_tables.saurok", - _ => match rng.gen_range(0..4) { + _ => match rng.gen_range(0..3) { 0 => "common.loot_tables.food", - 1 => "common.loot_tables.armor.armor_nature", _ => "common.loot_tables.cave_large", }, }, - Some(common::comp::Body::Golem(_)) => match rng.gen_range(0..9) { + Some(common::comp::Body::Golem(_)) => match rng.gen_range(0..5) { 0 => "common.loot_tables.food", - 2 => "common.loot_tables.armor.armor_light", - 3 => "common.loot_tables.armor.armor_heavy", - 5 => "common.loot_tables.weapon_common", - 6 => "common.loot_tables.weapon_uncommon", - 7 => "common.loot_tables.weapon_rare", + 1 => "common.loot_tables.armor.steel", + 2 => "common.loot_tables.weapon_common", + 3 => "common.loot_tables.weapon_uncommon", + 4 => "common.loot_tables.weapon_rare", _ => "common.loot_tables.fallback", }, Some(common::comp::Body::Theropod(_)) => "common.loot_tables.wild_animal", diff --git a/world/src/site/dungeon/mod.rs b/world/src/site/dungeon/mod.rs index 6561f6e6d2..0b26e2a48e 100644 --- a/world/src/site/dungeon/mod.rs +++ b/world/src/site/dungeon/mod.rs @@ -555,28 +555,28 @@ impl Floor { 0 => Lottery::::load_expect( match dynamic_rng.gen_range(0..4) { 0 => "common.loot_tables.humanoids", - 1 => "common.loot_tables.armor.armor_cloth", + 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.humanoids", - 1 => "common.loot_tables.armor.armor_light", + 1 => "common.loot_tables.armor.swift", _ => "common.loot_tables.weapon_uncommon", }, ), 2 => Lottery::::load_expect( match dynamic_rng.gen_range(0..4) { 0 => "common.loot_tables.humanoids", - 1 => "common.loot_tables.armor.armor_heavy", + 1 => "common.loot_tables.armor.plate", _ => "common.loot_tables.weapon_rare", }, ), 3 => Lottery::::load_expect( match dynamic_rng.gen_range(0..10) { 0 => "common.loot_tables.humanoids", - 1 => "common.loot_tables.armor.armor_heavy", + 1 => "common.loot_tables.armor.steel", 2 => "common.loot_tables.weapon_rare", _ => "common.loot_tables.cultists", }, @@ -584,7 +584,7 @@ impl Floor { 4 => Lottery::::load_expect( match dynamic_rng.gen_range(0..6) { 0 => "common.loot_tables.humanoids", - 1 => "common.loot_tables.armor.armor_misc", + 1 => "common.loot_tables.fallback", 2 => "common.loot_tables.weapon_rare", _ => "common.loot_tables.cultists", }, @@ -592,14 +592,12 @@ impl Floor { 5 => Lottery::::load_expect( match dynamic_rng.gen_range(0..5) { 0 => "common.loot_tables.humanoids", - 1 => "common.loot_tables.armor.armor_misc", + 1 => "common.loot_tables.fallback", 2 => "common.loot_tables.weapon_rare", _ => "common.loot_tables.cultists", }, ), - _ => Lottery::::load_expect( - "common.loot_tables.armor.armor_misc", - ), + _ => Lottery::::load_expect("common.loot_tables.fallback"), }; let chosen = chosen.read(); let chosen = chosen.choose(); @@ -846,7 +844,10 @@ impl Floor { "common.loot_tables.weapon_uncommon", ), 2 => Lottery::::load_expect( - "common.loot_tables.armor.armor_heavy", + match dynamic_rng.gen_range(0..3) { + 0 => "common.loot_tables.armor.steel", + _ => "common.loot_tables.armor.plate", + }, ), 3 => Lottery::::load_expect( "common.loot_tables.weapon_rare", @@ -860,9 +861,9 @@ impl Floor { _ => "common.loot_tables.miniboss", }, ), - _ => Lottery::::load_expect( - "common.loot_tables.armor.armor_misc", - ), + _ => { + Lottery::::load_expect("common.loot_tables.fallback") + }, }; let chosen = chosen.read(); let chosen = chosen.choose(); @@ -1014,9 +1015,9 @@ impl Floor { "common.loot_tables.weapon_rare", ), 5 => Lottery::::load_expect("common.loot_tables.husk"), - _ => Lottery::::load_expect( - "common.loot_tables.armor.armor_misc", - ), + _ => { + Lottery::::load_expect("common.loot_tables.fallback") + }, }; let chosen = chosen.read(); let chosen = chosen.choose();