summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 19c2224d..3214b491 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -189,10 +189,6 @@ void Being::takeDamage(int amount)
}
else
{
- // Hit particle effect
- controlParticle(particleEngine->addEffect(
- "graphics/particles/hit.particle.xml", 0, 0));
-
if (getType() == MONSTER)
{
font = hitBlueFont;
@@ -208,6 +204,26 @@ void Being::takeDamage(int amount)
mPx + 16, mPy + 16);
}
+void Being::showCrit()
+{
+ gcn::Font *font;
+ std::string text = "crit!";
+
+ // Selecting the right color
+ if (getType() == MONSTER)
+ {
+ font = hitBlueFont;
+ }
+ else
+ {
+ font = hitRedFont;
+ }
+
+ // Show crit notice
+ particleEngine->addTextRiseFadeOutEffect(text, font,
+ mPx + 16, mPy - 16);
+}
+
void Being::handleAttack(Being *victim, int damage)
{
setAction(Being::ATTACK);