From 5201de71922e6b29fd56f3a995380ff3fa36b4b3 Mon Sep 17 00:00:00 2001 From: juliancoffee Date: Fri, 21 May 2021 11:20:37 +0300 Subject: [PATCH] Fixing loot tables - Use quad_low and quad_medium loot table for corresponding mobs in dungeons - Remove cultist loot table from T3-T4 loot tables - Use resize instead of vec[obj; len] to create different loot and not duplicated for miniboss_1 --- .../loot_tables/dungeon/tier-3/enemy.ron | 3 +-- .../loot_tables/dungeon/tier-4/enemy.ron | 4 ++-- world/src/site/dungeon/mod.rs | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/assets/common/loot_tables/dungeon/tier-3/enemy.ron b/assets/common/loot_tables/dungeon/tier-3/enemy.ron index e7c466dfa9..0efcda9998 100644 --- a/assets/common/loot_tables/dungeon/tier-3/enemy.ron +++ b/assets/common/loot_tables/dungeon/tier-3/enemy.ron @@ -2,5 +2,4 @@ (1.0, LootTable("common.loot_tables.humanoids")), (1.0, LootTable("common.loot_tables.armor.steel")), (1.0, LootTable("common.loot_tables.weapons.tier-3")), - (3.0, LootTable("common.loot_tables.cultists")), -] \ No newline at end of file +] diff --git a/assets/common/loot_tables/dungeon/tier-4/enemy.ron b/assets/common/loot_tables/dungeon/tier-4/enemy.ron index 95c6ccb8dd..696bef6900 100644 --- a/assets/common/loot_tables/dungeon/tier-4/enemy.ron +++ b/assets/common/loot_tables/dungeon/tier-4/enemy.ron @@ -1,5 +1,5 @@ [ (1.0, LootTable("common.loot_tables.humanoids")), + (1.0, LootTable("common.loot_tables.armor.steel")), (1.0, LootTable("common.loot_tables.weapons.tier-4")), - (5.0, LootTable("common.loot_tables.cultists")), -] \ No newline at end of file +] diff --git a/world/src/site/dungeon/mod.rs b/world/src/site/dungeon/mod.rs index 42b9903e7a..21b1129426 100644 --- a/world/src/site/dungeon/mod.rs +++ b/world/src/site/dungeon/mod.rs @@ -1220,7 +1220,7 @@ fn boss_fallback(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3) -> Vec) -> Vec { - let chosen = Lottery::::load_expect("common.loot_tables.weapons.tier-0"); + let chosen = Lottery::::load_expect("common.loot_tables.creature.quad_medium.default"); vec![ EntityInfo::at(tile_wcenter.map(|e| e as f32)) .with_body(comp::Body::QuadrupedMedium( @@ -1235,8 +1235,9 @@ fn mini_boss_0(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3) -> Vec) -> Vec { - let chosen = Lottery::::load_expect("common.loot_tables.weapons.tier-1"); - vec![ + let chosen = Lottery::::load_expect("common.loot_tables.creature.quad_medium.default"); + let mut entities = Vec::new(); + entities.resize_with(3, || { EntityInfo::at(tile_wcenter.map(|e| e as f32)) .with_body(comp::Body::QuadrupedMedium( comp::quadruped_medium::Body::random_with( @@ -1245,13 +1246,13 @@ fn mini_boss_1(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3) -> Vec) -> Vec { - let chosen = Lottery::::load_expect("common.loot_tables.weapons.tier-2"); + let chosen = Lottery::::load_expect("common.loot_tables.creature.quad_low.default"); let mut entities = Vec::new(); entities.resize_with(6, || { EntityInfo::at(tile_wcenter.map(|e| e as f32)) @@ -1268,9 +1269,9 @@ fn mini_boss_2(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3) -> Vec) -> Vec { - let chosen = Lottery::::load_expect("common.loot_tables.weapons.tier-3"); + let chosen = Lottery::::load_expect("common.loot_tables.creature.quad_low.default"); let mut entities = Vec::new(); - entities.resize_with(6, || { + entities.resize_with(8, || { EntityInfo::at(tile_wcenter.map(|e| e as f32)) .with_body(comp::Body::QuadrupedLow( comp::quadruped_low::Body::random_with(