diff options
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/src/being.cpp b/src/being.cpp index 3f34948e..cebf6d1c 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -226,20 +226,36 @@ void Being::takeDamage(int amount) gcn::Font *font; std::string damage = amount ? toString(amount) : "miss"; + int red, green, blue; + + font = gui->getInfoParticleFont(); + // Selecting the right color if (damage == "miss") - font = hitYellowFont; + { + red = 255; + green = 255; + blue = 0; + } else { if (getType() == MONSTER) - font = hitBlueFont; + { + red = 0; + green = 100; + blue = 255; + } else - font = hitRedFont; + { + red = 255; + green = 50; + blue = 50; + } } // Show damage number - particleEngine->addTextSplashEffect(damage, 255, 255, 255, font, - mPx + 16, mPy + 16); + particleEngine->addTextSplashEffect(damage, red, green, blue, font, + mPx + 16, mPy + 16, true); } void Being::showCrit() @@ -247,15 +263,27 @@ void Being::showCrit() gcn::Font *font; std::string text = "crit!"; + int red, green, blue; + + font = gui->getInfoParticleFont(); + // Selecting the right color if (getType() == MONSTER) - font = hitBlueFont; + { + red = 0; + green = 100; + blue = 255; + } else - font = hitRedFont; + { + red = 255; + green = 50; + blue = 50; + } // Show crit notice - particleEngine->addTextSplashEffect(text, 255, 255, 255, font, - mPx + 16, mPy + 16); + particleEngine->addTextSplashEffect(text, red, green, blue, font, + mPx + 16, mPy + 16, true); } void Being::handleAttack(Being *victim, int damage) |