From 9ad5b0f6b7524aea134f76ac5c6393791718f7f7 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 1 Apr 2021 21:26:35 -0400 Subject: [PATCH] Changelog. Fixed a few qualities. --- CHANGELOG.md | 2 ++ assets/common/items/weapons/sceptre/moon0.ron | 2 +- .../items/weapons/sceptre/root_green0.ron | 2 +- .../common/items/weapons/staff/bent_fuse.ron | 2 +- .../common/items/weapons/staff/bone_staff.ron | 2 +- .../items/weapons/staff/crimson_eye.ron | 2 +- .../items/weapons/staff/fiery_wishing_rod.ron | 2 +- .../items/weapons/staff/flamethrower_0.ron | 2 +- .../items/weapons/staff/infused_tower.ron | 2 +- .../common/items/weapons/staff/lava_rod.ron | 2 +- .../common/items/weapons/staff/orc_iron.ron | 2 +- common/src/lottery.rs | 23 +++++++++++++++---- server/src/events/entity_manipulation.rs | 3 +-- 13 files changed, 31 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4fef7c43b..f428e5e2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Overhauled clouds for more verticality and performance - New tooltip for items with stats comparison - Improved bow feedback, added arrow particles +- Retiered most sceptres and staves +- Loot tables can now recursively reference loot tables ### Removed diff --git a/assets/common/items/weapons/sceptre/moon0.ron b/assets/common/items/weapons/sceptre/moon0.ron index 971b68103e..d49039bf58 100644 --- a/assets/common/items/weapons/sceptre/moon0.ron +++ b/assets/common/items/weapons/sceptre/moon0.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.7326007, )), )), - quality: Common, + quality: Moderate, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/sceptre/root_green0.ron b/assets/common/items/weapons/sceptre/root_green0.ron index b252876c11..f8b8baf1f1 100644 --- a/assets/common/items/weapons/sceptre/root_green0.ron +++ b/assets/common/items/weapons/sceptre/root_green0.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.4444444, )), )), - quality: Moderate, + quality: Low, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/bent_fuse.ron b/assets/common/items/weapons/staff/bent_fuse.ron index 87431e46ab..ab06866888 100644 --- a/assets/common/items/weapons/staff/bent_fuse.ron +++ b/assets/common/items/weapons/staff/bent_fuse.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.4469842, )), )), - quality: Epic, + quality: Low, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/bone_staff.ron b/assets/common/items/weapons/staff/bone_staff.ron index 2ae02e9855..c3b786aff3 100644 --- a/assets/common/items/weapons/staff/bone_staff.ron +++ b/assets/common/items/weapons/staff/bone_staff.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.6349206, )), )), - quality: Common, + quality: Low, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/crimson_eye.ron b/assets/common/items/weapons/staff/crimson_eye.ron index f4f54e2323..6039aa9ea2 100644 --- a/assets/common/items/weapons/staff/crimson_eye.ron +++ b/assets/common/items/weapons/staff/crimson_eye.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.4571428, )), )), - quality: Moderate, + quality: Low, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/fiery_wishing_rod.ron b/assets/common/items/weapons/staff/fiery_wishing_rod.ron index 5d9301cb01..a9bc27341a 100644 --- a/assets/common/items/weapons/staff/fiery_wishing_rod.ron +++ b/assets/common/items/weapons/staff/fiery_wishing_rod.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.5142857, )), )), - quality: Moderate, + quality: Common, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/flamethrower_0.ron b/assets/common/items/weapons/staff/flamethrower_0.ron index c558e2f005..3244bcbd08 100644 --- a/assets/common/items/weapons/staff/flamethrower_0.ron +++ b/assets/common/items/weapons/staff/flamethrower_0.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.4017857, )), )), - quality: High, + quality: Moderate, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/infused_tower.ron b/assets/common/items/weapons/staff/infused_tower.ron index 193e78cbeb..e0cbe2c965 100644 --- a/assets/common/items/weapons/staff/infused_tower.ron +++ b/assets/common/items/weapons/staff/infused_tower.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.445269, )), )), - quality: High, + quality: Moderate, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/lava_rod.ron b/assets/common/items/weapons/staff/lava_rod.ron index 4fe56d893a..fe8c3f4a25 100644 --- a/assets/common/items/weapons/staff/lava_rod.ron +++ b/assets/common/items/weapons/staff/lava_rod.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.4114286, )), )), - quality: High, + quality: Moderate, tags: [], ) \ No newline at end of file diff --git a/assets/common/items/weapons/staff/orc_iron.ron b/assets/common/items/weapons/staff/orc_iron.ron index 8772d1be49..59e246157b 100644 --- a/assets/common/items/weapons/staff/orc_iron.ron +++ b/assets/common/items/weapons/staff/orc_iron.ron @@ -13,6 +13,6 @@ ItemDef( crit_mult: 1.481203, )), )), - quality: Epic, + quality: Moderate, tags: [], ) \ No newline at end of file diff --git a/common/src/lottery.rs b/common/src/lottery.rs index c15569272b..abe77d12b8 100644 --- a/common/src/lottery.rs +++ b/common/src/lottery.rs @@ -114,8 +114,11 @@ impl LootSpec { #[cfg(test)] mod tests { use super::*; - use crate::{assets::{AssetExt, Error}, comp::Item}; - + use crate::{ + assets::{AssetExt, Error}, + comp::Item, + }; + #[test] fn test_loot_tables() { #[derive(Clone)] @@ -131,7 +134,7 @@ mod tests { .iter() .map(|spec| Lottery::::load_cloned(spec)) .collect::>()?; - + Ok(LootTableList(list)) } } @@ -143,8 +146,18 @@ mod tests { Item::new_from_asset_expect(&item); }, LootSpec::ItemQuantity(item, lower, upper) => { - assert!(*lower > 0, "Lower quantity must be more than 0. It is {}.", lower); - assert!(upper >= lower, "Upper quantity must be at least the value of lower quantity. Upper value: {}, low value: {}.", upper, lower); + assert!( + *lower > 0, + "Lower quantity must be more than 0. It is {}.", + lower + ); + assert!( + upper >= lower, + "Upper quantity must be at least the value of lower quantity. Upper \ + value: {}, low value: {}.", + upper, + lower + ); Item::new_from_asset_expect(&item); }, LootSpec::LootTable(loot_table) => { diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 6de97c9afd..36109fb1bc 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -347,7 +347,7 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc 2 => "common.loot_tables.armor.cloth", 3 => "common.loot_tables.weapons.starter", 4 => "common.loot_tables.humanoids", - _ => "common.loots_tables.fallback", + _ => "common.loot_tables.fallback", }, Some(common::comp::Body::QuadrupedSmall(quadruped_small)) => { match quadruped_small.species { @@ -356,7 +356,6 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc }, _ => match rng.gen_range(0..4) { 0 => "common.loot_tables.food.wild_ingredients", - 2 => "common.loot_tables.wild_animal", _ => "common.loot_tables.wild_animal", }, }