Merge pull request #31 from WagicProject/master

getting master
This commit is contained in:
zethfoxster
2016-07-24 07:32:06 -04:00
committed by GitHub
9 changed files with 105 additions and 55 deletions

View File

@@ -333,6 +333,14 @@ mana={3}
type=Artifact type=Artifact
[/card] [/card]
[card] [card]
name=Unexpected Results
auto=shuffle
auto=reveal:1 optionone transforms((,newability[if type(land|reveal)~morethan~0 then moveto(ownerhand) && all(*[land]|reveal) moveto(ownerbattlefield)])) forever optiononeend optiontwo name(Put Back) target(<1>*[-land]|reveal) moveto(mylibrary) and!(transforms((,newability[may activate castcard(normal)])) oneshot)! optiontwoend revealend
text=Shuffle your library, then reveal the top card. If it's a nonland card, you may cast it without paying its mana cost. If it's a land card, you may put it onto the battlefield and return Unexpected Results to its owner's hand.
mana={2}{G}{U}
type=Sorcery
[/card]
[card]
name=Unstable Shapeshifter name=Unstable Shapeshifter
auto=@movedto(other creature|battlefield):all(trigger[from]) copy auto=@movedto(other creature|battlefield):all(trigger[from]) copy
text=Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature and gains this ability. text=Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature and gains this ability.
@@ -343,6 +351,14 @@ power=0
toughness=1 toughness=1
[/card] [/card]
[card] [card]
name=Venser's Diffusion
target=*[-land]
auto=moveTo(ownerhand)
text=Return target nonland permanent or suspended card to its owner's hand.
mana={2}{U}
type=Instant
[/card]
[card]
name=Virulent Swipe name=Virulent Swipe
target=creature target=creature
auto=2/0 auto=2/0

View File

@@ -46504,6 +46504,13 @@ mana={2}
type=Artifact type=Artifact
[/card] [/card]
[card] [card]
name=Grindstone
auto={3}{T}:color deplete:2 target(player)
text={3}, {T}: Put the top two cards of target player's library into that player's graveyard. If both cards share a color, repeat this process.
mana={1}
type=Artifact
[/card]
[card]
name=Grinning Demon name=Grinning Demon
facedown={3} facedown={3}
autofacedown={2}{B}{B}:morph autofacedown={2}{B}{B}:morph
@@ -81935,6 +81942,13 @@ mana={1}{G}
type=Enchantment type=Enchantment
[/card] [/card]
[card] [card]
name=Primal Surge
auto=reveal:1 optionone name(may put in play) target(<upto:1>*[-instant;-sorcery]|reveal) moveto(myexile) and!(moveto(ownerbattlefield))! forever optiononeend optiontwo all(*|reveal) moveto(myexile) optiontwoend repeat revealend
text=Exile the top card of your library. If it's a permanent card, you may put it onto the battlefield. If you do, repeat this process.
mana={8}{G}{G}
type=Sorcery
[/card]
[card]
name=Primal Visitation name=Primal Visitation
target=creature target=creature
auto=3/3 auto=3/3
@@ -92295,6 +92309,17 @@ power=2
toughness=3 toughness=3
[/card] [/card]
[card] [card]
name=Scalpelexis
abilities=flying
auto=@combatdamaged(player) from(this):nameingest ingest:4 opponent
text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Whenever Scalpelexis deals combat damage to a player, that player exiles the top four cards of his or her library. If two or more of those cards have the same name, repeat this process.
mana={4}{U}
type=Creature
subtype=Beast
power=1
toughness=5
[/card]
[card]
name=Scapegoat name=Scapegoat
target=<anyamount>creature|mybattlefield target=<anyamount>creature|mybattlefield
auto=moveTo(ownerhand) auto=moveTo(ownerhand)
@@ -102820,6 +102845,13 @@ mana={X}{W}{U}{U}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Sphinx's Tutelage
auto=@drawof(player):color deplete:2 target(opponent)
text=Whenever you draw a card, target opponent puts the top two cards of his or her library into his or her graveyard. If they're both nonland cards that share a color, repeat this process. -- {5}{U}: Draw a card, then discard a card.
mana={2}{U}
type=Enchantment
[/card]
[card]
name=Spider Spawning name=Spider Spawning
auto=token(Spider,Creature Spider,1/2,green,reach)*type:creature:mygraveyard auto=token(Spider,Creature Spider,1/2,green,reach)*type:creature:mygraveyard
flashback={6}{B} flashback={6}{B}
@@ -111801,7 +111833,7 @@ type=Sorcery
[card] [card]
name=Thoughtseize name=Thoughtseize
target=player target=player
auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*[-land]|reveal) moveto(ownerhand)])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*|reveal) moveto(ownerhand)])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend
text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life. text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life.
mana={B} mana={B}
type=Sorcery type=Sorcery
@@ -118829,14 +118861,6 @@ type=Planeswalker
subtype=Venser subtype=Venser
[/card] [/card]
[card] [card]
name=Venser's Diffusion
target=*[-land]
auto=moveTo(ownerhand)
text=Return target nonland permanent or suspended card to its owner's hand.
mana={2}{U}
type=Instant
[/card]
[card]
name=Venser's Journal name=Venser's Journal
abilities=nomaxhand abilities=nomaxhand
auto=@each my upkeep:life:phandcount auto=@each my upkeep:life:phandcount

