basic color code on PT

if a creature was damaged or has a negative toughness bonus, the pt
changes to crimson red, if the creature was not damaged and has power
buff, the color changes to spring green, normal was default white.
This commit is contained in:
Anthony Calosa
2015-09-18 20:16:28 +08:00
parent 6cd0474eca
commit 11124205e5
2 changed files with 7 additions and 2 deletions

View File

@@ -2541,7 +2541,7 @@ int AACloner::resolve()
{
if(_target->pbonus > 0)
spell->source->power = _target->power - _target->pbonus;
else
else
spell->source->power = _target->power + _target->pbonus;
if(_target->tbonus > 0)
{

View File

@@ -285,7 +285,12 @@ void CardGui::Render()
sprintf(buffer, "%i/%i", card->power, card->life);
renderer->FillRect(actX - (12 * actZ), actY + 6 * actZ, 25 * actZ, 12 * actZ,
ARGB(((static_cast<unsigned char>(actA))/2),0,0,0));
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));
if(card->wasDealtDamage || card->tbonus < 0)
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),220,20,60));//crimson
else if(!card->wasDealtDamage && card->pbonus > 0)
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),0,255,127));//spring green
else
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white
mFont->SetScale(actZ);
mFont->DrawString(buffer, actX - 10 * actZ, actY + 8 * actZ);
mFont->SetScale(1);