From 019cac44c6bd4382c8b969389be1041877fa90c7 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:06:35 +0800 Subject: [PATCH] feataure add hp command --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index 6706312..c503b3f 100644 --- a/main.cpp +++ b/main.cpp @@ -297,6 +297,12 @@ void gameLoop() { } } + if (commandBuffer.compare(0, endOfVerb, "hp") == 0) { + wrapOut("Current HP: " + std::to_string(currentState->getHP())); + wrapEndPara(); + commandOk = true; + } + // check get , drop , eat if (!commandOk) { std::vector words = split(commandBuffer);