summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAttackerMelee.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-30 14:08:57 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-30 14:08:57 +0200
commit60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf (patch)
treec79d479defdcaee61cf9bc59bbc98047eb3f9b5c /src/Mobs/Behaviors/BehaviorAttackerMelee.h
parentAttacker updates (diff)
downloadcuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.tar
cuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.tar.gz
cuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.tar.bz2
cuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.tar.lz
cuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.tar.xz
cuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.tar.zst
cuberite-60e24ca8b41bcfa92ab579b178d2c7adf51c3bcf.zip
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorAttackerMelee.h')
-rw-r--r--src/Mobs/Behaviors/BehaviorAttackerMelee.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Mobs/Behaviors/BehaviorAttackerMelee.h b/src/Mobs/Behaviors/BehaviorAttackerMelee.h
new file mode 100644
index 000000000..6bfda0aa3
--- /dev/null
+++ b/src/Mobs/Behaviors/BehaviorAttackerMelee.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "BehaviorAttacker.h"
+
+/** Makes the mob fight back any other mob that damages it. Mob should have BehaviorAttacker to work.
+This behavior does not make sense in combination with BehaviorCoward. */
+class cBehaviorAttackerMelee : cBehaviorAttacker
+{
+public:
+ bool StrikeTarget(std::chrono::milliseconds a_Dt, cChunk & a_Chunk, int a_StrikeTickCnt) override;
+};