diff options
author | David Gay <david@davidgay.org> | 2021-06-15 21:52:49 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-15 21:54:32 -0400 |
commit | 637adf2963f174c3e3e3d6cf9efbff314e306f3e (patch) | |
tree | 4e4812f66848a751b12adda81f7c500c0a689116 /app/lib | |
parent | f637f622af2d9b891271344ef23402c41419b3fe (diff) |
MonsterKills and bestiary view
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activity_processor.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb index e211db4..79c8f3e 100644 --- a/app/lib/activity_processor.rb +++ b/app/lib/activity_processor.rb @@ -323,6 +323,11 @@ class ActivityProcessor end else @results.push({ type: "message", body: "You slew the #{mon.name}." }) + + monster_kills = character.monster_kills.find_or_initialize_by(monster: mon) + monster_kills.quantity ? monster_kills.quantity += 1 : monster_kills.quantity = 1 + monster_kills.save + if monster_spawn char.stop_activity return |