Initial work on FFI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-09-18 18:02:13 +02:00
parent 39497891e9
commit 726e294f11
19 changed files with 814 additions and 26 deletions

View File

@@ -48,9 +48,9 @@ impl Nature {
/// Calculates the modifier for a given stat. If it's the increased stat, returns the increased
/// modifier, if it's the decreased stat, returns the decreased modifier. Otherwise returns 1.0
pub fn get_stat_modifier(&self, stat: Statistic) -> f32 {
if stat == self.increase_stat {
if stat == self.increase_stat && stat != self.decrease_stat {
self.increase_modifier
} else if stat == self.decrease_stat {
} else if stat == self.decrease_stat && stat != self.increase_stat {
self.decrease_modifier
} else {
1.0