diff options
author | David Gay <david@davidgay.org> | 2021-06-07 22:36:50 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-07 22:36:50 -0400 |
commit | fbf84e869cec1ce7d3b775aa35509b5f1ad60455 (patch) | |
tree | 8ec07fb72559c2d7ea8441d6e4decbafa3c413e7 | |
parent | 5cb5a60cb326a47b969df9c21c7b0f16c50f7a2a (diff) |
Fix bug with meta resistances not being given special treatment in new combat stance code
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | app/models/character.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cfa7dc3..7ea3d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. ### Fixed - Timer wasn't working due to the server not serving the web worker. +- Meta resistances (physical and energy) were not being treated specially in the new combat stance code, causing + all resistances but poison and bleed to be lowered twice as much as they should have been. ## [0.1.9] - 2021-06-07 diff --git a/app/models/character.rb b/app/models/character.rb index c593651..ce2b0db 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -337,8 +337,8 @@ class Character < ApplicationRecord res += resistance("energy") end - res -= (beastslay_level / 5).ceil if elusive? - res += (beastslay_level / 5).ceil if protective? + res -= (beastslay_level / 5).ceil if elusive? && !%w[physical energy].include?(damage_type) + res += (beastslay_level / 5).ceil if protective? && !%w[physical energy].include?(damage_type) res end |