Merge pull request #780 from kevlahnota/master

OK quad and COMBATTOUGHNESS for attackers/blockers
This commit is contained in:
Anthony Calosa
2016-07-22 16:34:15 +08:00
committed by GitHub
4 changed files with 16 additions and 10 deletions

View File

@@ -119076,7 +119076,7 @@ type=Enchantment
[/card]
[card]
name=Vessel of Nascency
auto={1}{G}{s}:reveal:4 optionone name(Get land) target(creature,artifact,enchantment,land,planeswalker|reveal) moveto(myhand) optiononeend optiontwo name(put in grave) all(*|reveal) moveto(mygraveyard) optiontwoend revealend
auto={1}{G}{s}:reveal:4 optionone name(Choose Card) target(creature,artifact,enchantment,land,planeswalker|reveal) moveto(myhand) optiononeend optiontwo name(put in grave) all(*|reveal) moveto(mygraveyard) optiontwoend revealend
text={1}{G}, Sacrifice Vessel of Nascency: Reveal the top four cards of your library. You may put an artifact, creature, enchantment, land, or planeswalker card from among them into your hand. Put the rest into your graveyard.
mana={G}
type=Enchantment

View File

@@ -2739,8 +2739,8 @@ int AIPlayerBaka::getCreaturesInfo(Player * player, int neededInfo, int untapMod
result++;
}
else
{
result += card->power;
{//AI should consider COMBATTOUGHNESS for attackers and blockers
result += card->has(Constants::COMBATTOUGHNESS) ? card->toughness : card->power;
}
}
}

View File

@@ -500,8 +500,10 @@ void GuiCombat::Render()
}
if (ok_tex)
{
JQuadPtr ok_quad = WResourceManager::Instance()->RetrieveTempQuad("Ok.png");
ok_quad->SetHotSpot(28, 22);
JQuadPtr ok_quad = WResourceManager::Instance()->RetrieveQuad("Ok.png", 0.0f, 0.0f, ok_tex->mWidth - 4.5f, ok_tex->mHeight - 4.5f);
ok_quad->mWidth = 56.f;
ok_quad->mHeight = 45.f;
ok_quad->SetHotSpot(ok_quad->mWidth/2, ok_quad->mHeight/2);
ok.Render(ok_quad.get());
}
renderer->DrawLine(0, SCREEN_HEIGHT / 2, SCREEN_WIDTH, SCREEN_HEIGHT / 2, ARGB(255, 255, 64, 0));

View File

@@ -234,10 +234,14 @@ JQuadPtr ResourceManagerImpl::RetrieveCard(MTGCard * card, int style, int submod
submode = submode | TEXTURE_SUB_CARD;
static std::ostringstream filename;
filename.str("");
filename << setlist[card->setId] << "/" << card->getImageName();
//static std::ostringstream filename;
//filename.str("");
string filename;
filename.reserve(4096);
//filename << setlist[card->setId] << "/" << card->getImageName();
filename.append(setlist[card->setId]);
filename.append("/");
filename.append(card->getImageName());
int id = card->getMTGId();
//Aliases.
@@ -247,7 +251,7 @@ JQuadPtr ResourceManagerImpl::RetrieveCard(MTGCard * card, int style, int submod
style = RETRIEVE_NORMAL;
}
JQuadPtr jq = RetrieveQuad(filename.str(), 0, 0, 0, 0, "", style, submode | TEXTURE_SUB_5551, id);
JQuadPtr jq = RetrieveQuad(filename, 0, 0, 0, 0, "", style, submode | TEXTURE_SUB_5551, id);
lastError = textureWCache.mError;
if (jq)