diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 8ec976a42..d060bf33c 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -46,6 +46,7 @@ beacon_of_unrest.txt blessed_wine.txt #blinking_spirit.txt bloodfire_colossus.txt +bloodhall_ooze.txt bottle_gnomes.txt bottle_gnomes2.txt boggart_arsonists.txt diff --git a/projects/mtg/bin/Res/test/bloodhall_ooze.txt b/projects/mtg/bin/Res/test/bloodhall_ooze.txt new file mode 100644 index 000000000..bd2f95ffa --- /dev/null +++ b/projects/mtg/bin/Res/test/bloodhall_ooze.txt @@ -0,0 +1,32 @@ +#Bug:bloodhal ooze gets 2 counters each upkeep no matter what +[INIT] +SECONDMAIN +[PLAYER1] +[PLAYER2] +inplay:bloodhall ooze,grizzly bears +[DO] +eot +next +choice 0 +next +#draw +next +#main +next +#being +next +#attackers +bloodhall ooze +next +#blockers +next +#damage +next +#combatend +[ASSERT] +COMBATEND +[PLAYER1] +life:18 +[PLAYER2] +inplay:bloodhall ooze,grizzly bears +[END] \ No newline at end of file diff --git a/projects/mtg/src/GameStateShop.cpp b/projects/mtg/src/GameStateShop.cpp index 3ef6f6062..b47bcdaf8 100644 --- a/projects/mtg/src/GameStateShop.cpp +++ b/projects/mtg/src/GameStateShop.cpp @@ -160,11 +160,15 @@ void GameStateShop::Render() JRenderer * r = JRenderer::GetInstance(); r->ClearScreen(ARGB(0,0,0,0)); if (mBg)JRenderer::GetInstance()->RenderQuad(mBg,0,0); + + r->FillRect(5,SCREEN_HEIGHT-15,110,15,ARGB(200,0,0,0)); + itemFont->SetColor(ARGB(255,255,255,255)); + itemFont->DrawString(_("press [] to refresh").c_str(),10,SCREEN_HEIGHT-12); + if (shop) shop->Render(); - r->FillRect(5,SCREEN_HEIGHT-15,110,15,ARGB(200,0,0,0)); - itemFont->DrawString(_("press [] to refresh").c_str(),10,SCREEN_HEIGHT-12); + if (mStage == STAGE_SHOP_MENU && menu){ menu->Render(); } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index ecb457b2c..2b2e9fe00 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -220,28 +220,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return multi; } - //When...comes into play, you may... - found = s.find("may "); - if (found != string::npos){ - string s1 = s.substr(found+4); - MTGAbility * a1 = parseMagicLine(s1,id,spell, card); - if (!a1) return NULL; - TargetChooser * tc = NULL; - //Target Abilities - found = s.find("target("); - if (found != string::npos){ - int end = s.find(")", found); - string starget = s.substr(found + 7,end - found - 7); - TargetChooserFactory tcf; - tc = tcf.createTargetChooser(starget, card); - } - if (tc) a1 = NEW GenericTargetAbility(id, card, tc, a1); - return NEW MayAbility(id,a1,card); - } - - - - //Lord, foreach, aslongas string lords[] = {"lord(","foreach(", "aslongas(", "all("}; found = string::npos; @@ -297,7 +275,27 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return NULL; } - + //When...comes into play, you may... + found = s.find("may "); + if (found != string::npos){ + string s1 = s.substr(found+4); + MTGAbility * a1 = parseMagicLine(s1,id,spell, card); + if (!a1) return NULL; + TargetChooser * tc = NULL; + //Target Abilities + found = s.find("target("); + if (found != string::npos){ + int end = s.find(")", found); + string starget = s.substr(found + 7,end - found - 7); + TargetChooserFactory tcf; + tc = tcf.createTargetChooser(starget, card); + } + if (tc) a1 = NEW GenericTargetAbility(id, card, tc, a1); + return NEW MayAbility(id,a1,card); + } + + + //Fizzle (counterspell...) found = s.find("fizzle"); if (found != string::npos){