diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index ad24a4935..da2f5e215 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -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 diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index 9be634a0e..d02f991ad 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -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; } } } diff --git a/projects/mtg/src/GuiCombat.cpp b/projects/mtg/src/GuiCombat.cpp index ad9a05a98..897067b48 100644 --- a/projects/mtg/src/GuiCombat.cpp +++ b/projects/mtg/src/GuiCombat.cpp @@ -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)); diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index cf21696c7..46c51df68 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -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)