diff --git a/projects/mtg/bin/Res/graphics/simon.dat b/projects/mtg/bin/Res/graphics/simon.dat index 76f1b8e15..5f1321458 100644 Binary files a/projects/mtg/bin/Res/graphics/simon.dat and b/projects/mtg/bin/Res/graphics/simon.dat differ diff --git a/projects/mtg/bin/Res/graphics/simon.png b/projects/mtg/bin/Res/graphics/simon.png index e82520eee..262ae500d 100644 Binary files a/projects/mtg/bin/Res/graphics/simon.png and b/projects/mtg/bin/Res/graphics/simon.png differ diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index 569bcaf30..99bde671b 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -70,6 +70,8 @@ subtype=Aura [/card] [card] text={T}: Draw three cards. {2}{U}{U}: Return Arcanis the Omnipotent to its owner's hand. +auto={T}:draw 3 +auto={2}{U}{U}:moveTo(hand) abilities=legendary auto={T}:Draw:3 id=106426 diff --git a/projects/mtg/bin/Res/sets/ALA/_cards.dat b/projects/mtg/bin/Res/sets/ALA/_cards.dat index 4d1ec8108..b4272f3fe 100644 --- a/projects/mtg/bin/Res/sets/ALA/_cards.dat +++ b/projects/mtg/bin/Res/sets/ALA/_cards.dat @@ -106,6 +106,15 @@ subtype=Human Archer toughness=3 [/card] [card] +text=Dragon creatures you control get +3/+3. +auto=lord(dragon|myinplay) 3/3 +id=179426 +name=Crucible of Fire +rarity=R +type=Enchantment +mana={3}{R} +[/card] +[card] text=Crumbling Necropolis comes into play tapped. {T}: Add {U}, {B}, or {R} to your mana pool. auto=tap auto={T}:Add{U} @@ -356,6 +365,18 @@ type=Basic Land subtype=Island [/card] [card] +text=Jhessian Infiltrator is unblockable. +abilities=unblockable +id=175392 +name=Jhessian Infiltrator +rarity=U +type=Creature +mana={G}{U} +power=2 +subtype=Human Rogue +toughness=2 +[/card] +[card] text= id=176428 name=Jhessian Lookout @@ -469,6 +490,19 @@ type=Instant mana={1}{G} [/card] [card] +text={R}, {T}: Target creature gets +2/+0 until end of turn. {W}, {T}: Tap target creature. +auto={R},{T}:2/0 target(creature) +auto={W},{T}:tap target(creature) +id=174944 +name=Naya Battlemage +rarity=U +type=Creature +mana={2}{G} +power=2 +subtype=Human Shaman +toughness=2 +[/card] +[card] text={T}: Add {G}, {W}, or {U} to your mana pool. auto={T}:Add{G} auto={T}:Add{W} @@ -641,6 +675,16 @@ rarity=U type=Land [/card] [card] +text=Remove target card in a graveyard from the game. You gain 3 life. +target=*|graveyard +auto=moveto(removedfromgame) +id=177473 +name=Shadowfeed +rarity=C +type=Instant +mana={B} +[/card] +[card] text={U}: Shore Snapper gains islandwalk until end of turn. id=175390 auto={U}:islandwalk diff --git a/projects/mtg/bin/Res/sets/ALA/todo.dat b/projects/mtg/bin/Res/sets/ALA/todo.dat index f199d6e8a..e3f36b6ad 100644 --- a/projects/mtg/bin/Res/sets/ALA/todo.dat +++ b/projects/mtg/bin/Res/sets/ALA/todo.dat @@ -290,14 +290,7 @@ rarity=R type=Enchantment mana={3}{W} [/card] -[card] -text=Dragon creatures you control get +3/+3. -id=179426 -name=Crucible of Fire -rarity=R -type=Enchantment -mana={3}{R} -[/card] + [card] text=Target opponent sacrifices a creature, discards three cards, then loses 5 life. You return a creature card from your graveyard to your hand, draw three cards, then gain 5 life. id=175079 @@ -688,17 +681,7 @@ rarity=R type=Sorcery mana={6}{W}{W} [/card] -[card] -text=Jhessian Infiltrator is unblockable. -id=175392 -name=Jhessian Infiltrator -rarity=U -type=Creature -mana={G}{U} -power=2 -subtype=Human Rogue -toughness=2 -[/card] + [card] text={B}, {T}: Target player loses 1 life. {G}, {T}: Put a 1/1 green Saproling creature token into play. id=175050 @@ -933,17 +916,7 @@ power=4 subtype=Fungus toughness=4 [/card] -[card] -text={R}, {T}: Target creature gets +2/+0 until end of turn. {W}, {T}: Tap target creature. -id=174944 -name=Naya Battlemage -rarity=U -type=Creature -mana={2}{G} -power=2 -subtype=Human Shaman -toughness=2 -[/card] + [card] text=Choose one - Naya Charm deals 3 damage to target creature; or return target card in a graveyard to its owner's hand; or tap all creatures target player controls. id=137905 @@ -1290,14 +1263,6 @@ subtype=Zombie Warrior toughness=5 [/card] [card] -text=Remove target card in a graveyard from the game. You gain 3 life. -id=177473 -name=Shadowfeed -rarity=C -type=Instant -mana={B} -[/card] -[card] text=Flying Whenever an artifact creature you control deals combat damage to a player, you may put a 1/1 blue Thopter artifact creature token with flying into play. id=174881 name=Sharding Sphinx diff --git a/projects/mtg/include/GameStateMenu.h b/projects/mtg/include/GameStateMenu.h index 74e0ab8bd..d896d3ef1 100644 --- a/projects/mtg/include/GameStateMenu.h +++ b/projects/mtg/include/GameStateMenu.h @@ -11,7 +11,6 @@ class GameStateMenu: public GameState, public JGuiListener private: JGuiController* mGuiController; SimpleMenu* subMenuController; - JLBFont* mFont; JQuad * mIcons[10]; JTexture * mIconsTexture; JTexture * bgTexture; diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index d24ba818b..a5855fe90 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -1,7 +1,9 @@ #ifndef _MTGDEFINITION_H_ #define _MTGDEFINITION_H_ -#define DEFAULT_MAIN_FONT_SCALE 0.5 +#define DEFAULT_MENU_FONT_SCALE 1.0 +#define DEFAULT_MAIN_FONT_SCALE 1.0 +#define DEFAULT_TEXT_FONT_SCALE 1.0 class Constants { @@ -106,7 +108,8 @@ class Constants MAIN_FONT = 0, - MAGIC_FONT = 1, + MENU_FONT = 1, + MAGIC_FONT = 2, }; static char MTGColorChars[]; diff --git a/projects/mtg/include/SimpleMenu.h b/projects/mtg/include/SimpleMenu.h index f57fbdbd7..ddd167db8 100644 --- a/projects/mtg/include/SimpleMenu.h +++ b/projects/mtg/include/SimpleMenu.h @@ -43,7 +43,7 @@ class SimpleMenu:public JGuiController{ void drawVertPole(int x, int y, int height); public: - SimpleMenu(int id, JGuiListener* listener, JLBFont* font, int x, int y, const char * _title = "", int _maxItems = 10); + SimpleMenu(int id, JGuiListener* listener, JLBFont* font, int x, int y, const char * _title = "", int _maxItems = 7); void Render(); void Update(float dt); void Add(int id, const char * Text); diff --git a/projects/mtg/src/GameApp.cpp b/projects/mtg/src/GameApp.cpp index 78cdf5f0a..7d5c19b46 100644 --- a/projects/mtg/src/GameApp.cpp +++ b/projects/mtg/src/GameApp.cpp @@ -99,8 +99,8 @@ void GameApp::Create() CommonRes->CreateQuad("stars", "graphics/particles.png", 64, 0, 32, 32); CommonRes->GetQuad("stars")->SetHotSpot(16,16); - CommonRes->LoadJLBFont("graphics/simon",22); - CommonRes->GetJLBFont("graphics/simon")->SetTracking(-2); + CommonRes->LoadJLBFont("graphics/simon",11); + CommonRes->GetJLBFont("graphics/simon")->SetTracking(-1); CommonRes->LoadJLBFont("graphics/f3",16); CommonRes->LoadJLBFont("graphics/magic",16); diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 237508d26..ef6a0fd7b 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -68,7 +68,7 @@ void GameStateDuel::Start() mGamePhase = DUEL_STATE_CHOOSE_DECK1; - mFont = GameApp::CommonRes->GetJLBFont("graphics/simon"); + mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT); mFont->SetBase(0); // using 2nd font opponentMenuFont = mFont; //NEW JLBFont("graphics/simon",22); diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index dc74fc250..20877ae96 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -90,7 +90,7 @@ void GameStateMenu::Create() } } - mFont = GameApp::CommonRes->GetJLBFont("graphics/simon"); + JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT); //mFont->SetBase(0); // using 2nd font mGuiController = NEW JGuiController(100, this); //mGuiController->SetShadingBackground(10, 45, 80, 100, ARGB(255,0,0,0)); @@ -345,13 +345,13 @@ void GameStateMenu::Render() { JRenderer * renderer = JRenderer::GetInstance(); renderer->ClearScreen(ARGB(0,0,0,0)); - + JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT); if ((currentState & MENU_STATE_MAJOR) == MENU_STATE_MAJOR_LOADING_CARDS){ char text[512]; sprintf(text, "LOADING SET: %s", mCurrentSetName); mFont->DrawString(text,SCREEN_WIDTH/2,SCREEN_HEIGHT/2,JGETEXT_CENTER); }else{ - + mFont = GameApp::CommonRes->GetJLBFont(Constants::MAIN_FONT); PIXEL_TYPE colors[] = { ARGB(255, 3, 2, 0), @@ -365,7 +365,7 @@ void GameStateMenu::Render() if (yW < 2*SCREEN_HEIGHT) renderer->RenderQuad(mMovingW, SCREEN_WIDTH/2 - 10, yW, angleW); if (mGuiController!=NULL) mGuiController->Render(); - + mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetColor(ARGB(128,255,255,255)); mFont->DrawString(GAME_VERSION, SCREEN_WIDTH-10,SCREEN_HEIGHT-15,JGETEXT_RIGHT); @@ -396,6 +396,7 @@ void GameStateMenu::Render() void GameStateMenu::ButtonPressed(int controllerId, int controlId) { +JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT); #if defined (WIN32) || defined (LINUX) char buf[4096]; sprintf(buf, "cnotrollerId: %i", controllerId); @@ -410,6 +411,7 @@ void GameStateMenu::ButtonPressed(int controllerId, int controlId) switch (controlId) { case MENUITEM_PLAY: + #ifdef TESTSUITE subMenuController = NEW SimpleMenu(102, this, mFont, 150,60); #else diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 377d78da6..644656241 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -301,7 +301,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ game->addObserver(NEW AZoneMover(id,card,tc,szone,cost)); } }else{ - MTGGameZone * fromZone = target->getCurrentZone(); + MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser MTGGameZone * destZone = MTGGameZone::stringToZone(szone, target); target->controller()->game->putInZone(target,fromZone,destZone); } diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 82b75c3ba..279001f06 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -337,6 +337,7 @@ MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * sourc if(zoneName.compare("mygraveyard") == 0)return p->game->graveyard; if(zoneName.compare("opponentgraveyard") == 0) return p->opponent()->game->graveyard; if(zoneName.compare("ownergraveyard") == 0) return source->owner->game->graveyard; + if(zoneName.compare("graveyard") == 0) return source->owner->game->graveyard; if(zoneName.compare("myinplay") == 0)return p->game->inPlay; if(zoneName.compare("opponentinplay") == 0) return p->opponent()->game->inPlay; @@ -345,9 +346,11 @@ MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * sourc if(zoneName.compare("myhand") == 0)return p->game->hand; if(zoneName.compare("opponenthand") == 0) return p->opponent()->game->hand; if(zoneName.compare("ownerhand") == 0) return source->owner->game->hand; + if(zoneName.compare("hand") == 0) return source->owner->game->hand; if(zoneName.compare("myremovedfromgame") == 0)return p->game->removedFromGame; if(zoneName.compare("opponentremovedfromgame") == 0) return p->opponent()->game->removedFromGame; - if(zoneName.compare("ownerhremovedfromgame") == 0) return source->owner->game->removedFromGame; + if(zoneName.compare("ownerremovedfromgame") == 0) return source->owner->game->removedFromGame; + if(zoneName.compare("removedfromgame") == 0) return source->owner->game->removedFromGame; return NULL; } diff --git a/projects/mtg/src/MTGGuiPlay.cpp b/projects/mtg/src/MTGGuiPlay.cpp index 742ea9604..303946063 100644 Binary files a/projects/mtg/src/MTGGuiPlay.cpp and b/projects/mtg/src/MTGGuiPlay.cpp differ diff --git a/projects/mtg/src/SimpleMenu.cpp b/projects/mtg/src/SimpleMenu.cpp index 9935147fa..7a746544a 100644 --- a/projects/mtg/src/SimpleMenu.cpp +++ b/projects/mtg/src/SimpleMenu.cpp @@ -7,7 +7,7 @@ const unsigned SimpleMenu::SIDE_SIZE = 7; const unsigned SimpleMenu::VMARGIN = 16; const unsigned SimpleMenu::HMARGIN = 30; -const signed SimpleMenu::LINE_HEIGHT = 28; +const signed SimpleMenu::LINE_HEIGHT = 20; const char* SimpleMenu::spadeLPath = "graphics/spade_ul.png"; const char* SimpleMenu::spadeRPath = "graphics/spade_ur.png"; const char* SimpleMenu::jewelPath = "graphics/jewel.png"; diff --git a/projects/mtg/src/SimpleMenuItem.cpp b/projects/mtg/src/SimpleMenuItem.cpp index d4a1c5832..51022efd9 100644 --- a/projects/mtg/src/SimpleMenuItem.cpp +++ b/projects/mtg/src/SimpleMenuItem.cpp @@ -12,13 +12,13 @@ SimpleMenuItem::SimpleMenuItem(SimpleMenu* _parent, int id, JLBFont *font, const if (hasFocus) Entering(); - // mFont->SetScale(1.2f); + mFont->SetScale(1.2f); } void SimpleMenuItem::RenderWithOffset(float yOffset) { - // mFont->SetScale(mScale); + mFont->SetScale(mScale); //mFont->SetColor(ARGB(255,255,255,255)); mFont->DrawString(mText.c_str(), mX, mY + yOffset, JGETEXT_CENTER); // mFont->SetScale(1.0f); @@ -31,7 +31,7 @@ void SimpleMenuItem::Render() void SimpleMenuItem::Update(float dt) { - /* if (mScale < mTargetScale) + if (mScale < mTargetScale) { mScale += 8.0f*dt; if (mScale > mTargetScale) @@ -42,7 +42,7 @@ void SimpleMenuItem::Update(float dt) mScale -= 8.0f*dt; if (mScale < mTargetScale) mScale = mTargetScale; - }*/ + } }