Sort cases in mass match

This commit is contained in:
Ludvig Böklin 2021-05-19 14:19:49 +02:00
parent 7e232a2492
commit a71064aaf4

View File

@ -201,18 +201,18 @@ impl Body {
Body::FishSmall(_) => 1.0,
Body::Golem(_) => 10_000.0,
Body::Humanoid(humanoid) => match (humanoid.species, humanoid.body_type) {
(humanoid::Species::Orc, humanoid::BodyType::Male) => 99.0,
(humanoid::Species::Orc, humanoid::BodyType::Female) => 68.0,
(humanoid::Species::Human, humanoid::BodyType::Male) => 70.0,
(humanoid::Species::Human, humanoid::BodyType::Female) => 56.0,
(humanoid::Species::Elf, humanoid::BodyType::Male) => 73.0,
(humanoid::Species::Elf, humanoid::BodyType::Female) => 56.0,
(humanoid::Species::Dwarf, humanoid::BodyType::Male) => 40.0,
(humanoid::Species::Dwarf, humanoid::BodyType::Female) => 30.0,
(humanoid::Species::Undead, humanoid::BodyType::Male) => 63.0,
(humanoid::Species::Undead, humanoid::BodyType::Female) => 48.0,
(humanoid::Species::Danari, humanoid::BodyType::Male) => 23.0,
(humanoid::Species::Danari, humanoid::BodyType::Female) => 22.0,
(humanoid::Species::Danari, humanoid::BodyType::Male) => 23.0,
(humanoid::Species::Dwarf, humanoid::BodyType::Female) => 30.0,
(humanoid::Species::Dwarf, humanoid::BodyType::Male) => 40.0,
(humanoid::Species::Elf, humanoid::BodyType::Female) => 56.0,
(humanoid::Species::Elf, humanoid::BodyType::Male) => 73.0,
(humanoid::Species::Human, humanoid::BodyType::Female) => 56.0,
(humanoid::Species::Human, humanoid::BodyType::Male) => 70.0,
(humanoid::Species::Orc, humanoid::BodyType::Female) => 68.0,
(humanoid::Species::Orc, humanoid::BodyType::Male) => 99.0,
(humanoid::Species::Undead, humanoid::BodyType::Female) => 48.0,
(humanoid::Species::Undead, humanoid::BodyType::Male) => 63.0,
},
Body::Object(obj) => obj.mass().0,
Body::QuadrupedLow(body) => match body.species {