From 3353ae7d37020229dffdea186690010854580694 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Fri, 12 Mar 2021 20:12:20 +0100 Subject: [PATCH] improvement: add blue-colored damage nbr for pp --- .../scenes/battlesystem/actors/battler.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/actors/battler.lua b/sonic-radiance.love/scenes/battlesystem/actors/battler.lua index e07aa13..707c31d 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/battler.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/battler.lua @@ -44,8 +44,9 @@ function Battler:getDamageNumberY() return 32 end -function Battler:setDamageNumber(number) +function Battler:setDamageNumber(number, isPP) self.damageNumber.isBad = number < 0 + self.damageNumber.isPP = (isPP == true) self.damageNumber.num = math.abs(math.floor(number)) self.damageY = self:getDamageNumberY() - 8 self.tweens:newTween(0, 0.4, {damageY = self:getDamageNumberY()}, "outBack") @@ -264,7 +265,11 @@ function Battler:drawDamageNumber() if (self.damageNumber.isBad) then love.graphics.setColor(1, 0, 0, 1) else - love.graphics.setColor(0, 1, 0, 1) + if (self.damageNumber.isPP) then + love.graphics.setColor(0.3, 0.8, 1, 1) + else + love.graphics.setColor(0, 1, 0, 1) + end end self.assets.fonts["hudnbrs_small"]:print(self.damageNumber.num, x, y - self.damageY, "center")