From 8acfe2147ab89f03b1e263fb97eef9fc8c3396b2 Mon Sep 17 00:00:00 2001 From: David Gay Date: Sun, 6 Jun 2021 22:19:41 -0400 Subject: Do bash damage if you don't have anything else --- CHANGELOG.md | 4 ++++ app/lib/activity_processor.rb | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 799331e..a9e775f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. ## [0.1.8.1] - 2021-06-06 +### Combat +- If a combatant lacks any damage ranges (typically characters fighting without a weapon), the combatant will perform + an unarmed attack that deals bash damage. + ### UI - Consumables are now listed in inventory below equipment and above tools. diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb index 11f0db0..bc0d058 100644 --- a/app/lib/activity_processor.rb +++ b/app/lib/activity_processor.rb @@ -241,6 +241,12 @@ class ActivityProcessor dealt_damage[data[:gid]] = damage_roll end + # If you can't do damage any other way, hit 'em with your fists! + if actor.damage_ranges.none? + dealt_damage["bash"] = rand(1..2) + combat_message.call("Lacking any other weapon, #{actor.name} thrashes wildly!") + end + if base_accuracy_roll == 20 combat_message.call("#{actor.name} landed a critical hit!") dealt_damage.each do |gid, amount| -- cgit v1.2.3