From 440d6d76293b5c45aa25c3a9f0f1e956b53784ee Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Mon, 3 Nov 2008 04:27:58 +0000 Subject: [PATCH] - fixed a Zombie Master bug - fixed a graveyard bug --- projects/mtg/include/AllAbilities.h | 2 +- projects/mtg/include/GameStateMenu.h | 2 +- projects/mtg/src/CardDisplay.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 6ba0f0d9d..58462a325 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -848,7 +848,7 @@ public: if (ability != -1 && card->basicAbilities[ability]) card->basicAbilities[ability] -=1; if (regenCost){ if(regenerations.find(card) != regenerations.end()){ - game->removeObserver(regenerations[card]); + if (game->isInPlay(card)) game->removeObserver(regenerations[card]); regenerations.erase(card); } } diff --git a/projects/mtg/include/GameStateMenu.h b/projects/mtg/include/GameStateMenu.h index b3761ff0c..b14ca5035 100644 --- a/projects/mtg/include/GameStateMenu.h +++ b/projects/mtg/include/GameStateMenu.h @@ -19,7 +19,7 @@ #define STATE_FIRST_TIME 4 #define STATE_WARNING 5 -#define GAME_VERSION "WTH?! 0.2.1 - by WilLoW" +#define GAME_VERSION "WTH?! 0.2.2 - by WilLoW" #define ALPHA_WARNING 0 class GameStateMenu: public GameState, public JGuiListener diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index f9ca9fbea..ad6fcb9df 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -106,9 +106,9 @@ void CardDisplay::CheckUserInput(float dt){ { int n = mCurr; n++; + if (n>= mCount){n = mCount-1;} if (n>= start_item + nb_displayed_items){ - if (n>= mCount){n = mCount-1;} - else{ rotateRight();} + rotateRight(); } if (n != mCurr && mObjects[mCurr] != NULL && mObjects[mCurr]->Leaving(PSP_CTRL_RIGHT)){ mCurr = n;