mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Replace magic dr constant
This commit is contained in:
parent
2ebe0915f4
commit
f5e1d446ad
@ -393,8 +393,11 @@ impl Damage {
|
||||
Protection::Invincible => None,
|
||||
})
|
||||
.sum::<Option<f32>>();
|
||||
|
||||
const FIFTY_PERCENT_DR_THRESHOLD: f32 = 60.0;
|
||||
|
||||
match protection {
|
||||
Some(dr) => dr / (60.0 + dr.abs()),
|
||||
Some(dr) => dr / (FIFTY_PERCENT_DR_THRESHOLD + dr.abs()),
|
||||
None => 1.0,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user