mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made item prices sane.
This commit is contained in:
parent
7eb1eefa13
commit
c8b8cd436e
@ -25,21 +25,21 @@ loot_tables: [
|
||||
(0.125, "common.loot_tables.armor.cultist"),
|
||||
// Materials
|
||||
(7.5, "common.loot_tables.materials.common"),
|
||||
(2.0, "common.loot_tables.materials.underground"),
|
||||
(5.0, "common.loot_tables.materials.underground"),
|
||||
// Food
|
||||
(6.0, "common.loot_tables.food.farm_ingredients"),
|
||||
(2.5, "common.loot_tables.food.wild_ingredients"),
|
||||
(0.8, "common.loot_tables.food.prepared"),
|
||||
(0.5, "common.loot_tables.food.farm_ingredients"),
|
||||
(0.25, "common.loot_tables.food.wild_ingredients"),
|
||||
(0.1, "common.loot_tables.food.prepared"),
|
||||
// TODO: Change consumables when they are split up later
|
||||
(0.5, "common.loot_tables.consumables"),
|
||||
(1.0, "common.loot_tables.consumables"),
|
||||
],
|
||||
// this is the amount of that good the most common item represents
|
||||
// so basically this table balances the goods against each other (higher=less valuable)
|
||||
good_scaling: [
|
||||
(Potions, 0.5), // common.items.consumable.potion_minor
|
||||
(Food, 3.0), // common.items.food.mushroom
|
||||
(Coin, 1.0), // common.items.utility.coins
|
||||
(Armor, 0.3), // common.items.armor.misc.pants.worker_blue
|
||||
(Tools, 1.0), // common.items.weapons.staff.starter_staff
|
||||
(Ingredients, 5.0), // common.items.crafting_ing.leather_scraps
|
||||
(Potions, 0.001), // common.items.consumable.potion_minor
|
||||
(Food, 2.0), // common.items.food.mushroom
|
||||
(Coin, 10.0), // common.items.utility.coins
|
||||
(Armor, 0.2), // common.items.armor.misc.pants.worker_blue
|
||||
(Tools, 0.1), // common.items.weapons.staff.starter_staff
|
||||
(Ingredients, 1.0), // common.items.crafting_ing.leather_scraps
|
||||
])
|
||||
|
@ -6,7 +6,7 @@ ItemDef(
|
||||
hands: Two,
|
||||
stats: Direct((
|
||||
equip_time_secs: 0.3,
|
||||
power: 0.5,
|
||||
power: 1.5,
|
||||
poise_strength: 1.0,
|
||||
speed: 0.8,
|
||||
crit_chance: 0.2638889,
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
// 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")),
|
||||
(0.5, Item("common.items.consumable.potion_med")),
|
||||
(0.2, Item("common.items.consumable.potion_big")),
|
||||
// bombs
|
||||
(0.6, Item("common.items.utility.bomb")),
|
||||
(0.2, Item("common.items.utility.bomb_pile")),
|
||||
|
@ -341,13 +341,12 @@ impl TradePricing {
|
||||
|
||||
pub fn get_material(item: &str) -> (Good, f32) {
|
||||
if item == TradePricing::COIN_ITEM {
|
||||
(Good::Coin, 1.0 / TRADE_PRICING.coin_scale)
|
||||
(Good::Coin, 1.0)
|
||||
} else {
|
||||
TRADE_PRICING
|
||||
.material_cache
|
||||
.get(item)
|
||||
.cloned()
|
||||
.unwrap_or((Good::Terrain(crate::terrain::BiomeKind::Void), 0.0))
|
||||
TRADE_PRICING.material_cache.get(item).cloned().map_or(
|
||||
(Good::Terrain(crate::terrain::BiomeKind::Void), 0.0),
|
||||
|(a, b)| (a, b * TRADE_PRICING.coin_scale),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user