Merge pull request #634 from kevlahnota/master

life indicators and fix init of vars
This commit is contained in:
Anthony Calosa
2015-09-27 10:12:57 +08:00
3 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -85760,7 +85760,7 @@ auto=@movedTo(*[-creature]|mystack):lifelink ueot
text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, Seeker of the Way gains lifelink until end of turn. text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, Seeker of the Way gains lifelink until end of turn.
mana={1}{W} mana={1}{W}
type=Creature type=Creature
subtype=Human Monk subtype=Human Warrior
power=2 power=2
toughness=2 toughness=2
[/card] [/card]
+2 -2
View File
@@ -708,7 +708,7 @@ private:
else if (s == "pbasiclandtypes")//Basic Land types else if (s == "pbasiclandtypes")//Basic Land types
{ {
intValue = 0; intValue = 0;
int forest, plains, swamp, island, mountain = 0; int forest = 0, plains = 0, swamp = 0, island = 0, mountain = 0;
for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j) for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j)
{ {
if (card->controller()->game->battlefield->cards[j]->hasType("forest")) if (card->controller()->game->battlefield->cards[j]->hasType("forest"))
@@ -801,7 +801,7 @@ private:
else if (s == "gravecardtypes")//Tarmogoyf else if (s == "gravecardtypes")//Tarmogoyf
{ {
intValue = 0; intValue = 0;
int art, cre, enc, ins, lnd, sor, trb, pwk = 0; int art = 0, cre = 0, enc = 0, ins = 0, lnd = 0, sor = 0, trb = 0, pwk = 0;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
Player * p = card->getObserver()->players[i]; Player * p = card->getObserver()->players[i];
+14 -3
View File
@@ -96,18 +96,29 @@ void GuiAvatar::Render()
//Life //Life
char buffer[10]; char buffer[10];
int lx = 255, ly = 255, lz = 255;
if(life > 24) { lx = 127; ly = 255; lz = 212; }
if(life > 16 && life < 24) { lx = 255; ly = 255; lz = 255; }
if(life > 12 && life < 17) { lx = 255; ly = 255; lz = 105; }
if(life > 8 && life < 13) { lx = 255; ly = 255; lz = 13; }
if(life > 4 && life < 9) { lx = 255; ly = 166; lz = 0; }
if(life < 5) { lx = 255; ly = 40; lz = 0; }
sprintf(buffer, "%i", life); sprintf(buffer, "%i", life);
switch (corner) switch (corner)
{ {
case TOP_LEFT: case TOP_LEFT:
mFont->SetColor(ARGB((int)actA / 4, 0, 0, 0)); mFont->SetColor(ARGB((int)actA / 4, 0, 0, 0));
mFont->DrawString(buffer, actX + 2, actY + 2); mFont->DrawString(buffer, actX + 2, actY + 2);
mFont->SetColor(ARGB((int)actA, 255, 255, 255)); mFont->SetScale(1.3f);
mFont->SetColor(ARGB((int)actA, lx, ly, lz));
mFont->DrawString(buffer, actX + 1, actY + 1); mFont->DrawString(buffer, actX + 1, actY + 1);
mFont->SetScale(1);
break; break;
case BOTTOM_RIGHT: case BOTTOM_RIGHT:
mFont->SetColor(ARGB((int)actA, 255, 255, 255)); mFont->SetScale(1.3f);
mFont->DrawString(buffer, actX, actY - 10, JGETEXT_RIGHT); mFont->SetColor(ARGB((int)actA, lx, ly, lz));
mFont->DrawString(buffer, actX, actY - 14, JGETEXT_RIGHT);
mFont->SetScale(1);
break; break;
} }
//poison //poison