diff options
author | David Gay <david@davidgay.org> | 2021-06-07 19:57:51 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-07 19:57:51 -0400 |
commit | abb1342915dcf879870dc0014d1c196b788f5da3 (patch) | |
tree | 94f437fb631654e11970d17c6e27bed3243c16b0 | |
parent | 831e3ff7f43ae7acf2aaf589c4f0794649da4f85 (diff) |
Change combat stance modifiers to flat value based on beastslay level
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | app/models/character.rb | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 70983fe..c716630 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. ### Combat - The following stats can now be negative: resistances, speed, accuracy, power, and evasion +- Combat stances now increase or decrease stats by a flat amount (instead of a percentage). The amount is + equal to your beastslay level divided by 5, rounded up. ### Monsters - Stalk beast diff --git a/app/models/character.rb b/app/models/character.rb index f2c450e..c593651 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -337,8 +337,8 @@ class Character < ApplicationRecord res += resistance("energy") end - res = (res * 0.75).ceil if elusive? - res = (res * 1.25).floor if protective? + res -= (beastslay_level / 5).ceil if elusive? + res += (beastslay_level / 5).ceil if protective? res end @@ -357,9 +357,9 @@ class Character < ApplicationRecord def accuracy(with_combat_style: false) base = self.beastslay_level + total_stat_change("accuracy") if with_combat_style && self.precise? - base = (base * 1.25).floor + base += (beastslay_level / 5).ceil elsif with_combat_style && self.brutal? - base = (base * 0.75).ceil + base -= (beastslay_level / 5).ceil end base end @@ -367,9 +367,9 @@ class Character < ApplicationRecord def power(with_combat_style: false) base = self.beastslay_level + total_stat_change("power") if with_combat_style && self.precise? - base = (base * 0.75).ceil + base -= (beastslay_level / 5).ceil elsif with_combat_style && self.brutal? - base = (base * 1.25).floor + base += (beastslay_level / 5).ceil end base end @@ -377,9 +377,9 @@ class Character < ApplicationRecord def evasion(with_combat_style: false) base = self.beastslay_level + total_stat_change("evasion") if with_combat_style && self.elusive? - base = (base * 1.25).floor + base += (beastslay_level / 5).ceil elsif with_combat_style && self.protective? - base = (base * 0.75).ceil + base -= (beastslay_level / 5).ceil end base end |