summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-20 20:55:37 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-20 20:55:37 +0000
commite99b6aaeb119feabfa2f7c3c49908625981e9708 (patch)
tree00f599c90443be884b9b8b51618552c2f8834f2d /src/being.cpp
parenteadbe0cb009b8c8fec622946f0b0109a2f07b1f1 (diff)
downloadmana-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.gz
mana-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.bz2
mana-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.xz
mana-e99b6aaeb119feabfa2f7c3c49908625981e9708.zip
Now different sounds can play when a monster misses the player.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/being.cpp b/src/being.cpp
index bfed2d51..03129c61 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -152,13 +152,21 @@ 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)
{
// Remove sprite from potential previous map