summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-06-07 19:57:51 -0400
committerDavid Gay <david@davidgay.org>2021-06-07 19:57:51 -0400
commitabb1342915dcf879870dc0014d1c196b788f5da3 (patch)
tree94f437fb631654e11970d17c6e27bed3243c16b0 /app
parent831e3ff7f43ae7acf2aaf589c4f0794649da4f85 (diff)
Change combat stance modifiers to flat value based on beastslay level
Diffstat (limited to 'app')
-rw-r--r--app/models/character.rb16
1 files changed, 8 insertions, 8 deletions
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