diff options
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); } |