View File

@@ -7010,12 +7010,6 @@ power=2
toughness=2 toughness=2
[/card] [/card]
[card] [card]
name=Grindstone
text={3}, {T}: Put the top two cards of target player's library into that player's graveyard. If both cards share a color, repeat this process.
mana={1}
type=Artifact
[/card]
[card]
name=Grinning Totem name=Grinning Totem
text={2}, {T}, Sacrifice Grinning Totem: Search target opponent's library for a card and exile it. Then that player shuffles his or her library. Until the beginning of your next upkeep, you may play that card. At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard. text={2}, {T}, Sacrifice Grinning Totem: Search target opponent's library for a card and exile it. Then that player shuffles his or her library. Until the beginning of your next upkeep, you may play that card. At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard.
mana={4} mana={4}
@@ -13072,12 +13066,6 @@ mana={3}{G}{G}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Primal Surge
text=Exile the top card of your library. If it's a permanent card, you may put it onto the battlefield. If you do, repeat this process.
mana={8}{G}{G}
type=Sorcery
[/card]
[card]
name=Primal Vigor name=Primal Vigor
text=If one or more tokens would be put onto the battlefield, twice that many of those tokens are put onto the battlefield instead. -- If one or more +1/+1 counters would be placed on a creature, twice that many +1/+1 counters are placed on that creature instead. text=If one or more tokens would be put onto the battlefield, twice that many of those tokens are put onto the battlefield instead. -- If one or more +1/+1 counters would be placed on a creature, twice that many +1/+1 counters are placed on that creature instead.
mana={4}{G} mana={4}{G}
@@ -14917,15 +14905,6 @@ power=4
toughness=5 toughness=5
[/card] [/card]
[card] [card]
name=Scalpelexis
text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Whenever Scalpelexis deals combat damage to a player, that player exiles the top four cards of his or her library. If two or more of those cards have the same name, repeat this process.
mana={4}{U}
type=Creature
subtype=Beast
power=1
toughness=5
[/card]
[card]
name=Scandalmonger name=Scandalmonger
text={2}: Target player discards a card. Any player may activate this ability but only any time he or she could cast a sorcery. text={2}: Target player discards a card. Any player may activate this ability but only any time he or she could cast a sorcery.
mana={3}{B} mana={3}{B}
@@ -16560,12 +16539,6 @@ power=5
toughness=6 toughness=6
[/card] [/card]
[card] [card]
name=Sphinx's Tutelage
text=Whenever you draw a card, target opponent puts the top two cards of his or her library into his or her graveyard. If they're both nonland cards that share a color, repeat this process. -- {5}{U}: Draw a card, then discard a card.
mana={2}{U}
type=Enchantment
[/card]
[card]
name=Spider Climb name=Spider Climb
text=You may cast Spider Climb as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. -- Enchant creature -- Enchanted creature gets +0/+3 and has reach. (It can block creatures with flying.) text=You may cast Spider Climb as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step. -- Enchant creature -- Enchanted creature gets +0/+3 and has reach. (It can block creatures with flying.)
mana={G} mana={G}

View File

