From e99b6aaeb119feabfa2f7c3c49908625981e9708 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 20 Feb 2007 20:55:37 +0000 Subject: Now different sounds can play when a monster misses the player. --- src/being.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index bfed2d51..03129c61 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -152,12 +152,20 @@ Being::setSpeech(const std::string &text, Uint32 time) } void -Being::setDamage(Sint16 amount, Uint32 time) +Being::takeDamage(int amount) { mDamage = amount ? toString(amount) : "miss"; mDamageTime = 300; } +void +Being::handleAttack(Being *victim, int damage) +{ + setAction(Being::ATTACK); + mFrame = 0; + mWalkTime = tick_time; +} + void Being::setMap(Map *map) { -- cgit v1.2.3-70-g09d2