diff options
author | David Gay <david@davidgay.org> | 2021-06-16 17:44:38 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-16 17:45:23 -0400 |
commit | ecf1d03813e75b2929dce4cfc68352ad5b1a1377 (patch) | |
tree | 19d65cbd3043dde7c3693e423b3084f52aef5cdf /app/models | |
parent | c016637230c4af69e7effa3a146a3ecba95338e6 (diff) |
[data] New activity: havencast_dazzle
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/character.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index 7f26ad4..9db3f8c 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -367,6 +367,10 @@ class Character < ApplicationRecord effects.filter_map { |e| e[:modifier] if e[:type] == "stat_change" && e[:gid] == gid }.sum end + def total_enemy_stat_change(gid) + effects.filter_map { |e| e[:modifier] if e[:type] == "enemy_stat_change" && e[:gid] == gid }.sum + end + def damage_ranges effects.filter_map { |e| { gid: e[:gid], min: e[:min], max: e[:max] } if e[:type] == "damage" } end |