diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-24 19:45:33 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-24 19:45:33 +0100 |
commit | a18d4dcf1eb9abb9b4ed8060aefd14088ccb9680 (patch) | |
tree | d625a96d6d978d00644e9dd6ffd75e099eb43149 /src/monster.cpp | |
parent | a928798a9326de1e6781e14c8ccf5abec1232385 (diff) | |
download | mana-a18d4dcf1eb9abb9b4ed8060aefd14088ccb9680.tar.gz mana-a18d4dcf1eb9abb9b4ed8060aefd14088ccb9680.tar.bz2 mana-a18d4dcf1eb9abb9b4ed8060aefd14088ccb9680.tar.xz mana-a18d4dcf1eb9abb9b4ed8060aefd14088ccb9680.zip |
Code reformatting
Diffstat (limited to 'src/monster.cpp')
-rw-r--r-- | src/monster.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/monster.cpp b/src/monster.cpp index b6e6fc35..f50855ca 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -79,8 +79,7 @@ Monster::~Monster() } } -void -Monster::logic() +void Monster::logic() { if (mAction != STAND) { @@ -95,14 +94,12 @@ Monster::logic() Being::logic(); } -Being::Type -Monster::getType() const +Being::Type Monster::getType() const { return MONSTER; } -void -Monster::setAction(Uint8 action) +void Monster::setAction(Uint8 action) { SpriteAction currentAction = ACTION_INVALID; @@ -140,8 +137,7 @@ Monster::setAction(Uint8 action) } } -void -Monster::handleAttack(Being *victim, int damage) +void Monster::handleAttack(Being *victim, int damage) { Being::handleAttack(victim, damage); @@ -150,21 +146,18 @@ Monster::handleAttack(Being *victim, int damage) MONSTER_EVENT_HIT : MONSTER_EVENT_MISS)); } -void -Monster::takeDamage(int amount) +void Monster::takeDamage(int amount) { if (amount > 0) sound.playSfx(getInfo().getSound(MONSTER_EVENT_HURT)); Being::takeDamage(amount); } -Being::TargetCursorSize -Monster::getTargetCursorSize() const +Being::TargetCursorSize Monster::getTargetCursorSize() const { return getInfo().getTargetCursorSize(); } -const MonsterInfo& -Monster::getInfo() const +const MonsterInfo &Monster::getInfo() const { return MonsterDB::get(mJob - 1002); } |