summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/being.cpp b/src/being.cpp
index d719635b..fc61fbd9 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -470,8 +470,23 @@ void Being::handleAttack()
void Being::handleAttack(Being *victim, int damage, AttackType type)
#endif
{
- setAction(Being::ATTACK);
+ if (this != player_node)
+ setAction(Being::ATTACK);
#ifdef EATHENA_SUPPORT
+ if (getType() == PLAYER)
+ {
+ if (mEquippedWeapon->getAttackType() == ACTION_ATTACK_BOW)
+ {
+ Particle *p = new Particle(NULL);
+ p->setLifetime(1000);
+ victim->controlParticle(p);
+
+ Particle *p2 = particleEngine->addEffect("graphics/particles/arrow.particle.xml", mPx, mPy);
+ p2->setLifetime(900);
+ p2->setDestination(p, 7, 0);
+ p2->setDieDistance(8);
+ }
+ }
mFrame = 0;
mWalkTime = tick_time;
#endif