diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-02-20 20:55:37 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-02-20 20:55:37 +0000 |
commit | e99b6aaeb119feabfa2f7c3c49908625981e9708 (patch) | |
tree | 00f599c90443be884b9b8b51618552c2f8834f2d /src/being.cpp | |
parent | eadbe0cb009b8c8fec622946f0b0109a2f07b1f1 (diff) | |
download | mana-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.cpp | 10 |
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 |