summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-06-06 22:19:41 -0400
committerDavid Gay <david@davidgay.org>2021-06-06 22:19:41 -0400
commit8acfe2147ab89f03b1e263fb97eef9fc8c3396b2 (patch)
treec994759a34a922a1bebbe5a410407e9e9505814d
parent307b921892a2efe9d956b00cd7992fe1402c6150 (diff)
Do bash damage if you don't have anything else
-rw-r--r--CHANGELOG.md4
-rw-r--r--app/lib/activity_processor.rb6
2 files changed, 10 insertions, 0 deletions
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|