Merge pull request #642 from kevlahnota/master
urza lands fix, polished action stack & static mana display
This commit is contained in:
@@ -8140,7 +8140,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Battleflight Eagle
|
||||
auto=target(creature|battlefield) 2/2 ueot && flying ueot
|
||||
auto=target(creature|battlefield) transforms((,newability[2/2],newability[flying])) ueot
|
||||
abilities=flying
|
||||
text=Flying -- When Battleflight Eagle enters the battlefield, target creature gets +2/+2 and gains flying until end of turn.
|
||||
mana={4}{W}
|
||||
@@ -37095,6 +37095,7 @@ toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Fylgja
|
||||
target=creature
|
||||
auto=all(this) counter(0/0,4,Healing)
|
||||
auto={C(0/0,-1,Healing)}:prevent:1
|
||||
auto={2}{W}:all(this) counter(0/0,1,Healing)
|
||||
@@ -45155,7 +45156,7 @@ toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
name=Hellkite Hatchling
|
||||
auto=may target(<anyamount>other creature|mybattlefield) sacrifice && counter(1/1,1) all(this) && all(this) transforms((,flying,trample)) forever
|
||||
auto=may target(<anyamount>other creature|mybattlefield) sacrifice && counter(1/1,1) all(this) && all(this) transforms((,newability[flying],newability[trample])) forever
|
||||
text=Devour 1 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with that many +1/+1 counters on it.) -- Hellkite Hatchling has flying and trample if it devoured a creature.
|
||||
mana={2}{R}{G}
|
||||
type=Creature
|
||||
@@ -80872,7 +80873,8 @@ toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=River of Tears
|
||||
auto={t}:name(Add Mana) if type(land[fresh]|mybattlefield)~morethan~0 then add{B} else add{U}
|
||||
auto=aslongas(land[fresh]|mybattlefield) {T}:add{B} >0
|
||||
auto=aslongas(land[fresh]|mybattlefield) {T}:add{U} <1
|
||||
text={T}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead.
|
||||
type=Land
|
||||
[/card]
|
||||
@@ -106988,21 +106990,27 @@ type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Urza's Mine
|
||||
auto={t}:name(Add Mana) if type(Urza's Tower|mybattlefield)~morethan~0,type(Urza's Power Plant|mybattlefield)~morethan~0 then add{2} else add{1}
|
||||
alias=4192
|
||||
auto=this(variable{urzatron} >0) produceextra:{1}
|
||||
auto={T}:add{1}
|
||||
text={T}: Add {1} to your mana pool. If you control an Urza's Power-Plant and an Urza's Tower, add {2} to your mana pool instead.
|
||||
type=Land
|
||||
subtype=Urza's Mine
|
||||
[/card]
|
||||
[card]
|
||||
name=Urza's Power Plant
|
||||
auto={t}:name(Add Mana) if type(Urza's Tower|mybattlefield)~morethan~0,type(Urza's Mine|mybattlefield)~morethan~0 then add{2} else add{1}
|
||||
alias=4193
|
||||
auto=this(variable{urzatron} >0) produceextra:{1}
|
||||
auto={T}:add{1}
|
||||
text={T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead.
|
||||
type=Land
|
||||
subtype=Urza's Power-Plant
|
||||
[/card]
|
||||
[card]
|
||||
name=Urza's Tower
|
||||
auto={t}:name(Add Mana) if type(Urza's Power Plant|mybattlefield)~morethan~0,type(Urza's Mine|mybattlefield)~morethan~0 then add{3} else add{1}
|
||||
alias=4194
|
||||
auto=this(variable{urzatron} >0) produceextra:{2}
|
||||
auto={T}:add{1}
|
||||
text={T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead.
|
||||
type=Land
|
||||
subtype=Urza's Tower
|
||||
|
||||
@@ -688,6 +688,13 @@ private:
|
||||
{
|
||||
intValue = target->controller()->opponent()->game->hand->nb_cards;
|
||||
}
|
||||
else if (s == "urzatron")//Urza lands
|
||||
{
|
||||
if(card->controller()->game->battlefield->hasAlias(4192) && card->controller()->game->battlefield->hasAlias(4193) && card->controller()->game->battlefield->hasAlias(4194))
|
||||
intValue = 1;
|
||||
else
|
||||
intValue = 0;
|
||||
}
|
||||
else if (s == "worshipped")//Worship
|
||||
{
|
||||
if(card->controller()->game->battlefield->hasType("creature"))
|
||||
|
||||
@@ -103,6 +103,8 @@ class MTGGameZone {
|
||||
|
||||
//returns true if one of the cards in the zone has the ability
|
||||
bool hasAbility(int ability);
|
||||
//returns true if one of the cards in the zone has the alias
|
||||
bool hasAlias(int alias);
|
||||
|
||||
//returns true if one of the cards in the zone has the type
|
||||
bool hasType(const char * value);
|
||||
|
||||
@@ -93,9 +93,27 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string
|
||||
WFont * mFont = observer->getResourceManager()->GetWFont(Fonts::MAIN_FONT);
|
||||
mFont->SetColor(ARGB(255,255,255,255));
|
||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||
|
||||
mFont->DrawString(_(action).c_str(), x + 35, y + GetVerticalTextOffset(), JGETEXT_LEFT);
|
||||
JRenderer * renderer = JRenderer::GetInstance();
|
||||
|
||||
if (!targetQuad)
|
||||
{
|
||||
/*if(source->controller()->isHuman() && source->controller()->opponent()->isAI() && !alt2.size() && _(action).c_str() == source->name)
|
||||
mFont->DrawString("You play ", x + 35, y-15 + GetVerticalTextOffset(), JGETEXT_LEFT);
|
||||
else if(source->controller()->isAI() && source->controller()->opponent()->isHuman() && !alt2.size() && _(action).c_str() == source->name)
|
||||
mFont->DrawString("Opponent plays ", x + 35, y-15 + GetVerticalTextOffset(), JGETEXT_LEFT);*/
|
||||
mFont->DrawString(_(action).c_str(), x + 35, y + GetVerticalTextOffset(), JGETEXT_LEFT);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->FillRect(x-2,y-16 + GetVerticalTextOffset(), 73, 43, ARGB(235,10,10,10));
|
||||
/*if(source->controller()->isHuman() && source->controller()->opponent()->isAI())
|
||||
renderer->DrawRect(x-2,y-16 + GetVerticalTextOffset(), 73, 43, ARGB(245,0,255,0));
|
||||
else
|
||||
renderer->DrawRect(x-2,y-16 + GetVerticalTextOffset(), 73, 43, ARGB(245,255,0,0));*/
|
||||
mFont->DrawString(">", x + 32, y + GetVerticalTextOffset(), JGETEXT_LEFT);
|
||||
mFont->DrawString(_(action).c_str(), x + 75, y + GetVerticalTextOffset(), JGETEXT_LEFT);
|
||||
}
|
||||
|
||||
JQuadPtr quad = observer->getResourceManager()->RetrieveCard(source, CACHE_THUMB);
|
||||
if (!quad.get())
|
||||
quad = CardGui::AlternateThumbQuad(source);
|
||||
@@ -123,12 +141,12 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string
|
||||
targetQuad->SetColor(ARGB(255,255,255,255));
|
||||
targetQuad->SetHotSpot(targetQuad->mWidth / 2, targetQuad->mHeight / 2);
|
||||
float scale = mHeight / targetQuad->mHeight;
|
||||
renderer->RenderQuad(targetQuad, x + 150, y + ((mHeight - targetQuad->mHeight) / 2) + targetQuad->mHotSpotY, 0, scale, scale);
|
||||
renderer->RenderQuad(targetQuad, x + 55, y + ((mHeight - targetQuad->mHeight) / 2) + targetQuad->mHotSpotY, 0, scale, scale);
|
||||
targetQuad->SetHotSpot(backupX, backupY);
|
||||
}
|
||||
else if (alt2.size())
|
||||
{
|
||||
mFont->DrawString(_(alt2).c_str(), x + 120, y + GetVerticalTextOffset());
|
||||
mFont->DrawString(_(alt2).c_str(), x + 35, y+15 + GetVerticalTextOffset());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1222,10 +1240,14 @@ void ActionStack::Render()
|
||||
//stack shadow
|
||||
//renderer->FillRoundRect(x0 - 7, y0+2, width + 17, height + 2, 9.0f, ARGB(128,0,0,0));
|
||||
//stack fill
|
||||
renderer->FillRect(x0 - 7, y0+2, width + 17, height + 14, ARGB(215,10,10,10));
|
||||
renderer->FillRect(x0 - 7, y0+2, width + 17, height + 14, ARGB(225,5,5,5));
|
||||
//stack highlight
|
||||
renderer->FillRect(x0 - 6, y0+3, width + 15, 30, ARGB(255,89,89,89));
|
||||
//another border
|
||||
renderer->DrawRect(x0 - 6, y0+33, width + 15, height - 18, ARGB(255,89,89,89));
|
||||
//stack border
|
||||
renderer->DrawRect(x0 - 7, y0+2, width + 17, height + 14, ARGB(180,240,240,240));
|
||||
|
||||
renderer->DrawRect(x0 - 7, y0+2, width + 17, height + 14, ARGB(255,240,240,240));
|
||||
|
||||
std::ostringstream stream;
|
||||
// WALDORF - changed "interrupt ?" to "Interrupt?". Don't display count down
|
||||
// seconds if the user disables auto progressing interrupts by setting the seconds
|
||||
@@ -1238,11 +1260,11 @@ void ActionStack::Render()
|
||||
else
|
||||
stream << _(kInterruptMessageString) << " " << static_cast<int>(timer);
|
||||
|
||||
mFont->DrawString(stream.str(), x0 + 5, currenty);
|
||||
mFont->DrawString(stream.str(), x0 + 5, currenty - 2);
|
||||
|
||||
// static const float kIconVerticalOffset = 24;
|
||||
static const float kIconHorizontalOffset = 9;
|
||||
static const float kBeforeIconSpace = 10;
|
||||
static const float kIconHorizontalOffset = 10;
|
||||
static const float kBeforeIconSpace = 12;
|
||||
|
||||
//Render "interrupt?" text + possible actions
|
||||
{
|
||||
@@ -1251,25 +1273,25 @@ void ActionStack::Render()
|
||||
|
||||
if (gModRules.game.canInterrupt())
|
||||
{
|
||||
renderer->RenderQuad(pspIcons[7].get(), currentx, kIconVerticalOffset, 0, kGamepadIconSize, kGamepadIconSize);
|
||||
renderer->RenderQuad(pspIcons[7].get(), currentx, kIconVerticalOffset - 2, 0, kGamepadIconSize, kGamepadIconSize);
|
||||
currentx+= kIconHorizontalOffset;
|
||||
mFont->DrawString(_(kInterruptString), currentx, kIconVerticalOffset - 6);
|
||||
mFont->DrawString(_(kInterruptString), currentx, kIconVerticalOffset - 8);
|
||||
currentx+= mFont->GetStringWidth(_(kInterruptString).c_str()) + kBeforeIconSpace;
|
||||
}
|
||||
|
||||
noBtnXOffset = static_cast<int>(currentx);
|
||||
|
||||
renderer->RenderQuad(pspIcons[4].get(), currentx, kIconVerticalOffset, 0, kGamepadIconSize, kGamepadIconSize);
|
||||
renderer->RenderQuad(pspIcons[4].get(), currentx, kIconVerticalOffset - 2, 0, kGamepadIconSize, kGamepadIconSize);
|
||||
currentx+= kIconHorizontalOffset;
|
||||
mFont->DrawString(_(kNoString), currentx, kIconVerticalOffset - 6);
|
||||
mFont->DrawString(_(kNoString), currentx, kIconVerticalOffset - 8);
|
||||
currentx+= mFont->GetStringWidth(_(kNoString).c_str()) + kBeforeIconSpace;
|
||||
|
||||
noToAllBtnXOffset = static_cast<int>(currentx);
|
||||
if (mObjects.size() > 1)
|
||||
{
|
||||
renderer->RenderQuad(pspIcons[6].get(), currentx, kIconVerticalOffset, 0, kGamepadIconSize, kGamepadIconSize);
|
||||
renderer->RenderQuad(pspIcons[6].get(), currentx, kIconVerticalOffset - 2, 0, kGamepadIconSize, kGamepadIconSize);
|
||||
currentx+= kIconHorizontalOffset;
|
||||
mFont->DrawString(_(kNoToAllString), currentx, kIconVerticalOffset - 6);
|
||||
mFont->DrawString(_(kNoToAllString), currentx, kIconVerticalOffset - 8);
|
||||
currentx+= mFont->GetStringWidth(_(kNoToAllString).c_str()) + kBeforeIconSpace;
|
||||
}
|
||||
|
||||
|
||||
@@ -504,7 +504,7 @@ void GuiCombat::Render()
|
||||
ok_quad->SetHotSpot(28, 22);
|
||||
ok.Render(ok_quad.get());
|
||||
}
|
||||
renderer->DrawLine(0, SCREEN_HEIGHT / 2 + 10, SCREEN_WIDTH, SCREEN_HEIGHT / 2 + 10, ARGB(255, 255, 64, 0));
|
||||
renderer->DrawLine(0, SCREEN_HEIGHT / 2, SCREEN_WIDTH, SCREEN_HEIGHT / 2, ARGB(255, 255, 64, 0));
|
||||
if (FIRST_STRIKE == step)
|
||||
{
|
||||
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
|
||||
|
||||
@@ -262,7 +262,7 @@ void GuiMana::RenderStatic()
|
||||
float x0 = x - 20 * totalColors;
|
||||
x0 = max(40.f, x0);
|
||||
float xEnd = x0 + 20 * totalColors;
|
||||
r->FillRoundRect(x0, y - 5, static_cast<float> (20 * totalColors + 5), 20, 2, ARGB(128,0,0,0));
|
||||
r->FillRoundRect(x0, y - 8, static_cast<float> (20 * totalColors + 5), 20, 2, ARGB(128,0,0,0));
|
||||
|
||||
int offset = 0;
|
||||
for (int i = 0; i < Constants::NB_Colors; ++i)
|
||||
@@ -270,10 +270,10 @@ void GuiMana::RenderStatic()
|
||||
if (values[i])
|
||||
{
|
||||
offset -= 20;
|
||||
r->RenderQuad(manaIcons[i].get(), xEnd + 15 + offset, y + 5, 0, 0.7f, 0.7f);
|
||||
r->RenderQuad(manaIcons[i].get(), xEnd + 15 + offset, y + 3, 0, 0.65f, 0.65f);
|
||||
}
|
||||
}
|
||||
r->FillRoundRect(x0, y, static_cast<float> (20 * totalColors + 5), 8, 2, ARGB(100,0,0,0));
|
||||
//r->DrawRoundRect(x0, y - 8, static_cast<float> (20 * totalColors + 5), 20, 2, ARGB(128,255,255,255));
|
||||
offset = 0;
|
||||
for (int i = 0; i < Constants::NB_Colors; ++i)
|
||||
{
|
||||
@@ -283,7 +283,7 @@ void GuiMana::RenderStatic()
|
||||
char buf[4];
|
||||
sprintf(buf, "%i", values[i]);
|
||||
mFont->SetColor(ARGB(255,255,255,255));
|
||||
mFont->DrawString(buf, xEnd + offset + 9, y);
|
||||
mFont->DrawString(buf, xEnd + offset + 18, y + 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,6 +764,18 @@ bool MTGGameZone::hasAbility(int ability)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MTGGameZone::hasAlias(int alias)
|
||||
{
|
||||
for (int i = 0; i < (nb_cards); i++)
|
||||
{
|
||||
if (cards[i]->alias == alias)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int MTGGameZone::seenThisTurn(TargetChooser * tc, int castMethod, bool lastTurn)
|
||||
{
|
||||
//The following 2 lines modify the passed TargetChooser. Call this function with care :/
|
||||
|
||||
Reference in New Issue
Block a user