mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
gave speed more weight, reduced equip_time_weight, etc
This commit is contained in:
parent
f77baeac4b
commit
a6a825a97f
@ -971,11 +971,11 @@ pub fn get_weapons(inv: &Inventory) -> (Option<ToolKind>, Option<ToolKind>) {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn weapon_rating<T: ItemDesc>(item: &T, msm: &MaterialStatManifest) -> f32 {
|
||||
const DAMAGE_WEIGHT: f32 = 2.0;
|
||||
const SPEED_WEIGHT: f32 = 2.0;
|
||||
const CRIT_CHANCE_WEIGHT: f32 = 1.5;
|
||||
const SPEED_WEIGHT: f32 = 3.0;
|
||||
const CRIT_CHANCE_WEIGHT: f32 = 1.25;
|
||||
const RANGE_WEIGHT: f32 = 0.0;
|
||||
const EFFECT_WEIGHT: f32 = 1.0;
|
||||
const EQUIP_TIME_WEIGHT: f32 = 0.5;
|
||||
const EQUIP_TIME_WEIGHT: f32 = 0.25;
|
||||
const ENERGY_EFFICIENCY_WEIGHT: f32 = 0.0;
|
||||
const BUFF_STRENGTH_WEIGHT: f32 = 0.0;
|
||||
|
||||
@ -986,20 +986,20 @@ pub fn weapon_rating<T: ItemDesc>(item: &T, msm: &MaterialStatManifest) -> f32 {
|
||||
// Since it is only for weapon though, it probably makes sense to leave
|
||||
// independent for now
|
||||
|
||||
let damage_rating = stats.power;
|
||||
let speed_rating = stats.speed;
|
||||
let crit_chance_rating = stats.crit_chance / 0.1;
|
||||
let damage_rating = stats.power - 1.0;
|
||||
let speed_rating = stats.speed - 1.0;
|
||||
let crit_chance_rating = stats.crit_chance - 0.1;
|
||||
let range_rating = stats.range;
|
||||
let effect_rating = stats.effect_power;
|
||||
let equip_time_rating = stats.equip_time_secs;
|
||||
let effect_rating = stats.effect_power - 1.0;
|
||||
let equip_time_rating = 1.0 / stats.equip_time_secs;
|
||||
let energy_efficiency_rating = stats.energy_efficiency;
|
||||
let buff_strength_rating = stats.buff_strength;
|
||||
|
||||
(((damage_rating * DAMAGE_WEIGHT) + (speed_rating * SPEED_WEIGHT) + (crit_chance_rating * CRIT_CHANCE_WEIGHT)
|
||||
+ (range_rating * RANGE_WEIGHT) + (effect_rating * EFFECT_WEIGHT)
|
||||
(1.0 + (damage_rating * DAMAGE_WEIGHT) + 1.0 + (speed_rating * SPEED_WEIGHT) + 1.0 + (crit_chance_rating * CRIT_CHANCE_WEIGHT)
|
||||
+ (range_rating * RANGE_WEIGHT) + 1.0 + (effect_rating * EFFECT_WEIGHT) + (equip_time_rating * EQUIP_TIME_WEIGHT)
|
||||
+ (energy_efficiency_rating * ENERGY_EFFICIENCY_WEIGHT) + (buff_strength_rating * BUFF_STRENGTH_WEIGHT))
|
||||
/ (DAMAGE_WEIGHT + SPEED_WEIGHT + CRIT_CHANCE_WEIGHT + RANGE_WEIGHT + EFFECT_WEIGHT + EQUIP_TIME_WEIGHT
|
||||
+ (equip_time_rating * EQUIP_TIME_WEIGHT) + ENERGY_EFFICIENCY_WEIGHT + BUFF_STRENGTH_WEIGHT))
|
||||
+ ENERGY_EFFICIENCY_WEIGHT + BUFF_STRENGTH_WEIGHT)
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user