mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'trollderim/replace-magic-dr-number' into 'master'
Replace magic dr constant Closes #915 See merge request veloren/veloren!1756
This commit is contained in:
commit
a5c76a6d36
@ -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