From fbf84e869cec1ce7d3b775aa35509b5f1ad60455 Mon Sep 17 00:00:00 2001 From: David Gay Date: Mon, 7 Jun 2021 22:36:50 -0400 Subject: Fix bug with meta resistances not being given special treatment in new combat stance code --- CHANGELOG.md | 2 ++ 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 -- cgit v1.2.3