@@ -23,7 +23,7 @@ public:
void renderCard(int index) void renderCard(int index)
{ {
int alpha = (int) (255 * (mCards[index].scale + 1.0 - max_scale)); int alpha = (int) (255 * (mCards[index].scale + 1.0 - max_scale));
DeckView::renderCard(index, alpha); DeckView::renderCard(index, alpha, false, true);
} }
void Render(); void Render();

View File

@@ -207,7 +207,7 @@ protected:
* *
* \see mCards * \see mCards
*/ */
void renderCard(int index, int alpha, bool asThumbnail = false); void renderCard(int index, int alpha, bool asThumbnail = false, bool addWHborder = false);
/*! \brief Returns the index in mCards of the card that is nearest to the given point /*! \brief Returns the index in mCards of the card that is nearest to the given point
* *

View File

@@ -130,8 +130,25 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string
if (bigQuad) if (bigQuad)
{ {
Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 1.0, 0.0, 220); //Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 1.0, 0.0, 220);
CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode()); Pos npos = Pos(CardGui::BigWidth / 2 + 8.f, CardGui::BigHeight / 2 - 2.f, 1.0f - (1.0f/10), 0.0, 220);
//border
if(observer->getCardSelector()->GetDrawMode() < 2)
{
string cardsetname = setlist[source->setId].c_str();
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,248,248,255));
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(150,20,20,20));
}
else
{
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,5,5,5));
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(50,240,240,240));
}
}
//render card
CardGui::DrawCard(source, npos, observer->getCardSelector()->GetDrawMode(),false,true);
} }
if (targetQuad) if (targetQuad)

View File

@@ -1145,20 +1145,16 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder
{ {
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{ {
//like white border JRenderer::GetInstance()->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(255,248,248,255));
renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,248,248,255)); JRenderer::GetInstance()->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(150,20,20,20));
//black thin line to simulate card edge
renderer->DrawRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(150,20,20,20));
} }
else else
{ {
//like black border JRenderer::GetInstance()->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(255,5,5,5));
renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,10,10,10)); JRenderer::GetInstance()->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(50,240,240,240));
//white thin line to simulate card edge
renderer->DrawRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(50,240,240,240));
} }
//render card image //render card image
renderer->RenderQuad(quad.get(), x, pos.actY-2, pos.actT, scale-0.02f, scale-0.02f); renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
} }
else else
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);

View File

@@ -340,7 +340,30 @@ void CardSelector::Render()
if (CardView* card = dynamic_cast<CardView*>(active) ) if (CardView* card = dynamic_cast<CardView*>(active) )
{ {
if(timer > 0) if(timer > 0)
card->DrawCard(bigpos, mDrawMode); {
float modx = 0.f;
//if(card->mHasFocus && observer->isInHand(card->getCard()) && !card->getCard()->owner->isAI())
//modx -= 1.8f;//todo small adjustment
//new npos for smaller bigquad
Pos npos = Pos(bigpos.x+7.f+modx,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/10),bigpos.t,bigpos.alpha);
//border
if(mDrawMode < 2)
{
string cardsetname = setlist[card->getCard()->setId].c_str();
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,248,248,255));
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(150,20,20,20));
}
else
{
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,5,5,5));
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(50,240,240,240));
}
}
//render card
card->DrawCard(npos, mDrawMode, false, true);
}
} }
} }
} }

View File

@@ -93,7 +93,7 @@ void DeckView::reloadIndexes()
} }
} }
void DeckView::renderCard(int index, int alpha, bool asThumbnail) void DeckView::renderCard(int index, int alpha, bool asThumbnail, bool addWHborder)
{ {
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
@@ -146,17 +146,18 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail)
else else
{//NORMAL VIEW WITH IMAGES {//NORMAL VIEW WITH IMAGES
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText; int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
float modx = addWHborder ? 2.0f:0.0f;
//border for editor && others??? //border for editor && others???
string cardsetname = setlist[cardPosition.card->setId].c_str(); string cardsetname = setlist[cardPosition.card->setId].c_str();
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{ {
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(255,248,248,255)); JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(255,248,248,255));
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(150,20,20,20)); JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(150,20,20,20));
} }
else else
{ {
JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(255,10,10,10)); JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(255,10,10,10));
JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(50,240,240,240)); JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-(5.f+modx),(cardPosition.y - cardPosition.scale * 142.5f)-(5.f+modx),cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f+modx,ARGB(50,240,240,240));
} }
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255); Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true); CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true);