Support for Silumgar Assassin, Minor PT color and Token, Clone Indicators
When a creature is damaged and has critical life, PT turns to red(critical life is 2 and below), if a card has a powered down status like from -1/-1 counter, the PT turns to thistle, if powered up above 4, the PT turns into yellow, default is white. legendary eldrazi pt is violet. Token Indicator is T, and C for cards with copy abilities(so we can differentiate them from originals), TC for both token and copy cat cards.
This commit is contained in:
@@ -87132,7 +87132,7 @@ toughness=7
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Silumgar Assassin
|
name=Silumgar Assassin
|
||||||
abilities=strong
|
abilities=evadebigger
|
||||||
facedown={3}
|
facedown={3}
|
||||||
autofacedown={2}{B}:morph
|
autofacedown={2}{B}:morph
|
||||||
autofaceup=counter(1/1,1)
|
autofaceup=counter(1/1,1)
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ public:
|
|||||||
int swapP;
|
int swapP;
|
||||||
int swapT;
|
int swapT;
|
||||||
bool isSwitchedPT;
|
bool isSwitchedPT;
|
||||||
|
bool isACopier;
|
||||||
|
|
||||||
void eventattacked();
|
void eventattacked();
|
||||||
void eventattackedAlone();
|
void eventattackedAlone();
|
||||||
|
|||||||
@@ -225,7 +225,8 @@ class Constants
|
|||||||
LIBRARYDEATH = 107,
|
LIBRARYDEATH = 107,
|
||||||
SHUFFLELIBRARYDEATH = 108,
|
SHUFFLELIBRARYDEATH = 108,
|
||||||
OFFERING = 109,
|
OFFERING = 109,
|
||||||
NB_BASIC_ABILITIES = 110,
|
EVADEBIGGER = 110,
|
||||||
|
NB_BASIC_ABILITIES = 111,
|
||||||
|
|
||||||
|
|
||||||
RARITY_S = 'S', //Special Rarity
|
RARITY_S = 'S', //Special Rarity
|
||||||
|
|||||||
@@ -384,6 +384,7 @@ int AACopier::resolve()
|
|||||||
if (_target)
|
if (_target)
|
||||||
{
|
{
|
||||||
source->copy(_target);
|
source->copy(_target);
|
||||||
|
source->isACopier = true;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -287,29 +287,37 @@ void CardGui::Render()
|
|||||||
ARGB(((static_cast<unsigned char>(actA))/2),0,0,0));
|
ARGB(((static_cast<unsigned char>(actA))/2),0,0,0));
|
||||||
//damaged or buffed or powered down
|
//damaged or buffed or powered down
|
||||||
if(card->wasDealtDamage && card->life <= 2)
|
if(card->wasDealtDamage && card->life <= 2)
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,0,0));//red
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,0,0));//red critical and damaged
|
||||||
else if(!card->wasDealtDamage && card->pbonus < 0)
|
else if(!card->wasDealtDamage && card->pbonus < 0)
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),216,191,216));//thistle
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),216,191,216));//thistle powered down
|
||||||
else if(card->getRarity() == Constants::RARITY_T)
|
else if(!card->wasDealtDamage && card->pbonus >= 3)
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),245,245,245));//smoke
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,0));//yellow buff
|
||||||
else if(card->hasType("legendary") && card->hasType("eldrazi"))
|
else if(card->hasType("legendary") && card->hasType("eldrazi"))
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet legendary eldrazi
|
||||||
else
|
else
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white default
|
||||||
mFont->SetScale(actZ);
|
mFont->SetScale(actZ);
|
||||||
mFont->SetScale(actZ);
|
mFont->SetScale(actZ);
|
||||||
mFont->DrawString(buffer, actX - 10 * actZ, actY + 8 * actZ);
|
mFont->DrawString(buffer, actX - 10 * actZ, actY + 8 * actZ);
|
||||||
mFont->SetScale(1);
|
mFont->SetScale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(card->getRarity() == Constants::RARITY_T)
|
string buff = "";
|
||||||
|
if(card->isToken && !card->isACopier)
|
||||||
|
buff = "T";
|
||||||
|
if(card->isToken && card->isACopier)
|
||||||
|
buff = "CT";
|
||||||
|
if(!card->isToken && card->isACopier)
|
||||||
|
buff = "C";
|
||||||
|
|
||||||
|
if(!alternate && buff != "")
|
||||||
{
|
{
|
||||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||||
char buffer[200];
|
char buffer[200];
|
||||||
sprintf(buffer, "T");
|
sprintf(buffer, "%c", buff);
|
||||||
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,222,173));//Navajo
|
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,182,193));//Light Pink indicator
|
||||||
mFont->SetScale(0.8f);
|
mFont->SetScale(0.8f);
|
||||||
mFont->DrawString(buffer, actX - 10 * actZ, actY - (18 * actZ));
|
mFont->DrawString(buffer, actX - 10 * actZ, actY - (16 * actZ));
|
||||||
mFont->SetScale(1);
|
mFont->SetScale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
|||||||
isSettingBase = 0;
|
isSettingBase = 0;
|
||||||
isCDA = false;
|
isCDA = false;
|
||||||
isSwitchedPT = false;
|
isSwitchedPT = false;
|
||||||
|
isACopier = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MTGCardInstance * MTGCardInstance::createSnapShot()
|
MTGCardInstance * MTGCardInstance::createSnapShot()
|
||||||
@@ -750,6 +751,8 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent)
|
|||||||
return 0;
|
return 0;
|
||||||
if (opponent->basicAbilities[(int)Constants::ONEBLOCKER] && opponent->blocked)
|
if (opponent->basicAbilities[(int)Constants::ONEBLOCKER] && opponent->blocked)
|
||||||
return 0;
|
return 0;
|
||||||
|
if(opponent->basicAbilities[(int)Constants::EVADEBIGGER] && power > opponent->power)
|
||||||
|
return 0;
|
||||||
if(opponent->basicAbilities[(int)Constants::STRONG] && power < opponent->power)
|
if(opponent->basicAbilities[(int)Constants::STRONG] && power < opponent->power)
|
||||||
return 0;
|
return 0;
|
||||||
if(this->basicAbilities[(int)Constants::WEAK] && power < opponent->power)
|
if(this->basicAbilities[(int)Constants::WEAK] && power < opponent->power)
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
|||||||
"oppgraveexiler",
|
"oppgraveexiler",
|
||||||
"librarydeath",
|
"librarydeath",
|
||||||
"shufflelibrarydeath",
|
"shufflelibrarydeath",
|
||||||
"offering"
|
"offering",
|
||||||
|
"evadebigger"
|
||||||
};
|
};
|
||||||
|
|
||||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||||
|
|||||||
Reference in New Issue
Block a user