aboutsummaryrefslogtreecommitdiff
path: root/frontend/cmd
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 22:19:15 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 22:19:15 +0100
commit07b8a5b0baed8c7b23681c99f25f297045945bfc (patch)
tree8383b4b675aba53d19a667f4713c3e73c32e9652 /frontend/cmd
parentd554cb39a2f1ec97dd214a5dd200ae5f03cf616d (diff)
fix more bugs
Diffstat (limited to 'frontend/cmd')
-rw-r--r--frontend/cmd/hit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/cmd/hit.cpp b/frontend/cmd/hit.cpp
index f4a78fd..dc28199 100644
--- a/frontend/cmd/hit.cpp
+++ b/frontend/cmd/hit.cpp
@@ -19,8 +19,10 @@ void GameController::cmd_hit(string & target_name) {
throw Exception("vijand \"%s\" niet gevonden", target_name.c_str());
Enemy & enemy = **it;
- if (enemy.is_dead())
- throw Exception("%s is al dood!", enemy.get_name().c_str());
+ if (enemy.is_dead()) {
+ lprtf("%s is al dood!", enemy.get_name().c_str());
+ return;
+ }
if (rng.rand_double() > player.get_attack()) {
lprtf("Je hebt gemist!\n");